glr2.cc: add support for parse.assert

* data/skeletons/glr2.cc: Fake support of parse.assert, so that the
tests can use it without failing.
This commit is contained in:
Akim Demaille
2020-12-05 07:42:53 +01:00
parent 349ea900f5
commit 3301849f0f
2 changed files with 6 additions and 1 deletions

4
TODO
View File

@@ -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.

View File

@@ -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