c: minor simplification in the debug code

* data/c.m4 (yy_symbol_print): Minor factoring.
This commit is contained in:
Akim Demaille
2013-01-25 14:57:42 +01:00
parent aedcb6c095
commit d9fa1b7c4f

View File

@@ -480,10 +480,8 @@ m4_if(b4_skeleton, ["yacc.c"],
b4_locations_if([, [[YYLTYPE const * const yylocationp], [yylocationp]]])[]dnl
m4_ifset([b4_parse_param], [, b4_parse_param]))[
{
if (yytype < YYNTOKENS)
YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
else
YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
YYFPRINTF (yyoutput, "%s %s (",
yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
]b4_locations_if([ YY_LOCATION_PRINT (yyoutput, *yylocationp);
YYFPRINTF (yyoutput, ": ");