bison: use consistently "token kind", not "token type"

* src/output.c, src/reader.c, src/scan-gram.l, src/tables.c: here.
This commit is contained in:
Akim Demaille
2020-04-05 15:55:07 +02:00
parent f0bb82ae9e
commit cc68bbf799
6 changed files with 8 additions and 10 deletions

View File

@@ -8,7 +8,7 @@ afterwards.
## simple.yy - Simple example in C++14
A very simple example in C++, based on variants and symbol constructors.
Variants allow to use any C++ type as semantic value type, and symbol
constructors ensure consistency between declared token type and effective
constructors ensure consistency between declared token kind and effective
semantic value.
Run as `./simple`.

View File

@@ -596,9 +596,7 @@ prepare_symbol_definitions (void)
static void
prepare_actions (void)
{
/* Figure out the actions for the specified state, indexed by
lookahead token type. */
/* Figure out the actions for the specified state. */
muscle_insert_rule_number_table ("defact", yydefact,
yydefact[0], 1, nstates);

View File

@@ -817,9 +817,9 @@ check_and_convert_grammar (void)
/* Assign the symbols their symbol numbers. */
symbols_pack ();
/* Scan rule actions after invoking symbol_check_alias_consistency (in
symbols_pack above) so that token types are set correctly before the rule
action type checking.
/* Scan rule actions after invoking symbol_check_alias_consistency
(in symbols_pack above) so that token types are set correctly
before the rule action type checking.
Before invoking grammar_rule_check_and_complete (in packgram
below) on any rule, make sure all actions have already been

View File

@@ -51,7 +51,7 @@ static boundary scanner_cursor;
#define YY_USER_ACTION location_compute (loc, &scanner_cursor, yytext, yyleng);
/* Report that yytext is an extension, and evaluate to its token type. */
/* Report that yytext is an extension, and evaluate to its token kind. */
#define BISON_DIRECTIVE(Directive) \
(bison_directive (loc, yytext), PERCENT_ ## Directive)

View File

@@ -412,7 +412,7 @@ save_row (state_number s)
/*------------------------------------------------------------------.
| Figure out the actions for the specified state, indexed by |
| lookahead token type. |
| lookahead token kind. |
| |
| The YYDEFACT table is output now. The detailed info is saved for |
| putting into YYTABLE later. |

View File

@@ -519,7 +519,7 @@ m4_define([AT_DATA_GRAMMAR], [AT_LANG_DISPATCH([$0], $@)])
# AT_YYLEX_DEFINE([INPUT], [ACTION])
# ----------------------------------
# INPUT can be empty, or in double quotes, or a list (in braces).
# ACTION may compute yylval for instance, using "res" as token type,
# ACTION may compute yylval for instance, using "res" as token kind,
# and "toknum" as the number of calls to yylex (starting at 0).
m4_define([AT_YYLEX_PROTOTYPE],
[AT_YYLEX_RETURN AT_NAME_PREFIX[]lex (]AT_YYLEX_FORMALS[)[]dnl