mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
tokens: style: minor fixes
* data/skeletons/bison.m4 (b4_symbol_kind): Dispatch on the UNDEF token number rather than its name. * data/skeletons/c++.m4, data/skeletons/c.m4, data/skeletons/java.m4: Comment changes.
This commit is contained in:
@@ -418,9 +418,9 @@ m4_case([$1],
|
||||
[-2], [[YYEMPTY]],
|
||||
[0], [[YYEOF]],
|
||||
[1], [[YYERROR]],
|
||||
[2], [[YYUNDEF]],
|
||||
[m4_case(b4_symbol([$1], [tag]),
|
||||
[$accept], [[YYACCEPT]],
|
||||
[$undefined], [[YYUNDEF]],
|
||||
[b4_symbol_if([$1], [has_id], _b4_symbol([$1], [id]),
|
||||
[m4_bpatsubst([$1-][]_b4_symbol([$1], [tag]), [[^a-zA-Z_0-9]+], [_])])])])])
|
||||
|
||||
|
||||
@@ -162,9 +162,10 @@ m4_bpatsubst(m4_dquote(m4_bpatsubst(m4_dquote(b4_namespace_ref[ ]),
|
||||
[::\([^][:]\|:[^:]\)*], [} ])[} // ]b4_namespace_ref])])
|
||||
|
||||
|
||||
## -------------------------- ##
|
||||
## (External) token numbers. ##
|
||||
## -------------------------- ##
|
||||
## ------------- ##
|
||||
## Token kinds. ##
|
||||
## ------------- ##
|
||||
|
||||
|
||||
# b4_token_enums
|
||||
# --------------
|
||||
@@ -172,15 +173,15 @@ m4_bpatsubst(m4_dquote(m4_bpatsubst(m4_dquote(b4_namespace_ref[ ]),
|
||||
m4_define([b4_token_enums],
|
||||
[[enum yytokentype
|
||||
{
|
||||
]b4_symbol_foreach([b4_token_enum])[
|
||||
};]dnl
|
||||
]b4_symbol_foreach([b4_token_enum])dnl
|
||||
[ };]dnl
|
||||
])
|
||||
|
||||
|
||||
|
||||
## --------------------------- ##
|
||||
## (Internal) symbol numbers. ##
|
||||
## --------------------------- ##
|
||||
## -------------- ##
|
||||
## Symbol kinds. ##
|
||||
## -------------- ##
|
||||
|
||||
# b4_declare_symbol_enum
|
||||
# ----------------------
|
||||
|
||||
@@ -426,9 +426,9 @@ static const b4_int_type_for([$2]) yy$1[[]] =
|
||||
])
|
||||
|
||||
|
||||
## -------------------------- ##
|
||||
## (External) token numbers. ##
|
||||
## -------------------------- ##
|
||||
## ------------- ##
|
||||
## Token kinds. ##
|
||||
## ------------- ##
|
||||
|
||||
# b4_token_define(TOKEN-NUM)
|
||||
# --------------------------
|
||||
@@ -491,9 +491,9 @@ m4_define([b4_symbol_translate],
|
||||
|
||||
|
||||
|
||||
## --------------------------- ##
|
||||
## (Internal) symbol numbers. ##
|
||||
## --------------------------- ##
|
||||
## -------------- ##
|
||||
## Symbol kinds. ##
|
||||
## -------------- ##
|
||||
|
||||
# b4_symbol_enum(SYMBOL-NUM)
|
||||
# --------------------------
|
||||
|
||||
@@ -128,9 +128,10 @@ m4_define([b4_integral_parser_table_define],
|
||||
[b4_typed_parser_table_define([b4_int_type_for([$2])], [$1], [$2], [$3])])
|
||||
|
||||
|
||||
## -------------------------- ##
|
||||
## (External) token numbers. ##
|
||||
## -------------------------- ##
|
||||
## ------------- ##
|
||||
## Token kinds. ##
|
||||
## ------------- ##
|
||||
|
||||
|
||||
# b4_token_enum(TOKEN-NUM)
|
||||
# ------------------------
|
||||
@@ -149,9 +150,9 @@ b4_symbol_foreach([b4_token_enum])])])
|
||||
|
||||
|
||||
|
||||
## --------------------------- ##
|
||||
## (Internal) symbol numbers. ##
|
||||
## --------------------------- ##
|
||||
## -------------- ##
|
||||
## Symbol kinds. ##
|
||||
## -------------- ##
|
||||
|
||||
# b4_symbol_enum(SYMBOL-NUM)
|
||||
# --------------------------
|
||||
|
||||
Reference in New Issue
Block a user