mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13:03 +00:00
%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:
@@ -152,7 +152,7 @@ m4_define([b4_rhs_location],
|
||||
m4_define([b4_call_merger],
|
||||
[b4_case([$1],
|
||||
[ b4_symbol_if([$3], [has_type],
|
||||
[yy0->b4_symbol($3, type) = $2 (*yy0, *yy1);],
|
||||
[yy0->b4_symbol($3, slot) = $2 (*yy0, *yy1);],
|
||||
[*yy0 = $2 (*yy0, *yy1);])])])
|
||||
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@ m4_define([b4_rhs_location],
|
||||
m4_define([b4_call_merger],
|
||||
[b4_case([$1],
|
||||
[ b4_symbol_if([$3], [has_type],
|
||||
[yy0->b4_symbol($3, type) = $2 (*yy0, *yy1);],
|
||||
[yy0->b4_symbol($3, slot) = $2 (*yy0, *yy1);],
|
||||
[*yy0 = $2 (*yy0, *yy1);])])])
|
||||
|
||||
# b4_lex
|
||||
|
||||
Reference in New Issue
Block a user