mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +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:
@@ -340,7 +340,9 @@ b4_percent_define_flag_if([[global_tokens_and_yystype]],
|
||||
]b4_namespace_close[
|
||||
|
||||
]dnl Map the name used in c.m4 to the one used in c++.m4.
|
||||
[#undef ]b4_symbol(0, [id])[
|
||||
[#undef ]b4_symbol(-2, [id])[
|
||||
#define ]b4_symbol(-2, [id])[ ]b4_namespace_ref[::]b4_parser_class[::token::]b4_symbol(-2, [id])[
|
||||
#undef ]b4_symbol(0, [id])[
|
||||
#define ]b4_symbol(0, [id])[ ]b4_namespace_ref[::]b4_parser_class[::token::]b4_symbol(0, [id])[
|
||||
|
||||
#ifndef ]b4_api_PREFIX[STYPE
|
||||
|
||||
Reference in New Issue
Block a user