bison-patches
[Top][All Lists]
Advanced

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

[PATCH 4/6] lalr1.cc: fix LAC support


From: Akim Demaille
Subject: [PATCH 4/6] lalr1.cc: fix LAC support
Date: Fri, 6 Sep 2019 22:27:51 +0200

* data/skeletons/lalr1.cc (ctor): Initialize yy_lac_established_.
This is quite painful to write, and ugly to read.
---
 data/skeletons/lalr1.cc | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/data/skeletons/lalr1.cc b/data/skeletons/lalr1.cc
index cf11fba3..13c9bdc4 100644
--- a/data/skeletons/lalr1.cc
+++ b/data/skeletons/lalr1.cc
@@ -576,12 +576,14 @@ m4_if(b4_prefix, [yy], [],
 ]])[
 
   /// Build a parser object.
-  ]b4_parser_class::b4_parser_class[ 
(]b4_parse_param_decl[)]m4_ifset([b4_parse_param], [
-    :])[
+  ]b4_parser_class::b4_parser_class[ (]b4_parse_param_decl[)
 #if ]b4_api_PREFIX[DEBUG
-    ]m4_ifset([b4_parse_param], [  ], [ :])[yydebug_ (false),
-      yycdebug_ (&std::cerr)]m4_ifset([b4_parse_param], [,])[
-#endif]b4_parse_param_cons[
+    : yydebug_ (false),
+      yycdebug_ (&std::cerr)]b4_lac_if([,], [m4_ifset([b4_parse_param], [,])])[
+#else
+]b4_lac_if([    :], [m4_ifset([b4_parse_param], [    :])])[
+#endif]b4_lac_if([[
+      yy_lac_established_ (false)]m4_ifset([b4_parse_param], 
[,])])[]b4_parse_param_cons[
   {}
 
   ]b4_parser_class::~b4_parser_class[ ()
-- 
2.23.0




reply via email to

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