summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Change gitmodules to use the upstream aliasbaserock/v3.0.2baserock/pedroalvarez/v3.0.2Pedro Alvarez2014-10-191-2/+2
|
* version 3.0.2v3.0.2Akim Demaille2013-12-051-1/+1
| | | | * NEWS: Record release date.
* gnulib: updateAkim Demaille2013-12-053-0/+5
| | | | * gnulib: here.
* output: do not generate source files when late errors are caughtAkim Demaille2013-12-045-2/+29
| | | | | | | | | | Reported by Alexandre Duret-Lutz as "second problem" in: http://lists.gnu.org/archive/html/bug-bison/2013-09/msg00015.html * bootstrap.conf: We need the "unlink" module. * src/files.h, src/files.c (unlink_generated_sources): New. * src/output.c: Use it. * tests/output.at: Check the case of late errors.
* output: record what generated files are source or report filesAkim Demaille2013-12-043-17/+32
| | | | | | | | | * src/files.h, src/files.c (output_file_name_check): Take an additional argument to record whether a file is a source or report file. * src/files.c (generated_file): New. (file_names, file_names_count): Replace with... (generated_files, generated_files_size): these. * src/scan-skel.l: Adjust.
* output: do not generate source files when early errors are caughtAkim Demaille2013-12-043-13/+35
| | | | | | | | | | | | | | | | | | | | | Reported by Alexandre Duret-Lutz as "second problem" in: http://lists.gnu.org/archive/html/bug-bison/2013-09/msg00015.html One problem is that some errors are caught early, before the generation of output files, while others can only be detected afterwards (since, for instance, skeletons can raise errors themselves). This will be addressed in two steps: early errors do not generate source files at all, while later errors will remove the files that have already been generated. * src/scan-skel.l (yyout): Open to /dev/null when there are errors. * tests/output.at (AT_CHECK_FILES): Factored out of... (AT_CHECK_OUTPUT): this. Fuse the "SHELLIO" argument in the "FLAGS" one. Use $5 to denote the expected exit status. Add a test case for early errors.
* xml: also use "%empty" with html outputAkim Demaille2013-11-262-7/+7
| | | | | * data/xslt/xml2xhtml.xsl: No longer issue an Epsilon, display as in dot and text formats.
* style: formatting changesAkim Demaille2013-11-261-33/+33
| | | | * src/print-xml.c: here.
* xml: also display %empty for empty right-hand sidesAkim Demaille2013-11-262-7/+6
| | | | * data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl: Display %empty where needed.
* reports: display %empty in the generated pointed-rulesAkim Demaille2013-11-265-27/+33
| | | | | | | * src/print.c (print_core): Use %empty for empty rules. * src/print_graph.c (print_core): Ditto. * tests/conflicts.at, tests/output.at, tests/reduce.at: Adjust expectations.
* news: YYERROR vs variantsAkim Demaille2013-11-261-0/+6
|
* style: scope reduction in lalr.ccAkim Demaille2013-11-181-23/+19
| | | | | | * src/lalr.c: Shorten variable scopes. (lookahead_tokens_print): Use the same variable name in two loops iterating over the same structure.
* lalr1.cc: formatting changesAkim Demaille2013-11-151-41/+41
| | | | * data/lalr1.cc: Fix indentation.
* lalr1.cc: fix the support of YYERROR with variantsAkim Demaille2013-11-152-10/+5
| | | | | | | | | | | | | | | | | | | | | When variant are enabled, the yylhs variable (the left-hand side of the rule being reduced, i.e. $$ and @$) is explicitly destroyed when YYERROR is called. This is because before running the user code, $$ is initialized, so that the user can properly use it. However, when quitting yyparse, yylhs is also reclaimed by the C++ compiler: the variable goes out of scope. Instead of trying to be too smart, let the compiler do its job: reduce the scope of yylhs to exactly the reduction. This way, whatever the type of scope exit (regular, exception, return, goto...) this variable will be properly reclaimed. Reported by Paolo Simone Gasparello. <http://lists.gnu.org/archive/html/bug-bison/2013-10/msg00003.html> * data/lalr1.cc (yyparse): Reduce the scope of yylhs. * tests/c++.at: We now pass this test.
* tests: check $$'s destruction with variant, YYERROR, and no error recoveryAkim Demaille2013-11-152-21/+38
| | | | | | | | | | | | | | | | | | | | | | | | | When variant are enabled, the yylhs variable (the left-hand side of the rule being reduced, i.e. $$ and @$) is explicitly destroyed when YYERROR is called. This is because before running the user code, $$ is initialized, so that the user can properly use it. However, when quitting yyparse, yylhs is also reclaimed by the C++ compiler: the variable goes out of scope. This was not detected by the test suite because (i) the Object tracker was too weak, and (ii) the problem does not show when there is error recovery. Reported by Paolo Simone Gasparello. <http://lists.gnu.org/archive/html/bug-bison/2013-10/msg00003.html> * tests/c++.at (Exception safety): Improve the objects logger to make sure that we never destroy twice an object. Also track copy-constructors. Use a set instead of a list. Display the logs before running the function body, this is more useful in case of failure. Generalize to track with and without error recovery.
* tests: simplify useless obfuscationAkim Demaille2013-11-151-14/+14
| | | | | * tests/c++.at: $$ is not special for M4, there is no need to "escape" it.
* skeletons: use better names when computing a "goto"Akim Demaille2013-11-143-16/+26
| | | | | | | | | * data/glr.c (yyLRgotoState): Name the symbol argument yysym, instead of yylhs. * data/lalr1.cc (yy_lr_goto_state_): Likewise. * data/lalr1.java (yy_lr_goto_state_): New, modeled after the previous two routines. Use it.
* maint: post-release administriviaAkim Demaille2013-11-122-1/+4
| | | | | | * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
* version 3.0.1v3.0.1Akim Demaille2013-11-121-1/+1
| | | | * NEWS: Record release date.
* aver: it is no longer "protected against NDEBUG"Akim Demaille2013-11-122-10/+15
| | | | | | | | Apply the same rules for aver as for assert: no side effects, especially not important ones. * src/AnnotationList.c, src/muscle-tab.c: Adjust aver uses to resist to -DNDEBUG.
* parsers: rename YY_NULL as YY_NULLPTR to avoid conflicts with FlexAkim Demaille2013-11-0814-105/+105
| | | | | | | | | | | | Flex also defines YY_NULL (to 0). Avoid gratuitous conflicts. * data/c.m4 (b4_null_define): Rename YY_NULL as YY_NULLPTR. * data/glr.c, data/lalr1.cc, data/location.cc, data/variant.hh, * data/yacc.c, src/parse-gram.c, tests/actions.at, tests/c++.at, * tests/cxx-type.at, tests/glr-regression.at, tests/headers.at, * tests/push.at, tests/regression.at: Adjust.
* build: use Automake 1.14's non-recursive Makefile featuresAkim Demaille2013-11-056-65/+54
| | | | | | * configure.ac: Require Automake 1.14. * examples/calc++/local.mk, examples/local.mk, examples/mfcalc/local.mk, * examples/rpcalc/local.mk, tests/local.mk: Use %D% and %C%.
* build: restore maintainer-push-checkAkim Demaille2013-11-051-0/+3
| | | | * tests/local.mk: here.
* c++: use __attribute__((__pure__)) to avoid warningsAkim Demaille2013-11-052-3/+8
| | | | | | | | | | Building C++ parsers with -Wsuggest-attribute=const and -Wsuggest-attribute=noreturn triggers warning in generated code. * data/lalr1.cc: Call b4_attribute_define. (debug_stream, debug_level): Flag as pure. * tests/headers.at (Several parsers): There are now more YY macros that "leak".
* skeletons: update the handling of compiler attributesAkim Demaille2013-11-052-19/+33
| | | | | | | | * data/c.m4 (b4_attribute_define): Instead of defining __attribute__, define YY_ATTRIBUTE conditionally. (YY_ATTRIBUTE_PURE, YY_ATTRIBUTE_UNUSED, _Noreturn): New. Use them. * data/glr.c: Use them.
* gnulib: updateAkim Demaille2013-11-052-26/+28
|
* style: use /* ... */ commentsAkim Demaille2013-10-241-3/+3
| | | | * src/complain.c: Here.
* tests: skip C++ tests that are too demanding for some compilersAkim Demaille2013-10-242-0/+45
| | | | | | | Some tests now fail when compiled with G++ 4.3 or 4.4 on MacPorts. * tests/local.at (AT_SKIP_IF_EXCEPTION_SUPPORT_IS_POOR): New. * tests/c++.at (Exception safety): Use it.
* install: do not install yacc.1 when --disable-yaccAkim Demaille2013-10-225-12/+14
| | | | | | | * configure.ac (ENABLE_YACC): New conditional. (YACC_SCRIPT, YACC_LIBRARY): Remove. * lib/local.mk, src/local.mk: Use the former instead of the latter. * doc/local.mk: Use ENABLE_YACC to avoid installing yacc.1.
* style: avoid tabsAkim Demaille2013-10-221-8/+8
| | | | * src/scan-code.l: here.
* c++: fix generated doxygen commentsAkim Demaille2013-10-222-6/+6
| | | | | * configure.ac: Enable -Wdocumentation if supported. * data/lalr1.cc: Fix comments.
* fix: uniqstr are already pointersAkim Demaille2013-10-221-2/+2
| | | | | * src/uniqstr.c (uniqstr_assert): Remove incorrect double indirection, and now useless cast.
* bison: pacify Sun C 5.12Paul Eggert2013-10-212-6/+16
| | | | | | | | | | * src/scan-code.l (show_sub_message): Redo initializations to work around a bogus Sun C 5.12 warning. (parse_ref): Remove unreachable code that Sun C 5.12 complains about. * src/uniqstr.h (uniqstr_vsprintf): Use _GL_ATTRIBUTE_FORMAT_PRINTF (...) instead of __attribute__ ((__format__ (__printf__, ...))). Otherwise, Sun C 5.12 complains about an unknown attribute.
* maint: git now ignores rpcalcPaul Eggert2013-10-211-0/+1
| | | | * examples/rpcalc/.gitignore: Ignore rpcalc.
* build: examples/calc++/calc++ requires flexPaul Eggert2013-10-212-1/+3
| | | | | | * configure.ac (FLEX_CXX_WORKS): New AM_CONDITIONAL. * examples/calc++/local.mk (examples/calc++/calc++): Build if FLEX_CXX_WORKS, not BISON_CXX_WORKS.
* maint: mention help2man, texinfo, apt-getPaul Eggert2013-10-211-0/+9
| | | | | * README-hacking: Add help2man, texinfo. Describe how to add packages if you're using Debian.
* maint: git now ignores .log and .trs filesPaul Eggert2013-10-211-0/+2
| | | | * .gitignore: Add *.log, *.trs.
* tests: fix incorrect object constructionAkim Demaille2013-10-213-2/+11
| | | | | | | Reported by Ken Moffat. http://lists.gnu.org/archive/html/bug-bison/2013-10/msg00009.html * tests/c++.at (Exception safety): Here.
* glr: allow spaces between "%?" and "{" in predicatesAkim Demaille2013-10-164-1/+37
| | | | | | | | | | Reported by Rici Lake. http://lists.gnu.org/archive/html/bug-bison/2013-10/msg00004.html http://stackoverflow.com/questions/19330171/ * src/scan-gram.l: Do not try to be too smart when diagnosing invalid directives. * tests/glr-regression.at (Predicates): New test.
* diagnostics: "-Werror -Wno-error=foo" must not emit errorsAkim Demaille2013-10-165-57/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently "-Werror -Wno-error=foo" still turns "foo" warnings into errors. Reported by Alexandre Duret-Lutz. See http://lists.gnu.org/archive/html/bug-bison/2013-09/msg00015.html. * src/complain.c (errority, errority_flag): New. (complain_init): Initialize the latter. (warning_argmatch): Extract the loop iterating on the flag's bits. Set and unset errority_flag here. (warnings_argmatch): -Wno-error is not the same as -Wno-error=everything: we must remember if category foo was explicitly turned in an error/warning via -W(no-)error=foo. (warning_severity): Use errority_flag. * tests/input.at (Symbols): Just check --yacc, not -Wyacc, that's the job of tests on -W. (-Werror is not affected by -Wnone and -Wall): Rename as... (-Werror combinations): this. Tests more combinations of -W, -W(no-)error, and -W(no-)error=foo. * tests/local.at (AT_BISON_CHECK_WARNINGS): Don't expect -Werror to turn runs that issue warnings into runs with errors, as the warnings might be enforced as warnings by -Wno-error=foo, in which case -Werror does not change anything. * doc/bison.texi (Bison Options): Try to be clearer about how -W(no-)error and -W(no-)error=foo interact.
* comment changesAkim Demaille2013-10-162-11/+14
| | | | * src/complain.h, src/complain.c: More documentation, more comments.
* location: fix EOF checkAndreas Schwab2013-10-041-1/+1
| | | | | * location.c (location_caret): Use int, not char, for values from getc.
* style: variant: remove empty lineAkim Demaille2013-09-191-1/+0
| | | | | * data/variant.hh (b4_symbol_constructor_define_): Remove stray eol.
* glr: more assertionsAkim Demaille2013-09-191-0/+6
| | | | | * data/glr.c (yyaddDeferredAction, yyglrShiftDefer, yypdumpstack): More assertions.
* glr: shorten scopesAkim Demaille2013-09-191-4/+3
| | | | * data/glr.c (yyglrReduce): Define yyflag with its value.
* glr: formatting changesAkim Demaille2013-09-191-1/+1
| | | | * data/glr.c: here.
* glr: better use of tracing macrosAkim Demaille2013-09-191-5/+3
| | | | | * data/glr.c (yydestroyGLRState): Use YY_SYMBOL_PRINT instead of yy_symbol_print.
* examples: improve the output of the "variant" exampleAkim Demaille2013-09-191-5/+11
| | | | * examples/variant.yy: Improve the printing of lists.
* variant: remove useless assertionAkim Demaille2013-09-191-2/+1
| | | | | | * data/variant.hh (move): Remove precondition assertion which is ensured by the first call of the body (this precondition is also one of "build").
* tests: remove stray debugging tracesAkim Demaille2013-09-191-2/+1
| | | | | * tests/atlocal.in: Remove traces. Be ready to remove conftest.dSYM generated on OS X.