%merge: fix compatibility with api.value.type=union

Reported by Jot Dot.
https://lists.gnu.org/r/help-bison/2020-12/msg00014.html

* data/skeletons/glr.c, data/skeletons/glr2.cc (b4_call_merger): Use
the symbol's slot, not its type.
* examples/c/glr/c++-types.y: Use explicit per-symbol typing together
with api.value.type=union.
(yylex): Use yytoken_kind_t.
This commit is contained in:
Akim Demaille
2020-12-31 07:20:49 +01:00
parent c09f2e4c7b
commit fbe5abd23d
4 changed files with 31 additions and 13 deletions

9
TODO
View File

@@ -2,6 +2,15 @@
** glr
There is no test with "Parse on stack %ld rejected by rule %d" in it.
** %merge
Tests with typed %merge: 716 717 718 740 741 742 746 747 748
716: Duplicate representation of merged trees: glr.c FAILED (glr-regression.at:517)
740: Leaked semantic values if user action cuts parse: glr.c FAILED (glr-regression.at:1230)
746: Incorrect lookahead during nondeterministic GLR: glr.c FAILED (glr-regression.at:1610)
Document typed merges.
** yyrline etc.
Clarify that rule numbers in the skeletons are 1-based.