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.)


Hans Åberg:
> %token LEFT_BRACKET "["
> %token RIGHT_BRACKET "]"
> %token COMMA ","
> %%
>  list:
>    "[" sequence "]"
>  sequence:
>      %empty { $$ = new list; }
>    | sequence[x] "," element[y] { $$ = $x.append($y); }
>  ;


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

Reply via email to