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 [EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
[antlr3] Exception in thread "main" java.lang.OutOfMemoryError: Java heap space [antlr3] at java.util.ArrayList.<init>(ArrayList.java:112) [antlr3] at java.util.ArrayList.<init>(ArrayList.java:119) [antlr3] at org.antlr.analysis.DFAState.getConflictingAlts(DFAState.java:543) [antlr3] at org.antlr.analysis.DFAState.getNonDeterministicAlts(DFAState.java:500) [antlr3] at org.antlr.analysis.NFAToDFAConverter.resolveNonDeterminisms(NFAToDFAConverter.java:1193) [antlr3] at org.antlr.analysis.NFAToDFAConverter.addDFAStateToWorkList(NFAToDFAConverter.java:983) [antlr3] at org.antlr.analysis.NFAToDFAConverter.findNewDFAStatesAndAddDFATransitions(NFAToDFAConverter.java:311) [antlr3] at org.antlr.analysis.NFAToDFAConverter.convert(NFAToDFAConverter.java:102) [antlr3] at org.antlr.analysis.DFA.<init>(DFA.java:219) [antlr3] at org.antlr.tool.Grammar.createLookaheadDFA(Grammar.java:862) [antlr3] at org.antlr.tool.Grammar.createLookaheadDFAs(Grammar.java:797) [antlr3] at org.antlr.codegen.Target.performGrammarAnalysis(Target.java:114) [antlr3] at org.antlr.codegen.CodeGenerator.genRecognizer(CodeGenerator.java:276) [antlr3] at org.antlr.Tool.processGrammar(Tool.java:347) [antlr3] at org.antlr.Tool.process(Tool.java:268) [antlr3] at org.antlr.Tool.main(Tool.java:70)
[antlr3] Exception in thread "main" java.lang.OutOfMemoryError: Java heap space [antlr3] at java.lang.Class.getDeclaredMethods0(Native Method) [antlr3] at java.lang.Class.privateGetDeclaredMethods(Class.java:2427) [antlr3] at java.lang.Class.getMethod0(Class.java:2670) [antlr3] at java.lang.Class.getMethod(Class.java:1603) [antlr3] at org.antlr.stringtemplate.language.ASTExpr.getMethod(ASTExpr.java:570) [antlr3] at org.antlr.stringtemplate.language.ASTExpr.rawGetObjectProperty(ASTExpr.java:504) [antlr3] at org.antlr.stringtemplate.language.ASTExpr.getObjectProperty(ASTExpr.java:420) [antlr3] at org.antlr.stringtemplate.language.ActionEvaluator.attribute(ActionEvaluator.java:346) [antlr3] at org.antlr.stringtemplate.language.ActionEvaluator.expr(ActionEvaluator.java:131) [antlr3] at org.antlr.stringtemplate.language.ActionEvaluator.ifAtom(ActionEvaluator.java:802) [antlr3] at org.antlr.stringtemplate.language.ActionEvaluator.ifCondition(ActionEvaluator.java:775) [antlr3] at org.antlr.stringtemplate.language.ConditionalExpr.write(ConditionalExpr.java:79) [antlr3] at org.antlr.stringtemplate.StringTemplate.write(StringTemplate.java:714) [antlr3] at org.antlr.stringtemplate.language.ASTExpr.write(ASTExpr.java:722) [antlr3] at org.antlr.stringtemplate.language.ASTExpr.writeAttribute(ASTExpr.java:659) [antlr3] at org.antlr.stringtemplate.language.ActionEvaluator.action(ActionEvaluator.java:81) [antlr3] at org.antlr.stringtemplate.language.ASTExpr.write(ASTExpr.java:152) [antlr3] at org.antlr.stringtemplate.StringTemplate.write(StringTemplate.java:714) [antlr3] at org.antlr.stringtemplate.language.ConditionalExpr.write(ConditionalExpr.java:93) [antlr3] at org.antlr.stringtemplate.StringTemplate.write(StringTemplate.java:714) [antlr3] at org.antlr.stringtemplate.language.ASTExpr.write(ASTExpr.java:722) [antlr3] at org.antlr.stringtemplate.language.ASTExpr.writeAttribute(ASTExpr.java:659) [antlr3] at org.antlr.stringtemplate.language.ActionEvaluator.action(ActionEvaluator.java:81) [antlr3] at org.antlr.stringtemplate.language.ASTExpr.write(ASTExpr.java:152) [antlr3] at org.antlr.stringtemplate.StringTemplate.write(StringTemplate.java:714) [antlr3] at org.antlr.stringtemplate.language.ConditionalExpr.write(ConditionalExpr.java:100) [antlr3] at org.antlr.stringtemplate.StringTemplate.write(StringTemplate.java:714) [antlr3] at org.antlr.stringtemplate.language.ASTExpr.write(ASTExpr.java:722) [antlr3] at org.antlr.stringtemplate.language.ASTExpr.writeAttribute(ASTExpr.java:659) [antlr3] at org.antlr.stringtemplate.language.ActionEvaluator.action(ActionEvaluator.java:81) [antlr3] at org.antlr.stringtemplate.language.ASTExpr.write(ASTExpr.java:152) [antlr3] at org.antlr.stringtemplate.StringTemplate.write(StringTemplate.java:714)
List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org:8080/mailman/options/antlr-interest/your-email-address
