Community
Participate
Working Groups
Build Identifier: 20100917-0705 The attached grammar produces ANTLR warnings. But when you comment out an arbitrary line from the grammar(leaving a valid grammar) the warnings disappear. Reproducible: Always Steps to Reproduce: 1. Run the GenerateMyDsl003.mwe2 workflow 2. ANTLR warnings appear as in the attached logfile.
Created attachment 194138 [details] project folder for the attached grammar This attachment is the project folder of the attached grammar.
Created attachment 194139 [details] Logfile with the ANTLR warnings
I did not find the time to look at the attached archive but could this one be related to http://20000frames.blogspot.com/2010/09/dealing-with-could-not-even-do-k1-for.html
I tried the mentioned antlParameter but they did not fix the problem. I guess the problem is different. The warnings talk about "Multiple token rules can match input such as..." which seems to be a problem of ambiguous token path in the grammar rules. Is it possible to tell ANTLR to take a given lookahead token count for an Xtext grammar? Irritating is also that every conflict contains the token rule RULE_ANY_OTHER which matches any character. But this rule seems to be added by Xtext or ANTLR. I did not use this rule explicitly.
The archive does not contain your grammar. Please attach it as plain text. Thanks.
The archive contains two complet eclipse projects where one contains the grammar. I added the complete project folders enableing you to start from scratch. But I can attach the plain grammar too.
Created attachment 194497 [details] Plain grammar file
I created a new Xtext 1.0.1 project and pasted the grammar into the Xtext editor. The generation went flawlessly (see log output below). Did you customize the mwe2 workflow? Log: 0 [main] INFO lipse.emf.mwe.utils.StandaloneSetup - Registering platform uri '/development/java/eclipse/eclipse-3.6-ocl/ws' 796 [main] INFO ipse.emf.mwe.utils.DirectoryCleaner - Cleaning /development/java/eclipse/eclipse-3.6-ocl/ws/org.xtext.example.mydsl/../org.xtext.example.mydsl/src-gen 797 [main] INFO ipse.emf.mwe.utils.DirectoryCleaner - Cleaning /development/java/eclipse/eclipse-3.6-ocl/ws/org.xtext.example.mydsl/../org.xtext.example.mydsl.ui/src-gen 946 [main] INFO ipse.xtext.generator.LanguageConfig - generating infrastructure for org.xtext.example.mydsl.MyDsl with fragments : ImplicitRuntimeFragment, ImplicitUiFragment, GrammarAccessFragment, EcoreGeneratorFragment, ParseTreeConstructorFragment, ResourceFactoryFragment, XtextAntlrGeneratorFragment, JavaValidatorFragment, ImportNamespacesScopingFragment, QualifiedNamesFragment, BuilderIntegrationFragment, FormatterFragment, LabelProviderFragment, TransformerFragment, OutlineNodeAdapterFactoryFragment, QuickOutlineFragment, QuickfixProviderFragment, JavaBasedContentAssistFragment, XtextAntlrUiGeneratorFragment 17022 [main] INFO or.validation.JavaValidatorFragment - executing generate for org.eclipse.xtext.generator.validation.JavaValidatorFragment 25174 [main] INFO .emf.mwe2.runtime.workflow.Workflow - Done.
I updated my Xtext plugins to version 1.0.1 via the eclipse update feature. I created a new Xtext project and pasted the grammar to the xtext file. But the problem remains and got even worse(see logfile2). What did I wrong?
Created attachment 194567 [details] Logfile documenting the remaining ANTLR warnings
Created attachment 194569 [details] The involved workflowfile
You have to increase the heap size for the generator process. See the log: ... Caused by: java.lang.OutOfMemoryError: Java heap space ...
Where can I configure the heap size for the generator process? I guess it's not a heap size problem but an endless recursion.
(In reply to comment #13) > Where can I configure the heap size for the generator process? > I guess it's not a heap size problem but an endless recursion. Same as for any other Eclipse launch configuration. Go to your Run Configurations and add vm option -Xmx512m.
Thank you that option did help. You can close the issue.
Closing all bugs that were set to RESOLVED before Neon.0