mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13: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:
@@ -662,7 +662,7 @@ b4_locations_if([, [[YYLTYPE const * const yylocationp], [yylocationp]]])[]dnl
|
||||
m4_ifset([b4_parse_param], [, b4_parse_param]))[
|
||||
{
|
||||
YYFPRINTF (yyo, "%s %s (",
|
||||
yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
|
||||
yytype < YYNTOKENS ? "token" : "nterm", yysymbol_name (yytype));
|
||||
|
||||
]b4_locations_if([ YY_LOCATION_PRINT (yyo, *yylocationp);
|
||||
YYFPRINTF (yyo, ": ");
|
||||
|
||||
Reference in New Issue
Block a user