]> git.saurik.com Git - bison.git/blobdiff - data/c.m4
Simplify the C++ parser constructor.
[bison.git] / data / c.m4
index 04b2e76284dbac735f579447cc110707e809b7b5..79ce9767e7400da410144d5db6db2a03e75e12f3 100644 (file)
--- a/data/c.m4
+++ b/data/c.m4
@@ -398,12 +398,7 @@ b4_location_if([  (void) yylocationp;
 ])dnl
 [
   if (yytype < YYNTOKENS)
-    {
-      YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
-# ifdef YYPRINT
-      YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# endif
-    }
+    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
   else
     YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
 
@@ -411,6 +406,10 @@ b4_location_if([  (void) yylocationp;
   fprintf (yyoutput, ": ");
 ])dnl
 [
+# ifdef YYPRINT
+  if (yytype < YYNTOKENS)
+    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# endif
   switch (yytype)
     {
 ]m4_map([b4_symbol_actions], m4_defn([b4_symbol_printers]))dnl