mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-10 12:53:03 +00:00
c: use yysymbol_name in traces
Only parse.error verbose and simple will get the original yytname: the other options will rely on a different table. So let's move on top of the yysymbol_name function. * data/skeletons/c.m4 (yy_symbol_print): Use yysymbol_name. * data/skeletons/glr.c (yytokenName): Rename as... (yysymbol_name): this. The change of naming scheme is unfortunate, but it's definitely glr.c which is "wrong".
This commit is contained in:
@@ -1121,7 +1121,7 @@ static void
|
||||
yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
|
||||
{
|
||||
YYFPRINTF (yyo, "%s %s (",
|
||||
yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
|
||||
yytype < YYNTOKENS ? "token" : "nterm", yysymbol_name (yytype));
|
||||
|
||||
YY_LOCATION_PRINT (yyo, *yylocationp);
|
||||
YYFPRINTF (yyo, ": ");
|
||||
|
||||
Reference in New Issue
Block a user