[antlr-interest] newbie Q: infinite recursion in grammar

Chris Rebert cvrebert at gmail.com
Wed Sep 6 21:54:52 PDT 2006


Hello.

This is probably a newbie question, but with my grammar
(http://home.mindspring.com/~krebert/iguana.g), I get a bunch of errors
of the form:

"infinite recursion to rule expr from rule $some_grammar_production"

when running ANTLR on it.
I think this has something to do with precedence in my grammar.
I couldn't find any way to set the precedence of grammar rules like I
can in yacc in the docs.
If it's not possible to set precedence in this way, could someone advise
me (roughly) as to how I need to restructure my grammar?

Thank you for taking the time to read this.

- Chris R.


More information about the antlr-interest mailing list