[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 4/5] c: minor simplification in the debug code
From: |
Akim Demaille |
Subject: |
[PATCH 4/5] c: minor simplification in the debug code |
Date: |
Fri, 25 Jan 2013 16:45:56 +0100 |
* data/c.m4 (yy_symbol_print): Minor factoring.
---
data/c.m4 | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/data/c.m4 b/data/c.m4
index 6796363..ba62b72 100644
--- a/data/c.m4
+++ b/data/c.m4
@@ -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, ": ");
--
1.8.1.1