summaryrefslogtreecommitdiff
path: root/NEWS
Commit message (Collapse)AuthorAgeFilesLines
* news: updateAkim Demaille2022-09-201-4/+11
| | | | * NEWS: update.
* cex: provide the user with a means to change the timeoutAkim Demaille2022-09-161-0/+4
| | | | | | | | | | | | | Reported by Frank Heckenbach. https://lists.gnu.org/r/bug-bison/2022-07/msg00011.html * bootstrap.conf: Use c_strtod, so that even in French locales "1.5" is accepted, instead of "1,5". * src/counterexample.c, src/state-item.c: Use xtime_t instead of time_t, so that accuracy goes from seconds to nanoseconds. ( counterexample_init): Depend on cex.timeout rather than $TIME_LIMIT. * doc/bison.texi (%define Summary): Document cex.timeout.
* c++: enable C++11 assignment operators for lalr1.ccAnthony Heading2022-09-031-0/+2
| | | | | | | | <https://github.com/akimd/bison/pull/85> <https://lists.gnu.org/r/bug-bison/2022-04/msg00000.html> * data/skeletons/c++.m4: Enable C++11 assignment operators for all C++ skeletons.
* package: bump copyrights to 2022Paul Eggert2022-01-151-1/+1
| | | | Run "make update-copyright".
* warnings: don't complain about m4_foo and b4_foo when from the userAkim Demaille2021-11-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | Currently, occurrences of these identifiers in the user's input yield spurious warnings. To tell the difference between a legitimate m4_foo from the user, and a bad m4_foo coming from a non-evaluated macro of a skeleton, escape the user's identifiers as m4@'_foo. We already use @' as a special sequence to be stripped from the skeleton's output. See <https://lists.gnu.org/r/bug-bison/2021-10/msg00026.html> and previous commit ("warnings: be less picky about occurrences of m4_/b4_ in the output"). * src/flex-scanner.h (OBSTACK_SGROW): New. * src/output.c (output_escaped): Escape m4_ and b4_. * src/scan-code.l: Likewise. * src/system.h (obstack_escape): Likewise. And rewrite as a function. * tests/skeletons.at (Suspicious sequences): Make sure the user can use m4_foo/b4_foo without spurious warnings.
* maint: post-release administriviaAkim Demaille2021-09-251-0/+3
| | | | | | * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
* version 3.8.2v3.8.2Akim Demaille2021-09-251-1/+1
| | | | * NEWS: Record release date.
* news: updateAkim Demaille2021-09-241-0/+4
|
* maint: post-release administriviaAkim Demaille2021-09-111-0/+3
| | | | | | * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
* version 3.8.1v3.8.1Akim Demaille2021-09-111-1/+1
| | | | * NEWS: Record release date.
* yacc: declare yyerror/yylex only when POSIXLY_CORRECTAkim Demaille2021-09-111-1/+9
| | | | | | | | | | | | | | | | | | | | The recent changes to comply with POSIX are breaking Automake's test suite. Reported by Kiyoshi Kanazawa. <https://lists.gnu.org/r/bug-bison/2021-09/msg00005.html> To limit the impact of POSIX changes, bind them to $POSIXLY_CORRECT. Suggested by Karl Berry. <https://lists.gnu.org/r/bug-bison/2021-09/msg00009.html> The existing `maintainer-check-posix` Make target checks these changes. * src/getargs.h, src/getargs.c (set_yacc): New. Use it. * data/skeletons/bison.m4 (b4_posix_if): New. * data/skeletons/yacc.c (b4_declare_yyerror_and_yylex): Use it. * doc/bison.texi, tests/local.at: Adjust.
* maint: post-release administriviaAkim Demaille2021-09-071-0/+3
| | | | | | * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
* version 3.8v3.8Akim Demaille2021-09-071-1/+1
| | | | * NEWS: Record release date.
* news: updateAkim Demaille2021-09-071-7/+0
|
* maint: post-release administriviaAkim Demaille2021-09-021-0/+3
| | | | | | * 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.
* c++: beware of Visual C++ limitationsAkim Demaille2021-08-291-0/+1
| | | | | | | | | | | | | | 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++.
* maint: post-release administriviaAkim Demaille2021-08-131-0/+3
| | | | | | * 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.
* news: be clear that glr2.cc is C++11Akim Demaille2021-08-121-8/+7
|
* yacc: comply with recent POSIX updates: declare yyerror and yylexAkim Demaille2021-08-091-0/+8
| | | | | | | | | | | | | | | | | | | | | 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.
* news: updateAkim Demaille2021-08-041-19/+37
| | | | In particular, announce lalr1.d.
* Merge 3.7.6 into masterAkim Demaille2021-03-101-1/+16
|\ | | | | | | | | | | | | | | * maint: maint: post-release administrivia version 3.7.6 yacc: fix push parser tables: fix again the handling of useless tokens
| * maint: post-release administriviaAkim Demaille2021-03-081-0/+3
| | | | | | | | | | | | * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
| * version 3.7.6v3.7.6Akim Demaille2021-03-081-1/+1
| | | | | | | | * NEWS: Record release date.
| * yacc: fix push parserAkim Demaille2021-03-071-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When a pstate is used for multiple successive parses, some state may leak from one run into the following one. That was introduced in 330552ea499ca474f65967160e9d4e50265f9631 "yacc.c: push: don't clear the parser state when accepting/rejecting". Reported by Ryan <dev@splintermail.com> https://lists.gnu.org/r/bug-bison/2021-03/msg00000.html * data/skeletons/yacc.c (yypush_parse): We reusing a pstate from a previous run, do behave as if it were the first run. * tests/push.at (Pstate reuse): Check this.
| * tables: fix again the handling of useless tokensAkim Demaille2021-03-071-0/+6
| | | | | | | | | | | | | | | | | | | | | | The right-shift added in c22902e360e0fbbe9fd5657dcf107e03166da309 ("tables: fix handling for useless tokens") is incorrect. In particular, we need to reset the "new" bits. Reported by Balázs Scheidler. https://github.com/akimd/bison/issues/74 * src/tables.c (pos_set_set): Fix the right-shift.
| * Update URLs to prefer https: to http:Paul Eggert2021-01-301-2/+2
| | | | | | | | Also, fix a few http: URLs that were no longer working.
| * maint: post-release administriviaAkim Demaille2021-01-241-0/+3
| | | | | | | | | | | | * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
* | doc: printing locationsAkim Demaille2021-02-091-3/+12
| | | | | | | | | | | | Document YYLOCATION_PRINT. * doc/bison.texi (Printing Locations): New node.
* | graph: output foo.gv by default, instead of *.dotAkim Demaille2021-02-021-0/+7
| | | | | | | | | | | | | | | | | | | | That change was started in Bison 3.4. The announcement for 3.7 stated that in Bison 3.8 we would use *.gv by default. * src/files.c (compute_output_file_names): spec_graph_file defaults too *.gv. * doc/bison.texi, examples/c++/calc++/local.mk, tests/output.at: Adjust.
* | yacc: remove support for YYPRINTAkim Demaille2021-02-011-21/+28
| | | | | | | | | | | | | | | | | | Its removal was annonced several times in NEWS (for Bison 3.5, 3.6, 3.7). * data/skeletons/c.m4, data/skeletons/yacc.c: Remove support for YYPRINT. * NEWS: Fix the mess introduced by the merge. Document the removal of YYPRINT. * doc/bison.texi (The YYPRINT Macro): Remove.
* | c++: make it clear that #define YYSTYPE is not supportedAkim Demaille2021-02-011-0/+7
| | | | | | | | | | | | | | | | We have been accepting this for years, but it is deprecated: people are expecting to define api.value.type instead. * doc/bison.texi: Make it clear that YYSTYPE and YYLTYPE are for C only.
* | Update URLs to prefer https: to http:Paul Eggert2021-01-291-2/+2
| | | | | | | | Also, fix a few http: URLs that were no longer working.
* | Merge tag 'v3.7.5'Akim Demaille2021-01-241-1/+22
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Three new commits: commit 8358090292e21c61a583da542bad9099ad65f355 Author: Paul Eggert <eggert@cs.ucla.edu> Date: Wed Jan 20 18:30:16 2021 -0800 c: port to HP-UX 11.23 commit 2c294c132528ede23d8ae4959783a67e9ff05ac5 Author: Vincent Imbimbo <vmi6@cornell.edu> Date: Sat Jan 23 13:25:18 2021 -0500 cex: fix state-item pruning commit c22902e360e0fbbe9fd5657dcf107e03166da309 Author: Akim Demaille <akim.demaille@gmail.com> Date: Sat Jan 23 18:40:15 2021 +0100 tables: fix handling for useless tokens
| * version 3.7.5v3.7.5Akim Demaille2021-01-241-1/+1
| | | | | | | | * NEWS: Record release date.
| * tables: fix handling for useless tokensAkim Demaille2021-01-241-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some rare conditions, the generated parser can be wrong when there are useless tokens. Reported by Balázs Scheidler. https://github.com/akimd/bison/issues/72 Balázs managed to prove that the bug was introduced in commit af1c6f973a60a51c609903713ff8f7fce0887025 Author: Theophile Ranquet <ranquet@lrde.epita.fr> Date: Tue Nov 13 10:38:49 2012 +0000 tables: use bitsets for a performance boost Suggested by Yuri at <http://lists.gnu.org/archive/html/bison-patches/2012-01/msg00000.html>. The improvement is marginal for most grammars, but notable for large grammars (e.g., PosgreSQL's postgre.y), and very large for the sample.y grammar submitted by Yuri in http://lists.gnu.org/archive/html/bison-patches/2012-01/msg00012.html. Measured with --trace=time -fsyntax-only. parser action tables postgre.y sample.y Before 0,129 (44%) 37,095 (99%) After 0,117 (42%) 5,046 (93%) * src/tables.c (pos): Replace this set of integer coded as an unsorted array of integers with... (pos_set): this bitset. which was implemented long ago, but that I installed only recently (March 2019), first published in v3.3.90. That patch introduces a bitset to represent a set of integers. It managed negative integers by using a (fixed) base (the smallest integer to represent). It avoided negative accesses into the bitset by ignoring integers smaller than the base, under the asumption that these cases correspond to useless tokens that are ignored anyway. While it turns out to be true for all the test cases in the test suite (!), Balázs' use case demonstrates that it is not always the case. So we need to be able to accept negative integers that are smaller than the current base. "Amusingly" enough, the aforementioned patch was visibly unsure about itself: /* Store PLACE into POS_SET. PLACE might not belong to the set of possible values for instance with useless tokens. It would be more satisfying to eliminate the need for this 'if'. */ This commit needs several improvements in the future: - support from bitset for bit assignment and shifts - amortized resizing of pos_set - test cases * src/tables.c (pos_set_base, pos_set_dump, pos_set_set, pos_set_test): New. Use them instead of using bitset_set and bitset_test directly.
| * cex: fix state-item pruningVincent Imbimbo2021-01-241-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were several bugs in pruning that would leave the state-item graph in an inconsistent state which could cause crashes later on: - Pruning now happens in one pass instead of two. - Disabled state-items no longer prune the state-items they transition to if that state-item has other states that transition to it. - State-items that transition to disabled state-items are always pruned even if they have productions. Reported by Michal Bartkowiak <michal.bartkowiak@nokia.com> https://lists.gnu.org/r/bug-bison/2021-01/msg00000.html and Zartaj Majeed https://github.com/akimd/bison/issues/71 * src/state-item.c (prune_forward, prune_backward): Fuse into... (prune_state_item): this. Adjust callers.
| * news: updateAkim Demaille2021-01-231-0/+9
| |
| * package: bump copyrights to 2021Akim Demaille2021-01-231-1/+1
| | | | | | | | Run 'make update-copyright'.
| * c: port to HP-UX 11.23Paul Eggert2021-01-211-0/+3
| | | | | | | | | | | | | | Problem reported by Albert Chin in: https://lists.gnu.org/r/bug-bison/2021-01/msg00029.html * data/skeletons/c.m4 (b4_c99_int_type_define): Work around HP-UX bug.
* | package: bump copyrights to 2021Akim Demaille2021-01-161-1/+1
| | | | | | | | Run 'make update-copyright'.
* | c: add support for YYNOMEMAkim Demaille2021-01-161-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Suggested by Joe Nelson <joe@begriffs.com>. https://lists.gnu.org/r/help-bison/2020-12/msg00020.html * data/skeletons/glr.c, data/skeletons/yacc.c (YYNOMEM): New. Use it. (yyexhaustedlab): Rename as... (yynomemlab): this. * tests/calc.at: Check it. * doc/bison.texi: Document it. Fix incorrect statements about non-existing constants for YYERROR etc.
* | glr.c: log the execution of deferred actionsAkim Demaille2021-01-021-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently deferred reductions are not "verbose" at all: only immediate reductions are displayed in the YYDEBUG traces. I don't understand why. Besides it seems actually simpler the install the reduction traces right around the user action inside yyuserAction rather that around calls to yyuserAction. This only trouble is that yyuserAction does not know the stack number it works on, so we have to pass it. And pass -1 when we are actually running on a temporary stack. The glr example, on "T(x) + y;" as input, adds these logs, which allow to see when the `<cast>` is built: Stack 0 Entering state 26 Reduced stack 0 by rule 7 (line 108); action deferred. Now in state 7. Stack 0 Entering state 7 Reading a token Next token is token '+' (1.6: ) Stack 1 Entering state 27 Reduced stack 1 by rule 13 (line 123); action deferred. Now in state 12. Stack 1 Entering state 12 Next token is token '+' (1.6: ) Stack 1 dies. Removing dead stacks. On stack 0, shifting token '+' (1.6: ) Stack 0 now in state #14 +Reducing stack -1 by rule 6 (line 107): + $1 = token identifier (1.3: x) +-> $$ = nterm expr (1.3: x) +Reducing stack -1 by rule 7 (line 108): + $1 = token typename (1.0: T) + $2 = token '(' (1.2: ) + $3 = nterm expr (1.3: x) + $4 = token ')' (1.4: ) +-> $$ = nterm expr (1.0-3: <cast>(x,T)) Returning to deterministic operation. * data/skeletons/glr.c (yyuserAction): Take yyk as a new argument. Rename argument yyn as yyrule for clarity. Log before and after the user action. Adjust callers to not call YY_REDUCE_PRINT and YY_SYMBOL_PRINT.
* | c++: rename semantic_type as value_typeAkim Demaille2020-12-261-11/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We always refer to the triplet "kind, value, location". All of them are nouns, and we support api.value.type and api.location.type. On this regard, "semantic_type" was a poor choice. Make it "value_type". The test suite was not updated to use value_type, on purpose, to enforce backward compatibility. * data/skeletons/c++.m4, data/skeletons/glr.cc, data/skeletons/glr2.cc, * data/skeletons/variant.hh, doc/bison.texi: Define value_type rather than semantic_type. Add a backward compatibility typedef. * examples/c++/glr/c++-types.yy: Migrate.
* | Merge branch 'maint'Akim Demaille2020-11-141-1/+4
|\ \ | |/ | | | | | | | | * upstream/maint: maint: post-release administrivia version 3.7.4
| * maint: post-release administriviaAkim Demaille2020-11-141-0/+3
| | | | | | | | | | | | * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
| * version 3.7.4v3.7.4Akim Demaille2020-11-141-1/+1
| | | | | | | | * NEWS: Record release date.
* | Merge branch 'maint'Akim Demaille2020-11-131-0/+27
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: c++: shorten the assertions that check whether tokens are correct c++: don't glue functions together lalr1.cc: YY_ASSERT should use api.prefix c++: don't use YY_ASSERT at all if parse.assert is disabled c++: style: follow the Bison m4 quoting pattern yacc.c: provide the Bison version as an integral macro regen style: make conversion of version string to int public %require: accept version numbers with three parts ("3.7.4") yacc.c: fix #definition of YYEMPTY gnulib: update doc: fix incorrect section title doc: minor grammar fixes in counterexamples section
| * c++: shorten the assertions that check whether tokens are correctAkim Demaille2020-11-131-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before: YY_ASSERT (tok == token::YYEOF || tok == token::YYerror || tok == token::YYUNDEF || tok == 120 || tok == 49 || tok == 50 || tok == 51 || tok == 52 || tok == 53 || tok == 54 || tok == 55 || tok == 56 || tok == 57 || tok == 97 || tok == 98); After: YY_ASSERT (tok == token::YYEOF || (token::YYerror <= tok && tok <= token::YYUNDEF) || tok == 120 || (49 <= tok && tok <= 57) || (97 <= tok && tok <= 98)); Clauses are now also wrapped on several lines. This is nicer to read and diff, but also avoids pushing Visual C++ to its arbitrary limits (640K and lines of 16380 bytes ought to be enough for anybody, otherwise make an C2026 error). The useless parens are there for the dummy warnings about precedence (in the future, will we also have to put parens in `1+2*3`?). * data/skeletons/variant.hh (_b4_filter_tokens, b4_tok_in, b4_tok_in): New. (_b4_token_constructor_define): Use them.