[erlang-bugs] Yecc bug (possibly related to mutually recursive rules)

Hans Bolinder <>
Tue Mar 2 12:19:54 CET 2010


[Manolis Papadakis:]
> This grammar file:
> 
> Nonterminals elem seq.
> Terminals 'foo' 'bar' ':'.
> Rootsymbol elem.
> elem -> 'foo'.
> elem -> 'bar'.
> elem -> seq.
> seq -> elem.
> seq -> seq ':' elem.
> % or seq -> elem ':' seq.
> 
> when fed to yecc (git version) produces this error:
> 
> 2> yecc:file("bug.yrl").
...
> ** exception exit: function_clause
>      in function  yecc:find_reduce_reduce/2
>         called as
> yecc:find_reduce_reduce([accept,{reduce,10,seq,1,{0,none},undefined}],
...

Thanks. The bug will be fixed in R14A.

In the meantime, to get the error report, you can add a dummy rule:

  Rootsymbol RS.
  RS -> elem.

Best regards,

Hans Bolinder, Erlang/OTP team, Ericsson


More information about the erlang-bugs mailing list