So, does it stand, regarding bison that (at least):

If one does not define
 %define lr.type
so it remains the default "lalr",

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

and bison is called with warning swithes
 -Wall -Werror
(and there is no "-Wno-conflicts-sr" nor "-Wno-conflicts-rr")

and there are no "%expect-rr" nor "%expect" directives,

and there are no midrule-actions,

and there are no precedences nor associativities,


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), 
i.e. if beta can be produced by three rules:
beta: .... {action1} | .... {action2} | .... {action3} ;
then the last action before action0 have to be one of action1, action2 or 
action3
?


Hans Åberg:
If the grammar is unambiguous relative to the parser algorithm, by default 
LALR(1), then the grammar rules are treated as a set and


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

Reply via email to