* data/glr.c (YYTOKEN_TABLE): New macro.

(yytname): Define if YYTOKEN_TABLE.
* data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
* data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
(YYERROR_VERBOSE): Define the same way the other skeletons do.
* src/output.c (prepare_symbols): Output token_table_flag.
This commit is contained in:
Paul Eggert
2005-07-22 17:07:31 +00:00
parent 0ffda36340
commit 141f57937b
4 changed files with 25 additions and 6 deletions

View File

@@ -182,6 +182,11 @@ b4_location_if([#define yylloc b4_prefix[]lloc])])[
# define YYERROR_VERBOSE ]b4_error_verbose[
#endif
/* Enabling the token table. */
#ifndef YYTOKEN_TABLE
# define YYTOKEN_TABLE ]b4_token_table[
#endif
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
]m4_ifdef([b4_stype],
[b4_syncline([b4_stype_line], [b4_filename])
@@ -415,7 +420,7 @@ static const ]b4_int_type_for([b4_rline])[ yyrline[] =
};
#endif
#if YYDEBUG || YYERROR_VERBOSE
#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =