style: comment changes about token numbers

* data/skeletons/bison.m4, data/skeletons/c.m4: here.
This commit is contained in:
Akim Demaille
2020-03-28 10:04:31 +01:00
parent af19fd7e0f
commit 4140320a0a
2 changed files with 13 additions and 12 deletions

View File

@@ -384,22 +384,21 @@ m4_define([b4_glr_cc_if],
## 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.
# __b4_symbol(NUM, FIELD)
# -----------------------
# Recover a FIELD about symbol #NUM. Thanks to m4_indir, fails if
# undefined.
# Fetch FIELD of symbol #NUM. Fail if undefined.
m4_define([__b4_symbol],
[m4_indir([b4_symbol($1, $2)])])
# _b4_symbol(NUM, FIELD)
# ----------------------
# Recover a FIELD about symbol #NUM (or "orig NUM"). Fails if
# undefined.
# Fetch FIELD of symbol #NUM (or "orig NUM", see README.md).
# Fail if undefined.
m4_define([_b4_symbol],
[m4_ifdef([b4_symbol($1, number)],
[__b4_symbol(m4_indir([b4_symbol($1, number)]), $2)],
@@ -409,8 +408,9 @@ m4_define([_b4_symbol],
# b4_symbol(NUM, FIELD)
# ---------------------
# Recover a FIELD about symbol #NUM (or "orig NUM"). Fails if
# undefined. If FIELD = id, prepend the token prefix.
# Fetch FIELD of symbol #NUM (or "orig NUM"). Fail if undefined.
#
# If FIELD = id, prepend the token prefix.
m4_define([b4_symbol],
[m4_case([$2],
[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)
# ----------------------------
# If token NUM has a visible ID, format FORMAT with ID, USER_NUMBER.
m4_define([b4_token_format],
[b4_token_visible_if([$2],
[m4_format([[$1]],

View File

@@ -425,9 +425,9 @@ static const b4_int_type_for([$2]) yy$1[[]] =
])
## ------------------------- ##
## Assigning token numbers. ##
## ------------------------- ##
## -------------------------- ##
## (External) token numbers. ##
## -------------------------- ##
# b4_token_define(TOKEN-NUM)
# --------------------------
@@ -454,7 +454,7 @@ m4_define([b4_token_enum],
# 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],
[b4_any_token_visible_if([[/* Token type. */
#ifndef ]b4_api_PREFIX[TOKENTYPE
@@ -471,7 +471,7 @@ m4_define([b4_token_enums],
# 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.
m4_define([b4_token_enums_defines],
[b4_token_enums[]b4_yacc_if([b4_token_defines])])