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

@@ -417,12 +417,12 @@ m4_define([b4_symbol_kind],
m4_case([$1],
[-2], [[YYEMPTY]],
[0], [[YYEOF]],
[m4_case(m4_quote(b4_symbol([$1], [tag])),
[1], [[YYERROR]],
[m4_case(b4_symbol([$1], [tag]),
[$accept], [[YYACCEPT]],
[error], [[YYERROR]],
[$undefined], [[YYUNDEF]],
[b4_symbol_if([$1], [has_id], m4_expand(_b4_symbol([$1], [id])),
[[$1_][]m4_bpatsubst(m4_quote(_b4_symbol([$1], [tag])), [[^a-zA-Z_0-9]], [_])])])])])
[b4_symbol_if([$1], [has_id], _b4_symbol([$1], [id]),
[m4_bpatsubst([$1-][]_b4_symbol([$1], [tag]), [[^a-zA-Z_0-9]+], [_])])])])])
# b4_symbol(NUM, FIELD)