On 13 Nov 2017, at 18:22, Péter <e2qb2a...@prolan-power.hu> wrote:

> and does *not* try to resume from errors (yyerror() is fatal, it exits),

You might have a top level error recovery that reset stuff, say:

body:
    %empty
  | body_contents {}
  | error {
      /* Reset stuff. */
      YYABORT;
    }
;

> then for each action (call it "action0"), one can be sure that, for example, 
> if the rule is
> ...
> | alfa "+" beta ";" {action0}
> ...
> ;
> 
> then the preceding action was one of beta's actions (the last nonterminal), 

You only know that the values have been computed and put onto the stack. As it 
is LR, the derivation is the rightmost. Put in printouts in your alpha and beta 
to see what happens.



_______________________________________________
help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to