[antlr-interest] Out of memory error
Terence Parr
parrt at cs.usfca.edu
Wed Mar 14 15:45:03 PDT 2007
Yeah, it's building a big DFA for that decision probably. It needs
more than the usual 64M or is it even 32M default?
Ter
On Mar 14, 2007, at 3:33 PM, Mark Bednarczyk wrote:
> I keep getting the out of heap memory error under certain
> conditions, and
> I've been trying to figure out how to specify vmargs to the ANTLR3
> task so
> that I can increase the defaul 64mb to something like 512mb. Anyone
> know how
> to do that. ANTLR3 task doesn't provide any VM options. I did
> verify that
> ANT spawns a new java VM to run the subtask for org.antlr.Tool with
> process
> explorer.
>
> Buildfile: C:\jnetstream\NplLanguage\grammar.xml
> [echo] pulling in property files
> grammar:
> [echo] grammar
> [antlr:antlr3] ANTLR Parser Generator Version 3.0b6 (Jan 31, 2007)
> 1989-2007
> [antlr:antlr3] Exception in thread "main"
> java.lang.OutOfMemoryError: Java
> heap space
> [antlr:antlr3] at java.util.Arrays.copyOf(Arrays.java:2882)
> [antlr:antlr3] at
> java.lang.AbstractStringBuilder.expandCapacity
> (AbstractStringBuilder.java:10
> 0)
> [antlr:antlr3] at
> java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
> [antlr:antlr3] at java.lang.StringBuffer.append(StringBuffer.java:224)
> [antlr:antlr3] at java.io.StringWriter.write(StringWriter.java:84)
> [antlr:antlr3] at
> org.antlr.stringtemplate.AutoIndentWriter.indent
> (AutoIndentWriter.java:208)
> [antlr:antlr3] at
> org.antlr.stringtemplate.AutoIndentWriter.write
> (AutoIndentWriter.java:133)
>
>
> Here is the rule that triggers this error. If I comment out the second
> alternative, I don't run out of memory:
>
> tableBody
> : ('{' tableConstant)
> => ('{' tableConstants blockStatement* '}')
> -> ^(SLIST tableConstants+)
>
> | '{' blockStatement* '}'
> ;
>
> Cheers,
> mark...
>
>
More information about the antlr-interest
mailing list