> Le 24 oct. 2019 à 18:18, Akim Demaille <[email protected]> a écrit :
> 
> So I installed only the patch for lalr1.cc, given that it reduces the size of 
> the LAC stack.  

And I had to add this.


commit 0cbefb71e8c6e664c29174df60bfdd7731166b6b
Author: Akim Demaille <[email protected]>
Date:   Thu Oct 24 23:02:26 2019 +0200

    lalr1.cc: fix previous commit: printing of state numbers
    
    * data/skeletons/lalr1.cc: Printing a char prints... a char.
    Print ints instead.

diff --git a/data/skeletons/lalr1.cc b/data/skeletons/lalr1.cc
index b9a3c98d..4a7b71dd 100644
--- a/data/skeletons/lalr1.cc
+++ b/data/skeletons/lalr1.cc
@@ -846,7 +846,7 @@ b4_dollar_popdef])[]dnl
   | yynewstate -- push a new symbol on the stack.  |
   `-----------------------------------------------*/
   yynewstate:
-    YYCDEBUG << "Entering state " << yystack_[0].state << '\n';
+    YYCDEBUG << "Entering state " << int (yystack_[0].state) << '\n';
 
     // Accept?
     if (yystack_[0].state == yyfinal_)
@@ -1427,7 +1427,7 @@ b4_error_verbose_if([state_type yystate, const 
symbol_type& yyla],
            i = yystack_.begin (),
            i_end = yystack_.end ();
          i != i_end; ++i)
-      *yycdebug_ << ' ' << i->state;
+      *yycdebug_ << ' ' << int (i->state);
     *yycdebug_ << '\n';
   }
 


Reply via email to