[antlr-interest] ANTLR v3.3 infinite loop
Terence Parr
parrt at cs.usfca.edu
Wed Dec 1 18:00:13 PST 2010
ah. ok, give it more RAM :) wait state 39468? Hmm...can you send me your grammar offline?
Ter
On Dec 1, 2010, at 5:38 PM, Rene Vestergaard wrote:
>> hi. please turn on [-Xwatchconversion] and see which decision kills
> it. this is rare but not impossible. Then, add backtrack=true and k=1
> options to that decision to resolve. or restructure that decision.
>
>
> I'm not sure I understand the answer.
>
> When running 3.3 with -Xwatchconversion and -Xmx256MB, heap space runs
> out and the output ends with the lines enclosed below. I gather that you
> are saying that there is some way to map that info back into the name
> space of my .g file but the specific means to do this escapes me.
>
> For 3.2, the max DFA state is 575, by the way.
>
> Cheers,
> Rene
>
>
> convert DFA state 39452 (90 nfa states)
> convert DFA state 39453 (90 nfa states)
> convert DFA state 39454 (50 nfa states)
> convert DFA state 39455 (62 nfa states)
> convert DFA state 39456 (15 nfa states)
> convert DFA state 39467 (92 nfa states)
> convert DFA state 39468 (92 nfa states)
> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
> at java.util.Arrays.copyOf(Arrays.java:2734)
> at java.util.Vector.ensureCapacityHelper(Vector.java:226)
> at java.util.Vector.setSize(Vector.java:242)
> at org.antlr.analysis.DFA.newState(DFA.java:1076)
> at org.antlr.analysis.NFAToDFAConverter.reach(NFAToDFAConverter.java:850)
> at
> org.antlr.analysis.NFAToDFAConverter.findNewDFAStatesAndAddDFATransitions(NFAToDFAConverter.java:275)
> at org.antlr.analysis.NFAToDFAConverter.convert(NFAToDFAConverter.java:110)
> at org.antlr.analysis.DFA.<init>(DFA.java:237)
> at org.antlr.tool.Grammar.createLookaheadDFA(Grammar.java:1262)
> at org.antlr.tool.Grammar.createLookaheadDFAs(Grammar.java:1026)
> at org.antlr.tool.Grammar.createLookaheadDFAs(Grammar.java:976)
> at org.antlr.codegen.Target.performGrammarAnalysis(Target.java:113)
> at org.antlr.codegen.CodeGenerator.genRecognizer(CodeGenerator.java:302)
> at org.antlr.Tool.generateRecognizer(Tool.java:642)
> at org.antlr.Tool.process(Tool.java:455)
> at org.antlr.Tool.main(Tool.java:89)
>
>
>
> 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