[antlr-interest] ANTLRWorks 1.4.3 infinite loop during grammar check

Jim Idle jimi at temporal-wave.com
Thu Sep 8 08:34:32 PDT 2011


Need to see the grammar I think.

Jim

> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Graham Mer
> Sent: Thursday, September 08, 2011 3:23 AM
> To: antlr-interest at antlr.org
> Subject: [antlr-interest] ANTLRWorks 1.4.3 infinite loop during grammar
> check
>
> I just updated to ANTLRWorks 1.4.3, and a grammar that previously
> verified correctly in the previous version of ANTLRWorks now never
> completes verification or generation from within ANTLRWorks. The
> following stack trace appears in the console, and the progress bar
> never terminates:
>
> Exception in thread "Thread-10" java.lang.StackOverflowError
> 	at java.util.HashMap$KeyIterator.<init>(HashMap.java:826)
> 	at java.util.HashMap$KeyIterator.<init>(HashMap.java:826)
> 	at java.util.HashMap.newKeyIterator(HashMap.java:840)
> 	at java.util.HashMap$KeySet.iterator(HashMap.java:874)
> 	at java.util.HashSet.iterator(HashSet.java:153)
> 	at
> java.util.AbstractCollection.addAll(AbstractCollection.java:303)
> 	at java.util.HashSet.<init>(HashSet.java:100)
> 	at
> org.antlr.analysis.SemanticContext.factorOr(SemanticContext.java:756)
> 	at
> org.antlr.analysis.SemanticContext.and(SemanticContext.java:609)
> 	at
> org.antlr.analysis.SemanticContext.and(SemanticContext.java:616)
> 	(the last line repeats hundreds of times)
>
> I have tried increasing both the stack and heap for ANTLRWorks, no
> improvement. Other grammars still pass, but this complex one apparently
> causes ANTLRWorks to enter unterminated recursion. The grammar still
> generates correctly with no errors from ANTLR 3.4 via the ant task, so
> this appears to be limited to ANTLRWorks.
>
> Is this a known issue?
>
> Java(TM) SE Runtime Environment (build 1.6.0_26-b03-384-10M3425) Java
> HotSpot(TM) 64-Bit Server VM (build 20.1-b02-384, mixed mode) Mac OS X
> 10.6.8
>
> 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