glr2.cc: add an example

Currently this example crashes on input such as "T (x) + y;".
The same example with glr.c works properly.

* examples/c++/glr/Makefile, examples/c++/glr/README.md,
* examples/c++/glr/c++-types.test, examples/c++/glr/c++-types.yy,
* examples/c++/glr/local.mk, examples/c++/local.mk: New.
Based on examples/c/glr/c++-types.y.
This commit is contained in:
Akim Demaille
2020-09-26 08:33:14 +02:00
parent 3add9ffbde
commit f9b360663b
9 changed files with 413 additions and 4 deletions

View File

@@ -2092,7 +2092,7 @@ public:
{
state_set_index yynewStack = yystateStack.yysplitStack (yyk);
YY_DEBUG_STREAM << "Splitting off stack " << yynewStack.get()
<< " from " << yyk.get();
<< " from " << yyk.get() << '\n';
YYRESULTTAG yyflag =
yyglrReduce (yynewStack, *yyconflicts,
yyimmediate[*yyconflicts]);