mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-21 10:13:03 +00:00
* data/c.m4 (b4_token_enum): Always define the enum of tokens,
even if empty. * data/lalrl1.cc, data/glr.cc (parser::token_type): New. * doc/bison.texinfo (Calc++ Scanner): Use it.
This commit is contained in:
@@ -34,16 +34,15 @@ m4_define_default([b4_filename_type], [std::string])
|
||||
|
||||
# b4_token_enums(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER)
|
||||
# -----------------------------------------------------
|
||||
# Output the definition of the tokens (if there are) as enums.
|
||||
# Output the definition of the tokens as enums.
|
||||
m4_define([b4_token_enums],
|
||||
[m4_if([$@], [[]], [],
|
||||
[/* Tokens. */
|
||||
enum yytokentype {
|
||||
m4_map_sep([ b4_token_enum], [,
|
||||
],
|
||||
[$@])
|
||||
};
|
||||
])])
|
||||
])
|
||||
|
||||
|
||||
## ----------------- ##
|
||||
|
||||
Reference in New Issue
Block a user