[antlr-interest] Problem generating the Java parser for Oracle PL/SQL grammar

Javier Luis Cánovas Izquierdo zirrus at gmail.com
Fri Oct 31 03:36:20 PDT 2008


Hi,

I am working with ANTLRv3 and the Oracle PL/SQL grammar definition
which is located in the antlr grammar list webpage and whose author is
Andrey Kharitonkin. I need to enrich the grammar in order to create a
data structure of the parsed plsql text. However, I have a problem on
the first phase: I cannot generate the Java parser with ANTLR tool
from the grammar of the webpage.

The grammar has activated the backtrack and memoize options and the k
value is *. When I try to generate the parser, I get a
"java.lang.OutOfMemoryError: Java heap space" (firstTrace.txt file
contains the stack trace of this situation). I have tried to
deactivate the backtrack and memoize options and to set the k value to
1 (although it will cause warnings during the generation) and the
problem keeps on (secondTrace.txt file contains the stack trace of
this situation).

I have changed the parameters of the JVM to increase the memory limit
of the virtual machine to 1gb and again, the problem goes on .
However, the memory charge of the java instance does not exceed 100mb.
I cannot understand it.

I have to be doing some wrong because the grammar that I am using is
the same of the grammar list, I have not change anything. I have seen
that the grammar has the "language=CSharp" option. Could that be the
problem? Could you help me?

Thanks

-- 
Javier Luis Cánovas Izquierdo
http://zirrus.es
zirrus at gmail.com
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: firstTrace.txt
Url: http://www.antlr.org/pipermail/antlr-interest/attachments/20081031/14f3b739/attachment.txt 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: secondTrace.txt
Url: http://www.antlr.org/pipermail/antlr-interest/attachments/20081031/14f3b739/attachment-0001.txt 


More information about the antlr-interest mailing list