symbols: minor fixes

* data/skeletons/bison.m4 (b4_symbol_kind): Series of _ are useless,
one is enough.
* data/skeletons/c.m4 (b4_token_enum): Fix overquoting.
This commit is contained in:
Akim Demaille
2020-04-08 08:13:00 +02:00
parent bbb9750b3e
commit 007e1b5f0a
5 changed files with 18 additions and 20 deletions

View File

@@ -453,8 +453,8 @@ m4_define([b4_token_enum],
[b4_token_visible_if([$1],
[m4_format([ %-30s %s],
m4_format([[%s = %s%s%s]],
[b4_symbol([$1], [id])],
[b4_symbol([$1], b4_api_token_raw_if([[number]], [[user_number]]))],
b4_symbol([$1], [id]),
b4_symbol([$1], b4_api_token_raw_if([[number]], [[user_number]])),
m4_if([$1], b4_last_enum_token, [], [[,]])),
[b4_symbol_tag_comment([$1])])])])
@@ -468,8 +468,8 @@ m4_define([b4_token_enums],
# define ]b4_api_PREFIX[TOKENTYPE
enum ]b4_api_prefix[tokentype
{
]b4_symbol_foreach([b4_token_enum])[
};
]b4_symbol_foreach([b4_token_enum])dnl
[ };
#endif
]])])
@@ -513,12 +513,12 @@ m4_define([b4_symbol_enum],
# Defining YYEMPTY here is important: it forces the compiler
# to use a signed type, which matters for yytoken.
m4_define([b4_declare_symbol_enum],
[[/* Symbol type. */
[[/* Symbol kind. */
enum yysymbol_kind_t
{
]b4_symbol_kind([-2])[ = -2,
]b4_symbol_foreach([b4_symbol_enum])[
};
]b4_symbol_foreach([b4_symbol_enum])dnl
[};
typedef enum yysymbol_kind_t yysymbol_kind_t;
]])])