summaryrefslogtreecommitdiff
path: root/tests/existing.at
Commit message (Collapse)AuthorAgeFilesLines
* package: bump copyrights to 2022Paul Eggert2022-01-151-1/+1
| | | | Run "make update-copyright".
* Update URLs to prefer https: to http:Paul Eggert2021-01-291-2/+2
| | | | Also, fix a few http: URLs that were no longer working.
* package: bump copyrights to 2021Akim Demaille2021-01-161-1/+1
| | | | Run 'make update-copyright'.
* cex: make "rerun with '-Wcex'" a note instead of a warningAkim Demaille2020-07-211-2/+2
| | | | | | | | | | | | | | | | Currently the suggestion to rerun is a -Wother warning: warning: 2 shift/reduce conflicts [-Wconflicts-sr] warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother] Instead, let's attach it as a subnote of the diagnostic (in the current case, -Wconflicts-sr): warning: 2 shift/reduce conflicts [-Wconflicts-sr] note: rerun with option '-Wcounterexamples' to generate conflict counterexamples * src/conflicts.c (conflicts_print): Do that. Adjust the test suite.
* cex: also include in the report on --report=counterexamplesAkim Demaille2020-06-161-1/+1
| | | | | | | | | | And let --report=all include the counterexamples. * src/getargs.h, src/getargs.c (report_cex): New. * src/main.c: Compute counterexamples when -rcex is specified. * src/print.c: Include the counterexamples when -rcex is specified. * tests/conflicts.at, tests/existing.at, tests/local.at: Adjust.
* cex: suggest -Wcounterexamples when there are unexpected conflictsAkim Demaille2020-06-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Suggesting -Wcounterexamples when there are conflicts is probably not what the user wants. If she knows her conflicts and has set %expect/%expect-rr appropriately, we shouldn't warn. The commit also swaps the counterexamples and the report of conflicts, into, IMHO, a more natural order: from Shift/reduce conflict on token B: 1: 3 a: A . 1: 8 y: A . B Example A • B C First derivation s ::=[ a ::=[ A • ] x ::=[ B C ] ] Example A • B C Second derivation s ::=[ y ::=[ A • B ] c ::=[ C ] ] input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr] input.y:4.4: warning: rule useless in parser due to conflicts [-Wother] to input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr] Shift/reduce conflict on token B: 1: 3 a: A . 1: 8 y: A . B Example A • B C First derivation s ::=[ a ::=[ A • ] x ::=[ B C ] ] Example A • B C Second derivation s ::=[ y ::=[ A • B ] c ::=[ C ] ] input.y:4.4: warning: rule useless in parser due to conflicts [-Wother] * src/conflicts.c (rule_conflicts_print): Rename as... (report_rule_expectation_mismatches): this. Move the handling of report_counterexamples to... (conflicts_print): Here. Display this warning when applicable.
* tests: beware of portability issues with diff -uAkim Demaille2020-05-041-7/+2
| | | | | | | | | | | AIX 7.1 supports diff -u, but its output does not match the expected one. Reported by Bruno Haible. https://lists.gnu.org/r/bug-bison/2020-05/msg00049.html * tests/atlocal.in (DIFF_U_WORKS): New. * tests/local.at (AT_DIFF_U_CHECK): New. * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Use AT_DIFF_U_CHECK.
* package: bump copyrights to 2020Akim Demaille2020-01-051-1/+1
| | | | Run 'make update-copyright'.
* updates: insert/remove %emptyAkim Demaille2019-04-241-0/+3
| | | | | | * src/reader.c (grammar_rule_check_and_complete): Generate fixits for adding/removing %empty. * tests/actions.at, tests/diagnostics.at, tests/existing.at: Adjust.
* diagnostics: better rule locationsAkim Demaille2019-04-241-34/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* report: clean up its formatAkim Demaille2019-02-091-81/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The format is inconsistent. For instance most sections are indented (including "Terminals unused in grammar" for instance), but the sections "Terminals, with rules where they appear" and "Nonterminals, with rules where they appear" are not. Let's indent them. Also, these two sections try to wrap the output to avoid lines too long. Yet we don't do that in the rest of the file, for instance when listing the lookaheads of an item. For instance in the case of Bison's parse-gram.output we go from: Terminals, with rules where they appear "end of file" (0) 0 error (256) 28 88 "string" <char*> (258) 9 13 16 17 20 23 24 109 116 [...] Nonterminals, with rules where they appear $accept (58) on left: 0 input (59) on left: 1, on right: 0 prologue_declarations (60) on left: 2 3, on right: 1 3 prologue_declaration (61) on left: 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 29, on right: 3 [...] to Terminals, with rules where they appear "end of file" (0) 0 error (256) 28 88 "string" <char*> (258) 9 13 16 17 20 23 24 109 116 [...] Nonterminals, with rules where they appear $accept (58) on left: 0 input (59) on left: 1 on right: 0 prologue_declarations (60) on left: 2 3 on right: 1 3 prologue_declaration (61) on left: 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 29 on right: 3 [...] * src/print.c (END_TEST): Remove. (print_terminal_symbols): Don't try to wrap the output. (print_nonterminal_symbols): Likewise. Make two different lines for occurrences on the left, and occurrence on the rhs of the rules. Indent by 4 and 8, not 3. * src/reduce.c (reduce_output): Indent by 4, not 3. * tests/conflicts.at, tests/existing.at, tests/reduce.at, * tests/regression.at, tests/report.at: Adjust.
* package: bump copyrights to 2019Akim Demaille2019-01-051-1/+1
|
* tests: migrate from %error-verbose to %define parse.error verboseAkim Demaille2018-11-121-2/+2
| | | | | | | | | * tests/actions.at, tests/c++.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/regression.at, tests/skeletons.at, * tests/torture.at: Here.
* style: use midrule only, not mid-ruleAkim Demaille2018-09-191-1/+1
| | | | | | | | | The code was already using midrule only, never mid_rule. This is simpler to remember, and matches a similar change we made from look-ahead to lookahead. * NEWS, doc/bison.texi, src/reader.c, src/scan-code.h, src/scan-code.l * tests/actions.at, tests/c++.at, tests/existing.at: here.
* Update copyright yearsAkim Demaille2018-05-121-2/+2
| | | | Run `make update-copyright`.
* package: bump to 2015Akim Demaille2015-01-041-1/+1
| | | | | | Which also requires: * gnulib: Update.
* package: bump to 2014Akim Demaille2014-02-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* diagnostics: use appropriate location for useless precedence/associativityAkim Demaille2013-04-221-105/+105
| | | | | | | | | * src/symtab.c (symbol_precedence_set): Use prec_location, not location (which is the first occurrence of the symbol, possibly just %token). Also, as redefinitions are not allowed, keep the first values, not the subsequent ones. * tests/conflicts.at, tests/existing.at, tests/regression.at: Adjust.
* tests: factor duplicate expected warningsAkim Demaille2013-04-221-66/+10
| | | | * tests/existing.at: Instead of "t ? abc : aBc", write "a(t?b:B)c".
* style: no longer use backquotesAkim Demaille2013-02-181-7/+7
| | | | | | | | * tests/actions.at, tests/atlocal.in, tests/c++.at, tests/calc.at, * tests/conflicts.at, tests/existing.at, tests/glr-regression.at, * tests/input.at, tests/java.at, tests/local.at, tests/sets.at, * tests/synclines.at, doc/bison.texi, lib/libiberty.h, lib/timevar.h: Use single quotes.
* -Wempty-rule: diagnose empty rules without %emptyAkim Demaille2013-02-181-5/+74
| | | | | | | | | | * src/complain.h, src/complain.c (warning_empty_rule, Wempty_rule): New warning category. (warnings_args, warnings_types): Adjust. * src/reader.c (grammar_rule_check): Check the empty rules are flagged by %empty. * tests/actions.at (Implicitly empty rule): New. * tests/existing.at: Add expected warnings.
* diagnostics: no longer pretty-print rules in error messages, carets sufficeAkim Demaille2013-02-141-1/+1
| | | | | | | | | * src/gram.c (grammar_rules_useless_report): Let -fcaret handle the pretty-printing of the guilty rules. (rule_print): Inline in its only use. * tests/conflicts.at, tests/existing.at, tests/reduce.at, * tests/regression.at: Adjust. * NEWS: Document.
* warnings: introduce -WprecedenceValentin Tolmer2013-01-301-129/+129
| | | | | | | | | | | | | | | | | | | The new warning category "precedence" flags useless precedence and associativity. -Wprecedence can now be used, it is disabled by default. The warnings about precedence and associativity are grouped into one, and the testsuite was corrected accordingly. * src/complain.h (warnings): Introduce "precedence". * src/complain.c (warnings_print_categories): Adjust. * src/getargs.c (warnings_args, warning_types): Likewise. * src/symtab.h, src/symtab.c (print_associativity_warnings): Remove. * src/symtab.h (register_assoc): Correct arguments. * src/symtab.c (print_precedence_warnings): Print both warnings together. * doc/bison.texi (Bison options): Document the warnings and provide an example. * tests/conflicts.at, tests/existing.at, tests/local.at, * tests/regression.at: Adapt the testsuite for the new category (-Wprecedence instead of -Wother where appropriate).
* grammar: record used associativity and print useless onesValentin Tolmer2013-01-301-4/+133
| | | | | | | | | | | | | | | | | | | Record which symbol associativity is used, and display useless ones. * src/symtab.h, src/symtab.c (register_assoc, print_assoc_warnings): New * src/symtab.c (init_assoc, is_assoc_used): New * src/main.c: Use print_assoc_warnings * src/conflicts.c: Use register_assoc * tests/conflicts.at (Useless associativity warning): New. Due to the new warning, many tests had to be updated. * tests/conflicts.at tests/existing.at tests/regression.at: Add the associativity warning in the expected results. * tests/java.at: Fix the java calculator's grammar to remove a useless associativity. * doc/bison.texi (mfcalc example): Fix associativity to remove warning.
* c: no longer require stdio.h when locations are enabledAkim Demaille2013-01-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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).
* maint: update copyright yearsAkim Demaille2013-01-121-1/+1
| | | | | Suggested by Stefano Lattarini. Run "make update-copyright".
* Merge remote-tracking branch 'origin/maint'Akim Demaille2012-11-131-20/+20
|\ | | | | | | | | | | | | | | | | | | * origin/maint: tests: close files in glr-regression xml: match DOT output and xml2dot.xsl processing xml: factor xslt space template graph: fix a memory leak xml: documentation output: capitalize State
| * output: capitalize StateTheophile Ranquet2012-11-121-20/+20
| | | | | | | | | | | | * src/print.c (print_state): Here. * tests/conflicts.at, tests/existing.at, tests/local.at, tests/reduce.at, tests/regression.at, tests/sets.at: Adjust.
* | Merge branch 'maint'Akim Demaille2012-10-111-1/+4
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * origin/maint: NEWS: warnings with clang warnings: avoid warnings from clang tests: no longer disable -O compiler options yacc.c: initialize yylval in pure-parser mode skeletons: style changes lalr1.cc: document exception safety lalr1.cc: check exception safety of error handling lalr1.cc: check (and fix) %printer exception safety lalr1.cc: check (and fix) %initial-action exception safety lalr1.cc: fix exception safety lalr1.cc: check exception safety. lalr1.cc: indentation fixes. lalr1.cc: don't leave macros define to nothing tests: minor improvements tests: use $PERL instead of perl build: look for Perl in configure. tests: fix sed portability issues tests: diff -u is not portable Conflicts: data/c.m4 data/glr.c data/lalr1.cc data/yacc.c doc/Makefile.am tests/atlocal.in tests/calc.at
| * tests: diff -u is not portableAkim Demaille2012-10-051-1/+4
| | | | | | | | | | | | | | | | Reported by Didier Godefroy <http://lists.gnu.org/archive/html/bug-bison/2012-10/msg00006.html>. * tests/existing.at (AT_LALR1_DIFF_CHECK): Skip if diff -u does not work.
* | warnings: use the regular interface for s/r and r/r conflictsAkim Demaille2012-09-251-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current routines used to display s/r and r/r conflicts are both inconvenient from the programmer point of view (they do not use the warning infrastructure) and for the user (the messages are rather terse, not necessarily pleasant to read, and because they don't use the same routines, they look different). It was due to the belief (dating back to the initial checked-in version of Bison) that, at some point, POSIX Yacc mandated the format for these messages. Today, the Open Group's manual page for Yacc, <http://pubs.opengroup.org/onlinepubs/009695399/utilities/yacc.html>, explicitly states that the format of these messages is unspecified. See commit be7280480c175bed203883f524c7dcd6cf37c13d and <http://lists.gnu.org/archive/html/bison-patches/2002-12/msg00027.html>. For a discussion on the chosen warning format, see http://lists.gnu.org/archive/html/bison-patches/2012-09/msg00039.html In an effort to factor the handling of errors and warnings, use the Bison warning routines to report these messages. * src/conflicts.c (conflicts_print): Rewrite with clearer sections about S/R and then R/R conflicts. (conflict_report): Remove, inlined in its sole caller... (conflicts_output): here. * tests/conflicts.at, tests/existing.at, tests/glr-regression.at, * tests/reduce.at, tests/regression.at: Adjust the expected results. * NEWS: Update.
* | warnings: display warnings categoriesVictor Santet2012-06-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * 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>
* | Merge remote-tracking branch 'origin/maint'Akim Demaille2012-06-051-3/+3
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | * origin/maint: version 2.5.1 NEWS: prepare for 2.5.1. maint: update release procedure maint: fix comment typos maint: post-release administrivia Conflicts: NEWS
| * maint: fix comment typosJim Meyering2012-06-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Using http://github.com/lyda/misspell-check, massage its output into sed commands to perform the suggested changes. Initially, I filtered out the THRU->Through changes, because that failed to retain capitalization in the grammar token. Instead, do this manually, beforehand: sed -i s/THRU/THROUGH/ tests/existing.at git ls-files|misspellings -f -|perl -nl \ -e '/^(.*?)\[(\d+)\]: (\w+) -> "(.*?)"$/ or next;' \ -e '($file,$n,$l,$r)=($1,$2,$3,$4); $q="'\''"; $r=~s/$q/$q\\$q$q/g;'\ -e 'print "sed -i $q${n}s!$l!$r!$q $file"'|bash
| * maint: run "make update-copyright".Akim Demaille2012-01-131-1/+1
| |
| * tests: fix empty unions.Joel E. Denny2011-08-211-4/+2
| | | | | | | | | | | | | | | | | | | | | | Empty unions are not accepted by the ISO C99 grammar or by at least some versions of Sun Studio. Reported by Wolfgang S. Kechel at <http://lists.gnu.org/archive/html/bug-bison/2011-08/msg00003.html>. * NEWS (2.5.1): Document fix. * THANKS (Wolfgang S. Kechel): Add. * tests/existing.at (GNU Cim Grammar) (GNU pic (Groff 1.18.1) Grammar.): Remove empty %union.
| * maint: run "make update-copyright".Joel E. Denny2011-01-021-2/+2
| |
| * Do not use date ranges in copyright notices.Paul Eggert2010-06-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * maint: run "make update-copyright"Joel E. Denny2010-01-041-2/+2
| |
| * %define: accept unquoted values.Joel E. Denny2009-08-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * NEWS (2.5): Group all %define changes together, and document this one. Remove quotes in IELR and canonical LR entry. * doc/bison.texinfo: Remove quotes in most examples throughout. (Decl Summary): Update %define documentation. (Table of Symbols): Likewise. * src/ielr.c (LrType): Update documentation. * src/parse-gram.y (content.opt): Add production for ID. * tests/calc.at: Likewise. * tests/existing.at: Likewise. * tests/input.at: Likewise. * tests/local.at: Likewise. * tests/push.at: Likewise. * tests/reduce.at: Likewise. * tests/torture.at: Likewise. (cherry picked from commit cf499cff31eabd04e37107484647bdd453137d1d) Conflicts: doc/bison.texinfo src/parse-gram.c src/parse-gram.h tests/actions.at tests/calc.at
| * %define lr.type: make values lowercase IDs.Joel E. Denny2009-08-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That is, "LALR" => "lalr", "IELR" => "ielr", and "canonical LR" => "canonical-lr". * NEWS (2.5): Update documentation. * doc/bison.texinfo (Decl Summary): Likewise. * src/ielr.c (ielr): Use new values. * src/ielr.h (ielr): Update documentation. * src/reader.c (prepare_percent_define_front_end_variables): Use and validate new values. * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test grammars. * tests/reduce.at (AT_TEST_LR_TYPE): Likewise. (cherry picked from commit 6ba9640406758718fdcfb7a1154e58ce4d9b196c)
| * Some M4 cleanup in the testsuite.Joel E. Denny2009-07-221-9/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Suggested by Eric Blake at <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>. * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not complicate the code by distinguishing between a missing value and an empty string value for an optional argument. This fix is allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below. * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into... (AT_TEST_TABLES_AND_PARSE): ... this now that the special arguments are not needed because of the following changes. Fix stale comments. Bison developers should use GNU M4 and should not use POSIXLY_CORRECT when building the test suite, so do not complicate the code by avoiding $10 and above. Do not quote an empty string value for an optional argument, and do not distinguish between a missing value and an empty string value.
| * Finish implementing %define lr.type.Joel E. Denny2009-04-211-60/+1659
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Its value can be "LALR", "IELR", or "canonical LR". * lib/timevar.def (TV_IELR_PHASE1): New var. (TV_IELR_PHASE2): New var. (TV_IELR_PHASE3): New var. (TV_IELR_PHASE4): New var. * src/Makefile.am (bison_SOURCES): Add AnnotationList.c, AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c, Sbitset.h, ielr.h, and ielr.c. * src/getargs.h, src/getargs.c (enum trace, trace_args, trace_types): Add trace_ielr. * src/lalr.h, src/lalr.c (ngotos): Export it. (F): Rename to... (goto_follows): ... this, update all uses, and export it. (set_goto_map): Export it. (map_goto): Export it. (compute_lookahead_tokens): Don't free goto_follows yet. Now handled in ielr. (initialize_LA): Export it. Move lookback allocation to... (lalr): ... here because, for canonical LR, initialize_LA must be invoked but lookback and much of the rest of LALR isn't needed. * main.c (main): Instead of lalr, invoke ielr, which invokes lalr. * src/reader.c (reader): Default lr.type to "LALR". Default lr.default_rules to "accepting" if lr.type is "canonical LR". Leave the default as "all" otherwise. Check for a valid lr.type value. * src/state.h, src/state.c (struct state_list): Add state_list member. (state_new): Initialize state_list member to NULL. (state_new_isocore): New function, exported. * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that exercises all values of lr.type. (GNU AWK Grammar): Rename test group to... (GNU AWK 3.1.0 Grammar): ... this, and extend to use AT_TEST_EXISTING_GRAMMAR. (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR. (GNU pic Grammar): Rename test group to... (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use AT_TEST_EXISTING_GRAMMAR. * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises all values of lr.type. (Single State Split): New test groups using AT_TEST_LR_TYPE. (Lane Split): Likewise. (Complex Lane Split): Likewise. (Split During Added Lookahead Propagation): Likewise.
* | maint: run "make update-copyright".Jim Meyering2012-01-131-1/+1
| |
* | tests: fix empty unions.Joel E. Denny2011-08-211-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | Empty unions are not accepted by the ISO C99 grammar or by at least some versions of Sun Studio. Reported by Wolfgang S. Kechel at <http://lists.gnu.org/archive/html/bug-bison/2011-08/msg00003.html>. * NEWS (2.5.1): Document fix. * THANKS (Wolfgang S. Kechel): Add. * tests/existing.at (GNU Cim Grammar) (GNU pic (Groff 1.18.1) Grammar.): Remove empty %union. (cherry picked from commit 7451638148706f6317975db418cc78e488f420aa)
* | global: remove unnecessary horizontal tabs.Joel E. Denny2011-07-241-981/+981
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change was made by applying emacs' untabify function to nearly all files in Bison's repository. Required tabs in make files, ChangeLog, regexps, and test code were manually skipped. Other notable exceptions and changes are listed below. * bootstrap: Skip because we sync this with gnulib. * data/m4sugar/foreach.m4 * data/m4sugar/m4sugar.m4: Skip because we sync these with Autoconf. * djgpp: Skip because I don't know how to test djgpp properly, and this code appears to be unmaintained anyway. * README-hacking (Hacking): Specify that tabs should be avoided where not required.
* | maint: run "make update-copyright".Joel E. Denny2011-01-021-2/+2
| |
* | Do not use date ranges in copyright notices.Paul Eggert2010-06-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/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.texinfo, doc/local.mk: * doc/refcard.tex, etc/README, etc/bench.pl.in, etc/local.mk: * examples/calc++/Makefile.am, examples/extexi: * examples/local.mk, 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/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/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.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/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: 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.
* | maint: run "make update-copyright"Joel E. Denny2010-01-041-2/+2
| |
* | %define: accept unquoted values.Joel E. Denny2009-08-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * NEWS (2.5): Group all %define changes together, and document this one. Remove quotes in IELR and canonical LR entry. * doc/bison.texinfo: Remove quotes in most examples throughout. (Decl Summary): Update %define documentation. (Table of Symbols): Likewise. * src/ielr.c (LrType): Update documentation. * src/parse-gram.y (content.opt): Add production for ID. * tests/actions.at: Remove quotes in most tests. * tests/calc.at: Likewise. * tests/existing.at: Likewise. * tests/input.at: Likewise. * tests/local.at: Likewise. * tests/push.at: Likewise. * tests/reduce.at: Likewise. * tests/torture.at: Likewise.