mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
c, c++: also define YYEMPTY in yytoken_kind_t
I have been hesitating a lot before doing it ---after all the user must not use this kind, so what's the point of showing it in yytoken_kind_t. And eventually I chose to play it safe with the typing system and make it possible to use yytoken_kind_t for all the tokens, even the "empty token". * data/skeletons/c.m4: Give an id and a tag to YYEMPTY. (b4_token_enums): Define YYEMPTY. * data/skeletons/c++.m4 (b4_token_enums): Define YYEMPTY. * data/skeletons/glr.c, data/skeletons/glr.cc, data/skeletons/yacc.c: (YYEMPTY): Remove. Use b4_symbol(-2, id) instead.
This commit is contained in:
@@ -173,6 +173,7 @@ m4_bpatsubst(m4_dquote(m4_bpatsubst(m4_dquote(b4_namespace_ref[ ]),
|
||||
m4_define([b4_token_enums],
|
||||
[[enum yytokentype
|
||||
{
|
||||
]b4_symbol([-2], [id])[ = -2,
|
||||
]b4_symbol_foreach([b4_token_enum])dnl
|
||||
[ };]dnl
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user