On 14 Jun 2006, at 00:09, Joel E. Denny wrote:

On Tue, 13 Jun 2006, Sylvain Schmitz wrote:

Since we are talking about conflicts and looping parsers, there is a
possibility for an infinite loop with bison's conflict resolution in LALR(1).
See attached file loop.y.

Here's one that uses rule order rather than precedence declarations:

  S: A ;
  B: C ;
  C: B ;
  A: B ;
  C: 'a' ;

Input is just 'a'.

My guess is that it is the strongly connected components (SCC) among non-shiftable rules that causes problems. The Bison method of resolving reduce/reduce conflicts by only selecting the first one only resolves loops of at most length two.

  Hans Aberg




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

Reply via email to