mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
c: make the symbol kind definition nicer to read
From
enum yysymbol_kind_t
{
YYSYMBOL_YYEMPTY = -2,
YYSYMBOL_YYEOF = 0,
YYSYMBOL_YYERROR = 1,
YYSYMBOL_YYUNDEF = 2,
to
enum yysymbol_kind_t
{
YYSYMBOL_YYEMPTY = -2,
YYSYMBOL_YYEOF = 0, /* "end of file" */
YYSYMBOL_YYERROR = 1, /* error */
YYSYMBOL_YYUNDEF = 2, /* $undefined */
* data/skeletons/bison.m4 (b4_last_symbol): New.
(b4_symbol_enum, b4_symbol_enums): Reformat the output.
* data/skeletons/c.m4
This commit is contained in:
@@ -188,13 +188,11 @@ m4_define([b4_token_enums],
|
||||
m4_define([b4_declare_symbol_enum],
|
||||
[[enum symbol_kind_type
|
||||
{
|
||||
]m4_join([,
|
||||
],
|
||||
]b4_symbol_kind([-2])[ = -2,
|
||||
b4_symbol_map([b4_symbol_enum]),
|
||||
[YYNTOKENS = ]b4_tokens_number[ ///< Number of tokens.])[
|
||||
YYNTOKENS = ]b4_tokens_number[, ///< Number of tokens.
|
||||
]b4_symbol_kind([-2])[ = -2,
|
||||
]b4_symbol_foreach([ b4_symbol_enum])[
|
||||
};
|
||||
]])])
|
||||
]])
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user