Javier Luis Cánovas Izquierdo schrieb:
> 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

You have two problems: The first is that you need to tell the Java VM to
use more memory like "java -Xmx1024m ...". Adjust the number to your
needs. The second problem is that the grammar has been developed with C#
as the output language. Changing "CSharp" to "Java" (or removing that
line) won't help entirely, as all actions are written in C#. You have to
go trough them one by one and fix any incompatibilities.

Johannes
> 
> 
> 
> ------------------------------------------------------------------------
> 
> 
> List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest
> Unsubscribe: 
> http://www.antlr.org:8080/mailman/options/antlr-interest/your-email-address
> 


List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org:8080/mailman/options/antlr-interest/your-email-address


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to