summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* news: updateAkim Demaille2021-09-071-7/+0
|
* maint: post-release administriviaAkim Demaille2021-09-022-1/+4
| | | | | | * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
* version 3.7.91v3.7.91Akim Demaille2021-09-021-1/+1
| | | | * NEWS: Record release date.
* tests: disable "Multistart reports"Akim Demaille2021-09-022-1595/+1599
| | | | | | | | | For some reason this test fails on Solaris/x86. But multistart is not part of 3.8, so we can postpone the debugging of this issue. Reported by Dagobert Michelsen. <https://lists.gnu.org/r/bug-bison/2021-08/msg00027.html> * tests/report.at (Multistart reports): Comment out.
* style: c++: formatting changesAkim Demaille2021-08-292-13/+12
| | | | | * data/skeletons/variant.hh, data/skeletons/glr2.cc: Fix space before paren issue.
* style: rename stmtMerge as stmt_mergeAkim Demaille2021-08-294-31/+31
| | | | | | | Follow the GNU Coding Style. * doc/bison.texi, examples/c++/glr/c++-types.yy, * examples/c/glr/c++-types.y, tests/cxx-type.at: s/stmtMerge/stmt_merge/g.
* c++: beware of Visual C++ limitationsAkim Demaille2021-08-292-0/+3
| | | | | | | | | | | | | | Contrary to what commit d8cc6b073e2802d871a16dc62418a7eb62ed2216 "c++: shorten the assertions that check whether tokens are correct" believed, MS Visual C++'s preprocessor limitation is not on the input line length, but on the size of the line holding the full C++ statement. Reported by Vince Huffaker <vince@vincejulie.com> <https://lists.gnu.org/r/help-bison/2021-08/msg00003.html> * data/skeletons/variant.hh (_b4_symbol_constructor_define): Hide the assertion from Visual C++.
* tests: don't postprocess stderr with sedAkim Demaille2021-08-292-19/+11
| | | | | | | | | | | | | | | On Solaris, sed throws away the NUL bytes from the stream, even in C locale. So instead of postprocessing bison's stderr to neutralize changes in value of `argv[0]`, use an envvar to actually neutralize variations of `argv[0]` during tests. Reported by Dagobert Michelsen. <https://lists.gnu.org/r/bug-bison/2021-08/msg00025.html> * src/main.c (main): Change `argv[0]` if BISON_PROGRAM_NAME is defined. * tests/bison.in: No longer mess with stderr, just pass the expected BISON_PROGRAM_NAME value.
* CI: don't require Autoconf 2.71Akim Demaille2021-08-193-5/+4
|
* examples: don't demonstrate multistart, which is not part of 3.8Akim Demaille2021-08-194-58/+18
| | | | | | | | | Besides, for mysterious reasons, this fails on some environment. Reported by Dagobert Michelsen. <https://lists.gnu.org/archive/html/bug-bison/2021-08/msg00008.html> * examples/c/lexcalc/lexcalc.test, examples/c/lexcalc/parse.y, * examples/c/lexcalc/scan.l: Revert to a single-start example.
* tests: grep -E is not portableAkim Demaille2021-08-191-1/+1
| | | | | | | Reported by Dagobert Michelsen. <https://lists.gnu.org/r/bug-bison/2021-08/msg00008.html> * tests/calc.at: Use $EGREP.
* glr2.cc: require C++11Akim Demaille2021-08-196-29/+32
| | | | | | | | | | | | | | Reported by Dagobert Michelsen. https://lists.gnu.org/r/bug-bison/2021-08/msg00006.html * m4/bison-cxx-std.m4 (_BISON_CXXSTD_98_snippet): We don't need vector::data, it was only for glr2.cc, which is C++11 anyway. (_BISON_CXXSTD_11_snippet): We need vector::data and std::swap on arrays. * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): We don't need vector::data. * tests/local.at (AT_COMPILE_CXX): Skip when glr2.cc and no support for C++11.
* readme: add DAkim Demaille2021-08-131-1/+1
|
* maint: post-release administriviaAkim Demaille2021-08-132-1/+4
| | | | | | * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
* version 3.7.90v3.7.90Akim Demaille2021-08-131-1/+1
| | | | * NEWS: Record release date.
* build: ignore syntax-check's file_system check on DoxyfileAkim Demaille2021-08-131-0/+1
| | | | * cfg.mk: Here.
* tests: fix incorrect test caseAkim Demaille2021-08-121-2/+2
| | | | | | | | In c2ba260487927a4cdf061fae10fdd1b387ca3d95 ("glr.c: fix signature when using custom error messages"), I meant to add a test case for C, not C++. It does not work in C++. * tests/calc.at: Run for glr.c, not glr.cc.
* gnulib: updateAkim Demaille2021-08-121-0/+0
|
* news: be clear that glr2.cc is C++11Akim Demaille2021-08-121-8/+7
|
* build: modernize to newer Autoconf releasesAkim Demaille2021-08-121-3/+3
| | | | * configure.ac: here.
* build: reject C++ compilers that don't support std::vector::dataAkim Demaille2021-08-122-5/+23
| | | | | | | | | | | | | GCC 4.2 on macOS claims to support C++98, but does not feature it. input.cc: In member function 'void state_stack::yycompressStack()': input.cc:1774: error: 'class std::vector<glr_stack_item, std::allocator<glr_stack_item> >' has no member named 'data' Reported by Christopher Nielsen <mascguy@github.com>. <https://trac.macports.org/raw-attachment/ticket/59927/bison-test-results-20210811-95b72.log.xz>. * m4/bison-cxx-std.m4 (_BISON_CXXSTD_98_snippet): Check for it. * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Ditto.
* build: check for C++ 20 and 2bAkim Demaille2021-08-124-18/+38
| | | | | | | C++20 is released. * configure.ac, m4/bison-cxx-std.m4, tests/atlocal.in, * tests/local.at: Replace 2a with 20, and add support for 2b.
* tests: remove obsolete checksAkim Demaille2021-08-121-26/+0
| | | | | | | * tests/atlocal.in: It was an error for tests to depend on gnulib: they must not, as gnulib would hide portability issues that we want to catch. So this piece of code is no longer useful, and must not be useful.
* tests: be robust to old versions of xlstprocAkim Demaille2021-08-122-3/+17
| | | | | | | | Reported by Christopher Nielsen <mascguy@github.com>. <https://trac.macports.org/raw-attachment/ticket/59927/bison-test-results-20210811-95b72.log.xz> * tests/report.at (AT_CHECK_HTML): New. Use it.
* c: fix _Noreturn support detectionAkim Demaille2021-08-111-1/+1
| | | | | | | | Reported by Christopher Nielsen <mascguy@github.com>. <https://trac.macports.org/ticket/59927#comment:59> and <https://trac.macports.org/ticket/59927#comment:62>. * data/skeletons/c.m4: Fix typo.
* lalr1.cc: style changesAkim Demaille2021-08-111-8/+11
| | | | | * data/skeletons/lalr1.cc: Formatting changes. Use more `const`, as in glr2.cc.
* glr.c: fix signature when using custom error messagesAkim Demaille2021-08-113-2/+6
| | | | | | | Reported by Tom Shields <thomas.evans.shields@icloud.com>. * data/skeletons/glr.c (yypcontext_location): Fix return type. * tests/calc.at: Check the case pure, location, custom error messages.
* tests: check symbol/token renumberingAkim Demaille2021-08-112-9/+297
| | | | | | | | | In some extreme situations, with lots of useless tokens, Bison was numbering them incorrectly, which resulted in a broken grammar. <https://lists.gnu.org/r/bison-patches/2021-03/msg00001.html> commit a774839ca873d1082f79ba3c4eecc1e242a28ce1. * tests/regression.at (Useless Tokens): New.
* style: rename b4_lex as b4_yylexAkim Demaille2021-08-096-22/+31
| | | | | | | | | | | | For consistency with b4_yyerror_formals, etc. * data/skeletons/bison.m4, data/skeletons/c.m4, data/skeletons/d.m4, * data/skeletons/glr.c, data/skeletons/glr2.cc, * data/skeletons/java.m4, data/skeletons/lalr1.cc, * data/skeletons/lalr1.d, data/skeletons/lalr1.java, * data/skeletons/yacc.c (b4_lex, b4_lex_formals): Rename as... (b4_yylex, b4_yylex_formals): these.
* yacc: comply with recent POSIX updates: declare yyerror and yylexAkim Demaille2021-08-098-30/+95
| | | | | | | | | | | | | | | | | | | | | In POSIX Yacc mode, declare yyerror and yylex unless already #defined, or if YYERROR_IS_DECLARED/YYLEX_IS_DECLARED are defined (for consistency with Bison's YYSTYPE_IS_DECLARED/YYLTYPE_IS_DECLARED). See <https://austingroupbugs.net/view.php?id=1388#c5220>. * data/skeletons/c.m4 (b4_function_declare): Resurect. (b4_lex_formals): Since we will possibly expose this prototype in the header, take the prefix into account. * data/skeletons/yacc.c (b4_declare_yyerror_and_yylex): New. (b4_shared_declarations): Use it. * tests/local.at (AT_YACC_IF): New. When in Yacc mode, set the `yacc` Autotest keyword. (AT_YYERROR_DECLARE(c)): Don't declare in Yacc mode, to avoid clashes (since this signature is static). (AT_YYERROR_DEFINE(c)): Don't define as static in Yacc mode. * tests/regression.at (Early token definitions with --yacc): Specify that we are in Yacc mode.
* build: enable -Wmismatched-deallocAkim Demaille2021-08-091-1/+1
| | | | * configure.ac (warn_common): Here.
* gnulib: updateAkim Demaille2021-08-091-0/+0
|
* bistromathic: beware of portability issues with readlineAkim Demaille2021-08-082-8/+22
| | | | | | | | | | | | | | | | | In some cases readline emits a trailing spaces after the last suggestion, which results in errors such as: ``` -( - atan cos exp ln number sin sqrt$ +( - atan cos exp ln number sin sqrt $ ``` Reported by Christopher Nielsen <mascguy@github.com>. <https://trac.macports.org/ticket/59927#comment:48> <https://trac.macports.org/attachment/ticket/59927/bison-3.7.6-test-10.13.test-suite.log> * examples/test (run): Add support for -t. * examples/c/bistromathic/bistromathic.test: Use it.
* d: prepare to be able to run LAC testsAkim Demaille2021-08-073-1/+30
| | | | | | | | | | Unfortunately it seems to be quite difficult to have "LAC: Exploratory stack" run for D. * data/skeletons/lalr1.d: We need File when traces are enabled. * tests/local.at (AT_YYLEX_DEFINE(d)): New. * tests/regression.at: Prepare for D, but don't run it, it does not work.
* tests: factor iterating over skeletonsAkim Demaille2021-08-074-5/+15
| | | | | | | * tests/local.at (AT_FOR_EACH_SKEL): New. Use where appropriate. * data/skeletons/lalr1.d: Reject -d. * tests/input.at, tests/scanner.at: Also check D.
* m4: catch suspicions of unevaluated macrosAkim Demaille2021-08-077-40/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Check in m4's output if there are sequences such as m4_foo or b4_foo, which are probably resulting from incorrect m4 processing. It actually already is useful: - it caught a leaking b4_lac_if leaking from glr.c, where LAC is not supported, hence b4_lac_if is not defined. - it also caught references to location.hh in position.hh when location.hh does not exist. - while making "Code injection" robust to these new warnings (it is its very purpose to let b4_canary pass unevaluated), I saw that it did not check lalr1.d, and when adding lalr1.d, it revealed it did underquote ocurrences of token value types. * src/scan-skel.l (macro): New abbreviation. Use it. * data/skeletons/glr.c: Don't use b4_lac_if, we don't have it. * data/skeletons/location.cc: Don't generate position.hh when we don't generate location.hh. * data/skeletons/d.m4 (b4_basic_symbol_constructor_define): Fix underquotation. * data/skeletons/bison.m4 (b4_canary): New. * tests/input.at (Code injection): Use it, and check lalr1.d too.
* style: formatting changes in scan-code.lAkim Demaille2021-08-072-3/+11
| | | | * src/scan-code.l: Fix indentation.
* doc: avoid #define YYDEBUG in C++Akim Demaille2021-08-072-7/+10
| | | | * doc/bison.texi (Enabling Traces): here.
* tests: extract AT_LOCATION_PRINT_DECLARE and AT_LOCATION_PRINT_DEFINEAkim Demaille2021-08-061-19/+31
| | | | | * tests/local.at (AT_LOCATION_PRINT_DECLARE) (AT_LOCATION_PRINT_DEFINE): New.
* tests: rename AT_YACC_IF as AT_YACC_C_IFAkim Demaille2021-08-064-7/+7
| | | | | | | In data/, b4_yacc_if refers to %yacc, not yacc.c. * tests/local.at (AT_YACC_IF): Rename as... (AT_YACC_C_IF): this.
* doc: more pointers to the examplesAkim Demaille2021-08-061-7/+10
| | | | * doc/bison.texi (Infix Calc): Here.
* git: add diff patterns for Autotest and TexinfoAkim Demaille2021-08-062-1/+14
|
* CI: fix the GCC 9 buildAkim Demaille2021-08-061-1/+5
|
* todo: d: push and token ctors are doneAkim Demaille2021-08-041-96/+0
|
* doc: refer to the examplesAkim Demaille2021-08-041-9/+25
| | | | | * doc/bison.texi: Point to rpcalc, mfcalc, simple.y, calc++, c/glr and c++/glr.
* examples: modernize the example MakefilesAkim Demaille2021-08-0415-98/+28
| | | | | | | | | | | | | | | | | * examples/c++/Makefile, examples/c++/calc++/Makefile, * examples/c++/glr/Makefile, examples/c/bistromathic/Makefile, * examples/c/calc/Makefile, examples/c/glr/Makefile, * examples/c/lexcalc/Makefile, examples/c/mfcalc/Makefile, * examples/c/pushcalc/Makefile, examples/c/reccalc/Makefile, * examples/c/rpcalc/Makefile, examples/d/calc/Makefile, * examples/d/simple/Makefile, examples/java/calc/Makefile, * examples/java/simple/Makefile: Use --html to generate *.html directly. No longer demonstrate --xml. No longer show rules for xml to html. Use --header, not --defines. Use --graph without specifying the output file now that we generate *.gv by default.
* doc: glr: document typed mergersAkim Demaille2021-08-042-11/+44
| | | | | | | See <https://lists.gnu.org/r/help-bison/2020-12/msg00016.html>. * doc/bison.texi (Merging GLR Parses): document typed mergers. And avoid #define YYSTYPE.
* style: tests: rebox commentsAkim Demaille2021-08-041-31/+31
| | | | * tests/glr-regression.at: here.
* news: updateAkim Demaille2021-08-041-19/+37
| | | | In particular, announce lalr1.d.
* doc: fix spelloAkim Demaille2021-08-031-8/+7
| | | | * doc/bison.texi (Multiple start-symbols): here.