[antlr-interest] Infinite loop after upgrade to 3.3

Ben Dotte ben.dotte at gmail.com
Tue Oct 11 13:08:34 PDT 2011


Yes, there are a couple rules with semantic predicates:

fieldSearch
: (TEXT ':'^)? (subSearch | negationSearch)
;

negationSearch
: ('-'^)? (quotedSearch | dateRangeSearch | comparisonSearch | idSearch |
wildcardSearch | term)
;

On Tue, Oct 11, 2011 at 2:55 PM, Terence Parr <parrt at cs.usfca.edu> wrote:

> any semantic preds?
> T
> On Oct 11, 2011, at 12:43 PM, Ben Dotte wrote:
>
> > Hi,
> >
> > I'm trying to upgrade our Java Antlr runtime from 3.1.2 to 3.3, but
> running
> > into an infinite loop in the parser. I'm a little puzzled about the best
> way
> > to troubleshoot this. Everything worked fine in 3.1.2.
> >
> > Basically, anything I try to run through the parser in my application to
> > generate the AST just sits there. Watching a threaddump, I can see it
> > bouncing around between the different parser rules, but it never finishes
> > and never throws any exceptions either.
> >
> > I can run the same input through ANTLRWorks 1.4.2 and it executes just
> fine
> > and gives me the right AST output.
> >
> > I also tried the 3.4 runtime with the same result.
> >
> > Any pointers would be much appreciated.
> >
> > Thanks!
> >
> > Ben
> >
> > List: http://www.antlr.org/mailman/listinfo/antlr-interest
> > Unsubscribe:
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>
>


More information about the antlr-interest mailing list