]> git.saurik.com Git - bison.git/commitdiff
* data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
authorAkim Demaille <akim@epita.fr>
Fri, 24 Sep 2004 14:14:58 +0000 (14:14 +0000)
committerAkim Demaille <akim@epita.fr>
Fri, 24 Sep 2004 14:14:58 +0000 (14:14 +0000)
after the location.

ChangeLog
data/c.m4

index bb48d8d003b15baeb29a883c30147bb06f66b0a7..4d16e99accfa7138c6f04a1950b7e671a8042b5f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-09-24  Akim Demaille  <akim@epita.fr>
+
+       * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
+       after the location.
+
 2004-09-24  Akim Demaille  <akim@epita.fr>
 
        * doc/bison.texinfo (Table of Symbols): Sort.
 2004-09-24  Akim Demaille  <akim@epita.fr>
 
        * doc/bison.texinfo (Table of Symbols): Sort.
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)
 ])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]);
 
   else
     YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
 
@@ -411,6 +406,10 @@ b4_location_if([  (void) yylocationp;
   fprintf (yyoutput, ": ");
 ])dnl
 [
   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
   switch (yytype)
     {
 ]m4_map([b4_symbol_actions], m4_defn([b4_symbol_printers]))dnl