mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13:03 +00:00
tokens: define the "$undefined" token kind
* data/skeletons/bison.m4 (b4_symbol_token_kind): Give a definition to $undefined. (b4_token_visible_if): $undefined has an id. * src/output.c (prepare_symbol_definitions): Stop lying: $undefined _is_ a token. * tests/input.at: Adjust.
This commit is contained in:
@@ -430,6 +430,12 @@ static const b4_int_type_for([$2]) yy$1[[]] =
|
||||
## Token kinds. ##
|
||||
## ------------- ##
|
||||
|
||||
# Because C enums are not scoped, because tokens are exposed in the
|
||||
# header, and because these tokens are common to all the parser, we
|
||||
# need to make sure their names don't collide: use the api.prefix.
|
||||
m4_define([b4_symbol(1, id)], [b4_api_PREFIX[][ERRCODE]])
|
||||
m4_define([b4_symbol(2, id)], [b4_api_PREFIX[][UNDEF]])
|
||||
|
||||
# b4_token_define(TOKEN-NUM)
|
||||
# --------------------------
|
||||
# Output the definition of this token as #define.
|
||||
|
||||
Reference in New Issue
Block a user