[antlr-interest] java.lang.OutOfMemoryError: Java heap space
Wincent Colaiuta
win at wincent.com
Tue Jun 5 11:56:23 PDT 2007
El 5/6/2007, a las 20:51, Terence Parr escribió:
> On Jun 5, 2007, at 11:18 AM, Wincent Colaiuta wrote:
>
>> When I try to pipe this through ANTLR (v3 final) I get this:
>>
>> Exception in thread "main" java.lang.OutOfMemoryError: Java heap
>> space
>>
>> I tried cranking up the heap size, 256 MB, 512 MB, 768 MB and so
>> on...
>>
>> java -Xms32m -Xmx2048m org.antlr.Tool RFC3986.g
>>
>> But to no avail... I got up to almost a gig and a half before swap
>> start thrashing itself to death and I had to kill the ANTLR
>> process. The funny thing is the grammar check works fine in
>> ANTLRWorks (no warnings printed to the console), it has no
>> problems showing me syntax diagrams, producing rule dependency
>> graphs, or handling input that I pass in via the interpreter.
>
> That is really really strange. Are you sure that the commandline
> version is v3.0?
I believe so:
$ java org.antlr.Tool --version
ANTLR Parser Generator Version 3.0 (May 17, 2007) 1989-2007
$ echo $CLASSPATH
/usr/local/antlr/lib/antlr-3.0.jar:/usr/local/antlr/lib/
antlr-2.7.7.jar:/usr/local/antlr/lib/antlr-runtime-3.0.jar:/usr/local/
antlr/lib/stringtemplate-3.0.jar
$ ls -laF /usr/local/antlr/lib/*.jar
-rw-r--r-- 1 wincent wincent 445288 May 17 21:26 /usr/local/antlr/
lib/antlr-2.7.7.jar
-rw-r--r-- 1 wincent wincent 546514 May 17 21:26 /usr/local/antlr/
lib/antlr-3.0.jar
-rw-r--r-- 1 wincent wincent 92015 May 17 21:26 /usr/local/antlr/
lib/antlr-runtime-3.0.jar
-rw-r--r-- 1 wincent wincent 161716 May 17 21:26 /usr/local/antlr/
lib/stringtemplate-3.0.jar
Anything else I can check? Or secret commandline switches I can pass
or environment variables I can set to get ANTLR to print more
diagnostic info?
Cheers,
Wincent
More information about the antlr-interest
mailing list