On Tue, 13 Jun 2006, David Russinoff wrote:

> According to my naive understanding of the Yacc/Bison algorithm
> (derived from a cursory reading of the "dragon book"), I would expect
> the parser generated from the grammar
> 
>   p: a;
>   p: 'b';
>   a: p;
> 
> to execute an infinite loop on the following input:
> 
>   b b
> 
> This conjecture is supported by the "output" file that my version of
> Bison writes for this grammar, which lists the following states
> and transitions:

You're missing lookahead information.  Try `bison --report=all'.

Joel


_______________________________________________
[email protected] http://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to