[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
- [PATCH 0/6] More CI and fixes, Akim Demaille, 2019/09/06
- [PATCH 1/6] CI: fail fast, Akim Demaille, 2019/09/06
- [PATCH 3/6] style: fix comment, Akim Demaille, 2019/09/06
- [PATCH 2/6] CI: more compilers, Akim Demaille, 2019/09/06
- [PATCH 4/6] lalr1.cc: fix LAC support,
Akim Demaille <=
- [PATCH 5/6] yacc.c: beware of GCC's -Wmaybe-uninitialized, Akim Demaille, 2019/09/06
- [PATCH 6/6] glr.c: initialize vector of bools, Akim Demaille, 2019/09/06