[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 08/10] glr2.cc: add support for parse.assert
From: |
Akim Demaille |
Subject: |
[PATCH 08/10] glr2.cc: add support for parse.assert |
Date: |
Sun, 6 Dec 2020 14:10:35 +0100 |
* data/skeletons/glr2.cc: Fake support of parse.assert, so that the
tests can use it without failing.
---
TODO | 4 ++++
data/skeletons/glr2.cc | 3 ++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/TODO b/TODO
index fa9cee52..e1bcb8d1 100644
--- a/TODO
+++ b/TODO
@@ -198,6 +198,10 @@ yycharp is no longer a Pointer. And yystackp should
probably also be a referenc
Don't use YYSTYPE and YYLTYPE but parser::semantic_type and
parser::location_type. Undefine YYSTYPE and YYLTYPE.
+*** parse.assert
+Currently all the assertions are enabled. Once we are confident in glr2.cc,
+let parse.assert use the same approach as in lalr1.cc.
+
*** glr.c
When glr2.cc fully replaces glr.cc, get rid of the glr.cc scaffolding in
glr.c.
diff --git a/data/skeletons/glr2.cc b/data/skeletons/glr2.cc
index 6b60b38f..68d114bd 100644
--- a/data/skeletons/glr2.cc
+++ b/data/skeletons/glr2.cc
@@ -456,7 +456,6 @@ static YYLTYPE yyloc_default][]b4_yyloc_default;])[
[#include <cstdio>
#include <cstdlib>
-
#ifndef YY_
# if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS
@@ -504,6 +503,8 @@ static YYLTYPE yyloc_default][]b4_yyloc_default;])[
]b4_null_define[
]b4_cast_define[
+// FIXME: Use the same conventions as lalr1.cc.
+]b4_parse_assert_if[
#ifndef YYASSERT
# define YYASSERT(Condition) ((void) ((Condition) || (abort (), 0)))
#endif
--
2.29.2
- [PATCH 00/10] glr2.cc: fixes, Akim Demaille, 2020/12/06
- [PATCH 01/10] glr.c: fix line numbers in logs, Akim Demaille, 2020/12/06
- [PATCH 02/10] glr2.cc: fix when the stack is not expandable, Akim Demaille, 2020/12/06
- [PATCH 03/10] glr2.cc: use 'const' for some constant local variables, Akim Demaille, 2020/12/06
- [PATCH 04/10] glr2.cc: turn some pointers into references, Akim Demaille, 2020/12/06
- [PATCH 05/10] glr2.cc: fix memory corruption bug, Akim Demaille, 2020/12/06
- [PATCH 06/10] glr2.cc: misc cleanups, Akim Demaille, 2020/12/06
- [PATCH 07/10] glr2.cc: fix yyresolveValue, Akim Demaille, 2020/12/06
- [PATCH 08/10] glr2.cc: add support for parse.assert,
Akim Demaille <=
- [PATCH 09/10] glr2.cc: use the same format for traces as glr.c, Akim Demaille, 2020/12/06
- [PATCH 10/10] glr2.cc: run the glr-regression tests, Akim Demaille, 2020/12/06