Compare commits

..
49 Commits
Author SHA1 Message Date
Akim Demaille 2fac23b9dd version 3.7.5
* NEWS: Record release date.
2021-01-24 08:30:41 +01:00
Akim Demaille c22902e360 tables: fix handling for useless tokens
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 af1c6f973a
    Author: Theophile Ranquet <[email protected]>
    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.
2021-01-24 08:28:45 +01:00
Vincent ImbimboandAkim Demaille 2c294c1325 cex: fix state-item pruning
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 <[email protected]>
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.
2021-01-24 08:24:56 +01:00
Akim Demaille 236b85dd28 package: pacify syntax-check
* cfg.mk: Currently we cannot update gnulib because of portability
issues with ancient versions of clang
(https://lists.gnu.org/r/bug-gnulib/2021-01/msg00241.html).  So skip
the check about copyright date for gnulib.
2021-01-23 15:08:48 +01:00
Akim Demaille 4109d56aa9 news: update 2021-01-23 15:02:49 +01:00
Akim Demaille 003ca0498d package: bump copyrights to 2021
Run 'make update-copyright'.
2021-01-23 15:02:49 +01:00
Akim Demaille 3abad26a2d %merge: associate it to its first definition, not the latest
Currently each time we meet %merge we record this location as the
defining location (and symbol).  Instead, record the first definition.

In the generated code we go from

    yy0->A = merge (*yy0, *yy1);

to

    yy0->S = merge (*yy0, *yy1);

where S was indeed the first symbol, and in the diagnostics we go from

    glr-regr18.y:30.18-24: error: result type clash on merge function 'merge': <type2> != <type1>
       30 | sym2: sym3 %merge<merge> { $$ = $1; } ;
          |                  ^~~~~~~
    glr-regr18.y:29.18-24: note: previous declaration
       29 | sym1: sym2 %merge<merge> { $$ = $1; } ;
          |                  ^~~~~~~
    glr-regr18.y:31.13-19: error: result type clash on merge function 'merge': <type3> != <type2>
       31 | sym3: %merge<merge> { $$ = 0; } ;
          |             ^~~~~~~
    glr-regr18.y:30.18-24: note: previous declaration
       30 | sym2: sym3 %merge<merge> { $$ = $1; } ;
          |                  ^~~~~~~

to

    glr-regr18.y:30.18-24: error: result type clash on merge function 'merge': <type2> != <type1>
       30 | sym2: sym3 %merge<merge> { $$ = $1; } ;
          |                  ^~~~~~~
    glr-regr18.y:29.18-24: note: previous declaration
       29 | sym1: sym2 %merge<merge> { $$ = $1; } ;
          |                  ^~~~~~~
    glr-regr18.y:31.13-19: error: result type clash on merge function 'merge': <type3> != <type1>
       31 | sym3: %merge<merge> { $$ = 0; } ;
          |             ^~~~~~~
    glr-regr18.y:29.18-24: note: previous declaration
       29 | sym1: sym2 %merge<merge> { $$ = $1; } ;
          |                  ^~~~~~~

where both duplicates are reported against definition 1, rather than
using definition 1 as a reference when diagnosing about definition 2,
and then 2 as a reference for 3.

* src/reader.c (record_merge_function_type): Keep the first definition.
* tests/glr-regression.at: Adjust.
2021-01-23 15:02:49 +01:00
Akim Demaille 1bac4ecc44 %merge: fix compatibility with api.value.type=union
Reported by Jot Dot.
https://lists.gnu.org/r/help-bison/2020-12/msg00014.html

* data/skeletons/glr.c, data/skeletons/glr2.cc (b4_call_merger): Use
the symbol's slot, not its type.
* examples/c/glr/c++-types.y: Use explicit per-symbol typing together
with api.value.type=union.
(yylex): Use yytoken_kind_t.
2021-01-23 15:02:49 +01:00
Akim Demaille 84b00b6bf0 %merge: delegate the generation of calls to mergers to m4
Don't generate C code from bison, leave that to the skeletons.

* src/output.c (merger_output): Emit invocations to b4_call_merger.
* data/skeletons/glr.c (b4_call_merger): New.
2021-01-23 15:02:49 +01:00
Akim Demaille a26f7cf98f %merge: let mergers record a typing-symbol, rather than a type
Symbols are richer than types, and in M4 it is my simpler (and more
common) to deal with symbols rather than types.  So let's associate
mergers to a symbol rather than a type name.

* src/reader.h (merger_list): Replace the 'type' member by a symbol
member.
* src/reader.c (record_merge_function_type): Take a symbol as
argument, rather than a type name.
* src/output.c (merger_output): Adjust.
2021-01-23 10:43:25 +01:00
Akim Demaille 0317055bb0 %merge: clearer tests on diagnostics
* tests/glr-regression.at: Use caret errors.
2021-01-23 10:43:25 +01:00
Akim Demaille c73dcd6958 skeletons: introduce "slot"s for symbols
Extracted from d9cf99b6a5, in the master
branch.

* data/skeletons/bison.m4 (b4_symbol_slot): New, with safer semantics
than type and type_tag.
2021-01-23 10:43:25 +01:00
Akim Demaille 11f6839645 style: YYUSE is private, make it YY_USE
This macro is not exposed to users, make start it with 'YY_'.

* data/skeletons/bison.m4, data/skeletons/c.m4, data/skeletons/glr.c,
* data/skeletons/glr.cc, data/skeletons/lalr1.cc,
* src/parse-gram.c, tests/actions.at, tests/c++.at, tests/headers.at,
* tests/local.at (YYUSE): Rename as...
(YY_USE): this.
2021-01-23 10:43:25 +01:00
Akim Demaille 4910c02579 package: codespell
* src/parse-gram.y: Fix spelling.
2021-01-23 10:43:25 +01:00
Akim Demaille 83bc889536 cex: fix traces: fix display of disabled items
The display of disabled state items is incorrect.  The item is
stuttered, and lacks on end-of-line.

From

    State 7:
        1 exp: exp • "⊕" exp
        ->     1 exp: exp "⊕" • exp
        <-     1 exp: • exp "⊕" exp

        2 exp: exp • "+" exp    2 exp: exp • "+" exp DISABLED
        2 exp: exp "+" exp •
        <-     2 exp: exp "+" • exp

        3 exp: exp • "+" exp    3 exp: exp • "+" exp DISABLED
        3 exp: exp "+" exp •
        <-     3 exp: exp "+" • exp

to

    State 7:
        1 exp: exp • "⊕" exp
        ->     1 exp: exp "⊕" • exp
        <-     1 exp: • exp "⊕" exp

        2 exp: exp • "+" exp  DISABLED

        2 exp: exp "+" exp •
        <-     2 exp: exp "+" • exp

        3 exp: exp • "+" exp  DISABLED

        3 exp: exp "+" exp •
        <-     3 exp: exp "+" • exp

* src/state-item.c (state_items_report): Don't issue disabled items
twice, and issue two '\n' at their end.
* tests/conflicts.at: Check it.
2021-01-23 10:43:04 +01:00
Akim Demaille 2f554e6260 cex: fix traces: add missing end-of-lines
In 430ca0fc63, I completely forgot that
`puts` adds a `\n`.

* src/lssi.c, src/state-item.c: Restore missing end-of-lines in the
output.
2021-01-23 10:42:52 +01:00
Akim Demaille 7a31b6bb7f cex: add support for $TIME_LIMIT
* src/counterexample.c (TIME_LIMIT): Replace with...
(time_limit): this.
(counterexample_init): Check $TIME_LIMIT.
* src/scan-gram.l: Reorder includes.
2021-01-23 09:40:32 +01:00
Akim Demaille 8320691a63 cex: send traces to stderr, not stdout
When comparing traces from different machines, the mixture of
stdout/stderr in the output are making things uselessly difficult.

* src/lssi.c, src/state-item.c: Output debug traces on stderr.
2021-01-23 09:39:27 +01:00
Akim Demaille 3b03c62e49 c++: I'm tired of Flex's warnings
* doc/bison.texi: Disable another warning I'm tired to see.
New releases would be most welcome.
2021-01-23 09:39:15 +01:00
Akim Demaille a700a13822 glr.cc: don't "leak" yyparse
When using glr.cc, the C function yyparse is an internal detail that
should not be exposed.  Users might call it by accident (I did).

* data/skeletons/glr.c (yyparse): When used for glr.cc, rename as yy_parse_impl.
* data/skeletons/glr.cc: Adjust.
2021-01-23 09:37:05 +01:00
Akim Demaille 1d3df34671 tables: avoid warnings and save bits
The yydefgoto table uses -1 as an invalid for an impossible case (we
never use yydefgoto[0], since it corresponds to the reduction to
$accept, which never happens).  Since yydefgoto is a table of state
numbers, this -1 forces a signed type uselessly, which (1) might
trigger compiler warnings when storing a value from yydefgoto into a
state number (nonnegative), and (2) wastes bits which might result in
using a int16 where a uint8 suffices.

Reported by Jot Dot <[email protected]>.
https://lists.gnu.org/r/bug-bison/2020-11/msg00027.html

* src/tables.c (default_goto): Use 0 rather than -1 as invalid value.
* tests/regression.at: Adjust.
2021-01-23 09:36:24 +01:00
Akim Demaille 89d2b69c1b c++: use noexcept where appropriate
Reported by Don Macpherson.
https://github.com/akimd/bison/issues/63
https://github.com/akimd/bison/issues/64

* data/skeletons/c++.m4, data/skeletons/lalr1.cc: here.
2021-01-23 09:28:01 +01:00
Martin RehakandAkim Demaille 1e0b087244 examples: avoid "unbound variable" errors
When the shell option `nounset` is set, we may get "unbound variable"
errors.
https://lists.gnu.org/r/bug-bison/2020-11/msg00013.html

* examples/test (diff_opts): Be sure to initialize it.
2021-01-23 09:27:30 +01:00
Akim Demaille 4744faf205 autoconf: update 2021-01-23 09:24:11 +01:00
Akim Demaille 1ac973aa56 c: adjust _Noreturn to pedantic clang
Reported by Joe Nelson <[email protected]>.
https://lists.gnu.org/r/help-bison/2021-01/msg00004.html
Fixed by Paul Eggert in gnulib.
https://lists.gnu.org/r/bug-gnulib/2021-01/msg00156.html

* data/skeletons/c.m4 (b4_attribute_define): Adjust _Noreturn to
pedantic clang.
2021-01-23 09:24:01 +01:00
Paul Eggert 8358090292 c: port to HP-UX 11.23
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.
2021-01-21 11:45:34 -08:00
Akim Demaille 0364dbacbf maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2020-11-14 12:26:42 +01:00
Akim Demaille 7a11a9308c version 3.7.4
* NEWS: Record release date.
2020-11-14 12:04:26 +01:00
Akim Demaille d8cc6b073e c++: shorten the assertions that check whether tokens are correct
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.
2020-11-13 06:17:52 +01:00
Akim Demaille 0264b4bca0 c++: don't glue functions together
* data/skeletons/bison.m4 (b4_type_foreach): Accept a separator.
* data/skeletons/c++.m4: Use it.
And fix an incorrect comment.
2020-11-13 06:17:52 +01:00
Akim Demaille 8b424b865e lalr1.cc: YY_ASSERT should use api.prefix
Working on the previous commit I realized that YY_ASSERT was used in
the generated headers, so must follow api.prefix to avoid clashes when
multiple C++ parser with variants are used.

Actually many more macros should obey api.prefix (YY_CPLUSPLUS,
YY_COPY, etc.).  There was no complaint so far, so it's not urgent
enough for 3.7.4, but it should be addressed in 3.8.

* data/skeletons/variant.hh (b4_assert): New.
Use it.
* tests/local.at (AT_YYLEX_RETURN): Fix.
* tests/headers.at: Make sure variant-based C++ parsers are checked
too.
This test did find that YY_ASSERT escaped renaming (before the fix in
this commit).
2020-11-13 06:17:52 +01:00
Akim Demaille f4431ea115 c++: don't use YY_ASSERT at all if parse.assert is disabled
In some extreme situations (about 800 tokens), we generate a
single-line assertion long enough for Visual C++ to discard the end of
the line, thus falling into parse ends for the missing `);`.  On a
shorter example:

    YY_ASSERT (tok == token::TOK_YYEOF || tok == token::TOK_YYerror || tok == token::TOK_YYUNDEF || tok == token::TOK_ASSIGN || tok == token::TOK_MINUS || tok == token::TOK_PLUS || tok == token::TOK_STAR || tok == token::TOK_SLASH || tok == token::TOK_LPAREN || tok == token::TOK_RPAREN);

Whether NDEBUG is used or not is irrelevant, the parser dies anyway.

Reported by Jot Dot <[email protected]>.
https://lists.gnu.org/r/bug-bison/2020-11/msg00002.html

We should avoid emitting lines so long.

We probably should also use a range-based assertion (with extraneous
parens to pacify fascist compilers):

    YY_ASSERT ((token::TOK_YYEOF <= tok && tok <= token::TOK_YYUNDEF)
               || (token::TOK_ASSIGN <= tok && ...)

But anyway, we should simply not emit this assertion at all when not
asked for.

* data/skeletons/variant.hh: Do not define, nor use, YY_ASSERT when it
is not enabled.
2020-11-13 06:17:52 +01:00
Akim Demaille fe8c36ddca c++: style: follow the Bison m4 quoting pattern
* data/skeletons/variant.hh: here.
2020-11-13 06:17:24 +01:00
Akim Demaille 21c147b6e5 yacc.c: provide the Bison version as an integral macro
Suggested by Balazs Scheidler.
https://github.com/akimd/bison/issues/55

* src/muscle-tab.c (muscle_init): Move/rename `b4_version` to/as...
* src/output.c (prepare): `b4_version_string`.
Also define `b4_version`.
* data/skeletons/bison.m4, data/skeletons/c.m4, data/skeletons/d.m4,
* data/skeletons/java.m4: Adjust.
* doc/bison.texi: Document it.
2020-11-11 09:08:57 +01:00
Akim Demaille d3c575a6c6 regen 2020-11-11 08:47:23 +01:00
Akim Demaille d8b49e2b73 style: make conversion of version string to int public
* src/parse-gram.y (str_to_version): Rename as/move to...
* src/strversion.h, src/strversion.c (strversion_to_int): these new
files.
2020-11-11 08:47:23 +01:00
Akim Demaille 14c65a35f0 %require: accept version numbers with three parts ("3.7.4")
* src/parse-gram.y (str_to_version): Support three parts.
* data/skeletons/location.cc, data/skeletons/stack.hh:
Adjust.
2020-11-11 08:47:23 +01:00
Todd C. MillerandAkim Demaille c47bb87f9f yacc.c: fix #definition of YYEMPTY
When generating a C parser, YYEMPTY is present in enum yytokentype but
there is no corresponding #define like there is for the other values.
There is a special case for YYEMPTY in b4_token_enums but no
corresponding case in b4_token_defines.

* data/skeletons/c.m4 (b4_token_defines): Do define YYEMPTY.
2020-11-11 08:47:21 +01:00
Akim Demaille 98c35e0025 gnulib: update 2020-11-10 07:56:13 +01:00
Akim Demaille bd6b046ce7 doc: fix incorrect section title
Reported by Gaurav Singh <[email protected]>.
https://lists.gnu.org/r/bug-bison/2020-11/msg00000.html

* doc/bison.texi (Rpcalc Expr): Rename as...
(Rpcalc Exp): this, as the nterm is named 'exp'.
2020-11-01 09:12:27 +01:00
Nick GassonandAkim Demaille 7c6e7bd300 doc: minor grammar fixes in counterexamples section
* doc/bison.texi: Minor fixes in counterexamples section.
2020-10-28 06:36:43 +01:00
Akim Demaille 3cba59dd7f doc: fix typo
* README: here.
2020-10-14 21:12:04 +02:00
Akim Demaille a15879c623 maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2020-10-13 07:23:28 +02:00
Akim Demaille 5d501ee728 version 3.7.3
* NEWS: Record release date.
2020-10-13 07:01:24 +02:00
Akim Demaille bc5e4541da build: don't link bison against libreadline
Reported by Paul Smith <[email protected]>.
https://lists.gnu.org/r/bug-bison/2020-10/msg00001.html

* src/local.mk (src_bison_LDADD): here.
2020-10-13 06:57:33 +02:00
Akim Demaille 567d1eaa19 gnulib: update 2020-10-13 06:46:06 +02:00
Akim Demaille c08e0863be glr.cc: fix: use symbol_name
* data/skeletons/glr.cc: here.
2020-09-27 09:22:02 +02:00
Akim Demaille 541943ee04 build: fix a concurrent build issue in examples
Reported by Thomas Deutschmann <[email protected]>.
https://lists.gnu.org/r/bug-bison/2020-09/msg00010.html

* examples/c/lexcalc/local.mk: scan.o depends on parse.[ch].
2020-09-06 10:08:22 +02:00
Akim Demaille dcdd119f69 maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2020-09-05 18:31:25 +02:00
244 changed files with 1233 additions and 619 deletions
+1 -1
View File
@@ -1 +1 @@
3.7.1 3.7.4
+1 -1
View File
@@ -24,7 +24,7 @@ and nasty bugs.
----- -----
Copyright (C) 1998-2015, 2018-2020 Free Software Foundation, Inc. Copyright (C) 1998-2015, 2018-2021 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler. This file is part of Bison, the GNU Compiler Compiler.
+1 -1
View File
@@ -26733,7 +26733,7 @@
----- -----
Copyright (C) 1987-1988, 1991-2015, 2018-2020 Free Software Copyright (C) 1987-1988, 1991-2015, 2018-2021 Free Software
Foundation, Inc. Foundation, Inc.
Copying and distribution of this file, with or without Copying and distribution of this file, with or without
+3 -2
View File
@@ -1,6 +1,6 @@
## Process this file with automake to produce Makefile.in. ## Process this file with automake to produce Makefile.in.
# Copyright (C) 2001-2015, 2018-2020 Free Software Foundation, Inc. # Copyright (C) 2001-2015, 2018-2021 Free Software Foundation, Inc.
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@@ -133,9 +133,10 @@ gen-ChangeLog:
$(CC) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -o $@ -E $< $(CC) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -o $@ -E $<
.PHONY: codespell .PHONY: codespell
CODESPELL = codespell
codespell: codespell:
$(AM_V_GEN) cd $(srcdir) \ $(AM_V_GEN) cd $(srcdir) \
&& codespell \ && $(CODESPELL) \
--regex "[\\w\\-'\`]+\+*" \ --regex "[\\w\\-'\`]+\+*" \
--ignore-words-list "ba,circularly,cloneable,copyable,define'd,dout,froms,iff,ifset,od,ois" \ --ignore-words-list "ba,circularly,cloneable,copyable,define'd,dout,froms,iff,ifset,od,ois" \
$$(git ls-files data doc lib src tests) $$(git ls-files data doc lib src tests)
+63 -1
View File
@@ -1,5 +1,67 @@
GNU Bison NEWS GNU Bison NEWS
* Noteworthy changes in release 3.7.5 (2021-01-24) [stable]
** Bug fixes
*** Counterexample Generation
In some cases counterexample generation could crash. This is fixed.
*** Fix Table Generation
In some very rare conditions, when there are many useless tokens, it was
possible to generate incorrect parsers.
*** GLR parsers now support %merge together with api.value.type=union.
*** C++ parsers use noexcept in more places.
*** Generated parsers avoid some warnings about signedness issues.
*** C-language parsers now avoid warnings from pedantic clang.
*** C-language parsers now work around quirks of HP-UX 11.23 (2003).
* Noteworthy changes in release 3.7.4 (2020-11-14) [stable]
** Bug fixes
*** Bug fixes in yacc.c
In Yacc mode, all the tokens are defined twice: once as an enum, and then
as a macro. YYEMPTY was missing its macro.
*** Bug fixes in lalr1.cc
The lalr1.cc skeleton used to emit internal assertions (using YY_ASSERT)
even when the `parse.assert` %define variable is not enabled. It no
longer does.
The private internal macro YY_ASSERT now obeys the `api.prefix` %define
variable.
When there is a very large number of tokens, some assertions could be long
enough to hit arbitrary limits in Visual C++. They have been rewritten to
work around this limitation.
** Changes
The YYBISON macro in generated "regular C parsers" (from the "yacc.c"
skeleton) used to be defined to 1. It is now defined to the version of
Bison as an integer (e.g., 30704 for version 3.7.4).
* Noteworthy changes in release 3.7.3 (2020-10-13) [stable]
** Bug fixes
Fix concurrent build issues.
The bison executable is no longer linked uselessly against libreadline.
Fix incorrect use of yytname in glr.cc.
* Noteworthy changes in release 3.7.2 (2020-09-05) [stable] * Noteworthy changes in release 3.7.2 (2020-09-05) [stable]
This release of Bison fixes all known bugs reported for Bison in MITRE's This release of Bison fixes all known bugs reported for Bison in MITRE's
@@ -4510,7 +4572,7 @@ mode: outline
fill-column: 76 fill-column: 76
End: End:
Copyright (C) 1995-2015, 2018-2020 Free Software Foundation, Inc. Copyright (C) 1995-2015, 2018-2021 Free Software Foundation, Inc.
This file is part of Bison, the GNU Parser Generator. This file is part of Bison, the GNU Parser Generator.
+1 -1
View File
@@ -36,7 +36,7 @@ to the bison package.
----- -----
Copyright (C) 2002, 2005, 2009-2015, 2018-2020 Free Software Foundation, Copyright (C) 2002, 2005, 2009-2015, 2018-2021 Free Software Foundation,
Inc. Inc.
This file is part of Bison, the GNU Compiler Compiler. This file is part of Bison, the GNU Compiler Compiler.
+2 -2
View File
@@ -27,7 +27,7 @@ Bison from the git repo. Roughly, run:
then proceed with the usual `configure && make` steps. then proceed with the usual `configure && make` steps.
## Build from tarball ## Build from tarball
See the [INSTALL file](INSTALL] for generic compilation and installation See the [INSTALL file](INSTALL) for generic compilation and installation
instructions. instructions.
Bison requires GNU m4 1.4.6 or later. See Bison requires GNU m4 1.4.6 or later. See
@@ -120,7 +120,7 @@ fill-column: 76
ispell-dictionary: "american" ispell-dictionary: "american"
End: End:
Copyright (C) 1992, 1998-1999, 2003-2005, 2008-2015, 2018-2020 Free Copyright (C) 1992, 1998-1999, 2003-2005, 2008-2015, 2018-2021 Free
Software Foundation, Inc. Software Foundation, Inc.
This file is part of GNU bison, the GNU Compiler Compiler. This file is part of GNU bison, the GNU Compiler Compiler.
+1 -1
View File
@@ -12,7 +12,7 @@ the problems you encounter.
----- -----
Copyright (C) 2002, 2004, 2009-2015, 2018-2020 Free Software Foundation, Copyright (C) 2002, 2004, 2009-2015, 2018-2021 Free Software Foundation,
Inc. Inc.
This file is part of GNU Bison. This file is part of GNU Bison.
+1 -1
View File
@@ -569,7 +569,7 @@ bootstrapped.
<!-- <!--
Copyright (C) 2002-2005, 2007-2015, 2018-2020 Free Software Foundation, Copyright (C) 2002-2005, 2007-2015, 2018-2021 Free Software Foundation,
Inc. Inc.
This file is part of GNU Bison. This file is part of GNU Bison.
+1 -1
View File
@@ -237,7 +237,7 @@ End:
----- -----
Copyright (C) 2000-2015, 2018-2020 Free Software Foundation, Inc. Copyright (C) 2000-2015, 2018-2021 Free Software Foundation, Inc.
This file is part of Bison, the GNU Parser Generator. This file is part of Bison, the GNU Parser Generator.
+1 -1
View File
@@ -877,7 +877,7 @@ fill-column: 76
ispell-dictionary: "american" ispell-dictionary: "american"
End: End:
Copyright (C) 2001-2004, 2006, 2008-2015, 2018-2020 Free Software Copyright (C) 2001-2004, 2006, 2008-2015, 2018-2021 Free Software
Foundation, Inc. Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler. This file is part of Bison, the GNU Compiler Compiler.
+1 -1
View File
@@ -1,6 +1,6 @@
# Bootstrap configuration. # Bootstrap configuration.
# Copyright (C) 2006-2015, 2018-2020 Free Software Foundation, Inc. # Copyright (C) 2006-2015, 2018-2021 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (C) 2012-2015, 2018-2020 Free Software Foundation, Inc. # Copyright (C) 2012-2015, 2018-2021 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (C) 2012-2015, 2018-2020 Free Software Foundation, Inc. # Copyright (C) 2012-2015, 2018-2021 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -2,7 +2,7 @@
# Generate a release announcement message. # Generate a release announcement message.
# Copyright (C) 2007-2020 Free Software Foundation, Inc. # Copyright (C) 2007-2021 Free Software Foundation, Inc.
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -1,4 +1,4 @@
## Copyright (C) 2000-2015, 2018-2020 Free Software Foundation, Inc. ## Copyright (C) 2000-2015, 2018-2021 Free Software Foundation, Inc.
## ##
## This program is free software: you can redistribute it and/or modify ## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by ## it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -3,7 +3,7 @@
# Update b4_copyright invocations or b4_copyright_years definitions to # Update b4_copyright invocations or b4_copyright_years definitions to
# include the current year. # include the current year.
# Copyright (C) 2009-2015, 2018-2020 Free Software Foundation, Inc. # Copyright (C) 2009-2015, 2018-2021 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -2,7 +2,7 @@
# In configure.ac, update PACKAGE_COPYRIGHT_YEAR to the current year. # In configure.ac, update PACKAGE_COPYRIGHT_YEAR to the current year.
# Copyright (C) 2010-2015, 2018-2020 Free Software Foundation, Inc. # Copyright (C) 2010-2015, 2018-2021 Free Software Foundation, Inc.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -2,7 +2,7 @@
# Update expectations in an Autotest test suite. # Update expectations in an Autotest test suite.
# Copyright (C) 2019-2020 Free Software Foundation, Inc. # Copyright (C) 2019-2021 Free Software Foundation, Inc.
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
+2 -1
View File
@@ -1,5 +1,5 @@
## Customize maint.mk -*- makefile -*- ## Customize maint.mk -*- makefile -*-
## Copyright (C) 2008-2015, 2018-2020 Free Software Foundation, Inc. ## Copyright (C) 2008-2015, 2018-2021 Free Software Foundation, Inc.
## This program is free software: you can redistribute it and/or modify ## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by ## it under the terms of the GNU General Public License as published by
@@ -156,6 +156,7 @@ exclude = \
$(call exclude, \ $(call exclude, \
bindtextdomain=^lib/main.c$$ \ bindtextdomain=^lib/main.c$$ \
cast_of_argument_to_free=^src/muscle-tab.c$$ \ cast_of_argument_to_free=^src/muscle-tab.c$$ \
copyright_check=gnulib/lib/version-etc.c$$ \
error_message_uppercase=etc/bench.pl.in$$ \ error_message_uppercase=etc/bench.pl.in$$ \
po_check=^tests|(^po/POTFILES.in|.md)$$ \ po_check=^tests|(^po/POTFILES.in|.md)$$ \
preprocessor_indentation=^data/|^lib/|^src/parse-gram.[ch]$$ \ preprocessor_indentation=^data/|^lib/|^src/parse-gram.[ch]$$ \
+2 -2
View File
@@ -1,6 +1,6 @@
# Configure template for GNU Bison. -*-Autoconf-*- # Configure template for GNU Bison. -*-Autoconf-*-
# #
# Copyright (C) 2001-2015, 2018-2020 Free Software Foundation, Inc. # Copyright (C) 2001-2015, 2018-2021 Free Software Foundation, Inc.
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@@ -29,7 +29,7 @@ AC_INIT([GNU Bison],
[[email protected]], [[email protected]],
[], [],
[https://www.gnu.org/software/bison/]) [https://www.gnu.org/software/bison/])
AC_SUBST([PACKAGE_COPYRIGHT_YEAR], [2020]) AC_SUBST([PACKAGE_COPYRIGHT_YEAR], [2021])
AC_DEFINE_UNQUOTED([PACKAGE_COPYRIGHT_YEAR], [$PACKAGE_COPYRIGHT_YEAR], AC_DEFINE_UNQUOTED([PACKAGE_COPYRIGHT_YEAR], [$PACKAGE_COPYRIGHT_YEAR],
[The copyright year for this package]) [The copyright year for this package])
+8 -2
View File
@@ -142,11 +142,17 @@ The macro `b4_symbol(NUM, FIELD)` gives access to the following FIELDS:
When api.value.type=union, the generated name for the union member. When api.value.type=union, the generated name for the union member.
yytype_INT etc. for symbols that has_id, otherwise yytype_1 etc. yytype_INT etc. for symbols that has_id, otherwise yytype_1 etc.
- `type` - `type`: string
If it has a semantic value, its type tag, or, if variant are used, If it has a semantic value, its type tag, or, if variant are used,
its type. its type.
In the case of api.value.type=union, type is the real type (e.g. int). In the case of api.value.type=union, type is the real type (e.g. int).
- `slot`: string
If it has a semantic value, the name of the union member (i.e., bounces to
either `type_tag` or `type`). It would be better to fix our mess and
always use `type` for the true type of the member, and `type_tag` for the
name of the union member.
- `has_printer`: 0, 1 - `has_printer`: 0, 1
- `printer`: string - `printer`: string
- `printer_file`: string - `printer_file`: string
@@ -187,7 +193,7 @@ fill-column: 76
ispell-dictionary: "american" ispell-dictionary: "american"
End: End:
Copyright (C) 2002, 2008-2015, 2018-2020 Free Software Foundation, Inc. Copyright (C) 2002, 2008-2015, 2018-2021 Free Software Foundation, Inc.
This file is part of GNU Bison. This file is part of GNU Bison.
+1 -1
View File
@@ -1,5 +1,5 @@
/* Default styling rules for Bison when doing terminal output. /* Default styling rules for Bison when doing terminal output.
Copyright (C) 2019-2020 Free Software Foundation, Inc. Copyright (C) 2019-2021 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -1,4 +1,4 @@
## Copyright (C) 2002, 2005-2015, 2018-2020 Free Software Foundation, ## Copyright (C) 2002, 2005-2015, 2018-2021 Free Software Foundation,
## Inc. ## Inc.
## This program is free software: you can redistribute it and/or modify ## This program is free software: you can redistribute it and/or modify
+20 -6
View File
@@ -2,7 +2,7 @@
# Language-independent M4 Macros for Bison. # Language-independent M4 Macros for Bison.
# Copyright (C) 2002, 2004-2015, 2018-2020 Free Software Foundation, # Copyright (C) 2002, 2004-2015, 2018-2021 Free Software Foundation,
# Inc. # Inc.
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
@@ -49,7 +49,7 @@ m4_define([m4_shift4], [m4_shift(m4_shift(m4_shift(m4_shift($@))))])
# b4_generated_by # b4_generated_by
# --------------- # ---------------
m4_define([b4_generated_by], m4_define([b4_generated_by],
[b4_comment([A Bison parser, made by GNU Bison b4_version.]) [b4_comment([A Bison parser, made by GNU Bison b4_version_string.])
]) ])
# b4_copyright(TITLE, [YEARS]) # b4_copyright(TITLE, [YEARS])
@@ -465,6 +465,19 @@ m4_case([$1],
# but are S_YYEMPTY and symbol_kind::S_YYEMPTY in C++. # but are S_YYEMPTY and symbol_kind::S_YYEMPTY in C++.
m4_copy([b4_symbol_kind_base], [b4_symbol_kind]) m4_copy([b4_symbol_kind_base], [b4_symbol_kind])
# b4_symbol_slot(NUM)
# -------------------
# The name of union member that contains the value of these symbols.
# Currently, we are messy, this should actually be type_tag, but type_tag
# has several meanings.
m4_define([b4_symbol_slot],
[m4_case(b4_percent_define_get([[api.value.type]]),
[union], [b4_symbol([$1], [type_tag])],
[variant], [b4_symbol([$1], [type_tag])],
[b4_symbol([$1], [type])])])
# b4_symbol(NUM, FIELD) # b4_symbol(NUM, FIELD)
# --------------------- # ---------------------
# Fetch FIELD of symbol #NUM (or "orig NUM"). Fail if undefined. # Fetch FIELD of symbol #NUM (or "orig NUM"). Fail if undefined.
@@ -475,6 +488,7 @@ m4_define([b4_symbol],
[id], [b4_symbol_token_kind([$1])], [id], [b4_symbol_token_kind([$1])],
[kind_base], [b4_symbol_kind_base([$1])], [kind_base], [b4_symbol_kind_base([$1])],
[kind], [b4_symbol_kind([$1])], [kind], [b4_symbol_kind([$1])],
[slot], [b4_symbol_slot([$1])],
[_b4_symbol($@)])]) [_b4_symbol($@)])])
@@ -537,7 +551,7 @@ m4_defn([b4_actions_])[]dnl
break; break;
}dnl }dnl
], ],
[YYUSE (m4_default([$2], [yykind]));])dnl [YY_USE (m4_default([$2], [yykind]));])dnl
m4_popdef([b4_actions_])dnl m4_popdef([b4_actions_])dnl
]) ])
@@ -633,11 +647,11 @@ m4_define([_b4_type_action],
])]) ])])
# b4_type_foreach(MACRO) # b4_type_foreach(MACRO, [SEP])
# ---------------------- # -----------------------------
# Invoke MACRO(SYMBOL-NUMS) for each set of SYMBOL-NUMS for each type set. # Invoke MACRO(SYMBOL-NUMS) for each set of SYMBOL-NUMS for each type set.
m4_define([b4_type_foreach], m4_define([b4_type_foreach],
[m4_map([$1], m4_defn([b4_type_names]))]) [m4_map_sep([$1], [$2], m4_defn([b4_type_names]))])
+1 -1
View File
@@ -2,7 +2,7 @@
# C++ skeleton dispatching for Bison. # C++ skeleton dispatching for Bison.
# Copyright (C) 2006-2007, 2009-2015, 2018-2020 Free Software # Copyright (C) 2006-2007, 2009-2015, 2018-2021 Free Software
# Foundation, Inc. # Foundation, Inc.
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
+7 -6
View File
@@ -2,7 +2,7 @@
# C++ skeleton for Bison # C++ skeleton for Bison
# Copyright (C) 2002-2020 Free Software Foundation, Inc. # Copyright (C) 2002-2021 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@@ -321,8 +321,9 @@ m4_define([b4_symbol_type_define],
/// Copy constructor. /// Copy constructor.
basic_symbol (const basic_symbol& that);]b4_variant_if([[ basic_symbol (const basic_symbol& that);]b4_variant_if([[
/// Constructor for valueless symbols, and symbols from each type. /// Constructors for typed symbols.
]b4_type_foreach([b4_basic_symbol_constructor_define])], [[ ]b4_type_foreach([b4_basic_symbol_constructor_define], [
])], [[
/// Constructor for valueless symbols. /// Constructor for valueless symbols.
basic_symbol (typename Base::kind_type t]b4_locations_if([, basic_symbol (typename Base::kind_type t]b4_locations_if([,
YY_MOVE_REF (location_type) l])[); YY_MOVE_REF (location_type) l])[);
@@ -339,7 +340,7 @@ m4_define([b4_symbol_type_define],
} }
/// Destroy contents, and record that is empty. /// Destroy contents, and record that is empty.
void clear () void clear () YY_NOEXCEPT
{]b4_variant_if([[ {]b4_variant_if([[
// User destructor. // User destructor.
symbol_kind_type yykind = this->kind (); symbol_kind_type yykind = this->kind ();
@@ -423,7 +424,7 @@ m4_define([b4_symbol_type_define],
by_kind (kind_type t); by_kind (kind_type t);
/// Record that this symbol is empty. /// Record that this symbol is empty.
void clear (); void clear () YY_NOEXCEPT;
/// Steal the symbol kind from \a that. /// Steal the symbol kind from \a that.
void move (by_kind& that); void move (by_kind& that);
@@ -543,7 +544,7 @@ m4_define([b4_public_types_define],
{} {}
]b4_inline([$1])[void ]b4_inline([$1])[void
]b4_parser_class[::by_kind::clear () ]b4_parser_class[::by_kind::clear () YY_NOEXCEPT
{ {
kind_ = ]b4_symbol(-2, kind)[; kind_ = ]b4_symbol(-2, kind)[;
} }
+1 -1
View File
@@ -2,7 +2,7 @@
# Common code for C-like languages (C, C++, Java, etc.) # Common code for C-like languages (C, C++, Java, etc.)
# Copyright (C) 2012-2015, 2018-2020 Free Software Foundation, Inc. # Copyright (C) 2012-2015, 2018-2021 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -2,7 +2,7 @@
# C skeleton dispatching for Bison. # C skeleton dispatching for Bison.
# Copyright (C) 2006-2007, 2009-2015, 2018-2020 Free Software # Copyright (C) 2006-2007, 2009-2015, 2018-2021 Free Software
# Foundation, Inc. # Foundation, Inc.
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
+36 -21
View File
@@ -2,7 +2,7 @@
# C M4 Macros for Bison. # C M4 Macros for Bison.
# Copyright (C) 2002, 2004-2015, 2018-2020 Free Software Foundation, # Copyright (C) 2002, 2004-2015, 2018-2021 Free Software Foundation,
# Inc. # Inc.
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
@@ -58,11 +58,11 @@ m4_define([b4_cpp_guard_close],
# b4_pull_flag if they use the values of the %define variables api.pure or # b4_pull_flag if they use the values of the %define variables api.pure or
# api.push-pull. # api.push-pull.
m4_define([b4_identification], m4_define([b4_identification],
[[/* Identify Bison output. */ [[/* Identify Bison output, and Bison version. */
#define YYBISON 1 #define YYBISON ]b4_version[
/* Bison version. */ /* Bison version string. */
#define YYBISON_VERSION "]b4_version[" #define YYBISON_VERSION "]b4_version_string["
/* Skeleton name. */ /* Skeleton name. */
#define YYSKELETON_NAME ]b4_skeleton[]m4_ifdef([b4_pure_flag], [[ #define YYSKELETON_NAME ]b4_skeleton[]m4_ifdef([b4_pure_flag], [[
@@ -160,11 +160,11 @@ m4_popdef([$1])dnl
# b4_parse_param_use([VAL], [LOC]) # b4_parse_param_use([VAL], [LOC])
# -------------------------------- # --------------------------------
# 'YYUSE' VAL, LOC if locations are enabled, and all the parse-params. # 'YY_USE' VAL, LOC if locations are enabled, and all the parse-params.
m4_define([b4_parse_param_use], m4_define([b4_parse_param_use],
[m4_ifvaln([$1], [ YYUSE ([$1]);])dnl [m4_ifvaln([$1], [ YY_USE ([$1]);])dnl
b4_locations_if([m4_ifvaln([$2], [ YYUSE ([$2]);])])dnl b4_locations_if([m4_ifvaln([$2], [ YY_USE ([$2]);])])dnl
b4_parse_param_for([Decl], [Formal], [ YYUSE (Formal); b4_parse_param_for([Decl], [Formal], [ YY_USE (Formal);
])dnl ])dnl
]) ])
@@ -242,6 +242,18 @@ typedef int_least16_t yytype_int16;
typedef short yytype_int16; typedef short yytype_int16;
#endif #endif
/* Work around bug in HP-UX 11.23, which defines these macros
incorrectly for preprocessor constants. This workaround can likely
be removed in 2023, as HPE has promised support for HP-UX 11.23
(aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
<https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
#ifdef __hpux
# undef UINT_LEAST8_MAX
# undef UINT_LEAST16_MAX
# define UINT_LEAST8_MAX 255
# define UINT_LEAST16_MAX 65535
#endif
#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
typedef __UINT_LEAST8_TYPE__ yytype_uint8; typedef __UINT_LEAST8_TYPE__ yytype_uint8;
#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
@@ -366,14 +378,16 @@ dnl use C' _Noreturn in C++, to avoid -Wc11-extensions warnings.
&& ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \ && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \
|| (defined _MSC_VER && 1900 <= _MSC_VER))) || (defined _MSC_VER && 1900 <= _MSC_VER)))
# define _Noreturn [[noreturn]] # define _Noreturn [[noreturn]]
# elif (!defined __cplusplus \ # elif ((!defined __cplusplus || defined __clang__) \
&& (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \
|| 4 < __GNUC__ + (7 <= __GNUC_MINOR__) \ || (!defined __STRICT_ANSI__ \
|| (defined __apple_build_version__ \ && (__4 < __GNUC__ + (7 <= __GNUC_MINOR__) \
? 6000000 <= __apple_build_version__ \ || (defined __apple_build_version__ \
: 3 < __clang_major__ + (5 <= __clang_minor__)))) ? 6000000 <= __apple_build_version__ \
: 3 < __clang_major__ + (5 <= __clang_minor__))))))
/* _Noreturn works as-is. */ /* _Noreturn works as-is. */
# elif 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C # elif (2 < __GNUC__ + (8 <= __GNUC_MINOR__) || defined __clang__ \
|| 0x5110 <= __SUNPRO_C)
# define _Noreturn __attribute__ ((__noreturn__)) # define _Noreturn __attribute__ ((__noreturn__))
# elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0) # elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0)
# define _Noreturn __declspec (noreturn) # define _Noreturn __declspec (noreturn)
@@ -384,9 +398,9 @@ dnl use C' _Noreturn in C++, to avoid -Wc11-extensions warnings.
]])[/* Suppress unused-variable warnings by "using" E. */ ]])[/* Suppress unused-variable warnings by "using" E. */
#if ! defined lint || defined __GNUC__ #if ! defined lint || defined __GNUC__
# define YYUSE(E) ((void) (E)) # define YY_USE(E) ((void) (E))
#else #else
# define YYUSE(E) /* empty */ # define YY_USE(E) /* empty */
#endif #endif
#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
@@ -509,10 +523,11 @@ m4_define([b4_token_define],
# ---------------- # ----------------
# Output the definition of the tokens. # Output the definition of the tokens.
m4_define([b4_token_defines], m4_define([b4_token_defines],
[b4_any_token_visible_if([/* Token kinds. */ [[/* Token kinds. */
m4_join([ #define ]b4_symbol([-2], [id])[ -2
]m4_join([
], b4_symbol_map([b4_token_define])) ], b4_symbol_map([b4_token_define]))
])]) ])
# b4_token_enum(TOKEN-NUM) # b4_token_enum(TOKEN-NUM)
+1 -1
View File
@@ -2,7 +2,7 @@
# D skeleton dispatching for Bison. # D skeleton dispatching for Bison.
# Copyright (C) 2018-2020 Free Software Foundation, Inc. # Copyright (C) 2018-2021 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
+5 -5
View File
@@ -2,7 +2,7 @@
# D language support for Bison # D language support for Bison
# Copyright (C) 2018-2020 Free Software Foundation, Inc. # Copyright (C) 2018-2021 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@@ -103,12 +103,12 @@ m4_define([b4_location_type_if],
# b4_identification # b4_identification
# ----------------- # -----------------
m4_define([b4_identification], m4_define([b4_identification],
[/** Version number for the Bison executable that generated this parser. */ [[/** Version number for the Bison executable that generated this parser. */
public static immutable string yy_bison_version = "b4_version"; public static immutable string yy_bison_version = "]b4_version_string[";
/** Name of the skeleton that generated this parser. */ /** Name of the skeleton that generated this parser. */
public static immutable string yy_bison_skeleton = b4_skeleton; public static immutable string yy_bison_skeleton = ]b4_skeleton[;
]) ]])
## ------------ ## ## ------------ ##
+22 -13
View File
@@ -1,8 +1,8 @@
-*- C -*- # -*- C -*-
# GLR skeleton for Bison # GLR skeleton for Bison
# Copyright (C) 2002-2015, 2018-2020 Free Software Foundation, Inc. # Copyright (C) 2002-2015, 2018-2021 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@@ -145,6 +145,15 @@ m4_define([b4_rhs_location],
[(b4_rhs_data([$1], [$2]).yyloc)]) [(b4_rhs_data([$1], [$2]).yyloc)])
# b4_call_merger(MERGER-NUM, MERGER-NAME, SYMBOL-SUM)
# ---------------------------------------------------
m4_define([b4_call_merger],
[b4_case([$1],
[ b4_symbol_if([$3], [has_type],
[yy0->b4_symbol($3, slot) = $2 (*yy0, *yy1);],
[*yy0 = $2 (*yy0, *yy1);])])])
## -------------- ## ## -------------- ##
## Declarations. ## ## Declarations. ##
## -------------- ## ## -------------- ##
@@ -188,7 +197,7 @@ b4_glr_cc_if([],
[b4_defines_if( [b4_defines_if(
[b4_output_begin([b4_spec_header_file]) [b4_output_begin([b4_spec_header_file])
b4_copyright([Skeleton interface for Bison GLR parsers in C], b4_copyright([Skeleton interface for Bison GLR parsers in C],
[2002-2015, 2018-2020])[ [2002-2015, 2018-2021])[
]b4_cpp_guard_open([b4_spec_mapped_header_file])[ ]b4_cpp_guard_open([b4_spec_mapped_header_file])[
]b4_shared_declarations[ ]b4_shared_declarations[
]b4_cpp_guard_close([b4_spec_mapped_header_file])[ ]b4_cpp_guard_close([b4_spec_mapped_header_file])[
@@ -202,7 +211,7 @@ b4_copyright([Skeleton interface for Bison GLR parsers in C],
b4_output_begin([b4_parser_file_name]) b4_output_begin([b4_parser_file_name])
b4_copyright([Skeleton implementation for Bison GLR parsers in C], b4_copyright([Skeleton implementation for Bison GLR parsers in C],
[2002-2015, 2018-2020])[ [2002-2015, 2018-2021])[
/* C GLR parser skeleton written by Paul Hilfinger. */ /* C GLR parser skeleton written by Paul Hilfinger. */
]b4_disclaimer[ ]b4_disclaimer[
@@ -215,7 +224,7 @@ b4_copyright([Skeleton implementation for Bison GLR parsers in C],
#define YYLTYPE ]b4_api_PREFIX[LTYPE]])])[ #define YYLTYPE ]b4_api_PREFIX[LTYPE]])])[
]m4_if(b4_prefix, [yy], [], ]m4_if(b4_prefix, [yy], [],
[[/* Substitute the variable and function names. */ [[/* Substitute the variable and function names. */
#define yyparse ]b4_prefix[parse #define ]b4_glr_cc_if([yy_parse_impl], [yyparse])[ ]b4_prefix[]b4_glr_cc_if([_parse_impl], [parse])[
#define yylex ]b4_prefix[lex #define yylex ]b4_prefix[lex
#define yyerror ]b4_prefix[error #define yyerror ]b4_prefix[error
#define yydebug ]b4_prefix[debug]]b4_pure_if([], [[ #define yydebug ]b4_prefix[debug]]b4_pure_if([], [[
@@ -875,7 +884,7 @@ yyuserAction (yyRuleNum yyn, int yyrhslen, yyGLRStackItem* yyvsp,
yybool yynormal YY_ATTRIBUTE_UNUSED = yystackp->yysplitPoint == YY_NULLPTR; yybool yynormal YY_ATTRIBUTE_UNUSED = yystackp->yysplitPoint == YY_NULLPTR;
int yylow; int yylow;
]b4_parse_param_use([yyvalp], [yylocp])dnl ]b4_parse_param_use([yyvalp], [yylocp])dnl
[ YYUSE (yyrhslen); [ YY_USE (yyrhslen);
# undef yyerrok # undef yyerrok
# define yyerrok (yystackp->yyerrState = 0) # define yyerrok (yystackp->yyerrState = 0)
# undef YYACCEPT # undef YYACCEPT
@@ -939,8 +948,8 @@ yyuserAction (yyRuleNum yyn, int yyrhslen, yyGLRStackItem* yyvsp,
static void static void
yyuserMerge (int yyn, YYSTYPE* yy0, YYSTYPE* yy1) yyuserMerge (int yyn, YYSTYPE* yy0, YYSTYPE* yy1)
{ {
YYUSE (yy0); YY_USE (yy0);
YYUSE (yy1); YY_USE (yy1);
switch (yyn) switch (yyn)
{ {
@@ -1795,8 +1804,8 @@ static YYRESULTTAG
yyreportAmbiguity (yySemanticOption* yyx0, yyreportAmbiguity (yySemanticOption* yyx0,
yySemanticOption* yyx1]b4_pure_formals[) yySemanticOption* yyx1]b4_pure_formals[)
{ {
YYUSE (yyx0); YY_USE (yyx0);
YYUSE (yyx1); YY_USE (yyx1);
#if ]b4_api_PREFIX[DEBUG #if ]b4_api_PREFIX[DEBUG
YY_FPRINTF ((stderr, "Ambiguity detected.\n")); YY_FPRINTF ((stderr, "Ambiguity detected.\n"));
@@ -2140,7 +2149,7 @@ yypcontext_token (const yyGLRStack *yystackp) YY_ATTRIBUTE_UNUSED;
static yysymbol_kind_t static yysymbol_kind_t
yypcontext_token (const yyGLRStack *yystackp) yypcontext_token (const yyGLRStack *yystackp)
{ {
YYUSE (yystackp); YY_USE (yystackp);
yysymbol_kind_t yytoken = yychar == ]b4_symbol(-2, id)[ ? ]b4_symbol(-2, kind)[ : YYTRANSLATE (yychar); yysymbol_kind_t yytoken = yychar == ]b4_symbol(-2, id)[ ? ]b4_symbol(-2, kind)[ : YYTRANSLATE (yychar);
return yytoken; return yytoken;
} }
@@ -2152,7 +2161,7 @@ yypcontext_location (const yyGLRStack *yystackp) YY_ATTRIBUTE_UNUSED;
static YYLTYPE * static YYLTYPE *
yypcontext_location (const yyGLRStack *yystackp) yypcontext_location (const yyGLRStack *yystackp)
{ {
YYUSE (yystackp); YY_USE (yystackp);
return &yylloc; return &yylloc;
}]])], }]])],
[detailed\|verbose], [detailed\|verbose],
@@ -2420,7 +2429,7 @@ yyrecoverSyntaxError (yyGLRStack* yystackp]b4_user_formals[)
`----------*/ `----------*/
int int
yyparse (]m4_ifset([b4_parse_param], [b4_formals(b4_parse_param)], [void])[) ]b4_glr_cc_if([yy_parse_impl], [yyparse])[ (]m4_ifset([b4_parse_param], [b4_formals(b4_parse_param)], [void])[)
{ {
int yyresult; int yyresult;
yyGLRStack yystack; yyGLRStack yystack;
+7 -7
View File
@@ -1,6 +1,6 @@
# C++ GLR skeleton for Bison # C++ GLR skeleton for Bison
# Copyright (C) 2002-2015, 2018-2020 Free Software Foundation, Inc. # Copyright (C) 2002-2015, 2018-2021 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@@ -144,7 +144,7 @@ m4_pushdef([b4_parse_param], m4_defn([b4_parse_param_orig]))dnl
int int
]b4_parser_class[::parse () ]b4_parser_class[::parse ()
{ {
return ::yyparse (*this]b4_user_args[); return ::yy_parse_impl (*this]b4_user_args[);
} }
#if ]b4_api_PREFIX[DEBUG #if ]b4_api_PREFIX[DEBUG
@@ -157,11 +157,11 @@ m4_pushdef([b4_parse_param], m4_defn([b4_parse_param_orig]))dnl
const semantic_type* yyvaluep]b4_locations_if([[, const semantic_type* yyvaluep]b4_locations_if([[,
const location_type* yylocationp]])[) const const location_type* yylocationp]])[) const
{]b4_locations_if([[ {]b4_locations_if([[
YYUSE (yylocationp);]])[ YY_USE (yylocationp);]])[
YYUSE (yyvaluep); YY_USE (yyvaluep);
std::ostream& yyo = debug_stream (); std::ostream& yyo = debug_stream ();
std::ostream& yyoutput = yyo; std::ostream& yyoutput = yyo;
YYUSE (yyoutput); YY_USE (yyoutput);
]b4_symbol_actions([printer])[ ]b4_symbol_actions([printer])[
} }
@@ -172,7 +172,7 @@ m4_pushdef([b4_parse_param], m4_defn([b4_parse_param_orig]))dnl
const location_type* yylocationp]])[) const const location_type* yylocationp]])[) const
{ {
*yycdebug_ << (yykind < YYNTOKENS ? "token" : "nterm") *yycdebug_ << (yykind < YYNTOKENS ? "token" : "nterm")
<< ' ' << yytname[yykind] << " ("]b4_locations_if([[ << ' ' << yysymbol_name (yykind) << " ("]b4_locations_if([[
<< *yylocationp << ": "]])[; << *yylocationp << ": "]])[;
yy_symbol_value_print_ (yykind, yyvaluep]b4_locations_if([[, yylocationp]])[); yy_symbol_value_print_ (yykind, yyvaluep]b4_locations_if([[, yylocationp]])[);
*yycdebug_ << ')'; *yycdebug_ << ')';
@@ -381,7 +381,7 @@ b4_percent_code_get([[requires]])[
]b4_defines_if( ]b4_defines_if(
[b4_output_begin([b4_spec_header_file]) [b4_output_begin([b4_spec_header_file])
b4_copyright([Skeleton interface for Bison GLR parsers in C++], b4_copyright([Skeleton interface for Bison GLR parsers in C++],
[2002-2015, 2018-2020])[ [2002-2015, 2018-2021])[
// C++ GLR parser skeleton written by Akim Demaille. // C++ GLR parser skeleton written by Akim Demaille.
]b4_disclaimer[ ]b4_disclaimer[
+1 -1
View File
@@ -2,7 +2,7 @@
# Java skeleton dispatching for Bison. # Java skeleton dispatching for Bison.
# Copyright (C) 2007, 2009-2015, 2018-2020 Free Software Foundation, # Copyright (C) 2007, 2009-2015, 2018-2021 Free Software Foundation,
# Inc. # Inc.
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
+5 -5
View File
@@ -2,7 +2,7 @@
# Java language support for Bison # Java language support for Bison
# Copyright (C) 2007-2015, 2018-2020 Free Software Foundation, Inc. # Copyright (C) 2007-2015, 2018-2021 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@@ -71,12 +71,12 @@ m4_define([b4_lexer_if],
# b4_identification # b4_identification
# ----------------- # -----------------
m4_define([b4_identification], m4_define([b4_identification],
[ /** Version number for the Bison executable that generated this parser. */ [[ /** Version number for the Bison executable that generated this parser. */
public static final String bisonVersion = "b4_version"; public static final String bisonVersion = "]b4_version_string[";
/** Name of the skeleton that generated this parser. */ /** Name of the skeleton that generated this parser. */
public static final String bisonSkeleton = b4_skeleton; public static final String bisonSkeleton = ]b4_skeleton[;
]) ]])
## ------------ ## ## ------------ ##
+7 -7
View File
@@ -1,6 +1,6 @@
# C++ skeleton for Bison # C++ skeleton for Bison
# Copyright (C) 2002-2015, 2018-2020 Free Software Foundation, Inc. # Copyright (C) 2002-2015, 2018-2021 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@@ -160,7 +160,7 @@ m4_ifdef([b4_lex_param], [, ]b4_lex_param))])])
m4_pushdef([b4_copyright_years], m4_pushdef([b4_copyright_years],
[2002-2015, 2018-2020]) [2002-2015, 2018-2021])
m4_define([b4_parser_class], m4_define([b4_parser_class],
[b4_percent_define_get([[api.parser.class]])]) [b4_percent_define_get([[api.parser.class]])])
@@ -271,9 +271,9 @@ m4_define([b4_shared_declarations],
{ {
public: public:
context (const ]b4_parser_class[& yyparser, const symbol_type& yyla); context (const ]b4_parser_class[& yyparser, const symbol_type& yyla);
const symbol_type& lookahead () const { return yyla_; } const symbol_type& lookahead () const YY_NOEXCEPT { return yyla_; }
symbol_kind_type token () const { return yyla_.kind (); }]b4_locations_if([[ symbol_kind_type token () const YY_NOEXCEPT { return yyla_.kind (); }]b4_locations_if([[
const location_type& location () const { return yyla_.location; } const location_type& location () const YY_NOEXCEPT { return yyla_.location; }
]])[ ]])[
/// Put in YYARG at most YYARGN of the expected tokens, and return the /// Put in YYARG at most YYARGN of the expected tokens, and return the
/// number of tokens stored in YYARG. If YYARG is null, return the /// number of tokens stored in YYARG. If YYARG is null, return the
@@ -597,7 +597,7 @@ m4_if(b4_prefix, [yy], [],
#else // !]b4_api_PREFIX[DEBUG #else // !]b4_api_PREFIX[DEBUG
# define YYCDEBUG if (false) std::cerr # define YYCDEBUG if (false) std::cerr
# define YY_SYMBOL_PRINT(Title, Symbol) YYUSE (Symbol) # define YY_SYMBOL_PRINT(Title, Symbol) YY_USE (Symbol)
# define YY_REDUCE_PRINT(Rule) static_cast<void> (0) # define YY_REDUCE_PRINT(Rule) static_cast<void> (0)
# define YY_STACK_PRINT() static_cast<void> (0) # define YY_STACK_PRINT() static_cast<void> (0)
@@ -736,7 +736,7 @@ m4_if(b4_prefix, [yy], [],
]b4_parser_class[::yy_print_ (std::ostream& yyo, const basic_symbol<Base>& yysym) const ]b4_parser_class[::yy_print_ (std::ostream& yyo, const basic_symbol<Base>& yysym) const
{ {
std::ostream& yyoutput = yyo; std::ostream& yyoutput = yyo;
YYUSE (yyoutput); YY_USE (yyoutput);
if (yysym.empty ()) if (yysym.empty ())
yyo << "empty symbol"; yyo << "empty symbol";
else else
+2 -2
View File
@@ -1,6 +1,6 @@
# D skeleton for Bison -*- autoconf -*- # D skeleton for Bison -*- autoconf -*-
# Copyright (C) 2007-2012, 2019-2020 Free Software Foundation, Inc. # Copyright (C) 2007-2012, 2019-2021 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ m4_include(b4_skeletonsdir/[d.m4])
b4_output_begin([b4_parser_file_name]) b4_output_begin([b4_parser_file_name])
b4_copyright([Skeleton implementation for Bison LALR(1) parsers in D], b4_copyright([Skeleton implementation for Bison LALR(1) parsers in D],
[2007-2012, 2019-2020])[ [2007-2012, 2019-2021])[
]b4_disclaimer[ ]b4_disclaimer[
]b4_percent_define_ifdef([package], [module b4_percent_define_get([package]); ]b4_percent_define_ifdef([package], [module b4_percent_define_get([package]);
])[ ])[
+2 -2
View File
@@ -1,6 +1,6 @@
# Java skeleton for Bison -*- autoconf -*- # Java skeleton for Bison -*- autoconf -*-
# Copyright (C) 2007-2015, 2018-2020 Free Software Foundation, Inc. # Copyright (C) 2007-2015, 2018-2021 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@@ -78,7 +78,7 @@ m4_define([b4_define_state],[[
]b4_output_begin([b4_parser_file_name])[ ]b4_output_begin([b4_parser_file_name])[
]b4_copyright([Skeleton implementation for Bison LALR(1) parsers in Java], ]b4_copyright([Skeleton implementation for Bison LALR(1) parsers in Java],
[2007-2015, 2018-2020])[ [2007-2015, 2018-2021])[
]b4_disclaimer[ ]b4_disclaimer[
]b4_percent_define_ifdef([api.package], [package b4_percent_define_get([api.package]);[ ]b4_percent_define_ifdef([api.package], [package b4_percent_define_get([api.package]);[
]])[ ]])[
+3 -3
View File
@@ -1,6 +1,6 @@
# C++ skeleton for Bison # C++ skeleton for Bison
# Copyright (C) 2002-2015, 2018-2020 Free Software Foundation, Inc. # Copyright (C) 2002-2015, 2018-2021 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@@ -16,13 +16,13 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
m4_pushdef([b4_copyright_years], m4_pushdef([b4_copyright_years],
[2002-2015, 2018-2020]) [2002-2015, 2018-2021])
# b4_position_file # b4_position_file
# ---------------- # ----------------
# Name of the file containing the position class, if we want this file. # Name of the file containing the position class, if we want this file.
b4_defines_if([b4_required_version_if([302], [], b4_defines_if([b4_required_version_if([30200], [],
[m4_define([b4_position_file], [position.hh])])])]) [m4_define([b4_position_file], [position.hh])])])])
+2 -2
View File
@@ -1,6 +1,6 @@
# C++ skeleton for Bison # C++ skeleton for Bison
# Copyright (C) 2002-2015, 2018-2020 Free Software Foundation, Inc. # Copyright (C) 2002-2015, 2018-2021 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@
# b4_stack_file # b4_stack_file
# ------------- # -------------
# Name of the file containing the stack class, if we want this file. # Name of the file containing the stack class, if we want this file.
b4_defines_if([b4_required_version_if([302], [], b4_defines_if([b4_required_version_if([30200], [],
[m4_define([b4_stack_file], [stack.hh])])]) [m4_define([b4_stack_file], [stack.hh])])])
+102 -42
View File
@@ -1,6 +1,6 @@
# C++ skeleton for Bison # C++ skeleton for Bison
# Copyright (C) 2002-2015, 2018-2020 Free Software Foundation, Inc. # Copyright (C) 2002-2015, 2018-2021 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@@ -20,6 +20,13 @@
## variant. ## ## variant. ##
## --------- ## ## --------- ##
# b4_assert
# ---------
# The name of YY_ASSERT.
m4_define([b4_assert],
[b4_api_PREFIX[]_ASSERT])
# b4_symbol_variant(YYTYPE, YYVAL, ACTION, [ARGS]) # b4_symbol_variant(YYTYPE, YYVAL, ACTION, [ARGS])
# ------------------------------------------------ # ------------------------------------------------
# Run some ACTION ("build", or "destroy") on YYVAL of symbol type # Run some ACTION ("build", or "destroy") on YYVAL of symbol type
@@ -71,12 +78,12 @@ m4_map([ b4_symbol_tag_comment], [$@])dnl
# ------------------- # -------------------
# The needed includes for variants support. # The needed includes for variants support.
m4_define([b4_variant_includes], m4_define([b4_variant_includes],
[b4_parse_assert_if([[#include <typeinfo>]])[ [b4_parse_assert_if([[#include <typeinfo>
#ifndef YY_ASSERT #ifndef ]b4_assert[
# include <cassert> # include <cassert>
# define YY_ASSERT assert # define ]b4_assert[ assert
#endif #endif
]]) ]])])
@@ -110,8 +117,8 @@ m4_define([b4_value_type_declare],
template <typename T> template <typename T>
semantic_type (YY_RVREF (T) t)]b4_parse_assert_if([ semantic_type (YY_RVREF (T) t)]b4_parse_assert_if([
: yytypeid_ (&typeid (T))])[ : yytypeid_ (&typeid (T))])[
{ {]b4_parse_assert_if([[
YY_ASSERT (sizeof (T) <= size); ]b4_assert[ (sizeof (T) <= size);]])[
new (yyas_<T> ()) T (YY_MOVE (t)); new (yyas_<T> ()) T (YY_MOVE (t));
} }
@@ -125,7 +132,7 @@ m4_define([b4_value_type_declare],
/// Destruction, allowed only if empty. /// Destruction, allowed only if empty.
~semantic_type () YY_NOEXCEPT ~semantic_type () YY_NOEXCEPT
{]b4_parse_assert_if([ {]b4_parse_assert_if([
YY_ASSERT (!yytypeid_); ]b4_assert[ (!yytypeid_);
])[} ])[}
# if 201103L <= YY_CPLUSPLUS # if 201103L <= YY_CPLUSPLUS
@@ -133,10 +140,10 @@ m4_define([b4_value_type_declare],
template <typename T, typename... U> template <typename T, typename... U>
T& T&
emplace (U&&... u) emplace (U&&... u)
{]b4_parse_assert_if([ {]b4_parse_assert_if([[
YY_ASSERT (!yytypeid_); ]b4_assert[ (!yytypeid_);
YY_ASSERT (sizeof (T) <= size); ]b4_assert[ (sizeof (T) <= size);
yytypeid_ = & typeid (T);])[ yytypeid_ = & typeid (T);]])[
return *new (yyas_<T> ()) T (std::forward <U>(u)...); return *new (yyas_<T> ()) T (std::forward <U>(u)...);
} }
# else # else
@@ -144,10 +151,10 @@ m4_define([b4_value_type_declare],
template <typename T> template <typename T>
T& T&
emplace () emplace ()
{]b4_parse_assert_if([ {]b4_parse_assert_if([[
YY_ASSERT (!yytypeid_); ]b4_assert[ (!yytypeid_);
YY_ASSERT (sizeof (T) <= size); ]b4_assert[ (sizeof (T) <= size);
yytypeid_ = & typeid (T);])[ yytypeid_ = & typeid (T);]])[
return *new (yyas_<T> ()) T (); return *new (yyas_<T> ()) T ();
} }
@@ -155,10 +162,10 @@ m4_define([b4_value_type_declare],
template <typename T> template <typename T>
T& T&
emplace (const T& t) emplace (const T& t)
{]b4_parse_assert_if([ {]b4_parse_assert_if([[
YY_ASSERT (!yytypeid_); ]b4_assert[ (!yytypeid_);
YY_ASSERT (sizeof (T) <= size); ]b4_assert[ (sizeof (T) <= size);
yytypeid_ = & typeid (T);])[ yytypeid_ = & typeid (T);]])[
return *new (yyas_<T> ()) T (t); return *new (yyas_<T> ()) T (t);
} }
# endif # endif
@@ -185,10 +192,10 @@ m4_define([b4_value_type_declare],
template <typename T> template <typename T>
T& T&
as () YY_NOEXCEPT as () YY_NOEXCEPT
{]b4_parse_assert_if([ {]b4_parse_assert_if([[
YY_ASSERT (yytypeid_); ]b4_assert[ (yytypeid_);
YY_ASSERT (*yytypeid_ == typeid (T)); ]b4_assert[ (*yytypeid_ == typeid (T));
YY_ASSERT (sizeof (T) <= size);])[ ]b4_assert[ (sizeof (T) <= size);]])[
return *yyas_<T> (); return *yyas_<T> ();
} }
@@ -196,10 +203,10 @@ m4_define([b4_value_type_declare],
template <typename T> template <typename T>
const T& const T&
as () const YY_NOEXCEPT as () const YY_NOEXCEPT
{]b4_parse_assert_if([ {]b4_parse_assert_if([[
YY_ASSERT (yytypeid_); ]b4_assert[ (yytypeid_);
YY_ASSERT (*yytypeid_ == typeid (T)); ]b4_assert[ (*yytypeid_ == typeid (T));
YY_ASSERT (sizeof (T) <= size);])[ ]b4_assert[ (sizeof (T) <= size);]])[
return *yyas_<T> (); return *yyas_<T> ();
} }
@@ -214,9 +221,9 @@ m4_define([b4_value_type_declare],
template <typename T> template <typename T>
void void
swap (self_type& that) YY_NOEXCEPT swap (self_type& that) YY_NOEXCEPT
{]b4_parse_assert_if([ {]b4_parse_assert_if([[
YY_ASSERT (yytypeid_); ]b4_assert[ (yytypeid_);
YY_ASSERT (*yytypeid_ == *that.yytypeid_);])[ ]b4_assert[ (*yytypeid_ == *that.yytypeid_);]])[
std::swap (as<T> (), that.as<T> ()); std::swap (as<T> (), that.as<T> ());
} }
@@ -388,11 +395,67 @@ m4_define([_b4_token_maker_define],
])]) ])])
m4_define([_b4_type_clause], # b4_token_kind(SYMBOL-NUM)
[b4_symbol_if([$1], [is_token], # -------------------------
[b4_symbol_if([$1], [has_id], # Some tokens don't have an ID.
[tok == token::b4_symbol([$1], [id])], m4_define([b4_token_kind],
[tok == b4_symbol([$1], [code])])])]) [b4_symbol_if([$1], [has_id],
[token::b4_symbol([$1], [id])],
[b4_symbol([$1], [code])])])
# _b4_tok_in(SYMBOL-NUM, ...)
# ---------------------------
# See b4_tok_in below. The SYMBOL-NUMs... are tokens only.
#
# We iterate over the tokens to group them by "range" of token numbers (not
# symbols numbers!).
#
# b4_fst is the start of that range.
# b4_prev is the previous value.
# b4_val is the current value.
# If b4_val is the successor of b4_prev in token numbers, update the latter,
# otherwise emit the code for range b4_fst .. b4_prev.
# $1 is also used as a terminator in the foreach, but it will not be printed.
#
m4_define([_b4_tok_in],
[m4_pushdef([b4_prev], [$1])dnl
m4_pushdef([b4_fst], [$1])dnl
m4_pushdef([b4_sep], [])dnl
m4_foreach([b4_val], m4_dquote(m4_shift($@, $1)),
[m4_if(b4_symbol(b4_val, [code]), m4_eval(b4_symbol(b4_prev, [code]) + 1), [],
[b4_sep[]m4_if(b4_fst, b4_prev,
[tok == b4_token_kind(b4_fst)],
[(b4_token_kind(b4_fst) <= tok && tok <= b4_token_kind(b4_prev))])[]dnl
m4_define([b4_fst], b4_val)dnl
m4_define([b4_sep], [
|| ])])dnl
m4_define([b4_prev], b4_val)])dnl
m4_popdef([b4_sep])dnl
m4_popdef([b4_fst])dnl
m4_popdef([b4_prev])dnl
])
# _b4_filter_tokens(SYMBOL-NUM, ...)
# ----------------------------------
# Expand as the list of tokens amongst SYMBOL-NUM.
m4_define([_b4_filter_tokens],
[m4_pushdef([b4_sep])dnl
m4_foreach([b4_val], [$@],
[b4_symbol_if(b4_val, [is_token], [b4_sep[]b4_val[]m4_define([b4_sep], [,])])])dnl
m4_popdef([b4_sep])dnl
])
# b4_tok_in(SYMBOL-NUM, ...)
# ---------------------------
# A C++ conditional that checks that `tok` is a member of this list of symbol
# numbers.
m4_define([b4_tok_in],
[_$0(_b4_filter_tokens($@))])
# _b4_token_constructor_define(SYMBOL-NUM...) # _b4_token_constructor_define(SYMBOL-NUM...)
@@ -410,9 +473,6 @@ m4_define([_b4_token_constructor_define],
: super_type(]b4_join([token_type (tok)], : super_type(]b4_join([token_type (tok)],
b4_symbol_if([$1], [has_type], [std::move (v)]), b4_symbol_if([$1], [has_type], [std::move (v)]),
b4_locations_if([std::move (l)]))[) b4_locations_if([std::move (l)]))[)
{
YY_ASSERT (]m4_join([ || ], m4_map_sep([_b4_type_clause], [, ], [$@]))[);
}
#else #else
symbol_type (]b4_join( symbol_type (]b4_join(
[int tok], [int tok],
@@ -422,10 +482,10 @@ m4_define([_b4_token_constructor_define],
: super_type(]b4_join([token_type (tok)], : super_type(]b4_join([token_type (tok)],
b4_symbol_if([$1], [has_type], [v]), b4_symbol_if([$1], [has_type], [v]),
b4_locations_if([l]))[) b4_locations_if([l]))[)
{
YY_ASSERT (]m4_join([ || ], m4_map_sep([_b4_type_clause], [, ], [$@]))[);
}
#endif #endif
{]b4_parse_assert_if([[
]b4_assert[ (]b4_tok_in($@)[);
]])[}
]])]) ]])])
+2 -2
View File
@@ -1,11 +1,11 @@
# -*- C -*- # -*- C -*-
# Yacc compatible skeleton for Bison # Yacc compatible skeleton for Bison
# Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software # Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software
# Foundation, Inc. # Foundation, Inc.
m4_pushdef([b4_copyright_years], m4_pushdef([b4_copyright_years],
[1984, 1989-1990, 2000-2015, 2018-2020]) [1984, 1989-1990, 2000-2015, 2018-2021])
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -3,7 +3,7 @@
<!-- <!--
bison.xsl - common templates for Bison XSLT. bison.xsl - common templates for Bison XSLT.
Copyright (C) 2007-2015, 2018-2020 Free Software Foundation, Inc. Copyright (C) 2007-2015, 2018-2021 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler. This file is part of Bison, the GNU Compiler Compiler.
+1 -1
View File
@@ -3,7 +3,7 @@
<!-- <!--
xml2dot.xsl - transform Bison XML Report into DOT. xml2dot.xsl - transform Bison XML Report into DOT.
Copyright (C) 2007-2015, 2018-2020 Free Software Foundation, Inc. Copyright (C) 2007-2015, 2018-2021 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler. This file is part of Bison, the GNU Compiler Compiler.
+1 -1
View File
@@ -3,7 +3,7 @@
<!-- <!--
xml2text.xsl - transform Bison XML Report into plain text. xml2text.xsl - transform Bison XML Report into plain text.
Copyright (C) 2007-2015, 2018-2020 Free Software Foundation, Inc. Copyright (C) 2007-2015, 2018-2021 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler. This file is part of Bison, the GNU Compiler Compiler.
+1 -1
View File
@@ -3,7 +3,7 @@
<!-- <!--
xml2html.xsl - transform Bison XML Report into XHTML. xml2html.xsl - transform Bison XML Report into XHTML.
Copyright (C) 2007-2015, 2018-2020 Free Software Foundation, Inc. Copyright (C) 2007-2015, 2018-2021 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler. This file is part of Bison, the GNU Compiler Compiler.
+34 -19
View File
@@ -173,7 +173,7 @@
This manual (@value{UPDATED}) is for GNU Bison (version @value{VERSION}), This manual (@value{UPDATED}) is for GNU Bison (version @value{VERSION}),
the GNU parser generator. the GNU parser generator.
Copyright @copyright{} 1988--1993, 1995, 1998--2015, 2018--2020 Free Copyright @copyright{} 1988--1993, 1995, 1998--2015, 2018--2021 Free
Software Foundation, Inc. Software Foundation, Inc.
@quotation @quotation
@@ -303,7 +303,7 @@ Grammar Rules for @code{rpcalc}
* Rpcalc Input:: Explanation of the @code{input} nonterminal * Rpcalc Input:: Explanation of the @code{input} nonterminal
* Rpcalc Line:: Explanation of the @code{line} nonterminal * Rpcalc Line:: Explanation of the @code{line} nonterminal
* Rpcalc Expr:: Explanation of the @code{expr} nonterminal * Rpcalc Exp:: Explanation of the @code{exp} nonterminal
Location Tracking Calculator: @code{ltcalc} Location Tracking Calculator: @code{ltcalc}
@@ -1663,7 +1663,7 @@ after @samp{//}.
@example @example
/* Parser for rpcalc. -*- C -*- /* Parser for rpcalc. -*- C -*-
Copyright (C) 1988-1993, 1995, 1998-2015, 2018-2020 Free Software Copyright (C) 1988-1993, 1995, 1998-2015, 2018-2021 Free Software
Foundation, Inc. Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler. This file is part of Bison, the GNU Compiler Compiler.
@@ -1788,7 +1788,7 @@ rule are referred to as @code{$1}, @code{$2}, and so on.
@menu @menu
* Rpcalc Input:: Explanation of the @code{input} nonterminal * Rpcalc Input:: Explanation of the @code{input} nonterminal
* Rpcalc Line:: Explanation of the @code{line} nonterminal * Rpcalc Line:: Explanation of the @code{line} nonterminal
* Rpcalc Expr:: Explanation of the @code{expr} nonterminal * Rpcalc Exp:: Explanation of the @code{exp} nonterminal
@end menu @end menu
@node Rpcalc Input @node Rpcalc Input
@@ -1853,8 +1853,8 @@ uninitialized (its value will be unpredictable). This would be a bug if
that value were ever used, but we don't use it: once rpcalc has printed the that value were ever used, but we don't use it: once rpcalc has printed the
value of the user's input line, that value is no longer needed. value of the user's input line, that value is no longer needed.
@node Rpcalc Expr @node Rpcalc Exp
@subsubsection Explanation of @code{expr} @subsubsection Explanation of @code{exp}
The @code{exp} grouping has several rules, one for each kind of expression. The @code{exp} grouping has several rules, one for each kind of expression.
The first rule handles the simplest expressions: those that are just The first rule handles the simplest expressions: those that are just
@@ -2549,7 +2549,7 @@ Here are the C and Bison declarations for the multi-function calculator.
@example @example
/* Parser for mfcalc. -*- C -*- /* Parser for mfcalc. -*- C -*-
Copyright (C) 1988-1993, 1995, 1998-2015, 2018-2020 Free Software Copyright (C) 1988-1993, 1995, 1998-2015, 2018-2021 Free Software
Foundation, Inc. Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler. This file is part of Bison, the GNU Compiler Compiler.
@@ -2678,7 +2678,7 @@ provides for either functions or variables to be placed in the table.
@example @example
/* Functions for mfcalc. -*- C -*- /* Functions for mfcalc. -*- C -*-
Copyright (C) 1988-1993, 1995, 1998-2015, 2018-2020 Free Software Copyright (C) 1988-1993, 1995, 1998-2015, 2018-2021 Free Software
Foundation, Inc. Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler. This file is part of Bison, the GNU Compiler Compiler.
@@ -9945,10 +9945,11 @@ very documentation. To solve a conflict, one must understand it: when does
it occur? Is it because of a flaw in the grammar? Is it rather because it occur? Is it because of a flaw in the grammar? Is it rather because
LR(1) cannot cope with this grammar? LR(1) cannot cope with this grammar?
On difficulty is that conflicts occur in the @emph{automaton}, and it can be One difficulty is that conflicts occur in the @emph{automaton}, and it can
tricky to related them to issues in the @emph{grammar} itself. With be tricky to relate them to issues in the @emph{grammar} itself. With
experience and patience, analysis the detailed description of the automaton experience and patience, analysis of the detailed description of the
(@pxref{Understanding}) allows to find example strings that reach these conflicts. automaton (@pxref{Understanding}) allows one to find example strings that
reach these conflicts.
That task is made much easier thanks to the generation of counterexamples, That task is made much easier thanks to the generation of counterexamples,
initially developed by Chinawat Isradisaikul and Andrew Myers initially developed by Chinawat Isradisaikul and Andrew Myers
@@ -10101,7 +10102,7 @@ sequence.y:8.3-45: @dwarning{warning}: rule useless in parser due to conflicts [
Each of these three conflicts, again, prove that the grammar is ambiguous. Each of these three conflicts, again, prove that the grammar is ambiguous.
For instance, the second conflict (the reduce/reduce one) shows that the For instance, the second conflict (the reduce/reduce one) shows that the
grammar accept the empty input in two different ways. grammar accepts the empty input in two different ways.
@sp 1 @sp 1
@@ -11987,7 +11988,7 @@ generate C++.
@example @example
/* Simple variant-based parser. -*- C++ -*- /* Simple variant-based parser. -*- C++ -*-
Copyright (C) 2018-2020 Free Software Foundation, Inc. Copyright (C) 2018-2021 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler. This file is part of Bison, the GNU Compiler Compiler.
@@ -13083,7 +13084,7 @@ library components, and the declaration of the parser class.
@example @example
/* Driver for calc++. -*- C++ -*- /* Driver for calc++. -*- C++ -*-
Copyright (C) 2005--2015, 2018--2020 Free Software Foundation, Inc. Copyright (C) 2005-2015, 2018-2021 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler. This file is part of Bison, the GNU Compiler Compiler.
@@ -13179,7 +13180,7 @@ The implementation of the driver (@file{driver.cc}) is straightforward.
@example @example
/* Driver for calc++. -*- C++ -*- /* Driver for calc++. -*- C++ -*-
Copyright (C) 2005--2015, 2018--2020 Free Software Foundation, Inc. Copyright (C) 2005-2015, 2018-2021 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler. This file is part of Bison, the GNU Compiler Compiler.
@@ -13246,7 +13247,7 @@ designed the grammar for.
@example @example
/* Parser for calc++. -*- C++ -*- /* Parser for calc++. -*- C++ -*-
Copyright (C) 2005--2015, 2018--2020 Free Software Foundation, Inc. Copyright (C) 2005-2015, 2018-2021 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler. This file is part of Bison, the GNU Compiler Compiler.
@@ -13458,7 +13459,7 @@ then the parser's to get the set of defined tokens.
@example @example
/* Scanner for calc++. -*- C++ -*- /* Scanner for calc++. -*- C++ -*-
Copyright (C) 2005--2015, 2018--2020 Free Software Foundation, Inc. Copyright (C) 2005-2015, 2018-2021 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler. This file is part of Bison, the GNU Compiler Compiler.
@@ -13554,6 +13555,14 @@ then the parser's to get the set of defined tokens.
# pragma GCC diagnostic ignored "-Wsign-conversion" # pragma GCC diagnostic ignored "-Wsign-conversion"
# endif # endif
#endif #endif
// Flex 2.6.4, GCC 9
// warning: useless cast to type 'int' [-Wuseless-cast]
// 1361 | YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
// | ^
#if defined GCC_VERSION && 900 <= GCC_VERSION
# pragma GCC diagnostic ignored "-Wuseless-cast"
#endif
%@} %@}
@end example @end example
@end ignore @end ignore
@@ -13705,7 +13714,7 @@ The top level file, @file{calc++.cc}, poses no problem.
@example @example
/* Main for calc++. -*- C++ -*- /* Main for calc++. -*- C++ -*-
Copyright (C) 2005--2015, 2018--2020 Free Software Foundation, Inc. Copyright (C) 2005-2015, 2018-2021 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler. This file is part of Bison, the GNU Compiler Compiler.
@@ -15433,6 +15442,12 @@ Macro to discard a value from the parser stack and fake a lookahead
token. @xref{Action Features}. token. @xref{Action Features}.
@end deffn @end deffn
@deffn {Macro} YYBISON
The version of Bison as an integer, for instance 30704 for version 3.7.4.
Defined in @file{yacc.c} only. Before version 3.7.4, @code{YYBISON} was
defined to 1.
@end deffn
@deffn {Variable} yychar @deffn {Variable} yychar
External integer variable that contains the integer value of the External integer variable that contains the integer value of the
lookahead token. (In a pure parser, it is a local variable within lookahead token. (In a pure parser, it is a local variable within
+1 -1
View File
@@ -1,4 +1,4 @@
## Copyright (C) 2001-2003, 2005-2015, 2018-2020 Free Software ## Copyright (C) 2001-2003, 2005-2015, 2018-2021 Free Software
## Foundation, Inc. ## Foundation, Inc.
## This program is free software: you can redistribute it and/or modify ## This program is free software: you can redistribute it and/or modify
+1 -1
View File
@@ -19,7 +19,7 @@
\def\finalout{\overfullrule=0pt} \def\finalout{\overfullrule=0pt}
%\finalout %\finalout
% Copyright (c) 1998, 2001, 2009--2015, 2018--2020 Free Software % Copyright (c) 1998, 2001, 2009--2015, 2018--2021 Free Software
% Foundation, Inc. % Foundation, Inc.
% %
% This file is part of Bison. % This file is part of Bison.
+1 -1
View File
@@ -22,7 +22,7 @@ fill-column: 76
ispell-dictionary: "american" ispell-dictionary: "american"
End: End:
Copyright (C) 2006, 2009-2015, 2018-2020 Free Software Foundation, Inc. Copyright (C) 2006, 2009-2015, 2018-2021 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler. This file is part of Bison, the GNU Compiler Compiler.
+1 -1
View File
@@ -1,6 +1,6 @@
#! /usr/bin/perl -w #! /usr/bin/perl -w
# Copyright (C) 2006, 2008-2015, 2018-2020 Free Software Foundation, # Copyright (C) 2006, 2008-2015, 2018-2021 Free Software Foundation,
# Inc. # Inc.
# #
# This file is part of Bison, the GNU Compiler Compiler. # This file is part of Bison, the GNU Compiler Compiler.
+1 -1
View File
@@ -1,4 +1,4 @@
## Copyright (C) 2006, 2008-2015, 2018-2020 Free Software Foundation, ## Copyright (C) 2006, 2008-2015, 2018-2021 Free Software Foundation,
## Inc. ## Inc.
## This program is free software: you can redistribute it and/or modify ## This program is free software: you can redistribute it and/or modify
+1 -1
View File
@@ -17,7 +17,7 @@ fill-column: 76
ispell-dictionary: "american" ispell-dictionary: "american"
End: End:
Copyright (C) 2018-2020 Free Software Foundation, Inc. Copyright (C) 2018-2021 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or under the terms of the GNU Free Documentation License, Version 1.3 or
+1 -1
View File
@@ -46,7 +46,7 @@ fill-column: 76
ispell-dictionary: "american" ispell-dictionary: "american"
End: End:
Copyright (C) 2018-2020 Free Software Foundation, Inc. Copyright (C) 2018-2021 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or under the terms of the GNU Free Documentation License, Version 1.3 or
+1 -1
View File
@@ -36,7 +36,7 @@ fill-column: 76
ispell-dictionary: "american" ispell-dictionary: "american"
End: End:
Copyright (C) 2018-2020 Free Software Foundation, Inc. Copyright (C) 2018-2021 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or under the terms of the GNU Free Documentation License, Version 1.3 or
+1 -1
View File
@@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2005-2015, 2018-2020 Free Software Foundation, Inc. # Copyright (C) 2005-2015, 2018-2021 Free Software Foundation, Inc.
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -1,4 +1,4 @@
## Copyright (C) 2005-2006, 2008-2015, 2018-2020 Free Software ## Copyright (C) 2005-2006, 2008-2015, 2018-2021 Free Software
## Foundation, Inc. ## Foundation, Inc.
## ##
## This program is free software: you can redistribute it and/or modify ## This program is free software: you can redistribute it and/or modify
+1 -1
View File
@@ -1,4 +1,4 @@
## Copyright (C) 2018-2020 Free Software Foundation, Inc. ## Copyright (C) 2018-2021 Free Software Foundation, Inc.
## ##
## This program is free software: you can redistribute it and/or modify ## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by ## it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2018-2020 Free Software Foundation, Inc. # Copyright (C) 2018-2021 Free Software Foundation, Inc.
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -1,5 +1,5 @@
/* /*
Copyright (C) 2008-2015, 2018-2020 Free Software Foundation, Inc. Copyright (C) 2008-2015, 2018-2021 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2018-2020 Free Software Foundation, Inc. # Copyright (C) 2018-2021 Free Software Foundation, Inc.
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -1,5 +1,5 @@
/* /*
Copyright (C) 2008-2015, 2018-2020 Free Software Foundation, Inc. Copyright (C) 2008-2015, 2018-2021 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -81,7 +81,7 @@ fill-column: 76
ispell-dictionary: "american" ispell-dictionary: "american"
End: End:
Copyright (C) 2018-2020 Free Software Foundation, Inc. Copyright (C) 2018-2021 Free Software Foundation, Inc.
This file is part of GNU bison, the GNU Compiler Compiler. This file is part of GNU bison, the GNU Compiler Compiler.
+1 -1
View File
@@ -32,7 +32,7 @@ fill-column: 76
ispell-dictionary: "american" ispell-dictionary: "american"
End: End:
Copyright (C) 2020 Free Software Foundation, Inc. Copyright (C) 2020-2021 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler. This file is part of Bison, the GNU Compiler Compiler.
+1 -1
View File
@@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2020 Free Software Foundation, Inc. # Copyright (C) 2020-2021 Free Software Foundation, Inc.
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -1,4 +1,4 @@
## Copyright (C) 2020 Free Software Foundation, Inc. ## Copyright (C) 2020-2021 Free Software Foundation, Inc.
## ##
## This program is free software: you can redistribute it and/or modify ## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by ## it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -1,6 +1,6 @@
/* Parser and scanner for bistromathic. -*- C -*- /* Parser and scanner for bistromathic. -*- C -*-
Copyright (C) 2019-2020 Free Software Foundation, Inc. Copyright (C) 2019-2021 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler. This file is part of Bison, the GNU Compiler Compiler.
+1 -1
View File
@@ -9,7 +9,7 @@ fill-column: 76
ispell-dictionary: "american" ispell-dictionary: "american"
End: End:
Copyright (C) 2019-2020 Free Software Foundation, Inc. Copyright (C) 2019-2021 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler. This file is part of Bison, the GNU Compiler Compiler.
+1 -1
View File
@@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2019-2020 Free Software Foundation, Inc. # Copyright (C) 2019-2021 Free Software Foundation, Inc.
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -1,4 +1,4 @@
## Copyright (C) 2019-2020 Free Software Foundation, Inc. ## Copyright (C) 2019-2021 Free Software Foundation, Inc.
## ##
## This program is free software: you can redistribute it and/or modify ## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by ## it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -11,7 +11,7 @@ fill-column: 76
ispell-dictionary: "american" ispell-dictionary: "american"
End: End:
Copyright (C) 2018-2020 Free Software Foundation, Inc. Copyright (C) 2018-2021 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler. This file is part of Bison, the GNU Compiler Compiler.
+1 -1
View File
@@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2018-2020 Free Software Foundation, Inc. # Copyright (C) 2018-2021 Free Software Foundation, Inc.
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
+8 -1
View File
@@ -1,4 +1,4 @@
## Copyright (C) 2018-2020 Free Software Foundation, Inc. ## Copyright (C) 2018-2021 Free Software Foundation, Inc.
## ##
## This program is free software: you can redistribute it and/or modify ## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by ## it under the terms of the GNU General Public License as published by
@@ -31,6 +31,13 @@ endif FLEX_WORKS
%D%/parse.c: $(dependencies) %D%/parse.c: $(dependencies)
# Tell Make scan.o depends on parse.h, except that Make sees only
# parse.c, not parse.h. We can't use BUILT_SOURCES to this end, since
# we use the built bison.
%D%/lexcalc$(DASH)scan.o: %D%/parse.c
# Likewise, but for Automake before 1.16.
%D%/examples_c_lexcalc_lexcalc$(DASH)scan.o: %D%/parse.c
EXTRA_DIST += %D%/lexcalc.test EXTRA_DIST += %D%/lexcalc.test
dist_lexcalc_DATA = %D%/parse.y %D%/scan.l %D%/Makefile %D%/README.md dist_lexcalc_DATA = %D%/parse.y %D%/scan.l %D%/Makefile %D%/README.md
CLEANFILES += %D%/parse.[ch] %D%/scan.c %D%/parse.output CLEANFILES += %D%/parse.[ch] %D%/scan.c %D%/parse.output
+1 -1
View File
@@ -1,6 +1,6 @@
/* Parser for lexcalc. -*- C -*- /* Parser for lexcalc. -*- C -*-
Copyright (C) 2018-2020 Free Software Foundation, Inc. Copyright (C) 2018-2021 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler. This file is part of Bison, the GNU Compiler Compiler.
+1 -1
View File
@@ -1,6 +1,6 @@
/* Scanner for lexcalc. -*- C -*- /* Scanner for lexcalc. -*- C -*-
Copyright (C) 2018-2020 Free Software Foundation, Inc. Copyright (C) 2018-2021 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler. This file is part of Bison, the GNU Compiler Compiler.
+1 -1
View File
@@ -1,4 +1,4 @@
## Copyright (C) 2018-2020 Free Software Foundation, Inc. ## Copyright (C) 2018-2021 Free Software Foundation, Inc.
## ##
## This program is free software: you can redistribute it and/or modify ## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by ## it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -1,4 +1,4 @@
## Copyright (C) 2005-2006, 2008-2015, 2018-2020 Free Software ## Copyright (C) 2005-2006, 2008-2015, 2018-2021 Free Software
## Foundation, Inc. ## Foundation, Inc.
## ##
## This program is free software: you can redistribute it and/or modify ## This program is free software: you can redistribute it and/or modify
+1 -1
View File
@@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2005-2015, 2018-2020 Free Software Foundation, Inc. # Copyright (C) 2005-2015, 2018-2021 Free Software Foundation, Inc.
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -20,7 +20,7 @@ fill-column: 76
ispell-dictionary: "american" ispell-dictionary: "american"
End: End:
Copyright (C) 2020 Free Software Foundation, Inc. Copyright (C) 2020-2021 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or under the terms of the GNU Free Documentation License, Version 1.3 or
+1 -1
View File
@@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2020 Free Software Foundation, Inc. # Copyright (C) 2020-2021 Free Software Foundation, Inc.
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -1,6 +1,6 @@
/* Parser and scanner for pushcalc. -*- C -*- /* Parser and scanner for pushcalc. -*- C -*-
Copyright (C) 2020 Free Software Foundation, Inc. Copyright (C) 2020-2021 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler. This file is part of Bison, the GNU Compiler Compiler.
+1 -1
View File
@@ -1,4 +1,4 @@
## Copyright (C) 2020 Free Software Foundation, Inc. ## Copyright (C) 2020-2021 Free Software Foundation, Inc.
## ##
## This program is free software: you can redistribute it and/or modify ## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by ## it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -26,7 +26,7 @@ fill-column: 76
ispell-dictionary: "american" ispell-dictionary: "american"
End: End:
Copyright (C) 2018-2020 Free Software Foundation, Inc. Copyright (C) 2018-2021 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or under the terms of the GNU Free Documentation License, Version 1.3 or
+1 -1
View File
@@ -1,4 +1,4 @@
## Copyright (C) 2019-2020 Free Software Foundation, Inc. ## Copyright (C) 2019-2021 Free Software Foundation, Inc.
## ##
## This program is free software: you can redistribute it and/or modify ## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by ## it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -1,6 +1,6 @@
/* Parser for reccalc. -*- C -*- /* Parser for reccalc. -*- C -*-
Copyright (C) 2019-2020 Free Software Foundation, Inc. Copyright (C) 2019-2021 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler. This file is part of Bison, the GNU Compiler Compiler.
+1 -1
View File
@@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2018-2020 Free Software Foundation, Inc. # Copyright (C) 2018-2021 Free Software Foundation, Inc.
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -1,6 +1,6 @@
/* Scanner for reccalc. -*- C -*- /* Scanner for reccalc. -*- C -*-
Copyright (C) 2019-2020 Free Software Foundation, Inc. Copyright (C) 2019-2021 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler. This file is part of Bison, the GNU Compiler Compiler.
+1 -1
View File
@@ -1,4 +1,4 @@
## Copyright (C) 2005-2006, 2008-2015, 2018-2020 Free Software ## Copyright (C) 2005-2006, 2008-2015, 2018-2021 Free Software
## Foundation, Inc. ## Foundation, Inc.
## ##
## This program is free software: you can redistribute it and/or modify ## This program is free software: you can redistribute it and/or modify
+1 -1
View File
@@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2005-2015, 2018-2020 Free Software Foundation, Inc. # Copyright (C) 2005-2015, 2018-2021 Free Software Foundation, Inc.
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -15,7 +15,7 @@ fill-column: 76
ispell-dictionary: "american" ispell-dictionary: "american"
End: End:
Copyright (C) 2018-2020 Free Software Foundation, Inc. Copyright (C) 2018-2021 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or under the terms of the GNU Free Documentation License, Version 1.3 or
+1 -1
View File
@@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2018-2020 Free Software Foundation, Inc. # Copyright (C) 2018-2021 Free Software Foundation, Inc.
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -1,6 +1,6 @@
/* Parser and scanner for calc in D. -*- D -*- /* Parser and scanner for calc in D. -*- D -*-
Copyright (C) 2018-2020 Free Software Foundation, Inc. Copyright (C) 2018-2021 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler. This file is part of Bison, the GNU Compiler Compiler.
+1 -1
View File
@@ -1,4 +1,4 @@
## Copyright (C) 2018-2020 Free Software Foundation, Inc. ## Copyright (C) 2018-2021 Free Software Foundation, Inc.
## ##
## This program is free software: you can redistribute it and/or modify ## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by ## it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -3,7 +3,7 @@
# This file is part of GNU Bison # This file is part of GNU Bison
# Copyright (C) 1992, 2000-2001, 2005-2006, 2009-2015, 2018-2020 Free # Copyright (C) 1992, 2000-2001, 2005-2006, 2009-2015, 2018-2021 Free
# Software Foundation, Inc. # Software Foundation, Inc.
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
+1 -1
View File
@@ -19,7 +19,7 @@ fill-column: 76
ispell-dictionary: "american" ispell-dictionary: "american"
End: End:
Copyright (C) 2018-2020 Free Software Foundation, Inc. Copyright (C) 2018-2021 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or under the terms of the GNU Free Documentation License, Version 1.3 or
+1 -1
View File
@@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2018-2020 Free Software Foundation, Inc. # Copyright (C) 2018-2021 Free Software Foundation, Inc.
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -1,6 +1,6 @@
/* Parser and scanner for calc in Java. -*- Java -*- /* Parser and scanner for calc in Java. -*- Java -*-
Copyright (C) 2018-2020 Free Software Foundation, Inc. Copyright (C) 2018-2021 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler. This file is part of Bison, the GNU Compiler Compiler.
+1 -1
View File
@@ -1,4 +1,4 @@
## Copyright (C) 2018-2020 Free Software Foundation, Inc. ## Copyright (C) 2018-2021 Free Software Foundation, Inc.
## ##
## This program is free software: you can redistribute it and/or modify ## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by ## it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -1,4 +1,4 @@
## Copyright (C) 2020 Free Software Foundation, Inc. ## Copyright (C) 2020-2021 Free Software Foundation, Inc.
## ##
## This program is free software: you can redistribute it and/or modify ## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by ## it under the terms of the GNU General Public License as published by

Some files were not shown because too many files have changed in this diff Show More