diff options
author | Akim Demaille <akim.demaille@gmail.com> | 2020-03-29 17:06:16 +0200 |
---|---|---|
committer | Akim Demaille <akim.demaille@gmail.com> | 2020-04-01 08:32:50 +0200 |
commit | 7e28dbea112a6467eaf69aa72ca9b1881c90ca6d (patch) | |
tree | 9504f4783c272cf3b965abea495e2d5e87cdb72d /tests/headers.at | |
parent | 65df8d6747892f464e6823c8e8fa7a55cd464616 (diff) | |
download | bison-7e28dbea112a6467eaf69aa72ca9b1881c90ca6d.tar.gz |
c++: also use symbol_type_type
Because of the insane current implementation of glr.cc, things are a
bit nasty. We will rename symbol_number_type as symbol_type_type
later, to keep this commit small.
* data/skeletons/c++.m4 (b4_declare_symbol_enum): New.
Also define YYNTOKENS to avoid type clashes when yyntokens_ was
actually defined in another enum.
Use it.
(symbol_number_type): Be an alias of symbol_type_type.
Use YYSYMBOL_YYEMPTY and the like.
Use symbol_number_type where appropriate.
(empty_symbol): Remove.
(yytranslate_): Use symbol_number_type, not token_number_type.
* data/skeletons/lalr1.cc: Use symbol_number_type where appropriate.
Adjust to the replacement of empty_symbol by YYSYMBOL_YYEMPTY.
(yy_error_token_, yy_undef_token_, yyeof_, yyntokens_): Remove.
Adjust dependencies.
* data/skeletons/glr.cc: Use symbol_number_type where appropriate.
Forward definitions of YYSYMBOL_YYEMPTY, etc. to glr.c.
* tests/headers.at: Accept YYNTOKENS and other YYSYMBOL_*.
* tests/local.at (AT_YYERROR_DEFINE(c++)): Use symbol_number_type.
Diffstat (limited to 'tests/headers.at')
-rw-r--r-- | tests/headers.at | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/headers.at b/tests/headers.at index 8ab8de4c..d746b8d7 100644 --- a/tests/headers.at +++ b/tests/headers.at @@ -319,7 +319,9 @@ AT_PERL_CHECK([[-n -0777 -e ' s{//.*}{}g; s{\b((defined|if)\ YYDEBUG |YYChar + |YYNTOKENS # This is actual scoped in a C++ class. |YYPUSH_MORE(?:_DEFINED)? + |YYSYMBOL_(\w+) # These guys are scoped. |YYUSE |YY_ATTRIBUTE(?:_PURE|_UNUSED) |YY(?:_REINTERPRET)?_CAST |