mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13:03 +00:00
d: put YYEMPTY in the TokenKind
* data/skeletons/d.m4, data/skeletons/lalr1.d (b4_token_enums): Rename YYTokenType as TokenKind. Define YYEMPTY. * examples/d/calc.y, tests/calc.at, tests/scanner.at: Adjust.
This commit is contained in:
@@ -164,11 +164,9 @@ m4_define([b4_token_enum],
|
||||
# Output the definition of the tokens as enums.
|
||||
m4_define([b4_token_enums],
|
||||
[/* Token kinds. */
|
||||
public enum YYTokenType {
|
||||
|
||||
/** Token returned by the scanner to signal the end of its input. */
|
||||
EOF = 0,
|
||||
b4_symbol_foreach([b4_token_enum])
|
||||
public enum TokenKind {
|
||||
]b4_symbol_kind([-2])[ = -2,
|
||||
b4_symbol_foreach([b4_token_enum])dnl
|
||||
}
|
||||
])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user