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:
Akim Demaille
2001-12-29 14:24:51 +00:00
parent 8419d367e1
commit 82c035a823
6 changed files with 105 additions and 12 deletions

View File

@@ -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