[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: avoiding infinite loops
From: |
Joel E. Denny |
Subject: |
Re: avoiding infinite loops |
Date: |
Tue, 13 Jun 2006 13:30:44 -0400 (EDT) |
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
Re: avoiding infinite loops, Hans Aberg, 2006/06/13
Re: avoiding infinite loops, Joel E. Denny, 2006/06/13