glr2.cc: fix GLR stack expansion

When expanding the GLR stack, none of the pointers were updated to
reflect the new location of the displaced objects.

This fixes

    748: Incorrect lookahead during nondeterministic GLR: glr2.cc

* data/skeletons/glr2.cc (yyexpandGLRStack): Update the split point
and the stack tops.
(reduceToOneStack): Factor a bit.
This commit is contained in:
Akim Demaille
2020-12-20 08:27:18 +01:00
parent 718cb1ab38
commit fe0102d4d5
2 changed files with 31 additions and 10 deletions

View File

@@ -1388,7 +1388,6 @@ m4_pushdef([AT_TEST],
[AT_SETUP([Incorrect lookahead during nondeterministic GLR: $1])
AT_BISON_OPTION_PUSHDEFS([%glr-parser %locations $1])
AT_GLR2_CC_IF([AT_XFAIL_IF([true])])
AT_DATA_GRAMMAR([glr-regr14.y],
[[