[Please keep the cc to the list so that others can follow.] > On 13 Nov 2017, at 13:39, Péter <e2qb2a...@prolan-power.hu> wrote: > > > Could not it happen that for bison some input seems first as "A", then later > becomes clear that it is not quite "A" but "B"? And by that time (realizing > that it is "B") bison have already played some of the actions related to > "A"..? > > For example, in the case of our list, we already appended (by mistake) some > items to the list.. > > (I have noticed "%glr-parser" which is an advanced bison directive but I am > not using it sofar and do not intend to.)
If the grammar is unambiguous relative to the parser algorithm, by default LALR(1), then the grammar rules are treated as a set and the correct ones to apply are computed. If there is an ambiguity, Bison chooses the one first in the grammar; if one wants to sort that out, one might try the GLR parser. _______________________________________________ help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison