bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

glr: consistently use the same wording in traces


From: Akim Demaille
Subject: glr: consistently use the same wording in traces
Date: Sun, 3 Jan 2021 08:15:08 +0100

commit ab1208e2632e183026b751276158118fa44b6cee
Author: Akim Demaille <akim.demaille@gmail.com>
Date:   Sun Jan 3 07:19:50 2021 +0100

    glr: consistently use the same wording in traces
    
    * data/skeletons/glr.c, data/skeletons/glr2.cc (yyglrReduce): Traces
    refer to "state 42", not to "state #42".

diff --git a/data/skeletons/glr.c b/data/skeletons/glr.c
index 598b4464..4f4a688b 100644
--- a/data/skeletons/glr.c
+++ b/data/skeletons/glr.c
@@ -2590,7 +2590,7 @@ b4_dollar_popdef])[]dnl
               YY_SYMBOL_PRINT ("shifting", yytoken_to_shift, &yylval, &yylloc);
               yyglrShift (&yystack, yys, yyaction, yyposn,
                           &yylval]b4_locations_if([, &yylloc])[);
-              YY_DPRINTF ((stderr, "Stack %ld now in state #%d\n",
+              YY_DPRINTF ((stderr, "Stack %ld now in state %d\n",
                            YY_CAST (long, yys),
                            yystack.yytops.yystates[yys]->yylrState));
             }
diff --git a/data/skeletons/glr2.cc b/data/skeletons/glr2.cc
index d8dfa5d5..7857ded3 100644
--- a/data/skeletons/glr2.cc
+++ b/data/skeletons/glr2.cc
@@ -3095,7 +3095,7 @@ b4_dollar_popdef])[]dnl
                 YYCDEBUG << "On stack " << yys.get() << ", ";
                 YY_SYMBOL_PRINT ("shifting", yytoken_to_shift, 
&yystack.yylval, &yystack.yylloc);
                 yystack.yyglrShift (yys, yyaction, yyposn, 
yystack.yylval]b4_locations_if([, yystack.yylloc])[);
-                YYCDEBUG << "Stack " << yys.get() << " now in state #"
+                YYCDEBUG << "Stack " << yys.get() << " now in state "
                          << yystack.topState(yys)->yylrState << '\n';
               }
 
diff --git a/tests/glr-regression.at b/tests/glr-regression.at
index 8870238b..83715146 100644
--- a/tests/glr-regression.at
+++ b/tests/glr-regression.at
@@ -2058,7 +2058,7 @@ Now at end of input.
 Removing dead stacks.
 Rename stack 1 -> 0.
 On stack 0, shifting token "end of file" ()
-Stack 0 now in state #5
+Stack 0 now in state 5
 Ambiguity detected.
 Option 1,
   start -> <Rule 1, tokens 1 .. 3>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]