Community
Participate
Working Groups
Created attachment 220657 [details] .mwe2 file and my grammar file Hi, I have the following error : "The code for the static initializer is exceeding the 65535 bytes limit" , i think coming from the fact that the grammar is too big. I tried the xtext revision 2.3.1 and 2.2.1 and options = { classSplitting = true fieldsPerClass = "100" methodsPerClass = "200" } once in the " fragment = parser.antlr.XtextAntlrGeneratorFragment " and again in the "fragment = parser.antlr.XtextAntlrUiGeneratorFragment"' But it still gives me the same error and the same generated parser code Attached is my .mwe2 file and my grammar file. Best regards, Virgilio
Class splitting should be enhanced by those steps: search for: "class DFA\d+ extends DFA \{" replace with: "" (empty string) search for: "(static final String DFA(\d+)_eotS =)" replace with: "static class DFA$2 extends HackedDFA {\n $1" search for: "this\.recognizer = recognizer;" replace with: "super(recognizer);" Add this method to the IntegernalXXXParser1 class (at the top): RecognizerSharedState getRecognizerSharedState() { return state; } and add this class to UI Parser file: class HackedDFA extends DFA { protected RecognizerSharedState state; protected XXXGrammarAccess grammarAccess; HackedDFA(BaseRecognizer recognizer) { this.recognizer = recognizer; this.grammarAccess = ((IntegernalXXXParser1)recognizer).grammarAccess; this.state = ((IntegernalXXXParser1)recognizer).getRecognizerSharedState(); } protected IUnorderedGroupHelper getUnorderedGroupHelper() { return getRecognizer().getUnorderedGroupHelper(); } } where XXX is the name of your language. The HackedDFA has to provide delegators to Antlr delegation methods synpred_XXX, too.
Hello Sebastian, thanks a lot for your time. I tried your solution. But isn't worked ... I try to make the changes only the UI project and the grammar and UI project both. But the result is that when I execute the UI project and try to use the context proposal (CTRL+Space) I obtain the following error: [code]!SESSION 2012-09-27 13:49:52.247 ----------------------------------------------- eclipse.buildId=I20120608-1400 java.version=1.6.0_25 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=es_ES Framework arguments: -product org.eclipse.sdk.ide Command-line arguments: -product org.eclipse.sdk.ide -data C:\Users\virgilio.garcia\Desktop\WS/../runtime-EclipseApplication -dev file:C:/Users/virgilio.garcia/Desktop/WS/.metadata/.plugins/org.eclipse.pde.core/Eclipse Application/dev.properties -os win32 -ws win32 -arch x86_64 -consoleLog !ENTRY org.eclipse.ui 2 2 2012-09-27 13:50:17.076 !MESSAGE Invalid property category path: ValidationPropertiesPage (bundle: org.eclipse.wst.xml.ui, propertyPage: org.eclipse.wst.xml.ui.propertyPage.project.validation) !ENTRY org.eclipse.e4.ui.workbench 4 0 2012-09-27 13:50:34.652 !MESSAGE !STACK 0 org.eclipse.e4.core.di.InjectionException: org.eclipse.core.commands.ExecutionException: While executing the action, an exception occurred at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:63) at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:229) at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:210) at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:131) at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:171) at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.executeCommand(KeyBindingDispatcher.java:276) at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.press(KeyBindingDispatcher.java:494) at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.processKeyEvent(KeyBindingDispatcher.java:545) at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:366) at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.access$0(KeyBindingDispatcher.java:313) at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:82) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1262) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1052) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1104) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1100) at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1521) at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4640) at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:345) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4528) at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4976) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2546) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3756) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1022) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:916) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:585) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:540) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584) at org.eclipse.equinox.launcher.Main.run(Main.java:1438) at org.eclipse.equinox.launcher.Main.main(Main.java:1414) Caused by: org.eclipse.core.commands.ExecutionException: While executing the action, an exception occurred at org.eclipse.jface.commands.ActionHandler.execute(ActionHandler.java:124) at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:76) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56) ... 48 more Caused by: com.google.inject.ProvisionException: Guice provision errors: 1) Error in custom provider, java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at mymw.ideal2dsl.ui.AbstractIdeal2DslUiModule.configureContentAssistLexerProvider(AbstractIdeal2DslUiModule.java:123) while locating mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslLexer while locating org.eclipse.xtext.ui.editor.contentassist.antlr.internal.Lexer annotated with @com.google.inject.name.Named(value=org.eclipse.xtext.ui.editor.contentassist.antlr.internal.Lexer.CONTENT_ASSIST) for field at org.eclipse.xtext.ui.editor.contentassist.antlr.ParserBasedContentAssistContextFactory$StatefulFactory.lexer(Unknown Source) while locating org.eclipse.xtext.ui.editor.contentassist.antlr.ParserBasedContentAssistContextFactory$StatefulFactory 1 error at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:987) at org.eclipse.xtext.ui.editor.contentassist.antlr.ParserBasedContentAssistContextFactory.create(ParserBasedContentAssistContextFactory.java:577) at org.eclipse.xtext.ui.editor.contentassist.CompletionProposalComputer.exec(CompletionProposalComputer.java:48) at org.eclipse.xtext.ui.editor.contentassist.CompletionProposalComputer.exec(CompletionProposalComputer.java:1) at org.eclipse.xtext.util.concurrent.AbstractReadWriteAcces.readOnly(AbstractReadWriteAcces.java:32) at org.eclipse.xtext.ui.editor.model.XtextDocument.readOnly(XtextDocument.java:78) at org.eclipse.xtext.ui.editor.contentassist.XtextContentAssistProcessor.computeCompletionProposals(XtextContentAssistProcessor.java:68) at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals(ContentAssistant.java:1839) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals(CompletionProposalPopup.java:566) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$16(CompletionProposalPopup.java:563) at org.eclipse.jface.text.contentassist.CompletionProposalPopup$2.run(CompletionProposalPopup.java:498) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals(CompletionProposalPopup.java:492) at org.eclipse.jface.text.contentassist.ContentAssistant.showPossibleCompletions(ContentAssistant.java:1665) at org.eclipse.jface.text.source.SourceViewer.doOperation(SourceViewer.java:932) at org.eclipse.jface.text.source.projection.ProjectionViewer.doOperation(ProjectionViewer.java:1507) at org.eclipse.ui.texteditor.ContentAssistAction$1.run(ContentAssistAction.java:82) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.texteditor.ContentAssistAction.run(ContentAssistAction.java:80) at org.eclipse.jface.action.Action.runWithEvent(Action.java:498) at org.eclipse.jface.commands.ActionHandler.execute(ActionHandler.java:119) ... 54 more Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at org.eclipse.xtext.parser.antlr.LexerProvider.get(LexerProvider.java:46) at org.eclipse.xtext.parser.antlr.LexerProvider.get(LexerProvider.java:1) at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40) at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:54) at com.google.inject.internal.SingleFieldInjector.inject(SingleFieldInjector.java:53) at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:110) at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:94) at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254) at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:978) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1024) at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:974) ... 74 more Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.eclipse.xtext.parser.antlr.LexerProvider.get(LexerProvider.java:43) ... 84 more Caused by: java.lang.ClassCastException: mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslLexer cannot be cast to mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser1 at mymw.ideal2dsl.ui.contentassist.antlr.internal.HackedDFA.<init>(InternalIdeal2DslParser.java:5760) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslLexer$DFA8.<init>(InternalIdeal2DslLexer.java:10041) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslLexer.<init>(InternalIdeal2DslLexer.java:8894) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslLexer.<init>(InternalIdeal2DslLexer.java:318) ... 89 more[/code] I tested with 2 xtext revisions (2.3.1 and 2.2.1) in 2 different eclipses and the problem is the same. Any idea about can it happen? Thanks a lot for the support. Greetings.
You made the changes in the lexer, did you? I had the initializer problem in the parser so the steps should only be InternalXXXParser class.
Hello. Thank you very much, you are right, I was doing the changes also in the lexer. Now I will try to do an implementation of IGeneratorFragment to automate the process. Do you know of any examples can I use to guide me? Thank you so much for everything! A greeting.
Hello again. I found a new problem to make this change in the parser. Specifically in the tag section: SectionAttributes: ( // CommonAttrAndReId ( 'id=' name = ID) & ('class=' class = string)? & ('role=' role = string)? & ('display=' display = string)? & ('expr=' expr = string)? & ('mode=' mode = string)? & ('repeat-nodeset=' repeatnodeset = string)? // Fin - CommonAttrAndReId & ('newcontext=' newcontext = boolean)? & ('resourceid=' resourceid = string)? & ('title=' title = string)? & ('cooluri=' cooluri = string)? ) ; . . . SectionType: '<section' attributes = SectionAttributes '>' (content = SectionContent)? '</section>' ; The problem is that the wizard fails me content. It only works for the first attribute of the tag "section", if I try to add another attribute to the label wizard (Ctrl + Space) does not work and shows me the exception I mentioned in the first post. If I do not use a disorderly group working properly. But I need a disorderly group there ... I've been testing and this error only happens when I make the changes to the parser that you indicated me a post above. If I reduce the grammar until no error "65535 bytes limit" (I comment few lines from the DivMix rule) and left the unmodified parser, works correctly. So I suspect the failure may be caused to changes in the parser ... Many thanks for the help Sebastian A greeting.
Created attachment 223168 [details] Parser hack files and modified mwe2 Required modify uriToTransform and auxUri variables in the mwe2 file to work
Hello. I'm still mulling over this and I do not see a solution ... Can anyone tell me if the issue is reproducible? Any help is welcome! Attached the code I'm using to make the changes in the parser and mwe2 file that uses that code. The problem appears in the tag "Section". In the editor, when I use the content assistant (Ctrl+space) for the first time, operating correctly, but, when I use it again to add another attribute to the tag, this exception appears... Code: [Select all] [Show/ hide] !ENTRY org.eclipse.e4.ui.workbench 4 0 2012-10-19 10:36:24.729 !MESSAGE !STACK 0 org.eclipse.e4.core.di.InjectionException: java.lang.NullPointerException at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:63) at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:229) at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:210) at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:131) at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:171) at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.executeCommand(KeyBindingDispatcher.java:276) at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.press(KeyBindingDispatcher.java:494) at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.processKeyEvent(KeyBindingDispatcher.java:545) at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:366) at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.access$0(KeyBindingDispatcher.java:313) at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:82) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1262) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1052) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1104) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1100) at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1521) at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4640) at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:345) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4528) at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4976) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2546) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3756) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1022) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:916) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:585) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:540) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584) at org.eclipse.equinox.launcher.Main.run(Main.java:1438) at org.eclipse.equinox.launcher.Main.main(Main.java:1414) Caused by: java.lang.NullPointerException at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser1$DFA311.specialStateTransition(InternalIdeal2DslParser.java:11390) at org.antlr.runtime.DFA.predict(DFA.java:80) at org.eclipse.xtext.ui.editor.contentassist.antlr.internal.DFA.predict(DFA.java:25) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser23.rule__SectionAttributes__UnorderedGroup__Impl(InternalIdeal2DslParser.java:55850) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser23.rule__SectionAttributes__UnorderedGroup__0(InternalIdeal2DslParser.java:56392) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser23.rule__SectionAttributes__UnorderedGroup(InternalIdeal2DslParser.java:55811) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser2.ruleSectionAttributes(InternalIdeal2DslParser.java:8428) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser27.rule__SectionType__AttributesAssignment_1(InternalIdeal2DslParser.java:50673) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser7.rule__SectionType__Group__1__Impl(InternalIdeal2DslParser.java:58989) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser7.rule__SectionType__Group__1(InternalIdeal2DslParser.java:58944) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser7.rule__SectionType__Group__0(InternalIdeal2DslParser.java:58874) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser2.ruleSectionType(InternalIdeal2DslParser.java:8813) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser26.rule__BodyType__SectionAssignment_6(InternalIdeal2DslParser.java:47422) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser6.rule__BodyType__Group__6__Impl(InternalIdeal2DslParser.java:47592) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser6.rule__BodyType__Group__6(InternalIdeal2DslParser.java:47547) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser6.rule__BodyType__Group__5(InternalIdeal2DslParser.java:47456) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser6.rule__BodyType__Group__4(InternalIdeal2DslParser.java:47353) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser6.rule__BodyType__Group__3(InternalIdeal2DslParser.java:47278) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser6.rule__BodyType__Group__2(InternalIdeal2DslParser.java:47193) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser6.rule__BodyType__Group__1(InternalIdeal2DslParser.java:47118) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser6.rule__BodyType__Group__0(InternalIdeal2DslParser.java:47043) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser2.ruleBodyType(InternalIdeal2DslParser.java:7427) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser26.rule__UiType__BodyAssignment_2(InternalIdeal2DslParser.java:47217) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser6.rule__UiType__Group__2__Impl(InternalIdeal2DslParser.java:46925) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser6.rule__UiType__Group__2(InternalIdeal2DslParser.java:46872) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser6.rule__UiType__Group__1(InternalIdeal2DslParser.java:46802) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser6.rule__UiType__Group__0(InternalIdeal2DslParser.java:46727) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser2.ruleUiType(InternalIdeal2DslParser.java:7350) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser26.rule__IdealType__UiAssignment_8(InternalIdeal2DslParser.java:43978) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser4.rule__IdealType__Group__8__Impl(InternalIdeal2DslParser.java:30852) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser4.rule__IdealType__Group__8(InternalIdeal2DslParser.java:30807) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser4.rule__IdealType__Group__7(InternalIdeal2DslParser.java:30716) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser4.rule__IdealType__Group__6(InternalIdeal2DslParser.java:30620) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser4.rule__IdealType__Group__5(InternalIdeal2DslParser.java:30524) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser4.rule__IdealType__Group__4(InternalIdeal2DslParser.java:30428) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser4.rule__IdealType__Group__3(InternalIdeal2DslParser.java:30332) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser4.rule__IdealType__Group__2(InternalIdeal2DslParser.java:30257) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser4.rule__IdealType__Group__1(InternalIdeal2DslParser.java:30172) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser4.rule__IdealType__Group__0(InternalIdeal2DslParser.java:30097) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser2.ruleIdealType(InternalIdeal2DslParser.java:5887) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser26.rule__Xml__IdealAssignment_5(InternalIdeal2DslParser.java:43474) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser4.rule__Xml__Group__5__Impl(InternalIdeal2DslParser.java:29057) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser4.rule__Xml__Group__5(InternalIdeal2DslParser.java:29017) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser4.rule__Xml__Group__4(InternalIdeal2DslParser.java:28937) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser3.rule__Xml__Group__3(InternalIdeal2DslParser.java:28829) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser3.rule__Xml__Group__2(InternalIdeal2DslParser.java:28754) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser3.rule__Xml__Group__1(InternalIdeal2DslParser.java:28669) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser3.rule__Xml__Group__0(InternalIdeal2DslParser.java:28594) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser2.ruleXml(InternalIdeal2DslParser.java:5655) at mymw.ideal2dsl.ui.contentassist.antlr.internal.InternalIdeal2DslParser2.entryRuleXml(InternalIdeal2DslParser.java:5612) at mymw.ideal2dsl.ui.contentassist.antlr.Ideal2DslParser.getFollowElements(Ideal2DslParser.java:1860) at org.eclipse.xtext.ui.editor.contentassist.antlr.AbstractContentAssistParser.getFollowElements(AbstractContentAssistParser.java:324) at org.eclipse.xtext.ui.editor.contentassist.antlr.ParserBasedContentAssistContextFactory$StatefulFactory.handleLastCompleteNodeAsPartOfDatatypeNode(ParserBasedContentAssistContextFactory.java:230) at org.eclipse.xtext.ui.editor.contentassist.antlr.ParserBasedContentAssistContextFactory$StatefulFactory.doCreateContexts(ParserBasedContentAssistContextFactory.java:155) at org.eclipse.xtext.ui.editor.contentassist.antlr.ParserBasedContentAssistContextFactory$StatefulFactory.create(ParserBasedContentAssistContextFactory.java:148) at org.eclipse.xtext.ui.editor.contentassist.antlr.ParserBasedContentAssistContextFactory.create(ParserBasedContentAssistContextFactory.java:577) at org.eclipse.xtext.ui.editor.contentassist.CompletionProposalComputer.exec(CompletionProposalComputer.java:48) at org.eclipse.xtext.ui.editor.contentassist.CompletionProposalComputer.exec(CompletionProposalComputer.java:1) at org.eclipse.xtext.util.concurrent.AbstractReadWriteAcces.readOnly(AbstractReadWriteAcces.java:32) at org.eclipse.xtext.ui.editor.model.XtextDocument.readOnly(XtextDocument.java:78) at org.eclipse.xtext.ui.editor.contentassist.XtextContentAssistProcessor.computeCompletionProposals(XtextContentAssistProcessor.java:68) at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals(ContentAssistant.java:1839) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals(CompletionProposalPopup.java:566) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$16(CompletionProposalPopup.java:563) at org.eclipse.jface.text.contentassist.CompletionProposalPopup$2.run(CompletionProposalPopup.java:498) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals(CompletionProposalPopup.java:492) at org.eclipse.jface.text.contentassist.ContentAssistant.showPossibleCompletions(ContentAssistant.java:1665) at org.eclipse.jface.text.source.SourceViewer.doOperation(SourceViewer.java:932) at org.eclipse.jface.text.source.projection.ProjectionViewer.doOperation(ProjectionViewer.java:1507) at org.eclipse.ui.texteditor.ContentAssistAction$1.run(ContentAssistAction.java:82) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.texteditor.ContentAssistAction.run(ContentAssistAction.java:80) at org.eclipse.xtext.ui.editor.handler.ContentAssistHandler.execute(ContentAssistHandler.java:32) at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293) at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:76) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56) ... 48 more This is the definition of the label in my grammar that causing the error. The error didn't appears in other labels with disordered groups. If I don't use a disorderly group it's working properly. But I need a disorderly group there ... I've been doing test and this error only happens when I make the changes to the parser file SectionAttributes: ( // CommonAttrAndReId ( 'id=' name = ID) & ('class=' class = string)? & ('role=' role = string)? & ('display=' display = string)? & ('expr=' expr = string)? & ('mode=' mode = string)? & ('repeat-nodeset=' repeatnodeset = string)? // Fin - CommonAttrAndReId & ('newcontext=' newcontext = boolean)? & ('resourceid=' resourceid = string)? & ('title=' title = string)? & ('cooluri=' cooluri = string)? ) ; . . . SectionType: '<section' attributes = SectionAttributes '>' (content = SectionContent)? '</section>' ; Any help is welcome! Thanks!