| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since Bison 2.7, output was indented four spaces for explanatory
statements. For example:
input.y:2.7-13: error: %type redeclaration for exp
input.y:1.7-11: previous declaration
Since the introduction of caret-diagnostics, it became less clear.
Remove the indentation and display submessages as in GCC:
input.y:2.7-13: error: %type redeclaration for exp
2 | %type <float> exp
| ^~~~~~~
input.y:1.7-11: note: previous declaration
1 | %type <int> exp
| ^~~~~
* src/complain.h (SUB_INDENT): Remove.
(warnings): Add "note" to the enum.
* src/complain.h, src/complain.c (complain_indent): Replace by...
(subcomplain): this.
Adjust all dependencies.
* tests/actions.at, tests/diagnostics.at, tests/glr-regression.at,
* tests/input.at, tests/named-refs.at, tests/regression.at:
Adjust expectations.
|
|
|
|
| |
Run 'make update-copyright'.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Let's make a difference between places where Perl is required for the
test (AT_PERL_REQUIRE), and the places where it's used to run the
test, but it's not not to run the test (AT_PERL_CHECK).
* tests/local.at (AT_REQUIRE): New.
(AT_PERL_CHECK, AT_PERL_REQUIRE): New.
Use them where appropriate.
* tests/local.mk ($(TESTSUITE)): Beware not to start the line with
'-pi' if Perl is empty, as Make understands this as "it's ok to fail".
Which it is not.
|
|
|
|
|
|
|
|
|
|
|
| |
My previous tests (with ./configure PERL=false) have been fooled by
configure, that managed to find perl anyway. This time, I ran this on
a Fedora in Docker, without Perl.
* tests/calc.at, tests/diagnostics.at, tests/headers.at,
* tests/input.at, tests/local.at, tests/named-refs.at,
* tests/output.at, tests/regression.at, tests/skeletons.at,
* tests/synclines.at, tests/torture.at: Don't require Perl.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, when we quote the source file, we indent it with one space,
and preserve tabulations, so there is a discrepancy and the visual
rendering is bad. One way out is to indent with a tab instead of a
space, but then this space can be used for more information. This is
what GCC9 does. Let's play copy cats.
See
https://lists.gnu.org/archive/html/bison-patches/2019-04/msg00025.html
https://developers.redhat.com/blog/2019/03/08/usability-improvements-in-gcc-9/
https://gcc.gnu.org/onlinedocs/gccint/Guidelines-for-Diagnostics.html#Guidelines-for-Diagnostics
* src/location.c (location_caret): Prefix quoted lines with the line
number and a pipe, fitting 8 columns.
* tests/actions.at, tests/c++.at, tests/conflicts.at,
* tests/diagnostics.at, tests/input.at, tests/java.at,
* tests/named-refs.at, tests/reduce.at, tests/regression.at,
* tests/sets.at: Adjust expectations.
Partly by "./build-aux/update-test tests/testsuite.dir/*/testsuite.log"
repeatedly, and partly by hand.
|
|
|
|
|
|
|
|
|
| |
Currently the caller must specify the ./ prefix to its command. Let's
avoid that: it will be nicer to read, make it easier to have a version
that works for Java and C/C++.
* tests/local.at (AT_PARSER_CHECK): Prefix the command with ./.
Adjust callers.
|
|
|
|
|
|
|
|
|
| |
* tests/java.at: Do that.
* tests/conflicts.at: Simplify.
* tests/actions.at, tests/c++.at, tests/input.at, tests/local.at,
* tests/named-refs.at:
Use AT_BISON_OPTION_PUSHDEFS/AT_BISON_OPTION_POPDEFS.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
That's what both GCC and Clang do, and it is indeed much nicer to
read. From:
foo.y:1.1-14: warning: deprecated directive, use '%define parse.error verbose' [-Wdeprecated]
%error-verbose
^^^^^^^^^^^^^^
foo.y:4.1-20: warning: deprecated directive, use '%define api.prefix {foo}' [-Wdeprecated]
%name-prefix = "foo"
^^^^^^^^^^^^^^^^^^^^
to:
foo.y:1.1-14: warning: deprecated directive, use '%define parse.error verbose' [-Wdeprecated]
%error-verbose
^~~~~~~~~~~~~~
foo.y:4.1-20: warning: deprecated directive, use '%define api.prefix {foo}' [-Wdeprecated]
%name-prefix = "foo"
^~~~~~~~~~~~~~~~~~~~
* src/location.c (location_caret): Use ^~~~.
Adjust tests expectations.
|
| |
|
|
|
|
| |
* tests/named-refs.at: here.
|
|
|
|
| |
Run `make update-copyright`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are warnings (-Wextra) in generated C++ code:
ltlparse.cc: In member function 'ltlyy::parser::symbol_number_type
ltlyy::parser::by_state::type_get() const':
ltlparse.cc:452:33: warning: enumeral and non-enumeral type in
conditional expression
return state == empty_state ? empty_symbol : yystos_[state];
Reported by Alexandre Duret-Lutz.
It turns out that -Wall and -Wextra were disabled because of a stupid
typo.
* configure.ac: Fix the stupid typo.
* data/lalr1.cc, src/AnnotationList.c, src/InadequacyList.c,
* src/ielr.c, src/print.c, src/scan-code.l, src/symlist.c,
* src/symlist.h, src/symtab.c, src/tables.c, tests/actions.at,
* tests/calc.at, tests/cxx-type.at, tests/glr-regression.at,
* tests/named-refs.at, tests/torture.at:
Fix warnings, mostly issues about variables used only with assertions,
which are disabled with -DNDEBUG.
|
|
|
|
|
|
| |
Which also requires:
* gnulib: Update.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* AUTHORS, ChangeLog-2012, Makefile.am, NEWS, PACKAGING, README,
* README-alpha, README-hacking, THANKS, TODO, bootstrap.conf,
* build-aux/darwin11.4.0.valgrind, build-aux/local.mk,
* build-aux/update-b4-copyright,
* build-aux/update-package-copyright-year, cfg.mk, configure.ac,
* data/README, data/bison.m4, data/c++-skel.m4, data/c++.m4,
* data/c-like.m4, data/c-skel.m4, data/c.m4, data/glr.c, data/glr.cc,
* data/java-skel.m4, data/java.m4, data/lalr1.cc, data/lalr1.java,
* data/local.mk, data/location.cc, data/stack.hh, data/variant.hh,
* data/xslt/bison.xsl, data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl,
* data/xslt/xml2xhtml.xsl, data/yacc.c, djgpp/Makefile.maint,
* djgpp/README.in, djgpp/config.bat, djgpp/config.sed,
* djgpp/config.site, djgpp/config_h.sed, djgpp/djunpack.bat,
* djgpp/local.mk, djgpp/subpipe.c, djgpp/subpipe.h,
* djgpp/testsuite.sed, doc/bison.texi, doc/local.mk, doc/refcard.tex,
* etc/README, etc/bench.pl.in, etc/local.mk,
* examples/calc++/calc++.test, examples/calc++/local.mk,
* examples/extexi, examples/local.mk, examples/mfcalc/local.mk,
* examples/mfcalc/mfcalc.test, examples/rpcalc/local.mk,
* examples/rpcalc/rpcalc.test, examples/test, examples/variant.yy,
* lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
* lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
* lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
* lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
* lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
* lib/local.mk, lib/main.c, lib/timevar.c, lib/timevar.def,
* lib/timevar.h, lib/vbitset.c, lib/vbitset.h, lib/yyerror.c,
* m4/bison-i18n.m4, m4/c-working.m4, m4/cxx.m4, m4/flex.m4,
* m4/timevar.m4, src/AnnotationList.c, src/AnnotationList.h,
* src/InadequacyList.c, src/InadequacyList.h, src/LR0.c, src/LR0.h,
* src/Sbitset.c, src/Sbitset.h, src/assoc.c, src/assoc.h,
* src/closure.c, src/closure.h, src/complain.c, src/complain.h,
* src/conflicts.c, src/conflicts.h, src/derives.c, src/derives.h,
* src/files.c, src/files.h, src/flex-scanner.h, src/getargs.c,
* src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c,
* src/graphviz.h, src/ielr.c, src/ielr.h, src/lalr.c, src/lalr.h,
* src/local.mk, src/location.c, src/location.h, src/main.c,
* src/muscle-tab.c, src/muscle-tab.h, src/named-ref.c,
* src/named-ref.h, src/nullable.c, src/nullable.h, src/output.c,
* src/output.h, src/parse-gram.c, src/parse-gram.y, src/print-xml.c,
* src/print-xml.h, src/print.c, src/print.h, src/print_graph.c,
* src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
* src/reduce.h, src/relation.c, src/relation.h, src/scan-code.h,
* src/scan-code.l, src/scan-gram.h, src/scan-gram.l, src/scan-skel.h,
* src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
* src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
* src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
* tests/actions.at, tests/atlocal.in, tests/bison.in, tests/c++.at,
* tests/calc.at, tests/conflicts.at, tests/cxx-type.at,
* tests/existing.at, tests/glr-regression.at, tests/headers.at,
* tests/input.at, tests/java.at, tests/javapush.at, tests/local.at,
* tests/local.mk, tests/named-refs.at, tests/output.at, tests/push.at,
* tests/reduce.at, tests/regression.at, tests/sets.at,
* tests/skeletons.at, tests/synclines.at, tests/testsuite.at,
* tests/torture.at, tests/types.at:
here.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Recent changes (in 2.7) introduced a dependency on both FILE and
fprintf, which are "available" only in %debug mode. This was to
define yy_location_print_, which is used only in %debug mode by the
parser, but massively used by the test suite to output the locations
in yyerror.
Break this dependency: the test suite should define its own routines
to display the locations. Eventually Bison will provide the user with
a means to display locations, but not yet.
* data/c.m4 (b4_yy_location_print_define): Use YYFPRINTF instead of
fprintf directly.
* data/yacc.c (b4_yy_location_print_define): Invoke it only in %debug
mode, so that stdio.h is included (needed for FILE*), and YYFPRINTF
is defined.
* tests/local.at (AT_YYERROR_DECLARE, AT_YYERROR_DEFINE): Declare
and define location_print and LOCATION_PRINT.
* tests/actions.at, tests/existing.at, tests/glr-regression.at,
* tests/input.at, tests/named-refs.at, tests/regression.at: Adjust
to use them.
Fix the expected line numbers (as the prologue's length has changed).
|
|
|
|
| |
* tests/named-refs.at: Use AT_FULL_COMPILE where applicable.
|
|
|
|
|
| |
Suggested by Stefano Lattarini.
Run "make update-copyright".
|
|
|
|
| |
* tests/input.at, tests/named-refs.at: Here.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* origin/maint:
misc: pacify the Tiny C Compiler
cpp: make the check of Flex version portable
misc: require getline
c++: support wide strings for file names
doc: document carets
tests: enhance existing tests with carets
errors: show carets
getargs: add support for --flags/-f
Conflicts:
doc/bison.texi
m4/.gitignore
src/complain.c
src/flex-scanner.h
src/getargs.c
src/getargs.h
src/gram.c
src/main.c
tests/headers.at
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* tests/actions.at: Unset value.
* tests/conflicts.at: Rule useless due to conflicts.
* tests/input.at: Missing terminator, unexpected end of file, command line
redefinition of variable.
* tests/named-refs.at: Many errors.
* tests/reduce.at: Useless nonterminals and rules.
* tests/regression.at: Large token.
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* origin/maint:
yacc.c: always initialize yylloc
scanner: issue a single error for groups of invalid characters
tests: formatting changes
doc: one of the fixes for an ambiguous grammar was ambiguous too
doc: fix the dangling else with precedence directives
doc: prefer "token" to TOKEN
doc: formatting changes
scanner: use explicit "ignore" statements
Conflicts:
src/scan-gram.l
|
| |
| |
| |
| |
| | |
* src/scan-gram.l: Scan groups of invalid characters together.
* tests/input.at, tests/named-refs.at: Adjust.
|
| |
| |
| |
| | |
* tests/named-refs.at: Here.
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* origin/maint: (24 commits)
tests: calc: modernize the use of locations
tests: remove useless location initializations
lalr1.cc: always initialize yylval.
tests: check that C and C++ objects can be linked together.
yacc.c: also disable -Wuninitialized.
glr.cc, yacc.c: initialize yylloc properly
yacc.c, glr.c: a better YY_LOCATION_PRINT
yacc.c: simplify initialization
doc: formatting changes
c++: fix position operator signatures
tests: remove useless location initialization.
tests: fix locations in C
tests: handle %parse-param in the generated yyerror
tests: simplifications
grammars: fix display of nul character in error message
tests: sort
tests: cosmetic changes
comment changes
autoconf: update
gnulib: update
...
Conflicts:
data/lalr1.cc
gnulib
src/scan-gram.l
submodules/autoconf
tests/calc.at
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* origin/branch-2.6: (24 commits)
tests: calc: modernize the use of locations
tests: remove useless location initializations
lalr1.cc: always initialize yylval.
tests: check that C and C++ objects can be linked together.
yacc.c: also disable -Wuninitialized.
glr.cc, yacc.c: initialize yylloc properly
yacc.c, glr.c: a better YY_LOCATION_PRINT
yacc.c: simplify initialization
doc: formatting changes
c++: fix position operator signatures
tests: remove useless location initialization.
tests: fix locations in C
tests: handle %parse-param in the generated yyerror
tests: simplifications
grammars: fix display of nul character in error message
tests: sort
tests: cosmetic changes
comment changes
autoconf: update
gnulib: update
...
Conflicts:
NEWS
gnulib
tests/named-refs.at
tests/regression.at
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Reported by Marc Mendiola.
http://lists.gnu.org/archive/html/help-bison/2012-10/msg00017.html
* gnulib: Update to get quote_mem.
* src/scan-gram.l: Use it.
* tests/input.at (Invalid inputs): Additional checks.
* tests/named-refs.at: Likewise.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Rectify a bug that introduced suffixes out of place.
* src/complainc.c (complains): Handle all three special warning bits.
* src/scan-code.l (show_sub_message): Remove useless argument.
* tests/named-refs.at: Adjust.
Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* maint:
warnings: introduce -Wdeprecated in the usage info
errors: prefix the output with "error: "
errors: indent "invalid value for %define" context
errors: indent "%define var" redefinition context
errors: indent "symbol redeclaration" context
errors: indent "result type clash" error context
Conflicts:
src/complain.c
src/muscle-tab.c
src/reader.c
src/symtab.c
tests/conflicts.at
tests/input.at
tests/named-refs.at
tests/output.at
tests/skeletons.at
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This improves readability. This is also what gcc does.
* NEWS: Document this change.
* src/complain.c (complain_at): Prefix all errors with "error: ".
(complain_at_indent, warn_at_indent): Do not prefix the context
information of errors, which are basically just indented errors.
* tests/conflicts.at, tests/glr-regression.at, tests/input.at,
tests/named-refs.at, tests/output.at, tests/push.at,
tests/regression.at, tests/skeletons.at: Apply this change.
Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* src/complain.c (error_message): Call 'warnings_print_categories'.
* src/gram.c (grammar_rules_useless_report): Display itself warning
category.
* tests/actions.at, tests/conflicts.at, tests/existing.at,
tests/input.at, tests/named-refs.at, tests/output.at, tests/reduce.at,
tests/regression.at, tests/skeletons.at: Adjust.
* NEWS: Document this.
Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* origin/maint:
tests: do not output m4 set up.
tests: use the generic yyerror function.
tests: use assert instead of plain abort.
tests: improve the generic yylex implementation.
tests: generalize the compilation macros.
tests: fix confusion between api.prefix and name-prefix.
maint: gitignores.
yacc: work around the ylwrap limitation.
Conflicts:
NEWS
tests/local.at
|
| |
| |
| |
| |
| |
| |
| |
| | |
* tests/actions.at, tests/calc.at, tests/conflicts.at,
* tests/cxx-type.at, tests/glr-regression.at, tests/input.at,
* tests/named-refs.at, tests/regression.at, tests/torture.at,
* tests/local.at:
Prefer assert to abort.
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* origin/maint:
maint: formatting changes.
tests: support api.prefix.
tests: pacify font-lock-mode.
tests: remove test covered elsewhere.
tests: factor the declaration/definition of yyerror and yylex.
regen.
tests: portability issues.
tests: call the parser from another compilation unit.
glr.c, yacc.c: declare yydebug in the header.
skeletons: use header guards.
tests: improve AT_FULL_COMPILE.
tests: reorder.
tests: strengthen the test on generated headers inclusion
yacc.c: instead of duplicating y.tab.h inside y.tac.c, include it.
yacc.c: factor.
Conflicts:
NEWS
data/glr.c
data/yacc.c
src/parse-gram.c
src/parse-gram.h
tests/conflicts.at
tests/regression.at
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* tests/local.at (AT_YYERROR_DECLARE, AT_YYERROR_DECLARE_EXTERN)
(AT_YYERROR_DEFINE, AT_YYLEX_DECLARE, AT_YYLEX_DECLARE_EXTERN)
(AT_YYLEX_DEFINE): New.
Must be used inside AT_BISON_OPTION_PUSHDEFS/POPDEFS pair.
* tests/actions.at, tests/conflicts.at, tests/glr-regression.at,
* tests/headers.at, tests/input.at, tests/named-refs.at,
* tests/regression.at, tests/skeletons.at, tests/synclines.at,
* tests/torture.at: Use them.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Exit status 63 is documented for version-mismatch.
* bootstrap.conf (gnulib_modules): Remove sysexits.
* src/system.h (EX_MISMATCH): Define.
* src/parse-gram.y (version_check): Use it instead of EX_CONFIG.
Missing includes.
* tests/calc.at, tests/named-refs.at: Include assert.h.
(cherry picked from commit 459a57a90ff6fc8209498b7d5bc6e33d5e633f23)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* cfg.mk (local-checks-to-skip): No longer skip it.
* bootstrap.conf (gnulib_modules): Add sysexits.
* doc/bison.texinfo, etc/bench.pl.in, src/parse-gram.y,
* src/system.h, tests/calc.at, tests/named-refs.at: Use assert
where appropriate instead of "if (...) exit".
Use symbolic exit status elsewhere.
Conflicts:
doc/bison.texinfo
src/parse-gram.y
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Updating to gnulib pulled in new quote and quotarg modules,
by which quoting is now done like 'this' rather than `this'.
That change induces many "make check" test failures. This change
adapts code and tests so that "make check" passes once again.
* src/scan-code.l: Quote like 'this', not like `this'.
* src/scan-gram.l: Likewise.
* src/symtab.c: Likewise.
* tests/actions.at: Adjust tests to match.
* tests/input.at: Likewise.
* tests/named-refs.at: Likewise.
* tests/output.at: Likewise.
* tests/regression.at: Likewise.
* lib/.gitignore: Regenerate.
* m4/.gitignore: Likewise.
(cherry picked from commit ae93e4e4b8e78396a7707de3dcdd47aca7a46dec)
Conflicts:
src/scan-code.l
src/scan-gram.l
src/symtab.c
tests/output.at
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In `rhs[name]: "a" | "b"', do not free "name" twice.
Reported by Tys Lefering.
<http://lists.gnu.org/archive/html/bug-bison/2010-06/msg00002.html>
* src/named-ref.h, src/named-ref.c (named_ref_copy): New.
* src/parse-gram.y (current_lhs): Rename as...
(current_lhs_symbol): this.
(current_lhs): New function. Use it to free the current lhs
named reference.
* src/reader.c: Bind lhs to a copy of the current named reference.
* src/symlist.c: Rely on free (0) being valid.
* tests/named-refs.at: Test this.
|
| |
| |
| |
| |
| | |
* tests/named-refs.at (Redundant words in LHS brackets)
(Unresolved references): here.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This cleans up our previous fixes for a bug whereby Bison
discarded `.field' in `$-1.field'. The previous fixes were less
restrictive about where a dash could appear in an identifier, but
the restrictions were hard to explain. That bug was reported and
this final fix was originally suggested by Paul Hilfinger. This
also fixes a remaining bug reported by Paul Eggert whereby Bison
parses `%token ID -123' as `%token ID - 123' and handles `-' as an
identifier. Now, `-' cannot be an identifier. Discussed in
threads beginning at
<http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00000.html>,
<http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00004.html>.
* NEWS (2.5): Update entry describing the dash extension to
grammar symbol names. Also, move that entry before the named
references entry because the latter mentions the former.
* doc/bison.texinfo (Symbol): Update documentation for symbol
names. As suggested by Paul Eggert, mention the effect of periods
and dashes on named references.
(Decl Summary): Update documentation for unquoted %define values,
which, as a side effect, can no longer start with dashes either.
* src/scan-code.l (id): Implement.
* src/scan-gram.l (id): Implement.
* tests/actions.at (Exotic Dollars): Extend test group to exercise
bug reported by Paul Hilfinger.
* tests/input.at (Symbols): Update test group, and extend to
exercise bug reported by Paul Eggert.
* tests/named-refs.at (Stray symbols in brackets): Update test
group.
($ or @ followed by . or -): Likewise.
* tests/regression.at (Invalid inputs): Likewise.
(cherry picked from commit 82f3355eaf8d5988391021262dc9acfa6485c098)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, for this special case of an invalid reference, the
usual "symbol not found in production:" was printed. However,
because the symbol name was parsed as the empty string, that
message was followed immediately by a newline instead of a symbol
name. In reality, this is a syntax error, so the reference is
invalid regardless of the symbols actually appearing in the
production. Discussed at
<http://lists.gnu.org/archive/html/bison-patches/2011-01/msg00012.html>.
* src/scan-code.l (parse_ref): Report the above case as a syntax
error. Other than that, continue to handle this case like any
other invalid reference that Bison manages to parse because
"possibly meant" messages can still be helpful to the user.
* tests/named-refs.at ($ or @ followed by . or -): New test group.
(cherry picked from commit 5c9efc755e61e47011a71b022ad232e28af67bd0)
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
See http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices
* HACKING, Makefile.am, NEWS, PACKAGING, README, README-alpha:
* TODO, bootstrap, bootstrap.conf:
* build-aux/update-b4-copyright, cfg.mk, configure.ac:
* data/README, data/bison.m4, data/c++-skel.m4, data/c++.m4:
* data/c-skel.m4, data/c.m4, data/glr.c, data/glr.cc:
* data/java-skel.m4, data/java.m4, data/lalr1.cc:
* data/lalr1.java, data/location.cc:
* data/xslt/bison.xsl:
* data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl:
* data/xslt/xml2xhtml.xsl, data/yacc.c, djgpp/Makefile.maint:
* djgpp/README.in, djgpp/config.bat, djgpp/config.sed:
* djgpp/config.site, djgpp/config_h.sed, djgpp/djunpack.bat:
* djgpp/subpipe.c, djgpp/subpipe.h:
* djgpp/testsuite.sed, doc/bison.texinfo:
* doc/refcard.tex, etc/README, etc/bench.pl.in:
* examples/calc++/Makefile.am, examples/extexi:
* lib/abitset.c, lib/abitset.h:
* lib/bbitset.h, lib/bitset.c, lib/bitset.h:
* lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
* lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
* lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
* lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
* lib/libiberty.h, lib/main.c, lib/timevar.c:
* lib/timevar.def, lib/timevar.h, lib/vbitset.c:
* lib/vbitset.h, lib/yyerror.c, m4/bison-i18n.m4:
* m4/c-working.m4, m4/cxx.m4, m4/subpipe.m4, m4/timevar.m4:
* src/AnnotationList.c, src/AnnotationList.h:
* src/InadequacyList.c, src/InadequacyList.h, src/LR0.c:
* src/LR0.h, src/Sbitset.c, src/Sbitset.h, src/assoc.c:
* src/assoc.h, src/closure.c, src/closure.h, src/complain.c:
* src/complain.h, src/conflicts.c, src/conflicts.h:
* src/derives.c, src/derives.h, src/files.c, src/files.h:
* src/flex-scanner.h, src/getargs.c, src/getargs.h:
* src/gram.c, src/gram.h, src/graphviz.c, src/ielr.c:
* src/ielr.h, src/lalr.c, src/lalr.h:
* src/location.c, src/location.h, src/main.c:
* src/muscle-tab.c, src/muscle-tab.h, src/named-ref.c:
* src/named-ref.h, src/nullable.c, src/nullable.h:
* src/output.c, src/output.h, src/parse-gram.y:
* src/print-xml.c, src/print-xml.h, src/print.c, src/print.h:
* src/print_graph.c, src/print_graph.h, src/reader.c:
* src/reader.h, src/reduce.c, src/reduce.h, src/relation.c:
* src/relation.h, src/scan-code.h, src/scan-code.l:
* src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
* src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
* src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
* src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
* tests/actions.at, tests/atlocal.in, tests/c++.at:
* tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
* tests/existing.at, tests/glr-regression.at:
* tests/headers.at, tests/input.at, tests/java.at:
* tests/local.at, tests/named-refs.at:
* tests/output.at, tests/push.at, tests/reduce.at:
* tests/regression.at, tests/sets.at, tests/skeletons.at:
* tests/synclines.at, tests/testsuite.at, tests/torture.at:
* data/Makefile.am, data/location.cc, doc/Makefile.am, src/Makefile.am:
* tests/Makefile.am, lib/Makefile.am, examples/Makefile.am:
* etc/Makefile.am:
Don't use date ranges in copyright notices.
Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
2008, 2009, 2010 Free Software Foundation, Inc.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* src/location.h: (location_print): Add return value.
* src/location.c: (location_print): Return number of printed
characters.
* src/complain.h: Two new functions (complain_at_indent,
warn_at_indent).
* src/complain.cpp: Implement the alignment mechanism. Add new
static variable (indent_ptr). Use and update it (error_message,
complain_at_indent, warn_at_indent).
* src/scan-code.l: Fix strings for translations. Use new *_indent
functions (parse_ref, show_sub_messages).
* tests/named-ref.at: Adjust testcases.
* NEWS (2.5): Add an announcement about named references.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add "symbol not found in production" error message when
an "invalid reference" is detected in named references
resolution.
* src/scan-code.l: Update "invalid reference" case.
* tests/named-ref.at: Adjust test-cases.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
in a symbolic reference resolution. Remove .expr and -expr from
the shown reference when the reference is unresolved.
* src/scan-code.l: Change the error message, adjust location columns,
rename variable "exact_mode" to "explicit_bracketing".
* tests/named-ref.at: Adjust existing tests and add a new one.
|
| |
| |
| |
| |
| |
| | |
* src/scan-code.l: New function 'show_sub_messages', more
factoring.
* tests/named-ref.at: Adjust tests.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* src/named-ref.h: Add comments.
* src/parse-gram.y: Readability and style changes.
* src/reader.c: Factoring: assign_named_ref function.
* src/scan-code.l: Factoring and style changes. Rename
parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
Use "unsigned" type for variant index. Improve readablity.
* src/scan-gram.l: Change error messages and add comments.
* src/symlist.h: symbol_list_null: New function decl.
* src/symlist.c: symbol_list_null: Implement here.
* tests/named-refs.at: Adjust for new error messages.
|