| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
Reported by Uxio Prego.
http://lists.gnu.org/archive/html/bug-bison/2018-12/msg00029.html
* src/scan-gram.l, src/parse-gram.y (PERCENT_PURE_PARSER)
(handle_pure_parser): New.
Issue a deprecation/update notice for %pure-parser.
* doc/bison.texi (Java Bison Interface): Don't mention %pure-parser.
* tests/actions.at, tests/input.at: Adjust.
|
|
|
|
|
|
|
|
|
|
| |
* data/diagnostics.css: Rename as...
* data/bison-default.css: this.
Add the GPL header.
This is the convention followed by Bruno Haible in gettext.
Adjust dependencies.
* src/complain.c (complain_init_color): Use BISON_STYLE instead of
BISON_DIAGNOSTICS_STYLE.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Build the tarball in one job, check it in many.
Unfortunately no real gain in overall duration.
With help from Clément Démoulins.
* .travis.yml: here.
Remove all the tricks that were used to be able to boostrap on old
distros.
(before_install): Merge into 'script', because before_install applies
to all the jobs, and we don't want to run it for the 'compile' job.
|
|
|
|
| |
* examples/d/local.mk, examples/java/local.mk: here.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In preparation for Bison 3.4, revert to the version before this
commit:
commit 03752516b21091cf3c4beea7e8b9bcad462d50ed
Author: John Darrington <john@darrington.wattle.id.au>
Date: Sun May 12 00:42:36 2019 +0200
version-etc: Ease translation.
* lib/version-etc.c (version_etc_arn, emit_bug_reporting_address):
Move URLs and formatting newlines out of translatable string.
because it changes the messages for --version, translated in
gnulib.po. These changes are not yet available on the translation
project, so we would have a regression in the set of translated
strings.
|
|
|
|
|
|
|
|
|
|
|
|
| |
It works only in implicit rules (or with GNU Make, but not with
Solaris Make).
Reported by Bruno Haible.
http://lists.gnu.org/archive/html/bug-bison/2019-05/msg00009.html
Diagnosed thanks to Kiyoshi Kanazawa.
* examples/c/reccalc/local.mk, examples/d/local.mk,
* examples/java/local.mk: Don't use $< in non implicit rules.
|
|
|
|
|
|
| |
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
|
|
|
|
| |
* NEWS: Record release date.
|
| |
|
| |
|
|
|
|
|
| |
* src/getargs.c: here.
It's documented in getargs.h anyway.
|
|
|
|
|
|
|
|
|
| |
Thanks to Gavin Smith and Patrice Dumas.
http://lists.gnu.org/archive/html/help-texinfo/2019-04/msg00015.html
* doc/bison.texi (@colorWarning, @colorError, @colorNotice)
(@colorOff): Define for TeX and HTML.
(@dwarning, @derror, @dnotice): Use them.
|
|
|
|
|
|
|
|
| |
This update contains Bruno Haible's fix for the location tracking
issue reported by Kiyoshi Kanazawa.
https://lists.gnu.org/archive/html/bug-gnulib/2019-05/msg00020.html
https://lists.gnu.org/archive/html/bug-bison/2019-04/msg00020.html
|
|
|
|
|
|
|
|
|
| |
It is more consistent with --color=html, --color=test, etc.
* src/getargs.h, src/getargs.c (style_debug): Rename as...
(color_debug): this.
(getargs_colors): Rename --style=debug as --color=debug.
Adjust dependencies.
|
|
|
|
|
|
|
|
|
|
|
| |
Based on a message from Bruno Haible.
https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commitdiff;h=fe18e92743b7226791a5f28d7c786941a1bf8cc9
This does not generate proper HTML: special characters are not escaped
for instance. This is a hidden feature meant for Bison developers,
not end users.
* src/complain.c (complain_init_color): Support --color=html.
|
|
|
|
| |
* tests/c++.at, tests/glr-regression.at: here.
|
|
|
|
|
|
|
|
|
|
| |
An experimental commit introduced a fix-it hint that changes comments
such as "/* empty */" into %empty. But in some case, because
diagnostics are not necessarily emitted in order, the fixits also come
in disorder, which must never happen, as the fixes are installed in
one pass.
* src/fixits.c (fixits_register): Insert them in order.
|
|
|
|
| |
* src/complain.c (deprecated_directive): Here.
|
|
|
|
|
|
|
|
| |
Currently we remove the rhs to install %empty instead.
* src/reader.c (grammar_rule_check_and_complete): Insert the missing
%empty in front of the rhs, not in replacement thereof.
* tests/actions.at (Add missing %empty): Check that.
|
|
|
|
|
| |
* tests/actions.at, tests/input.at: Don't repeat the prologue, skip it.
* tests/diagnostics.at, tests/local.at: Comment changes.
|
|
|
|
|
|
|
|
|
|
|
| |
Some members are called foo_location, others are foo_loc. Stick to
the latter.
* src/gram.h, src/location.h, src/location.c, src/output.c,
* src/parse-gram.y, src/reader.h, src/reader.c, src/reduce.c,
* src/scan-gram.l, src/symlist.h, src/symlist.c, src/symtab.h,
* src/symtab.c:
Use _loc consistently, not _location.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
symbol_list features a 'location' and a 'sym_loc' member. The former
is expected to be set only for symbol_lists that denote a symbol (not
a type name), and the latter should only denote the location of the
symbol/type name. Yet both are set, and the name "location" is too
unprecise.
* src/symlist.h, src/symlist.c (symbol_list::location): Rename as
rhs_loc for clarity. Move it to the "section" of data valid only
for rules.
* src/reader.c, src/scan-code.l: Adjust.
|
| |
|
|
|
|
|
|
|
|
| |
Reported by Kiyoshi Kanazawa.
http://lists.gnu.org/archive/html/bug-bison/2019-04/msg00018.html
* tests/atlocal.in (BISON_DC_WORKS): New.
* tests/local.at (AT_COMPILE_D): Use it.
|
|
|
|
| |
* doc/bison.texi, doc/local.mk: here.
|
|
|
|
|
|
| |
* doc/bison.texi (dwarning, derror, dnotice): New.
Use them in the diagnostics.
* doc/local.mk (AM_MAKEINFOFLAGS): Pass customization variables.
|
|
|
|
|
|
| |
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
|
|
|
|
| |
* NEWS: Record release date.
|
|
|
|
| |
* examples: here.
|
|
|
|
|
|
|
|
|
|
| |
Revert "build: also generate the graph
reports" (4ec413da32760defe1bf382c048d1d2f67e0b58a). The problem is
Automake's ylwrap which does not rename y.dot with the appropriate
name. We should completely stop using Automake's support for Yacc,
which is not something I will do right now. So step back.
* Makefile.am (AM_YFLAGS_WITH_LINES): Don't pass --graph.
|
|
|
|
| |
* Makefile.am (gen-synclines): New.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Because some of our examples use
%C%_reccalc_SOURCES = %D%/parse.y
Automake ships parse.y and parse.c, and possibly parse.h when it
"understands" that there is one. This is not what we want: ship only
parser.y. Yet we still want to use Automake to compile the sources
from parser.y. The easiest seems to use
nodist_%C%_reccalc_SOURCES = %D%/parse.y
together with
dist_reccalc_DATA = %D%/parse.y %D%/scan.l %D%/Makefile %D%/README.md
which guarantees that parse.y is indeed shipped.
* examples/c/calc/local.mk, examples/c/lexcalc/local.mk,
* examples/c/reccalc/local.mk: Always use nodist_*SOURCES for parsers,
let the dist_*_DATA rules do their job.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* cfg.mk: Disable checks where needed (e.g., we do want to check the
behavior with tabs).
(sc_at_parser_check): Remove. Unfortunately since
a11c144609255bc6e42c2aff83548e91cbd05425 we no longer use the './'
prefix to run programs in the current directory. That was so that we
could run Java programs like the other, although they are no run with
the `./` prefix (see 967a59d2c08a33f24708450561e2f8010b604523).
As a consequence this sc check no longer makes sense.
However, since now AT_PARSER_CHECK passes the `./` prefix itself, this
sc-check was superfluous.
* examples/c/reccalc/scan.l: Use memcpy, not strncpy.
* src/ielr.c, src/reader.c: Obfuscate "lr(0)" so that the sc-check for
"space before paren" does not fire.
* tests/diagnostics.at: Avoid space-tab, use tab-tab.
|
|
|
|
| |
* NEWS, doc/bison.texi: here.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes reading the trace slightly easier. It would be very nice
to highlight the "big steps", especially reductions. But this is a
private experiment: do not use it.
* data/diagnostics.css (value): New.
* src/parse-gram.y: Use no delimiters and no c quotation for strings
to facilitate debugging.
(tron, troff, TRACE): New.
Not very elegant, but until there is support for printf-formats in
libtextstyle, it shall be enough.
|
|
|
|
|
|
|
|
|
|
|
| |
Currently we pass only the columns based on the screen-width, which is
important for the carets. But we don't pass the bytes-based columns,
which is important for the colors. Pass both.
* src/muscle-tab.c (muscle_boundary_grow): Also pass the byte-based column.
* src/location.c (location_caret): Clarify.
(boundary_set_from_string): Adjust to the new format.
* tests/diagnostics.at (Tabulations and multibyte characters from M4): New.
|
|
|
|
|
|
|
|
|
|
| |
Locations issued from M4 need the byte-based column for the
diagnostics to work properly. Currently they were unassigned, which
typically resulted in partially non-colored diagnostics.
* src/location.c (boundary_set_from_string): Fix the parsed location.
* src/muscle-tab.c (muscle_percent_define_default): Set the byte values.
* tests/diagnostics.at (Locations from M4): New.
|
|
|
|
|
|
|
|
| |
This is meant for developers, not end users, that's why I attached it
to --trace.
* src/getargs.h, src/getargs.c (trace_locations): New.
* src/location.c (location_print): Use it.
|
|
|
|
| |
* src/complain.c: here.
|
|
|
|
|
|
|
|
|
|
|
| |
We were using the gnulib's gettext module with tricks in
bootstrap.conf to avoid useless files. Instead, use gnulib's
gettext-h module.
* .travis.yml: Force Gettext 0.18.3 on Trusty.
* bootstrap.conf: Use gettext-h instead of gettext.
(excluded_files): Remove.
* configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.19.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reported by Balázs Scheidler.
* data/skeletons/c.m4 (b4_location_type_define): Use api.location.type
if defined.
* doc/bison.texi: Document it.
* tests/local.at (AT_C_IF, AT_LANG_CASE): New.
Support Span in C.
* tests/calc.at (Span): Convert it to be usable in C and C++.
Check api.location.type with yacc.c and glr.c.
|
|
|
|
|
|
| |
* src/reader.c (grammar_rule_check_and_complete): Generate fixits for
adding/removing %empty.
* tests/actions.at, tests/diagnostics.at, tests/existing.at: Adjust.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The "identifier and colon" of a rule is implemented as a single token,
but whose location is only that of the identifier (so that messages
about the lhs of a rule are accurate). When reducing empty rules, the
default location is the single point location on the end of the
previous symbol. As a consequence, when Bison parses a grammar, the
location of the right-hand side of an empty rule is based on the
lhs, *independently of the position of the colon*. And the colon can
be way farther, separated by comments, white spaces, including empty
lines.
As a result, some messages look really bad. For instance:
$ cat foo.y
%%
foo : /* empty */
bar
: /* empty */
gives
$ bison -Wall foo.y
foo.y:2.4: warning: empty rule without %empty [-Wempty-rule]
2 | foo : /* empty */
| ^
foo.y:3.4: warning: empty rule without %empty [-Wempty-rule]
3 | bar
| ^
The carets are not at the right column, not even the right line.
This commit passes the colon "again" after the "id colon" token, which
gives more accurate locations for these messages:
$ bison -Wall foo.y
foo.y:2.10: warning: empty rule without %empty [-Wempty-rule]
2 | foo : /* empty */
| ^
foo.y:4.2: warning: empty rule without %empty [-Wempty-rule]
4 | : /* empty */
| ^
* src/scan-gram.l (SC_AFTER_IDENTIFIER): Rollback the colon, so that
we scan it again afterwards.
(INITIAL): Scan colons.
* src/parse-gram.y (COLON): New.
(rules): Parse the colon after the rule's id_colon (and possible
named reference).
* tests/actions.at, tests/conflicts.at, tests/diagnostics.at,
* tests/existing.at: Adjust.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Because the fix-its were ready the character-based columns, but were
applied on byte-based columns, the result with multibyte characters or
tabs could be "interesting". For instance
%fixed-output_files
%fixed_output-files
%fixed-output-files
%define api.prefix {foo}
%no-default-prec
would give
%fixed-%fixed-output-files %fixed_output-files
%fixed-orefix= "foo"
o_default-prec
* src/fixits.c (fixit_print, fixits_run): Work on byte-base columns.
* tests/input.at: Check it.
|
|
|
|
| |
* src/complain.h, src/complain.c (warning_is_enabled): New.
|
|
|
|
|
|
|
|
|
|
| |
See
https://www.gnu.org/software/gnulib/manual/html_node/Localization.html.
* bootstrap.conf: Create gnulib-po.
* Makefile.am, configure.ac: Use it.
* po/POTFILES.in: Remove files now in gnulib.
* src/main.c: Open the bison-gnulib domain.
|
|
|
|
|
|
|
|
|
| |
Based on a report by Todd Freed.
http://lists.gnu.org/archive/html/bug-bison/2019-04/msg00000.html
See also https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90034
* src/location.c (caret_info): Also track the file name.
(location_caret): Don't quote special files.
|