yacc.c: fix #definition of YYEMPTY

When generating a C parser, YYEMPTY is present in enum yytokentype but
there is no corresponding #define like there is for the other values.
There is a special case for YYEMPTY in b4_token_enums but no
corresponding case in b4_token_defines.

* data/skeletons/c.m4 (b4_token_defines): Do define YYEMPTY.
This commit is contained in:
Todd C. Miller
2020-11-10 07:36:11 +01:00
committed by Akim Demaille
parent 98c35e0025
commit c47bb87f9f
2 changed files with 8 additions and 3 deletions

View File

@@ -509,10 +509,11 @@ m4_define([b4_token_define],
# ----------------
# Output the definition of the tokens.
m4_define([b4_token_defines],
[b4_any_token_visible_if([/* Token kinds. */
m4_join([
[[/* Token kinds. */
#define ]b4_symbol([-2], [id])[ -2
]m4_join([
], b4_symbol_map([b4_token_define]))
])])
])
# b4_token_enum(TOKEN-NUM)