[antlr-interest] OutOfMemoryError: Java Heap Space

Henrique hjrnunes at student.dei.uc.pt
Wed Aug 6 12:11:42 PDT 2008


Hi guys!
I'm trying to write a parser for the Context Free Art tool but I don't want
to use yacc so I tried converting their grammar to antlr. It's quite simple
but I'm getting an OutOfMemoryError when I try to run my test rig with a
test file. ANTLRworks checks it ok but doesn't debug - gives timeout error.
Here's the stack trace:

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
    at java.util.Arrays.copyOf(Unknown Source)
    at java.util.Arrays.copyOf(Unknown Source)
    at java.util.ArrayList.ensureCapacity(Unknown Source)
    at java.util.ArrayList.add(Unknown Source)
    at
org.antlr.runtime.CommonTokenStream.fillBuffer(CommonTokenStream.java:116)
    at org.antlr.runtime.CommonTokenStream.LT(CommonTokenStream.java:238)
    at org.antlr.runtime.CommonTokenStream.LA(CommonTokenStream.java:300)
    at cfdgParser.cfdg(cfdgParser.java:68)
    at TestRig.main(TestRig.java:25)

check the grammar here <http://hjrnunes.googlepages.com/antlrgrammar>.
I think I solved the left recursions right but I maybe missing something...
Please advise.
Thanks,

Henrique Nunes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080806/374c3945/attachment.html 


More information about the antlr-interest mailing list