mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-21 02:03:03 +00:00
style: comment changes about token numbers
* data/skeletons/bison.m4, data/skeletons/c.m4: here.
This commit is contained in:
@@ -384,22 +384,21 @@ m4_define([b4_glr_cc_if],
|
|||||||
## Symbols. ##
|
## Symbols. ##
|
||||||
## --------- ##
|
## --------- ##
|
||||||
|
|
||||||
# For a description of the Symbol handling, see README.
|
# For a description of the Symbol handling, see README.md.
|
||||||
#
|
#
|
||||||
# The following macros provide access to symbol related values.
|
# The following macros provide access to symbol related values.
|
||||||
|
|
||||||
# __b4_symbol(NUM, FIELD)
|
# __b4_symbol(NUM, FIELD)
|
||||||
# -----------------------
|
# -----------------------
|
||||||
# Recover a FIELD about symbol #NUM. Thanks to m4_indir, fails if
|
# Fetch FIELD of symbol #NUM. Fail if undefined.
|
||||||
# undefined.
|
|
||||||
m4_define([__b4_symbol],
|
m4_define([__b4_symbol],
|
||||||
[m4_indir([b4_symbol($1, $2)])])
|
[m4_indir([b4_symbol($1, $2)])])
|
||||||
|
|
||||||
|
|
||||||
# _b4_symbol(NUM, FIELD)
|
# _b4_symbol(NUM, FIELD)
|
||||||
# ----------------------
|
# ----------------------
|
||||||
# Recover a FIELD about symbol #NUM (or "orig NUM"). Fails if
|
# Fetch FIELD of symbol #NUM (or "orig NUM", see README.md).
|
||||||
# undefined.
|
# Fail if undefined.
|
||||||
m4_define([_b4_symbol],
|
m4_define([_b4_symbol],
|
||||||
[m4_ifdef([b4_symbol($1, number)],
|
[m4_ifdef([b4_symbol($1, number)],
|
||||||
[__b4_symbol(m4_indir([b4_symbol($1, number)]), $2)],
|
[__b4_symbol(m4_indir([b4_symbol($1, number)]), $2)],
|
||||||
@@ -409,8 +408,9 @@ m4_define([_b4_symbol],
|
|||||||
|
|
||||||
# b4_symbol(NUM, FIELD)
|
# b4_symbol(NUM, FIELD)
|
||||||
# ---------------------
|
# ---------------------
|
||||||
# Recover a FIELD about symbol #NUM (or "orig NUM"). Fails if
|
# Fetch FIELD of symbol #NUM (or "orig NUM"). Fail if undefined.
|
||||||
# undefined. If FIELD = id, prepend the token prefix.
|
#
|
||||||
|
# If FIELD = id, prepend the token prefix.
|
||||||
m4_define([b4_symbol],
|
m4_define([b4_symbol],
|
||||||
[m4_case([$2],
|
[m4_case([$2],
|
||||||
[id], [m4_do([b4_percent_define_get([api.token.prefix])],
|
[id], [m4_do([b4_percent_define_get([api.token.prefix])],
|
||||||
@@ -530,6 +530,7 @@ m4_define([b4_any_token_visible_if],
|
|||||||
|
|
||||||
# b4_token_format(FORMAT, NUM)
|
# b4_token_format(FORMAT, NUM)
|
||||||
# ----------------------------
|
# ----------------------------
|
||||||
|
# If token NUM has a visible ID, format FORMAT with ID, USER_NUMBER.
|
||||||
m4_define([b4_token_format],
|
m4_define([b4_token_format],
|
||||||
[b4_token_visible_if([$2],
|
[b4_token_visible_if([$2],
|
||||||
[m4_format([[$1]],
|
[m4_format([[$1]],
|
||||||
|
|||||||
@@ -425,9 +425,9 @@ static const b4_int_type_for([$2]) yy$1[[]] =
|
|||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
## ------------------------- ##
|
## -------------------------- ##
|
||||||
## Assigning token numbers. ##
|
## (External) token numbers. ##
|
||||||
## ------------------------- ##
|
## -------------------------- ##
|
||||||
|
|
||||||
# b4_token_define(TOKEN-NUM)
|
# b4_token_define(TOKEN-NUM)
|
||||||
# --------------------------
|
# --------------------------
|
||||||
@@ -454,7 +454,7 @@ m4_define([b4_token_enum],
|
|||||||
|
|
||||||
# b4_token_enums
|
# b4_token_enums
|
||||||
# --------------
|
# --------------
|
||||||
# Output the definition of the tokens (if there are) as enums.
|
# The definition of the tokens (if there are) as enums.
|
||||||
m4_define([b4_token_enums],
|
m4_define([b4_token_enums],
|
||||||
[b4_any_token_visible_if([[/* Token type. */
|
[b4_any_token_visible_if([[/* Token type. */
|
||||||
#ifndef ]b4_api_PREFIX[TOKENTYPE
|
#ifndef ]b4_api_PREFIX[TOKENTYPE
|
||||||
@@ -471,7 +471,7 @@ m4_define([b4_token_enums],
|
|||||||
|
|
||||||
# b4_token_enums_defines
|
# b4_token_enums_defines
|
||||||
# ----------------------
|
# ----------------------
|
||||||
# Output the definition of the tokens (if there are any) as enums and,
|
# The definition of the tokens (if there are any) as enums and,
|
||||||
# if POSIX Yacc is enabled, as #defines.
|
# if POSIX Yacc is enabled, as #defines.
|
||||||
m4_define([b4_token_enums_defines],
|
m4_define([b4_token_enums_defines],
|
||||||
[b4_token_enums[]b4_yacc_if([b4_token_defines])])
|
[b4_token_enums[]b4_yacc_if([b4_token_defines])])
|
||||||
|
|||||||
Reference in New Issue
Block a user