mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-10 21:03:04 +00:00
Mid-rule actions are simply... ignored!
* src/reader.c (readgram): Be sure to attach mid-rule actions to the empty-rule associated to the dummy symbol, not to the host rule. * tests/actions.at (Mid-rule actions): New.
This commit is contained in:
@@ -1357,6 +1357,11 @@ readgram (void)
|
||||
p = symbol_list_new (sdummy);
|
||||
/* Attach its lineno to that of the host rule. */
|
||||
p->line = crule->line;
|
||||
/* Move the action from the host rule to this one. */
|
||||
p->action = crule->action;
|
||||
p->action_line = crule->action_line;
|
||||
crule->action = NULL;
|
||||
|
||||
if (crule1)
|
||||
crule1->next = p;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user