Merge branch 'develop' of ssh://git.eclipse.org:29418/bpel/org.eclipse.bpel into develop
Conflicts:
.gitignore
diff --git a/.gitignore b/.gitignore
index e2c221f..5b0a486 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,4 +23,5 @@
*.orig
target/
*.java._trace
-*.smap
\ No newline at end of file
+*.java_trace
+*.smap
diff --git a/examples/plugins/org.eclipse.bpel.extensionsample.model/META-INF/MANIFEST.MF b/examples/plugins/org.eclipse.bpel.extensionsample.model/META-INF/MANIFEST.MF
index de9fd95..7ac9b9c 100644
--- a/examples/plugins/org.eclipse.bpel.extensionsample.model/META-INF/MANIFEST.MF
+++ b/examples/plugins/org.eclipse.bpel.extensionsample.model/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.bpel.extensionsample.model;singleton:=true
-Bundle-Version: 1.0.1.qualifier
+Bundle-Version: 1.0.2.qualifier
Bundle-ClassPath: .
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/examples/plugins/org.eclipse.bpel.extensionssample.ui/META-INF/MANIFEST.MF b/examples/plugins/org.eclipse.bpel.extensionssample.ui/META-INF/MANIFEST.MF
index 2950b61..b993f4e 100644
--- a/examples/plugins/org.eclipse.bpel.extensionssample.ui/META-INF/MANIFEST.MF
+++ b/examples/plugins/org.eclipse.bpel.extensionssample.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: BPEL Extensions Sample UI Plug-in
Bundle-SymbolicName: org.eclipse.bpel.extensionssample.ui;singleton:=true
-Bundle-Version: 1.0.1.qualifier
+Bundle-Version: 1.0.2.qualifier
Bundle-Activator: org.eclipse.bpel.extensionssample.ui.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
diff --git a/examples/plugins/org.eclipse.bpel.ui.xtext.examples/.classpath b/examples/plugins/org.eclipse.bpel.ui.xtext.examples/.classpath
new file mode 100644
index 0000000..ad32c83
--- /dev/null
+++ b/examples/plugins/org.eclipse.bpel.ui.xtext.examples/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/examples/plugins/org.eclipse.bpel.ui.xtext.examples/.project b/examples/plugins/org.eclipse.bpel.ui.xtext.examples/.project
new file mode 100644
index 0000000..8fda269
--- /dev/null
+++ b/examples/plugins/org.eclipse.bpel.ui.xtext.examples/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.bpel.ui.xtext.examples</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/examples/plugins/org.eclipse.bpel.ui.xtext.examples/META-INF/MANIFEST.MF b/examples/plugins/org.eclipse.bpel.ui.xtext.examples/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..693ac1d
--- /dev/null
+++ b/examples/plugins/org.eclipse.bpel.ui.xtext.examples/META-INF/MANIFEST.MF
@@ -0,0 +1,17 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Examples of Xtext Editor Embedded in Bpel Designer
+Bundle-SymbolicName: org.eclipse.bpel.ui.xtext.examples;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.bpel.ui.xtext.examples.Activator
+Require-Bundle: org.eclipse.core.runtime,
+ org.xtext.example.mydsl;bundle-version="1.0.0",
+ org.xtext.example.mydsl.ui;bundle-version="1.0.0",
+ org.eclipse.xtext.example.arithmetics;bundle-version="2.3.0",
+ org.eclipse.xtext.example.arithmetics.ui;bundle-version="2.3.0",
+ org.eclipse.xtext.example.fowlerdsl;bundle-version="1.0.0",
+ org.eclipse.xtext.example.fowlerdsl.ui;bundle-version="1.0.0",
+ org.eclipse.bpel.ui.xtext;bundle-version="1.0.0"
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-Vendor: Lorenzo Bettini
diff --git a/examples/plugins/org.eclipse.bpel.ui.xtext.examples/Xtext Embedded Editors Examples.launch b/examples/plugins/org.eclipse.bpel.ui.xtext.examples/Xtext Embedded Editors Examples.launch
new file mode 100644
index 0000000..6f7d607
--- /dev/null
+++ b/examples/plugins/org.eclipse.bpel.ui.xtext.examples/Xtext Embedded Editors Examples.launch
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.RuntimeWorkbench">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="true"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="false"/>
+<booleanAttribute key="clearws" value="false"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/Xtext Embedded Editors Examples"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../runtime-Bpel"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Xms40m -Xmx512m"/>
+<booleanAttribute key="pde.generated.config" value="false"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="true"/>
+<booleanAttribute key="useProduct" value="true"/>
+<booleanAttribute key="usefeatures" value="false"/>
+</launchConfiguration>
diff --git a/examples/plugins/org.eclipse.bpel.ui.xtext.examples/build.properties b/examples/plugins/org.eclipse.bpel.ui.xtext.examples/build.properties
new file mode 100644
index 0000000..e9863e2
--- /dev/null
+++ b/examples/plugins/org.eclipse.bpel.ui.xtext.examples/build.properties
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml
diff --git a/examples/plugins/org.eclipse.bpel.ui.xtext.examples/plugin.xml b/examples/plugins/org.eclipse.bpel.ui.xtext.examples/plugin.xml
new file mode 100644
index 0000000..6d439a9
--- /dev/null
+++ b/examples/plugins/org.eclipse.bpel.ui.xtext.examples/plugin.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.bpel.ui.assignCategoryAdditions">
+ <assignSection
+ class="org.eclipse.bpel.ui.xtext.examples.GreetingsXtextExpressionAssignCategory"
+ name="Xtext Greeting"></assignSection>
+ </extension>
+ <extension
+ point="org.eclipse.bpel.ui.assignCategoryAdditions">
+ <assignSection
+ class="org.eclipse.bpel.ui.xtext.examples.FowlerDslXtextExpressionAssignCategory"
+ name="Xtext Fowler DSL">
+ </assignSection>
+ </extension>
+ <extension
+ point="org.eclipse.bpel.ui.assignCategoryAdditions">
+ <assignSection
+ class="org.eclipse.bpel.ui.xtext.examples.ArithmeticsXtextExpressionAssignCategory"
+ name="Xtext Arithmetics DSL">
+ </assignSection>
+ </extension>
+
+</plugin>
diff --git a/examples/plugins/org.eclipse.bpel.ui.xtext.examples/src/org/eclipse/bpel/ui/xtext/examples/Activator.java b/examples/plugins/org.eclipse.bpel.ui.xtext.examples/src/org/eclipse/bpel/ui/xtext/examples/Activator.java
new file mode 100644
index 0000000..042019a
--- /dev/null
+++ b/examples/plugins/org.eclipse.bpel.ui.xtext.examples/src/org/eclipse/bpel/ui/xtext/examples/Activator.java
@@ -0,0 +1,30 @@
+package org.eclipse.bpel.ui.xtext.examples;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class Activator implements BundleActivator {
+
+ private static BundleContext context;
+
+ static BundleContext getContext() {
+ return context;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext bundleContext) throws Exception {
+ Activator.context = bundleContext;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext bundleContext) throws Exception {
+ Activator.context = null;
+ }
+
+}
diff --git a/examples/plugins/org.eclipse.bpel.ui.xtext.examples/src/org/eclipse/bpel/ui/xtext/examples/ArithmeticsXtextExpressionAssignCategory.java b/examples/plugins/org.eclipse.bpel.ui.xtext.examples/src/org/eclipse/bpel/ui/xtext/examples/ArithmeticsXtextExpressionAssignCategory.java
new file mode 100644
index 0000000..c6cc6f7
--- /dev/null
+++ b/examples/plugins/org.eclipse.bpel.ui.xtext.examples/src/org/eclipse/bpel/ui/xtext/examples/ArithmeticsXtextExpressionAssignCategory.java
@@ -0,0 +1,41 @@
+package org.eclipse.bpel.ui.xtext.examples;
+
+import org.eclipse.bpel.ui.properties.xtext.AbstractXtextExpressionAssignCategory;
+import org.eclipse.xtext.example.arithmetics.ui.internal.ArithmeticsActivator;
+
+import com.google.inject.Injector;
+
+/**
+ * @author Lorenzo Bettini
+ *
+ */
+public class ArithmeticsXtextExpressionAssignCategory extends
+ AbstractXtextExpressionAssignCategory {
+
+// public ArithmeticsXtextExpressionAssignCategory(
+// BPELPropertySection ownerSection) {
+// super(ownerSection);
+// }
+
+ @Override
+ public String getName() {
+ return "Xtext Arithmetics Editor";
+ }
+
+ public Injector getInjector() {
+ return ArithmeticsActivator
+ .getInstance()
+ .getInjector(
+ ArithmeticsActivator.ORG_ECLIPSE_XTEXT_EXAMPLE_ARITHMETICS_ARITHMETICS);
+ }
+
+ @Override
+ public String getExpressionLanguage() {
+ return "arithmetics";
+ }
+
+ @Override
+ protected String getStyledTextLabelString() {
+ return "Edit the arithmethics expression";
+ }
+}
diff --git a/examples/plugins/org.eclipse.bpel.ui.xtext.examples/src/org/eclipse/bpel/ui/xtext/examples/FowlerDslXtextExpressionAssignCategory.java b/examples/plugins/org.eclipse.bpel.ui.xtext.examples/src/org/eclipse/bpel/ui/xtext/examples/FowlerDslXtextExpressionAssignCategory.java
new file mode 100644
index 0000000..5f03404
--- /dev/null
+++ b/examples/plugins/org.eclipse.bpel.ui.xtext.examples/src/org/eclipse/bpel/ui/xtext/examples/FowlerDslXtextExpressionAssignCategory.java
@@ -0,0 +1,42 @@
+package org.eclipse.bpel.ui.xtext.examples;
+
+import org.eclipse.bpel.ui.properties.xtext.AbstractXtextExpressionAssignCategory;
+import org.eclipse.xtext.example.fowlerdsl.ui.internal.StatemachineActivator;
+
+import com.google.inject.Injector;
+
+/**
+ * @author Lorenzo Bettini
+ *
+ */
+public class FowlerDslXtextExpressionAssignCategory extends
+ AbstractXtextExpressionAssignCategory {
+
+// public FowlerDslXtextExpressionAssignCategory(
+// BPELPropertySection ownerSection) {
+// super(ownerSection);
+// }
+
+ @Override
+ public String getName() {
+ return "Xtext FowlerDsl Editor";
+ }
+
+ public Injector getInjector() {
+ return StatemachineActivator
+ .getInstance()
+ .getInjector(
+ StatemachineActivator.ORG_ECLIPSE_XTEXT_EXAMPLE_FOWLERDSL_STATEMACHINE);
+ }
+
+ @Override
+ public String getExpressionLanguage() {
+ return "fowler";
+ }
+
+ @Override
+ protected String getStyledTextLabelString() {
+ return "Edit the statemachine expression";
+ }
+
+}
diff --git a/examples/plugins/org.eclipse.bpel.ui.xtext.examples/src/org/eclipse/bpel/ui/xtext/examples/GreetingsXtextExpressionAssignCategory.java b/examples/plugins/org.eclipse.bpel.ui.xtext.examples/src/org/eclipse/bpel/ui/xtext/examples/GreetingsXtextExpressionAssignCategory.java
new file mode 100644
index 0000000..efa647f
--- /dev/null
+++ b/examples/plugins/org.eclipse.bpel.ui.xtext.examples/src/org/eclipse/bpel/ui/xtext/examples/GreetingsXtextExpressionAssignCategory.java
@@ -0,0 +1,39 @@
+package org.eclipse.bpel.ui.xtext.examples;
+
+import org.eclipse.bpel.ui.properties.xtext.AbstractXtextExpressionAssignCategory;
+
+import com.google.inject.Injector;
+
+/**
+ * @author Lorenzo Bettini
+ *
+ */
+public class GreetingsXtextExpressionAssignCategory extends
+ AbstractXtextExpressionAssignCategory {
+
+// public GreetingsXtextExpressionAssignCategory(
+// BPELPropertySection ownerSection) {
+// super(ownerSection);
+// }
+
+ @Override
+ public String getName() {
+ return "Xtext Greeting Editor";
+ }
+
+ public Injector getInjector() {
+ return org.xtext.example.mydsl.ui.internal.MyDslActivator.getInstance()
+ .getInjector("org.xtext.example.mydsl.MyDsl");
+ }
+
+ @Override
+ public String getExpressionLanguage() {
+ return "greetings";
+ }
+
+ @Override
+ protected String getStyledTextLabelString() {
+ return "Edit the greeting expression";
+ }
+
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/.classpath b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/.classpath
new file mode 100644
index 0000000..59cf397
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="src-gen"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/.project b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/.project
new file mode 100644
index 0000000..7a23b7e
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.xtext.example.arithmetics.ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/.settings/org.eclipse.core.resources.prefs b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..99f26c0
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/META-INF/MANIFEST.MF b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..f2ae691
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,21 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.eclipse.xtext.example.arithmetics.ui
+Bundle-Vendor: itemis AG
+Bundle-Version: 2.3.0.qualifier
+Bundle-SymbolicName: org.eclipse.xtext.example.arithmetics.ui;singleton:=true
+Bundle-ActivationPolicy: lazy
+Require-Bundle: org.eclipse.xtext.example.arithmetics;visibility:=reexport,
+ org.eclipse.xtext.ui,
+ org.eclipse.ui.editors;bundle-version="3.5.0",
+ org.eclipse.ui.ide;bundle-version="3.5.0",
+ org.eclipse.xtext.ui.shared,
+ org.eclipse.ui,
+ org.eclipse.xtext.builder,
+ org.antlr.runtime
+Import-Package: org.apache.log4j
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-Activator: org.eclipse.xtext.example.arithmetics.ui.internal.ArithmeticsActivator
+Export-Package: org.eclipse.xtext.example.arithmetics.ui.contentassist,
+ org.eclipse.xtext.example.arithmetics.ui.contentassist.antlr,
+ org.eclipse.xtext.example.arithmetics.ui.internal
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/build.properties b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/build.properties
new file mode 100644
index 0000000..bed6e1e
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/build.properties
@@ -0,0 +1,4 @@
+source.. = src/,src-gen/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml
\ No newline at end of file
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/icons/home_nav.gif b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/icons/home_nav.gif
new file mode 100644
index 0000000..4472e8c
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/icons/home_nav.gif
Binary files differ
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/plugin.xml b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/plugin.xml
new file mode 100644
index 0000000..5ae2f3b
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/plugin.xml
@@ -0,0 +1,238 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<plugin>
+
+ <extension
+ point="org.eclipse.ui.editors">
+ <editor
+ class="org.eclipse.xtext.example.arithmetics.ui.ArithmeticsExecutableExtensionFactory:org.eclipse.xtext.ui.editor.XtextEditor"
+ contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
+ default="true"
+ extensions="calc"
+ id="org.eclipse.xtext.example.arithmetics.Arithmetics"
+ name="Arithmetics Editor">
+ </editor>
+ </extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.xtext.example.arithmetics.ui.ArithmeticsExecutableExtensionFactory:org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclarationHandler"
+ commandId="org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclaration">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.xtext.example.arithmetics.Arithmetics.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ <handler
+ class="org.eclipse.xtext.example.arithmetics.ui.ArithmeticsExecutableExtensionFactory:org.eclipse.xtext.ui.editor.handler.ValidateActionHandler"
+ commandId="org.eclipse.xtext.example.arithmetics.Arithmetics.validate">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.xtext.example.arithmetics.Arithmetics.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.eclipse.xtext.example.arithmetics.Arithmetics.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName"
+ value="org.eclipse.xtext.example.arithmetics.Arithmetics"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ class="org.eclipse.xtext.example.arithmetics.ui.ArithmeticsExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
+ id="org.eclipse.xtext.example.arithmetics.Arithmetics"
+ name="Arithmetics">
+ <keywordReference id="org.eclipse.xtext.example.arithmetics.ui.keyword_Arithmetics"/>
+ </page>
+ <page
+ category="org.eclipse.xtext.example.arithmetics.Arithmetics"
+ class="org.eclipse.xtext.example.arithmetics.ui.ArithmeticsExecutableExtensionFactory:org.eclipse.xtext.ui.editor.syntaxcoloring.SyntaxColoringPreferencePage"
+ id="org.eclipse.xtext.example.arithmetics.Arithmetics.coloring"
+ name="Syntax Coloring">
+ <keywordReference id="org.eclipse.xtext.example.arithmetics.ui.keyword_Arithmetics"/>
+ </page>
+ <page
+ category="org.eclipse.xtext.example.arithmetics.Arithmetics"
+ class="org.eclipse.xtext.example.arithmetics.ui.ArithmeticsExecutableExtensionFactory:org.eclipse.xtext.ui.editor.templates.XtextTemplatePreferencePage"
+ id="org.eclipse.xtext.example.arithmetics.Arithmetics.templates"
+ name="Templates">
+ <keywordReference id="org.eclipse.xtext.example.arithmetics.ui.keyword_Arithmetics"/>
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.ui.propertyPages">
+ <page
+ class="org.eclipse.xtext.example.arithmetics.ui.ArithmeticsExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
+ id="org.eclipse.xtext.example.arithmetics.Arithmetics"
+ name="Arithmetics">
+ <keywordReference id="org.eclipse.xtext.example.arithmetics.ui.keyword_Arithmetics"/>
+ <enabledWhen>
+ <adapt type="org.eclipse.core.resources.IProject"/>
+ </enabledWhen>
+ <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/>
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.ui.keywords">
+ <keyword
+ id="org.eclipse.xtext.example.arithmetics.ui.keyword_Arithmetics"
+ label="Arithmetics"/>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ description="Trigger expensive validation"
+ id="org.eclipse.xtext.example.arithmetics.Arithmetics.validate"
+ name="Validate">
+ </command>
+ </extension>
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="popup:#TextEditorContext?after=group.edit">
+ <command
+ commandId="org.eclipse.xtext.example.arithmetics.Arithmetics.validate"
+ style="push"
+ tooltip="Trigger expensive validation">
+ <visibleWhen checkEnabled="false">
+ <reference
+ definitionId="org.eclipse.xtext.example.arithmetics.Arithmetics.Editor.opened">
+ </reference>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution locationURI="popup:#TextEditorContext?endof=group.find">
+ <command commandId="org.eclipse.xtext.ui.editor.FindReferences">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="org.eclipse.xtext.example.arithmetics.Arithmetics.Editor.opened">
+ </reference>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <extension point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.xtext.example.arithmetics.ui.ArithmeticsExecutableExtensionFactory:org.eclipse.xtext.ui.editor.findrefs.FindReferencesHandler"
+ commandId="org.eclipse.xtext.ui.editor.FindReferences">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.xtext.example.arithmetics.Arithmetics.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+
+<!-- adding resource factories -->
+
+ <extension
+ point="org.eclipse.emf.ecore.extension_parser">
+ <parser
+ class="org.eclipse.xtext.example.arithmetics.ui.ArithmeticsExecutableExtensionFactory:org.eclipse.xtext.resource.IResourceFactory"
+ type="calc">
+ </parser>
+ </extension>
+ <extension point="org.eclipse.xtext.extension_resourceServiceProvider">
+ <resourceServiceProvider
+ class="org.eclipse.xtext.example.arithmetics.ui.ArithmeticsExecutableExtensionFactory:org.eclipse.xtext.ui.resource.IResourceUIServiceProvider"
+ uriExtension="calc">
+ </resourceServiceProvider>
+ </extension>
+
+ <!-- marker definitions for org.eclipse.xtext.example.arithmetics.Arithmetics -->
+ <extension
+ id="arithmetics.check.fast"
+ name="Arithmetics Problem"
+ point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.xtext.ui.check.fast"/>
+ <persistent value="true"/>
+ </extension>
+ <extension
+ id="arithmetics.check.normal"
+ name="Arithmetics Problem"
+ point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.xtext.ui.check.normal"/>
+ <persistent value="true"/>
+ </extension>
+ <extension
+ id="arithmetics.check.expensive"
+ name="Arithmetics Problem"
+ point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.xtext.ui.check.expensive"/>
+ <persistent value="true"/>
+ </extension>
+
+ <!-- Quick Outline -->
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.xtext.example.arithmetics.ui.ArithmeticsExecutableExtensionFactory:org.eclipse.xtext.ui.editor.outline.quickoutline.ShowQuickOutlineActionHandler"
+ commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.xtext.example.arithmetics.Arithmetics.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ description="Open the quick outline."
+ id="org.eclipse.xtext.ui.editor.outline.QuickOutline"
+ name="Quick Outline">
+ </command>
+ </extension>
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="popup:#TextEditorContext?after=group.open">
+ <command commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline"
+ style="push"
+ tooltip="Open Quick Outline">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="org.eclipse.xtext.example.arithmetics.Arithmetics.Editor.opened"/>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <!-- quickfix marker resolution generator for org.eclipse.xtext.example.arithmetics.Arithmetics -->
+ <extension
+ point="org.eclipse.ui.ide.markerResolution">
+ <markerResolutionGenerator
+ class="org.eclipse.xtext.example.arithmetics.ui.ArithmeticsExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
+ markerType="org.eclipse.xtext.example.arithmetics.ui.arithmetics.check.fast">
+ <attribute
+ name="FIXABLE_KEY"
+ value="true">
+ </attribute>
+ </markerResolutionGenerator>
+ <markerResolutionGenerator
+ class="org.eclipse.xtext.example.arithmetics.ui.ArithmeticsExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
+ markerType="org.eclipse.xtext.example.arithmetics.ui.arithmetics.check.normal">
+ <attribute
+ name="FIXABLE_KEY"
+ value="true">
+ </attribute>
+ </markerResolutionGenerator>
+ <markerResolutionGenerator
+ class="org.eclipse.xtext.example.arithmetics.ui.ArithmeticsExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
+ markerType="org.eclipse.xtext.example.arithmetics.ui.arithmetics.check.expensive">
+ <attribute
+ name="FIXABLE_KEY"
+ value="true">
+ </attribute>
+ </markerResolutionGenerator>
+ </extension>
+
+</plugin>
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/plugin.xml_gen b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/plugin.xml_gen
new file mode 100644
index 0000000..4a7da5b
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/plugin.xml_gen
@@ -0,0 +1,239 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<plugin>
+
+ <extension
+ point="org.eclipse.ui.editors">
+ <editor
+ class="org.eclipse.xtext.example.arithmetics.ui.ArithmeticsExecutableExtensionFactory:org.eclipse.xtext.ui.editor.XtextEditor"
+ contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
+ default="true"
+ extensions="calc"
+ id="org.eclipse.xtext.example.arithmetics.Arithmetics"
+ name="Arithmetics Editor">
+ </editor>
+ </extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.xtext.example.arithmetics.ui.ArithmeticsExecutableExtensionFactory:org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclarationHandler"
+ commandId="org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclaration">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.xtext.example.arithmetics.Arithmetics.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ <handler
+ class="org.eclipse.xtext.example.arithmetics.ui.ArithmeticsExecutableExtensionFactory:org.eclipse.xtext.ui.editor.handler.ValidateActionHandler"
+ commandId="org.eclipse.xtext.example.arithmetics.Arithmetics.validate">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.xtext.example.arithmetics.Arithmetics.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.eclipse.xtext.example.arithmetics.Arithmetics.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName"
+ value="org.eclipse.xtext.example.arithmetics.Arithmetics"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ class="org.eclipse.xtext.example.arithmetics.ui.ArithmeticsExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
+ id="org.eclipse.xtext.example.arithmetics.Arithmetics"
+ name="Arithmetics">
+ <keywordReference id="org.eclipse.xtext.example.arithmetics.ui.keyword_Arithmetics"/>
+ </page>
+ <page
+ category="org.eclipse.xtext.example.arithmetics.Arithmetics"
+ class="org.eclipse.xtext.example.arithmetics.ui.ArithmeticsExecutableExtensionFactory:org.eclipse.xtext.ui.editor.syntaxcoloring.SyntaxColoringPreferencePage"
+ id="org.eclipse.xtext.example.arithmetics.Arithmetics.coloring"
+ name="Syntax Coloring">
+ <keywordReference id="org.eclipse.xtext.example.arithmetics.ui.keyword_Arithmetics"/>
+ </page>
+ <page
+ category="org.eclipse.xtext.example.arithmetics.Arithmetics"
+ class="org.eclipse.xtext.example.arithmetics.ui.ArithmeticsExecutableExtensionFactory:org.eclipse.xtext.ui.editor.templates.XtextTemplatePreferencePage"
+ id="org.eclipse.xtext.example.arithmetics.Arithmetics.templates"
+ name="Templates">
+ <keywordReference id="org.eclipse.xtext.example.arithmetics.ui.keyword_Arithmetics"/>
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.ui.propertyPages">
+ <page
+ class="org.eclipse.xtext.example.arithmetics.ui.ArithmeticsExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
+ id="org.eclipse.xtext.example.arithmetics.Arithmetics"
+ name="Arithmetics">
+ <keywordReference id="org.eclipse.xtext.example.arithmetics.ui.keyword_Arithmetics"/>
+ <enabledWhen>
+ <adapt type="org.eclipse.core.resources.IProject"/>
+ </enabledWhen>
+ <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/>
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.ui.keywords">
+ <keyword
+ id="org.eclipse.xtext.example.arithmetics.ui.keyword_Arithmetics"
+ label="Arithmetics"/>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ description="Trigger expensive validation"
+ id="org.eclipse.xtext.example.arithmetics.Arithmetics.validate"
+ name="Validate">
+ </command>
+ </extension>
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="popup:#TextEditorContext?after=group.edit">
+ <command
+ commandId="org.eclipse.xtext.example.arithmetics.Arithmetics.validate"
+ style="push"
+ tooltip="Trigger expensive validation">
+ <visibleWhen checkEnabled="false">
+ <reference
+ definitionId="org.eclipse.xtext.example.arithmetics.Arithmetics.Editor.opened">
+ </reference>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution locationURI="popup:#TextEditorContext?endof=group.find">
+ <command commandId="org.eclipse.xtext.ui.editor.FindReferences">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="org.eclipse.xtext.example.arithmetics.Arithmetics.Editor.opened">
+ </reference>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <extension point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.xtext.example.arithmetics.ui.ArithmeticsExecutableExtensionFactory:org.eclipse.xtext.ui.editor.findrefs.FindReferencesHandler"
+ commandId="org.eclipse.xtext.ui.editor.FindReferences">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.xtext.example.arithmetics.Arithmetics.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+
+<!-- adding resource factories -->
+
+ <extension
+ point="org.eclipse.emf.ecore.extension_parser">
+ <parser
+ class="org.eclipse.xtext.example.arithmetics.ui.ArithmeticsExecutableExtensionFactory:org.eclipse.xtext.resource.IResourceFactory"
+ type="calc">
+ </parser>
+ </extension>
+ <extension point="org.eclipse.xtext.extension_resourceServiceProvider">
+ <resourceServiceProvider
+ class="org.eclipse.xtext.example.arithmetics.ui.ArithmeticsExecutableExtensionFactory:org.eclipse.xtext.ui.resource.IResourceUIServiceProvider"
+ uriExtension="calc">
+ </resourceServiceProvider>
+ </extension>
+
+
+ <!-- marker definitions for org.eclipse.xtext.example.arithmetics.Arithmetics -->
+ <extension
+ id="arithmetics.check.fast"
+ name="Arithmetics Problem"
+ point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.xtext.ui.check.fast"/>
+ <persistent value="true"/>
+ </extension>
+ <extension
+ id="arithmetics.check.normal"
+ name="Arithmetics Problem"
+ point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.xtext.ui.check.normal"/>
+ <persistent value="true"/>
+ </extension>
+ <extension
+ id="arithmetics.check.expensive"
+ name="Arithmetics Problem"
+ point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.xtext.ui.check.expensive"/>
+ <persistent value="true"/>
+ </extension>
+
+ <!-- Quick Outline -->
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.xtext.example.arithmetics.ui.ArithmeticsExecutableExtensionFactory:org.eclipse.xtext.ui.editor.outline.quickoutline.ShowQuickOutlineActionHandler"
+ commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.xtext.example.arithmetics.Arithmetics.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ description="Open the quick outline."
+ id="org.eclipse.xtext.ui.editor.outline.QuickOutline"
+ name="Quick Outline">
+ </command>
+ </extension>
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="popup:#TextEditorContext?after=group.open">
+ <command commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline"
+ style="push"
+ tooltip="Open Quick Outline">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="org.eclipse.xtext.example.arithmetics.Arithmetics.Editor.opened"/>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <!-- quickfix marker resolution generator for org.eclipse.xtext.example.arithmetics.Arithmetics -->
+ <extension
+ point="org.eclipse.ui.ide.markerResolution">
+ <markerResolutionGenerator
+ class="org.eclipse.xtext.example.arithmetics.ui.ArithmeticsExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
+ markerType="org.eclipse.xtext.example.arithmetics.ui.arithmetics.check.fast">
+ <attribute
+ name="FIXABLE_KEY"
+ value="true">
+ </attribute>
+ </markerResolutionGenerator>
+ <markerResolutionGenerator
+ class="org.eclipse.xtext.example.arithmetics.ui.ArithmeticsExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
+ markerType="org.eclipse.xtext.example.arithmetics.ui.arithmetics.check.normal">
+ <attribute
+ name="FIXABLE_KEY"
+ value="true">
+ </attribute>
+ </markerResolutionGenerator>
+ <markerResolutionGenerator
+ class="org.eclipse.xtext.example.arithmetics.ui.ArithmeticsExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
+ markerType="org.eclipse.xtext.example.arithmetics.ui.arithmetics.check.expensive">
+ <attribute
+ name="FIXABLE_KEY"
+ value="true">
+ </attribute>
+ </markerResolutionGenerator>
+ </extension>
+
+</plugin>
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/AbstractArithmeticsUiModule.java b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/AbstractArithmeticsUiModule.java
new file mode 100644
index 0000000..1083e07
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/AbstractArithmeticsUiModule.java
@@ -0,0 +1,122 @@
+
+/*
+ * generated by Xtext
+ */
+package org.eclipse.xtext.example.arithmetics.ui;
+
+import org.eclipse.xtext.ui.DefaultUiModule;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+/**
+ * Manual modifications go to {org.eclipse.xtext.example.arithmetics.ui.ArithmeticsUiModule}
+ */
+@SuppressWarnings("all")
+public abstract class AbstractArithmeticsUiModule extends DefaultUiModule {
+
+ public AbstractArithmeticsUiModule(AbstractUIPlugin plugin) {
+ super(plugin);
+ }
+
+
+ // contributed by org.eclipse.xtext.ui.generator.ImplicitUiFragment
+ public com.google.inject.Provider<org.eclipse.xtext.resource.containers.IAllContainersState> provideIAllContainersState() {
+ return org.eclipse.xtext.ui.shared.Access.getJavaProjectsState();
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.contentassist.IProposalConflictHelper> bindIProposalConflictHelper() {
+ return org.eclipse.xtext.ui.editor.contentassist.antlr.AntlrProposalConflictHelper.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
+ public void configureHighlightingLexer(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.parser.antlr.Lexer.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.ui.LexerUIBindings.HIGHLIGHTING)).to(org.eclipse.xtext.example.arithmetics.parser.antlr.internal.InternalArithmeticsLexer.class);
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
+ public void configureHighlightingTokenDefProvider(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.parser.antlr.ITokenDefProvider.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.ui.LexerUIBindings.HIGHLIGHTING)).to(org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider.class);
+ }
+
+ // contributed by org.eclipse.xtext.generator.exporting.QualifiedNamesFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.contentassist.PrefixMatcher> bindPrefixMatcher() {
+ return org.eclipse.xtext.ui.editor.contentassist.FQNPrefixMatcher.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.exporting.QualifiedNamesFragment
+ public Class<? extends org.eclipse.xtext.ui.refactoring.IDependentElementsCalculator> bindIDependentElementsCalculator() {
+ return org.eclipse.xtext.ui.refactoring.impl.DefaultDependentElementsCalculator.class;
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.labeling.LabelProviderFragment
+ public Class<? extends org.eclipse.jface.viewers.ILabelProvider> bindILabelProvider() {
+ return org.eclipse.xtext.example.arithmetics.ui.labeling.ArithmeticsLabelProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.labeling.LabelProviderFragment
+ public void configureResourceUIServiceLabelProvider(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.jface.viewers.ILabelProvider.class).annotatedWith(org.eclipse.xtext.ui.resource.ResourceServiceDescriptionLabelProvider.class).to(org.eclipse.xtext.example.arithmetics.ui.labeling.ArithmeticsDescriptionLabelProvider.class);
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.outline.OutlineTreeProviderFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.outline.IOutlineTreeProvider> bindIOutlineTreeProvider() {
+ return org.eclipse.xtext.example.arithmetics.ui.outline.ArithmeticsOutlineTreeProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.outline.OutlineTreeProviderFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.outline.impl.IOutlineTreeStructureProvider> bindIOutlineTreeStructureProvider() {
+ return org.eclipse.xtext.example.arithmetics.ui.outline.ArithmeticsOutlineTreeProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.contentAssist.JavaBasedContentAssistFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.contentassist.IContentProposalProvider> bindIContentProposalProvider() {
+ return org.eclipse.xtext.example.arithmetics.ui.contentassist.ArithmeticsProposalProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrUiGeneratorFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext.Factory> bindContentAssistContext$Factory() {
+ return org.eclipse.xtext.ui.editor.contentassist.antlr.ParserBasedContentAssistContextFactory.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrUiGeneratorFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.contentassist.antlr.IContentAssistParser> bindIContentAssistParser() {
+ return org.eclipse.xtext.example.arithmetics.ui.contentassist.antlr.ArithmeticsParser.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrUiGeneratorFragment
+ public void configureContentAssistLexerProvider(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.example.arithmetics.ui.contentassist.antlr.internal.InternalArithmeticsLexer.class).toProvider(org.eclipse.xtext.parser.antlr.LexerProvider.create(org.eclipse.xtext.example.arithmetics.ui.contentassist.antlr.internal.InternalArithmeticsLexer.class));
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrUiGeneratorFragment
+ public void configureContentAssistLexer(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.ui.editor.contentassist.antlr.internal.Lexer.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.ui.LexerUIBindings.CONTENT_ASSIST)).to(org.eclipse.xtext.example.arithmetics.ui.contentassist.antlr.internal.InternalArithmeticsLexer.class);
+ }
+
+ // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
+ public void configureIResourceDescriptionsBuilderScope(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.resource.IResourceDescriptions.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.resource.impl.ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE)).to(org.eclipse.xtext.builder.clustering.CurrentDescriptions.ResourceSetAware.class);
+ }
+
+ // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.IXtextEditorCallback> bindIXtextEditorCallback() {
+ return org.eclipse.xtext.builder.nature.NatureAddingEditorCallback.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
+ public void configureIResourceDescriptionsPersisted(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.resource.IResourceDescriptions.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.builder.impl.PersistentDataAwareDirtyResource.PERSISTED_DESCRIPTIONS)).to(org.eclipse.xtext.builder.builderState.IBuilderState.class);
+ }
+
+ // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.DocumentBasedDirtyResource> bindDocumentBasedDirtyResource() {
+ return org.eclipse.xtext.builder.impl.PersistentDataAwareDirtyResource.class;
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.quickfix.QuickfixProviderFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.quickfix.IssueResolutionProvider> bindIssueResolutionProvider() {
+ return org.eclipse.xtext.example.arithmetics.ui.quickfix.ArithmeticsQuickfixProvider.class;
+ }
+
+
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/ArithmeticsExecutableExtensionFactory.java b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/ArithmeticsExecutableExtensionFactory.java
new file mode 100644
index 0000000..16db862
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/ArithmeticsExecutableExtensionFactory.java
@@ -0,0 +1,29 @@
+/*
+ * generated by Xtext
+ */
+package org.eclipse.xtext.example.arithmetics.ui;
+
+import org.eclipse.xtext.ui.guice.AbstractGuiceAwareExecutableExtensionFactory;
+import org.osgi.framework.Bundle;
+
+import com.google.inject.Injector;
+
+import org.eclipse.xtext.example.arithmetics.ui.internal.ArithmeticsActivator;
+
+/**
+ * This class was generated. Customizations should only happen in a newly
+ * introduced subclass.
+ */
+public class ArithmeticsExecutableExtensionFactory extends AbstractGuiceAwareExecutableExtensionFactory {
+
+ @Override
+ protected Bundle getBundle() {
+ return ArithmeticsActivator.getInstance().getBundle();
+ }
+
+ @Override
+ protected Injector getInjector() {
+ return ArithmeticsActivator.getInstance().getInjector(ArithmeticsActivator.ORG_ECLIPSE_XTEXT_EXAMPLE_ARITHMETICS_ARITHMETICS);
+ }
+
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/AbstractArithmeticsProposalProvider.java b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/AbstractArithmeticsProposalProvider.java
new file mode 100644
index 0000000..82836fc
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/AbstractArithmeticsProposalProvider.java
@@ -0,0 +1,105 @@
+/*
+* generated by Xtext
+*/
+package org.eclipse.xtext.example.arithmetics.ui.contentassist;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.*;
+import org.eclipse.xtext.common.ui.contentassist.TerminalsProposalProvider;
+import org.eclipse.xtext.ui.editor.contentassist.ICompletionProposalAcceptor;
+import org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext;
+
+/**
+ * Represents a generated, default implementation of interface {@link IProposalProvider}.
+ * Methods are dynamically dispatched on the first parameter, i.e., you can override them
+ * with a more concrete subtype.
+ */
+@SuppressWarnings("all")
+public class AbstractArithmeticsProposalProvider extends TerminalsProposalProvider {
+
+ public void completeModule_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
+ }
+ public void completeModule_Imports(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
+ }
+ public void completeModule_Statements(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
+ }
+ public void completeImport_ImportedNamespace(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
+ }
+ public void completeDefinition_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
+ }
+ public void completeDefinition_Args(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
+ }
+ public void completeDefinition_Expr(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
+ }
+ public void completeDeclaredParameter_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
+ }
+ public void completeEvaluation_Expression(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
+ }
+ public void completeAddition_Right(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
+ }
+ public void completeMultiplication_Right(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
+ }
+ public void completePrimaryExpression_Value(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
+ }
+ public void completePrimaryExpression_Func(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ lookupCrossReference(((CrossReference)assignment.getTerminal()), context, acceptor);
+ }
+ public void completePrimaryExpression_Args(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
+ }
+
+ public void complete_Module(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ // subclasses may override
+ }
+ public void complete_Import(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ // subclasses may override
+ }
+ public void complete_ImportName(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ // subclasses may override
+ }
+ public void complete_Statement(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ // subclasses may override
+ }
+ public void complete_Definition(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ // subclasses may override
+ }
+ public void complete_DeclaredParameter(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ // subclasses may override
+ }
+ public void complete_AbstractDefinition(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ // subclasses may override
+ }
+ public void complete_Evaluation(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ // subclasses may override
+ }
+ public void complete_Expression(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ // subclasses may override
+ }
+ public void complete_Addition(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ // subclasses may override
+ }
+ public void complete_Multiplication(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ // subclasses may override
+ }
+ public void complete_PrimaryExpression(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ // subclasses may override
+ }
+ public void complete_NUMBER(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ // subclasses may override
+ }
+ public void complete_INT(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ // subclasses may override
+ }
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/ArithmeticsParser.java b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/ArithmeticsParser.java
new file mode 100644
index 0000000..6c603b8
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/ArithmeticsParser.java
@@ -0,0 +1,111 @@
+/*
+* generated by Xtext
+*/
+package org.eclipse.xtext.example.arithmetics.ui.contentassist.antlr;
+
+import java.util.Collection;
+import java.util.Map;
+import java.util.HashMap;
+
+import org.antlr.runtime.RecognitionException;
+import org.eclipse.xtext.AbstractElement;
+import org.eclipse.xtext.ui.editor.contentassist.antlr.AbstractContentAssistParser;
+import org.eclipse.xtext.ui.editor.contentassist.antlr.FollowElement;
+import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.AbstractInternalContentAssistParser;
+
+import com.google.inject.Inject;
+
+import org.eclipse.xtext.example.arithmetics.services.ArithmeticsGrammarAccess;
+
+public class ArithmeticsParser extends AbstractContentAssistParser {
+
+ @Inject
+ private ArithmeticsGrammarAccess grammarAccess;
+
+ private Map<AbstractElement, String> nameMappings;
+
+ @Override
+ protected org.eclipse.xtext.example.arithmetics.ui.contentassist.antlr.internal.InternalArithmeticsParser createParser() {
+ org.eclipse.xtext.example.arithmetics.ui.contentassist.antlr.internal.InternalArithmeticsParser result = new org.eclipse.xtext.example.arithmetics.ui.contentassist.antlr.internal.InternalArithmeticsParser(null);
+ result.setGrammarAccess(grammarAccess);
+ return result;
+ }
+
+ @Override
+ protected String getRuleName(AbstractElement element) {
+ if (nameMappings == null) {
+ nameMappings = new HashMap<AbstractElement, String>() {
+ private static final long serialVersionUID = 1L;
+ {
+ put(grammarAccess.getStatementAccess().getAlternatives(), "rule__Statement__Alternatives");
+ put(grammarAccess.getAbstractDefinitionAccess().getAlternatives(), "rule__AbstractDefinition__Alternatives");
+ put(grammarAccess.getAdditionAccess().getAlternatives_1_0(), "rule__Addition__Alternatives_1_0");
+ put(grammarAccess.getMultiplicationAccess().getAlternatives_1_0(), "rule__Multiplication__Alternatives_1_0");
+ put(grammarAccess.getPrimaryExpressionAccess().getAlternatives(), "rule__PrimaryExpression__Alternatives");
+ put(grammarAccess.getModuleAccess().getGroup(), "rule__Module__Group__0");
+ put(grammarAccess.getImportAccess().getGroup(), "rule__Import__Group__0");
+ put(grammarAccess.getImportNameAccess().getGroup(), "rule__ImportName__Group__0");
+ put(grammarAccess.getImportNameAccess().getGroup_1(), "rule__ImportName__Group_1__0");
+ put(grammarAccess.getDefinitionAccess().getGroup(), "rule__Definition__Group__0");
+ put(grammarAccess.getDefinitionAccess().getGroup_2(), "rule__Definition__Group_2__0");
+ put(grammarAccess.getDefinitionAccess().getGroup_2_2(), "rule__Definition__Group_2_2__0");
+ put(grammarAccess.getEvaluationAccess().getGroup(), "rule__Evaluation__Group__0");
+ put(grammarAccess.getAdditionAccess().getGroup(), "rule__Addition__Group__0");
+ put(grammarAccess.getAdditionAccess().getGroup_1(), "rule__Addition__Group_1__0");
+ put(grammarAccess.getAdditionAccess().getGroup_1_0_0(), "rule__Addition__Group_1_0_0__0");
+ put(grammarAccess.getAdditionAccess().getGroup_1_0_1(), "rule__Addition__Group_1_0_1__0");
+ put(grammarAccess.getMultiplicationAccess().getGroup(), "rule__Multiplication__Group__0");
+ put(grammarAccess.getMultiplicationAccess().getGroup_1(), "rule__Multiplication__Group_1__0");
+ put(grammarAccess.getMultiplicationAccess().getGroup_1_0_0(), "rule__Multiplication__Group_1_0_0__0");
+ put(grammarAccess.getMultiplicationAccess().getGroup_1_0_1(), "rule__Multiplication__Group_1_0_1__0");
+ put(grammarAccess.getPrimaryExpressionAccess().getGroup_0(), "rule__PrimaryExpression__Group_0__0");
+ put(grammarAccess.getPrimaryExpressionAccess().getGroup_1(), "rule__PrimaryExpression__Group_1__0");
+ put(grammarAccess.getPrimaryExpressionAccess().getGroup_2(), "rule__PrimaryExpression__Group_2__0");
+ put(grammarAccess.getPrimaryExpressionAccess().getGroup_2_2(), "rule__PrimaryExpression__Group_2_2__0");
+ put(grammarAccess.getPrimaryExpressionAccess().getGroup_2_2_2(), "rule__PrimaryExpression__Group_2_2_2__0");
+ put(grammarAccess.getModuleAccess().getNameAssignment_1(), "rule__Module__NameAssignment_1");
+ put(grammarAccess.getModuleAccess().getImportsAssignment_2(), "rule__Module__ImportsAssignment_2");
+ put(grammarAccess.getModuleAccess().getStatementsAssignment_3(), "rule__Module__StatementsAssignment_3");
+ put(grammarAccess.getImportAccess().getImportedNamespaceAssignment_1(), "rule__Import__ImportedNamespaceAssignment_1");
+ put(grammarAccess.getDefinitionAccess().getNameAssignment_1(), "rule__Definition__NameAssignment_1");
+ put(grammarAccess.getDefinitionAccess().getArgsAssignment_2_1(), "rule__Definition__ArgsAssignment_2_1");
+ put(grammarAccess.getDefinitionAccess().getArgsAssignment_2_2_1(), "rule__Definition__ArgsAssignment_2_2_1");
+ put(grammarAccess.getDefinitionAccess().getExprAssignment_4(), "rule__Definition__ExprAssignment_4");
+ put(grammarAccess.getDeclaredParameterAccess().getNameAssignment(), "rule__DeclaredParameter__NameAssignment");
+ put(grammarAccess.getEvaluationAccess().getExpressionAssignment_0(), "rule__Evaluation__ExpressionAssignment_0");
+ put(grammarAccess.getAdditionAccess().getRightAssignment_1_1(), "rule__Addition__RightAssignment_1_1");
+ put(grammarAccess.getMultiplicationAccess().getRightAssignment_1_1(), "rule__Multiplication__RightAssignment_1_1");
+ put(grammarAccess.getPrimaryExpressionAccess().getValueAssignment_1_1(), "rule__PrimaryExpression__ValueAssignment_1_1");
+ put(grammarAccess.getPrimaryExpressionAccess().getFuncAssignment_2_1(), "rule__PrimaryExpression__FuncAssignment_2_1");
+ put(grammarAccess.getPrimaryExpressionAccess().getArgsAssignment_2_2_1(), "rule__PrimaryExpression__ArgsAssignment_2_2_1");
+ put(grammarAccess.getPrimaryExpressionAccess().getArgsAssignment_2_2_2_1(), "rule__PrimaryExpression__ArgsAssignment_2_2_2_1");
+ }
+ };
+ }
+ return nameMappings.get(element);
+ }
+
+ @Override
+ protected Collection<FollowElement> getFollowElements(AbstractInternalContentAssistParser parser) {
+ try {
+ org.eclipse.xtext.example.arithmetics.ui.contentassist.antlr.internal.InternalArithmeticsParser typedParser = (org.eclipse.xtext.example.arithmetics.ui.contentassist.antlr.internal.InternalArithmeticsParser) parser;
+ typedParser.entryRuleModule();
+ return typedParser.getFollowElements();
+ } catch(RecognitionException ex) {
+ throw new RuntimeException(ex);
+ }
+ }
+
+ @Override
+ protected String[] getInitialHiddenTokens() {
+ return new String[] { "RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT" };
+ }
+
+ public ArithmeticsGrammarAccess getGrammarAccess() {
+ return this.grammarAccess;
+ }
+
+ public void setGrammarAccess(ArithmeticsGrammarAccess grammarAccess) {
+ this.grammarAccess = grammarAccess;
+ }
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g
new file mode 100644
index 0000000..4f4e5bd
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g
@@ -0,0 +1,2434 @@
+/*
+* generated by Xtext
+*/
+grammar InternalArithmetics;
+
+options {
+ superClass=AbstractInternalContentAssistParser;
+
+}
+
+@lexer::header {
+package org.eclipse.xtext.example.arithmetics.ui.contentassist.antlr.internal;
+
+// Hack: Use our own Lexer superclass by means of import.
+// Currently there is no other way to specify the superclass for the lexer.
+import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.Lexer;
+}
+
+@parser::header {
+package org.eclipse.xtext.example.arithmetics.ui.contentassist.antlr.internal;
+
+import java.io.InputStream;
+import org.eclipse.xtext.*;
+import org.eclipse.xtext.parser.*;
+import org.eclipse.xtext.parser.impl.*;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens;
+import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.AbstractInternalContentAssistParser;
+import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.DFA;
+import org.eclipse.xtext.example.arithmetics.services.ArithmeticsGrammarAccess;
+
+}
+
+@parser::members {
+
+ private ArithmeticsGrammarAccess grammarAccess;
+
+ public void setGrammarAccess(ArithmeticsGrammarAccess grammarAccess) {
+ this.grammarAccess = grammarAccess;
+ }
+
+ @Override
+ protected Grammar getGrammar() {
+ return grammarAccess.getGrammar();
+ }
+
+ @Override
+ protected String getValueForTokenName(String tokenName) {
+ return tokenName;
+ }
+
+}
+
+
+
+
+// Entry rule entryRuleModule
+entryRuleModule
+:
+{ before(grammarAccess.getModuleRule()); }
+ ruleModule
+{ after(grammarAccess.getModuleRule()); }
+ EOF
+;
+
+// Rule Module
+ruleModule
+ @init {
+ int stackSize = keepStackSize();
+ }
+ :
+(
+{ before(grammarAccess.getModuleAccess().getGroup()); }
+(rule__Module__Group__0)
+{ after(grammarAccess.getModuleAccess().getGroup()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+// Entry rule entryRuleImport
+entryRuleImport
+:
+{ before(grammarAccess.getImportRule()); }
+ ruleImport
+{ after(grammarAccess.getImportRule()); }
+ EOF
+;
+
+// Rule Import
+ruleImport
+ @init {
+ int stackSize = keepStackSize();
+ }
+ :
+(
+{ before(grammarAccess.getImportAccess().getGroup()); }
+(rule__Import__Group__0)
+{ after(grammarAccess.getImportAccess().getGroup()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+// Entry rule entryRuleImportName
+entryRuleImportName
+:
+{ before(grammarAccess.getImportNameRule()); }
+ ruleImportName
+{ after(grammarAccess.getImportNameRule()); }
+ EOF
+;
+
+// Rule ImportName
+ruleImportName
+ @init {
+ int stackSize = keepStackSize();
+ }
+ :
+(
+{ before(grammarAccess.getImportNameAccess().getGroup()); }
+(rule__ImportName__Group__0)
+{ after(grammarAccess.getImportNameAccess().getGroup()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+// Entry rule entryRuleStatement
+entryRuleStatement
+:
+{ before(grammarAccess.getStatementRule()); }
+ ruleStatement
+{ after(grammarAccess.getStatementRule()); }
+ EOF
+;
+
+// Rule Statement
+ruleStatement
+ @init {
+ int stackSize = keepStackSize();
+ }
+ :
+(
+{ before(grammarAccess.getStatementAccess().getAlternatives()); }
+(rule__Statement__Alternatives)
+{ after(grammarAccess.getStatementAccess().getAlternatives()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+// Entry rule entryRuleDefinition
+entryRuleDefinition
+:
+{ before(grammarAccess.getDefinitionRule()); }
+ ruleDefinition
+{ after(grammarAccess.getDefinitionRule()); }
+ EOF
+;
+
+// Rule Definition
+ruleDefinition
+ @init {
+ int stackSize = keepStackSize();
+ }
+ :
+(
+{ before(grammarAccess.getDefinitionAccess().getGroup()); }
+(rule__Definition__Group__0)
+{ after(grammarAccess.getDefinitionAccess().getGroup()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+// Entry rule entryRuleDeclaredParameter
+entryRuleDeclaredParameter
+:
+{ before(grammarAccess.getDeclaredParameterRule()); }
+ ruleDeclaredParameter
+{ after(grammarAccess.getDeclaredParameterRule()); }
+ EOF
+;
+
+// Rule DeclaredParameter
+ruleDeclaredParameter
+ @init {
+ int stackSize = keepStackSize();
+ }
+ :
+(
+{ before(grammarAccess.getDeclaredParameterAccess().getNameAssignment()); }
+(rule__DeclaredParameter__NameAssignment)
+{ after(grammarAccess.getDeclaredParameterAccess().getNameAssignment()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+
+
+// Entry rule entryRuleEvaluation
+entryRuleEvaluation
+:
+{ before(grammarAccess.getEvaluationRule()); }
+ ruleEvaluation
+{ after(grammarAccess.getEvaluationRule()); }
+ EOF
+;
+
+// Rule Evaluation
+ruleEvaluation
+ @init {
+ int stackSize = keepStackSize();
+ }
+ :
+(
+{ before(grammarAccess.getEvaluationAccess().getGroup()); }
+(rule__Evaluation__Group__0)
+{ after(grammarAccess.getEvaluationAccess().getGroup()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+// Entry rule entryRuleExpression
+entryRuleExpression
+:
+{ before(grammarAccess.getExpressionRule()); }
+ ruleExpression
+{ after(grammarAccess.getExpressionRule()); }
+ EOF
+;
+
+// Rule Expression
+ruleExpression
+ @init {
+ int stackSize = keepStackSize();
+ }
+ :
+(
+{ before(grammarAccess.getExpressionAccess().getAdditionParserRuleCall()); }
+ ruleAddition
+{ after(grammarAccess.getExpressionAccess().getAdditionParserRuleCall()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+// Entry rule entryRuleAddition
+entryRuleAddition
+:
+{ before(grammarAccess.getAdditionRule()); }
+ ruleAddition
+{ after(grammarAccess.getAdditionRule()); }
+ EOF
+;
+
+// Rule Addition
+ruleAddition
+ @init {
+ int stackSize = keepStackSize();
+ }
+ :
+(
+{ before(grammarAccess.getAdditionAccess().getGroup()); }
+(rule__Addition__Group__0)
+{ after(grammarAccess.getAdditionAccess().getGroup()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+// Entry rule entryRuleMultiplication
+entryRuleMultiplication
+:
+{ before(grammarAccess.getMultiplicationRule()); }
+ ruleMultiplication
+{ after(grammarAccess.getMultiplicationRule()); }
+ EOF
+;
+
+// Rule Multiplication
+ruleMultiplication
+ @init {
+ int stackSize = keepStackSize();
+ }
+ :
+(
+{ before(grammarAccess.getMultiplicationAccess().getGroup()); }
+(rule__Multiplication__Group__0)
+{ after(grammarAccess.getMultiplicationAccess().getGroup()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+// Entry rule entryRulePrimaryExpression
+entryRulePrimaryExpression
+:
+{ before(grammarAccess.getPrimaryExpressionRule()); }
+ rulePrimaryExpression
+{ after(grammarAccess.getPrimaryExpressionRule()); }
+ EOF
+;
+
+// Rule PrimaryExpression
+rulePrimaryExpression
+ @init {
+ int stackSize = keepStackSize();
+ }
+ :
+(
+{ before(grammarAccess.getPrimaryExpressionAccess().getAlternatives()); }
+(rule__PrimaryExpression__Alternatives)
+{ after(grammarAccess.getPrimaryExpressionAccess().getAlternatives()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+
+rule__Statement__Alternatives
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getStatementAccess().getDefinitionParserRuleCall_0()); }
+ ruleDefinition
+{ after(grammarAccess.getStatementAccess().getDefinitionParserRuleCall_0()); }
+)
+
+ |(
+{ before(grammarAccess.getStatementAccess().getEvaluationParserRuleCall_1()); }
+ ruleEvaluation
+{ after(grammarAccess.getStatementAccess().getEvaluationParserRuleCall_1()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__Addition__Alternatives_1_0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getAdditionAccess().getGroup_1_0_0()); }
+(rule__Addition__Group_1_0_0__0)
+{ after(grammarAccess.getAdditionAccess().getGroup_1_0_0()); }
+)
+
+ |(
+{ before(grammarAccess.getAdditionAccess().getGroup_1_0_1()); }
+(rule__Addition__Group_1_0_1__0)
+{ after(grammarAccess.getAdditionAccess().getGroup_1_0_1()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Multiplication__Alternatives_1_0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getMultiplicationAccess().getGroup_1_0_0()); }
+(rule__Multiplication__Group_1_0_0__0)
+{ after(grammarAccess.getMultiplicationAccess().getGroup_1_0_0()); }
+)
+
+ |(
+{ before(grammarAccess.getMultiplicationAccess().getGroup_1_0_1()); }
+(rule__Multiplication__Group_1_0_1__0)
+{ after(grammarAccess.getMultiplicationAccess().getGroup_1_0_1()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__PrimaryExpression__Alternatives
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getPrimaryExpressionAccess().getGroup_0()); }
+(rule__PrimaryExpression__Group_0__0)
+{ after(grammarAccess.getPrimaryExpressionAccess().getGroup_0()); }
+)
+
+ |(
+{ before(grammarAccess.getPrimaryExpressionAccess().getGroup_1()); }
+(rule__PrimaryExpression__Group_1__0)
+{ after(grammarAccess.getPrimaryExpressionAccess().getGroup_1()); }
+)
+
+ |(
+{ before(grammarAccess.getPrimaryExpressionAccess().getGroup_2()); }
+(rule__PrimaryExpression__Group_2__0)
+{ after(grammarAccess.getPrimaryExpressionAccess().getGroup_2()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+rule__Module__Group__0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Module__Group__0__Impl
+ rule__Module__Group__1
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Module__Group__0__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getModuleAccess().getModuleKeyword_0()); }
+
+ 'module'
+
+{ after(grammarAccess.getModuleAccess().getModuleKeyword_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__Module__Group__1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Module__Group__1__Impl
+ rule__Module__Group__2
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Module__Group__1__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getModuleAccess().getNameAssignment_1()); }
+(rule__Module__NameAssignment_1)
+{ after(grammarAccess.getModuleAccess().getNameAssignment_1()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__Module__Group__2
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Module__Group__2__Impl
+ rule__Module__Group__3
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Module__Group__2__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getModuleAccess().getImportsAssignment_2()); }
+(rule__Module__ImportsAssignment_2)*
+{ after(grammarAccess.getModuleAccess().getImportsAssignment_2()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__Module__Group__3
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Module__Group__3__Impl
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Module__Group__3__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getModuleAccess().getStatementsAssignment_3()); }
+(rule__Module__StatementsAssignment_3)*
+{ after(grammarAccess.getModuleAccess().getStatementsAssignment_3()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+
+
+
+
+
+
+
+rule__Import__Group__0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Import__Group__0__Impl
+ rule__Import__Group__1
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Import__Group__0__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getImportAccess().getImportKeyword_0()); }
+
+ 'import'
+
+{ after(grammarAccess.getImportAccess().getImportKeyword_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__Import__Group__1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Import__Group__1__Impl
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Import__Group__1__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getImportAccess().getImportedNamespaceAssignment_1()); }
+(rule__Import__ImportedNamespaceAssignment_1)
+{ after(grammarAccess.getImportAccess().getImportedNamespaceAssignment_1()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+
+
+
+rule__ImportName__Group__0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__ImportName__Group__0__Impl
+ rule__ImportName__Group__1
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__ImportName__Group__0__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getImportNameAccess().getIDTerminalRuleCall_0()); }
+ RULE_ID
+{ after(grammarAccess.getImportNameAccess().getIDTerminalRuleCall_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__ImportName__Group__1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__ImportName__Group__1__Impl
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__ImportName__Group__1__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getImportNameAccess().getGroup_1()); }
+(rule__ImportName__Group_1__0)?
+{ after(grammarAccess.getImportNameAccess().getGroup_1()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+
+
+
+rule__ImportName__Group_1__0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__ImportName__Group_1__0__Impl
+ rule__ImportName__Group_1__1
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__ImportName__Group_1__0__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getImportNameAccess().getFullStopKeyword_1_0()); }
+
+ '.'
+
+{ after(grammarAccess.getImportNameAccess().getFullStopKeyword_1_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__ImportName__Group_1__1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__ImportName__Group_1__1__Impl
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__ImportName__Group_1__1__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getImportNameAccess().getAsteriskKeyword_1_1()); }
+
+ '*'
+
+{ after(grammarAccess.getImportNameAccess().getAsteriskKeyword_1_1()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+
+
+
+rule__Definition__Group__0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Definition__Group__0__Impl
+ rule__Definition__Group__1
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Definition__Group__0__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getDefinitionAccess().getDefKeyword_0()); }
+
+ 'def'
+
+{ after(grammarAccess.getDefinitionAccess().getDefKeyword_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__Definition__Group__1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Definition__Group__1__Impl
+ rule__Definition__Group__2
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Definition__Group__1__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getDefinitionAccess().getNameAssignment_1()); }
+(rule__Definition__NameAssignment_1)
+{ after(grammarAccess.getDefinitionAccess().getNameAssignment_1()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__Definition__Group__2
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Definition__Group__2__Impl
+ rule__Definition__Group__3
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Definition__Group__2__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getDefinitionAccess().getGroup_2()); }
+(rule__Definition__Group_2__0)?
+{ after(grammarAccess.getDefinitionAccess().getGroup_2()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__Definition__Group__3
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Definition__Group__3__Impl
+ rule__Definition__Group__4
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Definition__Group__3__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getDefinitionAccess().getColonKeyword_3()); }
+
+ ':'
+
+{ after(grammarAccess.getDefinitionAccess().getColonKeyword_3()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__Definition__Group__4
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Definition__Group__4__Impl
+ rule__Definition__Group__5
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Definition__Group__4__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getDefinitionAccess().getExprAssignment_4()); }
+(rule__Definition__ExprAssignment_4)
+{ after(grammarAccess.getDefinitionAccess().getExprAssignment_4()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__Definition__Group__5
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Definition__Group__5__Impl
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Definition__Group__5__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getDefinitionAccess().getSemicolonKeyword_5()); }
+
+ ';'
+
+{ after(grammarAccess.getDefinitionAccess().getSemicolonKeyword_5()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+rule__Definition__Group_2__0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Definition__Group_2__0__Impl
+ rule__Definition__Group_2__1
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Definition__Group_2__0__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getDefinitionAccess().getLeftParenthesisKeyword_2_0()); }
+
+ '('
+
+{ after(grammarAccess.getDefinitionAccess().getLeftParenthesisKeyword_2_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__Definition__Group_2__1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Definition__Group_2__1__Impl
+ rule__Definition__Group_2__2
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Definition__Group_2__1__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getDefinitionAccess().getArgsAssignment_2_1()); }
+(rule__Definition__ArgsAssignment_2_1)
+{ after(grammarAccess.getDefinitionAccess().getArgsAssignment_2_1()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__Definition__Group_2__2
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Definition__Group_2__2__Impl
+ rule__Definition__Group_2__3
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Definition__Group_2__2__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getDefinitionAccess().getGroup_2_2()); }
+(rule__Definition__Group_2_2__0)*
+{ after(grammarAccess.getDefinitionAccess().getGroup_2_2()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__Definition__Group_2__3
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Definition__Group_2__3__Impl
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Definition__Group_2__3__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getDefinitionAccess().getRightParenthesisKeyword_2_3()); }
+
+ ')'
+
+{ after(grammarAccess.getDefinitionAccess().getRightParenthesisKeyword_2_3()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+
+
+
+
+
+
+
+rule__Definition__Group_2_2__0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Definition__Group_2_2__0__Impl
+ rule__Definition__Group_2_2__1
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Definition__Group_2_2__0__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getDefinitionAccess().getCommaKeyword_2_2_0()); }
+
+ ','
+
+{ after(grammarAccess.getDefinitionAccess().getCommaKeyword_2_2_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__Definition__Group_2_2__1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Definition__Group_2_2__1__Impl
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Definition__Group_2_2__1__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getDefinitionAccess().getArgsAssignment_2_2_1()); }
+(rule__Definition__ArgsAssignment_2_2_1)
+{ after(grammarAccess.getDefinitionAccess().getArgsAssignment_2_2_1()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+
+
+
+rule__Evaluation__Group__0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Evaluation__Group__0__Impl
+ rule__Evaluation__Group__1
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Evaluation__Group__0__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getEvaluationAccess().getExpressionAssignment_0()); }
+(rule__Evaluation__ExpressionAssignment_0)
+{ after(grammarAccess.getEvaluationAccess().getExpressionAssignment_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__Evaluation__Group__1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Evaluation__Group__1__Impl
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Evaluation__Group__1__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getEvaluationAccess().getSemicolonKeyword_1()); }
+
+ ';'
+
+{ after(grammarAccess.getEvaluationAccess().getSemicolonKeyword_1()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+
+
+
+rule__Addition__Group__0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Addition__Group__0__Impl
+ rule__Addition__Group__1
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Addition__Group__0__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getAdditionAccess().getMultiplicationParserRuleCall_0()); }
+ ruleMultiplication
+{ after(grammarAccess.getAdditionAccess().getMultiplicationParserRuleCall_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__Addition__Group__1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Addition__Group__1__Impl
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Addition__Group__1__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getAdditionAccess().getGroup_1()); }
+(rule__Addition__Group_1__0)*
+{ after(grammarAccess.getAdditionAccess().getGroup_1()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+
+
+
+rule__Addition__Group_1__0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Addition__Group_1__0__Impl
+ rule__Addition__Group_1__1
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Addition__Group_1__0__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getAdditionAccess().getAlternatives_1_0()); }
+(rule__Addition__Alternatives_1_0)
+{ after(grammarAccess.getAdditionAccess().getAlternatives_1_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__Addition__Group_1__1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Addition__Group_1__1__Impl
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Addition__Group_1__1__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getAdditionAccess().getRightAssignment_1_1()); }
+(rule__Addition__RightAssignment_1_1)
+{ after(grammarAccess.getAdditionAccess().getRightAssignment_1_1()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+
+
+
+rule__Addition__Group_1_0_0__0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Addition__Group_1_0_0__0__Impl
+ rule__Addition__Group_1_0_0__1
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Addition__Group_1_0_0__0__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getAdditionAccess().getPlusLeftAction_1_0_0_0()); }
+(
+
+)
+{ after(grammarAccess.getAdditionAccess().getPlusLeftAction_1_0_0_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__Addition__Group_1_0_0__1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Addition__Group_1_0_0__1__Impl
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Addition__Group_1_0_0__1__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getAdditionAccess().getPlusSignKeyword_1_0_0_1()); }
+
+ '+'
+
+{ after(grammarAccess.getAdditionAccess().getPlusSignKeyword_1_0_0_1()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+
+
+
+rule__Addition__Group_1_0_1__0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Addition__Group_1_0_1__0__Impl
+ rule__Addition__Group_1_0_1__1
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Addition__Group_1_0_1__0__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getAdditionAccess().getMinusLeftAction_1_0_1_0()); }
+(
+
+)
+{ after(grammarAccess.getAdditionAccess().getMinusLeftAction_1_0_1_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__Addition__Group_1_0_1__1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Addition__Group_1_0_1__1__Impl
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Addition__Group_1_0_1__1__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getAdditionAccess().getHyphenMinusKeyword_1_0_1_1()); }
+
+ '-'
+
+{ after(grammarAccess.getAdditionAccess().getHyphenMinusKeyword_1_0_1_1()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+
+
+
+rule__Multiplication__Group__0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Multiplication__Group__0__Impl
+ rule__Multiplication__Group__1
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Multiplication__Group__0__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getMultiplicationAccess().getPrimaryExpressionParserRuleCall_0()); }
+ rulePrimaryExpression
+{ after(grammarAccess.getMultiplicationAccess().getPrimaryExpressionParserRuleCall_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__Multiplication__Group__1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Multiplication__Group__1__Impl
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Multiplication__Group__1__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getMultiplicationAccess().getGroup_1()); }
+(rule__Multiplication__Group_1__0)*
+{ after(grammarAccess.getMultiplicationAccess().getGroup_1()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+
+
+
+rule__Multiplication__Group_1__0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Multiplication__Group_1__0__Impl
+ rule__Multiplication__Group_1__1
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Multiplication__Group_1__0__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getMultiplicationAccess().getAlternatives_1_0()); }
+(rule__Multiplication__Alternatives_1_0)
+{ after(grammarAccess.getMultiplicationAccess().getAlternatives_1_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__Multiplication__Group_1__1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Multiplication__Group_1__1__Impl
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Multiplication__Group_1__1__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getMultiplicationAccess().getRightAssignment_1_1()); }
+(rule__Multiplication__RightAssignment_1_1)
+{ after(grammarAccess.getMultiplicationAccess().getRightAssignment_1_1()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+
+
+
+rule__Multiplication__Group_1_0_0__0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Multiplication__Group_1_0_0__0__Impl
+ rule__Multiplication__Group_1_0_0__1
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Multiplication__Group_1_0_0__0__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getMultiplicationAccess().getMultiLeftAction_1_0_0_0()); }
+(
+
+)
+{ after(grammarAccess.getMultiplicationAccess().getMultiLeftAction_1_0_0_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__Multiplication__Group_1_0_0__1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Multiplication__Group_1_0_0__1__Impl
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Multiplication__Group_1_0_0__1__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getMultiplicationAccess().getAsteriskKeyword_1_0_0_1()); }
+
+ '*'
+
+{ after(grammarAccess.getMultiplicationAccess().getAsteriskKeyword_1_0_0_1()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+
+
+
+rule__Multiplication__Group_1_0_1__0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Multiplication__Group_1_0_1__0__Impl
+ rule__Multiplication__Group_1_0_1__1
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Multiplication__Group_1_0_1__0__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getMultiplicationAccess().getDivLeftAction_1_0_1_0()); }
+(
+
+)
+{ after(grammarAccess.getMultiplicationAccess().getDivLeftAction_1_0_1_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__Multiplication__Group_1_0_1__1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Multiplication__Group_1_0_1__1__Impl
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Multiplication__Group_1_0_1__1__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getMultiplicationAccess().getSolidusKeyword_1_0_1_1()); }
+
+ '/'
+
+{ after(grammarAccess.getMultiplicationAccess().getSolidusKeyword_1_0_1_1()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+
+
+
+rule__PrimaryExpression__Group_0__0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__PrimaryExpression__Group_0__0__Impl
+ rule__PrimaryExpression__Group_0__1
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__PrimaryExpression__Group_0__0__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getPrimaryExpressionAccess().getLeftParenthesisKeyword_0_0()); }
+
+ '('
+
+{ after(grammarAccess.getPrimaryExpressionAccess().getLeftParenthesisKeyword_0_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__PrimaryExpression__Group_0__1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__PrimaryExpression__Group_0__1__Impl
+ rule__PrimaryExpression__Group_0__2
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__PrimaryExpression__Group_0__1__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getPrimaryExpressionAccess().getExpressionParserRuleCall_0_1()); }
+ ruleExpression
+{ after(grammarAccess.getPrimaryExpressionAccess().getExpressionParserRuleCall_0_1()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__PrimaryExpression__Group_0__2
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__PrimaryExpression__Group_0__2__Impl
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__PrimaryExpression__Group_0__2__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getPrimaryExpressionAccess().getRightParenthesisKeyword_0_2()); }
+
+ ')'
+
+{ after(grammarAccess.getPrimaryExpressionAccess().getRightParenthesisKeyword_0_2()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+
+
+
+
+
+rule__PrimaryExpression__Group_1__0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__PrimaryExpression__Group_1__0__Impl
+ rule__PrimaryExpression__Group_1__1
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__PrimaryExpression__Group_1__0__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getPrimaryExpressionAccess().getNumberLiteralAction_1_0()); }
+(
+
+)
+{ after(grammarAccess.getPrimaryExpressionAccess().getNumberLiteralAction_1_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__PrimaryExpression__Group_1__1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__PrimaryExpression__Group_1__1__Impl
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__PrimaryExpression__Group_1__1__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getPrimaryExpressionAccess().getValueAssignment_1_1()); }
+(rule__PrimaryExpression__ValueAssignment_1_1)
+{ after(grammarAccess.getPrimaryExpressionAccess().getValueAssignment_1_1()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+
+
+
+rule__PrimaryExpression__Group_2__0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__PrimaryExpression__Group_2__0__Impl
+ rule__PrimaryExpression__Group_2__1
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__PrimaryExpression__Group_2__0__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getPrimaryExpressionAccess().getFunctionCallAction_2_0()); }
+(
+
+)
+{ after(grammarAccess.getPrimaryExpressionAccess().getFunctionCallAction_2_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__PrimaryExpression__Group_2__1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__PrimaryExpression__Group_2__1__Impl
+ rule__PrimaryExpression__Group_2__2
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__PrimaryExpression__Group_2__1__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getPrimaryExpressionAccess().getFuncAssignment_2_1()); }
+(rule__PrimaryExpression__FuncAssignment_2_1)
+{ after(grammarAccess.getPrimaryExpressionAccess().getFuncAssignment_2_1()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__PrimaryExpression__Group_2__2
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__PrimaryExpression__Group_2__2__Impl
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__PrimaryExpression__Group_2__2__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getPrimaryExpressionAccess().getGroup_2_2()); }
+(rule__PrimaryExpression__Group_2_2__0)?
+{ after(grammarAccess.getPrimaryExpressionAccess().getGroup_2_2()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+
+
+
+
+
+rule__PrimaryExpression__Group_2_2__0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__PrimaryExpression__Group_2_2__0__Impl
+ rule__PrimaryExpression__Group_2_2__1
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__PrimaryExpression__Group_2_2__0__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getPrimaryExpressionAccess().getLeftParenthesisKeyword_2_2_0()); }
+
+ '('
+
+{ after(grammarAccess.getPrimaryExpressionAccess().getLeftParenthesisKeyword_2_2_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__PrimaryExpression__Group_2_2__1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__PrimaryExpression__Group_2_2__1__Impl
+ rule__PrimaryExpression__Group_2_2__2
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__PrimaryExpression__Group_2_2__1__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getPrimaryExpressionAccess().getArgsAssignment_2_2_1()); }
+(rule__PrimaryExpression__ArgsAssignment_2_2_1)
+{ after(grammarAccess.getPrimaryExpressionAccess().getArgsAssignment_2_2_1()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__PrimaryExpression__Group_2_2__2
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__PrimaryExpression__Group_2_2__2__Impl
+ rule__PrimaryExpression__Group_2_2__3
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__PrimaryExpression__Group_2_2__2__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getPrimaryExpressionAccess().getGroup_2_2_2()); }
+(rule__PrimaryExpression__Group_2_2_2__0)*
+{ after(grammarAccess.getPrimaryExpressionAccess().getGroup_2_2_2()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__PrimaryExpression__Group_2_2__3
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__PrimaryExpression__Group_2_2__3__Impl
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__PrimaryExpression__Group_2_2__3__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getPrimaryExpressionAccess().getRightParenthesisKeyword_2_2_3()); }
+
+ ')'
+
+{ after(grammarAccess.getPrimaryExpressionAccess().getRightParenthesisKeyword_2_2_3()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+
+
+
+
+
+
+
+rule__PrimaryExpression__Group_2_2_2__0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__PrimaryExpression__Group_2_2_2__0__Impl
+ rule__PrimaryExpression__Group_2_2_2__1
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__PrimaryExpression__Group_2_2_2__0__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getPrimaryExpressionAccess().getCommaKeyword_2_2_2_0()); }
+
+ ','
+
+{ after(grammarAccess.getPrimaryExpressionAccess().getCommaKeyword_2_2_2_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__PrimaryExpression__Group_2_2_2__1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__PrimaryExpression__Group_2_2_2__1__Impl
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__PrimaryExpression__Group_2_2_2__1__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getPrimaryExpressionAccess().getArgsAssignment_2_2_2_1()); }
+(rule__PrimaryExpression__ArgsAssignment_2_2_2_1)
+{ after(grammarAccess.getPrimaryExpressionAccess().getArgsAssignment_2_2_2_1()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+
+
+
+
+rule__Module__NameAssignment_1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getModuleAccess().getNameIDTerminalRuleCall_1_0()); }
+ RULE_ID{ after(grammarAccess.getModuleAccess().getNameIDTerminalRuleCall_1_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Module__ImportsAssignment_2
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getModuleAccess().getImportsImportParserRuleCall_2_0()); }
+ ruleImport{ after(grammarAccess.getModuleAccess().getImportsImportParserRuleCall_2_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Module__StatementsAssignment_3
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getModuleAccess().getStatementsStatementParserRuleCall_3_0()); }
+ ruleStatement{ after(grammarAccess.getModuleAccess().getStatementsStatementParserRuleCall_3_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Import__ImportedNamespaceAssignment_1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getImportAccess().getImportedNamespaceImportNameParserRuleCall_1_0()); }
+ ruleImportName{ after(grammarAccess.getImportAccess().getImportedNamespaceImportNameParserRuleCall_1_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Definition__NameAssignment_1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getDefinitionAccess().getNameIDTerminalRuleCall_1_0()); }
+ RULE_ID{ after(grammarAccess.getDefinitionAccess().getNameIDTerminalRuleCall_1_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Definition__ArgsAssignment_2_1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getDefinitionAccess().getArgsDeclaredParameterParserRuleCall_2_1_0()); }
+ ruleDeclaredParameter{ after(grammarAccess.getDefinitionAccess().getArgsDeclaredParameterParserRuleCall_2_1_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Definition__ArgsAssignment_2_2_1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getDefinitionAccess().getArgsDeclaredParameterParserRuleCall_2_2_1_0()); }
+ ruleDeclaredParameter{ after(grammarAccess.getDefinitionAccess().getArgsDeclaredParameterParserRuleCall_2_2_1_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Definition__ExprAssignment_4
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getDefinitionAccess().getExprExpressionParserRuleCall_4_0()); }
+ ruleExpression{ after(grammarAccess.getDefinitionAccess().getExprExpressionParserRuleCall_4_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__DeclaredParameter__NameAssignment
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getDeclaredParameterAccess().getNameIDTerminalRuleCall_0()); }
+ RULE_ID{ after(grammarAccess.getDeclaredParameterAccess().getNameIDTerminalRuleCall_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Evaluation__ExpressionAssignment_0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getEvaluationAccess().getExpressionExpressionParserRuleCall_0_0()); }
+ ruleExpression{ after(grammarAccess.getEvaluationAccess().getExpressionExpressionParserRuleCall_0_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Addition__RightAssignment_1_1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getAdditionAccess().getRightMultiplicationParserRuleCall_1_1_0()); }
+ ruleMultiplication{ after(grammarAccess.getAdditionAccess().getRightMultiplicationParserRuleCall_1_1_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Multiplication__RightAssignment_1_1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getMultiplicationAccess().getRightPrimaryExpressionParserRuleCall_1_1_0()); }
+ rulePrimaryExpression{ after(grammarAccess.getMultiplicationAccess().getRightPrimaryExpressionParserRuleCall_1_1_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__PrimaryExpression__ValueAssignment_1_1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getPrimaryExpressionAccess().getValueNUMBERTerminalRuleCall_1_1_0()); }
+ RULE_NUMBER{ after(grammarAccess.getPrimaryExpressionAccess().getValueNUMBERTerminalRuleCall_1_1_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__PrimaryExpression__FuncAssignment_2_1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getPrimaryExpressionAccess().getFuncAbstractDefinitionCrossReference_2_1_0()); }
+(
+{ before(grammarAccess.getPrimaryExpressionAccess().getFuncAbstractDefinitionIDTerminalRuleCall_2_1_0_1()); }
+ RULE_ID{ after(grammarAccess.getPrimaryExpressionAccess().getFuncAbstractDefinitionIDTerminalRuleCall_2_1_0_1()); }
+)
+{ after(grammarAccess.getPrimaryExpressionAccess().getFuncAbstractDefinitionCrossReference_2_1_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__PrimaryExpression__ArgsAssignment_2_2_1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getPrimaryExpressionAccess().getArgsExpressionParserRuleCall_2_2_1_0()); }
+ ruleExpression{ after(grammarAccess.getPrimaryExpressionAccess().getArgsExpressionParserRuleCall_2_2_1_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__PrimaryExpression__ArgsAssignment_2_2_2_1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getPrimaryExpressionAccess().getArgsExpressionParserRuleCall_2_2_2_1_0()); }
+ ruleExpression{ after(grammarAccess.getPrimaryExpressionAccess().getArgsExpressionParserRuleCall_2_2_2_1_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+RULE_NUMBER : ('0'..'9')* ('.' ('0'..'9')+)?;
+
+RULE_INT : 'this one has been deactivated';
+
+RULE_ID : '^'? ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*;
+
+RULE_STRING : ('"' ('\\' ('b'|'t'|'n'|'f'|'r'|'u'|'"'|'\''|'\\')|~(('\\'|'"')))* '"'|'\'' ('\\' ('b'|'t'|'n'|'f'|'r'|'u'|'"'|'\''|'\\')|~(('\\'|'\'')))* '\'');
+
+RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )*'*/';
+
+RULE_SL_COMMENT : '//' ~(('\n'|'\r'))* ('\r'? '\n')?;
+
+RULE_WS : (' '|'\t'|'\r'|'\n')+;
+
+RULE_ANY_OTHER : .;
+
+
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.tokens b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.tokens
new file mode 100644
index 0000000..616c962
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.tokens
@@ -0,0 +1,34 @@
+RULE_ID=4
+T__24=24
+T__23=23
+T__22=22
+RULE_ANY_OTHER=11
+T__21=21
+T__20=20
+RULE_SL_COMMENT=9
+RULE_ML_COMMENT=8
+T__19=19
+RULE_STRING=7
+T__16=16
+T__15=15
+T__18=18
+T__17=17
+T__12=12
+RULE_NUMBER=5
+T__14=14
+T__13=13
+RULE_INT=6
+RULE_WS=10
+'/'=24
+'def'=16
+'module'=12
+';'=18
+':'=17
+'('=19
+'*'=15
+'-'=23
+'+'=22
+','=21
+'.'=14
+')'=20
+'import'=13
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmeticsLexer.java b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmeticsLexer.java
new file mode 100644
index 0000000..4438d87
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmeticsLexer.java
@@ -0,0 +1,1252 @@
+package org.eclipse.xtext.example.arithmetics.ui.contentassist.antlr.internal;
+
+// Hack: Use our own Lexer superclass by means of import.
+// Currently there is no other way to specify the superclass for the lexer.
+import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.Lexer;
+
+
+import org.antlr.runtime.*;
+import java.util.Stack;
+import java.util.List;
+import java.util.ArrayList;
+
+@SuppressWarnings("all")
+public class InternalArithmeticsLexer extends Lexer {
+ public static final int RULE_ID=4;
+ public static final int T__24=24;
+ public static final int T__23=23;
+ public static final int T__22=22;
+ public static final int RULE_ANY_OTHER=11;
+ public static final int T__21=21;
+ public static final int T__20=20;
+ public static final int EOF=-1;
+ public static final int RULE_SL_COMMENT=9;
+ public static final int RULE_ML_COMMENT=8;
+ public static final int T__19=19;
+ public static final int RULE_STRING=7;
+ public static final int T__16=16;
+ public static final int T__15=15;
+ public static final int T__18=18;
+ public static final int T__17=17;
+ public static final int RULE_NUMBER=5;
+ public static final int T__12=12;
+ public static final int T__14=14;
+ public static final int T__13=13;
+ public static final int RULE_INT=6;
+ public static final int RULE_WS=10;
+
+ // delegates
+ // delegators
+
+ public InternalArithmeticsLexer() {;}
+ public InternalArithmeticsLexer(CharStream input) {
+ this(input, new RecognizerSharedState());
+ }
+ public InternalArithmeticsLexer(CharStream input, RecognizerSharedState state) {
+ super(input,state);
+
+ }
+ public String getGrammarFileName() { return "../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g"; }
+
+ // $ANTLR start "T__12"
+ public final void mT__12() throws RecognitionException {
+ try {
+ int _type = T__12;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:11:7: ( 'module' )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:11:9: 'module'
+ {
+ match("module");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__12"
+
+ // $ANTLR start "T__13"
+ public final void mT__13() throws RecognitionException {
+ try {
+ int _type = T__13;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:12:7: ( 'import' )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:12:9: 'import'
+ {
+ match("import");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__13"
+
+ // $ANTLR start "T__14"
+ public final void mT__14() throws RecognitionException {
+ try {
+ int _type = T__14;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:13:7: ( '.' )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:13:9: '.'
+ {
+ match('.');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__14"
+
+ // $ANTLR start "T__15"
+ public final void mT__15() throws RecognitionException {
+ try {
+ int _type = T__15;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:14:7: ( '*' )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:14:9: '*'
+ {
+ match('*');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__15"
+
+ // $ANTLR start "T__16"
+ public final void mT__16() throws RecognitionException {
+ try {
+ int _type = T__16;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:15:7: ( 'def' )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:15:9: 'def'
+ {
+ match("def");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__16"
+
+ // $ANTLR start "T__17"
+ public final void mT__17() throws RecognitionException {
+ try {
+ int _type = T__17;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:16:7: ( ':' )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:16:9: ':'
+ {
+ match(':');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__17"
+
+ // $ANTLR start "T__18"
+ public final void mT__18() throws RecognitionException {
+ try {
+ int _type = T__18;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:17:7: ( ';' )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:17:9: ';'
+ {
+ match(';');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__18"
+
+ // $ANTLR start "T__19"
+ public final void mT__19() throws RecognitionException {
+ try {
+ int _type = T__19;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:18:7: ( '(' )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:18:9: '('
+ {
+ match('(');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__19"
+
+ // $ANTLR start "T__20"
+ public final void mT__20() throws RecognitionException {
+ try {
+ int _type = T__20;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:19:7: ( ')' )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:19:9: ')'
+ {
+ match(')');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__20"
+
+ // $ANTLR start "T__21"
+ public final void mT__21() throws RecognitionException {
+ try {
+ int _type = T__21;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:20:7: ( ',' )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:20:9: ','
+ {
+ match(',');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__21"
+
+ // $ANTLR start "T__22"
+ public final void mT__22() throws RecognitionException {
+ try {
+ int _type = T__22;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:21:7: ( '+' )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:21:9: '+'
+ {
+ match('+');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__22"
+
+ // $ANTLR start "T__23"
+ public final void mT__23() throws RecognitionException {
+ try {
+ int _type = T__23;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:22:7: ( '-' )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:22:9: '-'
+ {
+ match('-');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__23"
+
+ // $ANTLR start "T__24"
+ public final void mT__24() throws RecognitionException {
+ try {
+ int _type = T__24;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:23:7: ( '/' )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:23:9: '/'
+ {
+ match('/');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__24"
+
+ // $ANTLR start "RULE_NUMBER"
+ public final void mRULE_NUMBER() throws RecognitionException {
+ try {
+ int _type = RULE_NUMBER;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2418:13: ( ( '0' .. '9' )* ( '.' ( '0' .. '9' )+ )? )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2418:15: ( '0' .. '9' )* ( '.' ( '0' .. '9' )+ )?
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2418:15: ( '0' .. '9' )*
+ loop1:
+ do {
+ int alt1=2;
+ int LA1_0 = input.LA(1);
+
+ if ( ((LA1_0>='0' && LA1_0<='9')) ) {
+ alt1=1;
+ }
+
+
+ switch (alt1) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2418:16: '0' .. '9'
+ {
+ matchRange('0','9');
+
+ }
+ break;
+
+ default :
+ break loop1;
+ }
+ } while (true);
+
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2418:27: ( '.' ( '0' .. '9' )+ )?
+ int alt3=2;
+ int LA3_0 = input.LA(1);
+
+ if ( (LA3_0=='.') ) {
+ alt3=1;
+ }
+ switch (alt3) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2418:28: '.' ( '0' .. '9' )+
+ {
+ match('.');
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2418:32: ( '0' .. '9' )+
+ int cnt2=0;
+ loop2:
+ do {
+ int alt2=2;
+ int LA2_0 = input.LA(1);
+
+ if ( ((LA2_0>='0' && LA2_0<='9')) ) {
+ alt2=1;
+ }
+
+
+ switch (alt2) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2418:33: '0' .. '9'
+ {
+ matchRange('0','9');
+
+ }
+ break;
+
+ default :
+ if ( cnt2 >= 1 ) break loop2;
+ EarlyExitException eee =
+ new EarlyExitException(2, input);
+ throw eee;
+ }
+ cnt2++;
+ } while (true);
+
+
+ }
+ break;
+
+ }
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_NUMBER"
+
+ // $ANTLR start "RULE_INT"
+ public final void mRULE_INT() throws RecognitionException {
+ try {
+ int _type = RULE_INT;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2420:10: ( 'this one has been deactivated' )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2420:12: 'this one has been deactivated'
+ {
+ match("this one has been deactivated");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_INT"
+
+ // $ANTLR start "RULE_ID"
+ public final void mRULE_ID() throws RecognitionException {
+ try {
+ int _type = RULE_ID;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2422:9: ( ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2422:11: ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2422:11: ( '^' )?
+ int alt4=2;
+ int LA4_0 = input.LA(1);
+
+ if ( (LA4_0=='^') ) {
+ alt4=1;
+ }
+ switch (alt4) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2422:11: '^'
+ {
+ match('^');
+
+ }
+ break;
+
+ }
+
+ if ( (input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2422:40: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
+ loop5:
+ do {
+ int alt5=2;
+ int LA5_0 = input.LA(1);
+
+ if ( ((LA5_0>='0' && LA5_0<='9')||(LA5_0>='A' && LA5_0<='Z')||LA5_0=='_'||(LA5_0>='a' && LA5_0<='z')) ) {
+ alt5=1;
+ }
+
+
+ switch (alt5) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:
+ {
+ if ( (input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+
+ default :
+ break loop5;
+ }
+ } while (true);
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_ID"
+
+ // $ANTLR start "RULE_STRING"
+ public final void mRULE_STRING() throws RecognitionException {
+ try {
+ int _type = RULE_STRING;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2424:13: ( ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2424:15: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2424:15: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
+ int alt8=2;
+ int LA8_0 = input.LA(1);
+
+ if ( (LA8_0=='\"') ) {
+ alt8=1;
+ }
+ else if ( (LA8_0=='\'') ) {
+ alt8=2;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("", 8, 0, input);
+
+ throw nvae;
+ }
+ switch (alt8) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2424:16: '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"'
+ {
+ match('\"');
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2424:20: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )*
+ loop6:
+ do {
+ int alt6=3;
+ int LA6_0 = input.LA(1);
+
+ if ( (LA6_0=='\\') ) {
+ alt6=1;
+ }
+ else if ( ((LA6_0>='\u0000' && LA6_0<='!')||(LA6_0>='#' && LA6_0<='[')||(LA6_0>=']' && LA6_0<='\uFFFF')) ) {
+ alt6=2;
+ }
+
+
+ switch (alt6) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2424:21: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' )
+ {
+ match('\\');
+ if ( input.LA(1)=='\"'||input.LA(1)=='\''||input.LA(1)=='\\'||input.LA(1)=='b'||input.LA(1)=='f'||input.LA(1)=='n'||input.LA(1)=='r'||(input.LA(1)>='t' && input.LA(1)<='u') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+ case 2 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2424:66: ~ ( ( '\\\\' | '\"' ) )
+ {
+ if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+
+ default :
+ break loop6;
+ }
+ } while (true);
+
+ match('\"');
+
+ }
+ break;
+ case 2 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2424:86: '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\''
+ {
+ match('\'');
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2424:91: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )*
+ loop7:
+ do {
+ int alt7=3;
+ int LA7_0 = input.LA(1);
+
+ if ( (LA7_0=='\\') ) {
+ alt7=1;
+ }
+ else if ( ((LA7_0>='\u0000' && LA7_0<='&')||(LA7_0>='(' && LA7_0<='[')||(LA7_0>=']' && LA7_0<='\uFFFF')) ) {
+ alt7=2;
+ }
+
+
+ switch (alt7) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2424:92: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' )
+ {
+ match('\\');
+ if ( input.LA(1)=='\"'||input.LA(1)=='\''||input.LA(1)=='\\'||input.LA(1)=='b'||input.LA(1)=='f'||input.LA(1)=='n'||input.LA(1)=='r'||(input.LA(1)>='t' && input.LA(1)<='u') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+ case 2 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2424:137: ~ ( ( '\\\\' | '\\'' ) )
+ {
+ if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+
+ default :
+ break loop7;
+ }
+ } while (true);
+
+ match('\'');
+
+ }
+ break;
+
+ }
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_STRING"
+
+ // $ANTLR start "RULE_ML_COMMENT"
+ public final void mRULE_ML_COMMENT() throws RecognitionException {
+ try {
+ int _type = RULE_ML_COMMENT;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2426:17: ( '/*' ( options {greedy=false; } : . )* '*/' )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2426:19: '/*' ( options {greedy=false; } : . )* '*/'
+ {
+ match("/*");
+
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2426:24: ( options {greedy=false; } : . )*
+ loop9:
+ do {
+ int alt9=2;
+ int LA9_0 = input.LA(1);
+
+ if ( (LA9_0=='*') ) {
+ int LA9_1 = input.LA(2);
+
+ if ( (LA9_1=='/') ) {
+ alt9=2;
+ }
+ else if ( ((LA9_1>='\u0000' && LA9_1<='.')||(LA9_1>='0' && LA9_1<='\uFFFF')) ) {
+ alt9=1;
+ }
+
+
+ }
+ else if ( ((LA9_0>='\u0000' && LA9_0<=')')||(LA9_0>='+' && LA9_0<='\uFFFF')) ) {
+ alt9=1;
+ }
+
+
+ switch (alt9) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2426:52: .
+ {
+ matchAny();
+
+ }
+ break;
+
+ default :
+ break loop9;
+ }
+ } while (true);
+
+ match("*/");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_ML_COMMENT"
+
+ // $ANTLR start "RULE_SL_COMMENT"
+ public final void mRULE_SL_COMMENT() throws RecognitionException {
+ try {
+ int _type = RULE_SL_COMMENT;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2428:17: ( '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2428:19: '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
+ {
+ match("//");
+
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2428:24: (~ ( ( '\\n' | '\\r' ) ) )*
+ loop10:
+ do {
+ int alt10=2;
+ int LA10_0 = input.LA(1);
+
+ if ( ((LA10_0>='\u0000' && LA10_0<='\t')||(LA10_0>='\u000B' && LA10_0<='\f')||(LA10_0>='\u000E' && LA10_0<='\uFFFF')) ) {
+ alt10=1;
+ }
+
+
+ switch (alt10) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2428:24: ~ ( ( '\\n' | '\\r' ) )
+ {
+ if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFF') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+
+ default :
+ break loop10;
+ }
+ } while (true);
+
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2428:40: ( ( '\\r' )? '\\n' )?
+ int alt12=2;
+ int LA12_0 = input.LA(1);
+
+ if ( (LA12_0=='\n'||LA12_0=='\r') ) {
+ alt12=1;
+ }
+ switch (alt12) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2428:41: ( '\\r' )? '\\n'
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2428:41: ( '\\r' )?
+ int alt11=2;
+ int LA11_0 = input.LA(1);
+
+ if ( (LA11_0=='\r') ) {
+ alt11=1;
+ }
+ switch (alt11) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2428:41: '\\r'
+ {
+ match('\r');
+
+ }
+ break;
+
+ }
+
+ match('\n');
+
+ }
+ break;
+
+ }
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_SL_COMMENT"
+
+ // $ANTLR start "RULE_WS"
+ public final void mRULE_WS() throws RecognitionException {
+ try {
+ int _type = RULE_WS;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2430:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2430:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2430:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
+ int cnt13=0;
+ loop13:
+ do {
+ int alt13=2;
+ int LA13_0 = input.LA(1);
+
+ if ( ((LA13_0>='\t' && LA13_0<='\n')||LA13_0=='\r'||LA13_0==' ') ) {
+ alt13=1;
+ }
+
+
+ switch (alt13) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:
+ {
+ if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)=='\r'||input.LA(1)==' ' ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+
+ default :
+ if ( cnt13 >= 1 ) break loop13;
+ EarlyExitException eee =
+ new EarlyExitException(13, input);
+ throw eee;
+ }
+ cnt13++;
+ } while (true);
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_WS"
+
+ // $ANTLR start "RULE_ANY_OTHER"
+ public final void mRULE_ANY_OTHER() throws RecognitionException {
+ try {
+ int _type = RULE_ANY_OTHER;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2432:16: ( . )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2432:18: .
+ {
+ matchAny();
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_ANY_OTHER"
+
+ public void mTokens() throws RecognitionException {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1:8: ( T__12 | T__13 | T__14 | T__15 | T__16 | T__17 | T__18 | T__19 | T__20 | T__21 | T__22 | T__23 | T__24 | RULE_NUMBER | RULE_INT | RULE_ID | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER )
+ int alt14=21;
+ alt14 = dfa14.predict(input);
+ switch (alt14) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1:10: T__12
+ {
+ mT__12();
+
+ }
+ break;
+ case 2 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1:16: T__13
+ {
+ mT__13();
+
+ }
+ break;
+ case 3 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1:22: T__14
+ {
+ mT__14();
+
+ }
+ break;
+ case 4 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1:28: T__15
+ {
+ mT__15();
+
+ }
+ break;
+ case 5 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1:34: T__16
+ {
+ mT__16();
+
+ }
+ break;
+ case 6 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1:40: T__17
+ {
+ mT__17();
+
+ }
+ break;
+ case 7 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1:46: T__18
+ {
+ mT__18();
+
+ }
+ break;
+ case 8 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1:52: T__19
+ {
+ mT__19();
+
+ }
+ break;
+ case 9 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1:58: T__20
+ {
+ mT__20();
+
+ }
+ break;
+ case 10 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1:64: T__21
+ {
+ mT__21();
+
+ }
+ break;
+ case 11 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1:70: T__22
+ {
+ mT__22();
+
+ }
+ break;
+ case 12 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1:76: T__23
+ {
+ mT__23();
+
+ }
+ break;
+ case 13 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1:82: T__24
+ {
+ mT__24();
+
+ }
+ break;
+ case 14 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1:88: RULE_NUMBER
+ {
+ mRULE_NUMBER();
+
+ }
+ break;
+ case 15 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1:100: RULE_INT
+ {
+ mRULE_INT();
+
+ }
+ break;
+ case 16 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1:109: RULE_ID
+ {
+ mRULE_ID();
+
+ }
+ break;
+ case 17 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1:117: RULE_STRING
+ {
+ mRULE_STRING();
+
+ }
+ break;
+ case 18 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1:129: RULE_ML_COMMENT
+ {
+ mRULE_ML_COMMENT();
+
+ }
+ break;
+ case 19 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1:145: RULE_SL_COMMENT
+ {
+ mRULE_SL_COMMENT();
+
+ }
+ break;
+ case 20 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1:161: RULE_WS
+ {
+ mRULE_WS();
+
+ }
+ break;
+ case 21 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1:169: RULE_ANY_OTHER
+ {
+ mRULE_ANY_OTHER();
+
+ }
+ break;
+
+ }
+
+ }
+
+
+ protected DFA14 dfa14 = new DFA14(this);
+ static final String DFA14_eotS =
+ "\1\17\2\30\1\32\1\uffff\1\30\7\uffff\1\46\2\uffff\1\30\1\26\1\uffff"+
+ "\2\26\2\uffff\1\30\1\uffff\1\30\2\uffff\1\30\12\uffff\1\30\2\uffff"+
+ "\2\30\1\60\3\30\1\uffff\3\30\1\uffff\1\67\1\70\2\uffff";
+ static final String DFA14_eofS =
+ "\71\uffff";
+ static final String DFA14_minS =
+ "\1\0\1\157\1\155\1\60\1\uffff\1\145\7\uffff\1\52\2\uffff\1\150\1"+
+ "\101\1\uffff\2\0\2\uffff\1\144\1\uffff\1\160\2\uffff\1\146\12\uffff"+
+ "\1\151\2\uffff\1\165\1\157\1\60\1\163\1\154\1\162\1\uffff\1\40\1"+
+ "\145\1\164\1\uffff\2\60\2\uffff";
+ static final String DFA14_maxS =
+ "\1\uffff\1\157\1\155\1\71\1\uffff\1\145\7\uffff\1\57\2\uffff\1\150"+
+ "\1\172\1\uffff\2\uffff\2\uffff\1\144\1\uffff\1\160\2\uffff\1\146"+
+ "\12\uffff\1\151\2\uffff\1\165\1\157\1\172\1\163\1\154\1\162\1\uffff"+
+ "\1\40\1\145\1\164\1\uffff\2\172\2\uffff";
+ static final String DFA14_acceptS =
+ "\4\uffff\1\4\1\uffff\1\6\1\7\1\10\1\11\1\12\1\13\1\14\1\uffff\2"+
+ "\16\2\uffff\1\20\2\uffff\1\24\1\25\1\uffff\1\20\1\uffff\1\3\1\4"+
+ "\1\uffff\1\6\1\7\1\10\1\11\1\12\1\13\1\14\1\22\1\23\1\15\1\uffff"+
+ "\1\21\1\24\6\uffff\1\5\3\uffff\1\17\2\uffff\1\1\1\2";
+ static final String DFA14_specialS =
+ "\1\0\22\uffff\1\1\1\2\44\uffff}>";
+ static final String[] DFA14_transitionS = {
+ "\11\26\2\25\2\26\1\25\22\26\1\25\1\26\1\23\4\26\1\24\1\10\1"+
+ "\11\1\4\1\13\1\12\1\14\1\3\1\15\12\16\1\6\1\7\5\26\32\22\3\26"+
+ "\1\21\1\22\1\26\3\22\1\5\4\22\1\2\3\22\1\1\6\22\1\20\6\22\uff85"+
+ "\26",
+ "\1\27",
+ "\1\31",
+ "\12\17",
+ "",
+ "\1\34",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "\1\44\4\uffff\1\45",
+ "",
+ "",
+ "\1\47",
+ "\32\30\4\uffff\1\30\1\uffff\32\30",
+ "",
+ "\0\50",
+ "\0\50",
+ "",
+ "",
+ "\1\52",
+ "",
+ "\1\53",
+ "",
+ "",
+ "\1\54",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "\1\55",
+ "",
+ "",
+ "\1\56",
+ "\1\57",
+ "\12\30\7\uffff\32\30\4\uffff\1\30\1\uffff\32\30",
+ "\1\61",
+ "\1\62",
+ "\1\63",
+ "",
+ "\1\64",
+ "\1\65",
+ "\1\66",
+ "",
+ "\12\30\7\uffff\32\30\4\uffff\1\30\1\uffff\32\30",
+ "\12\30\7\uffff\32\30\4\uffff\1\30\1\uffff\32\30",
+ "",
+ ""
+ };
+
+ static final short[] DFA14_eot = DFA.unpackEncodedString(DFA14_eotS);
+ static final short[] DFA14_eof = DFA.unpackEncodedString(DFA14_eofS);
+ static final char[] DFA14_min = DFA.unpackEncodedStringToUnsignedChars(DFA14_minS);
+ static final char[] DFA14_max = DFA.unpackEncodedStringToUnsignedChars(DFA14_maxS);
+ static final short[] DFA14_accept = DFA.unpackEncodedString(DFA14_acceptS);
+ static final short[] DFA14_special = DFA.unpackEncodedString(DFA14_specialS);
+ static final short[][] DFA14_transition;
+
+ static {
+ int numStates = DFA14_transitionS.length;
+ DFA14_transition = new short[numStates][];
+ for (int i=0; i<numStates; i++) {
+ DFA14_transition[i] = DFA.unpackEncodedString(DFA14_transitionS[i]);
+ }
+ }
+
+ class DFA14 extends DFA {
+
+ public DFA14(BaseRecognizer recognizer) {
+ this.recognizer = recognizer;
+ this.decisionNumber = 14;
+ this.eot = DFA14_eot;
+ this.eof = DFA14_eof;
+ this.min = DFA14_min;
+ this.max = DFA14_max;
+ this.accept = DFA14_accept;
+ this.special = DFA14_special;
+ this.transition = DFA14_transition;
+ }
+ public String getDescription() {
+ return "1:1: Tokens : ( T__12 | T__13 | T__14 | T__15 | T__16 | T__17 | T__18 | T__19 | T__20 | T__21 | T__22 | T__23 | T__24 | RULE_NUMBER | RULE_INT | RULE_ID | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER );";
+ }
+ public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
+ IntStream input = _input;
+ int _s = s;
+ switch ( s ) {
+ case 0 :
+ int LA14_0 = input.LA(1);
+
+ s = -1;
+ if ( (LA14_0=='m') ) {s = 1;}
+
+ else if ( (LA14_0=='i') ) {s = 2;}
+
+ else if ( (LA14_0=='.') ) {s = 3;}
+
+ else if ( (LA14_0=='*') ) {s = 4;}
+
+ else if ( (LA14_0=='d') ) {s = 5;}
+
+ else if ( (LA14_0==':') ) {s = 6;}
+
+ else if ( (LA14_0==';') ) {s = 7;}
+
+ else if ( (LA14_0=='(') ) {s = 8;}
+
+ else if ( (LA14_0==')') ) {s = 9;}
+
+ else if ( (LA14_0==',') ) {s = 10;}
+
+ else if ( (LA14_0=='+') ) {s = 11;}
+
+ else if ( (LA14_0=='-') ) {s = 12;}
+
+ else if ( (LA14_0=='/') ) {s = 13;}
+
+ else if ( ((LA14_0>='0' && LA14_0<='9')) ) {s = 14;}
+
+ else if ( (LA14_0=='t') ) {s = 16;}
+
+ else if ( (LA14_0=='^') ) {s = 17;}
+
+ else if ( ((LA14_0>='A' && LA14_0<='Z')||LA14_0=='_'||(LA14_0>='a' && LA14_0<='c')||(LA14_0>='e' && LA14_0<='h')||(LA14_0>='j' && LA14_0<='l')||(LA14_0>='n' && LA14_0<='s')||(LA14_0>='u' && LA14_0<='z')) ) {s = 18;}
+
+ else if ( (LA14_0=='\"') ) {s = 19;}
+
+ else if ( (LA14_0=='\'') ) {s = 20;}
+
+ else if ( ((LA14_0>='\t' && LA14_0<='\n')||LA14_0=='\r'||LA14_0==' ') ) {s = 21;}
+
+ else if ( ((LA14_0>='\u0000' && LA14_0<='\b')||(LA14_0>='\u000B' && LA14_0<='\f')||(LA14_0>='\u000E' && LA14_0<='\u001F')||LA14_0=='!'||(LA14_0>='#' && LA14_0<='&')||(LA14_0>='<' && LA14_0<='@')||(LA14_0>='[' && LA14_0<=']')||LA14_0=='`'||(LA14_0>='{' && LA14_0<='\uFFFF')) ) {s = 22;}
+
+ else s = 15;
+
+ if ( s>=0 ) return s;
+ break;
+ case 1 :
+ int LA14_19 = input.LA(1);
+
+ s = -1;
+ if ( ((LA14_19>='\u0000' && LA14_19<='\uFFFF')) ) {s = 40;}
+
+ else s = 22;
+
+ if ( s>=0 ) return s;
+ break;
+ case 2 :
+ int LA14_20 = input.LA(1);
+
+ s = -1;
+ if ( ((LA14_20>='\u0000' && LA14_20<='\uFFFF')) ) {s = 40;}
+
+ else s = 22;
+
+ if ( s>=0 ) return s;
+ break;
+ }
+ NoViableAltException nvae =
+ new NoViableAltException(getDescription(), 14, _s, input);
+ error(nvae);
+ throw nvae;
+ }
+ }
+
+
+}
\ No newline at end of file
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmeticsParser.java b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmeticsParser.java
new file mode 100644
index 0000000..4883d89
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmeticsParser.java
@@ -0,0 +1,6494 @@
+package org.eclipse.xtext.example.arithmetics.ui.contentassist.antlr.internal;
+
+import java.io.InputStream;
+import org.eclipse.xtext.*;
+import org.eclipse.xtext.parser.*;
+import org.eclipse.xtext.parser.impl.*;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens;
+import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.AbstractInternalContentAssistParser;
+import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.DFA;
+import org.eclipse.xtext.example.arithmetics.services.ArithmeticsGrammarAccess;
+
+
+
+import org.antlr.runtime.*;
+import java.util.Stack;
+import java.util.List;
+import java.util.ArrayList;
+
+@SuppressWarnings("all")
+public class InternalArithmeticsParser extends AbstractInternalContentAssistParser {
+ public static final String[] tokenNames = new String[] {
+ "<invalid>", "<EOR>", "<DOWN>", "<UP>", "RULE_ID", "RULE_NUMBER", "RULE_INT", "RULE_STRING", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS", "RULE_ANY_OTHER", "'module'", "'import'", "'.'", "'*'", "'def'", "':'", "';'", "'('", "')'", "','", "'+'", "'-'", "'/'"
+ };
+ public static final int RULE_ID=4;
+ public static final int T__24=24;
+ public static final int T__23=23;
+ public static final int T__22=22;
+ public static final int RULE_ANY_OTHER=11;
+ public static final int T__21=21;
+ public static final int T__20=20;
+ public static final int RULE_SL_COMMENT=9;
+ public static final int EOF=-1;
+ public static final int RULE_ML_COMMENT=8;
+ public static final int T__19=19;
+ public static final int RULE_STRING=7;
+ public static final int T__16=16;
+ public static final int T__15=15;
+ public static final int T__18=18;
+ public static final int T__17=17;
+ public static final int T__12=12;
+ public static final int RULE_NUMBER=5;
+ public static final int T__14=14;
+ public static final int T__13=13;
+ public static final int RULE_INT=6;
+ public static final int RULE_WS=10;
+
+ // delegates
+ // delegators
+
+
+ public InternalArithmeticsParser(TokenStream input) {
+ this(input, new RecognizerSharedState());
+ }
+ public InternalArithmeticsParser(TokenStream input, RecognizerSharedState state) {
+ super(input, state);
+
+ }
+
+
+ public String[] getTokenNames() { return InternalArithmeticsParser.tokenNames; }
+ public String getGrammarFileName() { return "../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g"; }
+
+
+
+ private ArithmeticsGrammarAccess grammarAccess;
+
+ public void setGrammarAccess(ArithmeticsGrammarAccess grammarAccess) {
+ this.grammarAccess = grammarAccess;
+ }
+
+ @Override
+ protected Grammar getGrammar() {
+ return grammarAccess.getGrammar();
+ }
+
+ @Override
+ protected String getValueForTokenName(String tokenName) {
+ return tokenName;
+ }
+
+
+
+
+ // $ANTLR start "entryRuleModule"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:60:1: entryRuleModule : ruleModule EOF ;
+ public final void entryRuleModule() throws RecognitionException {
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:61:1: ( ruleModule EOF )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:62:1: ruleModule EOF
+ {
+ before(grammarAccess.getModuleRule());
+ pushFollow(FOLLOW_ruleModule_in_entryRuleModule61);
+ ruleModule();
+
+ state._fsp--;
+
+ after(grammarAccess.getModuleRule());
+ match(input,EOF,FOLLOW_EOF_in_entryRuleModule68);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "entryRuleModule"
+
+
+ // $ANTLR start "ruleModule"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:69:1: ruleModule : ( ( rule__Module__Group__0 ) ) ;
+ public final void ruleModule() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:73:2: ( ( ( rule__Module__Group__0 ) ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:74:1: ( ( rule__Module__Group__0 ) )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:74:1: ( ( rule__Module__Group__0 ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:75:1: ( rule__Module__Group__0 )
+ {
+ before(grammarAccess.getModuleAccess().getGroup());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:76:1: ( rule__Module__Group__0 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:76:2: rule__Module__Group__0
+ {
+ pushFollow(FOLLOW_rule__Module__Group__0_in_ruleModule94);
+ rule__Module__Group__0();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getModuleAccess().getGroup());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "ruleModule"
+
+
+ // $ANTLR start "entryRuleImport"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:88:1: entryRuleImport : ruleImport EOF ;
+ public final void entryRuleImport() throws RecognitionException {
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:89:1: ( ruleImport EOF )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:90:1: ruleImport EOF
+ {
+ before(grammarAccess.getImportRule());
+ pushFollow(FOLLOW_ruleImport_in_entryRuleImport121);
+ ruleImport();
+
+ state._fsp--;
+
+ after(grammarAccess.getImportRule());
+ match(input,EOF,FOLLOW_EOF_in_entryRuleImport128);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "entryRuleImport"
+
+
+ // $ANTLR start "ruleImport"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:97:1: ruleImport : ( ( rule__Import__Group__0 ) ) ;
+ public final void ruleImport() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:101:2: ( ( ( rule__Import__Group__0 ) ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:102:1: ( ( rule__Import__Group__0 ) )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:102:1: ( ( rule__Import__Group__0 ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:103:1: ( rule__Import__Group__0 )
+ {
+ before(grammarAccess.getImportAccess().getGroup());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:104:1: ( rule__Import__Group__0 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:104:2: rule__Import__Group__0
+ {
+ pushFollow(FOLLOW_rule__Import__Group__0_in_ruleImport154);
+ rule__Import__Group__0();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getImportAccess().getGroup());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "ruleImport"
+
+
+ // $ANTLR start "entryRuleImportName"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:116:1: entryRuleImportName : ruleImportName EOF ;
+ public final void entryRuleImportName() throws RecognitionException {
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:117:1: ( ruleImportName EOF )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:118:1: ruleImportName EOF
+ {
+ before(grammarAccess.getImportNameRule());
+ pushFollow(FOLLOW_ruleImportName_in_entryRuleImportName181);
+ ruleImportName();
+
+ state._fsp--;
+
+ after(grammarAccess.getImportNameRule());
+ match(input,EOF,FOLLOW_EOF_in_entryRuleImportName188);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "entryRuleImportName"
+
+
+ // $ANTLR start "ruleImportName"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:125:1: ruleImportName : ( ( rule__ImportName__Group__0 ) ) ;
+ public final void ruleImportName() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:129:2: ( ( ( rule__ImportName__Group__0 ) ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:130:1: ( ( rule__ImportName__Group__0 ) )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:130:1: ( ( rule__ImportName__Group__0 ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:131:1: ( rule__ImportName__Group__0 )
+ {
+ before(grammarAccess.getImportNameAccess().getGroup());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:132:1: ( rule__ImportName__Group__0 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:132:2: rule__ImportName__Group__0
+ {
+ pushFollow(FOLLOW_rule__ImportName__Group__0_in_ruleImportName214);
+ rule__ImportName__Group__0();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getImportNameAccess().getGroup());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "ruleImportName"
+
+
+ // $ANTLR start "entryRuleStatement"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:144:1: entryRuleStatement : ruleStatement EOF ;
+ public final void entryRuleStatement() throws RecognitionException {
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:145:1: ( ruleStatement EOF )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:146:1: ruleStatement EOF
+ {
+ before(grammarAccess.getStatementRule());
+ pushFollow(FOLLOW_ruleStatement_in_entryRuleStatement241);
+ ruleStatement();
+
+ state._fsp--;
+
+ after(grammarAccess.getStatementRule());
+ match(input,EOF,FOLLOW_EOF_in_entryRuleStatement248);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "entryRuleStatement"
+
+
+ // $ANTLR start "ruleStatement"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:153:1: ruleStatement : ( ( rule__Statement__Alternatives ) ) ;
+ public final void ruleStatement() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:157:2: ( ( ( rule__Statement__Alternatives ) ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:158:1: ( ( rule__Statement__Alternatives ) )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:158:1: ( ( rule__Statement__Alternatives ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:159:1: ( rule__Statement__Alternatives )
+ {
+ before(grammarAccess.getStatementAccess().getAlternatives());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:160:1: ( rule__Statement__Alternatives )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:160:2: rule__Statement__Alternatives
+ {
+ pushFollow(FOLLOW_rule__Statement__Alternatives_in_ruleStatement274);
+ rule__Statement__Alternatives();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getStatementAccess().getAlternatives());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "ruleStatement"
+
+
+ // $ANTLR start "entryRuleDefinition"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:172:1: entryRuleDefinition : ruleDefinition EOF ;
+ public final void entryRuleDefinition() throws RecognitionException {
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:173:1: ( ruleDefinition EOF )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:174:1: ruleDefinition EOF
+ {
+ before(grammarAccess.getDefinitionRule());
+ pushFollow(FOLLOW_ruleDefinition_in_entryRuleDefinition301);
+ ruleDefinition();
+
+ state._fsp--;
+
+ after(grammarAccess.getDefinitionRule());
+ match(input,EOF,FOLLOW_EOF_in_entryRuleDefinition308);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "entryRuleDefinition"
+
+
+ // $ANTLR start "ruleDefinition"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:181:1: ruleDefinition : ( ( rule__Definition__Group__0 ) ) ;
+ public final void ruleDefinition() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:185:2: ( ( ( rule__Definition__Group__0 ) ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:186:1: ( ( rule__Definition__Group__0 ) )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:186:1: ( ( rule__Definition__Group__0 ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:187:1: ( rule__Definition__Group__0 )
+ {
+ before(grammarAccess.getDefinitionAccess().getGroup());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:188:1: ( rule__Definition__Group__0 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:188:2: rule__Definition__Group__0
+ {
+ pushFollow(FOLLOW_rule__Definition__Group__0_in_ruleDefinition334);
+ rule__Definition__Group__0();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getDefinitionAccess().getGroup());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "ruleDefinition"
+
+
+ // $ANTLR start "entryRuleDeclaredParameter"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:200:1: entryRuleDeclaredParameter : ruleDeclaredParameter EOF ;
+ public final void entryRuleDeclaredParameter() throws RecognitionException {
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:201:1: ( ruleDeclaredParameter EOF )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:202:1: ruleDeclaredParameter EOF
+ {
+ before(grammarAccess.getDeclaredParameterRule());
+ pushFollow(FOLLOW_ruleDeclaredParameter_in_entryRuleDeclaredParameter361);
+ ruleDeclaredParameter();
+
+ state._fsp--;
+
+ after(grammarAccess.getDeclaredParameterRule());
+ match(input,EOF,FOLLOW_EOF_in_entryRuleDeclaredParameter368);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "entryRuleDeclaredParameter"
+
+
+ // $ANTLR start "ruleDeclaredParameter"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:209:1: ruleDeclaredParameter : ( ( rule__DeclaredParameter__NameAssignment ) ) ;
+ public final void ruleDeclaredParameter() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:213:2: ( ( ( rule__DeclaredParameter__NameAssignment ) ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:214:1: ( ( rule__DeclaredParameter__NameAssignment ) )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:214:1: ( ( rule__DeclaredParameter__NameAssignment ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:215:1: ( rule__DeclaredParameter__NameAssignment )
+ {
+ before(grammarAccess.getDeclaredParameterAccess().getNameAssignment());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:216:1: ( rule__DeclaredParameter__NameAssignment )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:216:2: rule__DeclaredParameter__NameAssignment
+ {
+ pushFollow(FOLLOW_rule__DeclaredParameter__NameAssignment_in_ruleDeclaredParameter394);
+ rule__DeclaredParameter__NameAssignment();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getDeclaredParameterAccess().getNameAssignment());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "ruleDeclaredParameter"
+
+
+ // $ANTLR start "entryRuleEvaluation"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:230:1: entryRuleEvaluation : ruleEvaluation EOF ;
+ public final void entryRuleEvaluation() throws RecognitionException {
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:231:1: ( ruleEvaluation EOF )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:232:1: ruleEvaluation EOF
+ {
+ before(grammarAccess.getEvaluationRule());
+ pushFollow(FOLLOW_ruleEvaluation_in_entryRuleEvaluation423);
+ ruleEvaluation();
+
+ state._fsp--;
+
+ after(grammarAccess.getEvaluationRule());
+ match(input,EOF,FOLLOW_EOF_in_entryRuleEvaluation430);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "entryRuleEvaluation"
+
+
+ // $ANTLR start "ruleEvaluation"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:239:1: ruleEvaluation : ( ( rule__Evaluation__Group__0 ) ) ;
+ public final void ruleEvaluation() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:243:2: ( ( ( rule__Evaluation__Group__0 ) ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:244:1: ( ( rule__Evaluation__Group__0 ) )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:244:1: ( ( rule__Evaluation__Group__0 ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:245:1: ( rule__Evaluation__Group__0 )
+ {
+ before(grammarAccess.getEvaluationAccess().getGroup());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:246:1: ( rule__Evaluation__Group__0 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:246:2: rule__Evaluation__Group__0
+ {
+ pushFollow(FOLLOW_rule__Evaluation__Group__0_in_ruleEvaluation456);
+ rule__Evaluation__Group__0();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getEvaluationAccess().getGroup());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "ruleEvaluation"
+
+
+ // $ANTLR start "entryRuleExpression"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:258:1: entryRuleExpression : ruleExpression EOF ;
+ public final void entryRuleExpression() throws RecognitionException {
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:259:1: ( ruleExpression EOF )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:260:1: ruleExpression EOF
+ {
+ before(grammarAccess.getExpressionRule());
+ pushFollow(FOLLOW_ruleExpression_in_entryRuleExpression483);
+ ruleExpression();
+
+ state._fsp--;
+
+ after(grammarAccess.getExpressionRule());
+ match(input,EOF,FOLLOW_EOF_in_entryRuleExpression490);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "entryRuleExpression"
+
+
+ // $ANTLR start "ruleExpression"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:267:1: ruleExpression : ( ruleAddition ) ;
+ public final void ruleExpression() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:271:2: ( ( ruleAddition ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:272:1: ( ruleAddition )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:272:1: ( ruleAddition )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:273:1: ruleAddition
+ {
+ before(grammarAccess.getExpressionAccess().getAdditionParserRuleCall());
+ pushFollow(FOLLOW_ruleAddition_in_ruleExpression516);
+ ruleAddition();
+
+ state._fsp--;
+
+ after(grammarAccess.getExpressionAccess().getAdditionParserRuleCall());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "ruleExpression"
+
+
+ // $ANTLR start "entryRuleAddition"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:286:1: entryRuleAddition : ruleAddition EOF ;
+ public final void entryRuleAddition() throws RecognitionException {
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:287:1: ( ruleAddition EOF )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:288:1: ruleAddition EOF
+ {
+ before(grammarAccess.getAdditionRule());
+ pushFollow(FOLLOW_ruleAddition_in_entryRuleAddition542);
+ ruleAddition();
+
+ state._fsp--;
+
+ after(grammarAccess.getAdditionRule());
+ match(input,EOF,FOLLOW_EOF_in_entryRuleAddition549);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "entryRuleAddition"
+
+
+ // $ANTLR start "ruleAddition"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:295:1: ruleAddition : ( ( rule__Addition__Group__0 ) ) ;
+ public final void ruleAddition() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:299:2: ( ( ( rule__Addition__Group__0 ) ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:300:1: ( ( rule__Addition__Group__0 ) )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:300:1: ( ( rule__Addition__Group__0 ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:301:1: ( rule__Addition__Group__0 )
+ {
+ before(grammarAccess.getAdditionAccess().getGroup());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:302:1: ( rule__Addition__Group__0 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:302:2: rule__Addition__Group__0
+ {
+ pushFollow(FOLLOW_rule__Addition__Group__0_in_ruleAddition575);
+ rule__Addition__Group__0();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getAdditionAccess().getGroup());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "ruleAddition"
+
+
+ // $ANTLR start "entryRuleMultiplication"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:314:1: entryRuleMultiplication : ruleMultiplication EOF ;
+ public final void entryRuleMultiplication() throws RecognitionException {
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:315:1: ( ruleMultiplication EOF )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:316:1: ruleMultiplication EOF
+ {
+ before(grammarAccess.getMultiplicationRule());
+ pushFollow(FOLLOW_ruleMultiplication_in_entryRuleMultiplication602);
+ ruleMultiplication();
+
+ state._fsp--;
+
+ after(grammarAccess.getMultiplicationRule());
+ match(input,EOF,FOLLOW_EOF_in_entryRuleMultiplication609);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "entryRuleMultiplication"
+
+
+ // $ANTLR start "ruleMultiplication"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:323:1: ruleMultiplication : ( ( rule__Multiplication__Group__0 ) ) ;
+ public final void ruleMultiplication() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:327:2: ( ( ( rule__Multiplication__Group__0 ) ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:328:1: ( ( rule__Multiplication__Group__0 ) )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:328:1: ( ( rule__Multiplication__Group__0 ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:329:1: ( rule__Multiplication__Group__0 )
+ {
+ before(grammarAccess.getMultiplicationAccess().getGroup());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:330:1: ( rule__Multiplication__Group__0 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:330:2: rule__Multiplication__Group__0
+ {
+ pushFollow(FOLLOW_rule__Multiplication__Group__0_in_ruleMultiplication635);
+ rule__Multiplication__Group__0();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getMultiplicationAccess().getGroup());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "ruleMultiplication"
+
+
+ // $ANTLR start "entryRulePrimaryExpression"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:342:1: entryRulePrimaryExpression : rulePrimaryExpression EOF ;
+ public final void entryRulePrimaryExpression() throws RecognitionException {
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:343:1: ( rulePrimaryExpression EOF )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:344:1: rulePrimaryExpression EOF
+ {
+ before(grammarAccess.getPrimaryExpressionRule());
+ pushFollow(FOLLOW_rulePrimaryExpression_in_entryRulePrimaryExpression662);
+ rulePrimaryExpression();
+
+ state._fsp--;
+
+ after(grammarAccess.getPrimaryExpressionRule());
+ match(input,EOF,FOLLOW_EOF_in_entryRulePrimaryExpression669);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "entryRulePrimaryExpression"
+
+
+ // $ANTLR start "rulePrimaryExpression"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:351:1: rulePrimaryExpression : ( ( rule__PrimaryExpression__Alternatives ) ) ;
+ public final void rulePrimaryExpression() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:355:2: ( ( ( rule__PrimaryExpression__Alternatives ) ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:356:1: ( ( rule__PrimaryExpression__Alternatives ) )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:356:1: ( ( rule__PrimaryExpression__Alternatives ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:357:1: ( rule__PrimaryExpression__Alternatives )
+ {
+ before(grammarAccess.getPrimaryExpressionAccess().getAlternatives());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:358:1: ( rule__PrimaryExpression__Alternatives )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:358:2: rule__PrimaryExpression__Alternatives
+ {
+ pushFollow(FOLLOW_rule__PrimaryExpression__Alternatives_in_rulePrimaryExpression695);
+ rule__PrimaryExpression__Alternatives();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getPrimaryExpressionAccess().getAlternatives());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rulePrimaryExpression"
+
+
+ // $ANTLR start "rule__Statement__Alternatives"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:370:1: rule__Statement__Alternatives : ( ( ruleDefinition ) | ( ruleEvaluation ) );
+ public final void rule__Statement__Alternatives() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:374:1: ( ( ruleDefinition ) | ( ruleEvaluation ) )
+ int alt1=2;
+ int LA1_0 = input.LA(1);
+
+ if ( (LA1_0==16) ) {
+ alt1=1;
+ }
+ else if ( ((LA1_0>=RULE_ID && LA1_0<=RULE_NUMBER)||LA1_0==19) ) {
+ alt1=2;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("", 1, 0, input);
+
+ throw nvae;
+ }
+ switch (alt1) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:375:1: ( ruleDefinition )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:375:1: ( ruleDefinition )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:376:1: ruleDefinition
+ {
+ before(grammarAccess.getStatementAccess().getDefinitionParserRuleCall_0());
+ pushFollow(FOLLOW_ruleDefinition_in_rule__Statement__Alternatives731);
+ ruleDefinition();
+
+ state._fsp--;
+
+ after(grammarAccess.getStatementAccess().getDefinitionParserRuleCall_0());
+
+ }
+
+
+ }
+ break;
+ case 2 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:381:6: ( ruleEvaluation )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:381:6: ( ruleEvaluation )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:382:1: ruleEvaluation
+ {
+ before(grammarAccess.getStatementAccess().getEvaluationParserRuleCall_1());
+ pushFollow(FOLLOW_ruleEvaluation_in_rule__Statement__Alternatives748);
+ ruleEvaluation();
+
+ state._fsp--;
+
+ after(grammarAccess.getStatementAccess().getEvaluationParserRuleCall_1());
+
+ }
+
+
+ }
+ break;
+
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Statement__Alternatives"
+
+
+ // $ANTLR start "rule__Addition__Alternatives_1_0"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:393:1: rule__Addition__Alternatives_1_0 : ( ( ( rule__Addition__Group_1_0_0__0 ) ) | ( ( rule__Addition__Group_1_0_1__0 ) ) );
+ public final void rule__Addition__Alternatives_1_0() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:397:1: ( ( ( rule__Addition__Group_1_0_0__0 ) ) | ( ( rule__Addition__Group_1_0_1__0 ) ) )
+ int alt2=2;
+ int LA2_0 = input.LA(1);
+
+ if ( (LA2_0==22) ) {
+ alt2=1;
+ }
+ else if ( (LA2_0==23) ) {
+ alt2=2;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("", 2, 0, input);
+
+ throw nvae;
+ }
+ switch (alt2) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:398:1: ( ( rule__Addition__Group_1_0_0__0 ) )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:398:1: ( ( rule__Addition__Group_1_0_0__0 ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:399:1: ( rule__Addition__Group_1_0_0__0 )
+ {
+ before(grammarAccess.getAdditionAccess().getGroup_1_0_0());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:400:1: ( rule__Addition__Group_1_0_0__0 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:400:2: rule__Addition__Group_1_0_0__0
+ {
+ pushFollow(FOLLOW_rule__Addition__Group_1_0_0__0_in_rule__Addition__Alternatives_1_0781);
+ rule__Addition__Group_1_0_0__0();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getAdditionAccess().getGroup_1_0_0());
+
+ }
+
+
+ }
+ break;
+ case 2 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:404:6: ( ( rule__Addition__Group_1_0_1__0 ) )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:404:6: ( ( rule__Addition__Group_1_0_1__0 ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:405:1: ( rule__Addition__Group_1_0_1__0 )
+ {
+ before(grammarAccess.getAdditionAccess().getGroup_1_0_1());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:406:1: ( rule__Addition__Group_1_0_1__0 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:406:2: rule__Addition__Group_1_0_1__0
+ {
+ pushFollow(FOLLOW_rule__Addition__Group_1_0_1__0_in_rule__Addition__Alternatives_1_0799);
+ rule__Addition__Group_1_0_1__0();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getAdditionAccess().getGroup_1_0_1());
+
+ }
+
+
+ }
+ break;
+
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Addition__Alternatives_1_0"
+
+
+ // $ANTLR start "rule__Multiplication__Alternatives_1_0"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:415:1: rule__Multiplication__Alternatives_1_0 : ( ( ( rule__Multiplication__Group_1_0_0__0 ) ) | ( ( rule__Multiplication__Group_1_0_1__0 ) ) );
+ public final void rule__Multiplication__Alternatives_1_0() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:419:1: ( ( ( rule__Multiplication__Group_1_0_0__0 ) ) | ( ( rule__Multiplication__Group_1_0_1__0 ) ) )
+ int alt3=2;
+ int LA3_0 = input.LA(1);
+
+ if ( (LA3_0==15) ) {
+ alt3=1;
+ }
+ else if ( (LA3_0==24) ) {
+ alt3=2;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("", 3, 0, input);
+
+ throw nvae;
+ }
+ switch (alt3) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:420:1: ( ( rule__Multiplication__Group_1_0_0__0 ) )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:420:1: ( ( rule__Multiplication__Group_1_0_0__0 ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:421:1: ( rule__Multiplication__Group_1_0_0__0 )
+ {
+ before(grammarAccess.getMultiplicationAccess().getGroup_1_0_0());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:422:1: ( rule__Multiplication__Group_1_0_0__0 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:422:2: rule__Multiplication__Group_1_0_0__0
+ {
+ pushFollow(FOLLOW_rule__Multiplication__Group_1_0_0__0_in_rule__Multiplication__Alternatives_1_0832);
+ rule__Multiplication__Group_1_0_0__0();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getMultiplicationAccess().getGroup_1_0_0());
+
+ }
+
+
+ }
+ break;
+ case 2 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:426:6: ( ( rule__Multiplication__Group_1_0_1__0 ) )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:426:6: ( ( rule__Multiplication__Group_1_0_1__0 ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:427:1: ( rule__Multiplication__Group_1_0_1__0 )
+ {
+ before(grammarAccess.getMultiplicationAccess().getGroup_1_0_1());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:428:1: ( rule__Multiplication__Group_1_0_1__0 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:428:2: rule__Multiplication__Group_1_0_1__0
+ {
+ pushFollow(FOLLOW_rule__Multiplication__Group_1_0_1__0_in_rule__Multiplication__Alternatives_1_0850);
+ rule__Multiplication__Group_1_0_1__0();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getMultiplicationAccess().getGroup_1_0_1());
+
+ }
+
+
+ }
+ break;
+
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Multiplication__Alternatives_1_0"
+
+
+ // $ANTLR start "rule__PrimaryExpression__Alternatives"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:437:1: rule__PrimaryExpression__Alternatives : ( ( ( rule__PrimaryExpression__Group_0__0 ) ) | ( ( rule__PrimaryExpression__Group_1__0 ) ) | ( ( rule__PrimaryExpression__Group_2__0 ) ) );
+ public final void rule__PrimaryExpression__Alternatives() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:441:1: ( ( ( rule__PrimaryExpression__Group_0__0 ) ) | ( ( rule__PrimaryExpression__Group_1__0 ) ) | ( ( rule__PrimaryExpression__Group_2__0 ) ) )
+ int alt4=3;
+ switch ( input.LA(1) ) {
+ case 19:
+ {
+ alt4=1;
+ }
+ break;
+ case RULE_NUMBER:
+ {
+ alt4=2;
+ }
+ break;
+ case RULE_ID:
+ {
+ alt4=3;
+ }
+ break;
+ default:
+ NoViableAltException nvae =
+ new NoViableAltException("", 4, 0, input);
+
+ throw nvae;
+ }
+
+ switch (alt4) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:442:1: ( ( rule__PrimaryExpression__Group_0__0 ) )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:442:1: ( ( rule__PrimaryExpression__Group_0__0 ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:443:1: ( rule__PrimaryExpression__Group_0__0 )
+ {
+ before(grammarAccess.getPrimaryExpressionAccess().getGroup_0());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:444:1: ( rule__PrimaryExpression__Group_0__0 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:444:2: rule__PrimaryExpression__Group_0__0
+ {
+ pushFollow(FOLLOW_rule__PrimaryExpression__Group_0__0_in_rule__PrimaryExpression__Alternatives883);
+ rule__PrimaryExpression__Group_0__0();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getPrimaryExpressionAccess().getGroup_0());
+
+ }
+
+
+ }
+ break;
+ case 2 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:448:6: ( ( rule__PrimaryExpression__Group_1__0 ) )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:448:6: ( ( rule__PrimaryExpression__Group_1__0 ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:449:1: ( rule__PrimaryExpression__Group_1__0 )
+ {
+ before(grammarAccess.getPrimaryExpressionAccess().getGroup_1());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:450:1: ( rule__PrimaryExpression__Group_1__0 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:450:2: rule__PrimaryExpression__Group_1__0
+ {
+ pushFollow(FOLLOW_rule__PrimaryExpression__Group_1__0_in_rule__PrimaryExpression__Alternatives901);
+ rule__PrimaryExpression__Group_1__0();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getPrimaryExpressionAccess().getGroup_1());
+
+ }
+
+
+ }
+ break;
+ case 3 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:454:6: ( ( rule__PrimaryExpression__Group_2__0 ) )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:454:6: ( ( rule__PrimaryExpression__Group_2__0 ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:455:1: ( rule__PrimaryExpression__Group_2__0 )
+ {
+ before(grammarAccess.getPrimaryExpressionAccess().getGroup_2());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:456:1: ( rule__PrimaryExpression__Group_2__0 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:456:2: rule__PrimaryExpression__Group_2__0
+ {
+ pushFollow(FOLLOW_rule__PrimaryExpression__Group_2__0_in_rule__PrimaryExpression__Alternatives919);
+ rule__PrimaryExpression__Group_2__0();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getPrimaryExpressionAccess().getGroup_2());
+
+ }
+
+
+ }
+ break;
+
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__PrimaryExpression__Alternatives"
+
+
+ // $ANTLR start "rule__Module__Group__0"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:467:1: rule__Module__Group__0 : rule__Module__Group__0__Impl rule__Module__Group__1 ;
+ public final void rule__Module__Group__0() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:471:1: ( rule__Module__Group__0__Impl rule__Module__Group__1 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:472:2: rule__Module__Group__0__Impl rule__Module__Group__1
+ {
+ pushFollow(FOLLOW_rule__Module__Group__0__Impl_in_rule__Module__Group__0950);
+ rule__Module__Group__0__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__Module__Group__1_in_rule__Module__Group__0953);
+ rule__Module__Group__1();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Module__Group__0"
+
+
+ // $ANTLR start "rule__Module__Group__0__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:479:1: rule__Module__Group__0__Impl : ( 'module' ) ;
+ public final void rule__Module__Group__0__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:483:1: ( ( 'module' ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:484:1: ( 'module' )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:484:1: ( 'module' )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:485:1: 'module'
+ {
+ before(grammarAccess.getModuleAccess().getModuleKeyword_0());
+ match(input,12,FOLLOW_12_in_rule__Module__Group__0__Impl981);
+ after(grammarAccess.getModuleAccess().getModuleKeyword_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Module__Group__0__Impl"
+
+
+ // $ANTLR start "rule__Module__Group__1"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:498:1: rule__Module__Group__1 : rule__Module__Group__1__Impl rule__Module__Group__2 ;
+ public final void rule__Module__Group__1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:502:1: ( rule__Module__Group__1__Impl rule__Module__Group__2 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:503:2: rule__Module__Group__1__Impl rule__Module__Group__2
+ {
+ pushFollow(FOLLOW_rule__Module__Group__1__Impl_in_rule__Module__Group__11012);
+ rule__Module__Group__1__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__Module__Group__2_in_rule__Module__Group__11015);
+ rule__Module__Group__2();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Module__Group__1"
+
+
+ // $ANTLR start "rule__Module__Group__1__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:510:1: rule__Module__Group__1__Impl : ( ( rule__Module__NameAssignment_1 ) ) ;
+ public final void rule__Module__Group__1__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:514:1: ( ( ( rule__Module__NameAssignment_1 ) ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:515:1: ( ( rule__Module__NameAssignment_1 ) )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:515:1: ( ( rule__Module__NameAssignment_1 ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:516:1: ( rule__Module__NameAssignment_1 )
+ {
+ before(grammarAccess.getModuleAccess().getNameAssignment_1());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:517:1: ( rule__Module__NameAssignment_1 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:517:2: rule__Module__NameAssignment_1
+ {
+ pushFollow(FOLLOW_rule__Module__NameAssignment_1_in_rule__Module__Group__1__Impl1042);
+ rule__Module__NameAssignment_1();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getModuleAccess().getNameAssignment_1());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Module__Group__1__Impl"
+
+
+ // $ANTLR start "rule__Module__Group__2"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:527:1: rule__Module__Group__2 : rule__Module__Group__2__Impl rule__Module__Group__3 ;
+ public final void rule__Module__Group__2() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:531:1: ( rule__Module__Group__2__Impl rule__Module__Group__3 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:532:2: rule__Module__Group__2__Impl rule__Module__Group__3
+ {
+ pushFollow(FOLLOW_rule__Module__Group__2__Impl_in_rule__Module__Group__21072);
+ rule__Module__Group__2__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__Module__Group__3_in_rule__Module__Group__21075);
+ rule__Module__Group__3();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Module__Group__2"
+
+
+ // $ANTLR start "rule__Module__Group__2__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:539:1: rule__Module__Group__2__Impl : ( ( rule__Module__ImportsAssignment_2 )* ) ;
+ public final void rule__Module__Group__2__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:543:1: ( ( ( rule__Module__ImportsAssignment_2 )* ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:544:1: ( ( rule__Module__ImportsAssignment_2 )* )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:544:1: ( ( rule__Module__ImportsAssignment_2 )* )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:545:1: ( rule__Module__ImportsAssignment_2 )*
+ {
+ before(grammarAccess.getModuleAccess().getImportsAssignment_2());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:546:1: ( rule__Module__ImportsAssignment_2 )*
+ loop5:
+ do {
+ int alt5=2;
+ int LA5_0 = input.LA(1);
+
+ if ( (LA5_0==13) ) {
+ alt5=1;
+ }
+
+
+ switch (alt5) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:546:2: rule__Module__ImportsAssignment_2
+ {
+ pushFollow(FOLLOW_rule__Module__ImportsAssignment_2_in_rule__Module__Group__2__Impl1102);
+ rule__Module__ImportsAssignment_2();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ default :
+ break loop5;
+ }
+ } while (true);
+
+ after(grammarAccess.getModuleAccess().getImportsAssignment_2());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Module__Group__2__Impl"
+
+
+ // $ANTLR start "rule__Module__Group__3"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:556:1: rule__Module__Group__3 : rule__Module__Group__3__Impl ;
+ public final void rule__Module__Group__3() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:560:1: ( rule__Module__Group__3__Impl )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:561:2: rule__Module__Group__3__Impl
+ {
+ pushFollow(FOLLOW_rule__Module__Group__3__Impl_in_rule__Module__Group__31133);
+ rule__Module__Group__3__Impl();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Module__Group__3"
+
+
+ // $ANTLR start "rule__Module__Group__3__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:567:1: rule__Module__Group__3__Impl : ( ( rule__Module__StatementsAssignment_3 )* ) ;
+ public final void rule__Module__Group__3__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:571:1: ( ( ( rule__Module__StatementsAssignment_3 )* ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:572:1: ( ( rule__Module__StatementsAssignment_3 )* )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:572:1: ( ( rule__Module__StatementsAssignment_3 )* )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:573:1: ( rule__Module__StatementsAssignment_3 )*
+ {
+ before(grammarAccess.getModuleAccess().getStatementsAssignment_3());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:574:1: ( rule__Module__StatementsAssignment_3 )*
+ loop6:
+ do {
+ int alt6=2;
+ int LA6_0 = input.LA(1);
+
+ if ( ((LA6_0>=RULE_ID && LA6_0<=RULE_NUMBER)||LA6_0==16||LA6_0==19) ) {
+ alt6=1;
+ }
+
+
+ switch (alt6) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:574:2: rule__Module__StatementsAssignment_3
+ {
+ pushFollow(FOLLOW_rule__Module__StatementsAssignment_3_in_rule__Module__Group__3__Impl1160);
+ rule__Module__StatementsAssignment_3();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ default :
+ break loop6;
+ }
+ } while (true);
+
+ after(grammarAccess.getModuleAccess().getStatementsAssignment_3());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Module__Group__3__Impl"
+
+
+ // $ANTLR start "rule__Import__Group__0"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:592:1: rule__Import__Group__0 : rule__Import__Group__0__Impl rule__Import__Group__1 ;
+ public final void rule__Import__Group__0() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:596:1: ( rule__Import__Group__0__Impl rule__Import__Group__1 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:597:2: rule__Import__Group__0__Impl rule__Import__Group__1
+ {
+ pushFollow(FOLLOW_rule__Import__Group__0__Impl_in_rule__Import__Group__01199);
+ rule__Import__Group__0__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__Import__Group__1_in_rule__Import__Group__01202);
+ rule__Import__Group__1();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Import__Group__0"
+
+
+ // $ANTLR start "rule__Import__Group__0__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:604:1: rule__Import__Group__0__Impl : ( 'import' ) ;
+ public final void rule__Import__Group__0__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:608:1: ( ( 'import' ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:609:1: ( 'import' )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:609:1: ( 'import' )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:610:1: 'import'
+ {
+ before(grammarAccess.getImportAccess().getImportKeyword_0());
+ match(input,13,FOLLOW_13_in_rule__Import__Group__0__Impl1230);
+ after(grammarAccess.getImportAccess().getImportKeyword_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Import__Group__0__Impl"
+
+
+ // $ANTLR start "rule__Import__Group__1"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:623:1: rule__Import__Group__1 : rule__Import__Group__1__Impl ;
+ public final void rule__Import__Group__1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:627:1: ( rule__Import__Group__1__Impl )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:628:2: rule__Import__Group__1__Impl
+ {
+ pushFollow(FOLLOW_rule__Import__Group__1__Impl_in_rule__Import__Group__11261);
+ rule__Import__Group__1__Impl();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Import__Group__1"
+
+
+ // $ANTLR start "rule__Import__Group__1__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:634:1: rule__Import__Group__1__Impl : ( ( rule__Import__ImportedNamespaceAssignment_1 ) ) ;
+ public final void rule__Import__Group__1__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:638:1: ( ( ( rule__Import__ImportedNamespaceAssignment_1 ) ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:639:1: ( ( rule__Import__ImportedNamespaceAssignment_1 ) )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:639:1: ( ( rule__Import__ImportedNamespaceAssignment_1 ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:640:1: ( rule__Import__ImportedNamespaceAssignment_1 )
+ {
+ before(grammarAccess.getImportAccess().getImportedNamespaceAssignment_1());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:641:1: ( rule__Import__ImportedNamespaceAssignment_1 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:641:2: rule__Import__ImportedNamespaceAssignment_1
+ {
+ pushFollow(FOLLOW_rule__Import__ImportedNamespaceAssignment_1_in_rule__Import__Group__1__Impl1288);
+ rule__Import__ImportedNamespaceAssignment_1();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getImportAccess().getImportedNamespaceAssignment_1());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Import__Group__1__Impl"
+
+
+ // $ANTLR start "rule__ImportName__Group__0"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:655:1: rule__ImportName__Group__0 : rule__ImportName__Group__0__Impl rule__ImportName__Group__1 ;
+ public final void rule__ImportName__Group__0() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:659:1: ( rule__ImportName__Group__0__Impl rule__ImportName__Group__1 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:660:2: rule__ImportName__Group__0__Impl rule__ImportName__Group__1
+ {
+ pushFollow(FOLLOW_rule__ImportName__Group__0__Impl_in_rule__ImportName__Group__01322);
+ rule__ImportName__Group__0__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__ImportName__Group__1_in_rule__ImportName__Group__01325);
+ rule__ImportName__Group__1();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__ImportName__Group__0"
+
+
+ // $ANTLR start "rule__ImportName__Group__0__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:667:1: rule__ImportName__Group__0__Impl : ( RULE_ID ) ;
+ public final void rule__ImportName__Group__0__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:671:1: ( ( RULE_ID ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:672:1: ( RULE_ID )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:672:1: ( RULE_ID )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:673:1: RULE_ID
+ {
+ before(grammarAccess.getImportNameAccess().getIDTerminalRuleCall_0());
+ match(input,RULE_ID,FOLLOW_RULE_ID_in_rule__ImportName__Group__0__Impl1352);
+ after(grammarAccess.getImportNameAccess().getIDTerminalRuleCall_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__ImportName__Group__0__Impl"
+
+
+ // $ANTLR start "rule__ImportName__Group__1"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:684:1: rule__ImportName__Group__1 : rule__ImportName__Group__1__Impl ;
+ public final void rule__ImportName__Group__1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:688:1: ( rule__ImportName__Group__1__Impl )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:689:2: rule__ImportName__Group__1__Impl
+ {
+ pushFollow(FOLLOW_rule__ImportName__Group__1__Impl_in_rule__ImportName__Group__11381);
+ rule__ImportName__Group__1__Impl();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__ImportName__Group__1"
+
+
+ // $ANTLR start "rule__ImportName__Group__1__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:695:1: rule__ImportName__Group__1__Impl : ( ( rule__ImportName__Group_1__0 )? ) ;
+ public final void rule__ImportName__Group__1__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:699:1: ( ( ( rule__ImportName__Group_1__0 )? ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:700:1: ( ( rule__ImportName__Group_1__0 )? )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:700:1: ( ( rule__ImportName__Group_1__0 )? )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:701:1: ( rule__ImportName__Group_1__0 )?
+ {
+ before(grammarAccess.getImportNameAccess().getGroup_1());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:702:1: ( rule__ImportName__Group_1__0 )?
+ int alt7=2;
+ int LA7_0 = input.LA(1);
+
+ if ( (LA7_0==14) ) {
+ alt7=1;
+ }
+ switch (alt7) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:702:2: rule__ImportName__Group_1__0
+ {
+ pushFollow(FOLLOW_rule__ImportName__Group_1__0_in_rule__ImportName__Group__1__Impl1408);
+ rule__ImportName__Group_1__0();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ }
+
+ after(grammarAccess.getImportNameAccess().getGroup_1());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__ImportName__Group__1__Impl"
+
+
+ // $ANTLR start "rule__ImportName__Group_1__0"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:716:1: rule__ImportName__Group_1__0 : rule__ImportName__Group_1__0__Impl rule__ImportName__Group_1__1 ;
+ public final void rule__ImportName__Group_1__0() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:720:1: ( rule__ImportName__Group_1__0__Impl rule__ImportName__Group_1__1 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:721:2: rule__ImportName__Group_1__0__Impl rule__ImportName__Group_1__1
+ {
+ pushFollow(FOLLOW_rule__ImportName__Group_1__0__Impl_in_rule__ImportName__Group_1__01443);
+ rule__ImportName__Group_1__0__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__ImportName__Group_1__1_in_rule__ImportName__Group_1__01446);
+ rule__ImportName__Group_1__1();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__ImportName__Group_1__0"
+
+
+ // $ANTLR start "rule__ImportName__Group_1__0__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:728:1: rule__ImportName__Group_1__0__Impl : ( '.' ) ;
+ public final void rule__ImportName__Group_1__0__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:732:1: ( ( '.' ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:733:1: ( '.' )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:733:1: ( '.' )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:734:1: '.'
+ {
+ before(grammarAccess.getImportNameAccess().getFullStopKeyword_1_0());
+ match(input,14,FOLLOW_14_in_rule__ImportName__Group_1__0__Impl1474);
+ after(grammarAccess.getImportNameAccess().getFullStopKeyword_1_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__ImportName__Group_1__0__Impl"
+
+
+ // $ANTLR start "rule__ImportName__Group_1__1"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:747:1: rule__ImportName__Group_1__1 : rule__ImportName__Group_1__1__Impl ;
+ public final void rule__ImportName__Group_1__1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:751:1: ( rule__ImportName__Group_1__1__Impl )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:752:2: rule__ImportName__Group_1__1__Impl
+ {
+ pushFollow(FOLLOW_rule__ImportName__Group_1__1__Impl_in_rule__ImportName__Group_1__11505);
+ rule__ImportName__Group_1__1__Impl();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__ImportName__Group_1__1"
+
+
+ // $ANTLR start "rule__ImportName__Group_1__1__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:758:1: rule__ImportName__Group_1__1__Impl : ( '*' ) ;
+ public final void rule__ImportName__Group_1__1__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:762:1: ( ( '*' ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:763:1: ( '*' )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:763:1: ( '*' )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:764:1: '*'
+ {
+ before(grammarAccess.getImportNameAccess().getAsteriskKeyword_1_1());
+ match(input,15,FOLLOW_15_in_rule__ImportName__Group_1__1__Impl1533);
+ after(grammarAccess.getImportNameAccess().getAsteriskKeyword_1_1());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__ImportName__Group_1__1__Impl"
+
+
+ // $ANTLR start "rule__Definition__Group__0"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:781:1: rule__Definition__Group__0 : rule__Definition__Group__0__Impl rule__Definition__Group__1 ;
+ public final void rule__Definition__Group__0() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:785:1: ( rule__Definition__Group__0__Impl rule__Definition__Group__1 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:786:2: rule__Definition__Group__0__Impl rule__Definition__Group__1
+ {
+ pushFollow(FOLLOW_rule__Definition__Group__0__Impl_in_rule__Definition__Group__01568);
+ rule__Definition__Group__0__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__Definition__Group__1_in_rule__Definition__Group__01571);
+ rule__Definition__Group__1();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Definition__Group__0"
+
+
+ // $ANTLR start "rule__Definition__Group__0__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:793:1: rule__Definition__Group__0__Impl : ( 'def' ) ;
+ public final void rule__Definition__Group__0__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:797:1: ( ( 'def' ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:798:1: ( 'def' )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:798:1: ( 'def' )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:799:1: 'def'
+ {
+ before(grammarAccess.getDefinitionAccess().getDefKeyword_0());
+ match(input,16,FOLLOW_16_in_rule__Definition__Group__0__Impl1599);
+ after(grammarAccess.getDefinitionAccess().getDefKeyword_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Definition__Group__0__Impl"
+
+
+ // $ANTLR start "rule__Definition__Group__1"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:812:1: rule__Definition__Group__1 : rule__Definition__Group__1__Impl rule__Definition__Group__2 ;
+ public final void rule__Definition__Group__1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:816:1: ( rule__Definition__Group__1__Impl rule__Definition__Group__2 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:817:2: rule__Definition__Group__1__Impl rule__Definition__Group__2
+ {
+ pushFollow(FOLLOW_rule__Definition__Group__1__Impl_in_rule__Definition__Group__11630);
+ rule__Definition__Group__1__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__Definition__Group__2_in_rule__Definition__Group__11633);
+ rule__Definition__Group__2();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Definition__Group__1"
+
+
+ // $ANTLR start "rule__Definition__Group__1__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:824:1: rule__Definition__Group__1__Impl : ( ( rule__Definition__NameAssignment_1 ) ) ;
+ public final void rule__Definition__Group__1__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:828:1: ( ( ( rule__Definition__NameAssignment_1 ) ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:829:1: ( ( rule__Definition__NameAssignment_1 ) )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:829:1: ( ( rule__Definition__NameAssignment_1 ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:830:1: ( rule__Definition__NameAssignment_1 )
+ {
+ before(grammarAccess.getDefinitionAccess().getNameAssignment_1());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:831:1: ( rule__Definition__NameAssignment_1 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:831:2: rule__Definition__NameAssignment_1
+ {
+ pushFollow(FOLLOW_rule__Definition__NameAssignment_1_in_rule__Definition__Group__1__Impl1660);
+ rule__Definition__NameAssignment_1();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getDefinitionAccess().getNameAssignment_1());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Definition__Group__1__Impl"
+
+
+ // $ANTLR start "rule__Definition__Group__2"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:841:1: rule__Definition__Group__2 : rule__Definition__Group__2__Impl rule__Definition__Group__3 ;
+ public final void rule__Definition__Group__2() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:845:1: ( rule__Definition__Group__2__Impl rule__Definition__Group__3 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:846:2: rule__Definition__Group__2__Impl rule__Definition__Group__3
+ {
+ pushFollow(FOLLOW_rule__Definition__Group__2__Impl_in_rule__Definition__Group__21690);
+ rule__Definition__Group__2__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__Definition__Group__3_in_rule__Definition__Group__21693);
+ rule__Definition__Group__3();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Definition__Group__2"
+
+
+ // $ANTLR start "rule__Definition__Group__2__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:853:1: rule__Definition__Group__2__Impl : ( ( rule__Definition__Group_2__0 )? ) ;
+ public final void rule__Definition__Group__2__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:857:1: ( ( ( rule__Definition__Group_2__0 )? ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:858:1: ( ( rule__Definition__Group_2__0 )? )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:858:1: ( ( rule__Definition__Group_2__0 )? )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:859:1: ( rule__Definition__Group_2__0 )?
+ {
+ before(grammarAccess.getDefinitionAccess().getGroup_2());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:860:1: ( rule__Definition__Group_2__0 )?
+ int alt8=2;
+ int LA8_0 = input.LA(1);
+
+ if ( (LA8_0==19) ) {
+ alt8=1;
+ }
+ switch (alt8) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:860:2: rule__Definition__Group_2__0
+ {
+ pushFollow(FOLLOW_rule__Definition__Group_2__0_in_rule__Definition__Group__2__Impl1720);
+ rule__Definition__Group_2__0();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ }
+
+ after(grammarAccess.getDefinitionAccess().getGroup_2());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Definition__Group__2__Impl"
+
+
+ // $ANTLR start "rule__Definition__Group__3"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:870:1: rule__Definition__Group__3 : rule__Definition__Group__3__Impl rule__Definition__Group__4 ;
+ public final void rule__Definition__Group__3() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:874:1: ( rule__Definition__Group__3__Impl rule__Definition__Group__4 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:875:2: rule__Definition__Group__3__Impl rule__Definition__Group__4
+ {
+ pushFollow(FOLLOW_rule__Definition__Group__3__Impl_in_rule__Definition__Group__31751);
+ rule__Definition__Group__3__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__Definition__Group__4_in_rule__Definition__Group__31754);
+ rule__Definition__Group__4();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Definition__Group__3"
+
+
+ // $ANTLR start "rule__Definition__Group__3__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:882:1: rule__Definition__Group__3__Impl : ( ':' ) ;
+ public final void rule__Definition__Group__3__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:886:1: ( ( ':' ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:887:1: ( ':' )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:887:1: ( ':' )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:888:1: ':'
+ {
+ before(grammarAccess.getDefinitionAccess().getColonKeyword_3());
+ match(input,17,FOLLOW_17_in_rule__Definition__Group__3__Impl1782);
+ after(grammarAccess.getDefinitionAccess().getColonKeyword_3());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Definition__Group__3__Impl"
+
+
+ // $ANTLR start "rule__Definition__Group__4"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:901:1: rule__Definition__Group__4 : rule__Definition__Group__4__Impl rule__Definition__Group__5 ;
+ public final void rule__Definition__Group__4() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:905:1: ( rule__Definition__Group__4__Impl rule__Definition__Group__5 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:906:2: rule__Definition__Group__4__Impl rule__Definition__Group__5
+ {
+ pushFollow(FOLLOW_rule__Definition__Group__4__Impl_in_rule__Definition__Group__41813);
+ rule__Definition__Group__4__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__Definition__Group__5_in_rule__Definition__Group__41816);
+ rule__Definition__Group__5();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Definition__Group__4"
+
+
+ // $ANTLR start "rule__Definition__Group__4__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:913:1: rule__Definition__Group__4__Impl : ( ( rule__Definition__ExprAssignment_4 ) ) ;
+ public final void rule__Definition__Group__4__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:917:1: ( ( ( rule__Definition__ExprAssignment_4 ) ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:918:1: ( ( rule__Definition__ExprAssignment_4 ) )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:918:1: ( ( rule__Definition__ExprAssignment_4 ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:919:1: ( rule__Definition__ExprAssignment_4 )
+ {
+ before(grammarAccess.getDefinitionAccess().getExprAssignment_4());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:920:1: ( rule__Definition__ExprAssignment_4 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:920:2: rule__Definition__ExprAssignment_4
+ {
+ pushFollow(FOLLOW_rule__Definition__ExprAssignment_4_in_rule__Definition__Group__4__Impl1843);
+ rule__Definition__ExprAssignment_4();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getDefinitionAccess().getExprAssignment_4());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Definition__Group__4__Impl"
+
+
+ // $ANTLR start "rule__Definition__Group__5"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:930:1: rule__Definition__Group__5 : rule__Definition__Group__5__Impl ;
+ public final void rule__Definition__Group__5() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:934:1: ( rule__Definition__Group__5__Impl )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:935:2: rule__Definition__Group__5__Impl
+ {
+ pushFollow(FOLLOW_rule__Definition__Group__5__Impl_in_rule__Definition__Group__51873);
+ rule__Definition__Group__5__Impl();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Definition__Group__5"
+
+
+ // $ANTLR start "rule__Definition__Group__5__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:941:1: rule__Definition__Group__5__Impl : ( ';' ) ;
+ public final void rule__Definition__Group__5__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:945:1: ( ( ';' ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:946:1: ( ';' )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:946:1: ( ';' )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:947:1: ';'
+ {
+ before(grammarAccess.getDefinitionAccess().getSemicolonKeyword_5());
+ match(input,18,FOLLOW_18_in_rule__Definition__Group__5__Impl1901);
+ after(grammarAccess.getDefinitionAccess().getSemicolonKeyword_5());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Definition__Group__5__Impl"
+
+
+ // $ANTLR start "rule__Definition__Group_2__0"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:972:1: rule__Definition__Group_2__0 : rule__Definition__Group_2__0__Impl rule__Definition__Group_2__1 ;
+ public final void rule__Definition__Group_2__0() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:976:1: ( rule__Definition__Group_2__0__Impl rule__Definition__Group_2__1 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:977:2: rule__Definition__Group_2__0__Impl rule__Definition__Group_2__1
+ {
+ pushFollow(FOLLOW_rule__Definition__Group_2__0__Impl_in_rule__Definition__Group_2__01944);
+ rule__Definition__Group_2__0__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__Definition__Group_2__1_in_rule__Definition__Group_2__01947);
+ rule__Definition__Group_2__1();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Definition__Group_2__0"
+
+
+ // $ANTLR start "rule__Definition__Group_2__0__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:984:1: rule__Definition__Group_2__0__Impl : ( '(' ) ;
+ public final void rule__Definition__Group_2__0__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:988:1: ( ( '(' ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:989:1: ( '(' )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:989:1: ( '(' )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:990:1: '('
+ {
+ before(grammarAccess.getDefinitionAccess().getLeftParenthesisKeyword_2_0());
+ match(input,19,FOLLOW_19_in_rule__Definition__Group_2__0__Impl1975);
+ after(grammarAccess.getDefinitionAccess().getLeftParenthesisKeyword_2_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Definition__Group_2__0__Impl"
+
+
+ // $ANTLR start "rule__Definition__Group_2__1"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1003:1: rule__Definition__Group_2__1 : rule__Definition__Group_2__1__Impl rule__Definition__Group_2__2 ;
+ public final void rule__Definition__Group_2__1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1007:1: ( rule__Definition__Group_2__1__Impl rule__Definition__Group_2__2 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1008:2: rule__Definition__Group_2__1__Impl rule__Definition__Group_2__2
+ {
+ pushFollow(FOLLOW_rule__Definition__Group_2__1__Impl_in_rule__Definition__Group_2__12006);
+ rule__Definition__Group_2__1__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__Definition__Group_2__2_in_rule__Definition__Group_2__12009);
+ rule__Definition__Group_2__2();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Definition__Group_2__1"
+
+
+ // $ANTLR start "rule__Definition__Group_2__1__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1015:1: rule__Definition__Group_2__1__Impl : ( ( rule__Definition__ArgsAssignment_2_1 ) ) ;
+ public final void rule__Definition__Group_2__1__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1019:1: ( ( ( rule__Definition__ArgsAssignment_2_1 ) ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1020:1: ( ( rule__Definition__ArgsAssignment_2_1 ) )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1020:1: ( ( rule__Definition__ArgsAssignment_2_1 ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1021:1: ( rule__Definition__ArgsAssignment_2_1 )
+ {
+ before(grammarAccess.getDefinitionAccess().getArgsAssignment_2_1());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1022:1: ( rule__Definition__ArgsAssignment_2_1 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1022:2: rule__Definition__ArgsAssignment_2_1
+ {
+ pushFollow(FOLLOW_rule__Definition__ArgsAssignment_2_1_in_rule__Definition__Group_2__1__Impl2036);
+ rule__Definition__ArgsAssignment_2_1();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getDefinitionAccess().getArgsAssignment_2_1());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Definition__Group_2__1__Impl"
+
+
+ // $ANTLR start "rule__Definition__Group_2__2"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1032:1: rule__Definition__Group_2__2 : rule__Definition__Group_2__2__Impl rule__Definition__Group_2__3 ;
+ public final void rule__Definition__Group_2__2() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1036:1: ( rule__Definition__Group_2__2__Impl rule__Definition__Group_2__3 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1037:2: rule__Definition__Group_2__2__Impl rule__Definition__Group_2__3
+ {
+ pushFollow(FOLLOW_rule__Definition__Group_2__2__Impl_in_rule__Definition__Group_2__22066);
+ rule__Definition__Group_2__2__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__Definition__Group_2__3_in_rule__Definition__Group_2__22069);
+ rule__Definition__Group_2__3();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Definition__Group_2__2"
+
+
+ // $ANTLR start "rule__Definition__Group_2__2__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1044:1: rule__Definition__Group_2__2__Impl : ( ( rule__Definition__Group_2_2__0 )* ) ;
+ public final void rule__Definition__Group_2__2__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1048:1: ( ( ( rule__Definition__Group_2_2__0 )* ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1049:1: ( ( rule__Definition__Group_2_2__0 )* )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1049:1: ( ( rule__Definition__Group_2_2__0 )* )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1050:1: ( rule__Definition__Group_2_2__0 )*
+ {
+ before(grammarAccess.getDefinitionAccess().getGroup_2_2());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1051:1: ( rule__Definition__Group_2_2__0 )*
+ loop9:
+ do {
+ int alt9=2;
+ int LA9_0 = input.LA(1);
+
+ if ( (LA9_0==21) ) {
+ alt9=1;
+ }
+
+
+ switch (alt9) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1051:2: rule__Definition__Group_2_2__0
+ {
+ pushFollow(FOLLOW_rule__Definition__Group_2_2__0_in_rule__Definition__Group_2__2__Impl2096);
+ rule__Definition__Group_2_2__0();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ default :
+ break loop9;
+ }
+ } while (true);
+
+ after(grammarAccess.getDefinitionAccess().getGroup_2_2());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Definition__Group_2__2__Impl"
+
+
+ // $ANTLR start "rule__Definition__Group_2__3"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1061:1: rule__Definition__Group_2__3 : rule__Definition__Group_2__3__Impl ;
+ public final void rule__Definition__Group_2__3() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1065:1: ( rule__Definition__Group_2__3__Impl )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1066:2: rule__Definition__Group_2__3__Impl
+ {
+ pushFollow(FOLLOW_rule__Definition__Group_2__3__Impl_in_rule__Definition__Group_2__32127);
+ rule__Definition__Group_2__3__Impl();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Definition__Group_2__3"
+
+
+ // $ANTLR start "rule__Definition__Group_2__3__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1072:1: rule__Definition__Group_2__3__Impl : ( ')' ) ;
+ public final void rule__Definition__Group_2__3__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1076:1: ( ( ')' ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1077:1: ( ')' )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1077:1: ( ')' )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1078:1: ')'
+ {
+ before(grammarAccess.getDefinitionAccess().getRightParenthesisKeyword_2_3());
+ match(input,20,FOLLOW_20_in_rule__Definition__Group_2__3__Impl2155);
+ after(grammarAccess.getDefinitionAccess().getRightParenthesisKeyword_2_3());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Definition__Group_2__3__Impl"
+
+
+ // $ANTLR start "rule__Definition__Group_2_2__0"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1099:1: rule__Definition__Group_2_2__0 : rule__Definition__Group_2_2__0__Impl rule__Definition__Group_2_2__1 ;
+ public final void rule__Definition__Group_2_2__0() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1103:1: ( rule__Definition__Group_2_2__0__Impl rule__Definition__Group_2_2__1 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1104:2: rule__Definition__Group_2_2__0__Impl rule__Definition__Group_2_2__1
+ {
+ pushFollow(FOLLOW_rule__Definition__Group_2_2__0__Impl_in_rule__Definition__Group_2_2__02194);
+ rule__Definition__Group_2_2__0__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__Definition__Group_2_2__1_in_rule__Definition__Group_2_2__02197);
+ rule__Definition__Group_2_2__1();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Definition__Group_2_2__0"
+
+
+ // $ANTLR start "rule__Definition__Group_2_2__0__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1111:1: rule__Definition__Group_2_2__0__Impl : ( ',' ) ;
+ public final void rule__Definition__Group_2_2__0__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1115:1: ( ( ',' ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1116:1: ( ',' )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1116:1: ( ',' )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1117:1: ','
+ {
+ before(grammarAccess.getDefinitionAccess().getCommaKeyword_2_2_0());
+ match(input,21,FOLLOW_21_in_rule__Definition__Group_2_2__0__Impl2225);
+ after(grammarAccess.getDefinitionAccess().getCommaKeyword_2_2_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Definition__Group_2_2__0__Impl"
+
+
+ // $ANTLR start "rule__Definition__Group_2_2__1"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1130:1: rule__Definition__Group_2_2__1 : rule__Definition__Group_2_2__1__Impl ;
+ public final void rule__Definition__Group_2_2__1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1134:1: ( rule__Definition__Group_2_2__1__Impl )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1135:2: rule__Definition__Group_2_2__1__Impl
+ {
+ pushFollow(FOLLOW_rule__Definition__Group_2_2__1__Impl_in_rule__Definition__Group_2_2__12256);
+ rule__Definition__Group_2_2__1__Impl();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Definition__Group_2_2__1"
+
+
+ // $ANTLR start "rule__Definition__Group_2_2__1__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1141:1: rule__Definition__Group_2_2__1__Impl : ( ( rule__Definition__ArgsAssignment_2_2_1 ) ) ;
+ public final void rule__Definition__Group_2_2__1__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1145:1: ( ( ( rule__Definition__ArgsAssignment_2_2_1 ) ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1146:1: ( ( rule__Definition__ArgsAssignment_2_2_1 ) )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1146:1: ( ( rule__Definition__ArgsAssignment_2_2_1 ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1147:1: ( rule__Definition__ArgsAssignment_2_2_1 )
+ {
+ before(grammarAccess.getDefinitionAccess().getArgsAssignment_2_2_1());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1148:1: ( rule__Definition__ArgsAssignment_2_2_1 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1148:2: rule__Definition__ArgsAssignment_2_2_1
+ {
+ pushFollow(FOLLOW_rule__Definition__ArgsAssignment_2_2_1_in_rule__Definition__Group_2_2__1__Impl2283);
+ rule__Definition__ArgsAssignment_2_2_1();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getDefinitionAccess().getArgsAssignment_2_2_1());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Definition__Group_2_2__1__Impl"
+
+
+ // $ANTLR start "rule__Evaluation__Group__0"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1162:1: rule__Evaluation__Group__0 : rule__Evaluation__Group__0__Impl rule__Evaluation__Group__1 ;
+ public final void rule__Evaluation__Group__0() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1166:1: ( rule__Evaluation__Group__0__Impl rule__Evaluation__Group__1 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1167:2: rule__Evaluation__Group__0__Impl rule__Evaluation__Group__1
+ {
+ pushFollow(FOLLOW_rule__Evaluation__Group__0__Impl_in_rule__Evaluation__Group__02317);
+ rule__Evaluation__Group__0__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__Evaluation__Group__1_in_rule__Evaluation__Group__02320);
+ rule__Evaluation__Group__1();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Evaluation__Group__0"
+
+
+ // $ANTLR start "rule__Evaluation__Group__0__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1174:1: rule__Evaluation__Group__0__Impl : ( ( rule__Evaluation__ExpressionAssignment_0 ) ) ;
+ public final void rule__Evaluation__Group__0__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1178:1: ( ( ( rule__Evaluation__ExpressionAssignment_0 ) ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1179:1: ( ( rule__Evaluation__ExpressionAssignment_0 ) )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1179:1: ( ( rule__Evaluation__ExpressionAssignment_0 ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1180:1: ( rule__Evaluation__ExpressionAssignment_0 )
+ {
+ before(grammarAccess.getEvaluationAccess().getExpressionAssignment_0());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1181:1: ( rule__Evaluation__ExpressionAssignment_0 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1181:2: rule__Evaluation__ExpressionAssignment_0
+ {
+ pushFollow(FOLLOW_rule__Evaluation__ExpressionAssignment_0_in_rule__Evaluation__Group__0__Impl2347);
+ rule__Evaluation__ExpressionAssignment_0();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getEvaluationAccess().getExpressionAssignment_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Evaluation__Group__0__Impl"
+
+
+ // $ANTLR start "rule__Evaluation__Group__1"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1191:1: rule__Evaluation__Group__1 : rule__Evaluation__Group__1__Impl ;
+ public final void rule__Evaluation__Group__1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1195:1: ( rule__Evaluation__Group__1__Impl )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1196:2: rule__Evaluation__Group__1__Impl
+ {
+ pushFollow(FOLLOW_rule__Evaluation__Group__1__Impl_in_rule__Evaluation__Group__12377);
+ rule__Evaluation__Group__1__Impl();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Evaluation__Group__1"
+
+
+ // $ANTLR start "rule__Evaluation__Group__1__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1202:1: rule__Evaluation__Group__1__Impl : ( ';' ) ;
+ public final void rule__Evaluation__Group__1__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1206:1: ( ( ';' ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1207:1: ( ';' )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1207:1: ( ';' )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1208:1: ';'
+ {
+ before(grammarAccess.getEvaluationAccess().getSemicolonKeyword_1());
+ match(input,18,FOLLOW_18_in_rule__Evaluation__Group__1__Impl2405);
+ after(grammarAccess.getEvaluationAccess().getSemicolonKeyword_1());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Evaluation__Group__1__Impl"
+
+
+ // $ANTLR start "rule__Addition__Group__0"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1225:1: rule__Addition__Group__0 : rule__Addition__Group__0__Impl rule__Addition__Group__1 ;
+ public final void rule__Addition__Group__0() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1229:1: ( rule__Addition__Group__0__Impl rule__Addition__Group__1 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1230:2: rule__Addition__Group__0__Impl rule__Addition__Group__1
+ {
+ pushFollow(FOLLOW_rule__Addition__Group__0__Impl_in_rule__Addition__Group__02440);
+ rule__Addition__Group__0__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__Addition__Group__1_in_rule__Addition__Group__02443);
+ rule__Addition__Group__1();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Addition__Group__0"
+
+
+ // $ANTLR start "rule__Addition__Group__0__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1237:1: rule__Addition__Group__0__Impl : ( ruleMultiplication ) ;
+ public final void rule__Addition__Group__0__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1241:1: ( ( ruleMultiplication ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1242:1: ( ruleMultiplication )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1242:1: ( ruleMultiplication )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1243:1: ruleMultiplication
+ {
+ before(grammarAccess.getAdditionAccess().getMultiplicationParserRuleCall_0());
+ pushFollow(FOLLOW_ruleMultiplication_in_rule__Addition__Group__0__Impl2470);
+ ruleMultiplication();
+
+ state._fsp--;
+
+ after(grammarAccess.getAdditionAccess().getMultiplicationParserRuleCall_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Addition__Group__0__Impl"
+
+
+ // $ANTLR start "rule__Addition__Group__1"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1254:1: rule__Addition__Group__1 : rule__Addition__Group__1__Impl ;
+ public final void rule__Addition__Group__1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1258:1: ( rule__Addition__Group__1__Impl )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1259:2: rule__Addition__Group__1__Impl
+ {
+ pushFollow(FOLLOW_rule__Addition__Group__1__Impl_in_rule__Addition__Group__12499);
+ rule__Addition__Group__1__Impl();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Addition__Group__1"
+
+
+ // $ANTLR start "rule__Addition__Group__1__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1265:1: rule__Addition__Group__1__Impl : ( ( rule__Addition__Group_1__0 )* ) ;
+ public final void rule__Addition__Group__1__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1269:1: ( ( ( rule__Addition__Group_1__0 )* ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1270:1: ( ( rule__Addition__Group_1__0 )* )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1270:1: ( ( rule__Addition__Group_1__0 )* )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1271:1: ( rule__Addition__Group_1__0 )*
+ {
+ before(grammarAccess.getAdditionAccess().getGroup_1());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1272:1: ( rule__Addition__Group_1__0 )*
+ loop10:
+ do {
+ int alt10=2;
+ int LA10_0 = input.LA(1);
+
+ if ( ((LA10_0>=22 && LA10_0<=23)) ) {
+ alt10=1;
+ }
+
+
+ switch (alt10) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1272:2: rule__Addition__Group_1__0
+ {
+ pushFollow(FOLLOW_rule__Addition__Group_1__0_in_rule__Addition__Group__1__Impl2526);
+ rule__Addition__Group_1__0();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ default :
+ break loop10;
+ }
+ } while (true);
+
+ after(grammarAccess.getAdditionAccess().getGroup_1());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Addition__Group__1__Impl"
+
+
+ // $ANTLR start "rule__Addition__Group_1__0"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1286:1: rule__Addition__Group_1__0 : rule__Addition__Group_1__0__Impl rule__Addition__Group_1__1 ;
+ public final void rule__Addition__Group_1__0() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1290:1: ( rule__Addition__Group_1__0__Impl rule__Addition__Group_1__1 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1291:2: rule__Addition__Group_1__0__Impl rule__Addition__Group_1__1
+ {
+ pushFollow(FOLLOW_rule__Addition__Group_1__0__Impl_in_rule__Addition__Group_1__02561);
+ rule__Addition__Group_1__0__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__Addition__Group_1__1_in_rule__Addition__Group_1__02564);
+ rule__Addition__Group_1__1();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Addition__Group_1__0"
+
+
+ // $ANTLR start "rule__Addition__Group_1__0__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1298:1: rule__Addition__Group_1__0__Impl : ( ( rule__Addition__Alternatives_1_0 ) ) ;
+ public final void rule__Addition__Group_1__0__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1302:1: ( ( ( rule__Addition__Alternatives_1_0 ) ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1303:1: ( ( rule__Addition__Alternatives_1_0 ) )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1303:1: ( ( rule__Addition__Alternatives_1_0 ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1304:1: ( rule__Addition__Alternatives_1_0 )
+ {
+ before(grammarAccess.getAdditionAccess().getAlternatives_1_0());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1305:1: ( rule__Addition__Alternatives_1_0 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1305:2: rule__Addition__Alternatives_1_0
+ {
+ pushFollow(FOLLOW_rule__Addition__Alternatives_1_0_in_rule__Addition__Group_1__0__Impl2591);
+ rule__Addition__Alternatives_1_0();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getAdditionAccess().getAlternatives_1_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Addition__Group_1__0__Impl"
+
+
+ // $ANTLR start "rule__Addition__Group_1__1"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1315:1: rule__Addition__Group_1__1 : rule__Addition__Group_1__1__Impl ;
+ public final void rule__Addition__Group_1__1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1319:1: ( rule__Addition__Group_1__1__Impl )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1320:2: rule__Addition__Group_1__1__Impl
+ {
+ pushFollow(FOLLOW_rule__Addition__Group_1__1__Impl_in_rule__Addition__Group_1__12621);
+ rule__Addition__Group_1__1__Impl();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Addition__Group_1__1"
+
+
+ // $ANTLR start "rule__Addition__Group_1__1__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1326:1: rule__Addition__Group_1__1__Impl : ( ( rule__Addition__RightAssignment_1_1 ) ) ;
+ public final void rule__Addition__Group_1__1__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1330:1: ( ( ( rule__Addition__RightAssignment_1_1 ) ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1331:1: ( ( rule__Addition__RightAssignment_1_1 ) )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1331:1: ( ( rule__Addition__RightAssignment_1_1 ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1332:1: ( rule__Addition__RightAssignment_1_1 )
+ {
+ before(grammarAccess.getAdditionAccess().getRightAssignment_1_1());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1333:1: ( rule__Addition__RightAssignment_1_1 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1333:2: rule__Addition__RightAssignment_1_1
+ {
+ pushFollow(FOLLOW_rule__Addition__RightAssignment_1_1_in_rule__Addition__Group_1__1__Impl2648);
+ rule__Addition__RightAssignment_1_1();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getAdditionAccess().getRightAssignment_1_1());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Addition__Group_1__1__Impl"
+
+
+ // $ANTLR start "rule__Addition__Group_1_0_0__0"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1347:1: rule__Addition__Group_1_0_0__0 : rule__Addition__Group_1_0_0__0__Impl rule__Addition__Group_1_0_0__1 ;
+ public final void rule__Addition__Group_1_0_0__0() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1351:1: ( rule__Addition__Group_1_0_0__0__Impl rule__Addition__Group_1_0_0__1 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1352:2: rule__Addition__Group_1_0_0__0__Impl rule__Addition__Group_1_0_0__1
+ {
+ pushFollow(FOLLOW_rule__Addition__Group_1_0_0__0__Impl_in_rule__Addition__Group_1_0_0__02682);
+ rule__Addition__Group_1_0_0__0__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__Addition__Group_1_0_0__1_in_rule__Addition__Group_1_0_0__02685);
+ rule__Addition__Group_1_0_0__1();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Addition__Group_1_0_0__0"
+
+
+ // $ANTLR start "rule__Addition__Group_1_0_0__0__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1359:1: rule__Addition__Group_1_0_0__0__Impl : ( () ) ;
+ public final void rule__Addition__Group_1_0_0__0__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1363:1: ( ( () ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1364:1: ( () )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1364:1: ( () )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1365:1: ()
+ {
+ before(grammarAccess.getAdditionAccess().getPlusLeftAction_1_0_0_0());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1366:1: ()
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1368:1:
+ {
+ }
+
+ after(grammarAccess.getAdditionAccess().getPlusLeftAction_1_0_0_0());
+
+ }
+
+
+ }
+
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Addition__Group_1_0_0__0__Impl"
+
+
+ // $ANTLR start "rule__Addition__Group_1_0_0__1"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1378:1: rule__Addition__Group_1_0_0__1 : rule__Addition__Group_1_0_0__1__Impl ;
+ public final void rule__Addition__Group_1_0_0__1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1382:1: ( rule__Addition__Group_1_0_0__1__Impl )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1383:2: rule__Addition__Group_1_0_0__1__Impl
+ {
+ pushFollow(FOLLOW_rule__Addition__Group_1_0_0__1__Impl_in_rule__Addition__Group_1_0_0__12743);
+ rule__Addition__Group_1_0_0__1__Impl();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Addition__Group_1_0_0__1"
+
+
+ // $ANTLR start "rule__Addition__Group_1_0_0__1__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1389:1: rule__Addition__Group_1_0_0__1__Impl : ( '+' ) ;
+ public final void rule__Addition__Group_1_0_0__1__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1393:1: ( ( '+' ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1394:1: ( '+' )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1394:1: ( '+' )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1395:1: '+'
+ {
+ before(grammarAccess.getAdditionAccess().getPlusSignKeyword_1_0_0_1());
+ match(input,22,FOLLOW_22_in_rule__Addition__Group_1_0_0__1__Impl2771);
+ after(grammarAccess.getAdditionAccess().getPlusSignKeyword_1_0_0_1());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Addition__Group_1_0_0__1__Impl"
+
+
+ // $ANTLR start "rule__Addition__Group_1_0_1__0"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1412:1: rule__Addition__Group_1_0_1__0 : rule__Addition__Group_1_0_1__0__Impl rule__Addition__Group_1_0_1__1 ;
+ public final void rule__Addition__Group_1_0_1__0() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1416:1: ( rule__Addition__Group_1_0_1__0__Impl rule__Addition__Group_1_0_1__1 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1417:2: rule__Addition__Group_1_0_1__0__Impl rule__Addition__Group_1_0_1__1
+ {
+ pushFollow(FOLLOW_rule__Addition__Group_1_0_1__0__Impl_in_rule__Addition__Group_1_0_1__02806);
+ rule__Addition__Group_1_0_1__0__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__Addition__Group_1_0_1__1_in_rule__Addition__Group_1_0_1__02809);
+ rule__Addition__Group_1_0_1__1();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Addition__Group_1_0_1__0"
+
+
+ // $ANTLR start "rule__Addition__Group_1_0_1__0__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1424:1: rule__Addition__Group_1_0_1__0__Impl : ( () ) ;
+ public final void rule__Addition__Group_1_0_1__0__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1428:1: ( ( () ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1429:1: ( () )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1429:1: ( () )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1430:1: ()
+ {
+ before(grammarAccess.getAdditionAccess().getMinusLeftAction_1_0_1_0());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1431:1: ()
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1433:1:
+ {
+ }
+
+ after(grammarAccess.getAdditionAccess().getMinusLeftAction_1_0_1_0());
+
+ }
+
+
+ }
+
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Addition__Group_1_0_1__0__Impl"
+
+
+ // $ANTLR start "rule__Addition__Group_1_0_1__1"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1443:1: rule__Addition__Group_1_0_1__1 : rule__Addition__Group_1_0_1__1__Impl ;
+ public final void rule__Addition__Group_1_0_1__1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1447:1: ( rule__Addition__Group_1_0_1__1__Impl )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1448:2: rule__Addition__Group_1_0_1__1__Impl
+ {
+ pushFollow(FOLLOW_rule__Addition__Group_1_0_1__1__Impl_in_rule__Addition__Group_1_0_1__12867);
+ rule__Addition__Group_1_0_1__1__Impl();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Addition__Group_1_0_1__1"
+
+
+ // $ANTLR start "rule__Addition__Group_1_0_1__1__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1454:1: rule__Addition__Group_1_0_1__1__Impl : ( '-' ) ;
+ public final void rule__Addition__Group_1_0_1__1__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1458:1: ( ( '-' ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1459:1: ( '-' )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1459:1: ( '-' )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1460:1: '-'
+ {
+ before(grammarAccess.getAdditionAccess().getHyphenMinusKeyword_1_0_1_1());
+ match(input,23,FOLLOW_23_in_rule__Addition__Group_1_0_1__1__Impl2895);
+ after(grammarAccess.getAdditionAccess().getHyphenMinusKeyword_1_0_1_1());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Addition__Group_1_0_1__1__Impl"
+
+
+ // $ANTLR start "rule__Multiplication__Group__0"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1477:1: rule__Multiplication__Group__0 : rule__Multiplication__Group__0__Impl rule__Multiplication__Group__1 ;
+ public final void rule__Multiplication__Group__0() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1481:1: ( rule__Multiplication__Group__0__Impl rule__Multiplication__Group__1 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1482:2: rule__Multiplication__Group__0__Impl rule__Multiplication__Group__1
+ {
+ pushFollow(FOLLOW_rule__Multiplication__Group__0__Impl_in_rule__Multiplication__Group__02930);
+ rule__Multiplication__Group__0__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__Multiplication__Group__1_in_rule__Multiplication__Group__02933);
+ rule__Multiplication__Group__1();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Multiplication__Group__0"
+
+
+ // $ANTLR start "rule__Multiplication__Group__0__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1489:1: rule__Multiplication__Group__0__Impl : ( rulePrimaryExpression ) ;
+ public final void rule__Multiplication__Group__0__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1493:1: ( ( rulePrimaryExpression ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1494:1: ( rulePrimaryExpression )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1494:1: ( rulePrimaryExpression )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1495:1: rulePrimaryExpression
+ {
+ before(grammarAccess.getMultiplicationAccess().getPrimaryExpressionParserRuleCall_0());
+ pushFollow(FOLLOW_rulePrimaryExpression_in_rule__Multiplication__Group__0__Impl2960);
+ rulePrimaryExpression();
+
+ state._fsp--;
+
+ after(grammarAccess.getMultiplicationAccess().getPrimaryExpressionParserRuleCall_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Multiplication__Group__0__Impl"
+
+
+ // $ANTLR start "rule__Multiplication__Group__1"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1506:1: rule__Multiplication__Group__1 : rule__Multiplication__Group__1__Impl ;
+ public final void rule__Multiplication__Group__1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1510:1: ( rule__Multiplication__Group__1__Impl )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1511:2: rule__Multiplication__Group__1__Impl
+ {
+ pushFollow(FOLLOW_rule__Multiplication__Group__1__Impl_in_rule__Multiplication__Group__12989);
+ rule__Multiplication__Group__1__Impl();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Multiplication__Group__1"
+
+
+ // $ANTLR start "rule__Multiplication__Group__1__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1517:1: rule__Multiplication__Group__1__Impl : ( ( rule__Multiplication__Group_1__0 )* ) ;
+ public final void rule__Multiplication__Group__1__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1521:1: ( ( ( rule__Multiplication__Group_1__0 )* ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1522:1: ( ( rule__Multiplication__Group_1__0 )* )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1522:1: ( ( rule__Multiplication__Group_1__0 )* )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1523:1: ( rule__Multiplication__Group_1__0 )*
+ {
+ before(grammarAccess.getMultiplicationAccess().getGroup_1());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1524:1: ( rule__Multiplication__Group_1__0 )*
+ loop11:
+ do {
+ int alt11=2;
+ int LA11_0 = input.LA(1);
+
+ if ( (LA11_0==15||LA11_0==24) ) {
+ alt11=1;
+ }
+
+
+ switch (alt11) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1524:2: rule__Multiplication__Group_1__0
+ {
+ pushFollow(FOLLOW_rule__Multiplication__Group_1__0_in_rule__Multiplication__Group__1__Impl3016);
+ rule__Multiplication__Group_1__0();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ default :
+ break loop11;
+ }
+ } while (true);
+
+ after(grammarAccess.getMultiplicationAccess().getGroup_1());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Multiplication__Group__1__Impl"
+
+
+ // $ANTLR start "rule__Multiplication__Group_1__0"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1538:1: rule__Multiplication__Group_1__0 : rule__Multiplication__Group_1__0__Impl rule__Multiplication__Group_1__1 ;
+ public final void rule__Multiplication__Group_1__0() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1542:1: ( rule__Multiplication__Group_1__0__Impl rule__Multiplication__Group_1__1 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1543:2: rule__Multiplication__Group_1__0__Impl rule__Multiplication__Group_1__1
+ {
+ pushFollow(FOLLOW_rule__Multiplication__Group_1__0__Impl_in_rule__Multiplication__Group_1__03051);
+ rule__Multiplication__Group_1__0__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__Multiplication__Group_1__1_in_rule__Multiplication__Group_1__03054);
+ rule__Multiplication__Group_1__1();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Multiplication__Group_1__0"
+
+
+ // $ANTLR start "rule__Multiplication__Group_1__0__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1550:1: rule__Multiplication__Group_1__0__Impl : ( ( rule__Multiplication__Alternatives_1_0 ) ) ;
+ public final void rule__Multiplication__Group_1__0__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1554:1: ( ( ( rule__Multiplication__Alternatives_1_0 ) ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1555:1: ( ( rule__Multiplication__Alternatives_1_0 ) )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1555:1: ( ( rule__Multiplication__Alternatives_1_0 ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1556:1: ( rule__Multiplication__Alternatives_1_0 )
+ {
+ before(grammarAccess.getMultiplicationAccess().getAlternatives_1_0());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1557:1: ( rule__Multiplication__Alternatives_1_0 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1557:2: rule__Multiplication__Alternatives_1_0
+ {
+ pushFollow(FOLLOW_rule__Multiplication__Alternatives_1_0_in_rule__Multiplication__Group_1__0__Impl3081);
+ rule__Multiplication__Alternatives_1_0();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getMultiplicationAccess().getAlternatives_1_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Multiplication__Group_1__0__Impl"
+
+
+ // $ANTLR start "rule__Multiplication__Group_1__1"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1567:1: rule__Multiplication__Group_1__1 : rule__Multiplication__Group_1__1__Impl ;
+ public final void rule__Multiplication__Group_1__1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1571:1: ( rule__Multiplication__Group_1__1__Impl )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1572:2: rule__Multiplication__Group_1__1__Impl
+ {
+ pushFollow(FOLLOW_rule__Multiplication__Group_1__1__Impl_in_rule__Multiplication__Group_1__13111);
+ rule__Multiplication__Group_1__1__Impl();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Multiplication__Group_1__1"
+
+
+ // $ANTLR start "rule__Multiplication__Group_1__1__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1578:1: rule__Multiplication__Group_1__1__Impl : ( ( rule__Multiplication__RightAssignment_1_1 ) ) ;
+ public final void rule__Multiplication__Group_1__1__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1582:1: ( ( ( rule__Multiplication__RightAssignment_1_1 ) ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1583:1: ( ( rule__Multiplication__RightAssignment_1_1 ) )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1583:1: ( ( rule__Multiplication__RightAssignment_1_1 ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1584:1: ( rule__Multiplication__RightAssignment_1_1 )
+ {
+ before(grammarAccess.getMultiplicationAccess().getRightAssignment_1_1());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1585:1: ( rule__Multiplication__RightAssignment_1_1 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1585:2: rule__Multiplication__RightAssignment_1_1
+ {
+ pushFollow(FOLLOW_rule__Multiplication__RightAssignment_1_1_in_rule__Multiplication__Group_1__1__Impl3138);
+ rule__Multiplication__RightAssignment_1_1();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getMultiplicationAccess().getRightAssignment_1_1());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Multiplication__Group_1__1__Impl"
+
+
+ // $ANTLR start "rule__Multiplication__Group_1_0_0__0"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1599:1: rule__Multiplication__Group_1_0_0__0 : rule__Multiplication__Group_1_0_0__0__Impl rule__Multiplication__Group_1_0_0__1 ;
+ public final void rule__Multiplication__Group_1_0_0__0() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1603:1: ( rule__Multiplication__Group_1_0_0__0__Impl rule__Multiplication__Group_1_0_0__1 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1604:2: rule__Multiplication__Group_1_0_0__0__Impl rule__Multiplication__Group_1_0_0__1
+ {
+ pushFollow(FOLLOW_rule__Multiplication__Group_1_0_0__0__Impl_in_rule__Multiplication__Group_1_0_0__03172);
+ rule__Multiplication__Group_1_0_0__0__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__Multiplication__Group_1_0_0__1_in_rule__Multiplication__Group_1_0_0__03175);
+ rule__Multiplication__Group_1_0_0__1();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Multiplication__Group_1_0_0__0"
+
+
+ // $ANTLR start "rule__Multiplication__Group_1_0_0__0__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1611:1: rule__Multiplication__Group_1_0_0__0__Impl : ( () ) ;
+ public final void rule__Multiplication__Group_1_0_0__0__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1615:1: ( ( () ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1616:1: ( () )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1616:1: ( () )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1617:1: ()
+ {
+ before(grammarAccess.getMultiplicationAccess().getMultiLeftAction_1_0_0_0());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1618:1: ()
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1620:1:
+ {
+ }
+
+ after(grammarAccess.getMultiplicationAccess().getMultiLeftAction_1_0_0_0());
+
+ }
+
+
+ }
+
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Multiplication__Group_1_0_0__0__Impl"
+
+
+ // $ANTLR start "rule__Multiplication__Group_1_0_0__1"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1630:1: rule__Multiplication__Group_1_0_0__1 : rule__Multiplication__Group_1_0_0__1__Impl ;
+ public final void rule__Multiplication__Group_1_0_0__1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1634:1: ( rule__Multiplication__Group_1_0_0__1__Impl )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1635:2: rule__Multiplication__Group_1_0_0__1__Impl
+ {
+ pushFollow(FOLLOW_rule__Multiplication__Group_1_0_0__1__Impl_in_rule__Multiplication__Group_1_0_0__13233);
+ rule__Multiplication__Group_1_0_0__1__Impl();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Multiplication__Group_1_0_0__1"
+
+
+ // $ANTLR start "rule__Multiplication__Group_1_0_0__1__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1641:1: rule__Multiplication__Group_1_0_0__1__Impl : ( '*' ) ;
+ public final void rule__Multiplication__Group_1_0_0__1__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1645:1: ( ( '*' ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1646:1: ( '*' )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1646:1: ( '*' )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1647:1: '*'
+ {
+ before(grammarAccess.getMultiplicationAccess().getAsteriskKeyword_1_0_0_1());
+ match(input,15,FOLLOW_15_in_rule__Multiplication__Group_1_0_0__1__Impl3261);
+ after(grammarAccess.getMultiplicationAccess().getAsteriskKeyword_1_0_0_1());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Multiplication__Group_1_0_0__1__Impl"
+
+
+ // $ANTLR start "rule__Multiplication__Group_1_0_1__0"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1664:1: rule__Multiplication__Group_1_0_1__0 : rule__Multiplication__Group_1_0_1__0__Impl rule__Multiplication__Group_1_0_1__1 ;
+ public final void rule__Multiplication__Group_1_0_1__0() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1668:1: ( rule__Multiplication__Group_1_0_1__0__Impl rule__Multiplication__Group_1_0_1__1 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1669:2: rule__Multiplication__Group_1_0_1__0__Impl rule__Multiplication__Group_1_0_1__1
+ {
+ pushFollow(FOLLOW_rule__Multiplication__Group_1_0_1__0__Impl_in_rule__Multiplication__Group_1_0_1__03296);
+ rule__Multiplication__Group_1_0_1__0__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__Multiplication__Group_1_0_1__1_in_rule__Multiplication__Group_1_0_1__03299);
+ rule__Multiplication__Group_1_0_1__1();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Multiplication__Group_1_0_1__0"
+
+
+ // $ANTLR start "rule__Multiplication__Group_1_0_1__0__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1676:1: rule__Multiplication__Group_1_0_1__0__Impl : ( () ) ;
+ public final void rule__Multiplication__Group_1_0_1__0__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1680:1: ( ( () ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1681:1: ( () )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1681:1: ( () )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1682:1: ()
+ {
+ before(grammarAccess.getMultiplicationAccess().getDivLeftAction_1_0_1_0());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1683:1: ()
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1685:1:
+ {
+ }
+
+ after(grammarAccess.getMultiplicationAccess().getDivLeftAction_1_0_1_0());
+
+ }
+
+
+ }
+
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Multiplication__Group_1_0_1__0__Impl"
+
+
+ // $ANTLR start "rule__Multiplication__Group_1_0_1__1"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1695:1: rule__Multiplication__Group_1_0_1__1 : rule__Multiplication__Group_1_0_1__1__Impl ;
+ public final void rule__Multiplication__Group_1_0_1__1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1699:1: ( rule__Multiplication__Group_1_0_1__1__Impl )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1700:2: rule__Multiplication__Group_1_0_1__1__Impl
+ {
+ pushFollow(FOLLOW_rule__Multiplication__Group_1_0_1__1__Impl_in_rule__Multiplication__Group_1_0_1__13357);
+ rule__Multiplication__Group_1_0_1__1__Impl();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Multiplication__Group_1_0_1__1"
+
+
+ // $ANTLR start "rule__Multiplication__Group_1_0_1__1__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1706:1: rule__Multiplication__Group_1_0_1__1__Impl : ( '/' ) ;
+ public final void rule__Multiplication__Group_1_0_1__1__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1710:1: ( ( '/' ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1711:1: ( '/' )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1711:1: ( '/' )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1712:1: '/'
+ {
+ before(grammarAccess.getMultiplicationAccess().getSolidusKeyword_1_0_1_1());
+ match(input,24,FOLLOW_24_in_rule__Multiplication__Group_1_0_1__1__Impl3385);
+ after(grammarAccess.getMultiplicationAccess().getSolidusKeyword_1_0_1_1());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Multiplication__Group_1_0_1__1__Impl"
+
+
+ // $ANTLR start "rule__PrimaryExpression__Group_0__0"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1729:1: rule__PrimaryExpression__Group_0__0 : rule__PrimaryExpression__Group_0__0__Impl rule__PrimaryExpression__Group_0__1 ;
+ public final void rule__PrimaryExpression__Group_0__0() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1733:1: ( rule__PrimaryExpression__Group_0__0__Impl rule__PrimaryExpression__Group_0__1 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1734:2: rule__PrimaryExpression__Group_0__0__Impl rule__PrimaryExpression__Group_0__1
+ {
+ pushFollow(FOLLOW_rule__PrimaryExpression__Group_0__0__Impl_in_rule__PrimaryExpression__Group_0__03420);
+ rule__PrimaryExpression__Group_0__0__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__PrimaryExpression__Group_0__1_in_rule__PrimaryExpression__Group_0__03423);
+ rule__PrimaryExpression__Group_0__1();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__PrimaryExpression__Group_0__0"
+
+
+ // $ANTLR start "rule__PrimaryExpression__Group_0__0__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1741:1: rule__PrimaryExpression__Group_0__0__Impl : ( '(' ) ;
+ public final void rule__PrimaryExpression__Group_0__0__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1745:1: ( ( '(' ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1746:1: ( '(' )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1746:1: ( '(' )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1747:1: '('
+ {
+ before(grammarAccess.getPrimaryExpressionAccess().getLeftParenthesisKeyword_0_0());
+ match(input,19,FOLLOW_19_in_rule__PrimaryExpression__Group_0__0__Impl3451);
+ after(grammarAccess.getPrimaryExpressionAccess().getLeftParenthesisKeyword_0_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__PrimaryExpression__Group_0__0__Impl"
+
+
+ // $ANTLR start "rule__PrimaryExpression__Group_0__1"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1760:1: rule__PrimaryExpression__Group_0__1 : rule__PrimaryExpression__Group_0__1__Impl rule__PrimaryExpression__Group_0__2 ;
+ public final void rule__PrimaryExpression__Group_0__1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1764:1: ( rule__PrimaryExpression__Group_0__1__Impl rule__PrimaryExpression__Group_0__2 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1765:2: rule__PrimaryExpression__Group_0__1__Impl rule__PrimaryExpression__Group_0__2
+ {
+ pushFollow(FOLLOW_rule__PrimaryExpression__Group_0__1__Impl_in_rule__PrimaryExpression__Group_0__13482);
+ rule__PrimaryExpression__Group_0__1__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__PrimaryExpression__Group_0__2_in_rule__PrimaryExpression__Group_0__13485);
+ rule__PrimaryExpression__Group_0__2();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__PrimaryExpression__Group_0__1"
+
+
+ // $ANTLR start "rule__PrimaryExpression__Group_0__1__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1772:1: rule__PrimaryExpression__Group_0__1__Impl : ( ruleExpression ) ;
+ public final void rule__PrimaryExpression__Group_0__1__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1776:1: ( ( ruleExpression ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1777:1: ( ruleExpression )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1777:1: ( ruleExpression )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1778:1: ruleExpression
+ {
+ before(grammarAccess.getPrimaryExpressionAccess().getExpressionParserRuleCall_0_1());
+ pushFollow(FOLLOW_ruleExpression_in_rule__PrimaryExpression__Group_0__1__Impl3512);
+ ruleExpression();
+
+ state._fsp--;
+
+ after(grammarAccess.getPrimaryExpressionAccess().getExpressionParserRuleCall_0_1());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__PrimaryExpression__Group_0__1__Impl"
+
+
+ // $ANTLR start "rule__PrimaryExpression__Group_0__2"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1789:1: rule__PrimaryExpression__Group_0__2 : rule__PrimaryExpression__Group_0__2__Impl ;
+ public final void rule__PrimaryExpression__Group_0__2() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1793:1: ( rule__PrimaryExpression__Group_0__2__Impl )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1794:2: rule__PrimaryExpression__Group_0__2__Impl
+ {
+ pushFollow(FOLLOW_rule__PrimaryExpression__Group_0__2__Impl_in_rule__PrimaryExpression__Group_0__23541);
+ rule__PrimaryExpression__Group_0__2__Impl();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__PrimaryExpression__Group_0__2"
+
+
+ // $ANTLR start "rule__PrimaryExpression__Group_0__2__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1800:1: rule__PrimaryExpression__Group_0__2__Impl : ( ')' ) ;
+ public final void rule__PrimaryExpression__Group_0__2__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1804:1: ( ( ')' ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1805:1: ( ')' )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1805:1: ( ')' )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1806:1: ')'
+ {
+ before(grammarAccess.getPrimaryExpressionAccess().getRightParenthesisKeyword_0_2());
+ match(input,20,FOLLOW_20_in_rule__PrimaryExpression__Group_0__2__Impl3569);
+ after(grammarAccess.getPrimaryExpressionAccess().getRightParenthesisKeyword_0_2());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__PrimaryExpression__Group_0__2__Impl"
+
+
+ // $ANTLR start "rule__PrimaryExpression__Group_1__0"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1825:1: rule__PrimaryExpression__Group_1__0 : rule__PrimaryExpression__Group_1__0__Impl rule__PrimaryExpression__Group_1__1 ;
+ public final void rule__PrimaryExpression__Group_1__0() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1829:1: ( rule__PrimaryExpression__Group_1__0__Impl rule__PrimaryExpression__Group_1__1 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1830:2: rule__PrimaryExpression__Group_1__0__Impl rule__PrimaryExpression__Group_1__1
+ {
+ pushFollow(FOLLOW_rule__PrimaryExpression__Group_1__0__Impl_in_rule__PrimaryExpression__Group_1__03606);
+ rule__PrimaryExpression__Group_1__0__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__PrimaryExpression__Group_1__1_in_rule__PrimaryExpression__Group_1__03609);
+ rule__PrimaryExpression__Group_1__1();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__PrimaryExpression__Group_1__0"
+
+
+ // $ANTLR start "rule__PrimaryExpression__Group_1__0__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1837:1: rule__PrimaryExpression__Group_1__0__Impl : ( () ) ;
+ public final void rule__PrimaryExpression__Group_1__0__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1841:1: ( ( () ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1842:1: ( () )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1842:1: ( () )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1843:1: ()
+ {
+ before(grammarAccess.getPrimaryExpressionAccess().getNumberLiteralAction_1_0());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1844:1: ()
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1846:1:
+ {
+ }
+
+ after(grammarAccess.getPrimaryExpressionAccess().getNumberLiteralAction_1_0());
+
+ }
+
+
+ }
+
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__PrimaryExpression__Group_1__0__Impl"
+
+
+ // $ANTLR start "rule__PrimaryExpression__Group_1__1"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1856:1: rule__PrimaryExpression__Group_1__1 : rule__PrimaryExpression__Group_1__1__Impl ;
+ public final void rule__PrimaryExpression__Group_1__1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1860:1: ( rule__PrimaryExpression__Group_1__1__Impl )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1861:2: rule__PrimaryExpression__Group_1__1__Impl
+ {
+ pushFollow(FOLLOW_rule__PrimaryExpression__Group_1__1__Impl_in_rule__PrimaryExpression__Group_1__13667);
+ rule__PrimaryExpression__Group_1__1__Impl();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__PrimaryExpression__Group_1__1"
+
+
+ // $ANTLR start "rule__PrimaryExpression__Group_1__1__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1867:1: rule__PrimaryExpression__Group_1__1__Impl : ( ( rule__PrimaryExpression__ValueAssignment_1_1 ) ) ;
+ public final void rule__PrimaryExpression__Group_1__1__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1871:1: ( ( ( rule__PrimaryExpression__ValueAssignment_1_1 ) ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1872:1: ( ( rule__PrimaryExpression__ValueAssignment_1_1 ) )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1872:1: ( ( rule__PrimaryExpression__ValueAssignment_1_1 ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1873:1: ( rule__PrimaryExpression__ValueAssignment_1_1 )
+ {
+ before(grammarAccess.getPrimaryExpressionAccess().getValueAssignment_1_1());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1874:1: ( rule__PrimaryExpression__ValueAssignment_1_1 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1874:2: rule__PrimaryExpression__ValueAssignment_1_1
+ {
+ pushFollow(FOLLOW_rule__PrimaryExpression__ValueAssignment_1_1_in_rule__PrimaryExpression__Group_1__1__Impl3694);
+ rule__PrimaryExpression__ValueAssignment_1_1();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getPrimaryExpressionAccess().getValueAssignment_1_1());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__PrimaryExpression__Group_1__1__Impl"
+
+
+ // $ANTLR start "rule__PrimaryExpression__Group_2__0"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1888:1: rule__PrimaryExpression__Group_2__0 : rule__PrimaryExpression__Group_2__0__Impl rule__PrimaryExpression__Group_2__1 ;
+ public final void rule__PrimaryExpression__Group_2__0() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1892:1: ( rule__PrimaryExpression__Group_2__0__Impl rule__PrimaryExpression__Group_2__1 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1893:2: rule__PrimaryExpression__Group_2__0__Impl rule__PrimaryExpression__Group_2__1
+ {
+ pushFollow(FOLLOW_rule__PrimaryExpression__Group_2__0__Impl_in_rule__PrimaryExpression__Group_2__03728);
+ rule__PrimaryExpression__Group_2__0__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__PrimaryExpression__Group_2__1_in_rule__PrimaryExpression__Group_2__03731);
+ rule__PrimaryExpression__Group_2__1();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__PrimaryExpression__Group_2__0"
+
+
+ // $ANTLR start "rule__PrimaryExpression__Group_2__0__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1900:1: rule__PrimaryExpression__Group_2__0__Impl : ( () ) ;
+ public final void rule__PrimaryExpression__Group_2__0__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1904:1: ( ( () ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1905:1: ( () )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1905:1: ( () )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1906:1: ()
+ {
+ before(grammarAccess.getPrimaryExpressionAccess().getFunctionCallAction_2_0());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1907:1: ()
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1909:1:
+ {
+ }
+
+ after(grammarAccess.getPrimaryExpressionAccess().getFunctionCallAction_2_0());
+
+ }
+
+
+ }
+
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__PrimaryExpression__Group_2__0__Impl"
+
+
+ // $ANTLR start "rule__PrimaryExpression__Group_2__1"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1919:1: rule__PrimaryExpression__Group_2__1 : rule__PrimaryExpression__Group_2__1__Impl rule__PrimaryExpression__Group_2__2 ;
+ public final void rule__PrimaryExpression__Group_2__1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1923:1: ( rule__PrimaryExpression__Group_2__1__Impl rule__PrimaryExpression__Group_2__2 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1924:2: rule__PrimaryExpression__Group_2__1__Impl rule__PrimaryExpression__Group_2__2
+ {
+ pushFollow(FOLLOW_rule__PrimaryExpression__Group_2__1__Impl_in_rule__PrimaryExpression__Group_2__13789);
+ rule__PrimaryExpression__Group_2__1__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__PrimaryExpression__Group_2__2_in_rule__PrimaryExpression__Group_2__13792);
+ rule__PrimaryExpression__Group_2__2();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__PrimaryExpression__Group_2__1"
+
+
+ // $ANTLR start "rule__PrimaryExpression__Group_2__1__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1931:1: rule__PrimaryExpression__Group_2__1__Impl : ( ( rule__PrimaryExpression__FuncAssignment_2_1 ) ) ;
+ public final void rule__PrimaryExpression__Group_2__1__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1935:1: ( ( ( rule__PrimaryExpression__FuncAssignment_2_1 ) ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1936:1: ( ( rule__PrimaryExpression__FuncAssignment_2_1 ) )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1936:1: ( ( rule__PrimaryExpression__FuncAssignment_2_1 ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1937:1: ( rule__PrimaryExpression__FuncAssignment_2_1 )
+ {
+ before(grammarAccess.getPrimaryExpressionAccess().getFuncAssignment_2_1());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1938:1: ( rule__PrimaryExpression__FuncAssignment_2_1 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1938:2: rule__PrimaryExpression__FuncAssignment_2_1
+ {
+ pushFollow(FOLLOW_rule__PrimaryExpression__FuncAssignment_2_1_in_rule__PrimaryExpression__Group_2__1__Impl3819);
+ rule__PrimaryExpression__FuncAssignment_2_1();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getPrimaryExpressionAccess().getFuncAssignment_2_1());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__PrimaryExpression__Group_2__1__Impl"
+
+
+ // $ANTLR start "rule__PrimaryExpression__Group_2__2"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1948:1: rule__PrimaryExpression__Group_2__2 : rule__PrimaryExpression__Group_2__2__Impl ;
+ public final void rule__PrimaryExpression__Group_2__2() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1952:1: ( rule__PrimaryExpression__Group_2__2__Impl )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1953:2: rule__PrimaryExpression__Group_2__2__Impl
+ {
+ pushFollow(FOLLOW_rule__PrimaryExpression__Group_2__2__Impl_in_rule__PrimaryExpression__Group_2__23849);
+ rule__PrimaryExpression__Group_2__2__Impl();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__PrimaryExpression__Group_2__2"
+
+
+ // $ANTLR start "rule__PrimaryExpression__Group_2__2__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1959:1: rule__PrimaryExpression__Group_2__2__Impl : ( ( rule__PrimaryExpression__Group_2_2__0 )? ) ;
+ public final void rule__PrimaryExpression__Group_2__2__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1963:1: ( ( ( rule__PrimaryExpression__Group_2_2__0 )? ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1964:1: ( ( rule__PrimaryExpression__Group_2_2__0 )? )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1964:1: ( ( rule__PrimaryExpression__Group_2_2__0 )? )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1965:1: ( rule__PrimaryExpression__Group_2_2__0 )?
+ {
+ before(grammarAccess.getPrimaryExpressionAccess().getGroup_2_2());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1966:1: ( rule__PrimaryExpression__Group_2_2__0 )?
+ int alt12=2;
+ int LA12_0 = input.LA(1);
+
+ if ( (LA12_0==19) ) {
+ alt12=1;
+ }
+ switch (alt12) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1966:2: rule__PrimaryExpression__Group_2_2__0
+ {
+ pushFollow(FOLLOW_rule__PrimaryExpression__Group_2_2__0_in_rule__PrimaryExpression__Group_2__2__Impl3876);
+ rule__PrimaryExpression__Group_2_2__0();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ }
+
+ after(grammarAccess.getPrimaryExpressionAccess().getGroup_2_2());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__PrimaryExpression__Group_2__2__Impl"
+
+
+ // $ANTLR start "rule__PrimaryExpression__Group_2_2__0"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1982:1: rule__PrimaryExpression__Group_2_2__0 : rule__PrimaryExpression__Group_2_2__0__Impl rule__PrimaryExpression__Group_2_2__1 ;
+ public final void rule__PrimaryExpression__Group_2_2__0() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1986:1: ( rule__PrimaryExpression__Group_2_2__0__Impl rule__PrimaryExpression__Group_2_2__1 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1987:2: rule__PrimaryExpression__Group_2_2__0__Impl rule__PrimaryExpression__Group_2_2__1
+ {
+ pushFollow(FOLLOW_rule__PrimaryExpression__Group_2_2__0__Impl_in_rule__PrimaryExpression__Group_2_2__03913);
+ rule__PrimaryExpression__Group_2_2__0__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__PrimaryExpression__Group_2_2__1_in_rule__PrimaryExpression__Group_2_2__03916);
+ rule__PrimaryExpression__Group_2_2__1();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__PrimaryExpression__Group_2_2__0"
+
+
+ // $ANTLR start "rule__PrimaryExpression__Group_2_2__0__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1994:1: rule__PrimaryExpression__Group_2_2__0__Impl : ( '(' ) ;
+ public final void rule__PrimaryExpression__Group_2_2__0__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1998:1: ( ( '(' ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1999:1: ( '(' )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:1999:1: ( '(' )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2000:1: '('
+ {
+ before(grammarAccess.getPrimaryExpressionAccess().getLeftParenthesisKeyword_2_2_0());
+ match(input,19,FOLLOW_19_in_rule__PrimaryExpression__Group_2_2__0__Impl3944);
+ after(grammarAccess.getPrimaryExpressionAccess().getLeftParenthesisKeyword_2_2_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__PrimaryExpression__Group_2_2__0__Impl"
+
+
+ // $ANTLR start "rule__PrimaryExpression__Group_2_2__1"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2013:1: rule__PrimaryExpression__Group_2_2__1 : rule__PrimaryExpression__Group_2_2__1__Impl rule__PrimaryExpression__Group_2_2__2 ;
+ public final void rule__PrimaryExpression__Group_2_2__1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2017:1: ( rule__PrimaryExpression__Group_2_2__1__Impl rule__PrimaryExpression__Group_2_2__2 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2018:2: rule__PrimaryExpression__Group_2_2__1__Impl rule__PrimaryExpression__Group_2_2__2
+ {
+ pushFollow(FOLLOW_rule__PrimaryExpression__Group_2_2__1__Impl_in_rule__PrimaryExpression__Group_2_2__13975);
+ rule__PrimaryExpression__Group_2_2__1__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__PrimaryExpression__Group_2_2__2_in_rule__PrimaryExpression__Group_2_2__13978);
+ rule__PrimaryExpression__Group_2_2__2();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__PrimaryExpression__Group_2_2__1"
+
+
+ // $ANTLR start "rule__PrimaryExpression__Group_2_2__1__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2025:1: rule__PrimaryExpression__Group_2_2__1__Impl : ( ( rule__PrimaryExpression__ArgsAssignment_2_2_1 ) ) ;
+ public final void rule__PrimaryExpression__Group_2_2__1__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2029:1: ( ( ( rule__PrimaryExpression__ArgsAssignment_2_2_1 ) ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2030:1: ( ( rule__PrimaryExpression__ArgsAssignment_2_2_1 ) )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2030:1: ( ( rule__PrimaryExpression__ArgsAssignment_2_2_1 ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2031:1: ( rule__PrimaryExpression__ArgsAssignment_2_2_1 )
+ {
+ before(grammarAccess.getPrimaryExpressionAccess().getArgsAssignment_2_2_1());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2032:1: ( rule__PrimaryExpression__ArgsAssignment_2_2_1 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2032:2: rule__PrimaryExpression__ArgsAssignment_2_2_1
+ {
+ pushFollow(FOLLOW_rule__PrimaryExpression__ArgsAssignment_2_2_1_in_rule__PrimaryExpression__Group_2_2__1__Impl4005);
+ rule__PrimaryExpression__ArgsAssignment_2_2_1();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getPrimaryExpressionAccess().getArgsAssignment_2_2_1());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__PrimaryExpression__Group_2_2__1__Impl"
+
+
+ // $ANTLR start "rule__PrimaryExpression__Group_2_2__2"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2042:1: rule__PrimaryExpression__Group_2_2__2 : rule__PrimaryExpression__Group_2_2__2__Impl rule__PrimaryExpression__Group_2_2__3 ;
+ public final void rule__PrimaryExpression__Group_2_2__2() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2046:1: ( rule__PrimaryExpression__Group_2_2__2__Impl rule__PrimaryExpression__Group_2_2__3 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2047:2: rule__PrimaryExpression__Group_2_2__2__Impl rule__PrimaryExpression__Group_2_2__3
+ {
+ pushFollow(FOLLOW_rule__PrimaryExpression__Group_2_2__2__Impl_in_rule__PrimaryExpression__Group_2_2__24035);
+ rule__PrimaryExpression__Group_2_2__2__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__PrimaryExpression__Group_2_2__3_in_rule__PrimaryExpression__Group_2_2__24038);
+ rule__PrimaryExpression__Group_2_2__3();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__PrimaryExpression__Group_2_2__2"
+
+
+ // $ANTLR start "rule__PrimaryExpression__Group_2_2__2__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2054:1: rule__PrimaryExpression__Group_2_2__2__Impl : ( ( rule__PrimaryExpression__Group_2_2_2__0 )* ) ;
+ public final void rule__PrimaryExpression__Group_2_2__2__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2058:1: ( ( ( rule__PrimaryExpression__Group_2_2_2__0 )* ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2059:1: ( ( rule__PrimaryExpression__Group_2_2_2__0 )* )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2059:1: ( ( rule__PrimaryExpression__Group_2_2_2__0 )* )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2060:1: ( rule__PrimaryExpression__Group_2_2_2__0 )*
+ {
+ before(grammarAccess.getPrimaryExpressionAccess().getGroup_2_2_2());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2061:1: ( rule__PrimaryExpression__Group_2_2_2__0 )*
+ loop13:
+ do {
+ int alt13=2;
+ int LA13_0 = input.LA(1);
+
+ if ( (LA13_0==21) ) {
+ alt13=1;
+ }
+
+
+ switch (alt13) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2061:2: rule__PrimaryExpression__Group_2_2_2__0
+ {
+ pushFollow(FOLLOW_rule__PrimaryExpression__Group_2_2_2__0_in_rule__PrimaryExpression__Group_2_2__2__Impl4065);
+ rule__PrimaryExpression__Group_2_2_2__0();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ default :
+ break loop13;
+ }
+ } while (true);
+
+ after(grammarAccess.getPrimaryExpressionAccess().getGroup_2_2_2());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__PrimaryExpression__Group_2_2__2__Impl"
+
+
+ // $ANTLR start "rule__PrimaryExpression__Group_2_2__3"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2071:1: rule__PrimaryExpression__Group_2_2__3 : rule__PrimaryExpression__Group_2_2__3__Impl ;
+ public final void rule__PrimaryExpression__Group_2_2__3() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2075:1: ( rule__PrimaryExpression__Group_2_2__3__Impl )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2076:2: rule__PrimaryExpression__Group_2_2__3__Impl
+ {
+ pushFollow(FOLLOW_rule__PrimaryExpression__Group_2_2__3__Impl_in_rule__PrimaryExpression__Group_2_2__34096);
+ rule__PrimaryExpression__Group_2_2__3__Impl();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__PrimaryExpression__Group_2_2__3"
+
+
+ // $ANTLR start "rule__PrimaryExpression__Group_2_2__3__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2082:1: rule__PrimaryExpression__Group_2_2__3__Impl : ( ')' ) ;
+ public final void rule__PrimaryExpression__Group_2_2__3__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2086:1: ( ( ')' ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2087:1: ( ')' )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2087:1: ( ')' )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2088:1: ')'
+ {
+ before(grammarAccess.getPrimaryExpressionAccess().getRightParenthesisKeyword_2_2_3());
+ match(input,20,FOLLOW_20_in_rule__PrimaryExpression__Group_2_2__3__Impl4124);
+ after(grammarAccess.getPrimaryExpressionAccess().getRightParenthesisKeyword_2_2_3());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__PrimaryExpression__Group_2_2__3__Impl"
+
+
+ // $ANTLR start "rule__PrimaryExpression__Group_2_2_2__0"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2109:1: rule__PrimaryExpression__Group_2_2_2__0 : rule__PrimaryExpression__Group_2_2_2__0__Impl rule__PrimaryExpression__Group_2_2_2__1 ;
+ public final void rule__PrimaryExpression__Group_2_2_2__0() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2113:1: ( rule__PrimaryExpression__Group_2_2_2__0__Impl rule__PrimaryExpression__Group_2_2_2__1 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2114:2: rule__PrimaryExpression__Group_2_2_2__0__Impl rule__PrimaryExpression__Group_2_2_2__1
+ {
+ pushFollow(FOLLOW_rule__PrimaryExpression__Group_2_2_2__0__Impl_in_rule__PrimaryExpression__Group_2_2_2__04163);
+ rule__PrimaryExpression__Group_2_2_2__0__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__PrimaryExpression__Group_2_2_2__1_in_rule__PrimaryExpression__Group_2_2_2__04166);
+ rule__PrimaryExpression__Group_2_2_2__1();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__PrimaryExpression__Group_2_2_2__0"
+
+
+ // $ANTLR start "rule__PrimaryExpression__Group_2_2_2__0__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2121:1: rule__PrimaryExpression__Group_2_2_2__0__Impl : ( ',' ) ;
+ public final void rule__PrimaryExpression__Group_2_2_2__0__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2125:1: ( ( ',' ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2126:1: ( ',' )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2126:1: ( ',' )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2127:1: ','
+ {
+ before(grammarAccess.getPrimaryExpressionAccess().getCommaKeyword_2_2_2_0());
+ match(input,21,FOLLOW_21_in_rule__PrimaryExpression__Group_2_2_2__0__Impl4194);
+ after(grammarAccess.getPrimaryExpressionAccess().getCommaKeyword_2_2_2_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__PrimaryExpression__Group_2_2_2__0__Impl"
+
+
+ // $ANTLR start "rule__PrimaryExpression__Group_2_2_2__1"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2140:1: rule__PrimaryExpression__Group_2_2_2__1 : rule__PrimaryExpression__Group_2_2_2__1__Impl ;
+ public final void rule__PrimaryExpression__Group_2_2_2__1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2144:1: ( rule__PrimaryExpression__Group_2_2_2__1__Impl )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2145:2: rule__PrimaryExpression__Group_2_2_2__1__Impl
+ {
+ pushFollow(FOLLOW_rule__PrimaryExpression__Group_2_2_2__1__Impl_in_rule__PrimaryExpression__Group_2_2_2__14225);
+ rule__PrimaryExpression__Group_2_2_2__1__Impl();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__PrimaryExpression__Group_2_2_2__1"
+
+
+ // $ANTLR start "rule__PrimaryExpression__Group_2_2_2__1__Impl"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2151:1: rule__PrimaryExpression__Group_2_2_2__1__Impl : ( ( rule__PrimaryExpression__ArgsAssignment_2_2_2_1 ) ) ;
+ public final void rule__PrimaryExpression__Group_2_2_2__1__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2155:1: ( ( ( rule__PrimaryExpression__ArgsAssignment_2_2_2_1 ) ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2156:1: ( ( rule__PrimaryExpression__ArgsAssignment_2_2_2_1 ) )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2156:1: ( ( rule__PrimaryExpression__ArgsAssignment_2_2_2_1 ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2157:1: ( rule__PrimaryExpression__ArgsAssignment_2_2_2_1 )
+ {
+ before(grammarAccess.getPrimaryExpressionAccess().getArgsAssignment_2_2_2_1());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2158:1: ( rule__PrimaryExpression__ArgsAssignment_2_2_2_1 )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2158:2: rule__PrimaryExpression__ArgsAssignment_2_2_2_1
+ {
+ pushFollow(FOLLOW_rule__PrimaryExpression__ArgsAssignment_2_2_2_1_in_rule__PrimaryExpression__Group_2_2_2__1__Impl4252);
+ rule__PrimaryExpression__ArgsAssignment_2_2_2_1();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getPrimaryExpressionAccess().getArgsAssignment_2_2_2_1());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__PrimaryExpression__Group_2_2_2__1__Impl"
+
+
+ // $ANTLR start "rule__Module__NameAssignment_1"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2173:1: rule__Module__NameAssignment_1 : ( RULE_ID ) ;
+ public final void rule__Module__NameAssignment_1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2177:1: ( ( RULE_ID ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2178:1: ( RULE_ID )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2178:1: ( RULE_ID )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2179:1: RULE_ID
+ {
+ before(grammarAccess.getModuleAccess().getNameIDTerminalRuleCall_1_0());
+ match(input,RULE_ID,FOLLOW_RULE_ID_in_rule__Module__NameAssignment_14291);
+ after(grammarAccess.getModuleAccess().getNameIDTerminalRuleCall_1_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Module__NameAssignment_1"
+
+
+ // $ANTLR start "rule__Module__ImportsAssignment_2"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2188:1: rule__Module__ImportsAssignment_2 : ( ruleImport ) ;
+ public final void rule__Module__ImportsAssignment_2() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2192:1: ( ( ruleImport ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2193:1: ( ruleImport )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2193:1: ( ruleImport )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2194:1: ruleImport
+ {
+ before(grammarAccess.getModuleAccess().getImportsImportParserRuleCall_2_0());
+ pushFollow(FOLLOW_ruleImport_in_rule__Module__ImportsAssignment_24322);
+ ruleImport();
+
+ state._fsp--;
+
+ after(grammarAccess.getModuleAccess().getImportsImportParserRuleCall_2_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Module__ImportsAssignment_2"
+
+
+ // $ANTLR start "rule__Module__StatementsAssignment_3"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2203:1: rule__Module__StatementsAssignment_3 : ( ruleStatement ) ;
+ public final void rule__Module__StatementsAssignment_3() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2207:1: ( ( ruleStatement ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2208:1: ( ruleStatement )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2208:1: ( ruleStatement )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2209:1: ruleStatement
+ {
+ before(grammarAccess.getModuleAccess().getStatementsStatementParserRuleCall_3_0());
+ pushFollow(FOLLOW_ruleStatement_in_rule__Module__StatementsAssignment_34353);
+ ruleStatement();
+
+ state._fsp--;
+
+ after(grammarAccess.getModuleAccess().getStatementsStatementParserRuleCall_3_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Module__StatementsAssignment_3"
+
+
+ // $ANTLR start "rule__Import__ImportedNamespaceAssignment_1"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2218:1: rule__Import__ImportedNamespaceAssignment_1 : ( ruleImportName ) ;
+ public final void rule__Import__ImportedNamespaceAssignment_1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2222:1: ( ( ruleImportName ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2223:1: ( ruleImportName )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2223:1: ( ruleImportName )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2224:1: ruleImportName
+ {
+ before(grammarAccess.getImportAccess().getImportedNamespaceImportNameParserRuleCall_1_0());
+ pushFollow(FOLLOW_ruleImportName_in_rule__Import__ImportedNamespaceAssignment_14384);
+ ruleImportName();
+
+ state._fsp--;
+
+ after(grammarAccess.getImportAccess().getImportedNamespaceImportNameParserRuleCall_1_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Import__ImportedNamespaceAssignment_1"
+
+
+ // $ANTLR start "rule__Definition__NameAssignment_1"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2233:1: rule__Definition__NameAssignment_1 : ( RULE_ID ) ;
+ public final void rule__Definition__NameAssignment_1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2237:1: ( ( RULE_ID ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2238:1: ( RULE_ID )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2238:1: ( RULE_ID )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2239:1: RULE_ID
+ {
+ before(grammarAccess.getDefinitionAccess().getNameIDTerminalRuleCall_1_0());
+ match(input,RULE_ID,FOLLOW_RULE_ID_in_rule__Definition__NameAssignment_14415);
+ after(grammarAccess.getDefinitionAccess().getNameIDTerminalRuleCall_1_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Definition__NameAssignment_1"
+
+
+ // $ANTLR start "rule__Definition__ArgsAssignment_2_1"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2248:1: rule__Definition__ArgsAssignment_2_1 : ( ruleDeclaredParameter ) ;
+ public final void rule__Definition__ArgsAssignment_2_1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2252:1: ( ( ruleDeclaredParameter ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2253:1: ( ruleDeclaredParameter )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2253:1: ( ruleDeclaredParameter )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2254:1: ruleDeclaredParameter
+ {
+ before(grammarAccess.getDefinitionAccess().getArgsDeclaredParameterParserRuleCall_2_1_0());
+ pushFollow(FOLLOW_ruleDeclaredParameter_in_rule__Definition__ArgsAssignment_2_14446);
+ ruleDeclaredParameter();
+
+ state._fsp--;
+
+ after(grammarAccess.getDefinitionAccess().getArgsDeclaredParameterParserRuleCall_2_1_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Definition__ArgsAssignment_2_1"
+
+
+ // $ANTLR start "rule__Definition__ArgsAssignment_2_2_1"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2263:1: rule__Definition__ArgsAssignment_2_2_1 : ( ruleDeclaredParameter ) ;
+ public final void rule__Definition__ArgsAssignment_2_2_1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2267:1: ( ( ruleDeclaredParameter ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2268:1: ( ruleDeclaredParameter )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2268:1: ( ruleDeclaredParameter )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2269:1: ruleDeclaredParameter
+ {
+ before(grammarAccess.getDefinitionAccess().getArgsDeclaredParameterParserRuleCall_2_2_1_0());
+ pushFollow(FOLLOW_ruleDeclaredParameter_in_rule__Definition__ArgsAssignment_2_2_14477);
+ ruleDeclaredParameter();
+
+ state._fsp--;
+
+ after(grammarAccess.getDefinitionAccess().getArgsDeclaredParameterParserRuleCall_2_2_1_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Definition__ArgsAssignment_2_2_1"
+
+
+ // $ANTLR start "rule__Definition__ExprAssignment_4"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2278:1: rule__Definition__ExprAssignment_4 : ( ruleExpression ) ;
+ public final void rule__Definition__ExprAssignment_4() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2282:1: ( ( ruleExpression ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2283:1: ( ruleExpression )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2283:1: ( ruleExpression )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2284:1: ruleExpression
+ {
+ before(grammarAccess.getDefinitionAccess().getExprExpressionParserRuleCall_4_0());
+ pushFollow(FOLLOW_ruleExpression_in_rule__Definition__ExprAssignment_44508);
+ ruleExpression();
+
+ state._fsp--;
+
+ after(grammarAccess.getDefinitionAccess().getExprExpressionParserRuleCall_4_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Definition__ExprAssignment_4"
+
+
+ // $ANTLR start "rule__DeclaredParameter__NameAssignment"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2293:1: rule__DeclaredParameter__NameAssignment : ( RULE_ID ) ;
+ public final void rule__DeclaredParameter__NameAssignment() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2297:1: ( ( RULE_ID ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2298:1: ( RULE_ID )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2298:1: ( RULE_ID )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2299:1: RULE_ID
+ {
+ before(grammarAccess.getDeclaredParameterAccess().getNameIDTerminalRuleCall_0());
+ match(input,RULE_ID,FOLLOW_RULE_ID_in_rule__DeclaredParameter__NameAssignment4539);
+ after(grammarAccess.getDeclaredParameterAccess().getNameIDTerminalRuleCall_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__DeclaredParameter__NameAssignment"
+
+
+ // $ANTLR start "rule__Evaluation__ExpressionAssignment_0"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2308:1: rule__Evaluation__ExpressionAssignment_0 : ( ruleExpression ) ;
+ public final void rule__Evaluation__ExpressionAssignment_0() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2312:1: ( ( ruleExpression ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2313:1: ( ruleExpression )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2313:1: ( ruleExpression )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2314:1: ruleExpression
+ {
+ before(grammarAccess.getEvaluationAccess().getExpressionExpressionParserRuleCall_0_0());
+ pushFollow(FOLLOW_ruleExpression_in_rule__Evaluation__ExpressionAssignment_04570);
+ ruleExpression();
+
+ state._fsp--;
+
+ after(grammarAccess.getEvaluationAccess().getExpressionExpressionParserRuleCall_0_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Evaluation__ExpressionAssignment_0"
+
+
+ // $ANTLR start "rule__Addition__RightAssignment_1_1"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2323:1: rule__Addition__RightAssignment_1_1 : ( ruleMultiplication ) ;
+ public final void rule__Addition__RightAssignment_1_1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2327:1: ( ( ruleMultiplication ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2328:1: ( ruleMultiplication )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2328:1: ( ruleMultiplication )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2329:1: ruleMultiplication
+ {
+ before(grammarAccess.getAdditionAccess().getRightMultiplicationParserRuleCall_1_1_0());
+ pushFollow(FOLLOW_ruleMultiplication_in_rule__Addition__RightAssignment_1_14601);
+ ruleMultiplication();
+
+ state._fsp--;
+
+ after(grammarAccess.getAdditionAccess().getRightMultiplicationParserRuleCall_1_1_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Addition__RightAssignment_1_1"
+
+
+ // $ANTLR start "rule__Multiplication__RightAssignment_1_1"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2338:1: rule__Multiplication__RightAssignment_1_1 : ( rulePrimaryExpression ) ;
+ public final void rule__Multiplication__RightAssignment_1_1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2342:1: ( ( rulePrimaryExpression ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2343:1: ( rulePrimaryExpression )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2343:1: ( rulePrimaryExpression )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2344:1: rulePrimaryExpression
+ {
+ before(grammarAccess.getMultiplicationAccess().getRightPrimaryExpressionParserRuleCall_1_1_0());
+ pushFollow(FOLLOW_rulePrimaryExpression_in_rule__Multiplication__RightAssignment_1_14632);
+ rulePrimaryExpression();
+
+ state._fsp--;
+
+ after(grammarAccess.getMultiplicationAccess().getRightPrimaryExpressionParserRuleCall_1_1_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Multiplication__RightAssignment_1_1"
+
+
+ // $ANTLR start "rule__PrimaryExpression__ValueAssignment_1_1"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2353:1: rule__PrimaryExpression__ValueAssignment_1_1 : ( RULE_NUMBER ) ;
+ public final void rule__PrimaryExpression__ValueAssignment_1_1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2357:1: ( ( RULE_NUMBER ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2358:1: ( RULE_NUMBER )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2358:1: ( RULE_NUMBER )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2359:1: RULE_NUMBER
+ {
+ before(grammarAccess.getPrimaryExpressionAccess().getValueNUMBERTerminalRuleCall_1_1_0());
+ match(input,RULE_NUMBER,FOLLOW_RULE_NUMBER_in_rule__PrimaryExpression__ValueAssignment_1_14663);
+ after(grammarAccess.getPrimaryExpressionAccess().getValueNUMBERTerminalRuleCall_1_1_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__PrimaryExpression__ValueAssignment_1_1"
+
+
+ // $ANTLR start "rule__PrimaryExpression__FuncAssignment_2_1"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2368:1: rule__PrimaryExpression__FuncAssignment_2_1 : ( ( RULE_ID ) ) ;
+ public final void rule__PrimaryExpression__FuncAssignment_2_1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2372:1: ( ( ( RULE_ID ) ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2373:1: ( ( RULE_ID ) )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2373:1: ( ( RULE_ID ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2374:1: ( RULE_ID )
+ {
+ before(grammarAccess.getPrimaryExpressionAccess().getFuncAbstractDefinitionCrossReference_2_1_0());
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2375:1: ( RULE_ID )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2376:1: RULE_ID
+ {
+ before(grammarAccess.getPrimaryExpressionAccess().getFuncAbstractDefinitionIDTerminalRuleCall_2_1_0_1());
+ match(input,RULE_ID,FOLLOW_RULE_ID_in_rule__PrimaryExpression__FuncAssignment_2_14698);
+ after(grammarAccess.getPrimaryExpressionAccess().getFuncAbstractDefinitionIDTerminalRuleCall_2_1_0_1());
+
+ }
+
+ after(grammarAccess.getPrimaryExpressionAccess().getFuncAbstractDefinitionCrossReference_2_1_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__PrimaryExpression__FuncAssignment_2_1"
+
+
+ // $ANTLR start "rule__PrimaryExpression__ArgsAssignment_2_2_1"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2387:1: rule__PrimaryExpression__ArgsAssignment_2_2_1 : ( ruleExpression ) ;
+ public final void rule__PrimaryExpression__ArgsAssignment_2_2_1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2391:1: ( ( ruleExpression ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2392:1: ( ruleExpression )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2392:1: ( ruleExpression )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2393:1: ruleExpression
+ {
+ before(grammarAccess.getPrimaryExpressionAccess().getArgsExpressionParserRuleCall_2_2_1_0());
+ pushFollow(FOLLOW_ruleExpression_in_rule__PrimaryExpression__ArgsAssignment_2_2_14733);
+ ruleExpression();
+
+ state._fsp--;
+
+ after(grammarAccess.getPrimaryExpressionAccess().getArgsExpressionParserRuleCall_2_2_1_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__PrimaryExpression__ArgsAssignment_2_2_1"
+
+
+ // $ANTLR start "rule__PrimaryExpression__ArgsAssignment_2_2_2_1"
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2402:1: rule__PrimaryExpression__ArgsAssignment_2_2_2_1 : ( ruleExpression ) ;
+ public final void rule__PrimaryExpression__ArgsAssignment_2_2_2_1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2406:1: ( ( ruleExpression ) )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2407:1: ( ruleExpression )
+ {
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2407:1: ( ruleExpression )
+ // ../org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/contentassist/antlr/internal/InternalArithmetics.g:2408:1: ruleExpression
+ {
+ before(grammarAccess.getPrimaryExpressionAccess().getArgsExpressionParserRuleCall_2_2_2_1_0());
+ pushFollow(FOLLOW_ruleExpression_in_rule__PrimaryExpression__ArgsAssignment_2_2_2_14764);
+ ruleExpression();
+
+ state._fsp--;
+
+ after(grammarAccess.getPrimaryExpressionAccess().getArgsExpressionParserRuleCall_2_2_2_1_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__PrimaryExpression__ArgsAssignment_2_2_2_1"
+
+ // Delegated rules
+
+
+
+
+ public static final BitSet FOLLOW_ruleModule_in_entryRuleModule61 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleModule68 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Module__Group__0_in_ruleModule94 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleImport_in_entryRuleImport121 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleImport128 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Import__Group__0_in_ruleImport154 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleImportName_in_entryRuleImportName181 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleImportName188 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__ImportName__Group__0_in_ruleImportName214 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleStatement_in_entryRuleStatement241 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleStatement248 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Statement__Alternatives_in_ruleStatement274 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleDefinition_in_entryRuleDefinition301 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleDefinition308 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Definition__Group__0_in_ruleDefinition334 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleDeclaredParameter_in_entryRuleDeclaredParameter361 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleDeclaredParameter368 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__DeclaredParameter__NameAssignment_in_ruleDeclaredParameter394 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleEvaluation_in_entryRuleEvaluation423 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleEvaluation430 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Evaluation__Group__0_in_ruleEvaluation456 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleExpression_in_entryRuleExpression483 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleExpression490 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleAddition_in_ruleExpression516 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleAddition_in_entryRuleAddition542 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleAddition549 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Addition__Group__0_in_ruleAddition575 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleMultiplication_in_entryRuleMultiplication602 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleMultiplication609 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Multiplication__Group__0_in_ruleMultiplication635 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rulePrimaryExpression_in_entryRulePrimaryExpression662 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRulePrimaryExpression669 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__PrimaryExpression__Alternatives_in_rulePrimaryExpression695 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleDefinition_in_rule__Statement__Alternatives731 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleEvaluation_in_rule__Statement__Alternatives748 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Addition__Group_1_0_0__0_in_rule__Addition__Alternatives_1_0781 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Addition__Group_1_0_1__0_in_rule__Addition__Alternatives_1_0799 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Multiplication__Group_1_0_0__0_in_rule__Multiplication__Alternatives_1_0832 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Multiplication__Group_1_0_1__0_in_rule__Multiplication__Alternatives_1_0850 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__PrimaryExpression__Group_0__0_in_rule__PrimaryExpression__Alternatives883 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__PrimaryExpression__Group_1__0_in_rule__PrimaryExpression__Alternatives901 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__PrimaryExpression__Group_2__0_in_rule__PrimaryExpression__Alternatives919 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Module__Group__0__Impl_in_rule__Module__Group__0950 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_rule__Module__Group__1_in_rule__Module__Group__0953 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_12_in_rule__Module__Group__0__Impl981 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Module__Group__1__Impl_in_rule__Module__Group__11012 = new BitSet(new long[]{0x0000000000092030L});
+ public static final BitSet FOLLOW_rule__Module__Group__2_in_rule__Module__Group__11015 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Module__NameAssignment_1_in_rule__Module__Group__1__Impl1042 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Module__Group__2__Impl_in_rule__Module__Group__21072 = new BitSet(new long[]{0x0000000000092030L});
+ public static final BitSet FOLLOW_rule__Module__Group__3_in_rule__Module__Group__21075 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Module__ImportsAssignment_2_in_rule__Module__Group__2__Impl1102 = new BitSet(new long[]{0x0000000000002002L});
+ public static final BitSet FOLLOW_rule__Module__Group__3__Impl_in_rule__Module__Group__31133 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Module__StatementsAssignment_3_in_rule__Module__Group__3__Impl1160 = new BitSet(new long[]{0x0000000000090032L});
+ public static final BitSet FOLLOW_rule__Import__Group__0__Impl_in_rule__Import__Group__01199 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_rule__Import__Group__1_in_rule__Import__Group__01202 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_13_in_rule__Import__Group__0__Impl1230 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Import__Group__1__Impl_in_rule__Import__Group__11261 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Import__ImportedNamespaceAssignment_1_in_rule__Import__Group__1__Impl1288 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__ImportName__Group__0__Impl_in_rule__ImportName__Group__01322 = new BitSet(new long[]{0x0000000000004000L});
+ public static final BitSet FOLLOW_rule__ImportName__Group__1_in_rule__ImportName__Group__01325 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_RULE_ID_in_rule__ImportName__Group__0__Impl1352 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__ImportName__Group__1__Impl_in_rule__ImportName__Group__11381 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__ImportName__Group_1__0_in_rule__ImportName__Group__1__Impl1408 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__ImportName__Group_1__0__Impl_in_rule__ImportName__Group_1__01443 = new BitSet(new long[]{0x0000000000008000L});
+ public static final BitSet FOLLOW_rule__ImportName__Group_1__1_in_rule__ImportName__Group_1__01446 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_14_in_rule__ImportName__Group_1__0__Impl1474 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__ImportName__Group_1__1__Impl_in_rule__ImportName__Group_1__11505 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_15_in_rule__ImportName__Group_1__1__Impl1533 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Definition__Group__0__Impl_in_rule__Definition__Group__01568 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_rule__Definition__Group__1_in_rule__Definition__Group__01571 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_16_in_rule__Definition__Group__0__Impl1599 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Definition__Group__1__Impl_in_rule__Definition__Group__11630 = new BitSet(new long[]{0x00000000000A0000L});
+ public static final BitSet FOLLOW_rule__Definition__Group__2_in_rule__Definition__Group__11633 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Definition__NameAssignment_1_in_rule__Definition__Group__1__Impl1660 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Definition__Group__2__Impl_in_rule__Definition__Group__21690 = new BitSet(new long[]{0x00000000000A0000L});
+ public static final BitSet FOLLOW_rule__Definition__Group__3_in_rule__Definition__Group__21693 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Definition__Group_2__0_in_rule__Definition__Group__2__Impl1720 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Definition__Group__3__Impl_in_rule__Definition__Group__31751 = new BitSet(new long[]{0x0000000000090030L});
+ public static final BitSet FOLLOW_rule__Definition__Group__4_in_rule__Definition__Group__31754 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_17_in_rule__Definition__Group__3__Impl1782 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Definition__Group__4__Impl_in_rule__Definition__Group__41813 = new BitSet(new long[]{0x0000000000040000L});
+ public static final BitSet FOLLOW_rule__Definition__Group__5_in_rule__Definition__Group__41816 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Definition__ExprAssignment_4_in_rule__Definition__Group__4__Impl1843 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Definition__Group__5__Impl_in_rule__Definition__Group__51873 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_18_in_rule__Definition__Group__5__Impl1901 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Definition__Group_2__0__Impl_in_rule__Definition__Group_2__01944 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_rule__Definition__Group_2__1_in_rule__Definition__Group_2__01947 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_19_in_rule__Definition__Group_2__0__Impl1975 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Definition__Group_2__1__Impl_in_rule__Definition__Group_2__12006 = new BitSet(new long[]{0x0000000000300000L});
+ public static final BitSet FOLLOW_rule__Definition__Group_2__2_in_rule__Definition__Group_2__12009 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Definition__ArgsAssignment_2_1_in_rule__Definition__Group_2__1__Impl2036 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Definition__Group_2__2__Impl_in_rule__Definition__Group_2__22066 = new BitSet(new long[]{0x0000000000300000L});
+ public static final BitSet FOLLOW_rule__Definition__Group_2__3_in_rule__Definition__Group_2__22069 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Definition__Group_2_2__0_in_rule__Definition__Group_2__2__Impl2096 = new BitSet(new long[]{0x0000000000200002L});
+ public static final BitSet FOLLOW_rule__Definition__Group_2__3__Impl_in_rule__Definition__Group_2__32127 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_20_in_rule__Definition__Group_2__3__Impl2155 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Definition__Group_2_2__0__Impl_in_rule__Definition__Group_2_2__02194 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_rule__Definition__Group_2_2__1_in_rule__Definition__Group_2_2__02197 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_21_in_rule__Definition__Group_2_2__0__Impl2225 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Definition__Group_2_2__1__Impl_in_rule__Definition__Group_2_2__12256 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Definition__ArgsAssignment_2_2_1_in_rule__Definition__Group_2_2__1__Impl2283 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Evaluation__Group__0__Impl_in_rule__Evaluation__Group__02317 = new BitSet(new long[]{0x0000000000040000L});
+ public static final BitSet FOLLOW_rule__Evaluation__Group__1_in_rule__Evaluation__Group__02320 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Evaluation__ExpressionAssignment_0_in_rule__Evaluation__Group__0__Impl2347 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Evaluation__Group__1__Impl_in_rule__Evaluation__Group__12377 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_18_in_rule__Evaluation__Group__1__Impl2405 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Addition__Group__0__Impl_in_rule__Addition__Group__02440 = new BitSet(new long[]{0x0000000000C00000L});
+ public static final BitSet FOLLOW_rule__Addition__Group__1_in_rule__Addition__Group__02443 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleMultiplication_in_rule__Addition__Group__0__Impl2470 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Addition__Group__1__Impl_in_rule__Addition__Group__12499 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Addition__Group_1__0_in_rule__Addition__Group__1__Impl2526 = new BitSet(new long[]{0x0000000000C00002L});
+ public static final BitSet FOLLOW_rule__Addition__Group_1__0__Impl_in_rule__Addition__Group_1__02561 = new BitSet(new long[]{0x0000000000090030L});
+ public static final BitSet FOLLOW_rule__Addition__Group_1__1_in_rule__Addition__Group_1__02564 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Addition__Alternatives_1_0_in_rule__Addition__Group_1__0__Impl2591 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Addition__Group_1__1__Impl_in_rule__Addition__Group_1__12621 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Addition__RightAssignment_1_1_in_rule__Addition__Group_1__1__Impl2648 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Addition__Group_1_0_0__0__Impl_in_rule__Addition__Group_1_0_0__02682 = new BitSet(new long[]{0x0000000000400000L});
+ public static final BitSet FOLLOW_rule__Addition__Group_1_0_0__1_in_rule__Addition__Group_1_0_0__02685 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Addition__Group_1_0_0__1__Impl_in_rule__Addition__Group_1_0_0__12743 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_22_in_rule__Addition__Group_1_0_0__1__Impl2771 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Addition__Group_1_0_1__0__Impl_in_rule__Addition__Group_1_0_1__02806 = new BitSet(new long[]{0x0000000000C00000L});
+ public static final BitSet FOLLOW_rule__Addition__Group_1_0_1__1_in_rule__Addition__Group_1_0_1__02809 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Addition__Group_1_0_1__1__Impl_in_rule__Addition__Group_1_0_1__12867 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_23_in_rule__Addition__Group_1_0_1__1__Impl2895 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Multiplication__Group__0__Impl_in_rule__Multiplication__Group__02930 = new BitSet(new long[]{0x0000000001008000L});
+ public static final BitSet FOLLOW_rule__Multiplication__Group__1_in_rule__Multiplication__Group__02933 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rulePrimaryExpression_in_rule__Multiplication__Group__0__Impl2960 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Multiplication__Group__1__Impl_in_rule__Multiplication__Group__12989 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Multiplication__Group_1__0_in_rule__Multiplication__Group__1__Impl3016 = new BitSet(new long[]{0x0000000001008002L});
+ public static final BitSet FOLLOW_rule__Multiplication__Group_1__0__Impl_in_rule__Multiplication__Group_1__03051 = new BitSet(new long[]{0x0000000000090030L});
+ public static final BitSet FOLLOW_rule__Multiplication__Group_1__1_in_rule__Multiplication__Group_1__03054 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Multiplication__Alternatives_1_0_in_rule__Multiplication__Group_1__0__Impl3081 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Multiplication__Group_1__1__Impl_in_rule__Multiplication__Group_1__13111 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Multiplication__RightAssignment_1_1_in_rule__Multiplication__Group_1__1__Impl3138 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Multiplication__Group_1_0_0__0__Impl_in_rule__Multiplication__Group_1_0_0__03172 = new BitSet(new long[]{0x0000000000008000L});
+ public static final BitSet FOLLOW_rule__Multiplication__Group_1_0_0__1_in_rule__Multiplication__Group_1_0_0__03175 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Multiplication__Group_1_0_0__1__Impl_in_rule__Multiplication__Group_1_0_0__13233 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_15_in_rule__Multiplication__Group_1_0_0__1__Impl3261 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Multiplication__Group_1_0_1__0__Impl_in_rule__Multiplication__Group_1_0_1__03296 = new BitSet(new long[]{0x0000000001008000L});
+ public static final BitSet FOLLOW_rule__Multiplication__Group_1_0_1__1_in_rule__Multiplication__Group_1_0_1__03299 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Multiplication__Group_1_0_1__1__Impl_in_rule__Multiplication__Group_1_0_1__13357 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_24_in_rule__Multiplication__Group_1_0_1__1__Impl3385 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__PrimaryExpression__Group_0__0__Impl_in_rule__PrimaryExpression__Group_0__03420 = new BitSet(new long[]{0x0000000000090030L});
+ public static final BitSet FOLLOW_rule__PrimaryExpression__Group_0__1_in_rule__PrimaryExpression__Group_0__03423 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_19_in_rule__PrimaryExpression__Group_0__0__Impl3451 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__PrimaryExpression__Group_0__1__Impl_in_rule__PrimaryExpression__Group_0__13482 = new BitSet(new long[]{0x0000000000100000L});
+ public static final BitSet FOLLOW_rule__PrimaryExpression__Group_0__2_in_rule__PrimaryExpression__Group_0__13485 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleExpression_in_rule__PrimaryExpression__Group_0__1__Impl3512 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__PrimaryExpression__Group_0__2__Impl_in_rule__PrimaryExpression__Group_0__23541 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_20_in_rule__PrimaryExpression__Group_0__2__Impl3569 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__PrimaryExpression__Group_1__0__Impl_in_rule__PrimaryExpression__Group_1__03606 = new BitSet(new long[]{0x0000000000000020L});
+ public static final BitSet FOLLOW_rule__PrimaryExpression__Group_1__1_in_rule__PrimaryExpression__Group_1__03609 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__PrimaryExpression__Group_1__1__Impl_in_rule__PrimaryExpression__Group_1__13667 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__PrimaryExpression__ValueAssignment_1_1_in_rule__PrimaryExpression__Group_1__1__Impl3694 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__PrimaryExpression__Group_2__0__Impl_in_rule__PrimaryExpression__Group_2__03728 = new BitSet(new long[]{0x0000000000090030L});
+ public static final BitSet FOLLOW_rule__PrimaryExpression__Group_2__1_in_rule__PrimaryExpression__Group_2__03731 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__PrimaryExpression__Group_2__1__Impl_in_rule__PrimaryExpression__Group_2__13789 = new BitSet(new long[]{0x0000000000080000L});
+ public static final BitSet FOLLOW_rule__PrimaryExpression__Group_2__2_in_rule__PrimaryExpression__Group_2__13792 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__PrimaryExpression__FuncAssignment_2_1_in_rule__PrimaryExpression__Group_2__1__Impl3819 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__PrimaryExpression__Group_2__2__Impl_in_rule__PrimaryExpression__Group_2__23849 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__PrimaryExpression__Group_2_2__0_in_rule__PrimaryExpression__Group_2__2__Impl3876 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__PrimaryExpression__Group_2_2__0__Impl_in_rule__PrimaryExpression__Group_2_2__03913 = new BitSet(new long[]{0x0000000000090030L});
+ public static final BitSet FOLLOW_rule__PrimaryExpression__Group_2_2__1_in_rule__PrimaryExpression__Group_2_2__03916 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_19_in_rule__PrimaryExpression__Group_2_2__0__Impl3944 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__PrimaryExpression__Group_2_2__1__Impl_in_rule__PrimaryExpression__Group_2_2__13975 = new BitSet(new long[]{0x0000000000300000L});
+ public static final BitSet FOLLOW_rule__PrimaryExpression__Group_2_2__2_in_rule__PrimaryExpression__Group_2_2__13978 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__PrimaryExpression__ArgsAssignment_2_2_1_in_rule__PrimaryExpression__Group_2_2__1__Impl4005 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__PrimaryExpression__Group_2_2__2__Impl_in_rule__PrimaryExpression__Group_2_2__24035 = new BitSet(new long[]{0x0000000000300000L});
+ public static final BitSet FOLLOW_rule__PrimaryExpression__Group_2_2__3_in_rule__PrimaryExpression__Group_2_2__24038 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__PrimaryExpression__Group_2_2_2__0_in_rule__PrimaryExpression__Group_2_2__2__Impl4065 = new BitSet(new long[]{0x0000000000200002L});
+ public static final BitSet FOLLOW_rule__PrimaryExpression__Group_2_2__3__Impl_in_rule__PrimaryExpression__Group_2_2__34096 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_20_in_rule__PrimaryExpression__Group_2_2__3__Impl4124 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__PrimaryExpression__Group_2_2_2__0__Impl_in_rule__PrimaryExpression__Group_2_2_2__04163 = new BitSet(new long[]{0x0000000000090030L});
+ public static final BitSet FOLLOW_rule__PrimaryExpression__Group_2_2_2__1_in_rule__PrimaryExpression__Group_2_2_2__04166 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_21_in_rule__PrimaryExpression__Group_2_2_2__0__Impl4194 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__PrimaryExpression__Group_2_2_2__1__Impl_in_rule__PrimaryExpression__Group_2_2_2__14225 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__PrimaryExpression__ArgsAssignment_2_2_2_1_in_rule__PrimaryExpression__Group_2_2_2__1__Impl4252 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_RULE_ID_in_rule__Module__NameAssignment_14291 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleImport_in_rule__Module__ImportsAssignment_24322 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleStatement_in_rule__Module__StatementsAssignment_34353 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleImportName_in_rule__Import__ImportedNamespaceAssignment_14384 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_RULE_ID_in_rule__Definition__NameAssignment_14415 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleDeclaredParameter_in_rule__Definition__ArgsAssignment_2_14446 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleDeclaredParameter_in_rule__Definition__ArgsAssignment_2_2_14477 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleExpression_in_rule__Definition__ExprAssignment_44508 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_RULE_ID_in_rule__DeclaredParameter__NameAssignment4539 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleExpression_in_rule__Evaluation__ExpressionAssignment_04570 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleMultiplication_in_rule__Addition__RightAssignment_1_14601 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rulePrimaryExpression_in_rule__Multiplication__RightAssignment_1_14632 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_RULE_NUMBER_in_rule__PrimaryExpression__ValueAssignment_1_14663 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_RULE_ID_in_rule__PrimaryExpression__FuncAssignment_2_14698 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleExpression_in_rule__PrimaryExpression__ArgsAssignment_2_2_14733 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleExpression_in_rule__PrimaryExpression__ArgsAssignment_2_2_2_14764 = new BitSet(new long[]{0x0000000000000002L});
+
+}
\ No newline at end of file
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/internal/ArithmeticsActivator.java b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/internal/ArithmeticsActivator.java
new file mode 100644
index 0000000..cabd69f
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src-gen/org/eclipse/xtext/example/arithmetics/ui/internal/ArithmeticsActivator.java
@@ -0,0 +1,95 @@
+/*
+ * generated by Xtext
+ */
+package org.eclipse.xtext.example.arithmetics.ui.internal;
+
+import java.util.Collections;
+import java.util.Map;
+
+import org.apache.log4j.Logger;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.eclipse.xtext.ui.shared.SharedStateModule;
+import org.eclipse.xtext.util.Modules2;
+import org.osgi.framework.BundleContext;
+
+import com.google.common.collect.Maps;
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+import com.google.inject.Module;
+
+/**
+ * This class was generated. Customizations should only happen in a newly
+ * introduced subclass.
+ */
+public class ArithmeticsActivator extends AbstractUIPlugin {
+
+ public static final String ORG_ECLIPSE_XTEXT_EXAMPLE_ARITHMETICS_ARITHMETICS = "org.eclipse.xtext.example.arithmetics.Arithmetics";
+
+ private static final Logger logger = Logger.getLogger(ArithmeticsActivator.class);
+
+ private static ArithmeticsActivator INSTANCE;
+
+ private Map<String, Injector> injectors = Collections.synchronizedMap(Maps.<String, Injector> newHashMapWithExpectedSize(1));
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ INSTANCE = this;
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ injectors.clear();
+ INSTANCE = null;
+ super.stop(context);
+ }
+
+ public static ArithmeticsActivator getInstance() {
+ return INSTANCE;
+ }
+
+ public Injector getInjector(String language) {
+ synchronized (injectors) {
+ Injector injector = injectors.get(language);
+ if (injector == null) {
+ injectors.put(language, injector = createInjector(language));
+ }
+ return injector;
+ }
+ }
+
+ protected Injector createInjector(String language) {
+ try {
+ Module runtimeModule = getRuntimeModule(language);
+ Module sharedStateModule = getSharedStateModule();
+ Module uiModule = getUiModule(language);
+ Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule);
+ return Guice.createInjector(mergedModule);
+ } catch (Exception e) {
+ logger.error("Failed to create injector for " + language);
+ logger.error(e.getMessage(), e);
+ throw new RuntimeException("Failed to create injector for " + language, e);
+ }
+ }
+
+ protected Module getRuntimeModule(String grammar) {
+ if (ORG_ECLIPSE_XTEXT_EXAMPLE_ARITHMETICS_ARITHMETICS.equals(grammar)) {
+ return new org.eclipse.xtext.example.arithmetics.ArithmeticsRuntimeModule();
+ }
+
+ throw new IllegalArgumentException(grammar);
+ }
+
+ protected Module getUiModule(String grammar) {
+ if (ORG_ECLIPSE_XTEXT_EXAMPLE_ARITHMETICS_ARITHMETICS.equals(grammar)) {
+ return new org.eclipse.xtext.example.arithmetics.ui.ArithmeticsUiModule(this);
+ }
+
+ throw new IllegalArgumentException(grammar);
+ }
+
+ protected Module getSharedStateModule() {
+ return new SharedStateModule();
+ }
+
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src/org/eclipse/xtext/example/arithmetics/ui/ArithmeticsUiModule.java b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src/org/eclipse/xtext/example/arithmetics/ui/ArithmeticsUiModule.java
new file mode 100644
index 0000000..7c724e3
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src/org/eclipse/xtext/example/arithmetics/ui/ArithmeticsUiModule.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.eclipse.xtext.example.arithmetics.ui;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.eclipse.xtext.example.arithmetics.ui.autoedit.AutoEditStrategy;
+import org.eclipse.xtext.ui.editor.autoedit.AbstractEditStrategyProvider;
+
+/**
+ * Use this class to register components to be used within the IDE.
+ */
+public class ArithmeticsUiModule extends org.eclipse.xtext.example.arithmetics.ui.AbstractArithmeticsUiModule {
+ public ArithmeticsUiModule(AbstractUIPlugin plugin) {
+ super(plugin);
+ }
+
+ public Class<? extends AbstractEditStrategyProvider> bindAbstractEditStrategyProvider() {
+ return AutoEditStrategy.class;
+ }
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src/org/eclipse/xtext/example/arithmetics/ui/autoedit/AutoEditStrategy.java b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src/org/eclipse/xtext/example/arithmetics/ui/autoedit/AutoEditStrategy.java
new file mode 100644
index 0000000..8f0ad59
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src/org/eclipse/xtext/example/arithmetics/ui/autoedit/AutoEditStrategy.java
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.eclipse.xtext.example.arithmetics.ui.autoedit;
+
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.xtext.ui.editor.autoedit.DefaultAutoEditStrategyProvider;
+
+public class AutoEditStrategy extends DefaultAutoEditStrategyProvider {
+ @Override
+ protected void configure(IEditStrategyAcceptor acceptor) {
+ super.configure(acceptor);
+ //acceptor.accept(newShortCuts("PI", "PI"));
+ acceptor.accept(new InterpreterAutoEdit(),IDocument.DEFAULT_CONTENT_TYPE);
+ }
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src/org/eclipse/xtext/example/arithmetics/ui/autoedit/InterpreterAutoEdit.java b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src/org/eclipse/xtext/example/arithmetics/ui/autoedit/InterpreterAutoEdit.java
new file mode 100644
index 0000000..76fb153
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src/org/eclipse/xtext/example/arithmetics/ui/autoedit/InterpreterAutoEdit.java
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ * Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+
+package org.eclipse.xtext.example.arithmetics.ui.autoedit;
+
+import java.math.BigDecimal;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.DocumentCommand;
+import org.eclipse.jface.text.IAutoEditStrategy;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Evaluation;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Module;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Statement;
+import org.eclipse.xtext.example.arithmetics.interpreter.Calculator;
+import org.eclipse.xtext.nodemodel.ICompositeNode;
+import org.eclipse.xtext.nodemodel.util.NodeModelUtils;
+import org.eclipse.xtext.resource.XtextResource;
+import org.eclipse.xtext.ui.editor.model.IXtextDocument;
+import org.eclipse.xtext.util.concurrent.IUnitOfWork;
+
+/**
+ * @author Sven Efftinge - initial contribution and API
+ *
+ * an interactive interpreter as an {@link IAutoEditStrategy}
+ */
+public class InterpreterAutoEdit implements IAutoEditStrategy {
+
+ public void customizeDocumentCommand(IDocument document,
+ DocumentCommand command) {
+ for (String lineDelimiter : document.getLegalLineDelimiters()) {
+ if (command.text.equals(lineDelimiter)) {
+ int line;
+ int lineStart;
+ try {
+ line = document.getLineOfOffset(command.offset);
+ lineStart = document.getLineOffset(line);
+ if (!document.get(lineStart, 3).equals("def")) {
+ BigDecimal computedResult = computeResult(document,
+ command);
+ if (computedResult != null)
+ command.text = lineDelimiter + "// = " + computedResult + lineDelimiter;
+ }
+ } catch (BadLocationException e) {
+ // ignore
+ }
+ }
+ }
+ }
+
+ private BigDecimal computeResult(IDocument document,
+ final DocumentCommand command) {
+ return ((IXtextDocument) document)
+ .readOnly(new IUnitOfWork<BigDecimal, XtextResource>() {
+ public BigDecimal exec(XtextResource state)
+ throws Exception {
+ Evaluation stmt = findEvaluation(command, state);
+ if (stmt == null)
+ return null;
+ return evaluate(stmt);
+ }
+ });
+ }
+
+ protected BigDecimal evaluate(Evaluation stmt) {
+ return new Calculator().evaluate(stmt.getExpression());
+ }
+
+ protected Evaluation findEvaluation(final DocumentCommand command,
+ XtextResource state) {
+ if(!state.getContents().isEmpty()) {
+ Module m = (Module) state.getContents().get(0);
+ for (Statement stmt : m.getStatements()) {
+ if (stmt instanceof Evaluation) {
+ ICompositeNode node = NodeModelUtils.getNode(stmt);
+ if (node.getOffset() <= command.offset
+ && (node.getOffset() + node.getLength()) >= command.offset) {
+ return (Evaluation) stmt;
+ }
+ }
+ }
+ }
+ return null;
+ }
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src/org/eclipse/xtext/example/arithmetics/ui/contentassist/ArithmeticsProposalProvider.java b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src/org/eclipse/xtext/example/arithmetics/ui/contentassist/ArithmeticsProposalProvider.java
new file mode 100644
index 0000000..f66ca84
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src/org/eclipse/xtext/example/arithmetics/ui/contentassist/ArithmeticsProposalProvider.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.eclipse.xtext.example.arithmetics.ui.contentassist;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.xtext.Assignment;
+import org.eclipse.xtext.example.arithmetics.arithmetics.DeclaredParameter;
+import org.eclipse.xtext.example.arithmetics.ui.contentassist.AbstractArithmeticsProposalProvider;
+import org.eclipse.xtext.resource.IEObjectDescription;
+import org.eclipse.xtext.ui.editor.contentassist.ConfigurableCompletionProposal;
+import org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext;
+import org.eclipse.xtext.ui.editor.contentassist.ICompletionProposalAcceptor;
+
+import com.google.common.base.Function;
+
+/**
+ * @author Sven Efftinge - initial contribution and API
+ *
+ */
+public class ArithmeticsProposalProvider extends AbstractArithmeticsProposalProvider {
+
+
+ /**
+ * sets the selection on the arguments for proposed functions.
+ */
+ @Override
+ public void completePrimaryExpression_Func(EObject model,
+ Assignment assignment, ContentAssistContext context,
+ final ICompletionProposalAcceptor acceptor) {
+ super.completePrimaryExpression_Func(model, assignment, context, new ICompletionProposalAcceptor.Delegate(acceptor) {
+
+ public void accept(ICompletionProposal proposal) {
+ if (proposal instanceof ConfigurableCompletionProposal) {
+ ConfigurableCompletionProposal ccp = (ConfigurableCompletionProposal) proposal;
+ String string = ccp.getReplacementString();
+ int indexOfOpenPar = string.indexOf('(');
+ if (indexOfOpenPar!=-1) {
+ int oldSelectionStart = ccp.getSelectionStart();
+ ccp.setSelectionStart(oldSelectionStart-string.length()+indexOfOpenPar+1);
+ ccp.setSelectionLength(oldSelectionStart-ccp.getSelectionStart()-1);
+ }
+ }
+ super.accept(proposal);
+ }
+
+ });
+ }
+
+ @Override
+ protected String getDisplayString(EObject element,
+ String qualifiedNameAsString, String shortName) {
+ if (element instanceof DeclaredParameter)
+ return shortName;
+ return super.getDisplayString(element, qualifiedNameAsString, shortName);
+ }
+
+ @Override
+ protected Function<IEObjectDescription, ICompletionProposal> getProposalFactory(
+ String ruleName, ContentAssistContext contentAssistContext) {
+ // hackish: ignore concrete syntax constraints since we export functions with parenths
+ return super.getProposalFactory(null, contentAssistContext);
+ }
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src/org/eclipse/xtext/example/arithmetics/ui/labeling/ArithmeticsDescriptionLabelProvider.java b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src/org/eclipse/xtext/example/arithmetics/ui/labeling/ArithmeticsDescriptionLabelProvider.java
new file mode 100644
index 0000000..c7dc205
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src/org/eclipse/xtext/example/arithmetics/ui/labeling/ArithmeticsDescriptionLabelProvider.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.eclipse.xtext.example.arithmetics.ui.labeling;
+
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.xtext.resource.IEObjectDescription;
+import org.eclipse.xtext.ui.label.DefaultDescriptionLabelProvider;
+
+import com.google.inject.Inject;
+
+/**
+ * Provides labels for a IEObjectDescriptions and IResourceDescriptions.
+ *
+ * see http://www.eclipse.org/Xtext/documentation/latest/xtext.html#labelProvider
+ */
+public class ArithmeticsDescriptionLabelProvider extends DefaultDescriptionLabelProvider {
+
+ @Inject
+ private ILabelProvider labelProvider;
+
+ public Image getImage(Object element) {
+ if (element instanceof IEObjectDescription) {
+ return labelProvider.getImage(((IEObjectDescription)element).getEObjectOrProxy());
+ }
+ return super.getImage(element);
+ }
+
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src/org/eclipse/xtext/example/arithmetics/ui/labeling/ArithmeticsLabelProvider.java b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src/org/eclipse/xtext/example/arithmetics/ui/labeling/ArithmeticsLabelProvider.java
new file mode 100644
index 0000000..d7abe1f
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src/org/eclipse/xtext/example/arithmetics/ui/labeling/ArithmeticsLabelProvider.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.eclipse.xtext.example.arithmetics.ui.labeling;
+
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
+import org.eclipse.xtext.example.arithmetics.arithmetics.DeclaredParameter;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Definition;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Module;
+import org.eclipse.xtext.ui.label.DefaultEObjectLabelProvider;
+
+import com.google.inject.Inject;
+
+/**
+ * Provides labels for a EObjects.
+ *
+ * see http://www.eclipse.org/Xtext/documentation/latest/xtext.html#labelProvider
+ */
+public class ArithmeticsLabelProvider extends DefaultEObjectLabelProvider {
+
+ @Inject
+ public ArithmeticsLabelProvider(AdapterFactoryLabelProvider delegate) {
+ super(delegate);
+ }
+
+ String text(Module ele) {
+ return ele.getName();
+ }
+ String text(Definition ele) {
+ String name = ele.getName();
+ if (!ele.getArgs().isEmpty()) {
+ name+="(";
+ for (DeclaredParameter p : ele.getArgs()) {
+ name+=p.getName();
+ if (ele.getArgs().indexOf(p)!=ele.getArgs().size()-1)
+ name+=",";
+ }
+ name+=")";
+ }
+ return name;
+ }
+
+ String image(Module ele) {
+ return "home_nav.gif";
+ }
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src/org/eclipse/xtext/example/arithmetics/ui/outline/ArithmeticsOutlineTreeProvider.java b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src/org/eclipse/xtext/example/arithmetics/ui/outline/ArithmeticsOutlineTreeProvider.java
new file mode 100644
index 0000000..6dfda52
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src/org/eclipse/xtext/example/arithmetics/ui/outline/ArithmeticsOutlineTreeProvider.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.eclipse.xtext.example.arithmetics.ui.outline;
+
+import org.eclipse.xtext.EcoreUtil2;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Definition;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Module;
+import org.eclipse.xtext.ui.editor.outline.IOutlineNode;
+import org.eclipse.xtext.ui.editor.outline.impl.DefaultOutlineTreeProvider;
+
+/**
+ * customization of the default outline structure
+ *
+ */
+public class ArithmeticsOutlineTreeProvider extends DefaultOutlineTreeProvider {
+
+ protected void _createChildren(IOutlineNode parentNode, Module module) {
+ for(Definition definition : EcoreUtil2.typeSelect(module.eContents(), Definition.class)) {
+ createNode(parentNode, definition);
+ }
+ }
+
+ protected boolean _isLeaf(Definition definition) {
+ return true;
+ }
+
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src/org/eclipse/xtext/example/arithmetics/ui/quickfix/ArithmeticsQuickfixProvider.java b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src/org/eclipse/xtext/example/arithmetics/ui/quickfix/ArithmeticsQuickfixProvider.java
new file mode 100644
index 0000000..c9a3304
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics.ui/src/org/eclipse/xtext/example/arithmetics/ui/quickfix/ArithmeticsQuickfixProvider.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.eclipse.xtext.example.arithmetics.ui.quickfix;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.xtext.example.arithmetics.validation.ArithmeticsJavaValidator;
+import org.eclipse.xtext.ui.editor.model.IXtextDocument;
+import org.eclipse.xtext.ui.editor.model.edit.IModification;
+import org.eclipse.xtext.ui.editor.model.edit.IModificationContext;
+import org.eclipse.xtext.ui.editor.quickfix.DefaultQuickfixProvider;
+import org.eclipse.xtext.ui.editor.quickfix.Fix;
+import org.eclipse.xtext.ui.editor.quickfix.IssueResolutionAcceptor;
+import org.eclipse.xtext.validation.Issue;
+
+public class ArithmeticsQuickfixProvider extends DefaultQuickfixProvider {
+
+ @Fix(ArithmeticsJavaValidator.NORMALIZABLE)
+ public void normalize(final Issue issue, IssueResolutionAcceptor acceptor) {
+ final String string = issue.getData()[0];
+ acceptor.accept(issue, "Replace with "+string, "Replace expression with '"+string+"'", "upcase.png", new IModification() {
+ public void apply(IModificationContext context) throws BadLocationException {
+ IXtextDocument xtextDocument = context.getXtextDocument();
+ xtextDocument.replace(issue.getOffset(), issue.getLength(), string);
+ }
+ });
+ }
+
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/.classpath b/examples/plugins/org.eclipse.xtext.example.arithmetics/.classpath
new file mode 100644
index 0000000..59cf397
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="src-gen"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/.project b/examples/plugins/org.eclipse.xtext.example.arithmetics/.project
new file mode 100644
index 0000000..6e70b87
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.xtext.example.arithmetics</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
+ </natures>
+</projectDescription>
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/.settings/org.eclipse.core.resources.prefs b/examples/plugins/org.eclipse.xtext.example.arithmetics/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..99f26c0
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/META-INF/MANIFEST.MF b/examples/plugins/org.eclipse.xtext.example.arithmetics/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..8f3f47b
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/META-INF/MANIFEST.MF
@@ -0,0 +1,33 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.eclipse.xtext.example.arithmetics
+Bundle-Vendor: itemis AG
+Bundle-Version: 2.3.0.qualifier
+Bundle-SymbolicName: org.eclipse.xtext.example.arithmetics;singleton:=true
+Bundle-ActivationPolicy: lazy
+Require-Bundle: org.eclipse.xtext;bundle-version="2.0.0";visibility:=reexport,
+ org.eclipse.xtext.generator;bundle-version="2.0.0";resolution:=optional;x-installation:=greedy,
+ de.itemis.xtext.antlr;bundle-version="2.0.0";resolution:=optional;x-installation:=greedy,
+ org.eclipse.emf.codegen.ecore;resolution:=optional;x-installation:=greedy,
+ org.eclipse.emf.mwe.utils;bundle-version="1.0.0";resolution:=optional;x-installation:=greedy,
+ org.eclipse.emf.mwe2.launch;bundle-version="2.0.0";resolution:=optional;x-installation:=greedy,
+ com.ibm.icu;resolution:=optional;x-installation:=greedy,
+ org.eclipse.xtext.util;bundle-version="2.0.0";visibility:=reexport,
+ org.eclipse.emf.ecore,
+ org.eclipse.emf.common,
+ org.antlr.runtime;bundle-version="[3.2.0,3.2.1)"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.eclipse.xtext.example.arithmetics,
+ org.eclipse.xtext.example.arithmetics.interpreter,
+ org.eclipse.xtext.example.arithmetics.validation,
+ org.eclipse.xtext.example.arithmetics.services,
+ org.eclipse.xtext.example.arithmetics.arithmetics,
+ org.eclipse.xtext.example.arithmetics.arithmetics.impl,
+ org.eclipse.xtext.example.arithmetics.arithmetics.util,
+ org.eclipse.xtext.example.arithmetics.parser.antlr,
+ org.eclipse.xtext.example.arithmetics.parser.antlr.internal,
+ org.eclipse.xtext.example.arithmetics.scoping,
+ org.eclipse.xtext.example.arithmetics.formatting,
+ org.eclipse.xtext.example.arithmetics.serializer
+Import-Package: org.apache.log4j,
+ org.apache.commons.logging
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/build.properties b/examples/plugins/org.eclipse.xtext.example.arithmetics/build.properties
new file mode 100644
index 0000000..bed6e1e
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/build.properties
@@ -0,0 +1,4 @@
+source.. = src/,src-gen/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml
\ No newline at end of file
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/plugin.xml b/examples/plugins/org.eclipse.xtext.example.arithmetics/plugin.xml
new file mode 100644
index 0000000..94f1325
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/plugin.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<plugin>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <package
+ uri = "http://www.eclipse.org/Xtext/example/Arithmetics"
+ class = "org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage"
+ genModel = "org/eclipse/xtext/example/arithmetics/Arithmetics.genmodel" />
+
+ </extension>
+
+
+
+
+
+</plugin>
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/plugin.xml_gen b/examples/plugins/org.eclipse.xtext.example.arithmetics/plugin.xml_gen
new file mode 100644
index 0000000..a3a8937
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/plugin.xml_gen
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<plugin>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <package
+ uri = "http://www.eclipse.org/Xtext/example/Arithmetics"
+ class = "org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage"
+ genModel = "org/eclipse/xtext/example/arithmetics/Arithmetics.genmodel" />
+
+ </extension>
+
+
+
+
+</plugin>
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/AbstractArithmeticsRuntimeModule.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/AbstractArithmeticsRuntimeModule.java
new file mode 100644
index 0000000..d7c76d1
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/AbstractArithmeticsRuntimeModule.java
@@ -0,0 +1,147 @@
+/*
+ * generated by Xtext
+ */
+package org.eclipse.xtext.example.arithmetics;
+
+import java.util.Properties;
+
+import org.eclipse.xtext.Constants;
+import org.eclipse.xtext.service.DefaultRuntimeModule;
+
+import com.google.inject.Binder;
+import com.google.inject.name.Names;
+
+/**
+ * Manual modifications go to {org.eclipse.xtext.example.arithmetics.ArithmeticsRuntimeModule}
+ */
+ @SuppressWarnings("all")
+public abstract class AbstractArithmeticsRuntimeModule extends DefaultRuntimeModule {
+
+ protected Properties properties = null;
+
+ @Override
+ public void configure(Binder binder) {
+ properties = tryBindProperties(binder, "org/eclipse/xtext/example/arithmetics/Arithmetics.properties");
+ super.configure(binder);
+ }
+
+ public void configureLanguageName(Binder binder) {
+ binder.bind(String.class).annotatedWith(Names.named(Constants.LANGUAGE_NAME)).toInstance("org.eclipse.xtext.example.arithmetics.Arithmetics");
+ }
+
+ public void configureFileExtensions(Binder binder) {
+ if (properties == null || properties.getProperty(Constants.FILE_EXTENSIONS) == null)
+ binder.bind(String.class).annotatedWith(Names.named(Constants.FILE_EXTENSIONS)).toInstance("calc");
+ }
+
+ // contributed by org.eclipse.xtext.generator.grammarAccess.GrammarAccessFragment
+ public Class<? extends org.eclipse.xtext.IGrammarAccess> bindIGrammarAccess() {
+ return org.eclipse.xtext.example.arithmetics.services.ArithmeticsGrammarAccess.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.serializer.SerializerFragment
+ public Class<? extends org.eclipse.xtext.serializer.sequencer.ISemanticSequencer> bindISemanticSequencer() {
+ return org.eclipse.xtext.example.arithmetics.serializer.AbstractArithmeticsSemanticSequencer.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.serializer.SerializerFragment
+ public Class<? extends org.eclipse.xtext.serializer.sequencer.ISyntacticSequencer> bindISyntacticSequencer() {
+ return org.eclipse.xtext.example.arithmetics.serializer.AbstractArithmeticsSyntacticSequencer.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.serializer.SerializerFragment
+ public Class<? extends org.eclipse.xtext.serializer.ISerializer> bindISerializer() {
+ return org.eclipse.xtext.serializer.impl.Serializer.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
+ public Class<? extends org.eclipse.xtext.parser.IParser> bindIParser() {
+ return org.eclipse.xtext.example.arithmetics.parser.antlr.ArithmeticsParser.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
+ public Class<? extends org.eclipse.xtext.parser.ITokenToStringConverter> bindITokenToStringConverter() {
+ return org.eclipse.xtext.parser.antlr.AntlrTokenToStringConverter.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
+ public Class<? extends org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider> bindIAntlrTokenFileProvider() {
+ return org.eclipse.xtext.example.arithmetics.parser.antlr.ArithmeticsAntlrTokenFileProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
+ public Class<? extends org.eclipse.xtext.parser.antlr.Lexer> bindLexer() {
+ return org.eclipse.xtext.example.arithmetics.parser.antlr.internal.InternalArithmeticsLexer.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
+ public com.google.inject.Provider<org.eclipse.xtext.example.arithmetics.parser.antlr.internal.InternalArithmeticsLexer> provideInternalArithmeticsLexer() {
+ return org.eclipse.xtext.parser.antlr.LexerProvider.create(org.eclipse.xtext.example.arithmetics.parser.antlr.internal.InternalArithmeticsLexer.class);
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
+ public void configureRuntimeLexer(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.parser.antlr.Lexer.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.parser.antlr.LexerBindings.RUNTIME)).to(org.eclipse.xtext.example.arithmetics.parser.antlr.internal.InternalArithmeticsLexer.class);
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
+ public Class<? extends org.eclipse.xtext.parser.antlr.ITokenDefProvider> bindITokenDefProvider() {
+ return org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.validation.JavaValidatorFragment
+ @org.eclipse.xtext.service.SingletonBinding(eager=true) public Class<? extends org.eclipse.xtext.example.arithmetics.validation.ArithmeticsJavaValidator> bindArithmeticsJavaValidator() {
+ return org.eclipse.xtext.example.arithmetics.validation.ArithmeticsJavaValidator.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.scoping.AbstractScopingFragment
+ public Class<? extends org.eclipse.xtext.scoping.IScopeProvider> bindIScopeProvider() {
+ return org.eclipse.xtext.example.arithmetics.scoping.ArithmeticsScopeProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.scoping.AbstractScopingFragment
+ public void configureIScopeProviderDelegate(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.scoping.IScopeProvider.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider.NAMED_DELEGATE)).to(org.eclipse.xtext.scoping.impl.ImportedNamespaceAwareLocalScopeProvider.class);
+ }
+
+ // contributed by org.eclipse.xtext.generator.scoping.AbstractScopingFragment
+ public Class<? extends org.eclipse.xtext.scoping.IGlobalScopeProvider> bindIGlobalScopeProvider() {
+ return org.eclipse.xtext.scoping.impl.DefaultGlobalScopeProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.scoping.AbstractScopingFragment
+ public void configureIgnoreCaseLinking(com.google.inject.Binder binder) {
+ binder.bindConstant().annotatedWith(org.eclipse.xtext.scoping.IgnoreCaseLinking.class).to(false);
+ }
+
+ // contributed by org.eclipse.xtext.generator.exporting.QualifiedNamesFragment
+ public Class<? extends org.eclipse.xtext.naming.IQualifiedNameProvider> bindIQualifiedNameProvider() {
+ return org.eclipse.xtext.naming.DefaultDeclarativeQualifiedNameProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.formatting.FormatterFragment
+ public Class<? extends org.eclipse.xtext.formatting.IFormatter> bindIFormatter() {
+ return org.eclipse.xtext.example.arithmetics.formatting.ArithmeticsFormatter.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
+ public Class<? extends org.eclipse.xtext.resource.IContainer.Manager> bindIContainer$Manager() {
+ return org.eclipse.xtext.resource.containers.StateBasedContainerManager.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
+ public Class<? extends org.eclipse.xtext.resource.containers.IAllContainersState.Provider> bindIAllContainersState$Provider() {
+ return org.eclipse.xtext.resource.containers.ResourceSetBasedAllContainersStateProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
+ public void configureIResourceDescriptions(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.resource.IResourceDescriptions.class).to(org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions.class);
+ }
+
+ // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
+ public void configureIResourceDescriptionsBuilderScope(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.resource.IResourceDescriptions.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.resource.impl.ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE)).to(org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions.class);
+ }
+
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/Arithmetics.ecore b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/Arithmetics.ecore
new file mode 100644
index 0000000..aa657e1
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/Arithmetics.ecore
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="arithmetics"
+ nsURI="http://www.eclipse.org/Xtext/example/Arithmetics" nsPrefix="arithmetics">
+ <eClassifiers xsi:type="ecore:EClass" name="Module">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="imports" upperBound="-1"
+ eType="#//Import" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="statements" upperBound="-1"
+ eType="#//Statement" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Import">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="importedNamespace" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Statement"/>
+ <eClassifiers xsi:type="ecore:EClass" name="Definition" eSuperTypes="#//Statement #//AbstractDefinition">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="args" upperBound="-1" eType="#//DeclaredParameter"
+ containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="expr" eType="#//Expression"
+ containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="DeclaredParameter" eSuperTypes="#//AbstractDefinition"/>
+ <eClassifiers xsi:type="ecore:EClass" name="AbstractDefinition">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Evaluation" eSuperTypes="#//Statement">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="expression" eType="#//Expression"
+ containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Expression"/>
+ <eClassifiers xsi:type="ecore:EClass" name="Plus" eSuperTypes="#//Expression">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="left" eType="#//Expression"
+ containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="right" eType="#//Expression"
+ containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Minus" eSuperTypes="#//Expression">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="left" eType="#//Expression"
+ containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="right" eType="#//Expression"
+ containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Multi" eSuperTypes="#//Expression">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="left" eType="#//Expression"
+ containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="right" eType="#//Expression"
+ containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Div" eSuperTypes="#//Expression">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="left" eType="#//Expression"
+ containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="right" eType="#//Expression"
+ containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="NumberLiteral" eSuperTypes="#//Expression">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBigDecimal"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="FunctionCall" eSuperTypes="#//Expression">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="func" eType="#//AbstractDefinition"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="args" upperBound="-1" eType="#//Expression"
+ containment="true"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/Arithmetics.genmodel b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/Arithmetics.genmodel
new file mode 100644
index 0000000..eb1add2
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/Arithmetics.genmodel
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.eclipse.xtext.example.arithmetics/src-gen"
+ editDirectory="/org.eclipse.xtext.example.arithmetics.edit/src" editorDirectory="/org.eclipse.xtext.example.arithmetics.editor/src"
+ modelPluginID="org.eclipse.xtext.example.arithmetics" forceOverwrite="true" modelName="Arithmetics"
+ updateClasspath="false" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container"
+ complianceLevel="5.0" copyrightFields="false" editPluginID="org.eclipse.xtext.example.arithmetics.edit"
+ editorPluginID="org.eclipse.xtext.example.arithmetics.editor">
+ <genPackages prefix="Arithmetics" basePackage="org.eclipse.xtext.example.arithmetics"
+ disposableProviderFactory="true" ecorePackage="Arithmetics.ecore#/">
+ <genClasses ecoreClass="Arithmetics.ecore#//Module">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute Arithmetics.ecore#//Module/name"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Arithmetics.ecore#//Module/imports"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Arithmetics.ecore#//Module/statements"/>
+ </genClasses>
+ <genClasses ecoreClass="Arithmetics.ecore#//Import">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute Arithmetics.ecore#//Import/importedNamespace"/>
+ </genClasses>
+ <genClasses ecoreClass="Arithmetics.ecore#//Statement"/>
+ <genClasses ecoreClass="Arithmetics.ecore#//Definition">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Arithmetics.ecore#//Definition/args"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Arithmetics.ecore#//Definition/expr"/>
+ </genClasses>
+ <genClasses ecoreClass="Arithmetics.ecore#//DeclaredParameter"/>
+ <genClasses ecoreClass="Arithmetics.ecore#//AbstractDefinition">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute Arithmetics.ecore#//AbstractDefinition/name"/>
+ </genClasses>
+ <genClasses ecoreClass="Arithmetics.ecore#//Evaluation">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Arithmetics.ecore#//Evaluation/expression"/>
+ </genClasses>
+ <genClasses ecoreClass="Arithmetics.ecore#//Expression"/>
+ <genClasses ecoreClass="Arithmetics.ecore#//Plus">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Arithmetics.ecore#//Plus/left"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Arithmetics.ecore#//Plus/right"/>
+ </genClasses>
+ <genClasses ecoreClass="Arithmetics.ecore#//Minus">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Arithmetics.ecore#//Minus/left"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Arithmetics.ecore#//Minus/right"/>
+ </genClasses>
+ <genClasses ecoreClass="Arithmetics.ecore#//Multi">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Arithmetics.ecore#//Multi/left"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Arithmetics.ecore#//Multi/right"/>
+ </genClasses>
+ <genClasses ecoreClass="Arithmetics.ecore#//Div">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Arithmetics.ecore#//Div/left"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Arithmetics.ecore#//Div/right"/>
+ </genClasses>
+ <genClasses ecoreClass="Arithmetics.ecore#//NumberLiteral">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute Arithmetics.ecore#//NumberLiteral/value"/>
+ </genClasses>
+ <genClasses ecoreClass="Arithmetics.ecore#//FunctionCall">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference Arithmetics.ecore#//FunctionCall/func"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Arithmetics.ecore#//FunctionCall/args"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/Arithmetics.xmi b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/Arithmetics.xmi
new file mode 100644
index 0000000..cfae9a6
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/Arithmetics.xmi
@@ -0,0 +1,412 @@
+<?xml version="1.0" encoding="ASCII"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:xtext="http://www.eclipse.org/2008/Xtext">
+ <xtext:Grammar name="org.eclipse.xtext.example.arithmetics.Arithmetics" usedGrammars="/1">
+ <metamodelDeclarations xsi:type="xtext:ReferencedMetamodel" alias="ecore">
+ <ePackage href="http://www.eclipse.org/emf/2002/Ecore#/"/>
+ </metamodelDeclarations>
+ <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="arithmetics">
+ <ePackage href="http://www.eclipse.org/Xtext/example/Arithmetics#/"/>
+ </metamodelDeclarations>
+ <rules xsi:type="xtext:ParserRule" name="Module">
+ <type metamodel="/0/@metamodelDeclarations.1">
+ <classifier xsi:type="ecore:EClass" href="http://www.eclipse.org/Xtext/example/Arithmetics#//Module"/>
+ </type>
+ <alternatives xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Keyword" value="module"/>
+ <elements xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="/1/@rules.0"/>
+ </elements>
+ <elements xsi:type="xtext:Assignment" cardinality="*" feature="imports" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.1"/>
+ </elements>
+ <elements xsi:type="xtext:Assignment" cardinality="*" feature="statements" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.3"/>
+ </elements>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:ParserRule" name="Import">
+ <type metamodel="/0/@metamodelDeclarations.1">
+ <classifier xsi:type="ecore:EClass" href="http://www.eclipse.org/Xtext/example/Arithmetics#//Import"/>
+ </type>
+ <alternatives xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Keyword" value="import"/>
+ <elements xsi:type="xtext:Assignment" feature="importedNamespace" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.2"/>
+ </elements>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:ParserRule" name="ImportName">
+ <type metamodel="/0/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </type>
+ <alternatives xsi:type="xtext:Group">
+ <elements xsi:type="xtext:RuleCall" rule="/1/@rules.0"/>
+ <elements xsi:type="xtext:Group" cardinality="?">
+ <elements xsi:type="xtext:Keyword" value="."/>
+ <elements xsi:type="xtext:Keyword" value="*"/>
+ </elements>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:ParserRule" name="Statement">
+ <type metamodel="/0/@metamodelDeclarations.1">
+ <classifier xsi:type="ecore:EClass" href="http://www.eclipse.org/Xtext/example/Arithmetics#//Statement"/>
+ </type>
+ <alternatives xsi:type="xtext:Alternatives">
+ <elements xsi:type="xtext:RuleCall" rule="/0/@rules.4"/>
+ <elements xsi:type="xtext:RuleCall" rule="/0/@rules.7"/>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:ParserRule" name="Definition">
+ <type metamodel="/0/@metamodelDeclarations.1">
+ <classifier xsi:type="ecore:EClass" href="http://www.eclipse.org/Xtext/example/Arithmetics#//Definition"/>
+ </type>
+ <alternatives xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Keyword" value="def"/>
+ <elements xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="/1/@rules.0"/>
+ </elements>
+ <elements xsi:type="xtext:Group" cardinality="?">
+ <elements xsi:type="xtext:Keyword" value="("/>
+ <elements xsi:type="xtext:Assignment" feature="args" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.5"/>
+ </elements>
+ <elements xsi:type="xtext:Group" cardinality="*">
+ <elements xsi:type="xtext:Keyword" value=","/>
+ <elements xsi:type="xtext:Assignment" feature="args" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.5"/>
+ </elements>
+ </elements>
+ <elements xsi:type="xtext:Keyword" value=")"/>
+ </elements>
+ <elements xsi:type="xtext:Keyword" value=":"/>
+ <elements xsi:type="xtext:Assignment" feature="expr" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.8"/>
+ </elements>
+ <elements xsi:type="xtext:Keyword" value=";"/>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:ParserRule" name="DeclaredParameter">
+ <type metamodel="/0/@metamodelDeclarations.1">
+ <classifier xsi:type="ecore:EClass" href="http://www.eclipse.org/Xtext/example/Arithmetics#//DeclaredParameter"/>
+ </type>
+ <alternatives xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="/1/@rules.0"/>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:ParserRule" name="AbstractDefinition">
+ <type metamodel="/0/@metamodelDeclarations.1">
+ <classifier xsi:type="ecore:EClass" href="http://www.eclipse.org/Xtext/example/Arithmetics#//AbstractDefinition"/>
+ </type>
+ <alternatives xsi:type="xtext:Alternatives">
+ <elements xsi:type="xtext:RuleCall" rule="/0/@rules.4"/>
+ <elements xsi:type="xtext:RuleCall" rule="/0/@rules.5"/>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:ParserRule" name="Evaluation">
+ <type metamodel="/0/@metamodelDeclarations.1">
+ <classifier xsi:type="ecore:EClass" href="http://www.eclipse.org/Xtext/example/Arithmetics#//Evaluation"/>
+ </type>
+ <alternatives xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Assignment" feature="expression" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.8"/>
+ </elements>
+ <elements xsi:type="xtext:Keyword" value=";"/>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:ParserRule" name="Expression">
+ <type metamodel="/0/@metamodelDeclarations.1">
+ <classifier xsi:type="ecore:EClass" href="http://www.eclipse.org/Xtext/example/Arithmetics#//Expression"/>
+ </type>
+ <alternatives xsi:type="xtext:RuleCall" rule="/0/@rules.9"/>
+ </rules>
+ <rules xsi:type="xtext:ParserRule" name="Addition">
+ <type metamodel="/0/@metamodelDeclarations.1">
+ <classifier xsi:type="ecore:EClass" href="http://www.eclipse.org/Xtext/example/Arithmetics#//Expression"/>
+ </type>
+ <alternatives xsi:type="xtext:Group">
+ <elements xsi:type="xtext:RuleCall" rule="/0/@rules.10"/>
+ <elements xsi:type="xtext:Group" cardinality="*">
+ <elements xsi:type="xtext:Alternatives">
+ <elements xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Action" feature="left" operator="=">
+ <type metamodel="/0/@metamodelDeclarations.1">
+ <classifier xsi:type="ecore:EClass" href="http://www.eclipse.org/Xtext/example/Arithmetics#//Plus"/>
+ </type>
+ </elements>
+ <elements xsi:type="xtext:Keyword" value="+"/>
+ </elements>
+ <elements xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Action" feature="left" operator="=">
+ <type metamodel="/0/@metamodelDeclarations.1">
+ <classifier xsi:type="ecore:EClass" href="http://www.eclipse.org/Xtext/example/Arithmetics#//Minus"/>
+ </type>
+ </elements>
+ <elements xsi:type="xtext:Keyword" value="-"/>
+ </elements>
+ </elements>
+ <elements xsi:type="xtext:Assignment" feature="right" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.10"/>
+ </elements>
+ </elements>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:ParserRule" name="Multiplication">
+ <type metamodel="/0/@metamodelDeclarations.1">
+ <classifier xsi:type="ecore:EClass" href="http://www.eclipse.org/Xtext/example/Arithmetics#//Expression"/>
+ </type>
+ <alternatives xsi:type="xtext:Group">
+ <elements xsi:type="xtext:RuleCall" rule="/0/@rules.11"/>
+ <elements xsi:type="xtext:Group" cardinality="*">
+ <elements xsi:type="xtext:Alternatives">
+ <elements xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Action" feature="left" operator="=">
+ <type metamodel="/0/@metamodelDeclarations.1">
+ <classifier xsi:type="ecore:EClass" href="http://www.eclipse.org/Xtext/example/Arithmetics#//Multi"/>
+ </type>
+ </elements>
+ <elements xsi:type="xtext:Keyword" value="*"/>
+ </elements>
+ <elements xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Action" feature="left" operator="=">
+ <type metamodel="/0/@metamodelDeclarations.1">
+ <classifier xsi:type="ecore:EClass" href="http://www.eclipse.org/Xtext/example/Arithmetics#//Div"/>
+ </type>
+ </elements>
+ <elements xsi:type="xtext:Keyword" value="/"/>
+ </elements>
+ </elements>
+ <elements xsi:type="xtext:Assignment" feature="right" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.11"/>
+ </elements>
+ </elements>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:ParserRule" name="PrimaryExpression">
+ <type metamodel="/0/@metamodelDeclarations.1">
+ <classifier xsi:type="ecore:EClass" href="http://www.eclipse.org/Xtext/example/Arithmetics#//Expression"/>
+ </type>
+ <alternatives xsi:type="xtext:Alternatives">
+ <elements xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Keyword" value="("/>
+ <elements xsi:type="xtext:RuleCall" rule="/0/@rules.8"/>
+ <elements xsi:type="xtext:Keyword" value=")"/>
+ </elements>
+ <elements xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Action">
+ <type metamodel="/0/@metamodelDeclarations.1">
+ <classifier xsi:type="ecore:EClass" href="http://www.eclipse.org/Xtext/example/Arithmetics#//NumberLiteral"/>
+ </type>
+ </elements>
+ <elements xsi:type="xtext:Assignment" feature="value" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.12"/>
+ </elements>
+ </elements>
+ <elements xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Action">
+ <type metamodel="/0/@metamodelDeclarations.1">
+ <classifier xsi:type="ecore:EClass" href="http://www.eclipse.org/Xtext/example/Arithmetics#//FunctionCall"/>
+ </type>
+ </elements>
+ <elements xsi:type="xtext:Assignment" feature="func" operator="=">
+ <terminal xsi:type="xtext:CrossReference">
+ <type metamodel="/0/@metamodelDeclarations.1">
+ <classifier xsi:type="ecore:EClass" href="http://www.eclipse.org/Xtext/example/Arithmetics#//AbstractDefinition"/>
+ </type>
+ <terminal xsi:type="xtext:RuleCall" rule="/1/@rules.0"/>
+ </terminal>
+ </elements>
+ <elements xsi:type="xtext:Group" cardinality="?">
+ <elements xsi:type="xtext:Keyword" value="("/>
+ <elements xsi:type="xtext:Assignment" feature="args" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.8"/>
+ </elements>
+ <elements xsi:type="xtext:Group" cardinality="*">
+ <elements xsi:type="xtext:Keyword" value=","/>
+ <elements xsi:type="xtext:Assignment" feature="args" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.8"/>
+ </elements>
+ </elements>
+ <elements xsi:type="xtext:Keyword" value=")"/>
+ </elements>
+ </elements>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:TerminalRule" name="NUMBER">
+ <type metamodel="/0/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EBigDecimal"/>
+ </type>
+ <alternatives xsi:type="xtext:Group">
+ <elements xsi:type="xtext:CharacterRange" cardinality="*">
+ <left value="0"/>
+ <right value="9"/>
+ </elements>
+ <elements xsi:type="xtext:Group" cardinality="?">
+ <elements xsi:type="xtext:Keyword" value="."/>
+ <elements xsi:type="xtext:CharacterRange" cardinality="+">
+ <left value="0"/>
+ <right value="9"/>
+ </elements>
+ </elements>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:TerminalRule" name="INT">
+ <type metamodel="/0/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ </type>
+ <alternatives xsi:type="xtext:Keyword" value="this one has been deactivated"/>
+ </rules>
+ </xtext:Grammar>
+ <xtext:Grammar name="org.eclipse.xtext.common.Terminals" definesHiddenTokens="true" hiddenTokens="/1/@rules.5 /1/@rules.3 /1/@rules.4">
+ <metamodelDeclarations xsi:type="xtext:ReferencedMetamodel" alias="ecore">
+ <ePackage href="http://www.eclipse.org/emf/2002/Ecore#/"/>
+ </metamodelDeclarations>
+ <rules xsi:type="xtext:TerminalRule" name="ID">
+ <type metamodel="/1/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </type>
+ <alternatives xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Keyword" cardinality="?" value="^"/>
+ <elements xsi:type="xtext:Alternatives">
+ <elements xsi:type="xtext:CharacterRange">
+ <left value="a"/>
+ <right value="z"/>
+ </elements>
+ <elements xsi:type="xtext:CharacterRange">
+ <left value="A"/>
+ <right value="Z"/>
+ </elements>
+ <elements xsi:type="xtext:Keyword" value="_"/>
+ </elements>
+ <elements xsi:type="xtext:Alternatives" cardinality="*">
+ <elements xsi:type="xtext:CharacterRange">
+ <left value="a"/>
+ <right value="z"/>
+ </elements>
+ <elements xsi:type="xtext:CharacterRange">
+ <left value="A"/>
+ <right value="Z"/>
+ </elements>
+ <elements xsi:type="xtext:Keyword" value="_"/>
+ <elements xsi:type="xtext:CharacterRange">
+ <left value="0"/>
+ <right value="9"/>
+ </elements>
+ </elements>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:TerminalRule" name="INT">
+ <type metamodel="/1/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ </type>
+ <alternatives xsi:type="xtext:CharacterRange" cardinality="+">
+ <left value="0"/>
+ <right value="9"/>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:TerminalRule" name="STRING">
+ <type metamodel="/1/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </type>
+ <alternatives xsi:type="xtext:Alternatives">
+ <elements xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Keyword" value="""/>
+ <elements xsi:type="xtext:Alternatives" cardinality="*">
+ <elements xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Keyword" value="\"/>
+ <elements xsi:type="xtext:Alternatives">
+ <elements xsi:type="xtext:Keyword" value="b"/>
+ <elements xsi:type="xtext:Keyword" value="t"/>
+ <elements xsi:type="xtext:Keyword" value="n"/>
+ <elements xsi:type="xtext:Keyword" value="f"/>
+ <elements xsi:type="xtext:Keyword" value="r"/>
+ <elements xsi:type="xtext:Keyword" value="u"/>
+ <elements xsi:type="xtext:Keyword" value="""/>
+ <elements xsi:type="xtext:Keyword" value="'"/>
+ <elements xsi:type="xtext:Keyword" value="\"/>
+ </elements>
+ </elements>
+ <elements xsi:type="xtext:NegatedToken">
+ <terminal xsi:type="xtext:Alternatives">
+ <elements xsi:type="xtext:Keyword" value="\"/>
+ <elements xsi:type="xtext:Keyword" value="""/>
+ </terminal>
+ </elements>
+ </elements>
+ <elements xsi:type="xtext:Keyword" value="""/>
+ </elements>
+ <elements xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Keyword" value="'"/>
+ <elements xsi:type="xtext:Alternatives" cardinality="*">
+ <elements xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Keyword" value="\"/>
+ <elements xsi:type="xtext:Alternatives">
+ <elements xsi:type="xtext:Keyword" value="b"/>
+ <elements xsi:type="xtext:Keyword" value="t"/>
+ <elements xsi:type="xtext:Keyword" value="n"/>
+ <elements xsi:type="xtext:Keyword" value="f"/>
+ <elements xsi:type="xtext:Keyword" value="r"/>
+ <elements xsi:type="xtext:Keyword" value="u"/>
+ <elements xsi:type="xtext:Keyword" value="""/>
+ <elements xsi:type="xtext:Keyword" value="'"/>
+ <elements xsi:type="xtext:Keyword" value="\"/>
+ </elements>
+ </elements>
+ <elements xsi:type="xtext:NegatedToken">
+ <terminal xsi:type="xtext:Alternatives">
+ <elements xsi:type="xtext:Keyword" value="\"/>
+ <elements xsi:type="xtext:Keyword" value="'"/>
+ </terminal>
+ </elements>
+ </elements>
+ <elements xsi:type="xtext:Keyword" value="'"/>
+ </elements>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:TerminalRule" name="ML_COMMENT">
+ <type metamodel="/1/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </type>
+ <alternatives xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Keyword" value="/*"/>
+ <elements xsi:type="xtext:UntilToken">
+ <terminal xsi:type="xtext:Keyword" value="*/"/>
+ </elements>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:TerminalRule" name="SL_COMMENT">
+ <type metamodel="/1/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </type>
+ <alternatives xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Keyword" value="//"/>
+ <elements xsi:type="xtext:NegatedToken" cardinality="*">
+ <terminal xsi:type="xtext:Alternatives">
+ <elements xsi:type="xtext:Keyword" value="
"/>
+ <elements xsi:type="xtext:Keyword" value="
"/>
+ </terminal>
+ </elements>
+ <elements xsi:type="xtext:Group" cardinality="?">
+ <elements xsi:type="xtext:Keyword" cardinality="?" value="
"/>
+ <elements xsi:type="xtext:Keyword" value="
"/>
+ </elements>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:TerminalRule" name="WS">
+ <type metamodel="/1/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </type>
+ <alternatives xsi:type="xtext:Alternatives" cardinality="+">
+ <elements xsi:type="xtext:Keyword" value=" "/>
+ <elements xsi:type="xtext:Keyword" value="	"/>
+ <elements xsi:type="xtext:Keyword" value="
"/>
+ <elements xsi:type="xtext:Keyword" value="
"/>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:TerminalRule" name="ANY_OTHER">
+ <type metamodel="/1/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </type>
+ <alternatives xsi:type="xtext:Wildcard"/>
+ </rules>
+ </xtext:Grammar>
+</xmi:XMI>
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/ArithmeticsStandaloneSetupGenerated.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/ArithmeticsStandaloneSetupGenerated.java
new file mode 100644
index 0000000..660da6d
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/ArithmeticsStandaloneSetupGenerated.java
@@ -0,0 +1,43 @@
+
+package org.eclipse.xtext.example.arithmetics;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.xtext.ISetup;
+import org.eclipse.emf.ecore.resource.Resource;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+/**
+ * Generated from StandaloneSetup.xpt!
+ */
+@SuppressWarnings("all")
+public class ArithmeticsStandaloneSetupGenerated implements ISetup {
+
+ public Injector createInjectorAndDoEMFRegistration() {
+ org.eclipse.xtext.common.TerminalsStandaloneSetup.doSetup();
+
+ Injector injector = createInjector();
+ register(injector);
+ return injector;
+ }
+
+ public Injector createInjector() {
+ return Guice.createInjector(new org.eclipse.xtext.example.arithmetics.ArithmeticsRuntimeModule());
+ }
+
+ public void register(Injector injector) {
+ if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/Xtext/example/Arithmetics")) {
+ EPackage.Registry.INSTANCE.put("http://www.eclipse.org/Xtext/example/Arithmetics", org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage.eINSTANCE);
+ }
+
+ org.eclipse.xtext.resource.IResourceFactory resourceFactory = injector.getInstance(org.eclipse.xtext.resource.IResourceFactory.class);
+ org.eclipse.xtext.resource.IResourceServiceProvider serviceProvider = injector.getInstance(org.eclipse.xtext.resource.IResourceServiceProvider.class);
+ Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("calc", resourceFactory);
+ org.eclipse.xtext.resource.IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("calc", serviceProvider);
+
+
+
+
+ }
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/AbstractDefinition.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/AbstractDefinition.java
new file mode 100644
index 0000000..6e213df
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/AbstractDefinition.java
@@ -0,0 +1,54 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.arithmetics.arithmetics;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Abstract Definition</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.xtext.example.arithmetics.arithmetics.AbstractDefinition#getName <em>Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage#getAbstractDefinition()
+ * @model
+ * @generated
+ */
+public interface AbstractDefinition extends EObject
+{
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage#getAbstractDefinition_Name()
+ * @model
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.xtext.example.arithmetics.arithmetics.AbstractDefinition#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+} // AbstractDefinition
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/ArithmeticsFactory.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/ArithmeticsFactory.java
new file mode 100644
index 0000000..d4cfaaa
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/ArithmeticsFactory.java
@@ -0,0 +1,163 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.arithmetics.arithmetics;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage
+ * @generated
+ */
+public interface ArithmeticsFactory extends EFactory
+{
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ ArithmeticsFactory eINSTANCE = org.eclipse.xtext.example.arithmetics.arithmetics.impl.ArithmeticsFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Module</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Module</em>'.
+ * @generated
+ */
+ Module createModule();
+
+ /**
+ * Returns a new object of class '<em>Import</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Import</em>'.
+ * @generated
+ */
+ Import createImport();
+
+ /**
+ * Returns a new object of class '<em>Statement</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Statement</em>'.
+ * @generated
+ */
+ Statement createStatement();
+
+ /**
+ * Returns a new object of class '<em>Definition</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Definition</em>'.
+ * @generated
+ */
+ Definition createDefinition();
+
+ /**
+ * Returns a new object of class '<em>Declared Parameter</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Declared Parameter</em>'.
+ * @generated
+ */
+ DeclaredParameter createDeclaredParameter();
+
+ /**
+ * Returns a new object of class '<em>Abstract Definition</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Abstract Definition</em>'.
+ * @generated
+ */
+ AbstractDefinition createAbstractDefinition();
+
+ /**
+ * Returns a new object of class '<em>Evaluation</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Evaluation</em>'.
+ * @generated
+ */
+ Evaluation createEvaluation();
+
+ /**
+ * Returns a new object of class '<em>Expression</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Expression</em>'.
+ * @generated
+ */
+ Expression createExpression();
+
+ /**
+ * Returns a new object of class '<em>Plus</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Plus</em>'.
+ * @generated
+ */
+ Plus createPlus();
+
+ /**
+ * Returns a new object of class '<em>Minus</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Minus</em>'.
+ * @generated
+ */
+ Minus createMinus();
+
+ /**
+ * Returns a new object of class '<em>Multi</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Multi</em>'.
+ * @generated
+ */
+ Multi createMulti();
+
+ /**
+ * Returns a new object of class '<em>Div</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Div</em>'.
+ * @generated
+ */
+ Div createDiv();
+
+ /**
+ * Returns a new object of class '<em>Number Literal</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Number Literal</em>'.
+ * @generated
+ */
+ NumberLiteral createNumberLiteral();
+
+ /**
+ * Returns a new object of class '<em>Function Call</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Function Call</em>'.
+ * @generated
+ */
+ FunctionCall createFunctionCall();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ ArithmeticsPackage getArithmeticsPackage();
+
+} //ArithmeticsFactory
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/ArithmeticsPackage.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/ArithmeticsPackage.java
new file mode 100644
index 0000000..6630d12
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/ArithmeticsPackage.java
@@ -0,0 +1,1184 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.arithmetics.arithmetics;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface ArithmeticsPackage extends EPackage
+{
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "arithmetics";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/Xtext/example/Arithmetics";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "arithmetics";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ ArithmeticsPackage eINSTANCE = org.eclipse.xtext.example.arithmetics.arithmetics.impl.ArithmeticsPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.ModuleImpl <em>Module</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.ModuleImpl
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.ArithmeticsPackageImpl#getModule()
+ * @generated
+ */
+ int MODULE = 0;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MODULE__NAME = 0;
+
+ /**
+ * The feature id for the '<em><b>Imports</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MODULE__IMPORTS = 1;
+
+ /**
+ * The feature id for the '<em><b>Statements</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MODULE__STATEMENTS = 2;
+
+ /**
+ * The number of structural features of the '<em>Module</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MODULE_FEATURE_COUNT = 3;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.ImportImpl <em>Import</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.ImportImpl
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.ArithmeticsPackageImpl#getImport()
+ * @generated
+ */
+ int IMPORT = 1;
+
+ /**
+ * The feature id for the '<em><b>Imported Namespace</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IMPORT__IMPORTED_NAMESPACE = 0;
+
+ /**
+ * The number of structural features of the '<em>Import</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IMPORT_FEATURE_COUNT = 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.StatementImpl <em>Statement</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.StatementImpl
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.ArithmeticsPackageImpl#getStatement()
+ * @generated
+ */
+ int STATEMENT = 2;
+
+ /**
+ * The number of structural features of the '<em>Statement</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STATEMENT_FEATURE_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.DefinitionImpl <em>Definition</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.DefinitionImpl
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.ArithmeticsPackageImpl#getDefinition()
+ * @generated
+ */
+ int DEFINITION = 3;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DEFINITION__NAME = STATEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Args</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DEFINITION__ARGS = STATEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Expr</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DEFINITION__EXPR = STATEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The number of structural features of the '<em>Definition</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DEFINITION_FEATURE_COUNT = STATEMENT_FEATURE_COUNT + 3;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.AbstractDefinitionImpl <em>Abstract Definition</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.AbstractDefinitionImpl
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.ArithmeticsPackageImpl#getAbstractDefinition()
+ * @generated
+ */
+ int ABSTRACT_DEFINITION = 5;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ABSTRACT_DEFINITION__NAME = 0;
+
+ /**
+ * The number of structural features of the '<em>Abstract Definition</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ABSTRACT_DEFINITION_FEATURE_COUNT = 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.DeclaredParameterImpl <em>Declared Parameter</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.DeclaredParameterImpl
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.ArithmeticsPackageImpl#getDeclaredParameter()
+ * @generated
+ */
+ int DECLARED_PARAMETER = 4;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DECLARED_PARAMETER__NAME = ABSTRACT_DEFINITION__NAME;
+
+ /**
+ * The number of structural features of the '<em>Declared Parameter</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DECLARED_PARAMETER_FEATURE_COUNT = ABSTRACT_DEFINITION_FEATURE_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.EvaluationImpl <em>Evaluation</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.EvaluationImpl
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.ArithmeticsPackageImpl#getEvaluation()
+ * @generated
+ */
+ int EVALUATION = 6;
+
+ /**
+ * The feature id for the '<em><b>Expression</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EVALUATION__EXPRESSION = STATEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Evaluation</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EVALUATION_FEATURE_COUNT = STATEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.ExpressionImpl <em>Expression</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.ExpressionImpl
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.ArithmeticsPackageImpl#getExpression()
+ * @generated
+ */
+ int EXPRESSION = 7;
+
+ /**
+ * The number of structural features of the '<em>Expression</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXPRESSION_FEATURE_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.PlusImpl <em>Plus</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.PlusImpl
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.ArithmeticsPackageImpl#getPlus()
+ * @generated
+ */
+ int PLUS = 8;
+
+ /**
+ * The feature id for the '<em><b>Left</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PLUS__LEFT = EXPRESSION_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Right</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PLUS__RIGHT = EXPRESSION_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Plus</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PLUS_FEATURE_COUNT = EXPRESSION_FEATURE_COUNT + 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.MinusImpl <em>Minus</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.MinusImpl
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.ArithmeticsPackageImpl#getMinus()
+ * @generated
+ */
+ int MINUS = 9;
+
+ /**
+ * The feature id for the '<em><b>Left</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MINUS__LEFT = EXPRESSION_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Right</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MINUS__RIGHT = EXPRESSION_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Minus</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MINUS_FEATURE_COUNT = EXPRESSION_FEATURE_COUNT + 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.MultiImpl <em>Multi</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.MultiImpl
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.ArithmeticsPackageImpl#getMulti()
+ * @generated
+ */
+ int MULTI = 10;
+
+ /**
+ * The feature id for the '<em><b>Left</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MULTI__LEFT = EXPRESSION_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Right</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MULTI__RIGHT = EXPRESSION_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Multi</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MULTI_FEATURE_COUNT = EXPRESSION_FEATURE_COUNT + 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.DivImpl <em>Div</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.DivImpl
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.ArithmeticsPackageImpl#getDiv()
+ * @generated
+ */
+ int DIV = 11;
+
+ /**
+ * The feature id for the '<em><b>Left</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DIV__LEFT = EXPRESSION_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Right</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DIV__RIGHT = EXPRESSION_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Div</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DIV_FEATURE_COUNT = EXPRESSION_FEATURE_COUNT + 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.NumberLiteralImpl <em>Number Literal</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.NumberLiteralImpl
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.ArithmeticsPackageImpl#getNumberLiteral()
+ * @generated
+ */
+ int NUMBER_LITERAL = 12;
+
+ /**
+ * The feature id for the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NUMBER_LITERAL__VALUE = EXPRESSION_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Number Literal</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NUMBER_LITERAL_FEATURE_COUNT = EXPRESSION_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.FunctionCallImpl <em>Function Call</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.FunctionCallImpl
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.ArithmeticsPackageImpl#getFunctionCall()
+ * @generated
+ */
+ int FUNCTION_CALL = 13;
+
+ /**
+ * The feature id for the '<em><b>Func</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FUNCTION_CALL__FUNC = EXPRESSION_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Args</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FUNCTION_CALL__ARGS = EXPRESSION_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Function Call</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FUNCTION_CALL_FEATURE_COUNT = EXPRESSION_FEATURE_COUNT + 2;
+
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Module <em>Module</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Module</em>'.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.Module
+ * @generated
+ */
+ EClass getModule();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Module#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.Module#getName()
+ * @see #getModule()
+ * @generated
+ */
+ EAttribute getModule_Name();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Module#getImports <em>Imports</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Imports</em>'.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.Module#getImports()
+ * @see #getModule()
+ * @generated
+ */
+ EReference getModule_Imports();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Module#getStatements <em>Statements</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Statements</em>'.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.Module#getStatements()
+ * @see #getModule()
+ * @generated
+ */
+ EReference getModule_Statements();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Import <em>Import</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Import</em>'.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.Import
+ * @generated
+ */
+ EClass getImport();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Import#getImportedNamespace <em>Imported Namespace</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Imported Namespace</em>'.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.Import#getImportedNamespace()
+ * @see #getImport()
+ * @generated
+ */
+ EAttribute getImport_ImportedNamespace();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Statement <em>Statement</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Statement</em>'.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.Statement
+ * @generated
+ */
+ EClass getStatement();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Definition <em>Definition</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Definition</em>'.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.Definition
+ * @generated
+ */
+ EClass getDefinition();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Definition#getArgs <em>Args</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Args</em>'.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.Definition#getArgs()
+ * @see #getDefinition()
+ * @generated
+ */
+ EReference getDefinition_Args();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Definition#getExpr <em>Expr</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Expr</em>'.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.Definition#getExpr()
+ * @see #getDefinition()
+ * @generated
+ */
+ EReference getDefinition_Expr();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.xtext.example.arithmetics.arithmetics.DeclaredParameter <em>Declared Parameter</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Declared Parameter</em>'.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.DeclaredParameter
+ * @generated
+ */
+ EClass getDeclaredParameter();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.xtext.example.arithmetics.arithmetics.AbstractDefinition <em>Abstract Definition</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Abstract Definition</em>'.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.AbstractDefinition
+ * @generated
+ */
+ EClass getAbstractDefinition();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.xtext.example.arithmetics.arithmetics.AbstractDefinition#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.AbstractDefinition#getName()
+ * @see #getAbstractDefinition()
+ * @generated
+ */
+ EAttribute getAbstractDefinition_Name();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Evaluation <em>Evaluation</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Evaluation</em>'.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.Evaluation
+ * @generated
+ */
+ EClass getEvaluation();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Evaluation#getExpression <em>Expression</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Expression</em>'.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.Evaluation#getExpression()
+ * @see #getEvaluation()
+ * @generated
+ */
+ EReference getEvaluation_Expression();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Expression <em>Expression</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Expression</em>'.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.Expression
+ * @generated
+ */
+ EClass getExpression();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Plus <em>Plus</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Plus</em>'.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.Plus
+ * @generated
+ */
+ EClass getPlus();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Plus#getLeft <em>Left</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Left</em>'.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.Plus#getLeft()
+ * @see #getPlus()
+ * @generated
+ */
+ EReference getPlus_Left();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Plus#getRight <em>Right</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Right</em>'.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.Plus#getRight()
+ * @see #getPlus()
+ * @generated
+ */
+ EReference getPlus_Right();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Minus <em>Minus</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Minus</em>'.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.Minus
+ * @generated
+ */
+ EClass getMinus();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Minus#getLeft <em>Left</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Left</em>'.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.Minus#getLeft()
+ * @see #getMinus()
+ * @generated
+ */
+ EReference getMinus_Left();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Minus#getRight <em>Right</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Right</em>'.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.Minus#getRight()
+ * @see #getMinus()
+ * @generated
+ */
+ EReference getMinus_Right();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Multi <em>Multi</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Multi</em>'.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.Multi
+ * @generated
+ */
+ EClass getMulti();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Multi#getLeft <em>Left</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Left</em>'.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.Multi#getLeft()
+ * @see #getMulti()
+ * @generated
+ */
+ EReference getMulti_Left();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Multi#getRight <em>Right</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Right</em>'.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.Multi#getRight()
+ * @see #getMulti()
+ * @generated
+ */
+ EReference getMulti_Right();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Div <em>Div</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Div</em>'.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.Div
+ * @generated
+ */
+ EClass getDiv();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Div#getLeft <em>Left</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Left</em>'.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.Div#getLeft()
+ * @see #getDiv()
+ * @generated
+ */
+ EReference getDiv_Left();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Div#getRight <em>Right</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Right</em>'.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.Div#getRight()
+ * @see #getDiv()
+ * @generated
+ */
+ EReference getDiv_Right();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.xtext.example.arithmetics.arithmetics.NumberLiteral <em>Number Literal</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Number Literal</em>'.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.NumberLiteral
+ * @generated
+ */
+ EClass getNumberLiteral();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.xtext.example.arithmetics.arithmetics.NumberLiteral#getValue <em>Value</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Value</em>'.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.NumberLiteral#getValue()
+ * @see #getNumberLiteral()
+ * @generated
+ */
+ EAttribute getNumberLiteral_Value();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.xtext.example.arithmetics.arithmetics.FunctionCall <em>Function Call</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Function Call</em>'.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.FunctionCall
+ * @generated
+ */
+ EClass getFunctionCall();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.xtext.example.arithmetics.arithmetics.FunctionCall#getFunc <em>Func</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Func</em>'.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.FunctionCall#getFunc()
+ * @see #getFunctionCall()
+ * @generated
+ */
+ EReference getFunctionCall_Func();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.xtext.example.arithmetics.arithmetics.FunctionCall#getArgs <em>Args</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Args</em>'.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.FunctionCall#getArgs()
+ * @see #getFunctionCall()
+ * @generated
+ */
+ EReference getFunctionCall_Args();
+
+ /**
+ * Returns the factory that creates the instances of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ ArithmeticsFactory getArithmeticsFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals
+ {
+ /**
+ * The meta object literal for the '{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.ModuleImpl <em>Module</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.ModuleImpl
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.ArithmeticsPackageImpl#getModule()
+ * @generated
+ */
+ EClass MODULE = eINSTANCE.getModule();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute MODULE__NAME = eINSTANCE.getModule_Name();
+
+ /**
+ * The meta object literal for the '<em><b>Imports</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference MODULE__IMPORTS = eINSTANCE.getModule_Imports();
+
+ /**
+ * The meta object literal for the '<em><b>Statements</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference MODULE__STATEMENTS = eINSTANCE.getModule_Statements();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.ImportImpl <em>Import</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.ImportImpl
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.ArithmeticsPackageImpl#getImport()
+ * @generated
+ */
+ EClass IMPORT = eINSTANCE.getImport();
+
+ /**
+ * The meta object literal for the '<em><b>Imported Namespace</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute IMPORT__IMPORTED_NAMESPACE = eINSTANCE.getImport_ImportedNamespace();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.StatementImpl <em>Statement</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.StatementImpl
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.ArithmeticsPackageImpl#getStatement()
+ * @generated
+ */
+ EClass STATEMENT = eINSTANCE.getStatement();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.DefinitionImpl <em>Definition</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.DefinitionImpl
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.ArithmeticsPackageImpl#getDefinition()
+ * @generated
+ */
+ EClass DEFINITION = eINSTANCE.getDefinition();
+
+ /**
+ * The meta object literal for the '<em><b>Args</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference DEFINITION__ARGS = eINSTANCE.getDefinition_Args();
+
+ /**
+ * The meta object literal for the '<em><b>Expr</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference DEFINITION__EXPR = eINSTANCE.getDefinition_Expr();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.DeclaredParameterImpl <em>Declared Parameter</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.DeclaredParameterImpl
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.ArithmeticsPackageImpl#getDeclaredParameter()
+ * @generated
+ */
+ EClass DECLARED_PARAMETER = eINSTANCE.getDeclaredParameter();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.AbstractDefinitionImpl <em>Abstract Definition</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.AbstractDefinitionImpl
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.ArithmeticsPackageImpl#getAbstractDefinition()
+ * @generated
+ */
+ EClass ABSTRACT_DEFINITION = eINSTANCE.getAbstractDefinition();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute ABSTRACT_DEFINITION__NAME = eINSTANCE.getAbstractDefinition_Name();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.EvaluationImpl <em>Evaluation</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.EvaluationImpl
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.ArithmeticsPackageImpl#getEvaluation()
+ * @generated
+ */
+ EClass EVALUATION = eINSTANCE.getEvaluation();
+
+ /**
+ * The meta object literal for the '<em><b>Expression</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference EVALUATION__EXPRESSION = eINSTANCE.getEvaluation_Expression();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.ExpressionImpl <em>Expression</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.ExpressionImpl
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.ArithmeticsPackageImpl#getExpression()
+ * @generated
+ */
+ EClass EXPRESSION = eINSTANCE.getExpression();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.PlusImpl <em>Plus</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.PlusImpl
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.ArithmeticsPackageImpl#getPlus()
+ * @generated
+ */
+ EClass PLUS = eINSTANCE.getPlus();
+
+ /**
+ * The meta object literal for the '<em><b>Left</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PLUS__LEFT = eINSTANCE.getPlus_Left();
+
+ /**
+ * The meta object literal for the '<em><b>Right</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PLUS__RIGHT = eINSTANCE.getPlus_Right();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.MinusImpl <em>Minus</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.MinusImpl
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.ArithmeticsPackageImpl#getMinus()
+ * @generated
+ */
+ EClass MINUS = eINSTANCE.getMinus();
+
+ /**
+ * The meta object literal for the '<em><b>Left</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference MINUS__LEFT = eINSTANCE.getMinus_Left();
+
+ /**
+ * The meta object literal for the '<em><b>Right</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference MINUS__RIGHT = eINSTANCE.getMinus_Right();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.MultiImpl <em>Multi</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.MultiImpl
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.ArithmeticsPackageImpl#getMulti()
+ * @generated
+ */
+ EClass MULTI = eINSTANCE.getMulti();
+
+ /**
+ * The meta object literal for the '<em><b>Left</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference MULTI__LEFT = eINSTANCE.getMulti_Left();
+
+ /**
+ * The meta object literal for the '<em><b>Right</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference MULTI__RIGHT = eINSTANCE.getMulti_Right();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.DivImpl <em>Div</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.DivImpl
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.ArithmeticsPackageImpl#getDiv()
+ * @generated
+ */
+ EClass DIV = eINSTANCE.getDiv();
+
+ /**
+ * The meta object literal for the '<em><b>Left</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference DIV__LEFT = eINSTANCE.getDiv_Left();
+
+ /**
+ * The meta object literal for the '<em><b>Right</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference DIV__RIGHT = eINSTANCE.getDiv_Right();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.NumberLiteralImpl <em>Number Literal</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.NumberLiteralImpl
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.ArithmeticsPackageImpl#getNumberLiteral()
+ * @generated
+ */
+ EClass NUMBER_LITERAL = eINSTANCE.getNumberLiteral();
+
+ /**
+ * The meta object literal for the '<em><b>Value</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute NUMBER_LITERAL__VALUE = eINSTANCE.getNumberLiteral_Value();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.FunctionCallImpl <em>Function Call</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.FunctionCallImpl
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.impl.ArithmeticsPackageImpl#getFunctionCall()
+ * @generated
+ */
+ EClass FUNCTION_CALL = eINSTANCE.getFunctionCall();
+
+ /**
+ * The meta object literal for the '<em><b>Func</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference FUNCTION_CALL__FUNC = eINSTANCE.getFunctionCall_Func();
+
+ /**
+ * The meta object literal for the '<em><b>Args</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference FUNCTION_CALL__ARGS = eINSTANCE.getFunctionCall_Args();
+
+ }
+
+} //ArithmeticsPackage
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/DeclaredParameter.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/DeclaredParameter.java
new file mode 100644
index 0000000..cdf36a8
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/DeclaredParameter.java
@@ -0,0 +1,21 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.arithmetics.arithmetics;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Declared Parameter</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage#getDeclaredParameter()
+ * @model
+ * @generated
+ */
+public interface DeclaredParameter extends AbstractDefinition
+{
+} // DeclaredParameter
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/Definition.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/Definition.java
new file mode 100644
index 0000000..b25b363
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/Definition.java
@@ -0,0 +1,71 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.arithmetics.arithmetics;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Definition</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.xtext.example.arithmetics.arithmetics.Definition#getArgs <em>Args</em>}</li>
+ * <li>{@link org.eclipse.xtext.example.arithmetics.arithmetics.Definition#getExpr <em>Expr</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage#getDefinition()
+ * @model
+ * @generated
+ */
+public interface Definition extends Statement, AbstractDefinition
+{
+ /**
+ * Returns the value of the '<em><b>Args</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.xtext.example.arithmetics.arithmetics.DeclaredParameter}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Args</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Args</em>' containment reference list.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage#getDefinition_Args()
+ * @model containment="true"
+ * @generated
+ */
+ EList<DeclaredParameter> getArgs();
+
+ /**
+ * Returns the value of the '<em><b>Expr</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Expr</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Expr</em>' containment reference.
+ * @see #setExpr(Expression)
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage#getDefinition_Expr()
+ * @model containment="true"
+ * @generated
+ */
+ Expression getExpr();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Definition#getExpr <em>Expr</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Expr</em>' containment reference.
+ * @see #getExpr()
+ * @generated
+ */
+ void setExpr(Expression value);
+
+} // Definition
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/Div.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/Div.java
new file mode 100644
index 0000000..7c58c75
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/Div.java
@@ -0,0 +1,80 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.arithmetics.arithmetics;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Div</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.xtext.example.arithmetics.arithmetics.Div#getLeft <em>Left</em>}</li>
+ * <li>{@link org.eclipse.xtext.example.arithmetics.arithmetics.Div#getRight <em>Right</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage#getDiv()
+ * @model
+ * @generated
+ */
+public interface Div extends Expression
+{
+ /**
+ * Returns the value of the '<em><b>Left</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Left</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Left</em>' containment reference.
+ * @see #setLeft(Expression)
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage#getDiv_Left()
+ * @model containment="true"
+ * @generated
+ */
+ Expression getLeft();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Div#getLeft <em>Left</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Left</em>' containment reference.
+ * @see #getLeft()
+ * @generated
+ */
+ void setLeft(Expression value);
+
+ /**
+ * Returns the value of the '<em><b>Right</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Right</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Right</em>' containment reference.
+ * @see #setRight(Expression)
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage#getDiv_Right()
+ * @model containment="true"
+ * @generated
+ */
+ Expression getRight();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Div#getRight <em>Right</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Right</em>' containment reference.
+ * @see #getRight()
+ * @generated
+ */
+ void setRight(Expression value);
+
+} // Div
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/Evaluation.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/Evaluation.java
new file mode 100644
index 0000000..d1aca16
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/Evaluation.java
@@ -0,0 +1,53 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.arithmetics.arithmetics;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Evaluation</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.xtext.example.arithmetics.arithmetics.Evaluation#getExpression <em>Expression</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage#getEvaluation()
+ * @model
+ * @generated
+ */
+public interface Evaluation extends Statement
+{
+ /**
+ * Returns the value of the '<em><b>Expression</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Expression</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Expression</em>' containment reference.
+ * @see #setExpression(Expression)
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage#getEvaluation_Expression()
+ * @model containment="true"
+ * @generated
+ */
+ Expression getExpression();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Evaluation#getExpression <em>Expression</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Expression</em>' containment reference.
+ * @see #getExpression()
+ * @generated
+ */
+ void setExpression(Expression value);
+
+} // Evaluation
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/Expression.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/Expression.java
new file mode 100644
index 0000000..f3ac614
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/Expression.java
@@ -0,0 +1,22 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.arithmetics.arithmetics;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Expression</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage#getExpression()
+ * @model
+ * @generated
+ */
+public interface Expression extends EObject
+{
+} // Expression
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/FunctionCall.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/FunctionCall.java
new file mode 100644
index 0000000..8b601e3
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/FunctionCall.java
@@ -0,0 +1,71 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.arithmetics.arithmetics;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Function Call</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.xtext.example.arithmetics.arithmetics.FunctionCall#getFunc <em>Func</em>}</li>
+ * <li>{@link org.eclipse.xtext.example.arithmetics.arithmetics.FunctionCall#getArgs <em>Args</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage#getFunctionCall()
+ * @model
+ * @generated
+ */
+public interface FunctionCall extends Expression
+{
+ /**
+ * Returns the value of the '<em><b>Func</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Func</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Func</em>' reference.
+ * @see #setFunc(AbstractDefinition)
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage#getFunctionCall_Func()
+ * @model
+ * @generated
+ */
+ AbstractDefinition getFunc();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.xtext.example.arithmetics.arithmetics.FunctionCall#getFunc <em>Func</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Func</em>' reference.
+ * @see #getFunc()
+ * @generated
+ */
+ void setFunc(AbstractDefinition value);
+
+ /**
+ * Returns the value of the '<em><b>Args</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.xtext.example.arithmetics.arithmetics.Expression}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Args</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Args</em>' containment reference list.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage#getFunctionCall_Args()
+ * @model containment="true"
+ * @generated
+ */
+ EList<Expression> getArgs();
+
+} // FunctionCall
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/Import.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/Import.java
new file mode 100644
index 0000000..b077e1e
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/Import.java
@@ -0,0 +1,54 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.arithmetics.arithmetics;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Import</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.xtext.example.arithmetics.arithmetics.Import#getImportedNamespace <em>Imported Namespace</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage#getImport()
+ * @model
+ * @generated
+ */
+public interface Import extends EObject
+{
+ /**
+ * Returns the value of the '<em><b>Imported Namespace</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Imported Namespace</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Imported Namespace</em>' attribute.
+ * @see #setImportedNamespace(String)
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage#getImport_ImportedNamespace()
+ * @model
+ * @generated
+ */
+ String getImportedNamespace();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Import#getImportedNamespace <em>Imported Namespace</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Imported Namespace</em>' attribute.
+ * @see #getImportedNamespace()
+ * @generated
+ */
+ void setImportedNamespace(String value);
+
+} // Import
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/Minus.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/Minus.java
new file mode 100644
index 0000000..eeeb68e
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/Minus.java
@@ -0,0 +1,80 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.arithmetics.arithmetics;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Minus</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.xtext.example.arithmetics.arithmetics.Minus#getLeft <em>Left</em>}</li>
+ * <li>{@link org.eclipse.xtext.example.arithmetics.arithmetics.Minus#getRight <em>Right</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage#getMinus()
+ * @model
+ * @generated
+ */
+public interface Minus extends Expression
+{
+ /**
+ * Returns the value of the '<em><b>Left</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Left</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Left</em>' containment reference.
+ * @see #setLeft(Expression)
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage#getMinus_Left()
+ * @model containment="true"
+ * @generated
+ */
+ Expression getLeft();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Minus#getLeft <em>Left</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Left</em>' containment reference.
+ * @see #getLeft()
+ * @generated
+ */
+ void setLeft(Expression value);
+
+ /**
+ * Returns the value of the '<em><b>Right</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Right</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Right</em>' containment reference.
+ * @see #setRight(Expression)
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage#getMinus_Right()
+ * @model containment="true"
+ * @generated
+ */
+ Expression getRight();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Minus#getRight <em>Right</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Right</em>' containment reference.
+ * @see #getRight()
+ * @generated
+ */
+ void setRight(Expression value);
+
+} // Minus
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/Module.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/Module.java
new file mode 100644
index 0000000..e09c39e
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/Module.java
@@ -0,0 +1,90 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.arithmetics.arithmetics;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Module</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.xtext.example.arithmetics.arithmetics.Module#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.xtext.example.arithmetics.arithmetics.Module#getImports <em>Imports</em>}</li>
+ * <li>{@link org.eclipse.xtext.example.arithmetics.arithmetics.Module#getStatements <em>Statements</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage#getModule()
+ * @model
+ * @generated
+ */
+public interface Module extends EObject
+{
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage#getModule_Name()
+ * @model
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Module#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Imports</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.xtext.example.arithmetics.arithmetics.Import}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Imports</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Imports</em>' containment reference list.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage#getModule_Imports()
+ * @model containment="true"
+ * @generated
+ */
+ EList<Import> getImports();
+
+ /**
+ * Returns the value of the '<em><b>Statements</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.xtext.example.arithmetics.arithmetics.Statement}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Statements</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Statements</em>' containment reference list.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage#getModule_Statements()
+ * @model containment="true"
+ * @generated
+ */
+ EList<Statement> getStatements();
+
+} // Module
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/Multi.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/Multi.java
new file mode 100644
index 0000000..9f4576c
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/Multi.java
@@ -0,0 +1,80 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.arithmetics.arithmetics;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Multi</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.xtext.example.arithmetics.arithmetics.Multi#getLeft <em>Left</em>}</li>
+ * <li>{@link org.eclipse.xtext.example.arithmetics.arithmetics.Multi#getRight <em>Right</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage#getMulti()
+ * @model
+ * @generated
+ */
+public interface Multi extends Expression
+{
+ /**
+ * Returns the value of the '<em><b>Left</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Left</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Left</em>' containment reference.
+ * @see #setLeft(Expression)
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage#getMulti_Left()
+ * @model containment="true"
+ * @generated
+ */
+ Expression getLeft();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Multi#getLeft <em>Left</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Left</em>' containment reference.
+ * @see #getLeft()
+ * @generated
+ */
+ void setLeft(Expression value);
+
+ /**
+ * Returns the value of the '<em><b>Right</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Right</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Right</em>' containment reference.
+ * @see #setRight(Expression)
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage#getMulti_Right()
+ * @model containment="true"
+ * @generated
+ */
+ Expression getRight();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Multi#getRight <em>Right</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Right</em>' containment reference.
+ * @see #getRight()
+ * @generated
+ */
+ void setRight(Expression value);
+
+} // Multi
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/NumberLiteral.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/NumberLiteral.java
new file mode 100644
index 0000000..230c4ee
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/NumberLiteral.java
@@ -0,0 +1,54 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.arithmetics.arithmetics;
+
+import java.math.BigDecimal;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Number Literal</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.xtext.example.arithmetics.arithmetics.NumberLiteral#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage#getNumberLiteral()
+ * @model
+ * @generated
+ */
+public interface NumberLiteral extends Expression
+{
+ /**
+ * Returns the value of the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Value</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Value</em>' attribute.
+ * @see #setValue(BigDecimal)
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage#getNumberLiteral_Value()
+ * @model
+ * @generated
+ */
+ BigDecimal getValue();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.xtext.example.arithmetics.arithmetics.NumberLiteral#getValue <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Value</em>' attribute.
+ * @see #getValue()
+ * @generated
+ */
+ void setValue(BigDecimal value);
+
+} // NumberLiteral
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/Plus.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/Plus.java
new file mode 100644
index 0000000..8b0af1b
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/Plus.java
@@ -0,0 +1,80 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.arithmetics.arithmetics;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Plus</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.xtext.example.arithmetics.arithmetics.Plus#getLeft <em>Left</em>}</li>
+ * <li>{@link org.eclipse.xtext.example.arithmetics.arithmetics.Plus#getRight <em>Right</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage#getPlus()
+ * @model
+ * @generated
+ */
+public interface Plus extends Expression
+{
+ /**
+ * Returns the value of the '<em><b>Left</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Left</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Left</em>' containment reference.
+ * @see #setLeft(Expression)
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage#getPlus_Left()
+ * @model containment="true"
+ * @generated
+ */
+ Expression getLeft();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Plus#getLeft <em>Left</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Left</em>' containment reference.
+ * @see #getLeft()
+ * @generated
+ */
+ void setLeft(Expression value);
+
+ /**
+ * Returns the value of the '<em><b>Right</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Right</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Right</em>' containment reference.
+ * @see #setRight(Expression)
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage#getPlus_Right()
+ * @model containment="true"
+ * @generated
+ */
+ Expression getRight();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Plus#getRight <em>Right</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Right</em>' containment reference.
+ * @see #getRight()
+ * @generated
+ */
+ void setRight(Expression value);
+
+} // Plus
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/Statement.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/Statement.java
new file mode 100644
index 0000000..56396b0
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/Statement.java
@@ -0,0 +1,22 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.arithmetics.arithmetics;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Statement</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage#getStatement()
+ * @model
+ * @generated
+ */
+public interface Statement extends EObject
+{
+} // Statement
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/AbstractDefinitionImpl.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/AbstractDefinitionImpl.java
new file mode 100644
index 0000000..b5ec90e
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/AbstractDefinitionImpl.java
@@ -0,0 +1,180 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.arithmetics.arithmetics.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.xtext.example.arithmetics.arithmetics.AbstractDefinition;
+import org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Abstract Definition</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.AbstractDefinitionImpl#getName <em>Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class AbstractDefinitionImpl extends MinimalEObjectImpl.Container implements AbstractDefinition
+{
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected AbstractDefinitionImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return ArithmeticsPackage.Literals.ABSTRACT_DEFINITION;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName)
+ {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ArithmeticsPackage.ABSTRACT_DEFINITION__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.ABSTRACT_DEFINITION__NAME:
+ return getName();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.ABSTRACT_DEFINITION__NAME:
+ setName((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.ABSTRACT_DEFINITION__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.ABSTRACT_DEFINITION__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString()
+ {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (name: ");
+ result.append(name);
+ result.append(')');
+ return result.toString();
+ }
+
+} //AbstractDefinitionImpl
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/ArithmeticsFactoryImpl.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/ArithmeticsFactoryImpl.java
new file mode 100644
index 0000000..ecb0d53
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/ArithmeticsFactoryImpl.java
@@ -0,0 +1,265 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.arithmetics.arithmetics.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+import org.eclipse.xtext.example.arithmetics.arithmetics.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ArithmeticsFactoryImpl extends EFactoryImpl implements ArithmeticsFactory
+{
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static ArithmeticsFactory init()
+ {
+ try
+ {
+ ArithmeticsFactory theArithmeticsFactory = (ArithmeticsFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/Xtext/example/Arithmetics");
+ if (theArithmeticsFactory != null)
+ {
+ return theArithmeticsFactory;
+ }
+ }
+ catch (Exception exception)
+ {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new ArithmeticsFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ArithmeticsFactoryImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass)
+ {
+ switch (eClass.getClassifierID())
+ {
+ case ArithmeticsPackage.MODULE: return createModule();
+ case ArithmeticsPackage.IMPORT: return createImport();
+ case ArithmeticsPackage.STATEMENT: return createStatement();
+ case ArithmeticsPackage.DEFINITION: return createDefinition();
+ case ArithmeticsPackage.DECLARED_PARAMETER: return createDeclaredParameter();
+ case ArithmeticsPackage.ABSTRACT_DEFINITION: return createAbstractDefinition();
+ case ArithmeticsPackage.EVALUATION: return createEvaluation();
+ case ArithmeticsPackage.EXPRESSION: return createExpression();
+ case ArithmeticsPackage.PLUS: return createPlus();
+ case ArithmeticsPackage.MINUS: return createMinus();
+ case ArithmeticsPackage.MULTI: return createMulti();
+ case ArithmeticsPackage.DIV: return createDiv();
+ case ArithmeticsPackage.NUMBER_LITERAL: return createNumberLiteral();
+ case ArithmeticsPackage.FUNCTION_CALL: return createFunctionCall();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Module createModule()
+ {
+ ModuleImpl module = new ModuleImpl();
+ return module;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Import createImport()
+ {
+ ImportImpl import_ = new ImportImpl();
+ return import_;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Statement createStatement()
+ {
+ StatementImpl statement = new StatementImpl();
+ return statement;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Definition createDefinition()
+ {
+ DefinitionImpl definition = new DefinitionImpl();
+ return definition;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public DeclaredParameter createDeclaredParameter()
+ {
+ DeclaredParameterImpl declaredParameter = new DeclaredParameterImpl();
+ return declaredParameter;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public AbstractDefinition createAbstractDefinition()
+ {
+ AbstractDefinitionImpl abstractDefinition = new AbstractDefinitionImpl();
+ return abstractDefinition;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Evaluation createEvaluation()
+ {
+ EvaluationImpl evaluation = new EvaluationImpl();
+ return evaluation;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Expression createExpression()
+ {
+ ExpressionImpl expression = new ExpressionImpl();
+ return expression;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Plus createPlus()
+ {
+ PlusImpl plus = new PlusImpl();
+ return plus;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Minus createMinus()
+ {
+ MinusImpl minus = new MinusImpl();
+ return minus;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Multi createMulti()
+ {
+ MultiImpl multi = new MultiImpl();
+ return multi;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Div createDiv()
+ {
+ DivImpl div = new DivImpl();
+ return div;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NumberLiteral createNumberLiteral()
+ {
+ NumberLiteralImpl numberLiteral = new NumberLiteralImpl();
+ return numberLiteral;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FunctionCall createFunctionCall()
+ {
+ FunctionCallImpl functionCall = new FunctionCallImpl();
+ return functionCall;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ArithmeticsPackage getArithmeticsPackage()
+ {
+ return (ArithmeticsPackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static ArithmeticsPackage getPackage()
+ {
+ return ArithmeticsPackage.eINSTANCE;
+ }
+
+} //ArithmeticsFactoryImpl
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/ArithmeticsPackageImpl.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/ArithmeticsPackageImpl.java
new file mode 100644
index 0000000..91b1d9f
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/ArithmeticsPackageImpl.java
@@ -0,0 +1,701 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.arithmetics.arithmetics.impl;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+import org.eclipse.xtext.example.arithmetics.arithmetics.AbstractDefinition;
+import org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsFactory;
+import org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage;
+import org.eclipse.xtext.example.arithmetics.arithmetics.DeclaredParameter;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Definition;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Div;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Evaluation;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Expression;
+import org.eclipse.xtext.example.arithmetics.arithmetics.FunctionCall;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Import;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Minus;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Module;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Multi;
+import org.eclipse.xtext.example.arithmetics.arithmetics.NumberLiteral;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Plus;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Statement;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ArithmeticsPackageImpl extends EPackageImpl implements ArithmeticsPackage
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass moduleEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass importEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass statementEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass definitionEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass declaredParameterEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass abstractDefinitionEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass evaluationEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass expressionEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass plusEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass minusEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass multiEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass divEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass numberLiteralEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass functionCallEClass = null;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * <p>Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private ArithmeticsPackageImpl()
+ {
+ super(eNS_URI, ArithmeticsFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>This method is used to initialize {@link ArithmeticsPackage#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static ArithmeticsPackage init()
+ {
+ if (isInited) return (ArithmeticsPackage)EPackage.Registry.INSTANCE.getEPackage(ArithmeticsPackage.eNS_URI);
+
+ // Obtain or create and register package
+ ArithmeticsPackageImpl theArithmeticsPackage = (ArithmeticsPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ArithmeticsPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ArithmeticsPackageImpl());
+
+ isInited = true;
+
+ // Create package meta-data objects
+ theArithmeticsPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theArithmeticsPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theArithmeticsPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(ArithmeticsPackage.eNS_URI, theArithmeticsPackage);
+ return theArithmeticsPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getModule()
+ {
+ return moduleEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getModule_Name()
+ {
+ return (EAttribute)moduleEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getModule_Imports()
+ {
+ return (EReference)moduleEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getModule_Statements()
+ {
+ return (EReference)moduleEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getImport()
+ {
+ return importEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getImport_ImportedNamespace()
+ {
+ return (EAttribute)importEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getStatement()
+ {
+ return statementEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getDefinition()
+ {
+ return definitionEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getDefinition_Args()
+ {
+ return (EReference)definitionEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getDefinition_Expr()
+ {
+ return (EReference)definitionEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getDeclaredParameter()
+ {
+ return declaredParameterEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getAbstractDefinition()
+ {
+ return abstractDefinitionEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getAbstractDefinition_Name()
+ {
+ return (EAttribute)abstractDefinitionEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getEvaluation()
+ {
+ return evaluationEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getEvaluation_Expression()
+ {
+ return (EReference)evaluationEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getExpression()
+ {
+ return expressionEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getPlus()
+ {
+ return plusEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPlus_Left()
+ {
+ return (EReference)plusEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPlus_Right()
+ {
+ return (EReference)plusEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getMinus()
+ {
+ return minusEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getMinus_Left()
+ {
+ return (EReference)minusEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getMinus_Right()
+ {
+ return (EReference)minusEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getMulti()
+ {
+ return multiEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getMulti_Left()
+ {
+ return (EReference)multiEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getMulti_Right()
+ {
+ return (EReference)multiEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getDiv()
+ {
+ return divEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getDiv_Left()
+ {
+ return (EReference)divEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getDiv_Right()
+ {
+ return (EReference)divEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getNumberLiteral()
+ {
+ return numberLiteralEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getNumberLiteral_Value()
+ {
+ return (EAttribute)numberLiteralEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getFunctionCall()
+ {
+ return functionCallEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getFunctionCall_Func()
+ {
+ return (EReference)functionCallEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getFunctionCall_Args()
+ {
+ return (EReference)functionCallEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ArithmeticsFactory getArithmeticsFactory()
+ {
+ return (ArithmeticsFactory)getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createPackageContents()
+ {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ moduleEClass = createEClass(MODULE);
+ createEAttribute(moduleEClass, MODULE__NAME);
+ createEReference(moduleEClass, MODULE__IMPORTS);
+ createEReference(moduleEClass, MODULE__STATEMENTS);
+
+ importEClass = createEClass(IMPORT);
+ createEAttribute(importEClass, IMPORT__IMPORTED_NAMESPACE);
+
+ statementEClass = createEClass(STATEMENT);
+
+ definitionEClass = createEClass(DEFINITION);
+ createEReference(definitionEClass, DEFINITION__ARGS);
+ createEReference(definitionEClass, DEFINITION__EXPR);
+
+ declaredParameterEClass = createEClass(DECLARED_PARAMETER);
+
+ abstractDefinitionEClass = createEClass(ABSTRACT_DEFINITION);
+ createEAttribute(abstractDefinitionEClass, ABSTRACT_DEFINITION__NAME);
+
+ evaluationEClass = createEClass(EVALUATION);
+ createEReference(evaluationEClass, EVALUATION__EXPRESSION);
+
+ expressionEClass = createEClass(EXPRESSION);
+
+ plusEClass = createEClass(PLUS);
+ createEReference(plusEClass, PLUS__LEFT);
+ createEReference(plusEClass, PLUS__RIGHT);
+
+ minusEClass = createEClass(MINUS);
+ createEReference(minusEClass, MINUS__LEFT);
+ createEReference(minusEClass, MINUS__RIGHT);
+
+ multiEClass = createEClass(MULTI);
+ createEReference(multiEClass, MULTI__LEFT);
+ createEReference(multiEClass, MULTI__RIGHT);
+
+ divEClass = createEClass(DIV);
+ createEReference(divEClass, DIV__LEFT);
+ createEReference(divEClass, DIV__RIGHT);
+
+ numberLiteralEClass = createEClass(NUMBER_LITERAL);
+ createEAttribute(numberLiteralEClass, NUMBER_LITERAL__VALUE);
+
+ functionCallEClass = createEClass(FUNCTION_CALL);
+ createEReference(functionCallEClass, FUNCTION_CALL__FUNC);
+ createEReference(functionCallEClass, FUNCTION_CALL__ARGS);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents()
+ {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ definitionEClass.getESuperTypes().add(this.getStatement());
+ definitionEClass.getESuperTypes().add(this.getAbstractDefinition());
+ declaredParameterEClass.getESuperTypes().add(this.getAbstractDefinition());
+ evaluationEClass.getESuperTypes().add(this.getStatement());
+ plusEClass.getESuperTypes().add(this.getExpression());
+ minusEClass.getESuperTypes().add(this.getExpression());
+ multiEClass.getESuperTypes().add(this.getExpression());
+ divEClass.getESuperTypes().add(this.getExpression());
+ numberLiteralEClass.getESuperTypes().add(this.getExpression());
+ functionCallEClass.getESuperTypes().add(this.getExpression());
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(moduleEClass, Module.class, "Module", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getModule_Name(), ecorePackage.getEString(), "name", null, 0, 1, Module.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getModule_Imports(), this.getImport(), null, "imports", null, 0, -1, Module.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getModule_Statements(), this.getStatement(), null, "statements", null, 0, -1, Module.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(importEClass, Import.class, "Import", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getImport_ImportedNamespace(), ecorePackage.getEString(), "importedNamespace", null, 0, 1, Import.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(statementEClass, Statement.class, "Statement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+ initEClass(definitionEClass, Definition.class, "Definition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getDefinition_Args(), this.getDeclaredParameter(), null, "args", null, 0, -1, Definition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getDefinition_Expr(), this.getExpression(), null, "expr", null, 0, 1, Definition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(declaredParameterEClass, DeclaredParameter.class, "DeclaredParameter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+ initEClass(abstractDefinitionEClass, AbstractDefinition.class, "AbstractDefinition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getAbstractDefinition_Name(), ecorePackage.getEString(), "name", null, 0, 1, AbstractDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(evaluationEClass, Evaluation.class, "Evaluation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getEvaluation_Expression(), this.getExpression(), null, "expression", null, 0, 1, Evaluation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(expressionEClass, Expression.class, "Expression", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+ initEClass(plusEClass, Plus.class, "Plus", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getPlus_Left(), this.getExpression(), null, "left", null, 0, 1, Plus.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getPlus_Right(), this.getExpression(), null, "right", null, 0, 1, Plus.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(minusEClass, Minus.class, "Minus", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getMinus_Left(), this.getExpression(), null, "left", null, 0, 1, Minus.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getMinus_Right(), this.getExpression(), null, "right", null, 0, 1, Minus.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(multiEClass, Multi.class, "Multi", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getMulti_Left(), this.getExpression(), null, "left", null, 0, 1, Multi.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getMulti_Right(), this.getExpression(), null, "right", null, 0, 1, Multi.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(divEClass, Div.class, "Div", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getDiv_Left(), this.getExpression(), null, "left", null, 0, 1, Div.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getDiv_Right(), this.getExpression(), null, "right", null, 0, 1, Div.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(numberLiteralEClass, NumberLiteral.class, "NumberLiteral", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getNumberLiteral_Value(), ecorePackage.getEBigDecimal(), "value", null, 0, 1, NumberLiteral.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(functionCallEClass, FunctionCall.class, "FunctionCall", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getFunctionCall_Func(), this.getAbstractDefinition(), null, "func", null, 0, 1, FunctionCall.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getFunctionCall_Args(), this.getExpression(), null, "args", null, 0, -1, FunctionCall.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} //ArithmeticsPackageImpl
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/DeclaredParameterImpl.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/DeclaredParameterImpl.java
new file mode 100644
index 0000000..ed4a2f1
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/DeclaredParameterImpl.java
@@ -0,0 +1,45 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.arithmetics.arithmetics.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage;
+import org.eclipse.xtext.example.arithmetics.arithmetics.DeclaredParameter;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Declared Parameter</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class DeclaredParameterImpl extends AbstractDefinitionImpl implements DeclaredParameter
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected DeclaredParameterImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return ArithmeticsPackage.Literals.DECLARED_PARAMETER;
+ }
+
+} //DeclaredParameterImpl
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/DefinitionImpl.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/DefinitionImpl.java
new file mode 100644
index 0000000..09dc674
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/DefinitionImpl.java
@@ -0,0 +1,353 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.arithmetics.arithmetics.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.xtext.example.arithmetics.arithmetics.AbstractDefinition;
+import org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage;
+import org.eclipse.xtext.example.arithmetics.arithmetics.DeclaredParameter;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Definition;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Expression;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Definition</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.DefinitionImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.DefinitionImpl#getArgs <em>Args</em>}</li>
+ * <li>{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.DefinitionImpl#getExpr <em>Expr</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class DefinitionImpl extends StatementImpl implements Definition
+{
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getArgs() <em>Args</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getArgs()
+ * @generated
+ * @ordered
+ */
+ protected EList<DeclaredParameter> args;
+
+ /**
+ * The cached value of the '{@link #getExpr() <em>Expr</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getExpr()
+ * @generated
+ * @ordered
+ */
+ protected Expression expr;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected DefinitionImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return ArithmeticsPackage.Literals.DEFINITION;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName)
+ {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ArithmeticsPackage.DEFINITION__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<DeclaredParameter> getArgs()
+ {
+ if (args == null)
+ {
+ args = new EObjectContainmentEList<DeclaredParameter>(DeclaredParameter.class, this, ArithmeticsPackage.DEFINITION__ARGS);
+ }
+ return args;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Expression getExpr()
+ {
+ return expr;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetExpr(Expression newExpr, NotificationChain msgs)
+ {
+ Expression oldExpr = expr;
+ expr = newExpr;
+ if (eNotificationRequired())
+ {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ArithmeticsPackage.DEFINITION__EXPR, oldExpr, newExpr);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setExpr(Expression newExpr)
+ {
+ if (newExpr != expr)
+ {
+ NotificationChain msgs = null;
+ if (expr != null)
+ msgs = ((InternalEObject)expr).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ArithmeticsPackage.DEFINITION__EXPR, null, msgs);
+ if (newExpr != null)
+ msgs = ((InternalEObject)newExpr).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ArithmeticsPackage.DEFINITION__EXPR, null, msgs);
+ msgs = basicSetExpr(newExpr, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ArithmeticsPackage.DEFINITION__EXPR, newExpr, newExpr));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.DEFINITION__ARGS:
+ return ((InternalEList<?>)getArgs()).basicRemove(otherEnd, msgs);
+ case ArithmeticsPackage.DEFINITION__EXPR:
+ return basicSetExpr(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.DEFINITION__NAME:
+ return getName();
+ case ArithmeticsPackage.DEFINITION__ARGS:
+ return getArgs();
+ case ArithmeticsPackage.DEFINITION__EXPR:
+ return getExpr();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.DEFINITION__NAME:
+ setName((String)newValue);
+ return;
+ case ArithmeticsPackage.DEFINITION__ARGS:
+ getArgs().clear();
+ getArgs().addAll((Collection<? extends DeclaredParameter>)newValue);
+ return;
+ case ArithmeticsPackage.DEFINITION__EXPR:
+ setExpr((Expression)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.DEFINITION__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case ArithmeticsPackage.DEFINITION__ARGS:
+ getArgs().clear();
+ return;
+ case ArithmeticsPackage.DEFINITION__EXPR:
+ setExpr((Expression)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.DEFINITION__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case ArithmeticsPackage.DEFINITION__ARGS:
+ return args != null && !args.isEmpty();
+ case ArithmeticsPackage.DEFINITION__EXPR:
+ return expr != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
+ {
+ if (baseClass == AbstractDefinition.class)
+ {
+ switch (derivedFeatureID)
+ {
+ case ArithmeticsPackage.DEFINITION__NAME: return ArithmeticsPackage.ABSTRACT_DEFINITION__NAME;
+ default: return -1;
+ }
+ }
+ return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
+ {
+ if (baseClass == AbstractDefinition.class)
+ {
+ switch (baseFeatureID)
+ {
+ case ArithmeticsPackage.ABSTRACT_DEFINITION__NAME: return ArithmeticsPackage.DEFINITION__NAME;
+ default: return -1;
+ }
+ }
+ return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString()
+ {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (name: ");
+ result.append(name);
+ result.append(')');
+ return result.toString();
+ }
+
+} //DefinitionImpl
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/DivImpl.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/DivImpl.java
new file mode 100644
index 0000000..1589aea
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/DivImpl.java
@@ -0,0 +1,267 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.arithmetics.arithmetics.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Div;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Expression;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Div</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.DivImpl#getLeft <em>Left</em>}</li>
+ * <li>{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.DivImpl#getRight <em>Right</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class DivImpl extends ExpressionImpl implements Div
+{
+ /**
+ * The cached value of the '{@link #getLeft() <em>Left</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getLeft()
+ * @generated
+ * @ordered
+ */
+ protected Expression left;
+
+ /**
+ * The cached value of the '{@link #getRight() <em>Right</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getRight()
+ * @generated
+ * @ordered
+ */
+ protected Expression right;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected DivImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return ArithmeticsPackage.Literals.DIV;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Expression getLeft()
+ {
+ return left;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetLeft(Expression newLeft, NotificationChain msgs)
+ {
+ Expression oldLeft = left;
+ left = newLeft;
+ if (eNotificationRequired())
+ {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ArithmeticsPackage.DIV__LEFT, oldLeft, newLeft);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setLeft(Expression newLeft)
+ {
+ if (newLeft != left)
+ {
+ NotificationChain msgs = null;
+ if (left != null)
+ msgs = ((InternalEObject)left).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ArithmeticsPackage.DIV__LEFT, null, msgs);
+ if (newLeft != null)
+ msgs = ((InternalEObject)newLeft).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ArithmeticsPackage.DIV__LEFT, null, msgs);
+ msgs = basicSetLeft(newLeft, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ArithmeticsPackage.DIV__LEFT, newLeft, newLeft));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Expression getRight()
+ {
+ return right;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetRight(Expression newRight, NotificationChain msgs)
+ {
+ Expression oldRight = right;
+ right = newRight;
+ if (eNotificationRequired())
+ {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ArithmeticsPackage.DIV__RIGHT, oldRight, newRight);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setRight(Expression newRight)
+ {
+ if (newRight != right)
+ {
+ NotificationChain msgs = null;
+ if (right != null)
+ msgs = ((InternalEObject)right).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ArithmeticsPackage.DIV__RIGHT, null, msgs);
+ if (newRight != null)
+ msgs = ((InternalEObject)newRight).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ArithmeticsPackage.DIV__RIGHT, null, msgs);
+ msgs = basicSetRight(newRight, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ArithmeticsPackage.DIV__RIGHT, newRight, newRight));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.DIV__LEFT:
+ return basicSetLeft(null, msgs);
+ case ArithmeticsPackage.DIV__RIGHT:
+ return basicSetRight(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.DIV__LEFT:
+ return getLeft();
+ case ArithmeticsPackage.DIV__RIGHT:
+ return getRight();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.DIV__LEFT:
+ setLeft((Expression)newValue);
+ return;
+ case ArithmeticsPackage.DIV__RIGHT:
+ setRight((Expression)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.DIV__LEFT:
+ setLeft((Expression)null);
+ return;
+ case ArithmeticsPackage.DIV__RIGHT:
+ setRight((Expression)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.DIV__LEFT:
+ return left != null;
+ case ArithmeticsPackage.DIV__RIGHT:
+ return right != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //DivImpl
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/EvaluationImpl.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/EvaluationImpl.java
new file mode 100644
index 0000000..fc1c6e7
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/EvaluationImpl.java
@@ -0,0 +1,196 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.arithmetics.arithmetics.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Evaluation;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Expression;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Evaluation</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.EvaluationImpl#getExpression <em>Expression</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class EvaluationImpl extends StatementImpl implements Evaluation
+{
+ /**
+ * The cached value of the '{@link #getExpression() <em>Expression</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getExpression()
+ * @generated
+ * @ordered
+ */
+ protected Expression expression;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EvaluationImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return ArithmeticsPackage.Literals.EVALUATION;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Expression getExpression()
+ {
+ return expression;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetExpression(Expression newExpression, NotificationChain msgs)
+ {
+ Expression oldExpression = expression;
+ expression = newExpression;
+ if (eNotificationRequired())
+ {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ArithmeticsPackage.EVALUATION__EXPRESSION, oldExpression, newExpression);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setExpression(Expression newExpression)
+ {
+ if (newExpression != expression)
+ {
+ NotificationChain msgs = null;
+ if (expression != null)
+ msgs = ((InternalEObject)expression).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ArithmeticsPackage.EVALUATION__EXPRESSION, null, msgs);
+ if (newExpression != null)
+ msgs = ((InternalEObject)newExpression).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ArithmeticsPackage.EVALUATION__EXPRESSION, null, msgs);
+ msgs = basicSetExpression(newExpression, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ArithmeticsPackage.EVALUATION__EXPRESSION, newExpression, newExpression));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.EVALUATION__EXPRESSION:
+ return basicSetExpression(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.EVALUATION__EXPRESSION:
+ return getExpression();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.EVALUATION__EXPRESSION:
+ setExpression((Expression)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.EVALUATION__EXPRESSION:
+ setExpression((Expression)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.EVALUATION__EXPRESSION:
+ return expression != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //EvaluationImpl
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/ExpressionImpl.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/ExpressionImpl.java
new file mode 100644
index 0000000..0ea3524
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/ExpressionImpl.java
@@ -0,0 +1,47 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.arithmetics.arithmetics.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Expression;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Expression</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class ExpressionImpl extends MinimalEObjectImpl.Container implements Expression
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ExpressionImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return ArithmeticsPackage.Literals.EXPRESSION;
+ }
+
+} //ExpressionImpl
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/FunctionCallImpl.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/FunctionCallImpl.java
new file mode 100644
index 0000000..873b0fd
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/FunctionCallImpl.java
@@ -0,0 +1,237 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.arithmetics.arithmetics.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.xtext.example.arithmetics.arithmetics.AbstractDefinition;
+import org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Expression;
+import org.eclipse.xtext.example.arithmetics.arithmetics.FunctionCall;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Function Call</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.FunctionCallImpl#getFunc <em>Func</em>}</li>
+ * <li>{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.FunctionCallImpl#getArgs <em>Args</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class FunctionCallImpl extends ExpressionImpl implements FunctionCall
+{
+ /**
+ * The cached value of the '{@link #getFunc() <em>Func</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getFunc()
+ * @generated
+ * @ordered
+ */
+ protected AbstractDefinition func;
+
+ /**
+ * The cached value of the '{@link #getArgs() <em>Args</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getArgs()
+ * @generated
+ * @ordered
+ */
+ protected EList<Expression> args;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected FunctionCallImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return ArithmeticsPackage.Literals.FUNCTION_CALL;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public AbstractDefinition getFunc()
+ {
+ if (func != null && func.eIsProxy())
+ {
+ InternalEObject oldFunc = (InternalEObject)func;
+ func = (AbstractDefinition)eResolveProxy(oldFunc);
+ if (func != oldFunc)
+ {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ArithmeticsPackage.FUNCTION_CALL__FUNC, oldFunc, func));
+ }
+ }
+ return func;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public AbstractDefinition basicGetFunc()
+ {
+ return func;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setFunc(AbstractDefinition newFunc)
+ {
+ AbstractDefinition oldFunc = func;
+ func = newFunc;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ArithmeticsPackage.FUNCTION_CALL__FUNC, oldFunc, func));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Expression> getArgs()
+ {
+ if (args == null)
+ {
+ args = new EObjectContainmentEList<Expression>(Expression.class, this, ArithmeticsPackage.FUNCTION_CALL__ARGS);
+ }
+ return args;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.FUNCTION_CALL__ARGS:
+ return ((InternalEList<?>)getArgs()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.FUNCTION_CALL__FUNC:
+ if (resolve) return getFunc();
+ return basicGetFunc();
+ case ArithmeticsPackage.FUNCTION_CALL__ARGS:
+ return getArgs();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.FUNCTION_CALL__FUNC:
+ setFunc((AbstractDefinition)newValue);
+ return;
+ case ArithmeticsPackage.FUNCTION_CALL__ARGS:
+ getArgs().clear();
+ getArgs().addAll((Collection<? extends Expression>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.FUNCTION_CALL__FUNC:
+ setFunc((AbstractDefinition)null);
+ return;
+ case ArithmeticsPackage.FUNCTION_CALL__ARGS:
+ getArgs().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.FUNCTION_CALL__FUNC:
+ return func != null;
+ case ArithmeticsPackage.FUNCTION_CALL__ARGS:
+ return args != null && !args.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //FunctionCallImpl
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/ImportImpl.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/ImportImpl.java
new file mode 100644
index 0000000..b250032
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/ImportImpl.java
@@ -0,0 +1,180 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.arithmetics.arithmetics.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Import;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Import</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.ImportImpl#getImportedNamespace <em>Imported Namespace</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ImportImpl extends MinimalEObjectImpl.Container implements Import
+{
+ /**
+ * The default value of the '{@link #getImportedNamespace() <em>Imported Namespace</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getImportedNamespace()
+ * @generated
+ * @ordered
+ */
+ protected static final String IMPORTED_NAMESPACE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getImportedNamespace() <em>Imported Namespace</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getImportedNamespace()
+ * @generated
+ * @ordered
+ */
+ protected String importedNamespace = IMPORTED_NAMESPACE_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ImportImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return ArithmeticsPackage.Literals.IMPORT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getImportedNamespace()
+ {
+ return importedNamespace;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setImportedNamespace(String newImportedNamespace)
+ {
+ String oldImportedNamespace = importedNamespace;
+ importedNamespace = newImportedNamespace;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ArithmeticsPackage.IMPORT__IMPORTED_NAMESPACE, oldImportedNamespace, importedNamespace));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.IMPORT__IMPORTED_NAMESPACE:
+ return getImportedNamespace();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.IMPORT__IMPORTED_NAMESPACE:
+ setImportedNamespace((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.IMPORT__IMPORTED_NAMESPACE:
+ setImportedNamespace(IMPORTED_NAMESPACE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.IMPORT__IMPORTED_NAMESPACE:
+ return IMPORTED_NAMESPACE_EDEFAULT == null ? importedNamespace != null : !IMPORTED_NAMESPACE_EDEFAULT.equals(importedNamespace);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString()
+ {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (importedNamespace: ");
+ result.append(importedNamespace);
+ result.append(')');
+ return result.toString();
+ }
+
+} //ImportImpl
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/MinusImpl.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/MinusImpl.java
new file mode 100644
index 0000000..0df6c37
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/MinusImpl.java
@@ -0,0 +1,267 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.arithmetics.arithmetics.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Expression;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Minus;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Minus</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.MinusImpl#getLeft <em>Left</em>}</li>
+ * <li>{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.MinusImpl#getRight <em>Right</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class MinusImpl extends ExpressionImpl implements Minus
+{
+ /**
+ * The cached value of the '{@link #getLeft() <em>Left</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getLeft()
+ * @generated
+ * @ordered
+ */
+ protected Expression left;
+
+ /**
+ * The cached value of the '{@link #getRight() <em>Right</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getRight()
+ * @generated
+ * @ordered
+ */
+ protected Expression right;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected MinusImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return ArithmeticsPackage.Literals.MINUS;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Expression getLeft()
+ {
+ return left;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetLeft(Expression newLeft, NotificationChain msgs)
+ {
+ Expression oldLeft = left;
+ left = newLeft;
+ if (eNotificationRequired())
+ {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ArithmeticsPackage.MINUS__LEFT, oldLeft, newLeft);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setLeft(Expression newLeft)
+ {
+ if (newLeft != left)
+ {
+ NotificationChain msgs = null;
+ if (left != null)
+ msgs = ((InternalEObject)left).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ArithmeticsPackage.MINUS__LEFT, null, msgs);
+ if (newLeft != null)
+ msgs = ((InternalEObject)newLeft).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ArithmeticsPackage.MINUS__LEFT, null, msgs);
+ msgs = basicSetLeft(newLeft, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ArithmeticsPackage.MINUS__LEFT, newLeft, newLeft));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Expression getRight()
+ {
+ return right;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetRight(Expression newRight, NotificationChain msgs)
+ {
+ Expression oldRight = right;
+ right = newRight;
+ if (eNotificationRequired())
+ {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ArithmeticsPackage.MINUS__RIGHT, oldRight, newRight);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setRight(Expression newRight)
+ {
+ if (newRight != right)
+ {
+ NotificationChain msgs = null;
+ if (right != null)
+ msgs = ((InternalEObject)right).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ArithmeticsPackage.MINUS__RIGHT, null, msgs);
+ if (newRight != null)
+ msgs = ((InternalEObject)newRight).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ArithmeticsPackage.MINUS__RIGHT, null, msgs);
+ msgs = basicSetRight(newRight, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ArithmeticsPackage.MINUS__RIGHT, newRight, newRight));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.MINUS__LEFT:
+ return basicSetLeft(null, msgs);
+ case ArithmeticsPackage.MINUS__RIGHT:
+ return basicSetRight(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.MINUS__LEFT:
+ return getLeft();
+ case ArithmeticsPackage.MINUS__RIGHT:
+ return getRight();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.MINUS__LEFT:
+ setLeft((Expression)newValue);
+ return;
+ case ArithmeticsPackage.MINUS__RIGHT:
+ setRight((Expression)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.MINUS__LEFT:
+ setLeft((Expression)null);
+ return;
+ case ArithmeticsPackage.MINUS__RIGHT:
+ setRight((Expression)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.MINUS__LEFT:
+ return left != null;
+ case ArithmeticsPackage.MINUS__RIGHT:
+ return right != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //MinusImpl
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/ModuleImpl.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/ModuleImpl.java
new file mode 100644
index 0000000..35e25cb
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/ModuleImpl.java
@@ -0,0 +1,282 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.arithmetics.arithmetics.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Import;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Module;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Statement;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Module</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.ModuleImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.ModuleImpl#getImports <em>Imports</em>}</li>
+ * <li>{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.ModuleImpl#getStatements <em>Statements</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ModuleImpl extends MinimalEObjectImpl.Container implements Module
+{
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getImports() <em>Imports</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getImports()
+ * @generated
+ * @ordered
+ */
+ protected EList<Import> imports;
+
+ /**
+ * The cached value of the '{@link #getStatements() <em>Statements</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getStatements()
+ * @generated
+ * @ordered
+ */
+ protected EList<Statement> statements;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ModuleImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return ArithmeticsPackage.Literals.MODULE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName)
+ {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ArithmeticsPackage.MODULE__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Import> getImports()
+ {
+ if (imports == null)
+ {
+ imports = new EObjectContainmentEList<Import>(Import.class, this, ArithmeticsPackage.MODULE__IMPORTS);
+ }
+ return imports;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Statement> getStatements()
+ {
+ if (statements == null)
+ {
+ statements = new EObjectContainmentEList<Statement>(Statement.class, this, ArithmeticsPackage.MODULE__STATEMENTS);
+ }
+ return statements;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.MODULE__IMPORTS:
+ return ((InternalEList<?>)getImports()).basicRemove(otherEnd, msgs);
+ case ArithmeticsPackage.MODULE__STATEMENTS:
+ return ((InternalEList<?>)getStatements()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.MODULE__NAME:
+ return getName();
+ case ArithmeticsPackage.MODULE__IMPORTS:
+ return getImports();
+ case ArithmeticsPackage.MODULE__STATEMENTS:
+ return getStatements();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.MODULE__NAME:
+ setName((String)newValue);
+ return;
+ case ArithmeticsPackage.MODULE__IMPORTS:
+ getImports().clear();
+ getImports().addAll((Collection<? extends Import>)newValue);
+ return;
+ case ArithmeticsPackage.MODULE__STATEMENTS:
+ getStatements().clear();
+ getStatements().addAll((Collection<? extends Statement>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.MODULE__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case ArithmeticsPackage.MODULE__IMPORTS:
+ getImports().clear();
+ return;
+ case ArithmeticsPackage.MODULE__STATEMENTS:
+ getStatements().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.MODULE__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case ArithmeticsPackage.MODULE__IMPORTS:
+ return imports != null && !imports.isEmpty();
+ case ArithmeticsPackage.MODULE__STATEMENTS:
+ return statements != null && !statements.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString()
+ {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (name: ");
+ result.append(name);
+ result.append(')');
+ return result.toString();
+ }
+
+} //ModuleImpl
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/MultiImpl.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/MultiImpl.java
new file mode 100644
index 0000000..859b5fa
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/MultiImpl.java
@@ -0,0 +1,267 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.arithmetics.arithmetics.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Expression;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Multi;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Multi</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.MultiImpl#getLeft <em>Left</em>}</li>
+ * <li>{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.MultiImpl#getRight <em>Right</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class MultiImpl extends ExpressionImpl implements Multi
+{
+ /**
+ * The cached value of the '{@link #getLeft() <em>Left</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getLeft()
+ * @generated
+ * @ordered
+ */
+ protected Expression left;
+
+ /**
+ * The cached value of the '{@link #getRight() <em>Right</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getRight()
+ * @generated
+ * @ordered
+ */
+ protected Expression right;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected MultiImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return ArithmeticsPackage.Literals.MULTI;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Expression getLeft()
+ {
+ return left;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetLeft(Expression newLeft, NotificationChain msgs)
+ {
+ Expression oldLeft = left;
+ left = newLeft;
+ if (eNotificationRequired())
+ {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ArithmeticsPackage.MULTI__LEFT, oldLeft, newLeft);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setLeft(Expression newLeft)
+ {
+ if (newLeft != left)
+ {
+ NotificationChain msgs = null;
+ if (left != null)
+ msgs = ((InternalEObject)left).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ArithmeticsPackage.MULTI__LEFT, null, msgs);
+ if (newLeft != null)
+ msgs = ((InternalEObject)newLeft).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ArithmeticsPackage.MULTI__LEFT, null, msgs);
+ msgs = basicSetLeft(newLeft, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ArithmeticsPackage.MULTI__LEFT, newLeft, newLeft));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Expression getRight()
+ {
+ return right;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetRight(Expression newRight, NotificationChain msgs)
+ {
+ Expression oldRight = right;
+ right = newRight;
+ if (eNotificationRequired())
+ {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ArithmeticsPackage.MULTI__RIGHT, oldRight, newRight);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setRight(Expression newRight)
+ {
+ if (newRight != right)
+ {
+ NotificationChain msgs = null;
+ if (right != null)
+ msgs = ((InternalEObject)right).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ArithmeticsPackage.MULTI__RIGHT, null, msgs);
+ if (newRight != null)
+ msgs = ((InternalEObject)newRight).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ArithmeticsPackage.MULTI__RIGHT, null, msgs);
+ msgs = basicSetRight(newRight, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ArithmeticsPackage.MULTI__RIGHT, newRight, newRight));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.MULTI__LEFT:
+ return basicSetLeft(null, msgs);
+ case ArithmeticsPackage.MULTI__RIGHT:
+ return basicSetRight(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.MULTI__LEFT:
+ return getLeft();
+ case ArithmeticsPackage.MULTI__RIGHT:
+ return getRight();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.MULTI__LEFT:
+ setLeft((Expression)newValue);
+ return;
+ case ArithmeticsPackage.MULTI__RIGHT:
+ setRight((Expression)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.MULTI__LEFT:
+ setLeft((Expression)null);
+ return;
+ case ArithmeticsPackage.MULTI__RIGHT:
+ setRight((Expression)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.MULTI__LEFT:
+ return left != null;
+ case ArithmeticsPackage.MULTI__RIGHT:
+ return right != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //MultiImpl
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/NumberLiteralImpl.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/NumberLiteralImpl.java
new file mode 100644
index 0000000..e3d0e13
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/NumberLiteralImpl.java
@@ -0,0 +1,181 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.arithmetics.arithmetics.impl;
+
+import java.math.BigDecimal;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage;
+import org.eclipse.xtext.example.arithmetics.arithmetics.NumberLiteral;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Number Literal</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.NumberLiteralImpl#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class NumberLiteralImpl extends ExpressionImpl implements NumberLiteral
+{
+ /**
+ * The default value of the '{@link #getValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected static final BigDecimal VALUE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected BigDecimal value = VALUE_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected NumberLiteralImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return ArithmeticsPackage.Literals.NUMBER_LITERAL;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public BigDecimal getValue()
+ {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setValue(BigDecimal newValue)
+ {
+ BigDecimal oldValue = value;
+ value = newValue;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ArithmeticsPackage.NUMBER_LITERAL__VALUE, oldValue, value));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.NUMBER_LITERAL__VALUE:
+ return getValue();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.NUMBER_LITERAL__VALUE:
+ setValue((BigDecimal)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.NUMBER_LITERAL__VALUE:
+ setValue(VALUE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.NUMBER_LITERAL__VALUE:
+ return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString()
+ {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (value: ");
+ result.append(value);
+ result.append(')');
+ return result.toString();
+ }
+
+} //NumberLiteralImpl
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/PlusImpl.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/PlusImpl.java
new file mode 100644
index 0000000..46e4001
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/PlusImpl.java
@@ -0,0 +1,267 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.arithmetics.arithmetics.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Expression;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Plus;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Plus</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.PlusImpl#getLeft <em>Left</em>}</li>
+ * <li>{@link org.eclipse.xtext.example.arithmetics.arithmetics.impl.PlusImpl#getRight <em>Right</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class PlusImpl extends ExpressionImpl implements Plus
+{
+ /**
+ * The cached value of the '{@link #getLeft() <em>Left</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getLeft()
+ * @generated
+ * @ordered
+ */
+ protected Expression left;
+
+ /**
+ * The cached value of the '{@link #getRight() <em>Right</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getRight()
+ * @generated
+ * @ordered
+ */
+ protected Expression right;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PlusImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return ArithmeticsPackage.Literals.PLUS;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Expression getLeft()
+ {
+ return left;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetLeft(Expression newLeft, NotificationChain msgs)
+ {
+ Expression oldLeft = left;
+ left = newLeft;
+ if (eNotificationRequired())
+ {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ArithmeticsPackage.PLUS__LEFT, oldLeft, newLeft);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setLeft(Expression newLeft)
+ {
+ if (newLeft != left)
+ {
+ NotificationChain msgs = null;
+ if (left != null)
+ msgs = ((InternalEObject)left).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ArithmeticsPackage.PLUS__LEFT, null, msgs);
+ if (newLeft != null)
+ msgs = ((InternalEObject)newLeft).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ArithmeticsPackage.PLUS__LEFT, null, msgs);
+ msgs = basicSetLeft(newLeft, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ArithmeticsPackage.PLUS__LEFT, newLeft, newLeft));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Expression getRight()
+ {
+ return right;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetRight(Expression newRight, NotificationChain msgs)
+ {
+ Expression oldRight = right;
+ right = newRight;
+ if (eNotificationRequired())
+ {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ArithmeticsPackage.PLUS__RIGHT, oldRight, newRight);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setRight(Expression newRight)
+ {
+ if (newRight != right)
+ {
+ NotificationChain msgs = null;
+ if (right != null)
+ msgs = ((InternalEObject)right).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ArithmeticsPackage.PLUS__RIGHT, null, msgs);
+ if (newRight != null)
+ msgs = ((InternalEObject)newRight).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ArithmeticsPackage.PLUS__RIGHT, null, msgs);
+ msgs = basicSetRight(newRight, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ArithmeticsPackage.PLUS__RIGHT, newRight, newRight));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.PLUS__LEFT:
+ return basicSetLeft(null, msgs);
+ case ArithmeticsPackage.PLUS__RIGHT:
+ return basicSetRight(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.PLUS__LEFT:
+ return getLeft();
+ case ArithmeticsPackage.PLUS__RIGHT:
+ return getRight();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.PLUS__LEFT:
+ setLeft((Expression)newValue);
+ return;
+ case ArithmeticsPackage.PLUS__RIGHT:
+ setRight((Expression)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.PLUS__LEFT:
+ setLeft((Expression)null);
+ return;
+ case ArithmeticsPackage.PLUS__RIGHT:
+ setRight((Expression)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID)
+ {
+ case ArithmeticsPackage.PLUS__LEFT:
+ return left != null;
+ case ArithmeticsPackage.PLUS__RIGHT:
+ return right != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //PlusImpl
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/StatementImpl.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/StatementImpl.java
new file mode 100644
index 0000000..f3ad601
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/impl/StatementImpl.java
@@ -0,0 +1,47 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.arithmetics.arithmetics.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Statement;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Statement</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class StatementImpl extends MinimalEObjectImpl.Container implements Statement
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected StatementImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return ArithmeticsPackage.Literals.STATEMENT;
+ }
+
+} //StatementImpl
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/util/ArithmeticsAdapterFactory.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/util/ArithmeticsAdapterFactory.java
new file mode 100644
index 0000000..adfb8df
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/util/ArithmeticsAdapterFactory.java
@@ -0,0 +1,395 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.arithmetics.arithmetics.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.xtext.example.arithmetics.arithmetics.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage
+ * @generated
+ */
+public class ArithmeticsAdapterFactory extends AdapterFactoryImpl
+{
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static ArithmeticsPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ArithmeticsAdapterFactory()
+ {
+ if (modelPackage == null)
+ {
+ modelPackage = ArithmeticsPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc -->
+ * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+ * <!-- end-user-doc -->
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object)
+ {
+ if (object == modelPackage)
+ {
+ return true;
+ }
+ if (object instanceof EObject)
+ {
+ return ((EObject)object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+ /**
+ * The switch that delegates to the <code>createXXX</code> methods.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ArithmeticsSwitch<Adapter> modelSwitch =
+ new ArithmeticsSwitch<Adapter>()
+ {
+ @Override
+ public Adapter caseModule(Module object)
+ {
+ return createModuleAdapter();
+ }
+ @Override
+ public Adapter caseImport(Import object)
+ {
+ return createImportAdapter();
+ }
+ @Override
+ public Adapter caseStatement(Statement object)
+ {
+ return createStatementAdapter();
+ }
+ @Override
+ public Adapter caseDefinition(Definition object)
+ {
+ return createDefinitionAdapter();
+ }
+ @Override
+ public Adapter caseDeclaredParameter(DeclaredParameter object)
+ {
+ return createDeclaredParameterAdapter();
+ }
+ @Override
+ public Adapter caseAbstractDefinition(AbstractDefinition object)
+ {
+ return createAbstractDefinitionAdapter();
+ }
+ @Override
+ public Adapter caseEvaluation(Evaluation object)
+ {
+ return createEvaluationAdapter();
+ }
+ @Override
+ public Adapter caseExpression(Expression object)
+ {
+ return createExpressionAdapter();
+ }
+ @Override
+ public Adapter casePlus(Plus object)
+ {
+ return createPlusAdapter();
+ }
+ @Override
+ public Adapter caseMinus(Minus object)
+ {
+ return createMinusAdapter();
+ }
+ @Override
+ public Adapter caseMulti(Multi object)
+ {
+ return createMultiAdapter();
+ }
+ @Override
+ public Adapter caseDiv(Div object)
+ {
+ return createDivAdapter();
+ }
+ @Override
+ public Adapter caseNumberLiteral(NumberLiteral object)
+ {
+ return createNumberLiteralAdapter();
+ }
+ @Override
+ public Adapter caseFunctionCall(FunctionCall object)
+ {
+ return createFunctionCallAdapter();
+ }
+ @Override
+ public Adapter defaultCase(EObject object)
+ {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param target the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target)
+ {
+ return modelSwitch.doSwitch((EObject)target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Module <em>Module</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.Module
+ * @generated
+ */
+ public Adapter createModuleAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Import <em>Import</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.Import
+ * @generated
+ */
+ public Adapter createImportAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Statement <em>Statement</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.Statement
+ * @generated
+ */
+ public Adapter createStatementAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Definition <em>Definition</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.Definition
+ * @generated
+ */
+ public Adapter createDefinitionAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.xtext.example.arithmetics.arithmetics.DeclaredParameter <em>Declared Parameter</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.DeclaredParameter
+ * @generated
+ */
+ public Adapter createDeclaredParameterAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.xtext.example.arithmetics.arithmetics.AbstractDefinition <em>Abstract Definition</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.AbstractDefinition
+ * @generated
+ */
+ public Adapter createAbstractDefinitionAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Evaluation <em>Evaluation</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.Evaluation
+ * @generated
+ */
+ public Adapter createEvaluationAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Expression <em>Expression</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.Expression
+ * @generated
+ */
+ public Adapter createExpressionAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Plus <em>Plus</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.Plus
+ * @generated
+ */
+ public Adapter createPlusAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Minus <em>Minus</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.Minus
+ * @generated
+ */
+ public Adapter createMinusAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Multi <em>Multi</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.Multi
+ * @generated
+ */
+ public Adapter createMultiAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.xtext.example.arithmetics.arithmetics.Div <em>Div</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.Div
+ * @generated
+ */
+ public Adapter createDivAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.xtext.example.arithmetics.arithmetics.NumberLiteral <em>Number Literal</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.NumberLiteral
+ * @generated
+ */
+ public Adapter createNumberLiteralAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.xtext.example.arithmetics.arithmetics.FunctionCall <em>Function Call</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.FunctionCall
+ * @generated
+ */
+ public Adapter createFunctionCallAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter()
+ {
+ return null;
+ }
+
+} //ArithmeticsAdapterFactory
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/util/ArithmeticsSwitch.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/util/ArithmeticsSwitch.java
new file mode 100644
index 0000000..ff7a0b6
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/arithmetics/util/ArithmeticsSwitch.java
@@ -0,0 +1,450 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.arithmetics.arithmetics.util;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.xtext.example.arithmetics.arithmetics.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage
+ * @generated
+ */
+public class ArithmeticsSwitch<T>
+{
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static ArithmeticsPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ArithmeticsSwitch()
+ {
+ if (modelPackage == null)
+ {
+ modelPackage = ArithmeticsPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ public T doSwitch(EObject theEObject)
+ {
+ return doSwitch(theEObject.eClass(), theEObject);
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ protected T doSwitch(EClass theEClass, EObject theEObject)
+ {
+ if (theEClass.eContainer() == modelPackage)
+ {
+ return doSwitch(theEClass.getClassifierID(), theEObject);
+ }
+ else
+ {
+ List<EClass> eSuperTypes = theEClass.getESuperTypes();
+ return
+ eSuperTypes.isEmpty() ?
+ defaultCase(theEObject) :
+ doSwitch(eSuperTypes.get(0), theEObject);
+ }
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ protected T doSwitch(int classifierID, EObject theEObject)
+ {
+ switch (classifierID)
+ {
+ case ArithmeticsPackage.MODULE:
+ {
+ Module module = (Module)theEObject;
+ T result = caseModule(module);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ArithmeticsPackage.IMPORT:
+ {
+ Import import_ = (Import)theEObject;
+ T result = caseImport(import_);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ArithmeticsPackage.STATEMENT:
+ {
+ Statement statement = (Statement)theEObject;
+ T result = caseStatement(statement);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ArithmeticsPackage.DEFINITION:
+ {
+ Definition definition = (Definition)theEObject;
+ T result = caseDefinition(definition);
+ if (result == null) result = caseStatement(definition);
+ if (result == null) result = caseAbstractDefinition(definition);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ArithmeticsPackage.DECLARED_PARAMETER:
+ {
+ DeclaredParameter declaredParameter = (DeclaredParameter)theEObject;
+ T result = caseDeclaredParameter(declaredParameter);
+ if (result == null) result = caseAbstractDefinition(declaredParameter);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ArithmeticsPackage.ABSTRACT_DEFINITION:
+ {
+ AbstractDefinition abstractDefinition = (AbstractDefinition)theEObject;
+ T result = caseAbstractDefinition(abstractDefinition);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ArithmeticsPackage.EVALUATION:
+ {
+ Evaluation evaluation = (Evaluation)theEObject;
+ T result = caseEvaluation(evaluation);
+ if (result == null) result = caseStatement(evaluation);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ArithmeticsPackage.EXPRESSION:
+ {
+ Expression expression = (Expression)theEObject;
+ T result = caseExpression(expression);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ArithmeticsPackage.PLUS:
+ {
+ Plus plus = (Plus)theEObject;
+ T result = casePlus(plus);
+ if (result == null) result = caseExpression(plus);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ArithmeticsPackage.MINUS:
+ {
+ Minus minus = (Minus)theEObject;
+ T result = caseMinus(minus);
+ if (result == null) result = caseExpression(minus);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ArithmeticsPackage.MULTI:
+ {
+ Multi multi = (Multi)theEObject;
+ T result = caseMulti(multi);
+ if (result == null) result = caseExpression(multi);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ArithmeticsPackage.DIV:
+ {
+ Div div = (Div)theEObject;
+ T result = caseDiv(div);
+ if (result == null) result = caseExpression(div);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ArithmeticsPackage.NUMBER_LITERAL:
+ {
+ NumberLiteral numberLiteral = (NumberLiteral)theEObject;
+ T result = caseNumberLiteral(numberLiteral);
+ if (result == null) result = caseExpression(numberLiteral);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ArithmeticsPackage.FUNCTION_CALL:
+ {
+ FunctionCall functionCall = (FunctionCall)theEObject;
+ T result = caseFunctionCall(functionCall);
+ if (result == null) result = caseExpression(functionCall);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Module</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Module</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseModule(Module object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Import</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Import</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseImport(Import object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Statement</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Statement</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseStatement(Statement object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Definition</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Definition</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseDefinition(Definition object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Declared Parameter</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Declared Parameter</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseDeclaredParameter(DeclaredParameter object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Abstract Definition</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Abstract Definition</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseAbstractDefinition(AbstractDefinition object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Evaluation</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Evaluation</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseEvaluation(Evaluation object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Expression</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Expression</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseExpression(Expression object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Plus</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Plus</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePlus(Plus object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Minus</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Minus</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseMinus(Minus object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Multi</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Multi</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseMulti(Multi object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Div</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Div</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseDiv(Div object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Number Literal</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Number Literal</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseNumberLiteral(NumberLiteral object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Function Call</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Function Call</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseFunctionCall(FunctionCall object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ public T defaultCase(EObject object)
+ {
+ return null;
+ }
+
+} //ArithmeticsSwitch
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/ArithmeticsAntlrTokenFileProvider.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/ArithmeticsAntlrTokenFileProvider.java
new file mode 100644
index 0000000..18ea354
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/ArithmeticsAntlrTokenFileProvider.java
@@ -0,0 +1,15 @@
+/*
+* generated by Xtext
+*/
+package org.eclipse.xtext.example.arithmetics.parser.antlr;
+
+import java.io.InputStream;
+import org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider;
+
+public class ArithmeticsAntlrTokenFileProvider implements IAntlrTokenFileProvider {
+
+ public InputStream getAntlrTokenFile() {
+ ClassLoader classLoader = getClass().getClassLoader();
+ return classLoader.getResourceAsStream("org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.tokens");
+ }
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/ArithmeticsParser.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/ArithmeticsParser.java
new file mode 100644
index 0000000..52f3284
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/ArithmeticsParser.java
@@ -0,0 +1,39 @@
+/*
+* generated by Xtext
+*/
+package org.eclipse.xtext.example.arithmetics.parser.antlr;
+
+import com.google.inject.Inject;
+
+import org.eclipse.xtext.parser.antlr.XtextTokenStream;
+import org.eclipse.xtext.example.arithmetics.services.ArithmeticsGrammarAccess;
+
+public class ArithmeticsParser extends org.eclipse.xtext.parser.antlr.AbstractAntlrParser {
+
+ @Inject
+ private ArithmeticsGrammarAccess grammarAccess;
+
+ @Override
+ protected void setInitialHiddenTokens(XtextTokenStream tokenStream) {
+ tokenStream.setInitialHiddenTokens("RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT");
+ }
+
+ @Override
+ protected org.eclipse.xtext.example.arithmetics.parser.antlr.internal.InternalArithmeticsParser createParser(XtextTokenStream stream) {
+ return new org.eclipse.xtext.example.arithmetics.parser.antlr.internal.InternalArithmeticsParser(stream, getGrammarAccess());
+ }
+
+ @Override
+ protected String getDefaultRuleName() {
+ return "Module";
+ }
+
+ public ArithmeticsGrammarAccess getGrammarAccess() {
+ return this.grammarAccess;
+ }
+
+ public void setGrammarAccess(ArithmeticsGrammarAccess grammarAccess) {
+ this.grammarAccess = grammarAccess;
+ }
+
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g
new file mode 100644
index 0000000..8afc730
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g
@@ -0,0 +1,784 @@
+/*
+* generated by Xtext
+*/
+grammar InternalArithmetics;
+
+options {
+ superClass=AbstractInternalAntlrParser;
+
+}
+
+@lexer::header {
+package org.eclipse.xtext.example.arithmetics.parser.antlr.internal;
+
+// Hack: Use our own Lexer superclass by means of import.
+// Currently there is no other way to specify the superclass for the lexer.
+import org.eclipse.xtext.parser.antlr.Lexer;
+}
+
+@parser::header {
+package org.eclipse.xtext.example.arithmetics.parser.antlr.internal;
+
+import org.eclipse.xtext.*;
+import org.eclipse.xtext.parser.*;
+import org.eclipse.xtext.parser.impl.*;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens;
+import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken;
+import org.eclipse.xtext.example.arithmetics.services.ArithmeticsGrammarAccess;
+
+}
+
+@parser::members {
+
+ private ArithmeticsGrammarAccess grammarAccess;
+
+ public InternalArithmeticsParser(TokenStream input, ArithmeticsGrammarAccess grammarAccess) {
+ this(input);
+ this.grammarAccess = grammarAccess;
+ registerRules(grammarAccess.getGrammar());
+ }
+
+ @Override
+ protected String getFirstRuleName() {
+ return "Module";
+ }
+
+ @Override
+ protected ArithmeticsGrammarAccess getGrammarAccess() {
+ return grammarAccess;
+ }
+}
+
+@rulecatch {
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+}
+
+
+
+
+// Entry rule entryRuleModule
+entryRuleModule returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getModuleRule()); }
+ iv_ruleModule=ruleModule
+ { $current=$iv_ruleModule.current; }
+ EOF
+;
+
+// Rule Module
+ruleModule returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+( otherlv_0='module'
+ {
+ newLeafNode(otherlv_0, grammarAccess.getModuleAccess().getModuleKeyword_0());
+ }
+(
+(
+ lv_name_1_0=RULE_ID
+ {
+ newLeafNode(lv_name_1_0, grammarAccess.getModuleAccess().getNameIDTerminalRuleCall_1_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getModuleRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "name",
+ lv_name_1_0,
+ "ID");
+ }
+
+)
+)(
+(
+ {
+ newCompositeNode(grammarAccess.getModuleAccess().getImportsImportParserRuleCall_2_0());
+ }
+ lv_imports_2_0=ruleImport {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getModuleRule());
+ }
+ add(
+ $current,
+ "imports",
+ lv_imports_2_0,
+ "Import");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+)*(
+(
+ {
+ newCompositeNode(grammarAccess.getModuleAccess().getStatementsStatementParserRuleCall_3_0());
+ }
+ lv_statements_3_0=ruleStatement {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getModuleRule());
+ }
+ add(
+ $current,
+ "statements",
+ lv_statements_3_0,
+ "Statement");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+)*)
+;
+
+
+
+
+
+// Entry rule entryRuleImport
+entryRuleImport returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getImportRule()); }
+ iv_ruleImport=ruleImport
+ { $current=$iv_ruleImport.current; }
+ EOF
+;
+
+// Rule Import
+ruleImport returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+( otherlv_0='import'
+ {
+ newLeafNode(otherlv_0, grammarAccess.getImportAccess().getImportKeyword_0());
+ }
+(
+(
+ {
+ newCompositeNode(grammarAccess.getImportAccess().getImportedNamespaceImportNameParserRuleCall_1_0());
+ }
+ lv_importedNamespace_1_0=ruleImportName {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getImportRule());
+ }
+ set(
+ $current,
+ "importedNamespace",
+ lv_importedNamespace_1_0,
+ "ImportName");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+))
+;
+
+
+
+
+
+// Entry rule entryRuleImportName
+entryRuleImportName returns [String current=null]
+ :
+ { newCompositeNode(grammarAccess.getImportNameRule()); }
+ iv_ruleImportName=ruleImportName
+ { $current=$iv_ruleImportName.current.getText(); }
+ EOF
+;
+
+// Rule ImportName
+ruleImportName returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+( this_ID_0=RULE_ID {
+ $current.merge(this_ID_0);
+ }
+
+ {
+ newLeafNode(this_ID_0, grammarAccess.getImportNameAccess().getIDTerminalRuleCall_0());
+ }
+(
+ kw='.'
+ {
+ $current.merge(kw);
+ newLeafNode(kw, grammarAccess.getImportNameAccess().getFullStopKeyword_1_0());
+ }
+
+ kw='*'
+ {
+ $current.merge(kw);
+ newLeafNode(kw, grammarAccess.getImportNameAccess().getAsteriskKeyword_1_1());
+ }
+)?)
+ ;
+
+
+
+
+
+// Entry rule entryRuleStatement
+entryRuleStatement returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getStatementRule()); }
+ iv_ruleStatement=ruleStatement
+ { $current=$iv_ruleStatement.current; }
+ EOF
+;
+
+// Rule Statement
+ruleStatement returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+(
+ {
+ newCompositeNode(grammarAccess.getStatementAccess().getDefinitionParserRuleCall_0());
+ }
+ this_Definition_0=ruleDefinition
+ {
+ $current = $this_Definition_0.current;
+ afterParserOrEnumRuleCall();
+ }
+
+ |
+ {
+ newCompositeNode(grammarAccess.getStatementAccess().getEvaluationParserRuleCall_1());
+ }
+ this_Evaluation_1=ruleEvaluation
+ {
+ $current = $this_Evaluation_1.current;
+ afterParserOrEnumRuleCall();
+ }
+)
+;
+
+
+
+
+
+// Entry rule entryRuleDefinition
+entryRuleDefinition returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getDefinitionRule()); }
+ iv_ruleDefinition=ruleDefinition
+ { $current=$iv_ruleDefinition.current; }
+ EOF
+;
+
+// Rule Definition
+ruleDefinition returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+( otherlv_0='def'
+ {
+ newLeafNode(otherlv_0, grammarAccess.getDefinitionAccess().getDefKeyword_0());
+ }
+(
+(
+ lv_name_1_0=RULE_ID
+ {
+ newLeafNode(lv_name_1_0, grammarAccess.getDefinitionAccess().getNameIDTerminalRuleCall_1_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getDefinitionRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "name",
+ lv_name_1_0,
+ "ID");
+ }
+
+)
+)( otherlv_2='('
+ {
+ newLeafNode(otherlv_2, grammarAccess.getDefinitionAccess().getLeftParenthesisKeyword_2_0());
+ }
+(
+(
+ {
+ newCompositeNode(grammarAccess.getDefinitionAccess().getArgsDeclaredParameterParserRuleCall_2_1_0());
+ }
+ lv_args_3_0=ruleDeclaredParameter {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getDefinitionRule());
+ }
+ add(
+ $current,
+ "args",
+ lv_args_3_0,
+ "DeclaredParameter");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+)( otherlv_4=','
+ {
+ newLeafNode(otherlv_4, grammarAccess.getDefinitionAccess().getCommaKeyword_2_2_0());
+ }
+(
+(
+ {
+ newCompositeNode(grammarAccess.getDefinitionAccess().getArgsDeclaredParameterParserRuleCall_2_2_1_0());
+ }
+ lv_args_5_0=ruleDeclaredParameter {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getDefinitionRule());
+ }
+ add(
+ $current,
+ "args",
+ lv_args_5_0,
+ "DeclaredParameter");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+))* otherlv_6=')'
+ {
+ newLeafNode(otherlv_6, grammarAccess.getDefinitionAccess().getRightParenthesisKeyword_2_3());
+ }
+)? otherlv_7=':'
+ {
+ newLeafNode(otherlv_7, grammarAccess.getDefinitionAccess().getColonKeyword_3());
+ }
+(
+(
+ {
+ newCompositeNode(grammarAccess.getDefinitionAccess().getExprExpressionParserRuleCall_4_0());
+ }
+ lv_expr_8_0=ruleExpression {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getDefinitionRule());
+ }
+ set(
+ $current,
+ "expr",
+ lv_expr_8_0,
+ "Expression");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+) otherlv_9=';'
+ {
+ newLeafNode(otherlv_9, grammarAccess.getDefinitionAccess().getSemicolonKeyword_5());
+ }
+)
+;
+
+
+
+
+
+// Entry rule entryRuleDeclaredParameter
+entryRuleDeclaredParameter returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getDeclaredParameterRule()); }
+ iv_ruleDeclaredParameter=ruleDeclaredParameter
+ { $current=$iv_ruleDeclaredParameter.current; }
+ EOF
+;
+
+// Rule DeclaredParameter
+ruleDeclaredParameter returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+(
+(
+ lv_name_0_0=RULE_ID
+ {
+ newLeafNode(lv_name_0_0, grammarAccess.getDeclaredParameterAccess().getNameIDTerminalRuleCall_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getDeclaredParameterRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "name",
+ lv_name_0_0,
+ "ID");
+ }
+
+)
+)
+;
+
+
+
+
+
+
+
+// Entry rule entryRuleEvaluation
+entryRuleEvaluation returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getEvaluationRule()); }
+ iv_ruleEvaluation=ruleEvaluation
+ { $current=$iv_ruleEvaluation.current; }
+ EOF
+;
+
+// Rule Evaluation
+ruleEvaluation returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+((
+(
+ {
+ newCompositeNode(grammarAccess.getEvaluationAccess().getExpressionExpressionParserRuleCall_0_0());
+ }
+ lv_expression_0_0=ruleExpression {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getEvaluationRule());
+ }
+ set(
+ $current,
+ "expression",
+ lv_expression_0_0,
+ "Expression");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+) otherlv_1=';'
+ {
+ newLeafNode(otherlv_1, grammarAccess.getEvaluationAccess().getSemicolonKeyword_1());
+ }
+)
+;
+
+
+
+
+
+// Entry rule entryRuleExpression
+entryRuleExpression returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getExpressionRule()); }
+ iv_ruleExpression=ruleExpression
+ { $current=$iv_ruleExpression.current; }
+ EOF
+;
+
+// Rule Expression
+ruleExpression returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+
+ {
+ newCompositeNode(grammarAccess.getExpressionAccess().getAdditionParserRuleCall());
+ }
+ this_Addition_0=ruleAddition
+ {
+ $current = $this_Addition_0.current;
+ afterParserOrEnumRuleCall();
+ }
+
+;
+
+
+
+
+
+// Entry rule entryRuleAddition
+entryRuleAddition returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getAdditionRule()); }
+ iv_ruleAddition=ruleAddition
+ { $current=$iv_ruleAddition.current; }
+ EOF
+;
+
+// Rule Addition
+ruleAddition returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+(
+ {
+ newCompositeNode(grammarAccess.getAdditionAccess().getMultiplicationParserRuleCall_0());
+ }
+ this_Multiplication_0=ruleMultiplication
+ {
+ $current = $this_Multiplication_0.current;
+ afterParserOrEnumRuleCall();
+ }
+((((
+ {
+ $current = forceCreateModelElementAndSet(
+ grammarAccess.getAdditionAccess().getPlusLeftAction_1_0_0_0(),
+ $current);
+ }
+) otherlv_2='+'
+ {
+ newLeafNode(otherlv_2, grammarAccess.getAdditionAccess().getPlusSignKeyword_1_0_0_1());
+ }
+)
+ |((
+ {
+ $current = forceCreateModelElementAndSet(
+ grammarAccess.getAdditionAccess().getMinusLeftAction_1_0_1_0(),
+ $current);
+ }
+) otherlv_4='-'
+ {
+ newLeafNode(otherlv_4, grammarAccess.getAdditionAccess().getHyphenMinusKeyword_1_0_1_1());
+ }
+))(
+(
+ {
+ newCompositeNode(grammarAccess.getAdditionAccess().getRightMultiplicationParserRuleCall_1_1_0());
+ }
+ lv_right_5_0=ruleMultiplication {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getAdditionRule());
+ }
+ set(
+ $current,
+ "right",
+ lv_right_5_0,
+ "Multiplication");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+))*)
+;
+
+
+
+
+
+// Entry rule entryRuleMultiplication
+entryRuleMultiplication returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getMultiplicationRule()); }
+ iv_ruleMultiplication=ruleMultiplication
+ { $current=$iv_ruleMultiplication.current; }
+ EOF
+;
+
+// Rule Multiplication
+ruleMultiplication returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+(
+ {
+ newCompositeNode(grammarAccess.getMultiplicationAccess().getPrimaryExpressionParserRuleCall_0());
+ }
+ this_PrimaryExpression_0=rulePrimaryExpression
+ {
+ $current = $this_PrimaryExpression_0.current;
+ afterParserOrEnumRuleCall();
+ }
+((((
+ {
+ $current = forceCreateModelElementAndSet(
+ grammarAccess.getMultiplicationAccess().getMultiLeftAction_1_0_0_0(),
+ $current);
+ }
+) otherlv_2='*'
+ {
+ newLeafNode(otherlv_2, grammarAccess.getMultiplicationAccess().getAsteriskKeyword_1_0_0_1());
+ }
+)
+ |((
+ {
+ $current = forceCreateModelElementAndSet(
+ grammarAccess.getMultiplicationAccess().getDivLeftAction_1_0_1_0(),
+ $current);
+ }
+) otherlv_4='/'
+ {
+ newLeafNode(otherlv_4, grammarAccess.getMultiplicationAccess().getSolidusKeyword_1_0_1_1());
+ }
+))(
+(
+ {
+ newCompositeNode(grammarAccess.getMultiplicationAccess().getRightPrimaryExpressionParserRuleCall_1_1_0());
+ }
+ lv_right_5_0=rulePrimaryExpression {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getMultiplicationRule());
+ }
+ set(
+ $current,
+ "right",
+ lv_right_5_0,
+ "PrimaryExpression");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+))*)
+;
+
+
+
+
+
+// Entry rule entryRulePrimaryExpression
+entryRulePrimaryExpression returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getPrimaryExpressionRule()); }
+ iv_rulePrimaryExpression=rulePrimaryExpression
+ { $current=$iv_rulePrimaryExpression.current; }
+ EOF
+;
+
+// Rule PrimaryExpression
+rulePrimaryExpression returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+(( otherlv_0='('
+ {
+ newLeafNode(otherlv_0, grammarAccess.getPrimaryExpressionAccess().getLeftParenthesisKeyword_0_0());
+ }
+
+ {
+ newCompositeNode(grammarAccess.getPrimaryExpressionAccess().getExpressionParserRuleCall_0_1());
+ }
+ this_Expression_1=ruleExpression
+ {
+ $current = $this_Expression_1.current;
+ afterParserOrEnumRuleCall();
+ }
+ otherlv_2=')'
+ {
+ newLeafNode(otherlv_2, grammarAccess.getPrimaryExpressionAccess().getRightParenthesisKeyword_0_2());
+ }
+)
+ |((
+ {
+ $current = forceCreateModelElement(
+ grammarAccess.getPrimaryExpressionAccess().getNumberLiteralAction_1_0(),
+ $current);
+ }
+)(
+(
+ lv_value_4_0=RULE_NUMBER
+ {
+ newLeafNode(lv_value_4_0, grammarAccess.getPrimaryExpressionAccess().getValueNUMBERTerminalRuleCall_1_1_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getPrimaryExpressionRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "value",
+ lv_value_4_0,
+ "NUMBER");
+ }
+
+)
+))
+ |((
+ {
+ $current = forceCreateModelElement(
+ grammarAccess.getPrimaryExpressionAccess().getFunctionCallAction_2_0(),
+ $current);
+ }
+)(
+(
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getPrimaryExpressionRule());
+ }
+ }
+ otherlv_6=RULE_ID
+ {
+ newLeafNode(otherlv_6, grammarAccess.getPrimaryExpressionAccess().getFuncAbstractDefinitionCrossReference_2_1_0());
+ }
+
+)
+)( otherlv_7='('
+ {
+ newLeafNode(otherlv_7, grammarAccess.getPrimaryExpressionAccess().getLeftParenthesisKeyword_2_2_0());
+ }
+(
+(
+ {
+ newCompositeNode(grammarAccess.getPrimaryExpressionAccess().getArgsExpressionParserRuleCall_2_2_1_0());
+ }
+ lv_args_8_0=ruleExpression {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getPrimaryExpressionRule());
+ }
+ add(
+ $current,
+ "args",
+ lv_args_8_0,
+ "Expression");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+)( otherlv_9=','
+ {
+ newLeafNode(otherlv_9, grammarAccess.getPrimaryExpressionAccess().getCommaKeyword_2_2_2_0());
+ }
+(
+(
+ {
+ newCompositeNode(grammarAccess.getPrimaryExpressionAccess().getArgsExpressionParserRuleCall_2_2_2_1_0());
+ }
+ lv_args_10_0=ruleExpression {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getPrimaryExpressionRule());
+ }
+ add(
+ $current,
+ "args",
+ lv_args_10_0,
+ "Expression");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+))* otherlv_11=')'
+ {
+ newLeafNode(otherlv_11, grammarAccess.getPrimaryExpressionAccess().getRightParenthesisKeyword_2_2_3());
+ }
+)?))
+;
+
+
+
+
+
+RULE_NUMBER : ('0'..'9')* ('.' ('0'..'9')+)?;
+
+RULE_INT : 'this one has been deactivated';
+
+RULE_ID : '^'? ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*;
+
+RULE_STRING : ('"' ('\\' ('b'|'t'|'n'|'f'|'r'|'u'|'"'|'\''|'\\')|~(('\\'|'"')))* '"'|'\'' ('\\' ('b'|'t'|'n'|'f'|'r'|'u'|'"'|'\''|'\\')|~(('\\'|'\'')))* '\'');
+
+RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )*'*/';
+
+RULE_SL_COMMENT : '//' ~(('\n'|'\r'))* ('\r'? '\n')?;
+
+RULE_WS : (' '|'\t'|'\r'|'\n')+;
+
+RULE_ANY_OTHER : .;
+
+
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.tokens b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.tokens
new file mode 100644
index 0000000..e79a448
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.tokens
@@ -0,0 +1,34 @@
+RULE_ID=4
+T__24=24
+T__23=23
+T__22=22
+RULE_ANY_OTHER=11
+T__21=21
+T__20=20
+RULE_SL_COMMENT=9
+RULE_ML_COMMENT=8
+T__19=19
+RULE_STRING=7
+T__16=16
+T__15=15
+T__18=18
+T__17=17
+T__12=12
+RULE_NUMBER=5
+T__14=14
+T__13=13
+RULE_INT=6
+RULE_WS=10
+'/'=24
+'def'=16
+'module'=12
+';'=21
+'('=17
+':'=20
+'*'=15
+'-'=23
+'+'=22
+','=18
+'.'=14
+')'=19
+'import'=13
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmeticsLexer.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmeticsLexer.java
new file mode 100644
index 0000000..489f248
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmeticsLexer.java
@@ -0,0 +1,1252 @@
+package org.eclipse.xtext.example.arithmetics.parser.antlr.internal;
+
+// Hack: Use our own Lexer superclass by means of import.
+// Currently there is no other way to specify the superclass for the lexer.
+import org.eclipse.xtext.parser.antlr.Lexer;
+
+
+import org.antlr.runtime.*;
+import java.util.Stack;
+import java.util.List;
+import java.util.ArrayList;
+
+@SuppressWarnings("all")
+public class InternalArithmeticsLexer extends Lexer {
+ public static final int RULE_ID=4;
+ public static final int T__24=24;
+ public static final int T__23=23;
+ public static final int T__22=22;
+ public static final int RULE_ANY_OTHER=11;
+ public static final int T__21=21;
+ public static final int T__20=20;
+ public static final int EOF=-1;
+ public static final int RULE_SL_COMMENT=9;
+ public static final int RULE_ML_COMMENT=8;
+ public static final int T__19=19;
+ public static final int RULE_STRING=7;
+ public static final int T__16=16;
+ public static final int T__15=15;
+ public static final int T__18=18;
+ public static final int T__17=17;
+ public static final int RULE_NUMBER=5;
+ public static final int T__12=12;
+ public static final int T__14=14;
+ public static final int T__13=13;
+ public static final int RULE_INT=6;
+ public static final int RULE_WS=10;
+
+ // delegates
+ // delegators
+
+ public InternalArithmeticsLexer() {;}
+ public InternalArithmeticsLexer(CharStream input) {
+ this(input, new RecognizerSharedState());
+ }
+ public InternalArithmeticsLexer(CharStream input, RecognizerSharedState state) {
+ super(input,state);
+
+ }
+ public String getGrammarFileName() { return "../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g"; }
+
+ // $ANTLR start "T__12"
+ public final void mT__12() throws RecognitionException {
+ try {
+ int _type = T__12;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:11:7: ( 'module' )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:11:9: 'module'
+ {
+ match("module");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__12"
+
+ // $ANTLR start "T__13"
+ public final void mT__13() throws RecognitionException {
+ try {
+ int _type = T__13;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:12:7: ( 'import' )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:12:9: 'import'
+ {
+ match("import");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__13"
+
+ // $ANTLR start "T__14"
+ public final void mT__14() throws RecognitionException {
+ try {
+ int _type = T__14;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:13:7: ( '.' )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:13:9: '.'
+ {
+ match('.');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__14"
+
+ // $ANTLR start "T__15"
+ public final void mT__15() throws RecognitionException {
+ try {
+ int _type = T__15;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:14:7: ( '*' )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:14:9: '*'
+ {
+ match('*');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__15"
+
+ // $ANTLR start "T__16"
+ public final void mT__16() throws RecognitionException {
+ try {
+ int _type = T__16;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:15:7: ( 'def' )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:15:9: 'def'
+ {
+ match("def");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__16"
+
+ // $ANTLR start "T__17"
+ public final void mT__17() throws RecognitionException {
+ try {
+ int _type = T__17;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:16:7: ( '(' )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:16:9: '('
+ {
+ match('(');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__17"
+
+ // $ANTLR start "T__18"
+ public final void mT__18() throws RecognitionException {
+ try {
+ int _type = T__18;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:17:7: ( ',' )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:17:9: ','
+ {
+ match(',');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__18"
+
+ // $ANTLR start "T__19"
+ public final void mT__19() throws RecognitionException {
+ try {
+ int _type = T__19;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:18:7: ( ')' )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:18:9: ')'
+ {
+ match(')');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__19"
+
+ // $ANTLR start "T__20"
+ public final void mT__20() throws RecognitionException {
+ try {
+ int _type = T__20;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:19:7: ( ':' )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:19:9: ':'
+ {
+ match(':');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__20"
+
+ // $ANTLR start "T__21"
+ public final void mT__21() throws RecognitionException {
+ try {
+ int _type = T__21;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:20:7: ( ';' )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:20:9: ';'
+ {
+ match(';');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__21"
+
+ // $ANTLR start "T__22"
+ public final void mT__22() throws RecognitionException {
+ try {
+ int _type = T__22;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:21:7: ( '+' )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:21:9: '+'
+ {
+ match('+');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__22"
+
+ // $ANTLR start "T__23"
+ public final void mT__23() throws RecognitionException {
+ try {
+ int _type = T__23;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:22:7: ( '-' )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:22:9: '-'
+ {
+ match('-');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__23"
+
+ // $ANTLR start "T__24"
+ public final void mT__24() throws RecognitionException {
+ try {
+ int _type = T__24;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:23:7: ( '/' )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:23:9: '/'
+ {
+ match('/');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__24"
+
+ // $ANTLR start "RULE_NUMBER"
+ public final void mRULE_NUMBER() throws RecognitionException {
+ try {
+ int _type = RULE_NUMBER;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:768:13: ( ( '0' .. '9' )* ( '.' ( '0' .. '9' )+ )? )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:768:15: ( '0' .. '9' )* ( '.' ( '0' .. '9' )+ )?
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:768:15: ( '0' .. '9' )*
+ loop1:
+ do {
+ int alt1=2;
+ int LA1_0 = input.LA(1);
+
+ if ( ((LA1_0>='0' && LA1_0<='9')) ) {
+ alt1=1;
+ }
+
+
+ switch (alt1) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:768:16: '0' .. '9'
+ {
+ matchRange('0','9');
+
+ }
+ break;
+
+ default :
+ break loop1;
+ }
+ } while (true);
+
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:768:27: ( '.' ( '0' .. '9' )+ )?
+ int alt3=2;
+ int LA3_0 = input.LA(1);
+
+ if ( (LA3_0=='.') ) {
+ alt3=1;
+ }
+ switch (alt3) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:768:28: '.' ( '0' .. '9' )+
+ {
+ match('.');
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:768:32: ( '0' .. '9' )+
+ int cnt2=0;
+ loop2:
+ do {
+ int alt2=2;
+ int LA2_0 = input.LA(1);
+
+ if ( ((LA2_0>='0' && LA2_0<='9')) ) {
+ alt2=1;
+ }
+
+
+ switch (alt2) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:768:33: '0' .. '9'
+ {
+ matchRange('0','9');
+
+ }
+ break;
+
+ default :
+ if ( cnt2 >= 1 ) break loop2;
+ EarlyExitException eee =
+ new EarlyExitException(2, input);
+ throw eee;
+ }
+ cnt2++;
+ } while (true);
+
+
+ }
+ break;
+
+ }
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_NUMBER"
+
+ // $ANTLR start "RULE_INT"
+ public final void mRULE_INT() throws RecognitionException {
+ try {
+ int _type = RULE_INT;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:770:10: ( 'this one has been deactivated' )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:770:12: 'this one has been deactivated'
+ {
+ match("this one has been deactivated");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_INT"
+
+ // $ANTLR start "RULE_ID"
+ public final void mRULE_ID() throws RecognitionException {
+ try {
+ int _type = RULE_ID;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:772:9: ( ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:772:11: ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:772:11: ( '^' )?
+ int alt4=2;
+ int LA4_0 = input.LA(1);
+
+ if ( (LA4_0=='^') ) {
+ alt4=1;
+ }
+ switch (alt4) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:772:11: '^'
+ {
+ match('^');
+
+ }
+ break;
+
+ }
+
+ if ( (input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:772:40: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
+ loop5:
+ do {
+ int alt5=2;
+ int LA5_0 = input.LA(1);
+
+ if ( ((LA5_0>='0' && LA5_0<='9')||(LA5_0>='A' && LA5_0<='Z')||LA5_0=='_'||(LA5_0>='a' && LA5_0<='z')) ) {
+ alt5=1;
+ }
+
+
+ switch (alt5) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:
+ {
+ if ( (input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+
+ default :
+ break loop5;
+ }
+ } while (true);
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_ID"
+
+ // $ANTLR start "RULE_STRING"
+ public final void mRULE_STRING() throws RecognitionException {
+ try {
+ int _type = RULE_STRING;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:774:13: ( ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:774:15: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:774:15: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
+ int alt8=2;
+ int LA8_0 = input.LA(1);
+
+ if ( (LA8_0=='\"') ) {
+ alt8=1;
+ }
+ else if ( (LA8_0=='\'') ) {
+ alt8=2;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("", 8, 0, input);
+
+ throw nvae;
+ }
+ switch (alt8) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:774:16: '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"'
+ {
+ match('\"');
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:774:20: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )*
+ loop6:
+ do {
+ int alt6=3;
+ int LA6_0 = input.LA(1);
+
+ if ( (LA6_0=='\\') ) {
+ alt6=1;
+ }
+ else if ( ((LA6_0>='\u0000' && LA6_0<='!')||(LA6_0>='#' && LA6_0<='[')||(LA6_0>=']' && LA6_0<='\uFFFF')) ) {
+ alt6=2;
+ }
+
+
+ switch (alt6) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:774:21: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' )
+ {
+ match('\\');
+ if ( input.LA(1)=='\"'||input.LA(1)=='\''||input.LA(1)=='\\'||input.LA(1)=='b'||input.LA(1)=='f'||input.LA(1)=='n'||input.LA(1)=='r'||(input.LA(1)>='t' && input.LA(1)<='u') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+ case 2 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:774:66: ~ ( ( '\\\\' | '\"' ) )
+ {
+ if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+
+ default :
+ break loop6;
+ }
+ } while (true);
+
+ match('\"');
+
+ }
+ break;
+ case 2 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:774:86: '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\''
+ {
+ match('\'');
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:774:91: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )*
+ loop7:
+ do {
+ int alt7=3;
+ int LA7_0 = input.LA(1);
+
+ if ( (LA7_0=='\\') ) {
+ alt7=1;
+ }
+ else if ( ((LA7_0>='\u0000' && LA7_0<='&')||(LA7_0>='(' && LA7_0<='[')||(LA7_0>=']' && LA7_0<='\uFFFF')) ) {
+ alt7=2;
+ }
+
+
+ switch (alt7) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:774:92: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' )
+ {
+ match('\\');
+ if ( input.LA(1)=='\"'||input.LA(1)=='\''||input.LA(1)=='\\'||input.LA(1)=='b'||input.LA(1)=='f'||input.LA(1)=='n'||input.LA(1)=='r'||(input.LA(1)>='t' && input.LA(1)<='u') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+ case 2 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:774:137: ~ ( ( '\\\\' | '\\'' ) )
+ {
+ if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+
+ default :
+ break loop7;
+ }
+ } while (true);
+
+ match('\'');
+
+ }
+ break;
+
+ }
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_STRING"
+
+ // $ANTLR start "RULE_ML_COMMENT"
+ public final void mRULE_ML_COMMENT() throws RecognitionException {
+ try {
+ int _type = RULE_ML_COMMENT;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:776:17: ( '/*' ( options {greedy=false; } : . )* '*/' )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:776:19: '/*' ( options {greedy=false; } : . )* '*/'
+ {
+ match("/*");
+
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:776:24: ( options {greedy=false; } : . )*
+ loop9:
+ do {
+ int alt9=2;
+ int LA9_0 = input.LA(1);
+
+ if ( (LA9_0=='*') ) {
+ int LA9_1 = input.LA(2);
+
+ if ( (LA9_1=='/') ) {
+ alt9=2;
+ }
+ else if ( ((LA9_1>='\u0000' && LA9_1<='.')||(LA9_1>='0' && LA9_1<='\uFFFF')) ) {
+ alt9=1;
+ }
+
+
+ }
+ else if ( ((LA9_0>='\u0000' && LA9_0<=')')||(LA9_0>='+' && LA9_0<='\uFFFF')) ) {
+ alt9=1;
+ }
+
+
+ switch (alt9) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:776:52: .
+ {
+ matchAny();
+
+ }
+ break;
+
+ default :
+ break loop9;
+ }
+ } while (true);
+
+ match("*/");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_ML_COMMENT"
+
+ // $ANTLR start "RULE_SL_COMMENT"
+ public final void mRULE_SL_COMMENT() throws RecognitionException {
+ try {
+ int _type = RULE_SL_COMMENT;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:778:17: ( '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:778:19: '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
+ {
+ match("//");
+
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:778:24: (~ ( ( '\\n' | '\\r' ) ) )*
+ loop10:
+ do {
+ int alt10=2;
+ int LA10_0 = input.LA(1);
+
+ if ( ((LA10_0>='\u0000' && LA10_0<='\t')||(LA10_0>='\u000B' && LA10_0<='\f')||(LA10_0>='\u000E' && LA10_0<='\uFFFF')) ) {
+ alt10=1;
+ }
+
+
+ switch (alt10) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:778:24: ~ ( ( '\\n' | '\\r' ) )
+ {
+ if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFF') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+
+ default :
+ break loop10;
+ }
+ } while (true);
+
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:778:40: ( ( '\\r' )? '\\n' )?
+ int alt12=2;
+ int LA12_0 = input.LA(1);
+
+ if ( (LA12_0=='\n'||LA12_0=='\r') ) {
+ alt12=1;
+ }
+ switch (alt12) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:778:41: ( '\\r' )? '\\n'
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:778:41: ( '\\r' )?
+ int alt11=2;
+ int LA11_0 = input.LA(1);
+
+ if ( (LA11_0=='\r') ) {
+ alt11=1;
+ }
+ switch (alt11) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:778:41: '\\r'
+ {
+ match('\r');
+
+ }
+ break;
+
+ }
+
+ match('\n');
+
+ }
+ break;
+
+ }
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_SL_COMMENT"
+
+ // $ANTLR start "RULE_WS"
+ public final void mRULE_WS() throws RecognitionException {
+ try {
+ int _type = RULE_WS;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:780:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:780:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:780:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
+ int cnt13=0;
+ loop13:
+ do {
+ int alt13=2;
+ int LA13_0 = input.LA(1);
+
+ if ( ((LA13_0>='\t' && LA13_0<='\n')||LA13_0=='\r'||LA13_0==' ') ) {
+ alt13=1;
+ }
+
+
+ switch (alt13) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:
+ {
+ if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)=='\r'||input.LA(1)==' ' ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+
+ default :
+ if ( cnt13 >= 1 ) break loop13;
+ EarlyExitException eee =
+ new EarlyExitException(13, input);
+ throw eee;
+ }
+ cnt13++;
+ } while (true);
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_WS"
+
+ // $ANTLR start "RULE_ANY_OTHER"
+ public final void mRULE_ANY_OTHER() throws RecognitionException {
+ try {
+ int _type = RULE_ANY_OTHER;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:782:16: ( . )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:782:18: .
+ {
+ matchAny();
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_ANY_OTHER"
+
+ public void mTokens() throws RecognitionException {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:1:8: ( T__12 | T__13 | T__14 | T__15 | T__16 | T__17 | T__18 | T__19 | T__20 | T__21 | T__22 | T__23 | T__24 | RULE_NUMBER | RULE_INT | RULE_ID | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER )
+ int alt14=21;
+ alt14 = dfa14.predict(input);
+ switch (alt14) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:1:10: T__12
+ {
+ mT__12();
+
+ }
+ break;
+ case 2 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:1:16: T__13
+ {
+ mT__13();
+
+ }
+ break;
+ case 3 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:1:22: T__14
+ {
+ mT__14();
+
+ }
+ break;
+ case 4 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:1:28: T__15
+ {
+ mT__15();
+
+ }
+ break;
+ case 5 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:1:34: T__16
+ {
+ mT__16();
+
+ }
+ break;
+ case 6 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:1:40: T__17
+ {
+ mT__17();
+
+ }
+ break;
+ case 7 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:1:46: T__18
+ {
+ mT__18();
+
+ }
+ break;
+ case 8 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:1:52: T__19
+ {
+ mT__19();
+
+ }
+ break;
+ case 9 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:1:58: T__20
+ {
+ mT__20();
+
+ }
+ break;
+ case 10 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:1:64: T__21
+ {
+ mT__21();
+
+ }
+ break;
+ case 11 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:1:70: T__22
+ {
+ mT__22();
+
+ }
+ break;
+ case 12 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:1:76: T__23
+ {
+ mT__23();
+
+ }
+ break;
+ case 13 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:1:82: T__24
+ {
+ mT__24();
+
+ }
+ break;
+ case 14 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:1:88: RULE_NUMBER
+ {
+ mRULE_NUMBER();
+
+ }
+ break;
+ case 15 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:1:100: RULE_INT
+ {
+ mRULE_INT();
+
+ }
+ break;
+ case 16 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:1:109: RULE_ID
+ {
+ mRULE_ID();
+
+ }
+ break;
+ case 17 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:1:117: RULE_STRING
+ {
+ mRULE_STRING();
+
+ }
+ break;
+ case 18 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:1:129: RULE_ML_COMMENT
+ {
+ mRULE_ML_COMMENT();
+
+ }
+ break;
+ case 19 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:1:145: RULE_SL_COMMENT
+ {
+ mRULE_SL_COMMENT();
+
+ }
+ break;
+ case 20 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:1:161: RULE_WS
+ {
+ mRULE_WS();
+
+ }
+ break;
+ case 21 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:1:169: RULE_ANY_OTHER
+ {
+ mRULE_ANY_OTHER();
+
+ }
+ break;
+
+ }
+
+ }
+
+
+ protected DFA14 dfa14 = new DFA14(this);
+ static final String DFA14_eotS =
+ "\1\17\2\30\1\32\1\uffff\1\30\7\uffff\1\46\2\uffff\1\30\1\26\1\uffff"+
+ "\2\26\2\uffff\1\30\1\uffff\1\30\2\uffff\1\30\12\uffff\1\30\2\uffff"+
+ "\2\30\1\60\3\30\1\uffff\3\30\1\uffff\1\67\1\70\2\uffff";
+ static final String DFA14_eofS =
+ "\71\uffff";
+ static final String DFA14_minS =
+ "\1\0\1\157\1\155\1\60\1\uffff\1\145\7\uffff\1\52\2\uffff\1\150\1"+
+ "\101\1\uffff\2\0\2\uffff\1\144\1\uffff\1\160\2\uffff\1\146\12\uffff"+
+ "\1\151\2\uffff\1\165\1\157\1\60\1\163\1\154\1\162\1\uffff\1\40\1"+
+ "\145\1\164\1\uffff\2\60\2\uffff";
+ static final String DFA14_maxS =
+ "\1\uffff\1\157\1\155\1\71\1\uffff\1\145\7\uffff\1\57\2\uffff\1\150"+
+ "\1\172\1\uffff\2\uffff\2\uffff\1\144\1\uffff\1\160\2\uffff\1\146"+
+ "\12\uffff\1\151\2\uffff\1\165\1\157\1\172\1\163\1\154\1\162\1\uffff"+
+ "\1\40\1\145\1\164\1\uffff\2\172\2\uffff";
+ static final String DFA14_acceptS =
+ "\4\uffff\1\4\1\uffff\1\6\1\7\1\10\1\11\1\12\1\13\1\14\1\uffff\2"+
+ "\16\2\uffff\1\20\2\uffff\1\24\1\25\1\uffff\1\20\1\uffff\1\3\1\4"+
+ "\1\uffff\1\6\1\7\1\10\1\11\1\12\1\13\1\14\1\22\1\23\1\15\1\uffff"+
+ "\1\21\1\24\6\uffff\1\5\3\uffff\1\17\2\uffff\1\1\1\2";
+ static final String DFA14_specialS =
+ "\1\0\22\uffff\1\1\1\2\44\uffff}>";
+ static final String[] DFA14_transitionS = {
+ "\11\26\2\25\2\26\1\25\22\26\1\25\1\26\1\23\4\26\1\24\1\6\1\10"+
+ "\1\4\1\13\1\7\1\14\1\3\1\15\12\16\1\11\1\12\5\26\32\22\3\26"+
+ "\1\21\1\22\1\26\3\22\1\5\4\22\1\2\3\22\1\1\6\22\1\20\6\22\uff85"+
+ "\26",
+ "\1\27",
+ "\1\31",
+ "\12\17",
+ "",
+ "\1\34",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "\1\44\4\uffff\1\45",
+ "",
+ "",
+ "\1\47",
+ "\32\30\4\uffff\1\30\1\uffff\32\30",
+ "",
+ "\0\50",
+ "\0\50",
+ "",
+ "",
+ "\1\52",
+ "",
+ "\1\53",
+ "",
+ "",
+ "\1\54",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "\1\55",
+ "",
+ "",
+ "\1\56",
+ "\1\57",
+ "\12\30\7\uffff\32\30\4\uffff\1\30\1\uffff\32\30",
+ "\1\61",
+ "\1\62",
+ "\1\63",
+ "",
+ "\1\64",
+ "\1\65",
+ "\1\66",
+ "",
+ "\12\30\7\uffff\32\30\4\uffff\1\30\1\uffff\32\30",
+ "\12\30\7\uffff\32\30\4\uffff\1\30\1\uffff\32\30",
+ "",
+ ""
+ };
+
+ static final short[] DFA14_eot = DFA.unpackEncodedString(DFA14_eotS);
+ static final short[] DFA14_eof = DFA.unpackEncodedString(DFA14_eofS);
+ static final char[] DFA14_min = DFA.unpackEncodedStringToUnsignedChars(DFA14_minS);
+ static final char[] DFA14_max = DFA.unpackEncodedStringToUnsignedChars(DFA14_maxS);
+ static final short[] DFA14_accept = DFA.unpackEncodedString(DFA14_acceptS);
+ static final short[] DFA14_special = DFA.unpackEncodedString(DFA14_specialS);
+ static final short[][] DFA14_transition;
+
+ static {
+ int numStates = DFA14_transitionS.length;
+ DFA14_transition = new short[numStates][];
+ for (int i=0; i<numStates; i++) {
+ DFA14_transition[i] = DFA.unpackEncodedString(DFA14_transitionS[i]);
+ }
+ }
+
+ class DFA14 extends DFA {
+
+ public DFA14(BaseRecognizer recognizer) {
+ this.recognizer = recognizer;
+ this.decisionNumber = 14;
+ this.eot = DFA14_eot;
+ this.eof = DFA14_eof;
+ this.min = DFA14_min;
+ this.max = DFA14_max;
+ this.accept = DFA14_accept;
+ this.special = DFA14_special;
+ this.transition = DFA14_transition;
+ }
+ public String getDescription() {
+ return "1:1: Tokens : ( T__12 | T__13 | T__14 | T__15 | T__16 | T__17 | T__18 | T__19 | T__20 | T__21 | T__22 | T__23 | T__24 | RULE_NUMBER | RULE_INT | RULE_ID | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER );";
+ }
+ public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
+ IntStream input = _input;
+ int _s = s;
+ switch ( s ) {
+ case 0 :
+ int LA14_0 = input.LA(1);
+
+ s = -1;
+ if ( (LA14_0=='m') ) {s = 1;}
+
+ else if ( (LA14_0=='i') ) {s = 2;}
+
+ else if ( (LA14_0=='.') ) {s = 3;}
+
+ else if ( (LA14_0=='*') ) {s = 4;}
+
+ else if ( (LA14_0=='d') ) {s = 5;}
+
+ else if ( (LA14_0=='(') ) {s = 6;}
+
+ else if ( (LA14_0==',') ) {s = 7;}
+
+ else if ( (LA14_0==')') ) {s = 8;}
+
+ else if ( (LA14_0==':') ) {s = 9;}
+
+ else if ( (LA14_0==';') ) {s = 10;}
+
+ else if ( (LA14_0=='+') ) {s = 11;}
+
+ else if ( (LA14_0=='-') ) {s = 12;}
+
+ else if ( (LA14_0=='/') ) {s = 13;}
+
+ else if ( ((LA14_0>='0' && LA14_0<='9')) ) {s = 14;}
+
+ else if ( (LA14_0=='t') ) {s = 16;}
+
+ else if ( (LA14_0=='^') ) {s = 17;}
+
+ else if ( ((LA14_0>='A' && LA14_0<='Z')||LA14_0=='_'||(LA14_0>='a' && LA14_0<='c')||(LA14_0>='e' && LA14_0<='h')||(LA14_0>='j' && LA14_0<='l')||(LA14_0>='n' && LA14_0<='s')||(LA14_0>='u' && LA14_0<='z')) ) {s = 18;}
+
+ else if ( (LA14_0=='\"') ) {s = 19;}
+
+ else if ( (LA14_0=='\'') ) {s = 20;}
+
+ else if ( ((LA14_0>='\t' && LA14_0<='\n')||LA14_0=='\r'||LA14_0==' ') ) {s = 21;}
+
+ else if ( ((LA14_0>='\u0000' && LA14_0<='\b')||(LA14_0>='\u000B' && LA14_0<='\f')||(LA14_0>='\u000E' && LA14_0<='\u001F')||LA14_0=='!'||(LA14_0>='#' && LA14_0<='&')||(LA14_0>='<' && LA14_0<='@')||(LA14_0>='[' && LA14_0<=']')||LA14_0=='`'||(LA14_0>='{' && LA14_0<='\uFFFF')) ) {s = 22;}
+
+ else s = 15;
+
+ if ( s>=0 ) return s;
+ break;
+ case 1 :
+ int LA14_19 = input.LA(1);
+
+ s = -1;
+ if ( ((LA14_19>='\u0000' && LA14_19<='\uFFFF')) ) {s = 40;}
+
+ else s = 22;
+
+ if ( s>=0 ) return s;
+ break;
+ case 2 :
+ int LA14_20 = input.LA(1);
+
+ s = -1;
+ if ( ((LA14_20>='\u0000' && LA14_20<='\uFFFF')) ) {s = 40;}
+
+ else s = 22;
+
+ if ( s>=0 ) return s;
+ break;
+ }
+ NoViableAltException nvae =
+ new NoViableAltException(getDescription(), 14, _s, input);
+ error(nvae);
+ throw nvae;
+ }
+ }
+
+
+}
\ No newline at end of file
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmeticsParser.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmeticsParser.java
new file mode 100644
index 0000000..1b483d8
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmeticsParser.java
@@ -0,0 +1,2034 @@
+package org.eclipse.xtext.example.arithmetics.parser.antlr.internal;
+
+import org.eclipse.xtext.*;
+import org.eclipse.xtext.parser.*;
+import org.eclipse.xtext.parser.impl.*;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens;
+import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken;
+import org.eclipse.xtext.example.arithmetics.services.ArithmeticsGrammarAccess;
+
+
+
+import org.antlr.runtime.*;
+import java.util.Stack;
+import java.util.List;
+import java.util.ArrayList;
+
+@SuppressWarnings("all")
+public class InternalArithmeticsParser extends AbstractInternalAntlrParser {
+ public static final String[] tokenNames = new String[] {
+ "<invalid>", "<EOR>", "<DOWN>", "<UP>", "RULE_ID", "RULE_NUMBER", "RULE_INT", "RULE_STRING", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS", "RULE_ANY_OTHER", "'module'", "'import'", "'.'", "'*'", "'def'", "'('", "','", "')'", "':'", "';'", "'+'", "'-'", "'/'"
+ };
+ public static final int RULE_ID=4;
+ public static final int T__24=24;
+ public static final int T__23=23;
+ public static final int T__22=22;
+ public static final int RULE_ANY_OTHER=11;
+ public static final int T__21=21;
+ public static final int T__20=20;
+ public static final int RULE_SL_COMMENT=9;
+ public static final int EOF=-1;
+ public static final int RULE_ML_COMMENT=8;
+ public static final int T__19=19;
+ public static final int RULE_STRING=7;
+ public static final int T__16=16;
+ public static final int T__15=15;
+ public static final int T__18=18;
+ public static final int T__17=17;
+ public static final int T__12=12;
+ public static final int RULE_NUMBER=5;
+ public static final int T__14=14;
+ public static final int T__13=13;
+ public static final int RULE_INT=6;
+ public static final int RULE_WS=10;
+
+ // delegates
+ // delegators
+
+
+ public InternalArithmeticsParser(TokenStream input) {
+ this(input, new RecognizerSharedState());
+ }
+ public InternalArithmeticsParser(TokenStream input, RecognizerSharedState state) {
+ super(input, state);
+
+ }
+
+
+ public String[] getTokenNames() { return InternalArithmeticsParser.tokenNames; }
+ public String getGrammarFileName() { return "../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g"; }
+
+
+
+ private ArithmeticsGrammarAccess grammarAccess;
+
+ public InternalArithmeticsParser(TokenStream input, ArithmeticsGrammarAccess grammarAccess) {
+ this(input);
+ this.grammarAccess = grammarAccess;
+ registerRules(grammarAccess.getGrammar());
+ }
+
+ @Override
+ protected String getFirstRuleName() {
+ return "Module";
+ }
+
+ @Override
+ protected ArithmeticsGrammarAccess getGrammarAccess() {
+ return grammarAccess;
+ }
+
+
+
+ // $ANTLR start "entryRuleModule"
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:67:1: entryRuleModule returns [EObject current=null] : iv_ruleModule= ruleModule EOF ;
+ public final EObject entryRuleModule() throws RecognitionException {
+ EObject current = null;
+
+ EObject iv_ruleModule = null;
+
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:68:2: (iv_ruleModule= ruleModule EOF )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:69:2: iv_ruleModule= ruleModule EOF
+ {
+ newCompositeNode(grammarAccess.getModuleRule());
+ pushFollow(FOLLOW_ruleModule_in_entryRuleModule75);
+ iv_ruleModule=ruleModule();
+
+ state._fsp--;
+
+ current =iv_ruleModule;
+ match(input,EOF,FOLLOW_EOF_in_entryRuleModule85);
+
+ }
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "entryRuleModule"
+
+
+ // $ANTLR start "ruleModule"
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:76:1: ruleModule returns [EObject current=null] : (otherlv_0= 'module' ( (lv_name_1_0= RULE_ID ) ) ( (lv_imports_2_0= ruleImport ) )* ( (lv_statements_3_0= ruleStatement ) )* ) ;
+ public final EObject ruleModule() throws RecognitionException {
+ EObject current = null;
+
+ Token otherlv_0=null;
+ Token lv_name_1_0=null;
+ EObject lv_imports_2_0 = null;
+
+ EObject lv_statements_3_0 = null;
+
+
+ enterRule();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:79:28: ( (otherlv_0= 'module' ( (lv_name_1_0= RULE_ID ) ) ( (lv_imports_2_0= ruleImport ) )* ( (lv_statements_3_0= ruleStatement ) )* ) )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:80:1: (otherlv_0= 'module' ( (lv_name_1_0= RULE_ID ) ) ( (lv_imports_2_0= ruleImport ) )* ( (lv_statements_3_0= ruleStatement ) )* )
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:80:1: (otherlv_0= 'module' ( (lv_name_1_0= RULE_ID ) ) ( (lv_imports_2_0= ruleImport ) )* ( (lv_statements_3_0= ruleStatement ) )* )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:80:3: otherlv_0= 'module' ( (lv_name_1_0= RULE_ID ) ) ( (lv_imports_2_0= ruleImport ) )* ( (lv_statements_3_0= ruleStatement ) )*
+ {
+ otherlv_0=(Token)match(input,12,FOLLOW_12_in_ruleModule122);
+
+ newLeafNode(otherlv_0, grammarAccess.getModuleAccess().getModuleKeyword_0());
+
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:84:1: ( (lv_name_1_0= RULE_ID ) )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:85:1: (lv_name_1_0= RULE_ID )
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:85:1: (lv_name_1_0= RULE_ID )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:86:3: lv_name_1_0= RULE_ID
+ {
+ lv_name_1_0=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleModule139);
+
+ newLeafNode(lv_name_1_0, grammarAccess.getModuleAccess().getNameIDTerminalRuleCall_1_0());
+
+
+ if (current==null) {
+ current = createModelElement(grammarAccess.getModuleRule());
+ }
+ setWithLastConsumed(
+ current,
+ "name",
+ lv_name_1_0,
+ "ID");
+
+
+ }
+
+
+ }
+
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:102:2: ( (lv_imports_2_0= ruleImport ) )*
+ loop1:
+ do {
+ int alt1=2;
+ int LA1_0 = input.LA(1);
+
+ if ( (LA1_0==13) ) {
+ alt1=1;
+ }
+
+
+ switch (alt1) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:103:1: (lv_imports_2_0= ruleImport )
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:103:1: (lv_imports_2_0= ruleImport )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:104:3: lv_imports_2_0= ruleImport
+ {
+
+ newCompositeNode(grammarAccess.getModuleAccess().getImportsImportParserRuleCall_2_0());
+
+ pushFollow(FOLLOW_ruleImport_in_ruleModule165);
+ lv_imports_2_0=ruleImport();
+
+ state._fsp--;
+
+
+ if (current==null) {
+ current = createModelElementForParent(grammarAccess.getModuleRule());
+ }
+ add(
+ current,
+ "imports",
+ lv_imports_2_0,
+ "Import");
+ afterParserOrEnumRuleCall();
+
+
+ }
+
+
+ }
+ break;
+
+ default :
+ break loop1;
+ }
+ } while (true);
+
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:120:3: ( (lv_statements_3_0= ruleStatement ) )*
+ loop2:
+ do {
+ int alt2=2;
+ int LA2_0 = input.LA(1);
+
+ if ( ((LA2_0>=RULE_ID && LA2_0<=RULE_NUMBER)||(LA2_0>=16 && LA2_0<=17)) ) {
+ alt2=1;
+ }
+
+
+ switch (alt2) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:121:1: (lv_statements_3_0= ruleStatement )
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:121:1: (lv_statements_3_0= ruleStatement )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:122:3: lv_statements_3_0= ruleStatement
+ {
+
+ newCompositeNode(grammarAccess.getModuleAccess().getStatementsStatementParserRuleCall_3_0());
+
+ pushFollow(FOLLOW_ruleStatement_in_ruleModule187);
+ lv_statements_3_0=ruleStatement();
+
+ state._fsp--;
+
+
+ if (current==null) {
+ current = createModelElementForParent(grammarAccess.getModuleRule());
+ }
+ add(
+ current,
+ "statements",
+ lv_statements_3_0,
+ "Statement");
+ afterParserOrEnumRuleCall();
+
+
+ }
+
+
+ }
+ break;
+
+ default :
+ break loop2;
+ }
+ } while (true);
+
+
+ }
+
+
+ }
+
+ leaveRule();
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "ruleModule"
+
+
+ // $ANTLR start "entryRuleImport"
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:146:1: entryRuleImport returns [EObject current=null] : iv_ruleImport= ruleImport EOF ;
+ public final EObject entryRuleImport() throws RecognitionException {
+ EObject current = null;
+
+ EObject iv_ruleImport = null;
+
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:147:2: (iv_ruleImport= ruleImport EOF )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:148:2: iv_ruleImport= ruleImport EOF
+ {
+ newCompositeNode(grammarAccess.getImportRule());
+ pushFollow(FOLLOW_ruleImport_in_entryRuleImport224);
+ iv_ruleImport=ruleImport();
+
+ state._fsp--;
+
+ current =iv_ruleImport;
+ match(input,EOF,FOLLOW_EOF_in_entryRuleImport234);
+
+ }
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "entryRuleImport"
+
+
+ // $ANTLR start "ruleImport"
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:155:1: ruleImport returns [EObject current=null] : (otherlv_0= 'import' ( (lv_importedNamespace_1_0= ruleImportName ) ) ) ;
+ public final EObject ruleImport() throws RecognitionException {
+ EObject current = null;
+
+ Token otherlv_0=null;
+ AntlrDatatypeRuleToken lv_importedNamespace_1_0 = null;
+
+
+ enterRule();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:158:28: ( (otherlv_0= 'import' ( (lv_importedNamespace_1_0= ruleImportName ) ) ) )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:159:1: (otherlv_0= 'import' ( (lv_importedNamespace_1_0= ruleImportName ) ) )
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:159:1: (otherlv_0= 'import' ( (lv_importedNamespace_1_0= ruleImportName ) ) )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:159:3: otherlv_0= 'import' ( (lv_importedNamespace_1_0= ruleImportName ) )
+ {
+ otherlv_0=(Token)match(input,13,FOLLOW_13_in_ruleImport271);
+
+ newLeafNode(otherlv_0, grammarAccess.getImportAccess().getImportKeyword_0());
+
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:163:1: ( (lv_importedNamespace_1_0= ruleImportName ) )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:164:1: (lv_importedNamespace_1_0= ruleImportName )
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:164:1: (lv_importedNamespace_1_0= ruleImportName )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:165:3: lv_importedNamespace_1_0= ruleImportName
+ {
+
+ newCompositeNode(grammarAccess.getImportAccess().getImportedNamespaceImportNameParserRuleCall_1_0());
+
+ pushFollow(FOLLOW_ruleImportName_in_ruleImport292);
+ lv_importedNamespace_1_0=ruleImportName();
+
+ state._fsp--;
+
+
+ if (current==null) {
+ current = createModelElementForParent(grammarAccess.getImportRule());
+ }
+ set(
+ current,
+ "importedNamespace",
+ lv_importedNamespace_1_0,
+ "ImportName");
+ afterParserOrEnumRuleCall();
+
+
+ }
+
+
+ }
+
+
+ }
+
+
+ }
+
+ leaveRule();
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "ruleImport"
+
+
+ // $ANTLR start "entryRuleImportName"
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:189:1: entryRuleImportName returns [String current=null] : iv_ruleImportName= ruleImportName EOF ;
+ public final String entryRuleImportName() throws RecognitionException {
+ String current = null;
+
+ AntlrDatatypeRuleToken iv_ruleImportName = null;
+
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:190:2: (iv_ruleImportName= ruleImportName EOF )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:191:2: iv_ruleImportName= ruleImportName EOF
+ {
+ newCompositeNode(grammarAccess.getImportNameRule());
+ pushFollow(FOLLOW_ruleImportName_in_entryRuleImportName329);
+ iv_ruleImportName=ruleImportName();
+
+ state._fsp--;
+
+ current =iv_ruleImportName.getText();
+ match(input,EOF,FOLLOW_EOF_in_entryRuleImportName340);
+
+ }
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "entryRuleImportName"
+
+
+ // $ANTLR start "ruleImportName"
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:198:1: ruleImportName returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_ID_0= RULE_ID (kw= '.' kw= '*' )? ) ;
+ public final AntlrDatatypeRuleToken ruleImportName() throws RecognitionException {
+ AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
+
+ Token this_ID_0=null;
+ Token kw=null;
+
+ enterRule();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:201:28: ( (this_ID_0= RULE_ID (kw= '.' kw= '*' )? ) )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:202:1: (this_ID_0= RULE_ID (kw= '.' kw= '*' )? )
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:202:1: (this_ID_0= RULE_ID (kw= '.' kw= '*' )? )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:202:6: this_ID_0= RULE_ID (kw= '.' kw= '*' )?
+ {
+ this_ID_0=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleImportName380);
+
+ current.merge(this_ID_0);
+
+
+ newLeafNode(this_ID_0, grammarAccess.getImportNameAccess().getIDTerminalRuleCall_0());
+
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:209:1: (kw= '.' kw= '*' )?
+ int alt3=2;
+ int LA3_0 = input.LA(1);
+
+ if ( (LA3_0==14) ) {
+ alt3=1;
+ }
+ switch (alt3) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:210:2: kw= '.' kw= '*'
+ {
+ kw=(Token)match(input,14,FOLLOW_14_in_ruleImportName399);
+
+ current.merge(kw);
+ newLeafNode(kw, grammarAccess.getImportNameAccess().getFullStopKeyword_1_0());
+
+ kw=(Token)match(input,15,FOLLOW_15_in_ruleImportName412);
+
+ current.merge(kw);
+ newLeafNode(kw, grammarAccess.getImportNameAccess().getAsteriskKeyword_1_1());
+
+
+ }
+ break;
+
+ }
+
+
+ }
+
+
+ }
+
+ leaveRule();
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "ruleImportName"
+
+
+ // $ANTLR start "entryRuleStatement"
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:229:1: entryRuleStatement returns [EObject current=null] : iv_ruleStatement= ruleStatement EOF ;
+ public final EObject entryRuleStatement() throws RecognitionException {
+ EObject current = null;
+
+ EObject iv_ruleStatement = null;
+
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:230:2: (iv_ruleStatement= ruleStatement EOF )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:231:2: iv_ruleStatement= ruleStatement EOF
+ {
+ newCompositeNode(grammarAccess.getStatementRule());
+ pushFollow(FOLLOW_ruleStatement_in_entryRuleStatement454);
+ iv_ruleStatement=ruleStatement();
+
+ state._fsp--;
+
+ current =iv_ruleStatement;
+ match(input,EOF,FOLLOW_EOF_in_entryRuleStatement464);
+
+ }
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "entryRuleStatement"
+
+
+ // $ANTLR start "ruleStatement"
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:238:1: ruleStatement returns [EObject current=null] : (this_Definition_0= ruleDefinition | this_Evaluation_1= ruleEvaluation ) ;
+ public final EObject ruleStatement() throws RecognitionException {
+ EObject current = null;
+
+ EObject this_Definition_0 = null;
+
+ EObject this_Evaluation_1 = null;
+
+
+ enterRule();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:241:28: ( (this_Definition_0= ruleDefinition | this_Evaluation_1= ruleEvaluation ) )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:242:1: (this_Definition_0= ruleDefinition | this_Evaluation_1= ruleEvaluation )
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:242:1: (this_Definition_0= ruleDefinition | this_Evaluation_1= ruleEvaluation )
+ int alt4=2;
+ int LA4_0 = input.LA(1);
+
+ if ( (LA4_0==16) ) {
+ alt4=1;
+ }
+ else if ( ((LA4_0>=RULE_ID && LA4_0<=RULE_NUMBER)||LA4_0==17) ) {
+ alt4=2;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("", 4, 0, input);
+
+ throw nvae;
+ }
+ switch (alt4) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:243:5: this_Definition_0= ruleDefinition
+ {
+
+ newCompositeNode(grammarAccess.getStatementAccess().getDefinitionParserRuleCall_0());
+
+ pushFollow(FOLLOW_ruleDefinition_in_ruleStatement511);
+ this_Definition_0=ruleDefinition();
+
+ state._fsp--;
+
+
+ current = this_Definition_0;
+ afterParserOrEnumRuleCall();
+
+
+ }
+ break;
+ case 2 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:253:5: this_Evaluation_1= ruleEvaluation
+ {
+
+ newCompositeNode(grammarAccess.getStatementAccess().getEvaluationParserRuleCall_1());
+
+ pushFollow(FOLLOW_ruleEvaluation_in_ruleStatement538);
+ this_Evaluation_1=ruleEvaluation();
+
+ state._fsp--;
+
+
+ current = this_Evaluation_1;
+ afterParserOrEnumRuleCall();
+
+
+ }
+ break;
+
+ }
+
+
+ }
+
+ leaveRule();
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "ruleStatement"
+
+
+ // $ANTLR start "entryRuleDefinition"
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:269:1: entryRuleDefinition returns [EObject current=null] : iv_ruleDefinition= ruleDefinition EOF ;
+ public final EObject entryRuleDefinition() throws RecognitionException {
+ EObject current = null;
+
+ EObject iv_ruleDefinition = null;
+
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:270:2: (iv_ruleDefinition= ruleDefinition EOF )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:271:2: iv_ruleDefinition= ruleDefinition EOF
+ {
+ newCompositeNode(grammarAccess.getDefinitionRule());
+ pushFollow(FOLLOW_ruleDefinition_in_entryRuleDefinition573);
+ iv_ruleDefinition=ruleDefinition();
+
+ state._fsp--;
+
+ current =iv_ruleDefinition;
+ match(input,EOF,FOLLOW_EOF_in_entryRuleDefinition583);
+
+ }
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "entryRuleDefinition"
+
+
+ // $ANTLR start "ruleDefinition"
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:278:1: ruleDefinition returns [EObject current=null] : (otherlv_0= 'def' ( (lv_name_1_0= RULE_ID ) ) (otherlv_2= '(' ( (lv_args_3_0= ruleDeclaredParameter ) ) (otherlv_4= ',' ( (lv_args_5_0= ruleDeclaredParameter ) ) )* otherlv_6= ')' )? otherlv_7= ':' ( (lv_expr_8_0= ruleExpression ) ) otherlv_9= ';' ) ;
+ public final EObject ruleDefinition() throws RecognitionException {
+ EObject current = null;
+
+ Token otherlv_0=null;
+ Token lv_name_1_0=null;
+ Token otherlv_2=null;
+ Token otherlv_4=null;
+ Token otherlv_6=null;
+ Token otherlv_7=null;
+ Token otherlv_9=null;
+ EObject lv_args_3_0 = null;
+
+ EObject lv_args_5_0 = null;
+
+ EObject lv_expr_8_0 = null;
+
+
+ enterRule();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:281:28: ( (otherlv_0= 'def' ( (lv_name_1_0= RULE_ID ) ) (otherlv_2= '(' ( (lv_args_3_0= ruleDeclaredParameter ) ) (otherlv_4= ',' ( (lv_args_5_0= ruleDeclaredParameter ) ) )* otherlv_6= ')' )? otherlv_7= ':' ( (lv_expr_8_0= ruleExpression ) ) otherlv_9= ';' ) )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:282:1: (otherlv_0= 'def' ( (lv_name_1_0= RULE_ID ) ) (otherlv_2= '(' ( (lv_args_3_0= ruleDeclaredParameter ) ) (otherlv_4= ',' ( (lv_args_5_0= ruleDeclaredParameter ) ) )* otherlv_6= ')' )? otherlv_7= ':' ( (lv_expr_8_0= ruleExpression ) ) otherlv_9= ';' )
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:282:1: (otherlv_0= 'def' ( (lv_name_1_0= RULE_ID ) ) (otherlv_2= '(' ( (lv_args_3_0= ruleDeclaredParameter ) ) (otherlv_4= ',' ( (lv_args_5_0= ruleDeclaredParameter ) ) )* otherlv_6= ')' )? otherlv_7= ':' ( (lv_expr_8_0= ruleExpression ) ) otherlv_9= ';' )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:282:3: otherlv_0= 'def' ( (lv_name_1_0= RULE_ID ) ) (otherlv_2= '(' ( (lv_args_3_0= ruleDeclaredParameter ) ) (otherlv_4= ',' ( (lv_args_5_0= ruleDeclaredParameter ) ) )* otherlv_6= ')' )? otherlv_7= ':' ( (lv_expr_8_0= ruleExpression ) ) otherlv_9= ';'
+ {
+ otherlv_0=(Token)match(input,16,FOLLOW_16_in_ruleDefinition620);
+
+ newLeafNode(otherlv_0, grammarAccess.getDefinitionAccess().getDefKeyword_0());
+
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:286:1: ( (lv_name_1_0= RULE_ID ) )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:287:1: (lv_name_1_0= RULE_ID )
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:287:1: (lv_name_1_0= RULE_ID )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:288:3: lv_name_1_0= RULE_ID
+ {
+ lv_name_1_0=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleDefinition637);
+
+ newLeafNode(lv_name_1_0, grammarAccess.getDefinitionAccess().getNameIDTerminalRuleCall_1_0());
+
+
+ if (current==null) {
+ current = createModelElement(grammarAccess.getDefinitionRule());
+ }
+ setWithLastConsumed(
+ current,
+ "name",
+ lv_name_1_0,
+ "ID");
+
+
+ }
+
+
+ }
+
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:304:2: (otherlv_2= '(' ( (lv_args_3_0= ruleDeclaredParameter ) ) (otherlv_4= ',' ( (lv_args_5_0= ruleDeclaredParameter ) ) )* otherlv_6= ')' )?
+ int alt6=2;
+ int LA6_0 = input.LA(1);
+
+ if ( (LA6_0==17) ) {
+ alt6=1;
+ }
+ switch (alt6) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:304:4: otherlv_2= '(' ( (lv_args_3_0= ruleDeclaredParameter ) ) (otherlv_4= ',' ( (lv_args_5_0= ruleDeclaredParameter ) ) )* otherlv_6= ')'
+ {
+ otherlv_2=(Token)match(input,17,FOLLOW_17_in_ruleDefinition655);
+
+ newLeafNode(otherlv_2, grammarAccess.getDefinitionAccess().getLeftParenthesisKeyword_2_0());
+
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:308:1: ( (lv_args_3_0= ruleDeclaredParameter ) )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:309:1: (lv_args_3_0= ruleDeclaredParameter )
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:309:1: (lv_args_3_0= ruleDeclaredParameter )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:310:3: lv_args_3_0= ruleDeclaredParameter
+ {
+
+ newCompositeNode(grammarAccess.getDefinitionAccess().getArgsDeclaredParameterParserRuleCall_2_1_0());
+
+ pushFollow(FOLLOW_ruleDeclaredParameter_in_ruleDefinition676);
+ lv_args_3_0=ruleDeclaredParameter();
+
+ state._fsp--;
+
+
+ if (current==null) {
+ current = createModelElementForParent(grammarAccess.getDefinitionRule());
+ }
+ add(
+ current,
+ "args",
+ lv_args_3_0,
+ "DeclaredParameter");
+ afterParserOrEnumRuleCall();
+
+
+ }
+
+
+ }
+
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:326:2: (otherlv_4= ',' ( (lv_args_5_0= ruleDeclaredParameter ) ) )*
+ loop5:
+ do {
+ int alt5=2;
+ int LA5_0 = input.LA(1);
+
+ if ( (LA5_0==18) ) {
+ alt5=1;
+ }
+
+
+ switch (alt5) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:326:4: otherlv_4= ',' ( (lv_args_5_0= ruleDeclaredParameter ) )
+ {
+ otherlv_4=(Token)match(input,18,FOLLOW_18_in_ruleDefinition689);
+
+ newLeafNode(otherlv_4, grammarAccess.getDefinitionAccess().getCommaKeyword_2_2_0());
+
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:330:1: ( (lv_args_5_0= ruleDeclaredParameter ) )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:331:1: (lv_args_5_0= ruleDeclaredParameter )
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:331:1: (lv_args_5_0= ruleDeclaredParameter )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:332:3: lv_args_5_0= ruleDeclaredParameter
+ {
+
+ newCompositeNode(grammarAccess.getDefinitionAccess().getArgsDeclaredParameterParserRuleCall_2_2_1_0());
+
+ pushFollow(FOLLOW_ruleDeclaredParameter_in_ruleDefinition710);
+ lv_args_5_0=ruleDeclaredParameter();
+
+ state._fsp--;
+
+
+ if (current==null) {
+ current = createModelElementForParent(grammarAccess.getDefinitionRule());
+ }
+ add(
+ current,
+ "args",
+ lv_args_5_0,
+ "DeclaredParameter");
+ afterParserOrEnumRuleCall();
+
+
+ }
+
+
+ }
+
+
+ }
+ break;
+
+ default :
+ break loop5;
+ }
+ } while (true);
+
+ otherlv_6=(Token)match(input,19,FOLLOW_19_in_ruleDefinition724);
+
+ newLeafNode(otherlv_6, grammarAccess.getDefinitionAccess().getRightParenthesisKeyword_2_3());
+
+
+ }
+ break;
+
+ }
+
+ otherlv_7=(Token)match(input,20,FOLLOW_20_in_ruleDefinition738);
+
+ newLeafNode(otherlv_7, grammarAccess.getDefinitionAccess().getColonKeyword_3());
+
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:356:1: ( (lv_expr_8_0= ruleExpression ) )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:357:1: (lv_expr_8_0= ruleExpression )
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:357:1: (lv_expr_8_0= ruleExpression )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:358:3: lv_expr_8_0= ruleExpression
+ {
+
+ newCompositeNode(grammarAccess.getDefinitionAccess().getExprExpressionParserRuleCall_4_0());
+
+ pushFollow(FOLLOW_ruleExpression_in_ruleDefinition759);
+ lv_expr_8_0=ruleExpression();
+
+ state._fsp--;
+
+
+ if (current==null) {
+ current = createModelElementForParent(grammarAccess.getDefinitionRule());
+ }
+ set(
+ current,
+ "expr",
+ lv_expr_8_0,
+ "Expression");
+ afterParserOrEnumRuleCall();
+
+
+ }
+
+
+ }
+
+ otherlv_9=(Token)match(input,21,FOLLOW_21_in_ruleDefinition771);
+
+ newLeafNode(otherlv_9, grammarAccess.getDefinitionAccess().getSemicolonKeyword_5());
+
+
+ }
+
+
+ }
+
+ leaveRule();
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "ruleDefinition"
+
+
+ // $ANTLR start "entryRuleDeclaredParameter"
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:386:1: entryRuleDeclaredParameter returns [EObject current=null] : iv_ruleDeclaredParameter= ruleDeclaredParameter EOF ;
+ public final EObject entryRuleDeclaredParameter() throws RecognitionException {
+ EObject current = null;
+
+ EObject iv_ruleDeclaredParameter = null;
+
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:387:2: (iv_ruleDeclaredParameter= ruleDeclaredParameter EOF )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:388:2: iv_ruleDeclaredParameter= ruleDeclaredParameter EOF
+ {
+ newCompositeNode(grammarAccess.getDeclaredParameterRule());
+ pushFollow(FOLLOW_ruleDeclaredParameter_in_entryRuleDeclaredParameter807);
+ iv_ruleDeclaredParameter=ruleDeclaredParameter();
+
+ state._fsp--;
+
+ current =iv_ruleDeclaredParameter;
+ match(input,EOF,FOLLOW_EOF_in_entryRuleDeclaredParameter817);
+
+ }
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "entryRuleDeclaredParameter"
+
+
+ // $ANTLR start "ruleDeclaredParameter"
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:395:1: ruleDeclaredParameter returns [EObject current=null] : ( (lv_name_0_0= RULE_ID ) ) ;
+ public final EObject ruleDeclaredParameter() throws RecognitionException {
+ EObject current = null;
+
+ Token lv_name_0_0=null;
+
+ enterRule();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:398:28: ( ( (lv_name_0_0= RULE_ID ) ) )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:399:1: ( (lv_name_0_0= RULE_ID ) )
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:399:1: ( (lv_name_0_0= RULE_ID ) )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:400:1: (lv_name_0_0= RULE_ID )
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:400:1: (lv_name_0_0= RULE_ID )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:401:3: lv_name_0_0= RULE_ID
+ {
+ lv_name_0_0=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleDeclaredParameter858);
+
+ newLeafNode(lv_name_0_0, grammarAccess.getDeclaredParameterAccess().getNameIDTerminalRuleCall_0());
+
+
+ if (current==null) {
+ current = createModelElement(grammarAccess.getDeclaredParameterRule());
+ }
+ setWithLastConsumed(
+ current,
+ "name",
+ lv_name_0_0,
+ "ID");
+
+
+ }
+
+
+ }
+
+
+ }
+
+ leaveRule();
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "ruleDeclaredParameter"
+
+
+ // $ANTLR start "entryRuleEvaluation"
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:427:1: entryRuleEvaluation returns [EObject current=null] : iv_ruleEvaluation= ruleEvaluation EOF ;
+ public final EObject entryRuleEvaluation() throws RecognitionException {
+ EObject current = null;
+
+ EObject iv_ruleEvaluation = null;
+
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:428:2: (iv_ruleEvaluation= ruleEvaluation EOF )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:429:2: iv_ruleEvaluation= ruleEvaluation EOF
+ {
+ newCompositeNode(grammarAccess.getEvaluationRule());
+ pushFollow(FOLLOW_ruleEvaluation_in_entryRuleEvaluation900);
+ iv_ruleEvaluation=ruleEvaluation();
+
+ state._fsp--;
+
+ current =iv_ruleEvaluation;
+ match(input,EOF,FOLLOW_EOF_in_entryRuleEvaluation910);
+
+ }
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "entryRuleEvaluation"
+
+
+ // $ANTLR start "ruleEvaluation"
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:436:1: ruleEvaluation returns [EObject current=null] : ( ( (lv_expression_0_0= ruleExpression ) ) otherlv_1= ';' ) ;
+ public final EObject ruleEvaluation() throws RecognitionException {
+ EObject current = null;
+
+ Token otherlv_1=null;
+ EObject lv_expression_0_0 = null;
+
+
+ enterRule();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:439:28: ( ( ( (lv_expression_0_0= ruleExpression ) ) otherlv_1= ';' ) )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:440:1: ( ( (lv_expression_0_0= ruleExpression ) ) otherlv_1= ';' )
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:440:1: ( ( (lv_expression_0_0= ruleExpression ) ) otherlv_1= ';' )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:440:2: ( (lv_expression_0_0= ruleExpression ) ) otherlv_1= ';'
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:440:2: ( (lv_expression_0_0= ruleExpression ) )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:441:1: (lv_expression_0_0= ruleExpression )
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:441:1: (lv_expression_0_0= ruleExpression )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:442:3: lv_expression_0_0= ruleExpression
+ {
+
+ newCompositeNode(grammarAccess.getEvaluationAccess().getExpressionExpressionParserRuleCall_0_0());
+
+ pushFollow(FOLLOW_ruleExpression_in_ruleEvaluation956);
+ lv_expression_0_0=ruleExpression();
+
+ state._fsp--;
+
+
+ if (current==null) {
+ current = createModelElementForParent(grammarAccess.getEvaluationRule());
+ }
+ set(
+ current,
+ "expression",
+ lv_expression_0_0,
+ "Expression");
+ afterParserOrEnumRuleCall();
+
+
+ }
+
+
+ }
+
+ otherlv_1=(Token)match(input,21,FOLLOW_21_in_ruleEvaluation968);
+
+ newLeafNode(otherlv_1, grammarAccess.getEvaluationAccess().getSemicolonKeyword_1());
+
+
+ }
+
+
+ }
+
+ leaveRule();
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "ruleEvaluation"
+
+
+ // $ANTLR start "entryRuleExpression"
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:470:1: entryRuleExpression returns [EObject current=null] : iv_ruleExpression= ruleExpression EOF ;
+ public final EObject entryRuleExpression() throws RecognitionException {
+ EObject current = null;
+
+ EObject iv_ruleExpression = null;
+
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:471:2: (iv_ruleExpression= ruleExpression EOF )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:472:2: iv_ruleExpression= ruleExpression EOF
+ {
+ newCompositeNode(grammarAccess.getExpressionRule());
+ pushFollow(FOLLOW_ruleExpression_in_entryRuleExpression1004);
+ iv_ruleExpression=ruleExpression();
+
+ state._fsp--;
+
+ current =iv_ruleExpression;
+ match(input,EOF,FOLLOW_EOF_in_entryRuleExpression1014);
+
+ }
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "entryRuleExpression"
+
+
+ // $ANTLR start "ruleExpression"
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:479:1: ruleExpression returns [EObject current=null] : this_Addition_0= ruleAddition ;
+ public final EObject ruleExpression() throws RecognitionException {
+ EObject current = null;
+
+ EObject this_Addition_0 = null;
+
+
+ enterRule();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:482:28: (this_Addition_0= ruleAddition )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:484:5: this_Addition_0= ruleAddition
+ {
+
+ newCompositeNode(grammarAccess.getExpressionAccess().getAdditionParserRuleCall());
+
+ pushFollow(FOLLOW_ruleAddition_in_ruleExpression1060);
+ this_Addition_0=ruleAddition();
+
+ state._fsp--;
+
+
+ current = this_Addition_0;
+ afterParserOrEnumRuleCall();
+
+
+ }
+
+ leaveRule();
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "ruleExpression"
+
+
+ // $ANTLR start "entryRuleAddition"
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:500:1: entryRuleAddition returns [EObject current=null] : iv_ruleAddition= ruleAddition EOF ;
+ public final EObject entryRuleAddition() throws RecognitionException {
+ EObject current = null;
+
+ EObject iv_ruleAddition = null;
+
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:501:2: (iv_ruleAddition= ruleAddition EOF )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:502:2: iv_ruleAddition= ruleAddition EOF
+ {
+ newCompositeNode(grammarAccess.getAdditionRule());
+ pushFollow(FOLLOW_ruleAddition_in_entryRuleAddition1094);
+ iv_ruleAddition=ruleAddition();
+
+ state._fsp--;
+
+ current =iv_ruleAddition;
+ match(input,EOF,FOLLOW_EOF_in_entryRuleAddition1104);
+
+ }
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "entryRuleAddition"
+
+
+ // $ANTLR start "ruleAddition"
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:509:1: ruleAddition returns [EObject current=null] : (this_Multiplication_0= ruleMultiplication ( ( ( () otherlv_2= '+' ) | ( () otherlv_4= '-' ) ) ( (lv_right_5_0= ruleMultiplication ) ) )* ) ;
+ public final EObject ruleAddition() throws RecognitionException {
+ EObject current = null;
+
+ Token otherlv_2=null;
+ Token otherlv_4=null;
+ EObject this_Multiplication_0 = null;
+
+ EObject lv_right_5_0 = null;
+
+
+ enterRule();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:512:28: ( (this_Multiplication_0= ruleMultiplication ( ( ( () otherlv_2= '+' ) | ( () otherlv_4= '-' ) ) ( (lv_right_5_0= ruleMultiplication ) ) )* ) )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:513:1: (this_Multiplication_0= ruleMultiplication ( ( ( () otherlv_2= '+' ) | ( () otherlv_4= '-' ) ) ( (lv_right_5_0= ruleMultiplication ) ) )* )
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:513:1: (this_Multiplication_0= ruleMultiplication ( ( ( () otherlv_2= '+' ) | ( () otherlv_4= '-' ) ) ( (lv_right_5_0= ruleMultiplication ) ) )* )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:514:5: this_Multiplication_0= ruleMultiplication ( ( ( () otherlv_2= '+' ) | ( () otherlv_4= '-' ) ) ( (lv_right_5_0= ruleMultiplication ) ) )*
+ {
+
+ newCompositeNode(grammarAccess.getAdditionAccess().getMultiplicationParserRuleCall_0());
+
+ pushFollow(FOLLOW_ruleMultiplication_in_ruleAddition1151);
+ this_Multiplication_0=ruleMultiplication();
+
+ state._fsp--;
+
+
+ current = this_Multiplication_0;
+ afterParserOrEnumRuleCall();
+
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:522:1: ( ( ( () otherlv_2= '+' ) | ( () otherlv_4= '-' ) ) ( (lv_right_5_0= ruleMultiplication ) ) )*
+ loop8:
+ do {
+ int alt8=2;
+ int LA8_0 = input.LA(1);
+
+ if ( ((LA8_0>=22 && LA8_0<=23)) ) {
+ alt8=1;
+ }
+
+
+ switch (alt8) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:522:2: ( ( () otherlv_2= '+' ) | ( () otherlv_4= '-' ) ) ( (lv_right_5_0= ruleMultiplication ) )
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:522:2: ( ( () otherlv_2= '+' ) | ( () otherlv_4= '-' ) )
+ int alt7=2;
+ int LA7_0 = input.LA(1);
+
+ if ( (LA7_0==22) ) {
+ alt7=1;
+ }
+ else if ( (LA7_0==23) ) {
+ alt7=2;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("", 7, 0, input);
+
+ throw nvae;
+ }
+ switch (alt7) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:522:3: ( () otherlv_2= '+' )
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:522:3: ( () otherlv_2= '+' )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:522:4: () otherlv_2= '+'
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:522:4: ()
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:523:5:
+ {
+
+ current = forceCreateModelElementAndSet(
+ grammarAccess.getAdditionAccess().getPlusLeftAction_1_0_0_0(),
+ current);
+
+
+ }
+
+ otherlv_2=(Token)match(input,22,FOLLOW_22_in_ruleAddition1174);
+
+ newLeafNode(otherlv_2, grammarAccess.getAdditionAccess().getPlusSignKeyword_1_0_0_1());
+
+
+ }
+
+
+ }
+ break;
+ case 2 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:533:6: ( () otherlv_4= '-' )
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:533:6: ( () otherlv_4= '-' )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:533:7: () otherlv_4= '-'
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:533:7: ()
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:534:5:
+ {
+
+ current = forceCreateModelElementAndSet(
+ grammarAccess.getAdditionAccess().getMinusLeftAction_1_0_1_0(),
+ current);
+
+
+ }
+
+ otherlv_4=(Token)match(input,23,FOLLOW_23_in_ruleAddition1203);
+
+ newLeafNode(otherlv_4, grammarAccess.getAdditionAccess().getHyphenMinusKeyword_1_0_1_1());
+
+
+ }
+
+
+ }
+ break;
+
+ }
+
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:543:3: ( (lv_right_5_0= ruleMultiplication ) )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:544:1: (lv_right_5_0= ruleMultiplication )
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:544:1: (lv_right_5_0= ruleMultiplication )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:545:3: lv_right_5_0= ruleMultiplication
+ {
+
+ newCompositeNode(grammarAccess.getAdditionAccess().getRightMultiplicationParserRuleCall_1_1_0());
+
+ pushFollow(FOLLOW_ruleMultiplication_in_ruleAddition1226);
+ lv_right_5_0=ruleMultiplication();
+
+ state._fsp--;
+
+
+ if (current==null) {
+ current = createModelElementForParent(grammarAccess.getAdditionRule());
+ }
+ set(
+ current,
+ "right",
+ lv_right_5_0,
+ "Multiplication");
+ afterParserOrEnumRuleCall();
+
+
+ }
+
+
+ }
+
+
+ }
+ break;
+
+ default :
+ break loop8;
+ }
+ } while (true);
+
+
+ }
+
+
+ }
+
+ leaveRule();
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "ruleAddition"
+
+
+ // $ANTLR start "entryRuleMultiplication"
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:569:1: entryRuleMultiplication returns [EObject current=null] : iv_ruleMultiplication= ruleMultiplication EOF ;
+ public final EObject entryRuleMultiplication() throws RecognitionException {
+ EObject current = null;
+
+ EObject iv_ruleMultiplication = null;
+
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:570:2: (iv_ruleMultiplication= ruleMultiplication EOF )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:571:2: iv_ruleMultiplication= ruleMultiplication EOF
+ {
+ newCompositeNode(grammarAccess.getMultiplicationRule());
+ pushFollow(FOLLOW_ruleMultiplication_in_entryRuleMultiplication1264);
+ iv_ruleMultiplication=ruleMultiplication();
+
+ state._fsp--;
+
+ current =iv_ruleMultiplication;
+ match(input,EOF,FOLLOW_EOF_in_entryRuleMultiplication1274);
+
+ }
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "entryRuleMultiplication"
+
+
+ // $ANTLR start "ruleMultiplication"
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:578:1: ruleMultiplication returns [EObject current=null] : (this_PrimaryExpression_0= rulePrimaryExpression ( ( ( () otherlv_2= '*' ) | ( () otherlv_4= '/' ) ) ( (lv_right_5_0= rulePrimaryExpression ) ) )* ) ;
+ public final EObject ruleMultiplication() throws RecognitionException {
+ EObject current = null;
+
+ Token otherlv_2=null;
+ Token otherlv_4=null;
+ EObject this_PrimaryExpression_0 = null;
+
+ EObject lv_right_5_0 = null;
+
+
+ enterRule();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:581:28: ( (this_PrimaryExpression_0= rulePrimaryExpression ( ( ( () otherlv_2= '*' ) | ( () otherlv_4= '/' ) ) ( (lv_right_5_0= rulePrimaryExpression ) ) )* ) )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:582:1: (this_PrimaryExpression_0= rulePrimaryExpression ( ( ( () otherlv_2= '*' ) | ( () otherlv_4= '/' ) ) ( (lv_right_5_0= rulePrimaryExpression ) ) )* )
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:582:1: (this_PrimaryExpression_0= rulePrimaryExpression ( ( ( () otherlv_2= '*' ) | ( () otherlv_4= '/' ) ) ( (lv_right_5_0= rulePrimaryExpression ) ) )* )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:583:5: this_PrimaryExpression_0= rulePrimaryExpression ( ( ( () otherlv_2= '*' ) | ( () otherlv_4= '/' ) ) ( (lv_right_5_0= rulePrimaryExpression ) ) )*
+ {
+
+ newCompositeNode(grammarAccess.getMultiplicationAccess().getPrimaryExpressionParserRuleCall_0());
+
+ pushFollow(FOLLOW_rulePrimaryExpression_in_ruleMultiplication1321);
+ this_PrimaryExpression_0=rulePrimaryExpression();
+
+ state._fsp--;
+
+
+ current = this_PrimaryExpression_0;
+ afterParserOrEnumRuleCall();
+
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:591:1: ( ( ( () otherlv_2= '*' ) | ( () otherlv_4= '/' ) ) ( (lv_right_5_0= rulePrimaryExpression ) ) )*
+ loop10:
+ do {
+ int alt10=2;
+ int LA10_0 = input.LA(1);
+
+ if ( (LA10_0==15||LA10_0==24) ) {
+ alt10=1;
+ }
+
+
+ switch (alt10) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:591:2: ( ( () otherlv_2= '*' ) | ( () otherlv_4= '/' ) ) ( (lv_right_5_0= rulePrimaryExpression ) )
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:591:2: ( ( () otherlv_2= '*' ) | ( () otherlv_4= '/' ) )
+ int alt9=2;
+ int LA9_0 = input.LA(1);
+
+ if ( (LA9_0==15) ) {
+ alt9=1;
+ }
+ else if ( (LA9_0==24) ) {
+ alt9=2;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("", 9, 0, input);
+
+ throw nvae;
+ }
+ switch (alt9) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:591:3: ( () otherlv_2= '*' )
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:591:3: ( () otherlv_2= '*' )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:591:4: () otherlv_2= '*'
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:591:4: ()
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:592:5:
+ {
+
+ current = forceCreateModelElementAndSet(
+ grammarAccess.getMultiplicationAccess().getMultiLeftAction_1_0_0_0(),
+ current);
+
+
+ }
+
+ otherlv_2=(Token)match(input,15,FOLLOW_15_in_ruleMultiplication1344);
+
+ newLeafNode(otherlv_2, grammarAccess.getMultiplicationAccess().getAsteriskKeyword_1_0_0_1());
+
+
+ }
+
+
+ }
+ break;
+ case 2 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:602:6: ( () otherlv_4= '/' )
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:602:6: ( () otherlv_4= '/' )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:602:7: () otherlv_4= '/'
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:602:7: ()
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:603:5:
+ {
+
+ current = forceCreateModelElementAndSet(
+ grammarAccess.getMultiplicationAccess().getDivLeftAction_1_0_1_0(),
+ current);
+
+
+ }
+
+ otherlv_4=(Token)match(input,24,FOLLOW_24_in_ruleMultiplication1373);
+
+ newLeafNode(otherlv_4, grammarAccess.getMultiplicationAccess().getSolidusKeyword_1_0_1_1());
+
+
+ }
+
+
+ }
+ break;
+
+ }
+
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:612:3: ( (lv_right_5_0= rulePrimaryExpression ) )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:613:1: (lv_right_5_0= rulePrimaryExpression )
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:613:1: (lv_right_5_0= rulePrimaryExpression )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:614:3: lv_right_5_0= rulePrimaryExpression
+ {
+
+ newCompositeNode(grammarAccess.getMultiplicationAccess().getRightPrimaryExpressionParserRuleCall_1_1_0());
+
+ pushFollow(FOLLOW_rulePrimaryExpression_in_ruleMultiplication1396);
+ lv_right_5_0=rulePrimaryExpression();
+
+ state._fsp--;
+
+
+ if (current==null) {
+ current = createModelElementForParent(grammarAccess.getMultiplicationRule());
+ }
+ set(
+ current,
+ "right",
+ lv_right_5_0,
+ "PrimaryExpression");
+ afterParserOrEnumRuleCall();
+
+
+ }
+
+
+ }
+
+
+ }
+ break;
+
+ default :
+ break loop10;
+ }
+ } while (true);
+
+
+ }
+
+
+ }
+
+ leaveRule();
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "ruleMultiplication"
+
+
+ // $ANTLR start "entryRulePrimaryExpression"
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:638:1: entryRulePrimaryExpression returns [EObject current=null] : iv_rulePrimaryExpression= rulePrimaryExpression EOF ;
+ public final EObject entryRulePrimaryExpression() throws RecognitionException {
+ EObject current = null;
+
+ EObject iv_rulePrimaryExpression = null;
+
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:639:2: (iv_rulePrimaryExpression= rulePrimaryExpression EOF )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:640:2: iv_rulePrimaryExpression= rulePrimaryExpression EOF
+ {
+ newCompositeNode(grammarAccess.getPrimaryExpressionRule());
+ pushFollow(FOLLOW_rulePrimaryExpression_in_entryRulePrimaryExpression1434);
+ iv_rulePrimaryExpression=rulePrimaryExpression();
+
+ state._fsp--;
+
+ current =iv_rulePrimaryExpression;
+ match(input,EOF,FOLLOW_EOF_in_entryRulePrimaryExpression1444);
+
+ }
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "entryRulePrimaryExpression"
+
+
+ // $ANTLR start "rulePrimaryExpression"
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:647:1: rulePrimaryExpression returns [EObject current=null] : ( (otherlv_0= '(' this_Expression_1= ruleExpression otherlv_2= ')' ) | ( () ( (lv_value_4_0= RULE_NUMBER ) ) ) | ( () ( (otherlv_6= RULE_ID ) ) (otherlv_7= '(' ( (lv_args_8_0= ruleExpression ) ) (otherlv_9= ',' ( (lv_args_10_0= ruleExpression ) ) )* otherlv_11= ')' )? ) ) ;
+ public final EObject rulePrimaryExpression() throws RecognitionException {
+ EObject current = null;
+
+ Token otherlv_0=null;
+ Token otherlv_2=null;
+ Token lv_value_4_0=null;
+ Token otherlv_6=null;
+ Token otherlv_7=null;
+ Token otherlv_9=null;
+ Token otherlv_11=null;
+ EObject this_Expression_1 = null;
+
+ EObject lv_args_8_0 = null;
+
+ EObject lv_args_10_0 = null;
+
+
+ enterRule();
+
+ try {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:650:28: ( ( (otherlv_0= '(' this_Expression_1= ruleExpression otherlv_2= ')' ) | ( () ( (lv_value_4_0= RULE_NUMBER ) ) ) | ( () ( (otherlv_6= RULE_ID ) ) (otherlv_7= '(' ( (lv_args_8_0= ruleExpression ) ) (otherlv_9= ',' ( (lv_args_10_0= ruleExpression ) ) )* otherlv_11= ')' )? ) ) )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:651:1: ( (otherlv_0= '(' this_Expression_1= ruleExpression otherlv_2= ')' ) | ( () ( (lv_value_4_0= RULE_NUMBER ) ) ) | ( () ( (otherlv_6= RULE_ID ) ) (otherlv_7= '(' ( (lv_args_8_0= ruleExpression ) ) (otherlv_9= ',' ( (lv_args_10_0= ruleExpression ) ) )* otherlv_11= ')' )? ) )
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:651:1: ( (otherlv_0= '(' this_Expression_1= ruleExpression otherlv_2= ')' ) | ( () ( (lv_value_4_0= RULE_NUMBER ) ) ) | ( () ( (otherlv_6= RULE_ID ) ) (otherlv_7= '(' ( (lv_args_8_0= ruleExpression ) ) (otherlv_9= ',' ( (lv_args_10_0= ruleExpression ) ) )* otherlv_11= ')' )? ) )
+ int alt13=3;
+ switch ( input.LA(1) ) {
+ case 17:
+ {
+ alt13=1;
+ }
+ break;
+ case RULE_NUMBER:
+ {
+ alt13=2;
+ }
+ break;
+ case RULE_ID:
+ {
+ alt13=3;
+ }
+ break;
+ default:
+ NoViableAltException nvae =
+ new NoViableAltException("", 13, 0, input);
+
+ throw nvae;
+ }
+
+ switch (alt13) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:651:2: (otherlv_0= '(' this_Expression_1= ruleExpression otherlv_2= ')' )
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:651:2: (otherlv_0= '(' this_Expression_1= ruleExpression otherlv_2= ')' )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:651:4: otherlv_0= '(' this_Expression_1= ruleExpression otherlv_2= ')'
+ {
+ otherlv_0=(Token)match(input,17,FOLLOW_17_in_rulePrimaryExpression1482);
+
+ newLeafNode(otherlv_0, grammarAccess.getPrimaryExpressionAccess().getLeftParenthesisKeyword_0_0());
+
+
+ newCompositeNode(grammarAccess.getPrimaryExpressionAccess().getExpressionParserRuleCall_0_1());
+
+ pushFollow(FOLLOW_ruleExpression_in_rulePrimaryExpression1504);
+ this_Expression_1=ruleExpression();
+
+ state._fsp--;
+
+
+ current = this_Expression_1;
+ afterParserOrEnumRuleCall();
+
+ otherlv_2=(Token)match(input,19,FOLLOW_19_in_rulePrimaryExpression1515);
+
+ newLeafNode(otherlv_2, grammarAccess.getPrimaryExpressionAccess().getRightParenthesisKeyword_0_2());
+
+
+ }
+
+
+ }
+ break;
+ case 2 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:669:6: ( () ( (lv_value_4_0= RULE_NUMBER ) ) )
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:669:6: ( () ( (lv_value_4_0= RULE_NUMBER ) ) )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:669:7: () ( (lv_value_4_0= RULE_NUMBER ) )
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:669:7: ()
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:670:5:
+ {
+
+ current = forceCreateModelElement(
+ grammarAccess.getPrimaryExpressionAccess().getNumberLiteralAction_1_0(),
+ current);
+
+
+ }
+
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:675:2: ( (lv_value_4_0= RULE_NUMBER ) )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:676:1: (lv_value_4_0= RULE_NUMBER )
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:676:1: (lv_value_4_0= RULE_NUMBER )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:677:3: lv_value_4_0= RULE_NUMBER
+ {
+ lv_value_4_0=(Token)match(input,RULE_NUMBER,FOLLOW_RULE_NUMBER_in_rulePrimaryExpression1549);
+
+ newLeafNode(lv_value_4_0, grammarAccess.getPrimaryExpressionAccess().getValueNUMBERTerminalRuleCall_1_1_0());
+
+
+ if (current==null) {
+ current = createModelElement(grammarAccess.getPrimaryExpressionRule());
+ }
+ setWithLastConsumed(
+ current,
+ "value",
+ lv_value_4_0,
+ "NUMBER");
+
+
+ }
+
+
+ }
+
+
+ }
+
+
+ }
+ break;
+ case 3 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:694:6: ( () ( (otherlv_6= RULE_ID ) ) (otherlv_7= '(' ( (lv_args_8_0= ruleExpression ) ) (otherlv_9= ',' ( (lv_args_10_0= ruleExpression ) ) )* otherlv_11= ')' )? )
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:694:6: ( () ( (otherlv_6= RULE_ID ) ) (otherlv_7= '(' ( (lv_args_8_0= ruleExpression ) ) (otherlv_9= ',' ( (lv_args_10_0= ruleExpression ) ) )* otherlv_11= ')' )? )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:694:7: () ( (otherlv_6= RULE_ID ) ) (otherlv_7= '(' ( (lv_args_8_0= ruleExpression ) ) (otherlv_9= ',' ( (lv_args_10_0= ruleExpression ) ) )* otherlv_11= ')' )?
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:694:7: ()
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:695:5:
+ {
+
+ current = forceCreateModelElement(
+ grammarAccess.getPrimaryExpressionAccess().getFunctionCallAction_2_0(),
+ current);
+
+
+ }
+
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:700:2: ( (otherlv_6= RULE_ID ) )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:701:1: (otherlv_6= RULE_ID )
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:701:1: (otherlv_6= RULE_ID )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:702:3: otherlv_6= RULE_ID
+ {
+
+ if (current==null) {
+ current = createModelElement(grammarAccess.getPrimaryExpressionRule());
+ }
+
+ otherlv_6=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_rulePrimaryExpression1591);
+
+ newLeafNode(otherlv_6, grammarAccess.getPrimaryExpressionAccess().getFuncAbstractDefinitionCrossReference_2_1_0());
+
+
+ }
+
+
+ }
+
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:713:2: (otherlv_7= '(' ( (lv_args_8_0= ruleExpression ) ) (otherlv_9= ',' ( (lv_args_10_0= ruleExpression ) ) )* otherlv_11= ')' )?
+ int alt12=2;
+ int LA12_0 = input.LA(1);
+
+ if ( (LA12_0==17) ) {
+ alt12=1;
+ }
+ switch (alt12) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:713:4: otherlv_7= '(' ( (lv_args_8_0= ruleExpression ) ) (otherlv_9= ',' ( (lv_args_10_0= ruleExpression ) ) )* otherlv_11= ')'
+ {
+ otherlv_7=(Token)match(input,17,FOLLOW_17_in_rulePrimaryExpression1604);
+
+ newLeafNode(otherlv_7, grammarAccess.getPrimaryExpressionAccess().getLeftParenthesisKeyword_2_2_0());
+
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:717:1: ( (lv_args_8_0= ruleExpression ) )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:718:1: (lv_args_8_0= ruleExpression )
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:718:1: (lv_args_8_0= ruleExpression )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:719:3: lv_args_8_0= ruleExpression
+ {
+
+ newCompositeNode(grammarAccess.getPrimaryExpressionAccess().getArgsExpressionParserRuleCall_2_2_1_0());
+
+ pushFollow(FOLLOW_ruleExpression_in_rulePrimaryExpression1625);
+ lv_args_8_0=ruleExpression();
+
+ state._fsp--;
+
+
+ if (current==null) {
+ current = createModelElementForParent(grammarAccess.getPrimaryExpressionRule());
+ }
+ add(
+ current,
+ "args",
+ lv_args_8_0,
+ "Expression");
+ afterParserOrEnumRuleCall();
+
+
+ }
+
+
+ }
+
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:735:2: (otherlv_9= ',' ( (lv_args_10_0= ruleExpression ) ) )*
+ loop11:
+ do {
+ int alt11=2;
+ int LA11_0 = input.LA(1);
+
+ if ( (LA11_0==18) ) {
+ alt11=1;
+ }
+
+
+ switch (alt11) {
+ case 1 :
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:735:4: otherlv_9= ',' ( (lv_args_10_0= ruleExpression ) )
+ {
+ otherlv_9=(Token)match(input,18,FOLLOW_18_in_rulePrimaryExpression1638);
+
+ newLeafNode(otherlv_9, grammarAccess.getPrimaryExpressionAccess().getCommaKeyword_2_2_2_0());
+
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:739:1: ( (lv_args_10_0= ruleExpression ) )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:740:1: (lv_args_10_0= ruleExpression )
+ {
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:740:1: (lv_args_10_0= ruleExpression )
+ // ../org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/parser/antlr/internal/InternalArithmetics.g:741:3: lv_args_10_0= ruleExpression
+ {
+
+ newCompositeNode(grammarAccess.getPrimaryExpressionAccess().getArgsExpressionParserRuleCall_2_2_2_1_0());
+
+ pushFollow(FOLLOW_ruleExpression_in_rulePrimaryExpression1659);
+ lv_args_10_0=ruleExpression();
+
+ state._fsp--;
+
+
+ if (current==null) {
+ current = createModelElementForParent(grammarAccess.getPrimaryExpressionRule());
+ }
+ add(
+ current,
+ "args",
+ lv_args_10_0,
+ "Expression");
+ afterParserOrEnumRuleCall();
+
+
+ }
+
+
+ }
+
+
+ }
+ break;
+
+ default :
+ break loop11;
+ }
+ } while (true);
+
+ otherlv_11=(Token)match(input,19,FOLLOW_19_in_rulePrimaryExpression1673);
+
+ newLeafNode(otherlv_11, grammarAccess.getPrimaryExpressionAccess().getRightParenthesisKeyword_2_2_3());
+
+
+ }
+ break;
+
+ }
+
+
+ }
+
+
+ }
+ break;
+
+ }
+
+
+ }
+
+ leaveRule();
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "rulePrimaryExpression"
+
+ // Delegated rules
+
+
+
+
+ public static final BitSet FOLLOW_ruleModule_in_entryRuleModule75 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleModule85 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_12_in_ruleModule122 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_RULE_ID_in_ruleModule139 = new BitSet(new long[]{0x0000000000032032L});
+ public static final BitSet FOLLOW_ruleImport_in_ruleModule165 = new BitSet(new long[]{0x0000000000032032L});
+ public static final BitSet FOLLOW_ruleStatement_in_ruleModule187 = new BitSet(new long[]{0x0000000000030032L});
+ public static final BitSet FOLLOW_ruleImport_in_entryRuleImport224 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleImport234 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_13_in_ruleImport271 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_ruleImportName_in_ruleImport292 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleImportName_in_entryRuleImportName329 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleImportName340 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_RULE_ID_in_ruleImportName380 = new BitSet(new long[]{0x0000000000004002L});
+ public static final BitSet FOLLOW_14_in_ruleImportName399 = new BitSet(new long[]{0x0000000000008000L});
+ public static final BitSet FOLLOW_15_in_ruleImportName412 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleStatement_in_entryRuleStatement454 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleStatement464 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleDefinition_in_ruleStatement511 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleEvaluation_in_ruleStatement538 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleDefinition_in_entryRuleDefinition573 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleDefinition583 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_16_in_ruleDefinition620 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_RULE_ID_in_ruleDefinition637 = new BitSet(new long[]{0x0000000000120000L});
+ public static final BitSet FOLLOW_17_in_ruleDefinition655 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_ruleDeclaredParameter_in_ruleDefinition676 = new BitSet(new long[]{0x00000000000C0000L});
+ public static final BitSet FOLLOW_18_in_ruleDefinition689 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_ruleDeclaredParameter_in_ruleDefinition710 = new BitSet(new long[]{0x00000000000C0000L});
+ public static final BitSet FOLLOW_19_in_ruleDefinition724 = new BitSet(new long[]{0x0000000000100000L});
+ public static final BitSet FOLLOW_20_in_ruleDefinition738 = new BitSet(new long[]{0x0000000000030030L});
+ public static final BitSet FOLLOW_ruleExpression_in_ruleDefinition759 = new BitSet(new long[]{0x0000000000200000L});
+ public static final BitSet FOLLOW_21_in_ruleDefinition771 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleDeclaredParameter_in_entryRuleDeclaredParameter807 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleDeclaredParameter817 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_RULE_ID_in_ruleDeclaredParameter858 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleEvaluation_in_entryRuleEvaluation900 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleEvaluation910 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleExpression_in_ruleEvaluation956 = new BitSet(new long[]{0x0000000000200000L});
+ public static final BitSet FOLLOW_21_in_ruleEvaluation968 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleExpression_in_entryRuleExpression1004 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleExpression1014 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleAddition_in_ruleExpression1060 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleAddition_in_entryRuleAddition1094 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleAddition1104 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleMultiplication_in_ruleAddition1151 = new BitSet(new long[]{0x0000000000C00002L});
+ public static final BitSet FOLLOW_22_in_ruleAddition1174 = new BitSet(new long[]{0x0000000000030030L});
+ public static final BitSet FOLLOW_23_in_ruleAddition1203 = new BitSet(new long[]{0x0000000000030030L});
+ public static final BitSet FOLLOW_ruleMultiplication_in_ruleAddition1226 = new BitSet(new long[]{0x0000000000C00002L});
+ public static final BitSet FOLLOW_ruleMultiplication_in_entryRuleMultiplication1264 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleMultiplication1274 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rulePrimaryExpression_in_ruleMultiplication1321 = new BitSet(new long[]{0x0000000001008002L});
+ public static final BitSet FOLLOW_15_in_ruleMultiplication1344 = new BitSet(new long[]{0x0000000000030030L});
+ public static final BitSet FOLLOW_24_in_ruleMultiplication1373 = new BitSet(new long[]{0x0000000000030030L});
+ public static final BitSet FOLLOW_rulePrimaryExpression_in_ruleMultiplication1396 = new BitSet(new long[]{0x0000000001008002L});
+ public static final BitSet FOLLOW_rulePrimaryExpression_in_entryRulePrimaryExpression1434 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRulePrimaryExpression1444 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_17_in_rulePrimaryExpression1482 = new BitSet(new long[]{0x0000000000030030L});
+ public static final BitSet FOLLOW_ruleExpression_in_rulePrimaryExpression1504 = new BitSet(new long[]{0x0000000000080000L});
+ public static final BitSet FOLLOW_19_in_rulePrimaryExpression1515 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_RULE_NUMBER_in_rulePrimaryExpression1549 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_RULE_ID_in_rulePrimaryExpression1591 = new BitSet(new long[]{0x0000000000020002L});
+ public static final BitSet FOLLOW_17_in_rulePrimaryExpression1604 = new BitSet(new long[]{0x0000000000030030L});
+ public static final BitSet FOLLOW_ruleExpression_in_rulePrimaryExpression1625 = new BitSet(new long[]{0x00000000000C0000L});
+ public static final BitSet FOLLOW_18_in_rulePrimaryExpression1638 = new BitSet(new long[]{0x0000000000030030L});
+ public static final BitSet FOLLOW_ruleExpression_in_rulePrimaryExpression1659 = new BitSet(new long[]{0x00000000000C0000L});
+ public static final BitSet FOLLOW_19_in_rulePrimaryExpression1673 = new BitSet(new long[]{0x0000000000000002L});
+
+}
\ No newline at end of file
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/serializer/AbstractArithmeticsSemanticSequencer.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/serializer/AbstractArithmeticsSemanticSequencer.java
new file mode 100644
index 0000000..ac327a0
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/serializer/AbstractArithmeticsSemanticSequencer.java
@@ -0,0 +1,339 @@
+package org.eclipse.xtext.example.arithmetics.serializer;
+
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage;
+import org.eclipse.xtext.example.arithmetics.arithmetics.DeclaredParameter;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Definition;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Div;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Evaluation;
+import org.eclipse.xtext.example.arithmetics.arithmetics.FunctionCall;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Import;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Minus;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Module;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Multi;
+import org.eclipse.xtext.example.arithmetics.arithmetics.NumberLiteral;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Plus;
+import org.eclipse.xtext.example.arithmetics.services.ArithmeticsGrammarAccess;
+import org.eclipse.xtext.serializer.acceptor.ISemanticSequenceAcceptor;
+import org.eclipse.xtext.serializer.acceptor.SequenceFeeder;
+import org.eclipse.xtext.serializer.diagnostic.ISemanticSequencerDiagnosticProvider;
+import org.eclipse.xtext.serializer.diagnostic.ISerializationDiagnostic.Acceptor;
+import org.eclipse.xtext.serializer.sequencer.AbstractSemanticSequencer;
+import org.eclipse.xtext.serializer.sequencer.GenericSequencer;
+import org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider.INodesForEObjectProvider;
+import org.eclipse.xtext.serializer.sequencer.ISemanticSequencer;
+import org.eclipse.xtext.serializer.sequencer.ITransientValueService;
+import org.eclipse.xtext.serializer.sequencer.ITransientValueService.ValueTransient;
+
+@SuppressWarnings("restriction")
+public class AbstractArithmeticsSemanticSequencer extends AbstractSemanticSequencer {
+
+ @Inject
+ protected ArithmeticsGrammarAccess grammarAccess;
+
+ @Inject
+ protected ISemanticSequencerDiagnosticProvider diagnosticProvider;
+
+ @Inject
+ protected ITransientValueService transientValues;
+
+ @Inject
+ @GenericSequencer
+ protected Provider<ISemanticSequencer> genericSequencerProvider;
+
+ protected ISemanticSequencer genericSequencer;
+
+
+ @Override
+ public void init(ISemanticSequencer sequencer, ISemanticSequenceAcceptor sequenceAcceptor, Acceptor errorAcceptor) {
+ super.init(sequencer, sequenceAcceptor, errorAcceptor);
+ this.genericSequencer = genericSequencerProvider.get();
+ this.genericSequencer.init(sequencer, sequenceAcceptor, errorAcceptor);
+ }
+
+ public void createSequence(EObject context, EObject semanticObject) {
+ if(semanticObject.eClass().getEPackage() == ArithmeticsPackage.eINSTANCE) switch(semanticObject.eClass().getClassifierID()) {
+ case ArithmeticsPackage.DECLARED_PARAMETER:
+ if(context == grammarAccess.getAbstractDefinitionRule() ||
+ context == grammarAccess.getDeclaredParameterRule()) {
+ sequence_DeclaredParameter(context, (DeclaredParameter) semanticObject);
+ return;
+ }
+ else break;
+ case ArithmeticsPackage.DEFINITION:
+ if(context == grammarAccess.getAbstractDefinitionRule() ||
+ context == grammarAccess.getDefinitionRule() ||
+ context == grammarAccess.getStatementRule()) {
+ sequence_Definition(context, (Definition) semanticObject);
+ return;
+ }
+ else break;
+ case ArithmeticsPackage.DIV:
+ if(context == grammarAccess.getAdditionRule() ||
+ context == grammarAccess.getAdditionAccess().getMinusLeftAction_1_0_1_0() ||
+ context == grammarAccess.getAdditionAccess().getPlusLeftAction_1_0_0_0() ||
+ context == grammarAccess.getExpressionRule() ||
+ context == grammarAccess.getMultiplicationRule() ||
+ context == grammarAccess.getMultiplicationAccess().getDivLeftAction_1_0_1_0() ||
+ context == grammarAccess.getMultiplicationAccess().getMultiLeftAction_1_0_0_0() ||
+ context == grammarAccess.getPrimaryExpressionRule()) {
+ sequence_Multiplication(context, (Div) semanticObject);
+ return;
+ }
+ else break;
+ case ArithmeticsPackage.EVALUATION:
+ if(context == grammarAccess.getEvaluationRule() ||
+ context == grammarAccess.getStatementRule()) {
+ sequence_Evaluation(context, (Evaluation) semanticObject);
+ return;
+ }
+ else break;
+ case ArithmeticsPackage.FUNCTION_CALL:
+ if(context == grammarAccess.getAdditionRule() ||
+ context == grammarAccess.getAdditionAccess().getMinusLeftAction_1_0_1_0() ||
+ context == grammarAccess.getAdditionAccess().getPlusLeftAction_1_0_0_0() ||
+ context == grammarAccess.getExpressionRule() ||
+ context == grammarAccess.getMultiplicationRule() ||
+ context == grammarAccess.getMultiplicationAccess().getDivLeftAction_1_0_1_0() ||
+ context == grammarAccess.getMultiplicationAccess().getMultiLeftAction_1_0_0_0() ||
+ context == grammarAccess.getPrimaryExpressionRule()) {
+ sequence_PrimaryExpression(context, (FunctionCall) semanticObject);
+ return;
+ }
+ else break;
+ case ArithmeticsPackage.IMPORT:
+ if(context == grammarAccess.getImportRule()) {
+ sequence_Import(context, (Import) semanticObject);
+ return;
+ }
+ else break;
+ case ArithmeticsPackage.MINUS:
+ if(context == grammarAccess.getAdditionRule() ||
+ context == grammarAccess.getAdditionAccess().getMinusLeftAction_1_0_1_0() ||
+ context == grammarAccess.getAdditionAccess().getPlusLeftAction_1_0_0_0() ||
+ context == grammarAccess.getExpressionRule() ||
+ context == grammarAccess.getMultiplicationRule() ||
+ context == grammarAccess.getMultiplicationAccess().getDivLeftAction_1_0_1_0() ||
+ context == grammarAccess.getMultiplicationAccess().getMultiLeftAction_1_0_0_0() ||
+ context == grammarAccess.getPrimaryExpressionRule()) {
+ sequence_Addition(context, (Minus) semanticObject);
+ return;
+ }
+ else break;
+ case ArithmeticsPackage.MODULE:
+ if(context == grammarAccess.getModuleRule()) {
+ sequence_Module(context, (Module) semanticObject);
+ return;
+ }
+ else break;
+ case ArithmeticsPackage.MULTI:
+ if(context == grammarAccess.getAdditionRule() ||
+ context == grammarAccess.getAdditionAccess().getMinusLeftAction_1_0_1_0() ||
+ context == grammarAccess.getAdditionAccess().getPlusLeftAction_1_0_0_0() ||
+ context == grammarAccess.getExpressionRule() ||
+ context == grammarAccess.getMultiplicationRule() ||
+ context == grammarAccess.getMultiplicationAccess().getDivLeftAction_1_0_1_0() ||
+ context == grammarAccess.getMultiplicationAccess().getMultiLeftAction_1_0_0_0() ||
+ context == grammarAccess.getPrimaryExpressionRule()) {
+ sequence_Multiplication(context, (Multi) semanticObject);
+ return;
+ }
+ else break;
+ case ArithmeticsPackage.NUMBER_LITERAL:
+ if(context == grammarAccess.getAdditionRule() ||
+ context == grammarAccess.getAdditionAccess().getMinusLeftAction_1_0_1_0() ||
+ context == grammarAccess.getAdditionAccess().getPlusLeftAction_1_0_0_0() ||
+ context == grammarAccess.getExpressionRule() ||
+ context == grammarAccess.getMultiplicationRule() ||
+ context == grammarAccess.getMultiplicationAccess().getDivLeftAction_1_0_1_0() ||
+ context == grammarAccess.getMultiplicationAccess().getMultiLeftAction_1_0_0_0() ||
+ context == grammarAccess.getPrimaryExpressionRule()) {
+ sequence_PrimaryExpression(context, (NumberLiteral) semanticObject);
+ return;
+ }
+ else break;
+ case ArithmeticsPackage.PLUS:
+ if(context == grammarAccess.getAdditionRule() ||
+ context == grammarAccess.getAdditionAccess().getMinusLeftAction_1_0_1_0() ||
+ context == grammarAccess.getAdditionAccess().getPlusLeftAction_1_0_0_0() ||
+ context == grammarAccess.getExpressionRule() ||
+ context == grammarAccess.getMultiplicationRule() ||
+ context == grammarAccess.getMultiplicationAccess().getDivLeftAction_1_0_1_0() ||
+ context == grammarAccess.getMultiplicationAccess().getMultiLeftAction_1_0_0_0() ||
+ context == grammarAccess.getPrimaryExpressionRule()) {
+ sequence_Addition(context, (Plus) semanticObject);
+ return;
+ }
+ else break;
+ }
+ if (errorAcceptor != null) errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
+ }
+
+ /**
+ * Constraint:
+ * (left=Addition_Minus_1_0_1_0 right=Multiplication)
+ */
+ protected void sequence_Addition(EObject context, Minus semanticObject) {
+ if(errorAcceptor != null) {
+ if(transientValues.isValueTransient(semanticObject, ArithmeticsPackage.Literals.MINUS__LEFT) == ValueTransient.YES)
+ errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, ArithmeticsPackage.Literals.MINUS__LEFT));
+ if(transientValues.isValueTransient(semanticObject, ArithmeticsPackage.Literals.MINUS__RIGHT) == ValueTransient.YES)
+ errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, ArithmeticsPackage.Literals.MINUS__RIGHT));
+ }
+ INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
+ SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
+ feeder.accept(grammarAccess.getAdditionAccess().getMinusLeftAction_1_0_1_0(), semanticObject.getLeft());
+ feeder.accept(grammarAccess.getAdditionAccess().getRightMultiplicationParserRuleCall_1_1_0(), semanticObject.getRight());
+ feeder.finish();
+ }
+
+
+ /**
+ * Constraint:
+ * (left=Addition_Plus_1_0_0_0 right=Multiplication)
+ */
+ protected void sequence_Addition(EObject context, Plus semanticObject) {
+ if(errorAcceptor != null) {
+ if(transientValues.isValueTransient(semanticObject, ArithmeticsPackage.Literals.PLUS__LEFT) == ValueTransient.YES)
+ errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, ArithmeticsPackage.Literals.PLUS__LEFT));
+ if(transientValues.isValueTransient(semanticObject, ArithmeticsPackage.Literals.PLUS__RIGHT) == ValueTransient.YES)
+ errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, ArithmeticsPackage.Literals.PLUS__RIGHT));
+ }
+ INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
+ SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
+ feeder.accept(grammarAccess.getAdditionAccess().getPlusLeftAction_1_0_0_0(), semanticObject.getLeft());
+ feeder.accept(grammarAccess.getAdditionAccess().getRightMultiplicationParserRuleCall_1_1_0(), semanticObject.getRight());
+ feeder.finish();
+ }
+
+
+ /**
+ * Constraint:
+ * name=ID
+ */
+ protected void sequence_DeclaredParameter(EObject context, DeclaredParameter semanticObject) {
+ if(errorAcceptor != null) {
+ if(transientValues.isValueTransient(semanticObject, ArithmeticsPackage.Literals.ABSTRACT_DEFINITION__NAME) == ValueTransient.YES)
+ errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, ArithmeticsPackage.Literals.ABSTRACT_DEFINITION__NAME));
+ }
+ INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
+ SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
+ feeder.accept(grammarAccess.getDeclaredParameterAccess().getNameIDTerminalRuleCall_0(), semanticObject.getName());
+ feeder.finish();
+ }
+
+
+ /**
+ * Constraint:
+ * (name=ID (args+=DeclaredParameter args+=DeclaredParameter*)? expr=Expression)
+ */
+ protected void sequence_Definition(EObject context, Definition semanticObject) {
+ genericSequencer.createSequence(context, semanticObject);
+ }
+
+
+ /**
+ * Constraint:
+ * expression=Expression
+ */
+ protected void sequence_Evaluation(EObject context, Evaluation semanticObject) {
+ if(errorAcceptor != null) {
+ if(transientValues.isValueTransient(semanticObject, ArithmeticsPackage.Literals.EVALUATION__EXPRESSION) == ValueTransient.YES)
+ errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, ArithmeticsPackage.Literals.EVALUATION__EXPRESSION));
+ }
+ INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
+ SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
+ feeder.accept(grammarAccess.getEvaluationAccess().getExpressionExpressionParserRuleCall_0_0(), semanticObject.getExpression());
+ feeder.finish();
+ }
+
+
+ /**
+ * Constraint:
+ * importedNamespace=ImportName
+ */
+ protected void sequence_Import(EObject context, Import semanticObject) {
+ if(errorAcceptor != null) {
+ if(transientValues.isValueTransient(semanticObject, ArithmeticsPackage.Literals.IMPORT__IMPORTED_NAMESPACE) == ValueTransient.YES)
+ errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, ArithmeticsPackage.Literals.IMPORT__IMPORTED_NAMESPACE));
+ }
+ INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
+ SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
+ feeder.accept(grammarAccess.getImportAccess().getImportedNamespaceImportNameParserRuleCall_1_0(), semanticObject.getImportedNamespace());
+ feeder.finish();
+ }
+
+
+ /**
+ * Constraint:
+ * (name=ID imports+=Import* statements+=Statement*)
+ */
+ protected void sequence_Module(EObject context, Module semanticObject) {
+ genericSequencer.createSequence(context, semanticObject);
+ }
+
+
+ /**
+ * Constraint:
+ * (left=Multiplication_Div_1_0_1_0 right=PrimaryExpression)
+ */
+ protected void sequence_Multiplication(EObject context, Div semanticObject) {
+ if(errorAcceptor != null) {
+ if(transientValues.isValueTransient(semanticObject, ArithmeticsPackage.Literals.DIV__LEFT) == ValueTransient.YES)
+ errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, ArithmeticsPackage.Literals.DIV__LEFT));
+ if(transientValues.isValueTransient(semanticObject, ArithmeticsPackage.Literals.DIV__RIGHT) == ValueTransient.YES)
+ errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, ArithmeticsPackage.Literals.DIV__RIGHT));
+ }
+ INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
+ SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
+ feeder.accept(grammarAccess.getMultiplicationAccess().getDivLeftAction_1_0_1_0(), semanticObject.getLeft());
+ feeder.accept(grammarAccess.getMultiplicationAccess().getRightPrimaryExpressionParserRuleCall_1_1_0(), semanticObject.getRight());
+ feeder.finish();
+ }
+
+
+ /**
+ * Constraint:
+ * (left=Multiplication_Multi_1_0_0_0 right=PrimaryExpression)
+ */
+ protected void sequence_Multiplication(EObject context, Multi semanticObject) {
+ if(errorAcceptor != null) {
+ if(transientValues.isValueTransient(semanticObject, ArithmeticsPackage.Literals.MULTI__LEFT) == ValueTransient.YES)
+ errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, ArithmeticsPackage.Literals.MULTI__LEFT));
+ if(transientValues.isValueTransient(semanticObject, ArithmeticsPackage.Literals.MULTI__RIGHT) == ValueTransient.YES)
+ errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, ArithmeticsPackage.Literals.MULTI__RIGHT));
+ }
+ INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
+ SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
+ feeder.accept(grammarAccess.getMultiplicationAccess().getMultiLeftAction_1_0_0_0(), semanticObject.getLeft());
+ feeder.accept(grammarAccess.getMultiplicationAccess().getRightPrimaryExpressionParserRuleCall_1_1_0(), semanticObject.getRight());
+ feeder.finish();
+ }
+
+
+ /**
+ * Constraint:
+ * (func=[AbstractDefinition|ID] (args+=Expression args+=Expression*)?)
+ */
+ protected void sequence_PrimaryExpression(EObject context, FunctionCall semanticObject) {
+ genericSequencer.createSequence(context, semanticObject);
+ }
+
+
+ /**
+ * Constraint:
+ * value=NUMBER
+ */
+ protected void sequence_PrimaryExpression(EObject context, NumberLiteral semanticObject) {
+ if(errorAcceptor != null) {
+ if(transientValues.isValueTransient(semanticObject, ArithmeticsPackage.Literals.NUMBER_LITERAL__VALUE) == ValueTransient.YES)
+ errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, ArithmeticsPackage.Literals.NUMBER_LITERAL__VALUE));
+ }
+ INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
+ SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
+ feeder.accept(grammarAccess.getPrimaryExpressionAccess().getValueNUMBERTerminalRuleCall_1_1_0(), semanticObject.getValue());
+ feeder.finish();
+ }
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/serializer/AbstractArithmeticsSyntacticSequencer.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/serializer/AbstractArithmeticsSyntacticSequencer.java
new file mode 100644
index 0000000..2fa106e
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/serializer/AbstractArithmeticsSyntacticSequencer.java
@@ -0,0 +1,66 @@
+package org.eclipse.xtext.example.arithmetics.serializer;
+
+import com.google.inject.Inject;
+import java.util.List;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.IGrammarAccess;
+import org.eclipse.xtext.RuleCall;
+import org.eclipse.xtext.example.arithmetics.services.ArithmeticsGrammarAccess;
+import org.eclipse.xtext.nodemodel.INode;
+import org.eclipse.xtext.serializer.analysis.GrammarAlias.AbstractElementAlias;
+import org.eclipse.xtext.serializer.analysis.GrammarAlias.TokenAlias;
+import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynNavigable;
+import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynTransition;
+import org.eclipse.xtext.serializer.sequencer.AbstractSyntacticSequencer;
+
+@SuppressWarnings("restriction")
+public class AbstractArithmeticsSyntacticSequencer extends AbstractSyntacticSequencer {
+
+ protected ArithmeticsGrammarAccess grammarAccess;
+ protected AbstractElementAlias match_PrimaryExpression_LeftParenthesisKeyword_0_0_a;
+ protected AbstractElementAlias match_PrimaryExpression_LeftParenthesisKeyword_0_0_p;
+
+ @Inject
+ protected void init(IGrammarAccess access) {
+ grammarAccess = (ArithmeticsGrammarAccess) access;
+ match_PrimaryExpression_LeftParenthesisKeyword_0_0_a = new TokenAlias(true, true, grammarAccess.getPrimaryExpressionAccess().getLeftParenthesisKeyword_0_0());
+ match_PrimaryExpression_LeftParenthesisKeyword_0_0_p = new TokenAlias(true, false, grammarAccess.getPrimaryExpressionAccess().getLeftParenthesisKeyword_0_0());
+ }
+
+ @Override
+ protected String getUnassignedRuleCallToken(EObject semanticObject, RuleCall ruleCall, INode node) {
+ return "";
+ }
+
+
+ @Override
+ protected void emitUnassignedTokens(EObject semanticObject, ISynTransition transition, INode fromNode, INode toNode) {
+ if (transition.getAmbiguousSyntaxes().isEmpty()) return;
+ List<INode> transitionNodes = collectNodes(fromNode, toNode);
+ for (AbstractElementAlias syntax : transition.getAmbiguousSyntaxes()) {
+ List<INode> syntaxNodes = getNodesFor(transitionNodes, syntax);
+ if(match_PrimaryExpression_LeftParenthesisKeyword_0_0_a.equals(syntax))
+ emit_PrimaryExpression_LeftParenthesisKeyword_0_0_a(semanticObject, getLastNavigableState(), syntaxNodes);
+ else if(match_PrimaryExpression_LeftParenthesisKeyword_0_0_p.equals(syntax))
+ emit_PrimaryExpression_LeftParenthesisKeyword_0_0_p(semanticObject, getLastNavigableState(), syntaxNodes);
+ else acceptNodes(getLastNavigableState(), syntaxNodes);
+ }
+ }
+
+ /**
+ * Syntax:
+ * '('*
+ */
+ protected void emit_PrimaryExpression_LeftParenthesisKeyword_0_0_a(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
+ acceptNodes(transition, nodes);
+ }
+
+ /**
+ * Syntax:
+ * '('+
+ */
+ protected void emit_PrimaryExpression_LeftParenthesisKeyword_0_0_p(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
+ acceptNodes(transition, nodes);
+ }
+
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/services/ArithmeticsGrammarAccess.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/services/ArithmeticsGrammarAccess.java
new file mode 100644
index 0000000..fd5aab8
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/services/ArithmeticsGrammarAccess.java
@@ -0,0 +1,700 @@
+/*
+* generated by Xtext
+*/
+
+package org.eclipse.xtext.example.arithmetics.services;
+
+import com.google.inject.Singleton;
+import com.google.inject.Inject;
+
+import org.eclipse.xtext.*;
+import org.eclipse.xtext.service.GrammarProvider;
+import org.eclipse.xtext.service.AbstractElementFinder.*;
+
+import org.eclipse.xtext.common.services.TerminalsGrammarAccess;
+
+@Singleton
+public class ArithmeticsGrammarAccess extends AbstractGrammarElementFinder {
+
+
+ public class ModuleElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Module");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Keyword cModuleKeyword_0 = (Keyword)cGroup.eContents().get(0);
+ private final Assignment cNameAssignment_1 = (Assignment)cGroup.eContents().get(1);
+ private final RuleCall cNameIDTerminalRuleCall_1_0 = (RuleCall)cNameAssignment_1.eContents().get(0);
+ private final Assignment cImportsAssignment_2 = (Assignment)cGroup.eContents().get(2);
+ private final RuleCall cImportsImportParserRuleCall_2_0 = (RuleCall)cImportsAssignment_2.eContents().get(0);
+ private final Assignment cStatementsAssignment_3 = (Assignment)cGroup.eContents().get(3);
+ private final RuleCall cStatementsStatementParserRuleCall_3_0 = (RuleCall)cStatementsAssignment_3.eContents().get(0);
+
+ //Module:
+ // "module" name=ID imports+=Import* statements+=Statement*;
+ public ParserRule getRule() { return rule; }
+
+ //"module" name=ID imports+=Import* statements+=Statement*
+ public Group getGroup() { return cGroup; }
+
+ //"module"
+ public Keyword getModuleKeyword_0() { return cModuleKeyword_0; }
+
+ //name=ID
+ public Assignment getNameAssignment_1() { return cNameAssignment_1; }
+
+ //ID
+ public RuleCall getNameIDTerminalRuleCall_1_0() { return cNameIDTerminalRuleCall_1_0; }
+
+ //imports+=Import*
+ public Assignment getImportsAssignment_2() { return cImportsAssignment_2; }
+
+ //Import
+ public RuleCall getImportsImportParserRuleCall_2_0() { return cImportsImportParserRuleCall_2_0; }
+
+ //statements+=Statement*
+ public Assignment getStatementsAssignment_3() { return cStatementsAssignment_3; }
+
+ //Statement
+ public RuleCall getStatementsStatementParserRuleCall_3_0() { return cStatementsStatementParserRuleCall_3_0; }
+ }
+
+ public class ImportElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Import");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Keyword cImportKeyword_0 = (Keyword)cGroup.eContents().get(0);
+ private final Assignment cImportedNamespaceAssignment_1 = (Assignment)cGroup.eContents().get(1);
+ private final RuleCall cImportedNamespaceImportNameParserRuleCall_1_0 = (RuleCall)cImportedNamespaceAssignment_1.eContents().get(0);
+
+ //Import:
+ // "import" importedNamespace=ImportName;
+ public ParserRule getRule() { return rule; }
+
+ //"import" importedNamespace=ImportName
+ public Group getGroup() { return cGroup; }
+
+ //"import"
+ public Keyword getImportKeyword_0() { return cImportKeyword_0; }
+
+ //importedNamespace=ImportName
+ public Assignment getImportedNamespaceAssignment_1() { return cImportedNamespaceAssignment_1; }
+
+ //ImportName
+ public RuleCall getImportedNamespaceImportNameParserRuleCall_1_0() { return cImportedNamespaceImportNameParserRuleCall_1_0; }
+ }
+
+ public class ImportNameElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "ImportName");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final RuleCall cIDTerminalRuleCall_0 = (RuleCall)cGroup.eContents().get(0);
+ private final Group cGroup_1 = (Group)cGroup.eContents().get(1);
+ private final Keyword cFullStopKeyword_1_0 = (Keyword)cGroup_1.eContents().get(0);
+ private final Keyword cAsteriskKeyword_1_1 = (Keyword)cGroup_1.eContents().get(1);
+
+ //ImportName:
+ // ID ("." "*")?;
+ public ParserRule getRule() { return rule; }
+
+ //ID ("." "*")?
+ public Group getGroup() { return cGroup; }
+
+ //ID
+ public RuleCall getIDTerminalRuleCall_0() { return cIDTerminalRuleCall_0; }
+
+ //("." "*")?
+ public Group getGroup_1() { return cGroup_1; }
+
+ //"."
+ public Keyword getFullStopKeyword_1_0() { return cFullStopKeyword_1_0; }
+
+ //"*"
+ public Keyword getAsteriskKeyword_1_1() { return cAsteriskKeyword_1_1; }
+ }
+
+ public class StatementElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Statement");
+ private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1);
+ private final RuleCall cDefinitionParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0);
+ private final RuleCall cEvaluationParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1);
+
+ //Statement:
+ // Definition | Evaluation;
+ public ParserRule getRule() { return rule; }
+
+ //Definition | Evaluation
+ public Alternatives getAlternatives() { return cAlternatives; }
+
+ //Definition
+ public RuleCall getDefinitionParserRuleCall_0() { return cDefinitionParserRuleCall_0; }
+
+ //Evaluation
+ public RuleCall getEvaluationParserRuleCall_1() { return cEvaluationParserRuleCall_1; }
+ }
+
+ public class DefinitionElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Definition");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Keyword cDefKeyword_0 = (Keyword)cGroup.eContents().get(0);
+ private final Assignment cNameAssignment_1 = (Assignment)cGroup.eContents().get(1);
+ private final RuleCall cNameIDTerminalRuleCall_1_0 = (RuleCall)cNameAssignment_1.eContents().get(0);
+ private final Group cGroup_2 = (Group)cGroup.eContents().get(2);
+ private final Keyword cLeftParenthesisKeyword_2_0 = (Keyword)cGroup_2.eContents().get(0);
+ private final Assignment cArgsAssignment_2_1 = (Assignment)cGroup_2.eContents().get(1);
+ private final RuleCall cArgsDeclaredParameterParserRuleCall_2_1_0 = (RuleCall)cArgsAssignment_2_1.eContents().get(0);
+ private final Group cGroup_2_2 = (Group)cGroup_2.eContents().get(2);
+ private final Keyword cCommaKeyword_2_2_0 = (Keyword)cGroup_2_2.eContents().get(0);
+ private final Assignment cArgsAssignment_2_2_1 = (Assignment)cGroup_2_2.eContents().get(1);
+ private final RuleCall cArgsDeclaredParameterParserRuleCall_2_2_1_0 = (RuleCall)cArgsAssignment_2_2_1.eContents().get(0);
+ private final Keyword cRightParenthesisKeyword_2_3 = (Keyword)cGroup_2.eContents().get(3);
+ private final Keyword cColonKeyword_3 = (Keyword)cGroup.eContents().get(3);
+ private final Assignment cExprAssignment_4 = (Assignment)cGroup.eContents().get(4);
+ private final RuleCall cExprExpressionParserRuleCall_4_0 = (RuleCall)cExprAssignment_4.eContents().get(0);
+ private final Keyword cSemicolonKeyword_5 = (Keyword)cGroup.eContents().get(5);
+
+ //Definition:
+ // "def" name=ID ("(" args+=DeclaredParameter ("," args+=DeclaredParameter)* ")")? ":" expr=Expression ";";
+ public ParserRule getRule() { return rule; }
+
+ //"def" name=ID ("(" args+=DeclaredParameter ("," args+=DeclaredParameter)* ")")? ":" expr=Expression ";"
+ public Group getGroup() { return cGroup; }
+
+ //"def"
+ public Keyword getDefKeyword_0() { return cDefKeyword_0; }
+
+ //name=ID
+ public Assignment getNameAssignment_1() { return cNameAssignment_1; }
+
+ //ID
+ public RuleCall getNameIDTerminalRuleCall_1_0() { return cNameIDTerminalRuleCall_1_0; }
+
+ //("(" args+=DeclaredParameter ("," args+=DeclaredParameter)* ")")?
+ public Group getGroup_2() { return cGroup_2; }
+
+ //"("
+ public Keyword getLeftParenthesisKeyword_2_0() { return cLeftParenthesisKeyword_2_0; }
+
+ //args+=DeclaredParameter
+ public Assignment getArgsAssignment_2_1() { return cArgsAssignment_2_1; }
+
+ //DeclaredParameter
+ public RuleCall getArgsDeclaredParameterParserRuleCall_2_1_0() { return cArgsDeclaredParameterParserRuleCall_2_1_0; }
+
+ //("," args+=DeclaredParameter)*
+ public Group getGroup_2_2() { return cGroup_2_2; }
+
+ //","
+ public Keyword getCommaKeyword_2_2_0() { return cCommaKeyword_2_2_0; }
+
+ //args+=DeclaredParameter
+ public Assignment getArgsAssignment_2_2_1() { return cArgsAssignment_2_2_1; }
+
+ //DeclaredParameter
+ public RuleCall getArgsDeclaredParameterParserRuleCall_2_2_1_0() { return cArgsDeclaredParameterParserRuleCall_2_2_1_0; }
+
+ //")"
+ public Keyword getRightParenthesisKeyword_2_3() { return cRightParenthesisKeyword_2_3; }
+
+ //":"
+ public Keyword getColonKeyword_3() { return cColonKeyword_3; }
+
+ //expr=Expression
+ public Assignment getExprAssignment_4() { return cExprAssignment_4; }
+
+ //Expression
+ public RuleCall getExprExpressionParserRuleCall_4_0() { return cExprExpressionParserRuleCall_4_0; }
+
+ //";"
+ public Keyword getSemicolonKeyword_5() { return cSemicolonKeyword_5; }
+ }
+
+ public class DeclaredParameterElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "DeclaredParameter");
+ private final Assignment cNameAssignment = (Assignment)rule.eContents().get(1);
+ private final RuleCall cNameIDTerminalRuleCall_0 = (RuleCall)cNameAssignment.eContents().get(0);
+
+ //DeclaredParameter:
+ // name=ID;
+ public ParserRule getRule() { return rule; }
+
+ //name=ID
+ public Assignment getNameAssignment() { return cNameAssignment; }
+
+ //ID
+ public RuleCall getNameIDTerminalRuleCall_0() { return cNameIDTerminalRuleCall_0; }
+ }
+
+ public class AbstractDefinitionElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "AbstractDefinition");
+ private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1);
+ private final RuleCall cDefinitionParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0);
+ private final RuleCall cDeclaredParameterParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1);
+
+ //AbstractDefinition:
+ // Definition | DeclaredParameter;
+ public ParserRule getRule() { return rule; }
+
+ //Definition | DeclaredParameter
+ public Alternatives getAlternatives() { return cAlternatives; }
+
+ //Definition
+ public RuleCall getDefinitionParserRuleCall_0() { return cDefinitionParserRuleCall_0; }
+
+ //DeclaredParameter
+ public RuleCall getDeclaredParameterParserRuleCall_1() { return cDeclaredParameterParserRuleCall_1; }
+ }
+
+ public class EvaluationElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Evaluation");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Assignment cExpressionAssignment_0 = (Assignment)cGroup.eContents().get(0);
+ private final RuleCall cExpressionExpressionParserRuleCall_0_0 = (RuleCall)cExpressionAssignment_0.eContents().get(0);
+ private final Keyword cSemicolonKeyword_1 = (Keyword)cGroup.eContents().get(1);
+
+ //Evaluation:
+ // expression=Expression ";";
+ public ParserRule getRule() { return rule; }
+
+ //expression=Expression ";"
+ public Group getGroup() { return cGroup; }
+
+ //expression=Expression
+ public Assignment getExpressionAssignment_0() { return cExpressionAssignment_0; }
+
+ //Expression
+ public RuleCall getExpressionExpressionParserRuleCall_0_0() { return cExpressionExpressionParserRuleCall_0_0; }
+
+ //";"
+ public Keyword getSemicolonKeyword_1() { return cSemicolonKeyword_1; }
+ }
+
+ public class ExpressionElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Expression");
+ private final RuleCall cAdditionParserRuleCall = (RuleCall)rule.eContents().get(1);
+
+ //Expression:
+ // Addition;
+ public ParserRule getRule() { return rule; }
+
+ //Addition
+ public RuleCall getAdditionParserRuleCall() { return cAdditionParserRuleCall; }
+ }
+
+ public class AdditionElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Addition");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final RuleCall cMultiplicationParserRuleCall_0 = (RuleCall)cGroup.eContents().get(0);
+ private final Group cGroup_1 = (Group)cGroup.eContents().get(1);
+ private final Alternatives cAlternatives_1_0 = (Alternatives)cGroup_1.eContents().get(0);
+ private final Group cGroup_1_0_0 = (Group)cAlternatives_1_0.eContents().get(0);
+ private final Action cPlusLeftAction_1_0_0_0 = (Action)cGroup_1_0_0.eContents().get(0);
+ private final Keyword cPlusSignKeyword_1_0_0_1 = (Keyword)cGroup_1_0_0.eContents().get(1);
+ private final Group cGroup_1_0_1 = (Group)cAlternatives_1_0.eContents().get(1);
+ private final Action cMinusLeftAction_1_0_1_0 = (Action)cGroup_1_0_1.eContents().get(0);
+ private final Keyword cHyphenMinusKeyword_1_0_1_1 = (Keyword)cGroup_1_0_1.eContents().get(1);
+ private final Assignment cRightAssignment_1_1 = (Assignment)cGroup_1.eContents().get(1);
+ private final RuleCall cRightMultiplicationParserRuleCall_1_1_0 = (RuleCall)cRightAssignment_1_1.eContents().get(0);
+
+ //Addition returns Expression:
+ // Multiplication (({Plus.left=current} "+" | {Minus.left=current} "-") right=Multiplication)*;
+ public ParserRule getRule() { return rule; }
+
+ //Multiplication (({Plus.left=current} "+" | {Minus.left=current} "-") right=Multiplication)*
+ public Group getGroup() { return cGroup; }
+
+ //Multiplication
+ public RuleCall getMultiplicationParserRuleCall_0() { return cMultiplicationParserRuleCall_0; }
+
+ //(({Plus.left=current} "+" | {Minus.left=current} "-") right=Multiplication)*
+ public Group getGroup_1() { return cGroup_1; }
+
+ //{Plus.left=current} "+" | {Minus.left=current} "-"
+ public Alternatives getAlternatives_1_0() { return cAlternatives_1_0; }
+
+ //{Plus.left=current} "+"
+ public Group getGroup_1_0_0() { return cGroup_1_0_0; }
+
+ //{Plus.left=current}
+ public Action getPlusLeftAction_1_0_0_0() { return cPlusLeftAction_1_0_0_0; }
+
+ //"+"
+ public Keyword getPlusSignKeyword_1_0_0_1() { return cPlusSignKeyword_1_0_0_1; }
+
+ //{Minus.left=current} "-"
+ public Group getGroup_1_0_1() { return cGroup_1_0_1; }
+
+ //{Minus.left=current}
+ public Action getMinusLeftAction_1_0_1_0() { return cMinusLeftAction_1_0_1_0; }
+
+ //"-"
+ public Keyword getHyphenMinusKeyword_1_0_1_1() { return cHyphenMinusKeyword_1_0_1_1; }
+
+ //right=Multiplication
+ public Assignment getRightAssignment_1_1() { return cRightAssignment_1_1; }
+
+ //Multiplication
+ public RuleCall getRightMultiplicationParserRuleCall_1_1_0() { return cRightMultiplicationParserRuleCall_1_1_0; }
+ }
+
+ public class MultiplicationElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Multiplication");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final RuleCall cPrimaryExpressionParserRuleCall_0 = (RuleCall)cGroup.eContents().get(0);
+ private final Group cGroup_1 = (Group)cGroup.eContents().get(1);
+ private final Alternatives cAlternatives_1_0 = (Alternatives)cGroup_1.eContents().get(0);
+ private final Group cGroup_1_0_0 = (Group)cAlternatives_1_0.eContents().get(0);
+ private final Action cMultiLeftAction_1_0_0_0 = (Action)cGroup_1_0_0.eContents().get(0);
+ private final Keyword cAsteriskKeyword_1_0_0_1 = (Keyword)cGroup_1_0_0.eContents().get(1);
+ private final Group cGroup_1_0_1 = (Group)cAlternatives_1_0.eContents().get(1);
+ private final Action cDivLeftAction_1_0_1_0 = (Action)cGroup_1_0_1.eContents().get(0);
+ private final Keyword cSolidusKeyword_1_0_1_1 = (Keyword)cGroup_1_0_1.eContents().get(1);
+ private final Assignment cRightAssignment_1_1 = (Assignment)cGroup_1.eContents().get(1);
+ private final RuleCall cRightPrimaryExpressionParserRuleCall_1_1_0 = (RuleCall)cRightAssignment_1_1.eContents().get(0);
+
+ //Multiplication returns Expression:
+ // PrimaryExpression (({Multi.left=current} "*" | {Div.left=current} "/") right=PrimaryExpression)*;
+ public ParserRule getRule() { return rule; }
+
+ //PrimaryExpression (({Multi.left=current} "*" | {Div.left=current} "/") right=PrimaryExpression)*
+ public Group getGroup() { return cGroup; }
+
+ //PrimaryExpression
+ public RuleCall getPrimaryExpressionParserRuleCall_0() { return cPrimaryExpressionParserRuleCall_0; }
+
+ //(({Multi.left=current} "*" | {Div.left=current} "/") right=PrimaryExpression)*
+ public Group getGroup_1() { return cGroup_1; }
+
+ //{Multi.left=current} "*" | {Div.left=current} "/"
+ public Alternatives getAlternatives_1_0() { return cAlternatives_1_0; }
+
+ //{Multi.left=current} "*"
+ public Group getGroup_1_0_0() { return cGroup_1_0_0; }
+
+ //{Multi.left=current}
+ public Action getMultiLeftAction_1_0_0_0() { return cMultiLeftAction_1_0_0_0; }
+
+ //"*"
+ public Keyword getAsteriskKeyword_1_0_0_1() { return cAsteriskKeyword_1_0_0_1; }
+
+ //{Div.left=current} "/"
+ public Group getGroup_1_0_1() { return cGroup_1_0_1; }
+
+ //{Div.left=current}
+ public Action getDivLeftAction_1_0_1_0() { return cDivLeftAction_1_0_1_0; }
+
+ //"/"
+ public Keyword getSolidusKeyword_1_0_1_1() { return cSolidusKeyword_1_0_1_1; }
+
+ //right=PrimaryExpression
+ public Assignment getRightAssignment_1_1() { return cRightAssignment_1_1; }
+
+ //PrimaryExpression
+ public RuleCall getRightPrimaryExpressionParserRuleCall_1_1_0() { return cRightPrimaryExpressionParserRuleCall_1_1_0; }
+ }
+
+ public class PrimaryExpressionElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "PrimaryExpression");
+ private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1);
+ private final Group cGroup_0 = (Group)cAlternatives.eContents().get(0);
+ private final Keyword cLeftParenthesisKeyword_0_0 = (Keyword)cGroup_0.eContents().get(0);
+ private final RuleCall cExpressionParserRuleCall_0_1 = (RuleCall)cGroup_0.eContents().get(1);
+ private final Keyword cRightParenthesisKeyword_0_2 = (Keyword)cGroup_0.eContents().get(2);
+ private final Group cGroup_1 = (Group)cAlternatives.eContents().get(1);
+ private final Action cNumberLiteralAction_1_0 = (Action)cGroup_1.eContents().get(0);
+ private final Assignment cValueAssignment_1_1 = (Assignment)cGroup_1.eContents().get(1);
+ private final RuleCall cValueNUMBERTerminalRuleCall_1_1_0 = (RuleCall)cValueAssignment_1_1.eContents().get(0);
+ private final Group cGroup_2 = (Group)cAlternatives.eContents().get(2);
+ private final Action cFunctionCallAction_2_0 = (Action)cGroup_2.eContents().get(0);
+ private final Assignment cFuncAssignment_2_1 = (Assignment)cGroup_2.eContents().get(1);
+ private final CrossReference cFuncAbstractDefinitionCrossReference_2_1_0 = (CrossReference)cFuncAssignment_2_1.eContents().get(0);
+ private final RuleCall cFuncAbstractDefinitionIDTerminalRuleCall_2_1_0_1 = (RuleCall)cFuncAbstractDefinitionCrossReference_2_1_0.eContents().get(1);
+ private final Group cGroup_2_2 = (Group)cGroup_2.eContents().get(2);
+ private final Keyword cLeftParenthesisKeyword_2_2_0 = (Keyword)cGroup_2_2.eContents().get(0);
+ private final Assignment cArgsAssignment_2_2_1 = (Assignment)cGroup_2_2.eContents().get(1);
+ private final RuleCall cArgsExpressionParserRuleCall_2_2_1_0 = (RuleCall)cArgsAssignment_2_2_1.eContents().get(0);
+ private final Group cGroup_2_2_2 = (Group)cGroup_2_2.eContents().get(2);
+ private final Keyword cCommaKeyword_2_2_2_0 = (Keyword)cGroup_2_2_2.eContents().get(0);
+ private final Assignment cArgsAssignment_2_2_2_1 = (Assignment)cGroup_2_2_2.eContents().get(1);
+ private final RuleCall cArgsExpressionParserRuleCall_2_2_2_1_0 = (RuleCall)cArgsAssignment_2_2_2_1.eContents().get(0);
+ private final Keyword cRightParenthesisKeyword_2_2_3 = (Keyword)cGroup_2_2.eContents().get(3);
+
+ //PrimaryExpression returns Expression:
+ // "(" Expression ")" | {NumberLiteral} value=NUMBER | {FunctionCall} func=[AbstractDefinition] ("(" args+=Expression
+ // ("," args+=Expression)* ")")?;
+ public ParserRule getRule() { return rule; }
+
+ //"(" Expression ")" | {NumberLiteral} value=NUMBER | {FunctionCall} func=[AbstractDefinition] ("(" args+=Expression (","
+ //args+=Expression)* ")")?
+ public Alternatives getAlternatives() { return cAlternatives; }
+
+ //"(" Expression ")"
+ public Group getGroup_0() { return cGroup_0; }
+
+ //"("
+ public Keyword getLeftParenthesisKeyword_0_0() { return cLeftParenthesisKeyword_0_0; }
+
+ //Expression
+ public RuleCall getExpressionParserRuleCall_0_1() { return cExpressionParserRuleCall_0_1; }
+
+ //")"
+ public Keyword getRightParenthesisKeyword_0_2() { return cRightParenthesisKeyword_0_2; }
+
+ //{NumberLiteral} value=NUMBER
+ public Group getGroup_1() { return cGroup_1; }
+
+ //{NumberLiteral}
+ public Action getNumberLiteralAction_1_0() { return cNumberLiteralAction_1_0; }
+
+ //value=NUMBER
+ public Assignment getValueAssignment_1_1() { return cValueAssignment_1_1; }
+
+ //NUMBER
+ public RuleCall getValueNUMBERTerminalRuleCall_1_1_0() { return cValueNUMBERTerminalRuleCall_1_1_0; }
+
+ //{FunctionCall} func=[AbstractDefinition] ("(" args+=Expression ("," args+=Expression)* ")")?
+ public Group getGroup_2() { return cGroup_2; }
+
+ //{FunctionCall}
+ public Action getFunctionCallAction_2_0() { return cFunctionCallAction_2_0; }
+
+ //func=[AbstractDefinition]
+ public Assignment getFuncAssignment_2_1() { return cFuncAssignment_2_1; }
+
+ //[AbstractDefinition]
+ public CrossReference getFuncAbstractDefinitionCrossReference_2_1_0() { return cFuncAbstractDefinitionCrossReference_2_1_0; }
+
+ //ID
+ public RuleCall getFuncAbstractDefinitionIDTerminalRuleCall_2_1_0_1() { return cFuncAbstractDefinitionIDTerminalRuleCall_2_1_0_1; }
+
+ //("(" args+=Expression ("," args+=Expression)* ")")?
+ public Group getGroup_2_2() { return cGroup_2_2; }
+
+ //"("
+ public Keyword getLeftParenthesisKeyword_2_2_0() { return cLeftParenthesisKeyword_2_2_0; }
+
+ //args+=Expression
+ public Assignment getArgsAssignment_2_2_1() { return cArgsAssignment_2_2_1; }
+
+ //Expression
+ public RuleCall getArgsExpressionParserRuleCall_2_2_1_0() { return cArgsExpressionParserRuleCall_2_2_1_0; }
+
+ //("," args+=Expression)*
+ public Group getGroup_2_2_2() { return cGroup_2_2_2; }
+
+ //","
+ public Keyword getCommaKeyword_2_2_2_0() { return cCommaKeyword_2_2_2_0; }
+
+ //args+=Expression
+ public Assignment getArgsAssignment_2_2_2_1() { return cArgsAssignment_2_2_2_1; }
+
+ //Expression
+ public RuleCall getArgsExpressionParserRuleCall_2_2_2_1_0() { return cArgsExpressionParserRuleCall_2_2_2_1_0; }
+
+ //")"
+ public Keyword getRightParenthesisKeyword_2_2_3() { return cRightParenthesisKeyword_2_2_3; }
+ }
+
+
+ private ModuleElements pModule;
+ private ImportElements pImport;
+ private ImportNameElements pImportName;
+ private StatementElements pStatement;
+ private DefinitionElements pDefinition;
+ private DeclaredParameterElements pDeclaredParameter;
+ private AbstractDefinitionElements pAbstractDefinition;
+ private EvaluationElements pEvaluation;
+ private ExpressionElements pExpression;
+ private AdditionElements pAddition;
+ private MultiplicationElements pMultiplication;
+ private PrimaryExpressionElements pPrimaryExpression;
+ private TerminalRule tNUMBER;
+ private TerminalRule tINT;
+
+ private final GrammarProvider grammarProvider;
+
+ private TerminalsGrammarAccess gaTerminals;
+
+ @Inject
+ public ArithmeticsGrammarAccess(GrammarProvider grammarProvider,
+ TerminalsGrammarAccess gaTerminals) {
+ this.grammarProvider = grammarProvider;
+ this.gaTerminals = gaTerminals;
+ }
+
+ public Grammar getGrammar() {
+ return grammarProvider.getGrammar(this);
+ }
+
+
+ public TerminalsGrammarAccess getTerminalsGrammarAccess() {
+ return gaTerminals;
+ }
+
+
+ //Module:
+ // "module" name=ID imports+=Import* statements+=Statement*;
+ public ModuleElements getModuleAccess() {
+ return (pModule != null) ? pModule : (pModule = new ModuleElements());
+ }
+
+ public ParserRule getModuleRule() {
+ return getModuleAccess().getRule();
+ }
+
+ //Import:
+ // "import" importedNamespace=ImportName;
+ public ImportElements getImportAccess() {
+ return (pImport != null) ? pImport : (pImport = new ImportElements());
+ }
+
+ public ParserRule getImportRule() {
+ return getImportAccess().getRule();
+ }
+
+ //ImportName:
+ // ID ("." "*")?;
+ public ImportNameElements getImportNameAccess() {
+ return (pImportName != null) ? pImportName : (pImportName = new ImportNameElements());
+ }
+
+ public ParserRule getImportNameRule() {
+ return getImportNameAccess().getRule();
+ }
+
+ //Statement:
+ // Definition | Evaluation;
+ public StatementElements getStatementAccess() {
+ return (pStatement != null) ? pStatement : (pStatement = new StatementElements());
+ }
+
+ public ParserRule getStatementRule() {
+ return getStatementAccess().getRule();
+ }
+
+ //Definition:
+ // "def" name=ID ("(" args+=DeclaredParameter ("," args+=DeclaredParameter)* ")")? ":" expr=Expression ";";
+ public DefinitionElements getDefinitionAccess() {
+ return (pDefinition != null) ? pDefinition : (pDefinition = new DefinitionElements());
+ }
+
+ public ParserRule getDefinitionRule() {
+ return getDefinitionAccess().getRule();
+ }
+
+ //DeclaredParameter:
+ // name=ID;
+ public DeclaredParameterElements getDeclaredParameterAccess() {
+ return (pDeclaredParameter != null) ? pDeclaredParameter : (pDeclaredParameter = new DeclaredParameterElements());
+ }
+
+ public ParserRule getDeclaredParameterRule() {
+ return getDeclaredParameterAccess().getRule();
+ }
+
+ //AbstractDefinition:
+ // Definition | DeclaredParameter;
+ public AbstractDefinitionElements getAbstractDefinitionAccess() {
+ return (pAbstractDefinition != null) ? pAbstractDefinition : (pAbstractDefinition = new AbstractDefinitionElements());
+ }
+
+ public ParserRule getAbstractDefinitionRule() {
+ return getAbstractDefinitionAccess().getRule();
+ }
+
+ //Evaluation:
+ // expression=Expression ";";
+ public EvaluationElements getEvaluationAccess() {
+ return (pEvaluation != null) ? pEvaluation : (pEvaluation = new EvaluationElements());
+ }
+
+ public ParserRule getEvaluationRule() {
+ return getEvaluationAccess().getRule();
+ }
+
+ //Expression:
+ // Addition;
+ public ExpressionElements getExpressionAccess() {
+ return (pExpression != null) ? pExpression : (pExpression = new ExpressionElements());
+ }
+
+ public ParserRule getExpressionRule() {
+ return getExpressionAccess().getRule();
+ }
+
+ //Addition returns Expression:
+ // Multiplication (({Plus.left=current} "+" | {Minus.left=current} "-") right=Multiplication)*;
+ public AdditionElements getAdditionAccess() {
+ return (pAddition != null) ? pAddition : (pAddition = new AdditionElements());
+ }
+
+ public ParserRule getAdditionRule() {
+ return getAdditionAccess().getRule();
+ }
+
+ //Multiplication returns Expression:
+ // PrimaryExpression (({Multi.left=current} "*" | {Div.left=current} "/") right=PrimaryExpression)*;
+ public MultiplicationElements getMultiplicationAccess() {
+ return (pMultiplication != null) ? pMultiplication : (pMultiplication = new MultiplicationElements());
+ }
+
+ public ParserRule getMultiplicationRule() {
+ return getMultiplicationAccess().getRule();
+ }
+
+ //PrimaryExpression returns Expression:
+ // "(" Expression ")" | {NumberLiteral} value=NUMBER | {FunctionCall} func=[AbstractDefinition] ("(" args+=Expression
+ // ("," args+=Expression)* ")")?;
+ public PrimaryExpressionElements getPrimaryExpressionAccess() {
+ return (pPrimaryExpression != null) ? pPrimaryExpression : (pPrimaryExpression = new PrimaryExpressionElements());
+ }
+
+ public ParserRule getPrimaryExpressionRule() {
+ return getPrimaryExpressionAccess().getRule();
+ }
+
+ //terminal NUMBER returns ecore::EBigDecimal:
+ // "0".."9"* ("." "0".."9"+)?;
+ public TerminalRule getNUMBERRule() {
+ return (tNUMBER != null) ? tNUMBER : (tNUMBER = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "NUMBER"));
+ }
+
+ //terminal INT returns ecore::EInt:
+ // "this one has been deactivated";
+ public TerminalRule getINTRule() {
+ return (tINT != null) ? tINT : (tINT = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "INT"));
+ }
+
+ //terminal ID:
+ // "^"? ("a".."z" | "A".."Z" | "_") ("a".."z" | "A".."Z" | "_" | "0".."9")*;
+ public TerminalRule getIDRule() {
+ return gaTerminals.getIDRule();
+ }
+
+ //terminal STRING:
+ // "\"" ("\\" ("b" | "t" | "n" | "f" | "r" | "u" | "\"" | "\'" | "\\") | !("\\" | "\""))* "\"" | "\'" ("\\" ("b" | "t" |
+ // "n" | "f" | "r" | "u" | "\"" | "\'" | "\\") | !("\\" | "\'"))* "\'";
+ public TerminalRule getSTRINGRule() {
+ return gaTerminals.getSTRINGRule();
+ }
+
+ //terminal ML_COMMENT:
+ // "/ *"->"* /";
+ public TerminalRule getML_COMMENTRule() {
+ return gaTerminals.getML_COMMENTRule();
+ }
+
+ //terminal SL_COMMENT:
+ // "//" !("\n" | "\r")* ("\r"? "\n")?;
+ public TerminalRule getSL_COMMENTRule() {
+ return gaTerminals.getSL_COMMENTRule();
+ }
+
+ //terminal WS:
+ // (" " | "\t" | "\r" | "\n")+;
+ public TerminalRule getWSRule() {
+ return gaTerminals.getWSRule();
+ }
+
+ //terminal ANY_OTHER:
+ // .;
+ public TerminalRule getANY_OTHERRule() {
+ return gaTerminals.getANY_OTHERRule();
+ }
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/validation/AbstractArithmeticsJavaValidator.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/validation/AbstractArithmeticsJavaValidator.java
new file mode 100644
index 0000000..ed8bcf9
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src-gen/org/eclipse/xtext/example/arithmetics/validation/AbstractArithmeticsJavaValidator.java
@@ -0,0 +1,20 @@
+package org.eclipse.xtext.example.arithmetics.validation;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.xtext.validation.AbstractDeclarativeValidator;
+import org.eclipse.xtext.validation.ComposedChecks;
+
+@ComposedChecks(validators= {org.eclipse.xtext.validation.ImportUriValidator.class, org.eclipse.xtext.validation.NamesAreUniqueValidator.class})
+public class AbstractArithmeticsJavaValidator extends AbstractDeclarativeValidator {
+
+ @Override
+ protected List<EPackage> getEPackages() {
+ List<EPackage> result = new ArrayList<EPackage>();
+ result.add(org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage.eINSTANCE);
+ return result;
+ }
+
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src/org/eclipse/xtext/example/arithmetics/Arithmetics.mwe2 b/examples/plugins/org.eclipse.xtext.example.arithmetics/src/org/eclipse/xtext/example/arithmetics/Arithmetics.mwe2
new file mode 100644
index 0000000..33b2773
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src/org/eclipse/xtext/example/arithmetics/Arithmetics.mwe2
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+module org.eclipse.xtext.example.arithmetics.Arithmetics
+
+import org.eclipse.emf.mwe.utils.*
+import org.eclipse.xtext.generator.*
+import org.eclipse.xtext.ui.generator.*
+
+var grammarURI = "classpath:/org/eclipse/xtext/example/arithmetics/Arithmetics.xtext"
+var file.extensions = "calc"
+var projectName = "org.eclipse.xtext.example.arithmetics"
+var runtimeProject = "../${projectName}"
+
+Workflow {
+ bean = StandaloneSetup {
+ platformUri = "${runtimeProject}/../.."
+ }
+
+ component = DirectoryCleaner {
+ directory = "${runtimeProject}/src-gen"
+ }
+
+ component = DirectoryCleaner {
+ directory = "${runtimeProject}.ui/src-gen"
+ }
+
+ component = Generator {
+ pathRtProject = runtimeProject
+ pathUiProject = "${runtimeProject}.ui"
+ projectNameRt = projectName
+ projectNameUi = "${projectName}.ui"
+ language = LanguageConfig {
+ uri = grammarURI
+ fileExtensions = file.extensions
+
+ // Java API to access grammar elements (required by several other fragments)
+ fragment = grammarAccess.GrammarAccessFragment {}
+
+ // generates Java API for the generated EPackages
+ fragment = ecore.EcoreGeneratorFragment {}
+
+ // the serialization component
+ fragment = serializer.SerializerFragment {
+ srcGenOnly=true
+ }
+
+ // a custom ResourceFactory for use with EMF
+ fragment = resourceFactory.ResourceFactoryFragment {
+ fileExtensions = file.extensions
+ }
+
+ // the following fragment tries to use the Antlr Generator fragment which can be installed via update manager from http://download.itemis.com/updates/
+ fragment = parser.antlr.XtextAntlrGeneratorFragment {}
+
+ // java-based API for validation
+ fragment = validation.JavaValidatorFragment {
+ composedCheck = "org.eclipse.xtext.validation.ImportUriValidator"
+ composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator"
+ }
+
+ // scoping and exporting API
+ fragment = scoping.ImportNamespacesScopingFragment {}
+ fragment = exporting.QualifiedNamesFragment {}
+
+ // formatter API
+ fragment = formatting.FormatterFragment {}
+
+ // labeling API
+ fragment = labeling.LabelProviderFragment {}
+
+ // outline API
+ fragment = outline.OutlineTreeProviderFragment {}
+ fragment = outline.QuickOutlineFragment {}
+
+ // java-based API for content assistance
+ fragment = contentAssist.JavaBasedContentAssistFragment {}
+
+ fragment = parser.antlr.XtextAntlrUiGeneratorFragment {}
+
+ fragment = builder.BuilderIntegrationFragment {}
+
+ // quickfix API
+ fragment = quickfix.QuickfixProviderFragment {}
+ }
+ }
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src/org/eclipse/xtext/example/arithmetics/Arithmetics.xtext b/examples/plugins/org.eclipse.xtext.example.arithmetics/src/org/eclipse/xtext/example/arithmetics/Arithmetics.xtext
new file mode 100644
index 0000000..a4634ff
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src/org/eclipse/xtext/example/arithmetics/Arithmetics.xtext
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+grammar org.eclipse.xtext.example.arithmetics.Arithmetics with org.eclipse.xtext.common.Terminals
+
+import "http://www.eclipse.org/emf/2002/Ecore" as ecore
+generate arithmetics "http://www.eclipse.org/Xtext/example/Arithmetics"
+
+Module:
+ 'module' name=ID
+ (imports+=Import)*
+ (statements+=Statement)*;
+
+Import:
+ 'import' importedNamespace=ImportName;
+
+ImportName:
+ ID ('.' '*')?;
+
+Statement:
+ Definition | Evaluation;
+
+Definition:
+ 'def' name=ID ('(' args+=DeclaredParameter (',' args+=DeclaredParameter)* ')')?
+ ':' expr=Expression ';';
+
+DeclaredParameter:
+ name=ID;
+
+AbstractDefinition:
+ Definition | DeclaredParameter;
+
+Evaluation:
+ expression=Expression ';';
+
+Expression:
+ Addition;
+
+Addition returns Expression:
+ Multiplication (({Plus.left=current} '+' | {Minus.left=current} '-') right=Multiplication)*;
+
+Multiplication returns Expression:
+ PrimaryExpression (({Multi.left=current} '*' | {Div.left=current} '/') right=PrimaryExpression)*;
+
+PrimaryExpression returns Expression:
+ '(' Expression ')' |
+ {NumberLiteral} value=NUMBER |
+ {FunctionCall} func=[AbstractDefinition] ('(' args+=Expression (',' args+=Expression)* ')')?;
+
+terminal NUMBER returns ecore::EBigDecimal:
+ ('0'..'9')* ('.' ('0'..'9')+)?;
+
+terminal INT returns ecore::EInt:
+ 'this one has been deactivated';
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src/org/eclipse/xtext/example/arithmetics/ArithmeticsRuntimeModule.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src/org/eclipse/xtext/example/arithmetics/ArithmeticsRuntimeModule.java
new file mode 100644
index 0000000..bb5f66e
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src/org/eclipse/xtext/example/arithmetics/ArithmeticsRuntimeModule.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.eclipse.xtext.example.arithmetics;
+
+import org.eclipse.xtext.example.arithmetics.scoping.NameProvider;
+import org.eclipse.xtext.linking.ILinkingService;
+import org.eclipse.xtext.naming.IQualifiedNameProvider;
+
+
+public class ArithmeticsRuntimeModule extends AbstractArithmeticsRuntimeModule {
+
+ @Override
+ public Class<? extends IQualifiedNameProvider> bindIQualifiedNameProvider() {
+ return NameProvider.class;
+ }
+
+ @Override
+ public Class<? extends ILinkingService> bindILinkingService() {
+ return org.eclipse.xtext.example.arithmetics.scoping.LinkingService.class;
+ }
+
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src/org/eclipse/xtext/example/arithmetics/ArithmeticsStandaloneSetup.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src/org/eclipse/xtext/example/arithmetics/ArithmeticsStandaloneSetup.java
new file mode 100644
index 0000000..9e17a7d
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src/org/eclipse/xtext/example/arithmetics/ArithmeticsStandaloneSetup.java
@@ -0,0 +1,14 @@
+
+package org.eclipse.xtext.example.arithmetics;
+
+/**
+ * Initialization support for running Xtext languages
+ * without equinox extension registry
+ */
+public class ArithmeticsStandaloneSetup extends ArithmeticsStandaloneSetupGenerated{
+
+ public static void doSetup() {
+ new ArithmeticsStandaloneSetup().createInjectorAndDoEMFRegistration();
+ }
+}
+
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src/org/eclipse/xtext/example/arithmetics/formatting/ArithmeticsFormatter.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src/org/eclipse/xtext/example/arithmetics/formatting/ArithmeticsFormatter.java
new file mode 100644
index 0000000..228d816
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src/org/eclipse/xtext/example/arithmetics/formatting/ArithmeticsFormatter.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.eclipse.xtext.example.arithmetics.formatting;
+
+import org.eclipse.xtext.formatting.impl.AbstractDeclarativeFormatter;
+import org.eclipse.xtext.formatting.impl.FormattingConfig;
+
+/**
+ * This class contains custom formatting description.
+ *
+ * see : http://www.eclipse.org/Xtext/documentation/latest/xtext.html#formatting
+ * on how and when to use it
+ *
+ * Also see org.eclipse.xtext.xtext.XtextFormatter as an example
+ */
+public class ArithmeticsFormatter extends AbstractDeclarativeFormatter {
+
+ @Override
+ protected void configureFormatting(FormattingConfig c) {
+ }
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src/org/eclipse/xtext/example/arithmetics/interpreter/Calculator.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src/org/eclipse/xtext/example/arithmetics/interpreter/Calculator.java
new file mode 100644
index 0000000..b92565d
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src/org/eclipse/xtext/example/arithmetics/interpreter/Calculator.java
@@ -0,0 +1,87 @@
+/*******************************************************************************
+ * Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+
+package org.eclipse.xtext.example.arithmetics.interpreter;
+
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.util.Map;
+
+import org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage;
+import org.eclipse.xtext.example.arithmetics.arithmetics.DeclaredParameter;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Definition;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Div;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Expression;
+import org.eclipse.xtext.example.arithmetics.arithmetics.FunctionCall;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Minus;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Multi;
+import org.eclipse.xtext.example.arithmetics.arithmetics.NumberLiteral;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Plus;
+import org.eclipse.xtext.util.PolymorphicDispatcher;
+
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.Maps;
+
+/**
+ * an interpreter for instances of EClasses of the {@link ArithmeticsPackage}.
+ *
+ * It internally uses a polymorphic dispatcher to dispatch between the implementations for the different EClasses.
+ *
+ * @author Sven Efftinge - initial contribution and API
+ */
+public class Calculator {
+
+ private PolymorphicDispatcher<BigDecimal> dispatcher = PolymorphicDispatcher.createForSingleTarget("internalEvaluate", 2, 2, this);
+
+ public BigDecimal evaluate(Expression obj) {
+ return evaluate(obj, ImmutableMap.<String,BigDecimal>of());
+ }
+
+ public BigDecimal evaluate(Expression obj, ImmutableMap<String,BigDecimal> values) {
+ BigDecimal invoke = dispatcher.invoke(obj, values);
+ return invoke;
+ }
+
+ protected BigDecimal internalEvaluate(Expression e, ImmutableMap<String,BigDecimal> values) {
+ throw new UnsupportedOperationException(e.toString());
+ }
+
+ protected BigDecimal internalEvaluate(NumberLiteral e, ImmutableMap<String,BigDecimal> values) {
+ return e.getValue();
+ }
+
+ protected BigDecimal internalEvaluate(FunctionCall e, ImmutableMap<String,BigDecimal> values) {
+ if (e.getFunc() instanceof DeclaredParameter) {
+ return values.get(e.getFunc().getName());
+ }
+ Definition d = (Definition) e.getFunc();
+ Map<String,BigDecimal> params = Maps.newHashMap();
+ for (int i=0; i<e.getArgs().size();i++) {
+ DeclaredParameter declaredParameter = d.getArgs().get(i);
+ BigDecimal evaluate = evaluate(e.getArgs().get(i), values);
+ params.put(declaredParameter.getName(), evaluate);
+ }
+ return evaluate(d.getExpr(),ImmutableMap.copyOf(params));
+ }
+
+ protected BigDecimal internalEvaluate(Plus plus, ImmutableMap<String,BigDecimal> values) {
+ return evaluate(plus.getLeft(),values).add(evaluate(plus.getRight(),values));
+ }
+ protected BigDecimal internalEvaluate(Minus minus, ImmutableMap<String,BigDecimal> values) {
+ return evaluate(minus.getLeft(),values).subtract(evaluate(minus.getRight(),values));
+ }
+ protected BigDecimal internalEvaluate(Div div, ImmutableMap<String,BigDecimal> values) {
+ BigDecimal left = evaluate(div.getLeft(),values);
+ BigDecimal right = evaluate(div.getRight(),values);
+ return left.divide(right,20,RoundingMode.HALF_UP);
+ }
+ protected BigDecimal internalEvaluate(Multi multi, ImmutableMap<String,BigDecimal> values) {
+ return evaluate(multi.getLeft(),values).multiply(evaluate(multi.getRight(),values));
+ }
+
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src/org/eclipse/xtext/example/arithmetics/scoping/ArithmeticsScopeProvider.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src/org/eclipse/xtext/example/arithmetics/scoping/ArithmeticsScopeProvider.java
new file mode 100644
index 0000000..f51240e
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src/org/eclipse/xtext/example/arithmetics/scoping/ArithmeticsScopeProvider.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.eclipse.xtext.example.arithmetics.scoping;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.xtext.resource.IEObjectDescription;
+import org.eclipse.xtext.scoping.IScope;
+import org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider;
+import org.eclipse.xtext.scoping.impl.FilteringScope;
+
+import com.google.common.base.Predicate;
+
+/**
+ * @author Jan Koehnlein - introduced QualifiedName
+ */
+public class ArithmeticsScopeProvider extends AbstractDeclarativeScopeProvider {
+
+ /**
+ * we delegate to the default but filter out all descriptions with a qualified name (i.e. with '.' in the name)
+ */
+ @Override
+ public IScope getScope(EObject context, EReference reference) {
+ IScope scope = super.getScope(context, reference);
+ return new FilteringScope(scope,
+ new Predicate<IEObjectDescription>() {
+ public boolean apply(IEObjectDescription input) {
+ return input!=null && input.getName()!=null && input.getName().getSegmentCount()==1;
+ };
+ });
+ }
+
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src/org/eclipse/xtext/example/arithmetics/scoping/LinkingService.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src/org/eclipse/xtext/example/arithmetics/scoping/LinkingService.java
new file mode 100644
index 0000000..e2260b7
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src/org/eclipse/xtext/example/arithmetics/scoping/LinkingService.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.eclipse.xtext.example.arithmetics.scoping;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.example.arithmetics.arithmetics.FunctionCall;
+import org.eclipse.xtext.linking.impl.DefaultLinkingService;
+import org.eclipse.xtext.linking.impl.IllegalNodeException;
+import org.eclipse.xtext.nodemodel.INode;
+
+/**
+ * Changes the link text to contain the whole signature of a function.
+ *
+ * @author Sven Efftinge - initial contribution and API
+ */
+public class LinkingService extends DefaultLinkingService {
+
+ @Override
+ public String getCrossRefNodeAsString(INode node) throws IllegalNodeException {
+ String result = super.getCrossRefNodeAsString(node);
+ EObject element = node.getSemanticElement();
+ if (element instanceof FunctionCall) {
+ FunctionCall fc = (FunctionCall) element;
+ if (!fc.getArgs().isEmpty()) {
+ result += "(";
+ for(int i=0;i<fc.getArgs().size();i++) {
+ result+="arg"+(i+1);
+ if (i+1<fc.getArgs().size())
+ result+=",";
+ }
+ result += ")";
+ }
+ }
+ return result;
+ }
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src/org/eclipse/xtext/example/arithmetics/scoping/NameProvider.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src/org/eclipse/xtext/example/arithmetics/scoping/NameProvider.java
new file mode 100644
index 0000000..3aca661
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src/org/eclipse/xtext/example/arithmetics/scoping/NameProvider.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.eclipse.xtext.example.arithmetics.scoping;
+
+import java.util.Iterator;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.example.arithmetics.arithmetics.DeclaredParameter;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Definition;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Module;
+import org.eclipse.xtext.example.arithmetics.arithmetics.util.ArithmeticsSwitch;
+import org.eclipse.xtext.naming.IQualifiedNameConverter;
+import org.eclipse.xtext.naming.IQualifiedNameProvider;
+import org.eclipse.xtext.naming.QualifiedName;
+
+import com.google.inject.Inject;
+
+/**
+ * changes the exported name of a function to be the signature and not just the simple name.
+ *
+ * @author Sven Efftinge - initial contribution and API
+ * @author Jan Koehnlein - introduced QualifiedName
+ */
+public class NameProvider extends IQualifiedNameProvider.AbstractImpl {
+
+ @Inject
+ private IQualifiedNameConverter qualifiedNameConverter;
+
+ public QualifiedName getFullyQualifiedName(EObject obj) {
+ String name = new ArithmeticsSwitch<String>() {
+
+ public String caseModule(Module object) {
+ return object.getName();
+ }
+
+ public String caseDefinition(Definition object) {
+ StringBuilder sb = new StringBuilder();
+ sb.append(doSwitch(object.eContainer()));
+ sb.append(".");
+ sb.append(object.getName());
+ if (!object.getArgs().isEmpty()) {
+ sb.append("(");
+ Iterator<DeclaredParameter> iter = object.getArgs()
+ .iterator();
+ int i = 1;
+ while (iter.hasNext()) {
+ iter.next();
+ sb.append("arg" + (i++));
+ if (iter.hasNext())
+ sb.append(",");
+ }
+ sb.append(")");
+ }
+ return sb.toString();
+ }
+
+ public String caseDeclaredParameter(DeclaredParameter object) {
+ return doSwitch(object.eContainer()) + "." + object.getName();
+ }
+
+ }.doSwitch(obj);
+ if(name == null)
+ return null;
+ return qualifiedNameConverter.toQualifiedName(name);
+ }
+}
\ No newline at end of file
diff --git a/examples/plugins/org.eclipse.xtext.example.arithmetics/src/org/eclipse/xtext/example/arithmetics/validation/ArithmeticsJavaValidator.java b/examples/plugins/org.eclipse.xtext.example.arithmetics/src/org/eclipse/xtext/example/arithmetics/validation/ArithmeticsJavaValidator.java
new file mode 100644
index 0000000..a5928f0
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.arithmetics/src/org/eclipse/xtext/example/arithmetics/validation/ArithmeticsJavaValidator.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+
+package org.eclipse.xtext.example.arithmetics.validation;
+
+import java.math.BigDecimal;
+
+import org.eclipse.emf.common.util.TreeIterator;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.EcoreUtil2;
+import org.eclipse.xtext.example.arithmetics.arithmetics.ArithmeticsPackage;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Div;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Evaluation;
+import org.eclipse.xtext.example.arithmetics.arithmetics.Expression;
+import org.eclipse.xtext.example.arithmetics.arithmetics.FunctionCall;
+import org.eclipse.xtext.example.arithmetics.arithmetics.NumberLiteral;
+import org.eclipse.xtext.example.arithmetics.interpreter.Calculator;
+import org.eclipse.xtext.validation.Check;
+import org.eclipse.xtext.validation.ValidationMessageAcceptor;
+
+import com.google.inject.Inject;
+
+
+/**
+ * @author Sven Efftinge - initial contribution and API
+ */
+public class ArithmeticsJavaValidator extends AbstractArithmeticsJavaValidator {
+
+ @Inject
+ private Calculator calculator;
+
+ @Check
+ public void checkDivByZero(Div div) {
+ BigDecimal bigDecimal = calculator.evaluate(div.getRight());
+ if (bigDecimal.doubleValue()==0.0)
+ error("Division by zero detected.", ArithmeticsPackage.Literals.DIV__RIGHT);
+ }
+
+ public final static String NORMALIZABLE = "normalizable-expression";
+ @Check
+ public void checkNormalizable(Expression expr) {
+ // ignore literals
+ if ((expr instanceof NumberLiteral)
+ || (expr instanceof FunctionCall)
+ )
+ return;
+ // ignore evaluations
+ if (EcoreUtil2.getContainerOfType(expr, Evaluation.class)!=null)
+ return;
+
+ TreeIterator<EObject> contents = expr.eAllContents();
+ while(contents.hasNext()) {
+ EObject next = contents.next();
+ if (next instanceof FunctionCall) {
+ return;
+ }
+ }
+ BigDecimal decimal = calculator.evaluate(expr);
+ if (decimal.toString().length()<=8) {
+ warning(
+ "Expression could be normalized to constant '"+decimal+"'",
+ null,
+ ValidationMessageAcceptor.INSIGNIFICANT_INDEX,
+ NORMALIZABLE,
+ decimal.toString());
+ }
+ }
+
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/.classpath b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/.classpath
new file mode 100644
index 0000000..7e8449d
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="src-gen"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/.project b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/.project
new file mode 100644
index 0000000..ecee337
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.xtext.example.fowlerdsl.ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/.settings/org.eclipse.core.resources.prefs b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..99f26c0
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/META-INF/MANIFEST.MF b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..6ef8460
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,25 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.eclipse.xtext.example.fowlerdsl.ui
+Bundle-Vendor: My Company
+Bundle-Version: 1.0.0
+Bundle-SymbolicName: org.eclipse.xtext.example.fowlerdsl.ui; singleton:=true
+Bundle-ActivationPolicy: lazy
+Require-Bundle: org.eclipse.xtext.example.fowlerdsl;visibility:=reexport,
+ org.eclipse.xtext.ui,
+ org.eclipse.ui.editors;bundle-version="3.5.0",
+ org.eclipse.ui.ide;bundle-version="3.5.0",
+ org.eclipse.xtext.ui.shared,
+ org.eclipse.ui,
+ org.eclipse.xtext.builder,
+ org.antlr.runtime;bundle-version="[3.2.0,3.2.1)",
+ org.eclipse.xtext.common.types.ui,
+ org.eclipse.xtext.ui.codetemplates.ui,
+ org.eclipse.compare
+Import-Package: org.apache.log4j,
+ org.apache.commons.logging
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.eclipse.xtext.example.fowlerdsl.ui.contentassist.antlr,
+ org.eclipse.xtext.example.fowlerdsl.ui.internal,
+ org.eclipse.xtext.example.fowlerdsl.ui.contentassist
+Bundle-Activator: org.eclipse.xtext.example.fowlerdsl.ui.internal.StatemachineActivator
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/build.properties b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/build.properties
new file mode 100644
index 0000000..e10dcce
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/build.properties
@@ -0,0 +1,5 @@
+source.. = src/,\
+ src-gen/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml
\ No newline at end of file
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/plugin.xml b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/plugin.xml
new file mode 100644
index 0000000..e91cf1e
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/plugin.xml
@@ -0,0 +1,323 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<plugin>
+
+ <extension
+ point="org.eclipse.ui.editors">
+ <editor
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.ui.editor.XtextEditor"
+ contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
+ default="true"
+ extensions="statemachine"
+ id="org.eclipse.xtext.example.fowlerdsl.Statemachine"
+ name="Statemachine Editor">
+ </editor>
+ </extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclarationHandler"
+ commandId="org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclaration">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.xtext.example.fowlerdsl.Statemachine.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ <handler
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.ui.editor.handler.ValidateActionHandler"
+ commandId="org.eclipse.xtext.example.fowlerdsl.Statemachine.validate">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.xtext.example.fowlerdsl.Statemachine.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.eclipse.xtext.example.fowlerdsl.Statemachine.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName"
+ value="org.eclipse.xtext.example.fowlerdsl.Statemachine"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
+ id="org.eclipse.xtext.example.fowlerdsl.Statemachine"
+ name="Statemachine">
+ <keywordReference id="org.eclipse.xtext.example.fowlerdsl.ui.keyword_Statemachine"/>
+ </page>
+ <page
+ category="org.eclipse.xtext.example.fowlerdsl.Statemachine"
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.ui.editor.syntaxcoloring.SyntaxColoringPreferencePage"
+ id="org.eclipse.xtext.example.fowlerdsl.Statemachine.coloring"
+ name="Syntax Coloring">
+ <keywordReference id="org.eclipse.xtext.example.fowlerdsl.ui.keyword_Statemachine"/>
+ </page>
+ <page
+ category="org.eclipse.xtext.example.fowlerdsl.Statemachine"
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.ui.editor.templates.XtextTemplatePreferencePage"
+ id="org.eclipse.xtext.example.fowlerdsl.Statemachine.templates"
+ name="Templates">
+ <keywordReference id="org.eclipse.xtext.example.fowlerdsl.ui.keyword_Statemachine"/>
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.ui.propertyPages">
+ <page
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
+ id="org.eclipse.xtext.example.fowlerdsl.Statemachine"
+ name="Statemachine">
+ <keywordReference id="org.eclipse.xtext.example.fowlerdsl.ui.keyword_Statemachine"/>
+ <enabledWhen>
+ <adapt type="org.eclipse.core.resources.IProject"/>
+ </enabledWhen>
+ <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/>
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.ui.keywords">
+ <keyword
+ id="org.eclipse.xtext.example.fowlerdsl.ui.keyword_Statemachine"
+ label="Statemachine"/>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ description="Trigger expensive validation"
+ id="org.eclipse.xtext.example.fowlerdsl.Statemachine.validate"
+ name="Validate">
+ </command>
+ </extension>
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="popup:#TextEditorContext?after=group.edit">
+ <command
+ commandId="org.eclipse.xtext.example.fowlerdsl.Statemachine.validate"
+ style="push"
+ tooltip="Trigger expensive validation">
+ <visibleWhen checkEnabled="false">
+ <reference
+ definitionId="org.eclipse.xtext.example.fowlerdsl.Statemachine.Editor.opened">
+ </reference>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution locationURI="popup:#TextEditorContext?endof=group.find">
+ <command commandId="org.eclipse.xtext.ui.editor.FindReferences">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="org.eclipse.xtext.example.fowlerdsl.Statemachine.Editor.opened">
+ </reference>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <extension point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.ui.editor.findrefs.FindReferencesHandler"
+ commandId="org.eclipse.xtext.ui.editor.FindReferences">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.xtext.example.fowlerdsl.Statemachine.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+
+<!-- adding resource factories -->
+
+ <extension
+ point="org.eclipse.emf.ecore.extension_parser">
+ <parser
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.resource.IResourceFactory"
+ type="statemachine">
+ </parser>
+ </extension>
+ <extension point="org.eclipse.xtext.extension_resourceServiceProvider">
+ <resourceServiceProvider
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.ui.resource.IResourceUIServiceProvider"
+ uriExtension="statemachine">
+ </resourceServiceProvider>
+ </extension>
+
+
+ <!-- marker definitions for org.eclipse.xtext.example.fowlerdsl.Statemachine -->
+ <extension
+ id="statemachine.check.fast"
+ name="Statemachine Problem"
+ point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.xtext.ui.check.fast"/>
+ <persistent value="true"/>
+ </extension>
+ <extension
+ id="statemachine.check.normal"
+ name="Statemachine Problem"
+ point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.xtext.ui.check.normal"/>
+ <persistent value="true"/>
+ </extension>
+ <extension
+ id="statemachine.check.expensive"
+ name="Statemachine Problem"
+ point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.xtext.ui.check.expensive"/>
+ <persistent value="true"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.xtext.builder.participant">
+ <participant
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.builder.IXtextBuilderParticipant">
+ </participant>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ category="org.eclipse.xtext.example.fowlerdsl.Statemachine"
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage"
+ id="org.eclipse.xtext.example.fowlerdsl.Statemachine.compiler.preferencePage"
+ name="Compiler">
+ <keywordReference id="org.eclipse.xtext.example.fowlerdsl.ui.keyword_Statemachine"/>
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.ui.propertyPages">
+ <page
+ category="org.eclipse.xtext.example.fowlerdsl.Statemachine"
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage"
+ id="org.eclipse.xtext.example.fowlerdsl.Statemachine.compiler.propertyPage"
+ name="Compiler">
+ <keywordReference id="org.eclipse.xtext.example.fowlerdsl.ui.keyword_Statemachine"/>
+ <enabledWhen>
+ <adapt type="org.eclipse.core.resources.IProject"/>
+ </enabledWhen>
+ <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/>
+ </page>
+ </extension>
+
+ <!-- Quick Outline -->
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.ui.editor.outline.quickoutline.ShowQuickOutlineActionHandler"
+ commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.xtext.example.fowlerdsl.Statemachine.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ description="Open the quick outline."
+ id="org.eclipse.xtext.ui.editor.outline.QuickOutline"
+ name="Quick Outline">
+ </command>
+ </extension>
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="popup:#TextEditorContext?after=group.open">
+ <command commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline"
+ style="push"
+ tooltip="Open Quick Outline">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="org.eclipse.xtext.example.fowlerdsl.Statemachine.Editor.opened"/>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <!-- quickfix marker resolution generator for org.eclipse.xtext.example.fowlerdsl.Statemachine -->
+ <extension
+ point="org.eclipse.ui.ide.markerResolution">
+ <markerResolutionGenerator
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
+ markerType="org.eclipse.xtext.example.fowlerdsl.ui.statemachine.check.fast">
+ <attribute
+ name="FIXABLE_KEY"
+ value="true">
+ </attribute>
+ </markerResolutionGenerator>
+ <markerResolutionGenerator
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
+ markerType="org.eclipse.xtext.example.fowlerdsl.ui.statemachine.check.normal">
+ <attribute
+ name="FIXABLE_KEY"
+ value="true">
+ </attribute>
+ </markerResolutionGenerator>
+ <markerResolutionGenerator
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
+ markerType="org.eclipse.xtext.example.fowlerdsl.ui.statemachine.check.expensive">
+ <attribute
+ name="FIXABLE_KEY"
+ value="true">
+ </attribute>
+ </markerResolutionGenerator>
+ </extension>
+ <!-- Rename Refactoring -->
+ <extension point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.IRenameElementHandler"
+ commandId="org.eclipse.xtext.ui.refactoring.RenameElement">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.xtext.example.fowlerdsl.Statemachine.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="popup:#TextEditorContext?after=group.edit">
+ <command commandId="org.eclipse.xtext.ui.refactoring.RenameElement"
+ style="push">
+ <visibleWhen checkEnabled="false">
+ <reference
+ definitionId="org.eclipse.xtext.example.fowlerdsl.Statemachine.Editor.opened">
+ </reference>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <extension point="org.eclipse.ui.preferencePages">
+ <page
+ category="org.eclipse.xtext.example.fowlerdsl.Statemachine"
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.RefactoringPreferencePage"
+ id="org.eclipse.xtext.example.fowlerdsl.Statemachine.refactoring"
+ name="Refactoring">
+ <keywordReference id="org.eclipse.xtext.example.fowlerdsl.ui.keyword_Statemachine"/>
+ </page>
+ </extension>
+
+ <extension point="org.eclipse.compare.contentViewers">
+ <viewer id="org.eclipse.xtext.example.fowlerdsl.Statemachine.compare.contentViewers"
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator"
+ extensions="statemachine">
+ </viewer>
+ </extension>
+ <extension point="org.eclipse.compare.contentMergeViewers">
+ <viewer id="org.eclipse.xtext.example.fowlerdsl.Statemachine.compare.contentMergeViewers"
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator"
+ extensions="statemachine" label="Statemachine Compare">
+ </viewer>
+ </extension>
+ <extension point="org.eclipse.ui.editors.documentProviders">
+ <provider id="org.eclipse.xtext.example.fowlerdsl.Statemachine.editors.documentProviders"
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.ui.editor.model.XtextDocumentProvider"
+ extensions="statemachine">
+ </provider>
+ </extension>
+
+</plugin>
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/plugin.xml_gen b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/plugin.xml_gen
new file mode 100644
index 0000000..e91cf1e
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/plugin.xml_gen
@@ -0,0 +1,323 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<plugin>
+
+ <extension
+ point="org.eclipse.ui.editors">
+ <editor
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.ui.editor.XtextEditor"
+ contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
+ default="true"
+ extensions="statemachine"
+ id="org.eclipse.xtext.example.fowlerdsl.Statemachine"
+ name="Statemachine Editor">
+ </editor>
+ </extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclarationHandler"
+ commandId="org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclaration">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.xtext.example.fowlerdsl.Statemachine.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ <handler
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.ui.editor.handler.ValidateActionHandler"
+ commandId="org.eclipse.xtext.example.fowlerdsl.Statemachine.validate">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.xtext.example.fowlerdsl.Statemachine.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.eclipse.xtext.example.fowlerdsl.Statemachine.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName"
+ value="org.eclipse.xtext.example.fowlerdsl.Statemachine"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
+ id="org.eclipse.xtext.example.fowlerdsl.Statemachine"
+ name="Statemachine">
+ <keywordReference id="org.eclipse.xtext.example.fowlerdsl.ui.keyword_Statemachine"/>
+ </page>
+ <page
+ category="org.eclipse.xtext.example.fowlerdsl.Statemachine"
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.ui.editor.syntaxcoloring.SyntaxColoringPreferencePage"
+ id="org.eclipse.xtext.example.fowlerdsl.Statemachine.coloring"
+ name="Syntax Coloring">
+ <keywordReference id="org.eclipse.xtext.example.fowlerdsl.ui.keyword_Statemachine"/>
+ </page>
+ <page
+ category="org.eclipse.xtext.example.fowlerdsl.Statemachine"
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.ui.editor.templates.XtextTemplatePreferencePage"
+ id="org.eclipse.xtext.example.fowlerdsl.Statemachine.templates"
+ name="Templates">
+ <keywordReference id="org.eclipse.xtext.example.fowlerdsl.ui.keyword_Statemachine"/>
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.ui.propertyPages">
+ <page
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
+ id="org.eclipse.xtext.example.fowlerdsl.Statemachine"
+ name="Statemachine">
+ <keywordReference id="org.eclipse.xtext.example.fowlerdsl.ui.keyword_Statemachine"/>
+ <enabledWhen>
+ <adapt type="org.eclipse.core.resources.IProject"/>
+ </enabledWhen>
+ <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/>
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.ui.keywords">
+ <keyword
+ id="org.eclipse.xtext.example.fowlerdsl.ui.keyword_Statemachine"
+ label="Statemachine"/>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ description="Trigger expensive validation"
+ id="org.eclipse.xtext.example.fowlerdsl.Statemachine.validate"
+ name="Validate">
+ </command>
+ </extension>
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="popup:#TextEditorContext?after=group.edit">
+ <command
+ commandId="org.eclipse.xtext.example.fowlerdsl.Statemachine.validate"
+ style="push"
+ tooltip="Trigger expensive validation">
+ <visibleWhen checkEnabled="false">
+ <reference
+ definitionId="org.eclipse.xtext.example.fowlerdsl.Statemachine.Editor.opened">
+ </reference>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution locationURI="popup:#TextEditorContext?endof=group.find">
+ <command commandId="org.eclipse.xtext.ui.editor.FindReferences">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="org.eclipse.xtext.example.fowlerdsl.Statemachine.Editor.opened">
+ </reference>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <extension point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.ui.editor.findrefs.FindReferencesHandler"
+ commandId="org.eclipse.xtext.ui.editor.FindReferences">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.xtext.example.fowlerdsl.Statemachine.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+
+<!-- adding resource factories -->
+
+ <extension
+ point="org.eclipse.emf.ecore.extension_parser">
+ <parser
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.resource.IResourceFactory"
+ type="statemachine">
+ </parser>
+ </extension>
+ <extension point="org.eclipse.xtext.extension_resourceServiceProvider">
+ <resourceServiceProvider
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.ui.resource.IResourceUIServiceProvider"
+ uriExtension="statemachine">
+ </resourceServiceProvider>
+ </extension>
+
+
+ <!-- marker definitions for org.eclipse.xtext.example.fowlerdsl.Statemachine -->
+ <extension
+ id="statemachine.check.fast"
+ name="Statemachine Problem"
+ point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.xtext.ui.check.fast"/>
+ <persistent value="true"/>
+ </extension>
+ <extension
+ id="statemachine.check.normal"
+ name="Statemachine Problem"
+ point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.xtext.ui.check.normal"/>
+ <persistent value="true"/>
+ </extension>
+ <extension
+ id="statemachine.check.expensive"
+ name="Statemachine Problem"
+ point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.xtext.ui.check.expensive"/>
+ <persistent value="true"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.xtext.builder.participant">
+ <participant
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.builder.IXtextBuilderParticipant">
+ </participant>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ category="org.eclipse.xtext.example.fowlerdsl.Statemachine"
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage"
+ id="org.eclipse.xtext.example.fowlerdsl.Statemachine.compiler.preferencePage"
+ name="Compiler">
+ <keywordReference id="org.eclipse.xtext.example.fowlerdsl.ui.keyword_Statemachine"/>
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.ui.propertyPages">
+ <page
+ category="org.eclipse.xtext.example.fowlerdsl.Statemachine"
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage"
+ id="org.eclipse.xtext.example.fowlerdsl.Statemachine.compiler.propertyPage"
+ name="Compiler">
+ <keywordReference id="org.eclipse.xtext.example.fowlerdsl.ui.keyword_Statemachine"/>
+ <enabledWhen>
+ <adapt type="org.eclipse.core.resources.IProject"/>
+ </enabledWhen>
+ <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/>
+ </page>
+ </extension>
+
+ <!-- Quick Outline -->
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.ui.editor.outline.quickoutline.ShowQuickOutlineActionHandler"
+ commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.xtext.example.fowlerdsl.Statemachine.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ description="Open the quick outline."
+ id="org.eclipse.xtext.ui.editor.outline.QuickOutline"
+ name="Quick Outline">
+ </command>
+ </extension>
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="popup:#TextEditorContext?after=group.open">
+ <command commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline"
+ style="push"
+ tooltip="Open Quick Outline">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="org.eclipse.xtext.example.fowlerdsl.Statemachine.Editor.opened"/>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <!-- quickfix marker resolution generator for org.eclipse.xtext.example.fowlerdsl.Statemachine -->
+ <extension
+ point="org.eclipse.ui.ide.markerResolution">
+ <markerResolutionGenerator
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
+ markerType="org.eclipse.xtext.example.fowlerdsl.ui.statemachine.check.fast">
+ <attribute
+ name="FIXABLE_KEY"
+ value="true">
+ </attribute>
+ </markerResolutionGenerator>
+ <markerResolutionGenerator
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
+ markerType="org.eclipse.xtext.example.fowlerdsl.ui.statemachine.check.normal">
+ <attribute
+ name="FIXABLE_KEY"
+ value="true">
+ </attribute>
+ </markerResolutionGenerator>
+ <markerResolutionGenerator
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
+ markerType="org.eclipse.xtext.example.fowlerdsl.ui.statemachine.check.expensive">
+ <attribute
+ name="FIXABLE_KEY"
+ value="true">
+ </attribute>
+ </markerResolutionGenerator>
+ </extension>
+ <!-- Rename Refactoring -->
+ <extension point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.IRenameElementHandler"
+ commandId="org.eclipse.xtext.ui.refactoring.RenameElement">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.xtext.example.fowlerdsl.Statemachine.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="popup:#TextEditorContext?after=group.edit">
+ <command commandId="org.eclipse.xtext.ui.refactoring.RenameElement"
+ style="push">
+ <visibleWhen checkEnabled="false">
+ <reference
+ definitionId="org.eclipse.xtext.example.fowlerdsl.Statemachine.Editor.opened">
+ </reference>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <extension point="org.eclipse.ui.preferencePages">
+ <page
+ category="org.eclipse.xtext.example.fowlerdsl.Statemachine"
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.RefactoringPreferencePage"
+ id="org.eclipse.xtext.example.fowlerdsl.Statemachine.refactoring"
+ name="Refactoring">
+ <keywordReference id="org.eclipse.xtext.example.fowlerdsl.ui.keyword_Statemachine"/>
+ </page>
+ </extension>
+
+ <extension point="org.eclipse.compare.contentViewers">
+ <viewer id="org.eclipse.xtext.example.fowlerdsl.Statemachine.compare.contentViewers"
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator"
+ extensions="statemachine">
+ </viewer>
+ </extension>
+ <extension point="org.eclipse.compare.contentMergeViewers">
+ <viewer id="org.eclipse.xtext.example.fowlerdsl.Statemachine.compare.contentMergeViewers"
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator"
+ extensions="statemachine" label="Statemachine Compare">
+ </viewer>
+ </extension>
+ <extension point="org.eclipse.ui.editors.documentProviders">
+ <provider id="org.eclipse.xtext.example.fowlerdsl.Statemachine.editors.documentProviders"
+ class="org.eclipse.xtext.example.fowlerdsl.ui.StatemachineExecutableExtensionFactory:org.eclipse.xtext.ui.editor.model.XtextDocumentProvider"
+ extensions="statemachine">
+ </provider>
+ </extension>
+
+</plugin>
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/AbstractStatemachineUiModule.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/AbstractStatemachineUiModule.java
new file mode 100644
index 0000000..64f21fe
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/AbstractStatemachineUiModule.java
@@ -0,0 +1,242 @@
+
+/*
+ * generated by Xtext
+ */
+package org.eclipse.xtext.example.fowlerdsl.ui;
+
+import org.eclipse.xtext.ui.DefaultUiModule;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+/**
+ * Manual modifications go to {org.eclipse.xtext.example.fowlerdsl.ui.StatemachineUiModule}
+ */
+@SuppressWarnings("all")
+public abstract class AbstractStatemachineUiModule extends DefaultUiModule {
+
+ public AbstractStatemachineUiModule(AbstractUIPlugin plugin) {
+ super(plugin);
+ }
+
+
+ // contributed by org.eclipse.xtext.ui.generator.ImplicitUiFragment
+ public com.google.inject.Provider<org.eclipse.xtext.resource.containers.IAllContainersState> provideIAllContainersState() {
+ return org.eclipse.xtext.ui.shared.Access.getJavaProjectsState();
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.contentassist.IProposalConflictHelper> bindIProposalConflictHelper() {
+ return org.eclipse.xtext.ui.editor.contentassist.antlr.AntlrProposalConflictHelper.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
+ public void configureHighlightingLexer(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.parser.antlr.Lexer.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.ui.LexerUIBindings.HIGHLIGHTING)).to(org.eclipse.xtext.example.fowlerdsl.parser.antlr.internal.InternalStatemachineLexer.class);
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
+ public void configureHighlightingTokenDefProvider(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.parser.antlr.ITokenDefProvider.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.ui.LexerUIBindings.HIGHLIGHTING)).to(org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider.class);
+ }
+
+ // contributed by org.eclipse.xtext.generator.exporting.QualifiedNamesFragment
+ public Class<? extends org.eclipse.xtext.ui.refactoring.IDependentElementsCalculator> bindIDependentElementsCalculator() {
+ return org.eclipse.xtext.ui.refactoring.impl.DefaultDependentElementsCalculator.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
+ public void configureIResourceDescriptionsBuilderScope(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.resource.IResourceDescriptions.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.resource.impl.ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE)).to(org.eclipse.xtext.builder.clustering.CurrentDescriptions.ResourceSetAware.class);
+ }
+
+ // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.IXtextEditorCallback> bindIXtextEditorCallback() {
+ return org.eclipse.xtext.builder.nature.NatureAddingEditorCallback.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
+ public void configureIResourceDescriptionsPersisted(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.resource.IResourceDescriptions.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.builder.impl.PersistentDataAwareDirtyResource.PERSISTED_DESCRIPTIONS)).to(org.eclipse.xtext.builder.builderState.IBuilderState.class);
+ }
+
+ // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.DocumentBasedDirtyResource> bindDocumentBasedDirtyResource() {
+ return org.eclipse.xtext.builder.impl.PersistentDataAwareDirtyResource.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.generator.GeneratorFragment
+ public Class<? extends org.eclipse.xtext.builder.IXtextBuilderParticipant> bindIXtextBuilderParticipant() {
+ return org.eclipse.xtext.builder.BuilderParticipant.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.generator.GeneratorFragment
+ public org.eclipse.core.resources.IWorkspaceRoot bindIWorkspaceRootToInstance() {
+ return org.eclipse.core.resources.ResourcesPlugin.getWorkspace().getRoot();
+ }
+
+ // contributed by org.eclipse.xtext.generator.generator.GeneratorFragment
+ public void configureBuilderPreferenceStoreInitializer(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.ui.editor.preferences.IPreferenceStoreInitializer.class).annotatedWith(com.google.inject.name.Names.named("builderPreferenceInitializer")).to(org.eclipse.xtext.builder.preferences.BuilderPreferenceAccess.Initializer.class);
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.labeling.LabelProviderFragment
+ public Class<? extends org.eclipse.jface.viewers.ILabelProvider> bindILabelProvider() {
+ return org.eclipse.xtext.example.fowlerdsl.ui.labeling.StatemachineLabelProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.labeling.LabelProviderFragment
+ public void configureResourceUIServiceLabelProvider(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.jface.viewers.ILabelProvider.class).annotatedWith(org.eclipse.xtext.ui.resource.ResourceServiceDescriptionLabelProvider.class).to(org.eclipse.xtext.example.fowlerdsl.ui.labeling.StatemachineDescriptionLabelProvider.class);
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.outline.OutlineTreeProviderFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.outline.IOutlineTreeProvider> bindIOutlineTreeProvider() {
+ return org.eclipse.xtext.example.fowlerdsl.ui.outline.StatemachineOutlineTreeProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.outline.OutlineTreeProviderFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.outline.impl.IOutlineTreeStructureProvider> bindIOutlineTreeStructureProvider() {
+ return org.eclipse.xtext.example.fowlerdsl.ui.outline.StatemachineOutlineTreeProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.quickfix.QuickfixProviderFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.quickfix.IssueResolutionProvider> bindIssueResolutionProvider() {
+ return org.eclipse.xtext.example.fowlerdsl.ui.quickfix.StatemachineQuickfixProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.contentAssist.JavaBasedContentAssistFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.contentassist.IContentProposalProvider> bindIContentProposalProvider() {
+ return org.eclipse.xtext.example.fowlerdsl.ui.contentassist.StatemachineProposalProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrUiGeneratorFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext.Factory> bindContentAssistContext$Factory() {
+ return org.eclipse.xtext.ui.editor.contentassist.antlr.ParserBasedContentAssistContextFactory.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrUiGeneratorFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.contentassist.antlr.IContentAssistParser> bindIContentAssistParser() {
+ return org.eclipse.xtext.example.fowlerdsl.ui.contentassist.antlr.StatemachineParser.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrUiGeneratorFragment
+ public void configureContentAssistLexerProvider(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.example.fowlerdsl.ui.contentassist.antlr.internal.InternalStatemachineLexer.class).toProvider(org.eclipse.xtext.parser.antlr.LexerProvider.create(org.eclipse.xtext.example.fowlerdsl.ui.contentassist.antlr.internal.InternalStatemachineLexer.class));
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrUiGeneratorFragment
+ public void configureContentAssistLexer(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.ui.editor.contentassist.antlr.internal.Lexer.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.ui.LexerUIBindings.CONTENT_ASSIST)).to(org.eclipse.xtext.example.fowlerdsl.ui.contentassist.antlr.internal.InternalStatemachineLexer.class);
+ }
+
+ // contributed by org.eclipse.xtext.generator.types.TypesGeneratorFragment
+ public java.lang.ClassLoader bindClassLoaderToInstance() {
+ return getClass().getClassLoader();
+ }
+
+ // contributed by org.eclipse.xtext.generator.types.TypesGeneratorFragment
+ public Class<? extends org.eclipse.xtext.common.types.access.IJvmTypeProvider.Factory> bindIJvmTypeProvider$Factory() {
+ return org.eclipse.xtext.common.types.access.jdt.JdtTypeProviderFactory.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.types.TypesGeneratorFragment
+ public Class<? extends org.eclipse.xtext.common.types.xtext.AbstractTypeScopeProvider> bindAbstractTypeScopeProvider() {
+ return org.eclipse.xtext.common.types.xtext.ui.JdtBasedSimpleTypeScopeProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.types.TypesGeneratorFragment
+ public Class<? extends org.eclipse.xtext.common.types.xtext.ui.ITypesProposalProvider> bindITypesProposalProvider() {
+ return org.eclipse.xtext.common.types.xtext.ui.JdtTypesProposalProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.types.TypesGeneratorFragment
+ public Class<? extends org.eclipse.xtext.common.types.access.jdt.IJavaProjectProvider> bindIJavaProjectProvider() {
+ return org.eclipse.xtext.common.types.xtext.ui.XtextResourceSetBasedProjectProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.types.TypesGeneratorFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.hyperlinking.IHyperlinkHelper> bindIHyperlinkHelper() {
+ return org.eclipse.xtext.common.types.xtext.ui.TypeAwareHyperlinkHelper.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.types.TypesGeneratorFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.contentassist.PrefixMatcher> bindPrefixMatcher() {
+ return org.eclipse.xtext.ui.editor.contentassist.FQNPrefixMatcher.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.types.TypesGeneratorFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.contentassist.AbstractJavaBasedContentProposalProvider.ReferenceProposalCreator> bindAbstractJavaBasedContentProposalProvider$ReferenceProposalCreator() {
+ return org.eclipse.xtext.common.types.xtext.ui.TypeAwareReferenceProposalCreator.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.types.TypesGeneratorFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.IValidationJobScheduler> bindIValidationJobScheduler() {
+ return org.eclipse.xtext.common.types.xtext.ui.JdtValidationJobScheduler.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.types.TypesGeneratorFragment
+ public Class<? extends org.eclipse.xtext.ui.refactoring.impl.RefactoringResourceSetProvider> bindRefactoringResourceSetProvider() {
+ return org.eclipse.xtext.common.types.ui.refactoring.JvmRefactoringResourceSetProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.templates.CodetemplatesGeneratorFragment
+ public com.google.inject.Provider<org.eclipse.xtext.ui.codetemplates.ui.preferences.TemplatesLanguageConfiguration> provideTemplatesLanguageConfiguration() {
+ return org.eclipse.xtext.ui.codetemplates.ui.AccessibleCodetemplatesActivator.getTemplatesLanguageConfigurationProvider();
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.templates.CodetemplatesGeneratorFragment
+ public com.google.inject.Provider<org.eclipse.xtext.ui.codetemplates.ui.registry.LanguageRegistry> provideLanguageRegistry() {
+ return org.eclipse.xtext.ui.codetemplates.ui.AccessibleCodetemplatesActivator.getLanguageRegistry();
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.templates.CodetemplatesGeneratorFragment
+ @org.eclipse.xtext.service.SingletonBinding(eager=true) public Class<? extends org.eclipse.xtext.ui.codetemplates.ui.registry.LanguageRegistrar> bindLanguageRegistrar() {
+ return org.eclipse.xtext.ui.codetemplates.ui.registry.LanguageRegistrar.class;
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.templates.CodetemplatesGeneratorFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.templates.XtextTemplatePreferencePage> bindXtextTemplatePreferencePage() {
+ return org.eclipse.xtext.ui.codetemplates.ui.preferences.AdvancedTemplatesPreferencePage.class;
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.templates.CodetemplatesGeneratorFragment
+ public Class<? extends org.eclipse.xtext.ui.codetemplates.ui.partialEditing.IPartialContentAssistParser> bindIPartialContentAssistParser() {
+ return org.eclipse.xtext.example.fowlerdsl.ui.contentassist.antlr.PartialStatemachineContentAssistParser.class;
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.refactoring.RefactorElementNameFragment
+ public Class<? extends org.eclipse.xtext.ui.refactoring.IRenameStrategy> bindIRenameStrategy() {
+ return org.eclipse.xtext.ui.refactoring.impl.DefaultRenameStrategy.class;
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.refactoring.RefactorElementNameFragment
+ public Class<? extends org.eclipse.xtext.ui.refactoring.IReferenceUpdater> bindIReferenceUpdater() {
+ return org.eclipse.xtext.ui.refactoring.impl.DefaultReferenceUpdater.class;
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.refactoring.RefactorElementNameFragment
+ public void configureIPreferenceStoreInitializer(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.ui.editor.preferences.IPreferenceStoreInitializer.class).annotatedWith(com.google.inject.name.Names.named("RefactoringPreferences")).to(org.eclipse.xtext.ui.refactoring.ui.RefactoringPreferences.Initializer.class);
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.refactoring.RefactorElementNameFragment
+ public Class<? extends org.eclipse.xtext.ui.refactoring.IRenameRefactoringProvider> bindIRenameRefactoringProvider() {
+ return org.eclipse.xtext.ui.refactoring.impl.DefaultRenameRefactoringProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.refactoring.RefactorElementNameFragment
+ public Class<? extends org.eclipse.xtext.ui.refactoring.ui.IRenameSupport.Factory> bindIRenameSupport$Factory() {
+ return org.eclipse.xtext.ui.refactoring.ui.DefaultRenameSupport.Factory.class;
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.refactoring.RefactorElementNameFragment
+ public Class<? extends org.eclipse.xtext.ui.refactoring.ui.IRenameElementHandler> bindIRenameElementHandler() {
+ return org.eclipse.xtext.ui.refactoring.ui.DefaultRenameElementHandler.class;
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.compare.CompareFragment
+ public Class<? extends org.eclipse.compare.IViewerCreator> bindIViewerCreator() {
+ return org.eclipse.xtext.ui.compare.DefaultViewerCreator.class;
+ }
+
+
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/StatemachineExecutableExtensionFactory.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/StatemachineExecutableExtensionFactory.java
new file mode 100644
index 0000000..551cc9b
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/StatemachineExecutableExtensionFactory.java
@@ -0,0 +1,29 @@
+/*
+ * generated by Xtext
+ */
+package org.eclipse.xtext.example.fowlerdsl.ui;
+
+import org.eclipse.xtext.ui.guice.AbstractGuiceAwareExecutableExtensionFactory;
+import org.osgi.framework.Bundle;
+
+import com.google.inject.Injector;
+
+import org.eclipse.xtext.example.fowlerdsl.ui.internal.StatemachineActivator;
+
+/**
+ * This class was generated. Customizations should only happen in a newly
+ * introduced subclass.
+ */
+public class StatemachineExecutableExtensionFactory extends AbstractGuiceAwareExecutableExtensionFactory {
+
+ @Override
+ protected Bundle getBundle() {
+ return StatemachineActivator.getInstance().getBundle();
+ }
+
+ @Override
+ protected Injector getInjector() {
+ return StatemachineActivator.getInstance().getInjector(StatemachineActivator.ORG_ECLIPSE_XTEXT_EXAMPLE_FOWLERDSL_STATEMACHINE);
+ }
+
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/AbstractStatemachineProposalProvider.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/AbstractStatemachineProposalProvider.java
new file mode 100644
index 0000000..e7db390
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/AbstractStatemachineProposalProvider.java
@@ -0,0 +1,75 @@
+/*
+* generated by Xtext
+*/
+package org.eclipse.xtext.example.fowlerdsl.ui.contentassist;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.*;
+import org.eclipse.xtext.common.ui.contentassist.TerminalsProposalProvider;
+import org.eclipse.xtext.ui.editor.contentassist.ICompletionProposalAcceptor;
+import org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext;
+
+/**
+ * Represents a generated, default implementation of interface {@link IProposalProvider}.
+ * Methods are dynamically dispatched on the first parameter, i.e., you can override them
+ * with a more concrete subtype.
+ */
+@SuppressWarnings("all")
+public class AbstractStatemachineProposalProvider extends TerminalsProposalProvider {
+
+ public void completeStatemachine_Events(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
+ }
+ public void completeStatemachine_ResetEvents(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ lookupCrossReference(((CrossReference)assignment.getTerminal()), context, acceptor);
+ }
+ public void completeStatemachine_Commands(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
+ }
+ public void completeStatemachine_States(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
+ }
+ public void completeEvent_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
+ }
+ public void completeEvent_Code(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
+ }
+ public void completeCommand_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
+ }
+ public void completeCommand_Code(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
+ }
+ public void completeState_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
+ }
+ public void completeState_Actions(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ lookupCrossReference(((CrossReference)assignment.getTerminal()), context, acceptor);
+ }
+ public void completeState_Transitions(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
+ }
+ public void completeTransition_Event(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ lookupCrossReference(((CrossReference)assignment.getTerminal()), context, acceptor);
+ }
+ public void completeTransition_State(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ lookupCrossReference(((CrossReference)assignment.getTerminal()), context, acceptor);
+ }
+
+ public void complete_Statemachine(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ // subclasses may override
+ }
+ public void complete_Event(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ // subclasses may override
+ }
+ public void complete_Command(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ // subclasses may override
+ }
+ public void complete_State(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ // subclasses may override
+ }
+ public void complete_Transition(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ // subclasses may override
+ }
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/PartialStatemachineContentAssistParser.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/PartialStatemachineContentAssistParser.java
new file mode 100644
index 0000000..82960ce
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/PartialStatemachineContentAssistParser.java
@@ -0,0 +1,37 @@
+/*
+ * generated by Xtext
+ */
+package org.eclipse.xtext.example.fowlerdsl.ui.contentassist.antlr;
+
+import java.util.Collection;
+import java.util.Collections;
+
+import org.eclipse.xtext.AbstractRule;
+import org.eclipse.xtext.ui.codetemplates.ui.partialEditing.IPartialContentAssistParser;
+import org.eclipse.xtext.ui.editor.contentassist.antlr.FollowElement;
+import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.AbstractInternalContentAssistParser;
+import org.eclipse.xtext.util.PolymorphicDispatcher;
+
+/**
+ * @author Sebastian Zarnekow - Initial contribution and API
+ */
+public class PartialStatemachineContentAssistParser extends StatemachineParser implements IPartialContentAssistParser {
+
+ private AbstractRule rule;
+
+ public void initializeFor(AbstractRule rule) {
+ this.rule = rule;
+ }
+
+ @Override
+ protected Collection<FollowElement> getFollowElements(AbstractInternalContentAssistParser parser) {
+ if (rule == null || rule.eIsProxy())
+ return Collections.emptyList();
+ String methodName = "entryRule" + rule.getName();
+ PolymorphicDispatcher<Collection<FollowElement>> dispatcher =
+ new PolymorphicDispatcher<Collection<FollowElement>>(methodName, 0, 0, Collections.singletonList(parser));
+ dispatcher.invoke();
+ return parser.getFollowElements();
+ }
+
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/StatemachineParser.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/StatemachineParser.java
new file mode 100644
index 0000000..8698ed2
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/StatemachineParser.java
@@ -0,0 +1,91 @@
+/*
+* generated by Xtext
+*/
+package org.eclipse.xtext.example.fowlerdsl.ui.contentassist.antlr;
+
+import java.util.Collection;
+import java.util.Map;
+import java.util.HashMap;
+
+import org.antlr.runtime.RecognitionException;
+import org.eclipse.xtext.AbstractElement;
+import org.eclipse.xtext.ui.editor.contentassist.antlr.AbstractContentAssistParser;
+import org.eclipse.xtext.ui.editor.contentassist.antlr.FollowElement;
+import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.AbstractInternalContentAssistParser;
+
+import com.google.inject.Inject;
+
+import org.eclipse.xtext.example.fowlerdsl.services.StatemachineGrammarAccess;
+
+public class StatemachineParser extends AbstractContentAssistParser {
+
+ @Inject
+ private StatemachineGrammarAccess grammarAccess;
+
+ private Map<AbstractElement, String> nameMappings;
+
+ @Override
+ protected org.eclipse.xtext.example.fowlerdsl.ui.contentassist.antlr.internal.InternalStatemachineParser createParser() {
+ org.eclipse.xtext.example.fowlerdsl.ui.contentassist.antlr.internal.InternalStatemachineParser result = new org.eclipse.xtext.example.fowlerdsl.ui.contentassist.antlr.internal.InternalStatemachineParser(null);
+ result.setGrammarAccess(grammarAccess);
+ return result;
+ }
+
+ @Override
+ protected String getRuleName(AbstractElement element) {
+ if (nameMappings == null) {
+ nameMappings = new HashMap<AbstractElement, String>() {
+ private static final long serialVersionUID = 1L;
+ {
+ put(grammarAccess.getStatemachineAccess().getGroup(), "rule__Statemachine__Group__0");
+ put(grammarAccess.getStatemachineAccess().getGroup_1(), "rule__Statemachine__Group_1__0");
+ put(grammarAccess.getStatemachineAccess().getGroup_2(), "rule__Statemachine__Group_2__0");
+ put(grammarAccess.getStatemachineAccess().getGroup_3(), "rule__Statemachine__Group_3__0");
+ put(grammarAccess.getEventAccess().getGroup(), "rule__Event__Group__0");
+ put(grammarAccess.getCommandAccess().getGroup(), "rule__Command__Group__0");
+ put(grammarAccess.getStateAccess().getGroup(), "rule__State__Group__0");
+ put(grammarAccess.getStateAccess().getGroup_2(), "rule__State__Group_2__0");
+ put(grammarAccess.getTransitionAccess().getGroup(), "rule__Transition__Group__0");
+ put(grammarAccess.getStatemachineAccess().getEventsAssignment_1_1(), "rule__Statemachine__EventsAssignment_1_1");
+ put(grammarAccess.getStatemachineAccess().getResetEventsAssignment_2_1(), "rule__Statemachine__ResetEventsAssignment_2_1");
+ put(grammarAccess.getStatemachineAccess().getCommandsAssignment_3_1(), "rule__Statemachine__CommandsAssignment_3_1");
+ put(grammarAccess.getStatemachineAccess().getStatesAssignment_4(), "rule__Statemachine__StatesAssignment_4");
+ put(grammarAccess.getEventAccess().getNameAssignment_0(), "rule__Event__NameAssignment_0");
+ put(grammarAccess.getEventAccess().getCodeAssignment_1(), "rule__Event__CodeAssignment_1");
+ put(grammarAccess.getCommandAccess().getNameAssignment_0(), "rule__Command__NameAssignment_0");
+ put(grammarAccess.getCommandAccess().getCodeAssignment_1(), "rule__Command__CodeAssignment_1");
+ put(grammarAccess.getStateAccess().getNameAssignment_1(), "rule__State__NameAssignment_1");
+ put(grammarAccess.getStateAccess().getActionsAssignment_2_2(), "rule__State__ActionsAssignment_2_2");
+ put(grammarAccess.getStateAccess().getTransitionsAssignment_3(), "rule__State__TransitionsAssignment_3");
+ put(grammarAccess.getTransitionAccess().getEventAssignment_0(), "rule__Transition__EventAssignment_0");
+ put(grammarAccess.getTransitionAccess().getStateAssignment_2(), "rule__Transition__StateAssignment_2");
+ }
+ };
+ }
+ return nameMappings.get(element);
+ }
+
+ @Override
+ protected Collection<FollowElement> getFollowElements(AbstractInternalContentAssistParser parser) {
+ try {
+ org.eclipse.xtext.example.fowlerdsl.ui.contentassist.antlr.internal.InternalStatemachineParser typedParser = (org.eclipse.xtext.example.fowlerdsl.ui.contentassist.antlr.internal.InternalStatemachineParser) parser;
+ typedParser.entryRuleStatemachine();
+ return typedParser.getFollowElements();
+ } catch(RecognitionException ex) {
+ throw new RuntimeException(ex);
+ }
+ }
+
+ @Override
+ protected String[] getInitialHiddenTokens() {
+ return new String[] { "RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT" };
+ }
+
+ public StatemachineGrammarAccess getGrammarAccess() {
+ return this.grammarAccess;
+ }
+
+ public void setGrammarAccess(StatemachineGrammarAccess grammarAccess) {
+ this.grammarAccess = grammarAccess;
+ }
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g
new file mode 100644
index 0000000..beb8a49
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g
@@ -0,0 +1,1404 @@
+/*
+* generated by Xtext
+*/
+grammar InternalStatemachine;
+
+options {
+ superClass=AbstractInternalContentAssistParser;
+
+}
+
+@lexer::header {
+package org.eclipse.xtext.example.fowlerdsl.ui.contentassist.antlr.internal;
+
+// Hack: Use our own Lexer superclass by means of import.
+// Currently there is no other way to specify the superclass for the lexer.
+import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.Lexer;
+}
+
+@parser::header {
+package org.eclipse.xtext.example.fowlerdsl.ui.contentassist.antlr.internal;
+
+import java.io.InputStream;
+import org.eclipse.xtext.*;
+import org.eclipse.xtext.parser.*;
+import org.eclipse.xtext.parser.impl.*;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens;
+import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.AbstractInternalContentAssistParser;
+import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.DFA;
+import org.eclipse.xtext.example.fowlerdsl.services.StatemachineGrammarAccess;
+
+}
+
+@parser::members {
+
+ private StatemachineGrammarAccess grammarAccess;
+
+ public void setGrammarAccess(StatemachineGrammarAccess grammarAccess) {
+ this.grammarAccess = grammarAccess;
+ }
+
+ @Override
+ protected Grammar getGrammar() {
+ return grammarAccess.getGrammar();
+ }
+
+ @Override
+ protected String getValueForTokenName(String tokenName) {
+ return tokenName;
+ }
+
+}
+
+
+
+
+// Entry rule entryRuleStatemachine
+entryRuleStatemachine
+:
+{ before(grammarAccess.getStatemachineRule()); }
+ ruleStatemachine
+{ after(grammarAccess.getStatemachineRule()); }
+ EOF
+;
+
+// Rule Statemachine
+ruleStatemachine
+ @init {
+ int stackSize = keepStackSize();
+ }
+ :
+(
+{ before(grammarAccess.getStatemachineAccess().getGroup()); }
+(rule__Statemachine__Group__0)
+{ after(grammarAccess.getStatemachineAccess().getGroup()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+// Entry rule entryRuleEvent
+entryRuleEvent
+:
+{ before(grammarAccess.getEventRule()); }
+ ruleEvent
+{ after(grammarAccess.getEventRule()); }
+ EOF
+;
+
+// Rule Event
+ruleEvent
+ @init {
+ int stackSize = keepStackSize();
+ }
+ :
+(
+{ before(grammarAccess.getEventAccess().getGroup()); }
+(rule__Event__Group__0)
+{ after(grammarAccess.getEventAccess().getGroup()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+// Entry rule entryRuleCommand
+entryRuleCommand
+:
+{ before(grammarAccess.getCommandRule()); }
+ ruleCommand
+{ after(grammarAccess.getCommandRule()); }
+ EOF
+;
+
+// Rule Command
+ruleCommand
+ @init {
+ int stackSize = keepStackSize();
+ }
+ :
+(
+{ before(grammarAccess.getCommandAccess().getGroup()); }
+(rule__Command__Group__0)
+{ after(grammarAccess.getCommandAccess().getGroup()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+// Entry rule entryRuleState
+entryRuleState
+:
+{ before(grammarAccess.getStateRule()); }
+ ruleState
+{ after(grammarAccess.getStateRule()); }
+ EOF
+;
+
+// Rule State
+ruleState
+ @init {
+ int stackSize = keepStackSize();
+ }
+ :
+(
+{ before(grammarAccess.getStateAccess().getGroup()); }
+(rule__State__Group__0)
+{ after(grammarAccess.getStateAccess().getGroup()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+// Entry rule entryRuleTransition
+entryRuleTransition
+:
+{ before(grammarAccess.getTransitionRule()); }
+ ruleTransition
+{ after(grammarAccess.getTransitionRule()); }
+ EOF
+;
+
+// Rule Transition
+ruleTransition
+ @init {
+ int stackSize = keepStackSize();
+ }
+ :
+(
+{ before(grammarAccess.getTransitionAccess().getGroup()); }
+(rule__Transition__Group__0)
+{ after(grammarAccess.getTransitionAccess().getGroup()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+
+
+
+rule__Statemachine__Group__0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Statemachine__Group__0__Impl
+ rule__Statemachine__Group__1
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Statemachine__Group__0__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getStatemachineAccess().getStatemachineAction_0()); }
+(
+
+)
+{ after(grammarAccess.getStatemachineAccess().getStatemachineAction_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__Statemachine__Group__1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Statemachine__Group__1__Impl
+ rule__Statemachine__Group__2
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Statemachine__Group__1__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getStatemachineAccess().getGroup_1()); }
+(rule__Statemachine__Group_1__0)?
+{ after(grammarAccess.getStatemachineAccess().getGroup_1()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__Statemachine__Group__2
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Statemachine__Group__2__Impl
+ rule__Statemachine__Group__3
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Statemachine__Group__2__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getStatemachineAccess().getGroup_2()); }
+(rule__Statemachine__Group_2__0)?
+{ after(grammarAccess.getStatemachineAccess().getGroup_2()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__Statemachine__Group__3
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Statemachine__Group__3__Impl
+ rule__Statemachine__Group__4
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Statemachine__Group__3__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getStatemachineAccess().getGroup_3()); }
+(rule__Statemachine__Group_3__0)?
+{ after(grammarAccess.getStatemachineAccess().getGroup_3()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__Statemachine__Group__4
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Statemachine__Group__4__Impl
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Statemachine__Group__4__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getStatemachineAccess().getStatesAssignment_4()); }
+(rule__Statemachine__StatesAssignment_4)*
+{ after(grammarAccess.getStatemachineAccess().getStatesAssignment_4()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+
+
+
+
+
+
+
+
+
+rule__Statemachine__Group_1__0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Statemachine__Group_1__0__Impl
+ rule__Statemachine__Group_1__1
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Statemachine__Group_1__0__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getStatemachineAccess().getEventsKeyword_1_0()); }
+
+ 'events'
+
+{ after(grammarAccess.getStatemachineAccess().getEventsKeyword_1_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__Statemachine__Group_1__1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Statemachine__Group_1__1__Impl
+ rule__Statemachine__Group_1__2
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Statemachine__Group_1__1__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+(
+{ before(grammarAccess.getStatemachineAccess().getEventsAssignment_1_1()); }
+(rule__Statemachine__EventsAssignment_1_1)
+{ after(grammarAccess.getStatemachineAccess().getEventsAssignment_1_1()); }
+)
+(
+{ before(grammarAccess.getStatemachineAccess().getEventsAssignment_1_1()); }
+(rule__Statemachine__EventsAssignment_1_1)*
+{ after(grammarAccess.getStatemachineAccess().getEventsAssignment_1_1()); }
+)
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__Statemachine__Group_1__2
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Statemachine__Group_1__2__Impl
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Statemachine__Group_1__2__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getStatemachineAccess().getEndKeyword_1_2()); }
+
+ 'end'
+
+{ after(grammarAccess.getStatemachineAccess().getEndKeyword_1_2()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+
+
+
+
+
+rule__Statemachine__Group_2__0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Statemachine__Group_2__0__Impl
+ rule__Statemachine__Group_2__1
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Statemachine__Group_2__0__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getStatemachineAccess().getResetEventsKeyword_2_0()); }
+
+ 'resetEvents'
+
+{ after(grammarAccess.getStatemachineAccess().getResetEventsKeyword_2_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__Statemachine__Group_2__1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Statemachine__Group_2__1__Impl
+ rule__Statemachine__Group_2__2
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Statemachine__Group_2__1__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+(
+{ before(grammarAccess.getStatemachineAccess().getResetEventsAssignment_2_1()); }
+(rule__Statemachine__ResetEventsAssignment_2_1)
+{ after(grammarAccess.getStatemachineAccess().getResetEventsAssignment_2_1()); }
+)
+(
+{ before(grammarAccess.getStatemachineAccess().getResetEventsAssignment_2_1()); }
+(rule__Statemachine__ResetEventsAssignment_2_1)*
+{ after(grammarAccess.getStatemachineAccess().getResetEventsAssignment_2_1()); }
+)
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__Statemachine__Group_2__2
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Statemachine__Group_2__2__Impl
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Statemachine__Group_2__2__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getStatemachineAccess().getEndKeyword_2_2()); }
+
+ 'end'
+
+{ after(grammarAccess.getStatemachineAccess().getEndKeyword_2_2()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+
+
+
+
+
+rule__Statemachine__Group_3__0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Statemachine__Group_3__0__Impl
+ rule__Statemachine__Group_3__1
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Statemachine__Group_3__0__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getStatemachineAccess().getCommandsKeyword_3_0()); }
+
+ 'commands'
+
+{ after(grammarAccess.getStatemachineAccess().getCommandsKeyword_3_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__Statemachine__Group_3__1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Statemachine__Group_3__1__Impl
+ rule__Statemachine__Group_3__2
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Statemachine__Group_3__1__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+(
+{ before(grammarAccess.getStatemachineAccess().getCommandsAssignment_3_1()); }
+(rule__Statemachine__CommandsAssignment_3_1)
+{ after(grammarAccess.getStatemachineAccess().getCommandsAssignment_3_1()); }
+)
+(
+{ before(grammarAccess.getStatemachineAccess().getCommandsAssignment_3_1()); }
+(rule__Statemachine__CommandsAssignment_3_1)*
+{ after(grammarAccess.getStatemachineAccess().getCommandsAssignment_3_1()); }
+)
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__Statemachine__Group_3__2
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Statemachine__Group_3__2__Impl
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Statemachine__Group_3__2__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getStatemachineAccess().getEndKeyword_3_2()); }
+
+ 'end'
+
+{ after(grammarAccess.getStatemachineAccess().getEndKeyword_3_2()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+
+
+
+
+
+rule__Event__Group__0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Event__Group__0__Impl
+ rule__Event__Group__1
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Event__Group__0__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getEventAccess().getNameAssignment_0()); }
+(rule__Event__NameAssignment_0)
+{ after(grammarAccess.getEventAccess().getNameAssignment_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__Event__Group__1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Event__Group__1__Impl
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Event__Group__1__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getEventAccess().getCodeAssignment_1()); }
+(rule__Event__CodeAssignment_1)
+{ after(grammarAccess.getEventAccess().getCodeAssignment_1()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+
+
+
+rule__Command__Group__0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Command__Group__0__Impl
+ rule__Command__Group__1
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Command__Group__0__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getCommandAccess().getNameAssignment_0()); }
+(rule__Command__NameAssignment_0)
+{ after(grammarAccess.getCommandAccess().getNameAssignment_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__Command__Group__1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Command__Group__1__Impl
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Command__Group__1__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getCommandAccess().getCodeAssignment_1()); }
+(rule__Command__CodeAssignment_1)
+{ after(grammarAccess.getCommandAccess().getCodeAssignment_1()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+
+
+
+rule__State__Group__0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__State__Group__0__Impl
+ rule__State__Group__1
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__State__Group__0__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getStateAccess().getStateKeyword_0()); }
+
+ 'state'
+
+{ after(grammarAccess.getStateAccess().getStateKeyword_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__State__Group__1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__State__Group__1__Impl
+ rule__State__Group__2
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__State__Group__1__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getStateAccess().getNameAssignment_1()); }
+(rule__State__NameAssignment_1)
+{ after(grammarAccess.getStateAccess().getNameAssignment_1()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__State__Group__2
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__State__Group__2__Impl
+ rule__State__Group__3
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__State__Group__2__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getStateAccess().getGroup_2()); }
+(rule__State__Group_2__0)?
+{ after(grammarAccess.getStateAccess().getGroup_2()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__State__Group__3
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__State__Group__3__Impl
+ rule__State__Group__4
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__State__Group__3__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getStateAccess().getTransitionsAssignment_3()); }
+(rule__State__TransitionsAssignment_3)*
+{ after(grammarAccess.getStateAccess().getTransitionsAssignment_3()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__State__Group__4
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__State__Group__4__Impl
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__State__Group__4__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getStateAccess().getEndKeyword_4()); }
+
+ 'end'
+
+{ after(grammarAccess.getStateAccess().getEndKeyword_4()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+
+
+
+
+
+
+
+
+
+rule__State__Group_2__0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__State__Group_2__0__Impl
+ rule__State__Group_2__1
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__State__Group_2__0__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getStateAccess().getActionsKeyword_2_0()); }
+
+ 'actions'
+
+{ after(grammarAccess.getStateAccess().getActionsKeyword_2_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__State__Group_2__1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__State__Group_2__1__Impl
+ rule__State__Group_2__2
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__State__Group_2__1__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getStateAccess().getLeftCurlyBracketKeyword_2_1()); }
+
+ '{'
+
+{ after(grammarAccess.getStateAccess().getLeftCurlyBracketKeyword_2_1()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__State__Group_2__2
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__State__Group_2__2__Impl
+ rule__State__Group_2__3
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__State__Group_2__2__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+(
+{ before(grammarAccess.getStateAccess().getActionsAssignment_2_2()); }
+(rule__State__ActionsAssignment_2_2)
+{ after(grammarAccess.getStateAccess().getActionsAssignment_2_2()); }
+)
+(
+{ before(grammarAccess.getStateAccess().getActionsAssignment_2_2()); }
+(rule__State__ActionsAssignment_2_2)*
+{ after(grammarAccess.getStateAccess().getActionsAssignment_2_2()); }
+)
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__State__Group_2__3
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__State__Group_2__3__Impl
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__State__Group_2__3__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getStateAccess().getRightCurlyBracketKeyword_2_3()); }
+
+ '}'
+
+{ after(grammarAccess.getStateAccess().getRightCurlyBracketKeyword_2_3()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+
+
+
+
+
+
+
+rule__Transition__Group__0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Transition__Group__0__Impl
+ rule__Transition__Group__1
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Transition__Group__0__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getTransitionAccess().getEventAssignment_0()); }
+(rule__Transition__EventAssignment_0)
+{ after(grammarAccess.getTransitionAccess().getEventAssignment_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__Transition__Group__1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Transition__Group__1__Impl
+ rule__Transition__Group__2
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Transition__Group__1__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getTransitionAccess().getEqualsSignGreaterThanSignKeyword_1()); }
+
+ '=>'
+
+{ after(grammarAccess.getTransitionAccess().getEqualsSignGreaterThanSignKeyword_1()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__Transition__Group__2
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Transition__Group__2__Impl
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Transition__Group__2__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getTransitionAccess().getStateAssignment_2()); }
+(rule__Transition__StateAssignment_2)
+{ after(grammarAccess.getTransitionAccess().getStateAssignment_2()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+
+
+
+
+
+
+rule__Statemachine__EventsAssignment_1_1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getStatemachineAccess().getEventsEventParserRuleCall_1_1_0()); }
+ ruleEvent{ after(grammarAccess.getStatemachineAccess().getEventsEventParserRuleCall_1_1_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Statemachine__ResetEventsAssignment_2_1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getStatemachineAccess().getResetEventsEventCrossReference_2_1_0()); }
+(
+{ before(grammarAccess.getStatemachineAccess().getResetEventsEventIDTerminalRuleCall_2_1_0_1()); }
+ RULE_ID{ after(grammarAccess.getStatemachineAccess().getResetEventsEventIDTerminalRuleCall_2_1_0_1()); }
+)
+{ after(grammarAccess.getStatemachineAccess().getResetEventsEventCrossReference_2_1_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Statemachine__CommandsAssignment_3_1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getStatemachineAccess().getCommandsCommandParserRuleCall_3_1_0()); }
+ ruleCommand{ after(grammarAccess.getStatemachineAccess().getCommandsCommandParserRuleCall_3_1_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Statemachine__StatesAssignment_4
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getStatemachineAccess().getStatesStateParserRuleCall_4_0()); }
+ ruleState{ after(grammarAccess.getStatemachineAccess().getStatesStateParserRuleCall_4_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Event__NameAssignment_0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getEventAccess().getNameIDTerminalRuleCall_0_0()); }
+ RULE_ID{ after(grammarAccess.getEventAccess().getNameIDTerminalRuleCall_0_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Event__CodeAssignment_1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getEventAccess().getCodeIDTerminalRuleCall_1_0()); }
+ RULE_ID{ after(grammarAccess.getEventAccess().getCodeIDTerminalRuleCall_1_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Command__NameAssignment_0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getCommandAccess().getNameIDTerminalRuleCall_0_0()); }
+ RULE_ID{ after(grammarAccess.getCommandAccess().getNameIDTerminalRuleCall_0_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Command__CodeAssignment_1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getCommandAccess().getCodeIDTerminalRuleCall_1_0()); }
+ RULE_ID{ after(grammarAccess.getCommandAccess().getCodeIDTerminalRuleCall_1_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__State__NameAssignment_1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getStateAccess().getNameIDTerminalRuleCall_1_0()); }
+ RULE_ID{ after(grammarAccess.getStateAccess().getNameIDTerminalRuleCall_1_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__State__ActionsAssignment_2_2
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getStateAccess().getActionsCommandCrossReference_2_2_0()); }
+(
+{ before(grammarAccess.getStateAccess().getActionsCommandIDTerminalRuleCall_2_2_0_1()); }
+ RULE_ID{ after(grammarAccess.getStateAccess().getActionsCommandIDTerminalRuleCall_2_2_0_1()); }
+)
+{ after(grammarAccess.getStateAccess().getActionsCommandCrossReference_2_2_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__State__TransitionsAssignment_3
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getStateAccess().getTransitionsTransitionParserRuleCall_3_0()); }
+ ruleTransition{ after(grammarAccess.getStateAccess().getTransitionsTransitionParserRuleCall_3_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Transition__EventAssignment_0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getTransitionAccess().getEventEventCrossReference_0_0()); }
+(
+{ before(grammarAccess.getTransitionAccess().getEventEventIDTerminalRuleCall_0_0_1()); }
+ RULE_ID{ after(grammarAccess.getTransitionAccess().getEventEventIDTerminalRuleCall_0_0_1()); }
+)
+{ after(grammarAccess.getTransitionAccess().getEventEventCrossReference_0_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Transition__StateAssignment_2
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getTransitionAccess().getStateStateCrossReference_2_0()); }
+(
+{ before(grammarAccess.getTransitionAccess().getStateStateIDTerminalRuleCall_2_0_1()); }
+ RULE_ID{ after(grammarAccess.getTransitionAccess().getStateStateIDTerminalRuleCall_2_0_1()); }
+)
+{ after(grammarAccess.getTransitionAccess().getStateStateCrossReference_2_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+RULE_ID : '^'? ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*;
+
+RULE_INT : ('0'..'9')+;
+
+RULE_STRING : ('"' ('\\' ('b'|'t'|'n'|'f'|'r'|'u'|'"'|'\''|'\\')|~(('\\'|'"')))* '"'|'\'' ('\\' ('b'|'t'|'n'|'f'|'r'|'u'|'"'|'\''|'\\')|~(('\\'|'\'')))* '\'');
+
+RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )*'*/';
+
+RULE_SL_COMMENT : '//' ~(('\n'|'\r'))* ('\r'? '\n')?;
+
+RULE_WS : (' '|'\t'|'\r'|'\n')+;
+
+RULE_ANY_OTHER : .;
+
+
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.tokens b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.tokens
new file mode 100644
index 0000000..c40aca9
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.tokens
@@ -0,0 +1,25 @@
+RULE_ID=4
+RULE_ANY_OTHER=10
+RULE_SL_COMMENT=8
+RULE_ML_COMMENT=7
+T__19=19
+RULE_STRING=6
+T__16=16
+T__15=15
+T__18=18
+T__17=17
+T__12=12
+T__11=11
+T__14=14
+T__13=13
+RULE_INT=5
+RULE_WS=9
+'state'=15
+'end'=12
+'}'=18
+'actions'=16
+'commands'=14
+'=>'=19
+'events'=11
+'{'=17
+'resetEvents'=13
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachineLexer.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachineLexer.java
new file mode 100644
index 0000000..08f769b
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachineLexer.java
@@ -0,0 +1,1072 @@
+package org.eclipse.xtext.example.fowlerdsl.ui.contentassist.antlr.internal;
+
+// Hack: Use our own Lexer superclass by means of import.
+// Currently there is no other way to specify the superclass for the lexer.
+import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.Lexer;
+
+
+import org.antlr.runtime.*;
+import java.util.Stack;
+import java.util.List;
+import java.util.ArrayList;
+
+@SuppressWarnings("all")
+public class InternalStatemachineLexer extends Lexer {
+ public static final int RULE_ID=4;
+ public static final int RULE_ANY_OTHER=10;
+ public static final int RULE_SL_COMMENT=8;
+ public static final int EOF=-1;
+ public static final int RULE_ML_COMMENT=7;
+ public static final int T__19=19;
+ public static final int RULE_STRING=6;
+ public static final int T__16=16;
+ public static final int T__15=15;
+ public static final int T__18=18;
+ public static final int T__17=17;
+ public static final int T__12=12;
+ public static final int T__11=11;
+ public static final int T__14=14;
+ public static final int T__13=13;
+ public static final int RULE_INT=5;
+ public static final int RULE_WS=9;
+
+ // delegates
+ // delegators
+
+ public InternalStatemachineLexer() {;}
+ public InternalStatemachineLexer(CharStream input) {
+ this(input, new RecognizerSharedState());
+ }
+ public InternalStatemachineLexer(CharStream input, RecognizerSharedState state) {
+ super(input,state);
+
+ }
+ public String getGrammarFileName() { return "../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g"; }
+
+ // $ANTLR start "T__11"
+ public final void mT__11() throws RecognitionException {
+ try {
+ int _type = T__11;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:11:7: ( 'events' )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:11:9: 'events'
+ {
+ match("events");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__11"
+
+ // $ANTLR start "T__12"
+ public final void mT__12() throws RecognitionException {
+ try {
+ int _type = T__12;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:12:7: ( 'end' )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:12:9: 'end'
+ {
+ match("end");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__12"
+
+ // $ANTLR start "T__13"
+ public final void mT__13() throws RecognitionException {
+ try {
+ int _type = T__13;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:13:7: ( 'resetEvents' )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:13:9: 'resetEvents'
+ {
+ match("resetEvents");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__13"
+
+ // $ANTLR start "T__14"
+ public final void mT__14() throws RecognitionException {
+ try {
+ int _type = T__14;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:14:7: ( 'commands' )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:14:9: 'commands'
+ {
+ match("commands");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__14"
+
+ // $ANTLR start "T__15"
+ public final void mT__15() throws RecognitionException {
+ try {
+ int _type = T__15;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:15:7: ( 'state' )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:15:9: 'state'
+ {
+ match("state");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__15"
+
+ // $ANTLR start "T__16"
+ public final void mT__16() throws RecognitionException {
+ try {
+ int _type = T__16;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:16:7: ( 'actions' )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:16:9: 'actions'
+ {
+ match("actions");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__16"
+
+ // $ANTLR start "T__17"
+ public final void mT__17() throws RecognitionException {
+ try {
+ int _type = T__17;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:17:7: ( '{' )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:17:9: '{'
+ {
+ match('{');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__17"
+
+ // $ANTLR start "T__18"
+ public final void mT__18() throws RecognitionException {
+ try {
+ int _type = T__18;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:18:7: ( '}' )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:18:9: '}'
+ {
+ match('}');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__18"
+
+ // $ANTLR start "T__19"
+ public final void mT__19() throws RecognitionException {
+ try {
+ int _type = T__19;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:19:7: ( '=>' )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:19:9: '=>'
+ {
+ match("=>");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__19"
+
+ // $ANTLR start "RULE_ID"
+ public final void mRULE_ID() throws RecognitionException {
+ try {
+ int _type = RULE_ID;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1390:9: ( ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1390:11: ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1390:11: ( '^' )?
+ int alt1=2;
+ int LA1_0 = input.LA(1);
+
+ if ( (LA1_0=='^') ) {
+ alt1=1;
+ }
+ switch (alt1) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1390:11: '^'
+ {
+ match('^');
+
+ }
+ break;
+
+ }
+
+ if ( (input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1390:40: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
+ loop2:
+ do {
+ int alt2=2;
+ int LA2_0 = input.LA(1);
+
+ if ( ((LA2_0>='0' && LA2_0<='9')||(LA2_0>='A' && LA2_0<='Z')||LA2_0=='_'||(LA2_0>='a' && LA2_0<='z')) ) {
+ alt2=1;
+ }
+
+
+ switch (alt2) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:
+ {
+ if ( (input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+
+ default :
+ break loop2;
+ }
+ } while (true);
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_ID"
+
+ // $ANTLR start "RULE_INT"
+ public final void mRULE_INT() throws RecognitionException {
+ try {
+ int _type = RULE_INT;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1392:10: ( ( '0' .. '9' )+ )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1392:12: ( '0' .. '9' )+
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1392:12: ( '0' .. '9' )+
+ int cnt3=0;
+ loop3:
+ do {
+ int alt3=2;
+ int LA3_0 = input.LA(1);
+
+ if ( ((LA3_0>='0' && LA3_0<='9')) ) {
+ alt3=1;
+ }
+
+
+ switch (alt3) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1392:13: '0' .. '9'
+ {
+ matchRange('0','9');
+
+ }
+ break;
+
+ default :
+ if ( cnt3 >= 1 ) break loop3;
+ EarlyExitException eee =
+ new EarlyExitException(3, input);
+ throw eee;
+ }
+ cnt3++;
+ } while (true);
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_INT"
+
+ // $ANTLR start "RULE_STRING"
+ public final void mRULE_STRING() throws RecognitionException {
+ try {
+ int _type = RULE_STRING;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1394:13: ( ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1394:15: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1394:15: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
+ int alt6=2;
+ int LA6_0 = input.LA(1);
+
+ if ( (LA6_0=='\"') ) {
+ alt6=1;
+ }
+ else if ( (LA6_0=='\'') ) {
+ alt6=2;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("", 6, 0, input);
+
+ throw nvae;
+ }
+ switch (alt6) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1394:16: '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"'
+ {
+ match('\"');
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1394:20: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )*
+ loop4:
+ do {
+ int alt4=3;
+ int LA4_0 = input.LA(1);
+
+ if ( (LA4_0=='\\') ) {
+ alt4=1;
+ }
+ else if ( ((LA4_0>='\u0000' && LA4_0<='!')||(LA4_0>='#' && LA4_0<='[')||(LA4_0>=']' && LA4_0<='\uFFFF')) ) {
+ alt4=2;
+ }
+
+
+ switch (alt4) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1394:21: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' )
+ {
+ match('\\');
+ if ( input.LA(1)=='\"'||input.LA(1)=='\''||input.LA(1)=='\\'||input.LA(1)=='b'||input.LA(1)=='f'||input.LA(1)=='n'||input.LA(1)=='r'||(input.LA(1)>='t' && input.LA(1)<='u') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+ case 2 :
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1394:66: ~ ( ( '\\\\' | '\"' ) )
+ {
+ if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+
+ default :
+ break loop4;
+ }
+ } while (true);
+
+ match('\"');
+
+ }
+ break;
+ case 2 :
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1394:86: '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\''
+ {
+ match('\'');
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1394:91: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )*
+ loop5:
+ do {
+ int alt5=3;
+ int LA5_0 = input.LA(1);
+
+ if ( (LA5_0=='\\') ) {
+ alt5=1;
+ }
+ else if ( ((LA5_0>='\u0000' && LA5_0<='&')||(LA5_0>='(' && LA5_0<='[')||(LA5_0>=']' && LA5_0<='\uFFFF')) ) {
+ alt5=2;
+ }
+
+
+ switch (alt5) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1394:92: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' )
+ {
+ match('\\');
+ if ( input.LA(1)=='\"'||input.LA(1)=='\''||input.LA(1)=='\\'||input.LA(1)=='b'||input.LA(1)=='f'||input.LA(1)=='n'||input.LA(1)=='r'||(input.LA(1)>='t' && input.LA(1)<='u') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+ case 2 :
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1394:137: ~ ( ( '\\\\' | '\\'' ) )
+ {
+ if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+
+ default :
+ break loop5;
+ }
+ } while (true);
+
+ match('\'');
+
+ }
+ break;
+
+ }
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_STRING"
+
+ // $ANTLR start "RULE_ML_COMMENT"
+ public final void mRULE_ML_COMMENT() throws RecognitionException {
+ try {
+ int _type = RULE_ML_COMMENT;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1396:17: ( '/*' ( options {greedy=false; } : . )* '*/' )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1396:19: '/*' ( options {greedy=false; } : . )* '*/'
+ {
+ match("/*");
+
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1396:24: ( options {greedy=false; } : . )*
+ loop7:
+ do {
+ int alt7=2;
+ int LA7_0 = input.LA(1);
+
+ if ( (LA7_0=='*') ) {
+ int LA7_1 = input.LA(2);
+
+ if ( (LA7_1=='/') ) {
+ alt7=2;
+ }
+ else if ( ((LA7_1>='\u0000' && LA7_1<='.')||(LA7_1>='0' && LA7_1<='\uFFFF')) ) {
+ alt7=1;
+ }
+
+
+ }
+ else if ( ((LA7_0>='\u0000' && LA7_0<=')')||(LA7_0>='+' && LA7_0<='\uFFFF')) ) {
+ alt7=1;
+ }
+
+
+ switch (alt7) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1396:52: .
+ {
+ matchAny();
+
+ }
+ break;
+
+ default :
+ break loop7;
+ }
+ } while (true);
+
+ match("*/");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_ML_COMMENT"
+
+ // $ANTLR start "RULE_SL_COMMENT"
+ public final void mRULE_SL_COMMENT() throws RecognitionException {
+ try {
+ int _type = RULE_SL_COMMENT;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1398:17: ( '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1398:19: '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
+ {
+ match("//");
+
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1398:24: (~ ( ( '\\n' | '\\r' ) ) )*
+ loop8:
+ do {
+ int alt8=2;
+ int LA8_0 = input.LA(1);
+
+ if ( ((LA8_0>='\u0000' && LA8_0<='\t')||(LA8_0>='\u000B' && LA8_0<='\f')||(LA8_0>='\u000E' && LA8_0<='\uFFFF')) ) {
+ alt8=1;
+ }
+
+
+ switch (alt8) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1398:24: ~ ( ( '\\n' | '\\r' ) )
+ {
+ if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFF') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+
+ default :
+ break loop8;
+ }
+ } while (true);
+
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1398:40: ( ( '\\r' )? '\\n' )?
+ int alt10=2;
+ int LA10_0 = input.LA(1);
+
+ if ( (LA10_0=='\n'||LA10_0=='\r') ) {
+ alt10=1;
+ }
+ switch (alt10) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1398:41: ( '\\r' )? '\\n'
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1398:41: ( '\\r' )?
+ int alt9=2;
+ int LA9_0 = input.LA(1);
+
+ if ( (LA9_0=='\r') ) {
+ alt9=1;
+ }
+ switch (alt9) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1398:41: '\\r'
+ {
+ match('\r');
+
+ }
+ break;
+
+ }
+
+ match('\n');
+
+ }
+ break;
+
+ }
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_SL_COMMENT"
+
+ // $ANTLR start "RULE_WS"
+ public final void mRULE_WS() throws RecognitionException {
+ try {
+ int _type = RULE_WS;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1400:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1400:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1400:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
+ int cnt11=0;
+ loop11:
+ do {
+ int alt11=2;
+ int LA11_0 = input.LA(1);
+
+ if ( ((LA11_0>='\t' && LA11_0<='\n')||LA11_0=='\r'||LA11_0==' ') ) {
+ alt11=1;
+ }
+
+
+ switch (alt11) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:
+ {
+ if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)=='\r'||input.LA(1)==' ' ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+
+ default :
+ if ( cnt11 >= 1 ) break loop11;
+ EarlyExitException eee =
+ new EarlyExitException(11, input);
+ throw eee;
+ }
+ cnt11++;
+ } while (true);
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_WS"
+
+ // $ANTLR start "RULE_ANY_OTHER"
+ public final void mRULE_ANY_OTHER() throws RecognitionException {
+ try {
+ int _type = RULE_ANY_OTHER;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1402:16: ( . )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1402:18: .
+ {
+ matchAny();
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_ANY_OTHER"
+
+ public void mTokens() throws RecognitionException {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1:8: ( T__11 | T__12 | T__13 | T__14 | T__15 | T__16 | T__17 | T__18 | T__19 | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER )
+ int alt12=16;
+ alt12 = dfa12.predict(input);
+ switch (alt12) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1:10: T__11
+ {
+ mT__11();
+
+ }
+ break;
+ case 2 :
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1:16: T__12
+ {
+ mT__12();
+
+ }
+ break;
+ case 3 :
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1:22: T__13
+ {
+ mT__13();
+
+ }
+ break;
+ case 4 :
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1:28: T__14
+ {
+ mT__14();
+
+ }
+ break;
+ case 5 :
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1:34: T__15
+ {
+ mT__15();
+
+ }
+ break;
+ case 6 :
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1:40: T__16
+ {
+ mT__16();
+
+ }
+ break;
+ case 7 :
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1:46: T__17
+ {
+ mT__17();
+
+ }
+ break;
+ case 8 :
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1:52: T__18
+ {
+ mT__18();
+
+ }
+ break;
+ case 9 :
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1:58: T__19
+ {
+ mT__19();
+
+ }
+ break;
+ case 10 :
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1:64: RULE_ID
+ {
+ mRULE_ID();
+
+ }
+ break;
+ case 11 :
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1:72: RULE_INT
+ {
+ mRULE_INT();
+
+ }
+ break;
+ case 12 :
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1:81: RULE_STRING
+ {
+ mRULE_STRING();
+
+ }
+ break;
+ case 13 :
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1:93: RULE_ML_COMMENT
+ {
+ mRULE_ML_COMMENT();
+
+ }
+ break;
+ case 14 :
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1:109: RULE_SL_COMMENT
+ {
+ mRULE_SL_COMMENT();
+
+ }
+ break;
+ case 15 :
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1:125: RULE_WS
+ {
+ mRULE_WS();
+
+ }
+ break;
+ case 16 :
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1:133: RULE_ANY_OTHER
+ {
+ mRULE_ANY_OTHER();
+
+ }
+ break;
+
+ }
+
+ }
+
+
+ protected DFA12 dfa12 = new DFA12(this);
+ static final String DFA12_eotS =
+ "\1\uffff\5\23\2\uffff\2\20\2\uffff\3\20\2\uffff\2\23\1\uffff\4\23"+
+ "\10\uffff\1\23\1\47\5\23\1\uffff\7\23\1\64\1\23\1\66\2\23\1\uffff"+
+ "\1\23\1\uffff\2\23\1\74\1\23\1\76\1\uffff\1\23\1\uffff\1\23\1\101"+
+ "\1\uffff";
+ static final String DFA12_eofS =
+ "\102\uffff";
+ static final String DFA12_minS =
+ "\1\0\1\156\1\145\1\157\1\164\1\143\2\uffff\1\76\1\101\2\uffff\2"+
+ "\0\1\52\2\uffff\1\145\1\144\1\uffff\1\163\1\155\1\141\1\164\10\uffff"+
+ "\1\156\1\60\1\145\1\155\1\164\1\151\1\164\1\uffff\1\164\1\141\1"+
+ "\145\1\157\1\163\1\105\1\156\1\60\1\156\1\60\1\166\1\144\1\uffff"+
+ "\1\163\1\uffff\1\145\1\163\1\60\1\156\1\60\1\uffff\1\164\1\uffff"+
+ "\1\163\1\60\1\uffff";
+ static final String DFA12_maxS =
+ "\1\uffff\1\166\1\145\1\157\1\164\1\143\2\uffff\1\76\1\172\2\uffff"+
+ "\2\uffff\1\57\2\uffff\1\145\1\144\1\uffff\1\163\1\155\1\141\1\164"+
+ "\10\uffff\1\156\1\172\1\145\1\155\1\164\1\151\1\164\1\uffff\1\164"+
+ "\1\141\1\145\1\157\1\163\1\105\1\156\1\172\1\156\1\172\1\166\1\144"+
+ "\1\uffff\1\163\1\uffff\1\145\1\163\1\172\1\156\1\172\1\uffff\1\164"+
+ "\1\uffff\1\163\1\172\1\uffff";
+ static final String DFA12_acceptS =
+ "\6\uffff\1\7\1\10\2\uffff\1\12\1\13\3\uffff\1\17\1\20\2\uffff\1"+
+ "\12\4\uffff\1\7\1\10\1\11\1\13\1\14\1\15\1\16\1\17\7\uffff\1\2\14"+
+ "\uffff\1\5\1\uffff\1\1\5\uffff\1\6\1\uffff\1\4\2\uffff\1\3";
+ static final String DFA12_specialS =
+ "\1\1\13\uffff\1\2\1\0\64\uffff}>";
+ static final String[] DFA12_transitionS = {
+ "\11\20\2\17\2\20\1\17\22\20\1\17\1\20\1\14\4\20\1\15\7\20\1"+
+ "\16\12\13\3\20\1\10\3\20\32\12\3\20\1\11\1\12\1\20\1\5\1\12"+
+ "\1\3\1\12\1\1\14\12\1\2\1\4\7\12\1\6\1\20\1\7\uff82\20",
+ "\1\22\7\uffff\1\21",
+ "\1\24",
+ "\1\25",
+ "\1\26",
+ "\1\27",
+ "",
+ "",
+ "\1\32",
+ "\32\23\4\uffff\1\23\1\uffff\32\23",
+ "",
+ "",
+ "\0\34",
+ "\0\34",
+ "\1\35\4\uffff\1\36",
+ "",
+ "",
+ "\1\40",
+ "\1\41",
+ "",
+ "\1\42",
+ "\1\43",
+ "\1\44",
+ "\1\45",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "\1\46",
+ "\12\23\7\uffff\32\23\4\uffff\1\23\1\uffff\32\23",
+ "\1\50",
+ "\1\51",
+ "\1\52",
+ "\1\53",
+ "\1\54",
+ "",
+ "\1\55",
+ "\1\56",
+ "\1\57",
+ "\1\60",
+ "\1\61",
+ "\1\62",
+ "\1\63",
+ "\12\23\7\uffff\32\23\4\uffff\1\23\1\uffff\32\23",
+ "\1\65",
+ "\12\23\7\uffff\32\23\4\uffff\1\23\1\uffff\32\23",
+ "\1\67",
+ "\1\70",
+ "",
+ "\1\71",
+ "",
+ "\1\72",
+ "\1\73",
+ "\12\23\7\uffff\32\23\4\uffff\1\23\1\uffff\32\23",
+ "\1\75",
+ "\12\23\7\uffff\32\23\4\uffff\1\23\1\uffff\32\23",
+ "",
+ "\1\77",
+ "",
+ "\1\100",
+ "\12\23\7\uffff\32\23\4\uffff\1\23\1\uffff\32\23",
+ ""
+ };
+
+ static final short[] DFA12_eot = DFA.unpackEncodedString(DFA12_eotS);
+ static final short[] DFA12_eof = DFA.unpackEncodedString(DFA12_eofS);
+ static final char[] DFA12_min = DFA.unpackEncodedStringToUnsignedChars(DFA12_minS);
+ static final char[] DFA12_max = DFA.unpackEncodedStringToUnsignedChars(DFA12_maxS);
+ static final short[] DFA12_accept = DFA.unpackEncodedString(DFA12_acceptS);
+ static final short[] DFA12_special = DFA.unpackEncodedString(DFA12_specialS);
+ static final short[][] DFA12_transition;
+
+ static {
+ int numStates = DFA12_transitionS.length;
+ DFA12_transition = new short[numStates][];
+ for (int i=0; i<numStates; i++) {
+ DFA12_transition[i] = DFA.unpackEncodedString(DFA12_transitionS[i]);
+ }
+ }
+
+ class DFA12 extends DFA {
+
+ public DFA12(BaseRecognizer recognizer) {
+ this.recognizer = recognizer;
+ this.decisionNumber = 12;
+ this.eot = DFA12_eot;
+ this.eof = DFA12_eof;
+ this.min = DFA12_min;
+ this.max = DFA12_max;
+ this.accept = DFA12_accept;
+ this.special = DFA12_special;
+ this.transition = DFA12_transition;
+ }
+ public String getDescription() {
+ return "1:1: Tokens : ( T__11 | T__12 | T__13 | T__14 | T__15 | T__16 | T__17 | T__18 | T__19 | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER );";
+ }
+ public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
+ IntStream input = _input;
+ int _s = s;
+ switch ( s ) {
+ case 0 :
+ int LA12_13 = input.LA(1);
+
+ s = -1;
+ if ( ((LA12_13>='\u0000' && LA12_13<='\uFFFF')) ) {s = 28;}
+
+ else s = 16;
+
+ if ( s>=0 ) return s;
+ break;
+ case 1 :
+ int LA12_0 = input.LA(1);
+
+ s = -1;
+ if ( (LA12_0=='e') ) {s = 1;}
+
+ else if ( (LA12_0=='r') ) {s = 2;}
+
+ else if ( (LA12_0=='c') ) {s = 3;}
+
+ else if ( (LA12_0=='s') ) {s = 4;}
+
+ else if ( (LA12_0=='a') ) {s = 5;}
+
+ else if ( (LA12_0=='{') ) {s = 6;}
+
+ else if ( (LA12_0=='}') ) {s = 7;}
+
+ else if ( (LA12_0=='=') ) {s = 8;}
+
+ else if ( (LA12_0=='^') ) {s = 9;}
+
+ else if ( ((LA12_0>='A' && LA12_0<='Z')||LA12_0=='_'||LA12_0=='b'||LA12_0=='d'||(LA12_0>='f' && LA12_0<='q')||(LA12_0>='t' && LA12_0<='z')) ) {s = 10;}
+
+ else if ( ((LA12_0>='0' && LA12_0<='9')) ) {s = 11;}
+
+ else if ( (LA12_0=='\"') ) {s = 12;}
+
+ else if ( (LA12_0=='\'') ) {s = 13;}
+
+ else if ( (LA12_0=='/') ) {s = 14;}
+
+ else if ( ((LA12_0>='\t' && LA12_0<='\n')||LA12_0=='\r'||LA12_0==' ') ) {s = 15;}
+
+ else if ( ((LA12_0>='\u0000' && LA12_0<='\b')||(LA12_0>='\u000B' && LA12_0<='\f')||(LA12_0>='\u000E' && LA12_0<='\u001F')||LA12_0=='!'||(LA12_0>='#' && LA12_0<='&')||(LA12_0>='(' && LA12_0<='.')||(LA12_0>=':' && LA12_0<='<')||(LA12_0>='>' && LA12_0<='@')||(LA12_0>='[' && LA12_0<=']')||LA12_0=='`'||LA12_0=='|'||(LA12_0>='~' && LA12_0<='\uFFFF')) ) {s = 16;}
+
+ if ( s>=0 ) return s;
+ break;
+ case 2 :
+ int LA12_12 = input.LA(1);
+
+ s = -1;
+ if ( ((LA12_12>='\u0000' && LA12_12<='\uFFFF')) ) {s = 28;}
+
+ else s = 16;
+
+ if ( s>=0 ) return s;
+ break;
+ }
+ NoViableAltException nvae =
+ new NoViableAltException(getDescription(), 12, _s, input);
+ error(nvae);
+ throw nvae;
+ }
+ }
+
+
+}
\ No newline at end of file
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachineParser.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachineParser.java
new file mode 100644
index 0000000..f9170da
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachineParser.java
@@ -0,0 +1,3740 @@
+package org.eclipse.xtext.example.fowlerdsl.ui.contentassist.antlr.internal;
+
+import java.io.InputStream;
+import org.eclipse.xtext.*;
+import org.eclipse.xtext.parser.*;
+import org.eclipse.xtext.parser.impl.*;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens;
+import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.AbstractInternalContentAssistParser;
+import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.DFA;
+import org.eclipse.xtext.example.fowlerdsl.services.StatemachineGrammarAccess;
+
+
+
+import org.antlr.runtime.*;
+import java.util.Stack;
+import java.util.List;
+import java.util.ArrayList;
+
+@SuppressWarnings("all")
+public class InternalStatemachineParser extends AbstractInternalContentAssistParser {
+ public static final String[] tokenNames = new String[] {
+ "<invalid>", "<EOR>", "<DOWN>", "<UP>", "RULE_ID", "RULE_INT", "RULE_STRING", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS", "RULE_ANY_OTHER", "'events'", "'end'", "'resetEvents'", "'commands'", "'state'", "'actions'", "'{'", "'}'", "'=>'"
+ };
+ public static final int RULE_ID=4;
+ public static final int RULE_ANY_OTHER=10;
+ public static final int EOF=-1;
+ public static final int RULE_SL_COMMENT=8;
+ public static final int RULE_ML_COMMENT=7;
+ public static final int T__19=19;
+ public static final int RULE_STRING=6;
+ public static final int T__16=16;
+ public static final int T__15=15;
+ public static final int T__18=18;
+ public static final int T__17=17;
+ public static final int T__12=12;
+ public static final int T__11=11;
+ public static final int T__14=14;
+ public static final int T__13=13;
+ public static final int RULE_INT=5;
+ public static final int RULE_WS=9;
+
+ // delegates
+ // delegators
+
+
+ public InternalStatemachineParser(TokenStream input) {
+ this(input, new RecognizerSharedState());
+ }
+ public InternalStatemachineParser(TokenStream input, RecognizerSharedState state) {
+ super(input, state);
+
+ }
+
+
+ public String[] getTokenNames() { return InternalStatemachineParser.tokenNames; }
+ public String getGrammarFileName() { return "../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g"; }
+
+
+
+ private StatemachineGrammarAccess grammarAccess;
+
+ public void setGrammarAccess(StatemachineGrammarAccess grammarAccess) {
+ this.grammarAccess = grammarAccess;
+ }
+
+ @Override
+ protected Grammar getGrammar() {
+ return grammarAccess.getGrammar();
+ }
+
+ @Override
+ protected String getValueForTokenName(String tokenName) {
+ return tokenName;
+ }
+
+
+
+
+ // $ANTLR start "entryRuleStatemachine"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:60:1: entryRuleStatemachine : ruleStatemachine EOF ;
+ public final void entryRuleStatemachine() throws RecognitionException {
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:61:1: ( ruleStatemachine EOF )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:62:1: ruleStatemachine EOF
+ {
+ before(grammarAccess.getStatemachineRule());
+ pushFollow(FOLLOW_ruleStatemachine_in_entryRuleStatemachine61);
+ ruleStatemachine();
+
+ state._fsp--;
+
+ after(grammarAccess.getStatemachineRule());
+ match(input,EOF,FOLLOW_EOF_in_entryRuleStatemachine68);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "entryRuleStatemachine"
+
+
+ // $ANTLR start "ruleStatemachine"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:69:1: ruleStatemachine : ( ( rule__Statemachine__Group__0 ) ) ;
+ public final void ruleStatemachine() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:73:2: ( ( ( rule__Statemachine__Group__0 ) ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:74:1: ( ( rule__Statemachine__Group__0 ) )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:74:1: ( ( rule__Statemachine__Group__0 ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:75:1: ( rule__Statemachine__Group__0 )
+ {
+ before(grammarAccess.getStatemachineAccess().getGroup());
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:76:1: ( rule__Statemachine__Group__0 )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:76:2: rule__Statemachine__Group__0
+ {
+ pushFollow(FOLLOW_rule__Statemachine__Group__0_in_ruleStatemachine94);
+ rule__Statemachine__Group__0();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getStatemachineAccess().getGroup());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "ruleStatemachine"
+
+
+ // $ANTLR start "entryRuleEvent"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:88:1: entryRuleEvent : ruleEvent EOF ;
+ public final void entryRuleEvent() throws RecognitionException {
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:89:1: ( ruleEvent EOF )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:90:1: ruleEvent EOF
+ {
+ before(grammarAccess.getEventRule());
+ pushFollow(FOLLOW_ruleEvent_in_entryRuleEvent121);
+ ruleEvent();
+
+ state._fsp--;
+
+ after(grammarAccess.getEventRule());
+ match(input,EOF,FOLLOW_EOF_in_entryRuleEvent128);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "entryRuleEvent"
+
+
+ // $ANTLR start "ruleEvent"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:97:1: ruleEvent : ( ( rule__Event__Group__0 ) ) ;
+ public final void ruleEvent() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:101:2: ( ( ( rule__Event__Group__0 ) ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:102:1: ( ( rule__Event__Group__0 ) )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:102:1: ( ( rule__Event__Group__0 ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:103:1: ( rule__Event__Group__0 )
+ {
+ before(grammarAccess.getEventAccess().getGroup());
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:104:1: ( rule__Event__Group__0 )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:104:2: rule__Event__Group__0
+ {
+ pushFollow(FOLLOW_rule__Event__Group__0_in_ruleEvent154);
+ rule__Event__Group__0();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getEventAccess().getGroup());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "ruleEvent"
+
+
+ // $ANTLR start "entryRuleCommand"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:116:1: entryRuleCommand : ruleCommand EOF ;
+ public final void entryRuleCommand() throws RecognitionException {
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:117:1: ( ruleCommand EOF )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:118:1: ruleCommand EOF
+ {
+ before(grammarAccess.getCommandRule());
+ pushFollow(FOLLOW_ruleCommand_in_entryRuleCommand181);
+ ruleCommand();
+
+ state._fsp--;
+
+ after(grammarAccess.getCommandRule());
+ match(input,EOF,FOLLOW_EOF_in_entryRuleCommand188);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "entryRuleCommand"
+
+
+ // $ANTLR start "ruleCommand"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:125:1: ruleCommand : ( ( rule__Command__Group__0 ) ) ;
+ public final void ruleCommand() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:129:2: ( ( ( rule__Command__Group__0 ) ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:130:1: ( ( rule__Command__Group__0 ) )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:130:1: ( ( rule__Command__Group__0 ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:131:1: ( rule__Command__Group__0 )
+ {
+ before(grammarAccess.getCommandAccess().getGroup());
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:132:1: ( rule__Command__Group__0 )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:132:2: rule__Command__Group__0
+ {
+ pushFollow(FOLLOW_rule__Command__Group__0_in_ruleCommand214);
+ rule__Command__Group__0();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getCommandAccess().getGroup());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "ruleCommand"
+
+
+ // $ANTLR start "entryRuleState"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:144:1: entryRuleState : ruleState EOF ;
+ public final void entryRuleState() throws RecognitionException {
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:145:1: ( ruleState EOF )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:146:1: ruleState EOF
+ {
+ before(grammarAccess.getStateRule());
+ pushFollow(FOLLOW_ruleState_in_entryRuleState241);
+ ruleState();
+
+ state._fsp--;
+
+ after(grammarAccess.getStateRule());
+ match(input,EOF,FOLLOW_EOF_in_entryRuleState248);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "entryRuleState"
+
+
+ // $ANTLR start "ruleState"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:153:1: ruleState : ( ( rule__State__Group__0 ) ) ;
+ public final void ruleState() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:157:2: ( ( ( rule__State__Group__0 ) ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:158:1: ( ( rule__State__Group__0 ) )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:158:1: ( ( rule__State__Group__0 ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:159:1: ( rule__State__Group__0 )
+ {
+ before(grammarAccess.getStateAccess().getGroup());
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:160:1: ( rule__State__Group__0 )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:160:2: rule__State__Group__0
+ {
+ pushFollow(FOLLOW_rule__State__Group__0_in_ruleState274);
+ rule__State__Group__0();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getStateAccess().getGroup());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "ruleState"
+
+
+ // $ANTLR start "entryRuleTransition"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:172:1: entryRuleTransition : ruleTransition EOF ;
+ public final void entryRuleTransition() throws RecognitionException {
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:173:1: ( ruleTransition EOF )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:174:1: ruleTransition EOF
+ {
+ before(grammarAccess.getTransitionRule());
+ pushFollow(FOLLOW_ruleTransition_in_entryRuleTransition301);
+ ruleTransition();
+
+ state._fsp--;
+
+ after(grammarAccess.getTransitionRule());
+ match(input,EOF,FOLLOW_EOF_in_entryRuleTransition308);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "entryRuleTransition"
+
+
+ // $ANTLR start "ruleTransition"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:181:1: ruleTransition : ( ( rule__Transition__Group__0 ) ) ;
+ public final void ruleTransition() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:185:2: ( ( ( rule__Transition__Group__0 ) ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:186:1: ( ( rule__Transition__Group__0 ) )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:186:1: ( ( rule__Transition__Group__0 ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:187:1: ( rule__Transition__Group__0 )
+ {
+ before(grammarAccess.getTransitionAccess().getGroup());
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:188:1: ( rule__Transition__Group__0 )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:188:2: rule__Transition__Group__0
+ {
+ pushFollow(FOLLOW_rule__Transition__Group__0_in_ruleTransition334);
+ rule__Transition__Group__0();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getTransitionAccess().getGroup());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "ruleTransition"
+
+
+ // $ANTLR start "rule__Statemachine__Group__0"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:202:1: rule__Statemachine__Group__0 : rule__Statemachine__Group__0__Impl rule__Statemachine__Group__1 ;
+ public final void rule__Statemachine__Group__0() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:206:1: ( rule__Statemachine__Group__0__Impl rule__Statemachine__Group__1 )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:207:2: rule__Statemachine__Group__0__Impl rule__Statemachine__Group__1
+ {
+ pushFollow(FOLLOW_rule__Statemachine__Group__0__Impl_in_rule__Statemachine__Group__0368);
+ rule__Statemachine__Group__0__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__Statemachine__Group__1_in_rule__Statemachine__Group__0371);
+ rule__Statemachine__Group__1();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Statemachine__Group__0"
+
+
+ // $ANTLR start "rule__Statemachine__Group__0__Impl"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:214:1: rule__Statemachine__Group__0__Impl : ( () ) ;
+ public final void rule__Statemachine__Group__0__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:218:1: ( ( () ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:219:1: ( () )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:219:1: ( () )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:220:1: ()
+ {
+ before(grammarAccess.getStatemachineAccess().getStatemachineAction_0());
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:221:1: ()
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:223:1:
+ {
+ }
+
+ after(grammarAccess.getStatemachineAccess().getStatemachineAction_0());
+
+ }
+
+
+ }
+
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Statemachine__Group__0__Impl"
+
+
+ // $ANTLR start "rule__Statemachine__Group__1"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:233:1: rule__Statemachine__Group__1 : rule__Statemachine__Group__1__Impl rule__Statemachine__Group__2 ;
+ public final void rule__Statemachine__Group__1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:237:1: ( rule__Statemachine__Group__1__Impl rule__Statemachine__Group__2 )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:238:2: rule__Statemachine__Group__1__Impl rule__Statemachine__Group__2
+ {
+ pushFollow(FOLLOW_rule__Statemachine__Group__1__Impl_in_rule__Statemachine__Group__1429);
+ rule__Statemachine__Group__1__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__Statemachine__Group__2_in_rule__Statemachine__Group__1432);
+ rule__Statemachine__Group__2();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Statemachine__Group__1"
+
+
+ // $ANTLR start "rule__Statemachine__Group__1__Impl"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:245:1: rule__Statemachine__Group__1__Impl : ( ( rule__Statemachine__Group_1__0 )? ) ;
+ public final void rule__Statemachine__Group__1__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:249:1: ( ( ( rule__Statemachine__Group_1__0 )? ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:250:1: ( ( rule__Statemachine__Group_1__0 )? )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:250:1: ( ( rule__Statemachine__Group_1__0 )? )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:251:1: ( rule__Statemachine__Group_1__0 )?
+ {
+ before(grammarAccess.getStatemachineAccess().getGroup_1());
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:252:1: ( rule__Statemachine__Group_1__0 )?
+ int alt1=2;
+ int LA1_0 = input.LA(1);
+
+ if ( (LA1_0==11) ) {
+ alt1=1;
+ }
+ switch (alt1) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:252:2: rule__Statemachine__Group_1__0
+ {
+ pushFollow(FOLLOW_rule__Statemachine__Group_1__0_in_rule__Statemachine__Group__1__Impl459);
+ rule__Statemachine__Group_1__0();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ }
+
+ after(grammarAccess.getStatemachineAccess().getGroup_1());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Statemachine__Group__1__Impl"
+
+
+ // $ANTLR start "rule__Statemachine__Group__2"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:262:1: rule__Statemachine__Group__2 : rule__Statemachine__Group__2__Impl rule__Statemachine__Group__3 ;
+ public final void rule__Statemachine__Group__2() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:266:1: ( rule__Statemachine__Group__2__Impl rule__Statemachine__Group__3 )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:267:2: rule__Statemachine__Group__2__Impl rule__Statemachine__Group__3
+ {
+ pushFollow(FOLLOW_rule__Statemachine__Group__2__Impl_in_rule__Statemachine__Group__2490);
+ rule__Statemachine__Group__2__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__Statemachine__Group__3_in_rule__Statemachine__Group__2493);
+ rule__Statemachine__Group__3();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Statemachine__Group__2"
+
+
+ // $ANTLR start "rule__Statemachine__Group__2__Impl"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:274:1: rule__Statemachine__Group__2__Impl : ( ( rule__Statemachine__Group_2__0 )? ) ;
+ public final void rule__Statemachine__Group__2__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:278:1: ( ( ( rule__Statemachine__Group_2__0 )? ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:279:1: ( ( rule__Statemachine__Group_2__0 )? )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:279:1: ( ( rule__Statemachine__Group_2__0 )? )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:280:1: ( rule__Statemachine__Group_2__0 )?
+ {
+ before(grammarAccess.getStatemachineAccess().getGroup_2());
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:281:1: ( rule__Statemachine__Group_2__0 )?
+ int alt2=2;
+ int LA2_0 = input.LA(1);
+
+ if ( (LA2_0==13) ) {
+ alt2=1;
+ }
+ switch (alt2) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:281:2: rule__Statemachine__Group_2__0
+ {
+ pushFollow(FOLLOW_rule__Statemachine__Group_2__0_in_rule__Statemachine__Group__2__Impl520);
+ rule__Statemachine__Group_2__0();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ }
+
+ after(grammarAccess.getStatemachineAccess().getGroup_2());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Statemachine__Group__2__Impl"
+
+
+ // $ANTLR start "rule__Statemachine__Group__3"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:291:1: rule__Statemachine__Group__3 : rule__Statemachine__Group__3__Impl rule__Statemachine__Group__4 ;
+ public final void rule__Statemachine__Group__3() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:295:1: ( rule__Statemachine__Group__3__Impl rule__Statemachine__Group__4 )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:296:2: rule__Statemachine__Group__3__Impl rule__Statemachine__Group__4
+ {
+ pushFollow(FOLLOW_rule__Statemachine__Group__3__Impl_in_rule__Statemachine__Group__3551);
+ rule__Statemachine__Group__3__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__Statemachine__Group__4_in_rule__Statemachine__Group__3554);
+ rule__Statemachine__Group__4();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Statemachine__Group__3"
+
+
+ // $ANTLR start "rule__Statemachine__Group__3__Impl"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:303:1: rule__Statemachine__Group__3__Impl : ( ( rule__Statemachine__Group_3__0 )? ) ;
+ public final void rule__Statemachine__Group__3__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:307:1: ( ( ( rule__Statemachine__Group_3__0 )? ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:308:1: ( ( rule__Statemachine__Group_3__0 )? )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:308:1: ( ( rule__Statemachine__Group_3__0 )? )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:309:1: ( rule__Statemachine__Group_3__0 )?
+ {
+ before(grammarAccess.getStatemachineAccess().getGroup_3());
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:310:1: ( rule__Statemachine__Group_3__0 )?
+ int alt3=2;
+ int LA3_0 = input.LA(1);
+
+ if ( (LA3_0==14) ) {
+ alt3=1;
+ }
+ switch (alt3) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:310:2: rule__Statemachine__Group_3__0
+ {
+ pushFollow(FOLLOW_rule__Statemachine__Group_3__0_in_rule__Statemachine__Group__3__Impl581);
+ rule__Statemachine__Group_3__0();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ }
+
+ after(grammarAccess.getStatemachineAccess().getGroup_3());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Statemachine__Group__3__Impl"
+
+
+ // $ANTLR start "rule__Statemachine__Group__4"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:320:1: rule__Statemachine__Group__4 : rule__Statemachine__Group__4__Impl ;
+ public final void rule__Statemachine__Group__4() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:324:1: ( rule__Statemachine__Group__4__Impl )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:325:2: rule__Statemachine__Group__4__Impl
+ {
+ pushFollow(FOLLOW_rule__Statemachine__Group__4__Impl_in_rule__Statemachine__Group__4612);
+ rule__Statemachine__Group__4__Impl();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Statemachine__Group__4"
+
+
+ // $ANTLR start "rule__Statemachine__Group__4__Impl"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:331:1: rule__Statemachine__Group__4__Impl : ( ( rule__Statemachine__StatesAssignment_4 )* ) ;
+ public final void rule__Statemachine__Group__4__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:335:1: ( ( ( rule__Statemachine__StatesAssignment_4 )* ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:336:1: ( ( rule__Statemachine__StatesAssignment_4 )* )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:336:1: ( ( rule__Statemachine__StatesAssignment_4 )* )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:337:1: ( rule__Statemachine__StatesAssignment_4 )*
+ {
+ before(grammarAccess.getStatemachineAccess().getStatesAssignment_4());
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:338:1: ( rule__Statemachine__StatesAssignment_4 )*
+ loop4:
+ do {
+ int alt4=2;
+ int LA4_0 = input.LA(1);
+
+ if ( (LA4_0==15) ) {
+ alt4=1;
+ }
+
+
+ switch (alt4) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:338:2: rule__Statemachine__StatesAssignment_4
+ {
+ pushFollow(FOLLOW_rule__Statemachine__StatesAssignment_4_in_rule__Statemachine__Group__4__Impl639);
+ rule__Statemachine__StatesAssignment_4();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ default :
+ break loop4;
+ }
+ } while (true);
+
+ after(grammarAccess.getStatemachineAccess().getStatesAssignment_4());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Statemachine__Group__4__Impl"
+
+
+ // $ANTLR start "rule__Statemachine__Group_1__0"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:358:1: rule__Statemachine__Group_1__0 : rule__Statemachine__Group_1__0__Impl rule__Statemachine__Group_1__1 ;
+ public final void rule__Statemachine__Group_1__0() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:362:1: ( rule__Statemachine__Group_1__0__Impl rule__Statemachine__Group_1__1 )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:363:2: rule__Statemachine__Group_1__0__Impl rule__Statemachine__Group_1__1
+ {
+ pushFollow(FOLLOW_rule__Statemachine__Group_1__0__Impl_in_rule__Statemachine__Group_1__0680);
+ rule__Statemachine__Group_1__0__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__Statemachine__Group_1__1_in_rule__Statemachine__Group_1__0683);
+ rule__Statemachine__Group_1__1();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Statemachine__Group_1__0"
+
+
+ // $ANTLR start "rule__Statemachine__Group_1__0__Impl"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:370:1: rule__Statemachine__Group_1__0__Impl : ( 'events' ) ;
+ public final void rule__Statemachine__Group_1__0__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:374:1: ( ( 'events' ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:375:1: ( 'events' )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:375:1: ( 'events' )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:376:1: 'events'
+ {
+ before(grammarAccess.getStatemachineAccess().getEventsKeyword_1_0());
+ match(input,11,FOLLOW_11_in_rule__Statemachine__Group_1__0__Impl711);
+ after(grammarAccess.getStatemachineAccess().getEventsKeyword_1_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Statemachine__Group_1__0__Impl"
+
+
+ // $ANTLR start "rule__Statemachine__Group_1__1"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:389:1: rule__Statemachine__Group_1__1 : rule__Statemachine__Group_1__1__Impl rule__Statemachine__Group_1__2 ;
+ public final void rule__Statemachine__Group_1__1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:393:1: ( rule__Statemachine__Group_1__1__Impl rule__Statemachine__Group_1__2 )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:394:2: rule__Statemachine__Group_1__1__Impl rule__Statemachine__Group_1__2
+ {
+ pushFollow(FOLLOW_rule__Statemachine__Group_1__1__Impl_in_rule__Statemachine__Group_1__1742);
+ rule__Statemachine__Group_1__1__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__Statemachine__Group_1__2_in_rule__Statemachine__Group_1__1745);
+ rule__Statemachine__Group_1__2();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Statemachine__Group_1__1"
+
+
+ // $ANTLR start "rule__Statemachine__Group_1__1__Impl"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:401:1: rule__Statemachine__Group_1__1__Impl : ( ( ( rule__Statemachine__EventsAssignment_1_1 ) ) ( ( rule__Statemachine__EventsAssignment_1_1 )* ) ) ;
+ public final void rule__Statemachine__Group_1__1__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:405:1: ( ( ( ( rule__Statemachine__EventsAssignment_1_1 ) ) ( ( rule__Statemachine__EventsAssignment_1_1 )* ) ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:406:1: ( ( ( rule__Statemachine__EventsAssignment_1_1 ) ) ( ( rule__Statemachine__EventsAssignment_1_1 )* ) )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:406:1: ( ( ( rule__Statemachine__EventsAssignment_1_1 ) ) ( ( rule__Statemachine__EventsAssignment_1_1 )* ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:407:1: ( ( rule__Statemachine__EventsAssignment_1_1 ) ) ( ( rule__Statemachine__EventsAssignment_1_1 )* )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:407:1: ( ( rule__Statemachine__EventsAssignment_1_1 ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:408:1: ( rule__Statemachine__EventsAssignment_1_1 )
+ {
+ before(grammarAccess.getStatemachineAccess().getEventsAssignment_1_1());
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:409:1: ( rule__Statemachine__EventsAssignment_1_1 )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:409:2: rule__Statemachine__EventsAssignment_1_1
+ {
+ pushFollow(FOLLOW_rule__Statemachine__EventsAssignment_1_1_in_rule__Statemachine__Group_1__1__Impl774);
+ rule__Statemachine__EventsAssignment_1_1();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getStatemachineAccess().getEventsAssignment_1_1());
+
+ }
+
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:412:1: ( ( rule__Statemachine__EventsAssignment_1_1 )* )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:413:1: ( rule__Statemachine__EventsAssignment_1_1 )*
+ {
+ before(grammarAccess.getStatemachineAccess().getEventsAssignment_1_1());
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:414:1: ( rule__Statemachine__EventsAssignment_1_1 )*
+ loop5:
+ do {
+ int alt5=2;
+ int LA5_0 = input.LA(1);
+
+ if ( (LA5_0==RULE_ID) ) {
+ alt5=1;
+ }
+
+
+ switch (alt5) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:414:2: rule__Statemachine__EventsAssignment_1_1
+ {
+ pushFollow(FOLLOW_rule__Statemachine__EventsAssignment_1_1_in_rule__Statemachine__Group_1__1__Impl786);
+ rule__Statemachine__EventsAssignment_1_1();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ default :
+ break loop5;
+ }
+ } while (true);
+
+ after(grammarAccess.getStatemachineAccess().getEventsAssignment_1_1());
+
+ }
+
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Statemachine__Group_1__1__Impl"
+
+
+ // $ANTLR start "rule__Statemachine__Group_1__2"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:425:1: rule__Statemachine__Group_1__2 : rule__Statemachine__Group_1__2__Impl ;
+ public final void rule__Statemachine__Group_1__2() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:429:1: ( rule__Statemachine__Group_1__2__Impl )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:430:2: rule__Statemachine__Group_1__2__Impl
+ {
+ pushFollow(FOLLOW_rule__Statemachine__Group_1__2__Impl_in_rule__Statemachine__Group_1__2819);
+ rule__Statemachine__Group_1__2__Impl();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Statemachine__Group_1__2"
+
+
+ // $ANTLR start "rule__Statemachine__Group_1__2__Impl"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:436:1: rule__Statemachine__Group_1__2__Impl : ( 'end' ) ;
+ public final void rule__Statemachine__Group_1__2__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:440:1: ( ( 'end' ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:441:1: ( 'end' )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:441:1: ( 'end' )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:442:1: 'end'
+ {
+ before(grammarAccess.getStatemachineAccess().getEndKeyword_1_2());
+ match(input,12,FOLLOW_12_in_rule__Statemachine__Group_1__2__Impl847);
+ after(grammarAccess.getStatemachineAccess().getEndKeyword_1_2());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Statemachine__Group_1__2__Impl"
+
+
+ // $ANTLR start "rule__Statemachine__Group_2__0"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:461:1: rule__Statemachine__Group_2__0 : rule__Statemachine__Group_2__0__Impl rule__Statemachine__Group_2__1 ;
+ public final void rule__Statemachine__Group_2__0() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:465:1: ( rule__Statemachine__Group_2__0__Impl rule__Statemachine__Group_2__1 )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:466:2: rule__Statemachine__Group_2__0__Impl rule__Statemachine__Group_2__1
+ {
+ pushFollow(FOLLOW_rule__Statemachine__Group_2__0__Impl_in_rule__Statemachine__Group_2__0884);
+ rule__Statemachine__Group_2__0__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__Statemachine__Group_2__1_in_rule__Statemachine__Group_2__0887);
+ rule__Statemachine__Group_2__1();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Statemachine__Group_2__0"
+
+
+ // $ANTLR start "rule__Statemachine__Group_2__0__Impl"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:473:1: rule__Statemachine__Group_2__0__Impl : ( 'resetEvents' ) ;
+ public final void rule__Statemachine__Group_2__0__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:477:1: ( ( 'resetEvents' ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:478:1: ( 'resetEvents' )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:478:1: ( 'resetEvents' )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:479:1: 'resetEvents'
+ {
+ before(grammarAccess.getStatemachineAccess().getResetEventsKeyword_2_0());
+ match(input,13,FOLLOW_13_in_rule__Statemachine__Group_2__0__Impl915);
+ after(grammarAccess.getStatemachineAccess().getResetEventsKeyword_2_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Statemachine__Group_2__0__Impl"
+
+
+ // $ANTLR start "rule__Statemachine__Group_2__1"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:492:1: rule__Statemachine__Group_2__1 : rule__Statemachine__Group_2__1__Impl rule__Statemachine__Group_2__2 ;
+ public final void rule__Statemachine__Group_2__1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:496:1: ( rule__Statemachine__Group_2__1__Impl rule__Statemachine__Group_2__2 )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:497:2: rule__Statemachine__Group_2__1__Impl rule__Statemachine__Group_2__2
+ {
+ pushFollow(FOLLOW_rule__Statemachine__Group_2__1__Impl_in_rule__Statemachine__Group_2__1946);
+ rule__Statemachine__Group_2__1__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__Statemachine__Group_2__2_in_rule__Statemachine__Group_2__1949);
+ rule__Statemachine__Group_2__2();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Statemachine__Group_2__1"
+
+
+ // $ANTLR start "rule__Statemachine__Group_2__1__Impl"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:504:1: rule__Statemachine__Group_2__1__Impl : ( ( ( rule__Statemachine__ResetEventsAssignment_2_1 ) ) ( ( rule__Statemachine__ResetEventsAssignment_2_1 )* ) ) ;
+ public final void rule__Statemachine__Group_2__1__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:508:1: ( ( ( ( rule__Statemachine__ResetEventsAssignment_2_1 ) ) ( ( rule__Statemachine__ResetEventsAssignment_2_1 )* ) ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:509:1: ( ( ( rule__Statemachine__ResetEventsAssignment_2_1 ) ) ( ( rule__Statemachine__ResetEventsAssignment_2_1 )* ) )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:509:1: ( ( ( rule__Statemachine__ResetEventsAssignment_2_1 ) ) ( ( rule__Statemachine__ResetEventsAssignment_2_1 )* ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:510:1: ( ( rule__Statemachine__ResetEventsAssignment_2_1 ) ) ( ( rule__Statemachine__ResetEventsAssignment_2_1 )* )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:510:1: ( ( rule__Statemachine__ResetEventsAssignment_2_1 ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:511:1: ( rule__Statemachine__ResetEventsAssignment_2_1 )
+ {
+ before(grammarAccess.getStatemachineAccess().getResetEventsAssignment_2_1());
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:512:1: ( rule__Statemachine__ResetEventsAssignment_2_1 )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:512:2: rule__Statemachine__ResetEventsAssignment_2_1
+ {
+ pushFollow(FOLLOW_rule__Statemachine__ResetEventsAssignment_2_1_in_rule__Statemachine__Group_2__1__Impl978);
+ rule__Statemachine__ResetEventsAssignment_2_1();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getStatemachineAccess().getResetEventsAssignment_2_1());
+
+ }
+
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:515:1: ( ( rule__Statemachine__ResetEventsAssignment_2_1 )* )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:516:1: ( rule__Statemachine__ResetEventsAssignment_2_1 )*
+ {
+ before(grammarAccess.getStatemachineAccess().getResetEventsAssignment_2_1());
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:517:1: ( rule__Statemachine__ResetEventsAssignment_2_1 )*
+ loop6:
+ do {
+ int alt6=2;
+ int LA6_0 = input.LA(1);
+
+ if ( (LA6_0==RULE_ID) ) {
+ alt6=1;
+ }
+
+
+ switch (alt6) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:517:2: rule__Statemachine__ResetEventsAssignment_2_1
+ {
+ pushFollow(FOLLOW_rule__Statemachine__ResetEventsAssignment_2_1_in_rule__Statemachine__Group_2__1__Impl990);
+ rule__Statemachine__ResetEventsAssignment_2_1();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ default :
+ break loop6;
+ }
+ } while (true);
+
+ after(grammarAccess.getStatemachineAccess().getResetEventsAssignment_2_1());
+
+ }
+
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Statemachine__Group_2__1__Impl"
+
+
+ // $ANTLR start "rule__Statemachine__Group_2__2"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:528:1: rule__Statemachine__Group_2__2 : rule__Statemachine__Group_2__2__Impl ;
+ public final void rule__Statemachine__Group_2__2() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:532:1: ( rule__Statemachine__Group_2__2__Impl )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:533:2: rule__Statemachine__Group_2__2__Impl
+ {
+ pushFollow(FOLLOW_rule__Statemachine__Group_2__2__Impl_in_rule__Statemachine__Group_2__21023);
+ rule__Statemachine__Group_2__2__Impl();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Statemachine__Group_2__2"
+
+
+ // $ANTLR start "rule__Statemachine__Group_2__2__Impl"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:539:1: rule__Statemachine__Group_2__2__Impl : ( 'end' ) ;
+ public final void rule__Statemachine__Group_2__2__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:543:1: ( ( 'end' ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:544:1: ( 'end' )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:544:1: ( 'end' )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:545:1: 'end'
+ {
+ before(grammarAccess.getStatemachineAccess().getEndKeyword_2_2());
+ match(input,12,FOLLOW_12_in_rule__Statemachine__Group_2__2__Impl1051);
+ after(grammarAccess.getStatemachineAccess().getEndKeyword_2_2());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Statemachine__Group_2__2__Impl"
+
+
+ // $ANTLR start "rule__Statemachine__Group_3__0"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:564:1: rule__Statemachine__Group_3__0 : rule__Statemachine__Group_3__0__Impl rule__Statemachine__Group_3__1 ;
+ public final void rule__Statemachine__Group_3__0() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:568:1: ( rule__Statemachine__Group_3__0__Impl rule__Statemachine__Group_3__1 )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:569:2: rule__Statemachine__Group_3__0__Impl rule__Statemachine__Group_3__1
+ {
+ pushFollow(FOLLOW_rule__Statemachine__Group_3__0__Impl_in_rule__Statemachine__Group_3__01088);
+ rule__Statemachine__Group_3__0__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__Statemachine__Group_3__1_in_rule__Statemachine__Group_3__01091);
+ rule__Statemachine__Group_3__1();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Statemachine__Group_3__0"
+
+
+ // $ANTLR start "rule__Statemachine__Group_3__0__Impl"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:576:1: rule__Statemachine__Group_3__0__Impl : ( 'commands' ) ;
+ public final void rule__Statemachine__Group_3__0__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:580:1: ( ( 'commands' ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:581:1: ( 'commands' )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:581:1: ( 'commands' )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:582:1: 'commands'
+ {
+ before(grammarAccess.getStatemachineAccess().getCommandsKeyword_3_0());
+ match(input,14,FOLLOW_14_in_rule__Statemachine__Group_3__0__Impl1119);
+ after(grammarAccess.getStatemachineAccess().getCommandsKeyword_3_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Statemachine__Group_3__0__Impl"
+
+
+ // $ANTLR start "rule__Statemachine__Group_3__1"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:595:1: rule__Statemachine__Group_3__1 : rule__Statemachine__Group_3__1__Impl rule__Statemachine__Group_3__2 ;
+ public final void rule__Statemachine__Group_3__1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:599:1: ( rule__Statemachine__Group_3__1__Impl rule__Statemachine__Group_3__2 )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:600:2: rule__Statemachine__Group_3__1__Impl rule__Statemachine__Group_3__2
+ {
+ pushFollow(FOLLOW_rule__Statemachine__Group_3__1__Impl_in_rule__Statemachine__Group_3__11150);
+ rule__Statemachine__Group_3__1__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__Statemachine__Group_3__2_in_rule__Statemachine__Group_3__11153);
+ rule__Statemachine__Group_3__2();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Statemachine__Group_3__1"
+
+
+ // $ANTLR start "rule__Statemachine__Group_3__1__Impl"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:607:1: rule__Statemachine__Group_3__1__Impl : ( ( ( rule__Statemachine__CommandsAssignment_3_1 ) ) ( ( rule__Statemachine__CommandsAssignment_3_1 )* ) ) ;
+ public final void rule__Statemachine__Group_3__1__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:611:1: ( ( ( ( rule__Statemachine__CommandsAssignment_3_1 ) ) ( ( rule__Statemachine__CommandsAssignment_3_1 )* ) ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:612:1: ( ( ( rule__Statemachine__CommandsAssignment_3_1 ) ) ( ( rule__Statemachine__CommandsAssignment_3_1 )* ) )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:612:1: ( ( ( rule__Statemachine__CommandsAssignment_3_1 ) ) ( ( rule__Statemachine__CommandsAssignment_3_1 )* ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:613:1: ( ( rule__Statemachine__CommandsAssignment_3_1 ) ) ( ( rule__Statemachine__CommandsAssignment_3_1 )* )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:613:1: ( ( rule__Statemachine__CommandsAssignment_3_1 ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:614:1: ( rule__Statemachine__CommandsAssignment_3_1 )
+ {
+ before(grammarAccess.getStatemachineAccess().getCommandsAssignment_3_1());
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:615:1: ( rule__Statemachine__CommandsAssignment_3_1 )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:615:2: rule__Statemachine__CommandsAssignment_3_1
+ {
+ pushFollow(FOLLOW_rule__Statemachine__CommandsAssignment_3_1_in_rule__Statemachine__Group_3__1__Impl1182);
+ rule__Statemachine__CommandsAssignment_3_1();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getStatemachineAccess().getCommandsAssignment_3_1());
+
+ }
+
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:618:1: ( ( rule__Statemachine__CommandsAssignment_3_1 )* )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:619:1: ( rule__Statemachine__CommandsAssignment_3_1 )*
+ {
+ before(grammarAccess.getStatemachineAccess().getCommandsAssignment_3_1());
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:620:1: ( rule__Statemachine__CommandsAssignment_3_1 )*
+ loop7:
+ do {
+ int alt7=2;
+ int LA7_0 = input.LA(1);
+
+ if ( (LA7_0==RULE_ID) ) {
+ alt7=1;
+ }
+
+
+ switch (alt7) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:620:2: rule__Statemachine__CommandsAssignment_3_1
+ {
+ pushFollow(FOLLOW_rule__Statemachine__CommandsAssignment_3_1_in_rule__Statemachine__Group_3__1__Impl1194);
+ rule__Statemachine__CommandsAssignment_3_1();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ default :
+ break loop7;
+ }
+ } while (true);
+
+ after(grammarAccess.getStatemachineAccess().getCommandsAssignment_3_1());
+
+ }
+
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Statemachine__Group_3__1__Impl"
+
+
+ // $ANTLR start "rule__Statemachine__Group_3__2"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:631:1: rule__Statemachine__Group_3__2 : rule__Statemachine__Group_3__2__Impl ;
+ public final void rule__Statemachine__Group_3__2() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:635:1: ( rule__Statemachine__Group_3__2__Impl )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:636:2: rule__Statemachine__Group_3__2__Impl
+ {
+ pushFollow(FOLLOW_rule__Statemachine__Group_3__2__Impl_in_rule__Statemachine__Group_3__21227);
+ rule__Statemachine__Group_3__2__Impl();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Statemachine__Group_3__2"
+
+
+ // $ANTLR start "rule__Statemachine__Group_3__2__Impl"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:642:1: rule__Statemachine__Group_3__2__Impl : ( 'end' ) ;
+ public final void rule__Statemachine__Group_3__2__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:646:1: ( ( 'end' ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:647:1: ( 'end' )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:647:1: ( 'end' )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:648:1: 'end'
+ {
+ before(grammarAccess.getStatemachineAccess().getEndKeyword_3_2());
+ match(input,12,FOLLOW_12_in_rule__Statemachine__Group_3__2__Impl1255);
+ after(grammarAccess.getStatemachineAccess().getEndKeyword_3_2());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Statemachine__Group_3__2__Impl"
+
+
+ // $ANTLR start "rule__Event__Group__0"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:667:1: rule__Event__Group__0 : rule__Event__Group__0__Impl rule__Event__Group__1 ;
+ public final void rule__Event__Group__0() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:671:1: ( rule__Event__Group__0__Impl rule__Event__Group__1 )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:672:2: rule__Event__Group__0__Impl rule__Event__Group__1
+ {
+ pushFollow(FOLLOW_rule__Event__Group__0__Impl_in_rule__Event__Group__01292);
+ rule__Event__Group__0__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__Event__Group__1_in_rule__Event__Group__01295);
+ rule__Event__Group__1();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Event__Group__0"
+
+
+ // $ANTLR start "rule__Event__Group__0__Impl"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:679:1: rule__Event__Group__0__Impl : ( ( rule__Event__NameAssignment_0 ) ) ;
+ public final void rule__Event__Group__0__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:683:1: ( ( ( rule__Event__NameAssignment_0 ) ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:684:1: ( ( rule__Event__NameAssignment_0 ) )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:684:1: ( ( rule__Event__NameAssignment_0 ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:685:1: ( rule__Event__NameAssignment_0 )
+ {
+ before(grammarAccess.getEventAccess().getNameAssignment_0());
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:686:1: ( rule__Event__NameAssignment_0 )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:686:2: rule__Event__NameAssignment_0
+ {
+ pushFollow(FOLLOW_rule__Event__NameAssignment_0_in_rule__Event__Group__0__Impl1322);
+ rule__Event__NameAssignment_0();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getEventAccess().getNameAssignment_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Event__Group__0__Impl"
+
+
+ // $ANTLR start "rule__Event__Group__1"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:696:1: rule__Event__Group__1 : rule__Event__Group__1__Impl ;
+ public final void rule__Event__Group__1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:700:1: ( rule__Event__Group__1__Impl )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:701:2: rule__Event__Group__1__Impl
+ {
+ pushFollow(FOLLOW_rule__Event__Group__1__Impl_in_rule__Event__Group__11352);
+ rule__Event__Group__1__Impl();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Event__Group__1"
+
+
+ // $ANTLR start "rule__Event__Group__1__Impl"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:707:1: rule__Event__Group__1__Impl : ( ( rule__Event__CodeAssignment_1 ) ) ;
+ public final void rule__Event__Group__1__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:711:1: ( ( ( rule__Event__CodeAssignment_1 ) ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:712:1: ( ( rule__Event__CodeAssignment_1 ) )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:712:1: ( ( rule__Event__CodeAssignment_1 ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:713:1: ( rule__Event__CodeAssignment_1 )
+ {
+ before(grammarAccess.getEventAccess().getCodeAssignment_1());
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:714:1: ( rule__Event__CodeAssignment_1 )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:714:2: rule__Event__CodeAssignment_1
+ {
+ pushFollow(FOLLOW_rule__Event__CodeAssignment_1_in_rule__Event__Group__1__Impl1379);
+ rule__Event__CodeAssignment_1();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getEventAccess().getCodeAssignment_1());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Event__Group__1__Impl"
+
+
+ // $ANTLR start "rule__Command__Group__0"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:728:1: rule__Command__Group__0 : rule__Command__Group__0__Impl rule__Command__Group__1 ;
+ public final void rule__Command__Group__0() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:732:1: ( rule__Command__Group__0__Impl rule__Command__Group__1 )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:733:2: rule__Command__Group__0__Impl rule__Command__Group__1
+ {
+ pushFollow(FOLLOW_rule__Command__Group__0__Impl_in_rule__Command__Group__01413);
+ rule__Command__Group__0__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__Command__Group__1_in_rule__Command__Group__01416);
+ rule__Command__Group__1();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Command__Group__0"
+
+
+ // $ANTLR start "rule__Command__Group__0__Impl"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:740:1: rule__Command__Group__0__Impl : ( ( rule__Command__NameAssignment_0 ) ) ;
+ public final void rule__Command__Group__0__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:744:1: ( ( ( rule__Command__NameAssignment_0 ) ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:745:1: ( ( rule__Command__NameAssignment_0 ) )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:745:1: ( ( rule__Command__NameAssignment_0 ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:746:1: ( rule__Command__NameAssignment_0 )
+ {
+ before(grammarAccess.getCommandAccess().getNameAssignment_0());
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:747:1: ( rule__Command__NameAssignment_0 )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:747:2: rule__Command__NameAssignment_0
+ {
+ pushFollow(FOLLOW_rule__Command__NameAssignment_0_in_rule__Command__Group__0__Impl1443);
+ rule__Command__NameAssignment_0();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getCommandAccess().getNameAssignment_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Command__Group__0__Impl"
+
+
+ // $ANTLR start "rule__Command__Group__1"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:757:1: rule__Command__Group__1 : rule__Command__Group__1__Impl ;
+ public final void rule__Command__Group__1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:761:1: ( rule__Command__Group__1__Impl )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:762:2: rule__Command__Group__1__Impl
+ {
+ pushFollow(FOLLOW_rule__Command__Group__1__Impl_in_rule__Command__Group__11473);
+ rule__Command__Group__1__Impl();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Command__Group__1"
+
+
+ // $ANTLR start "rule__Command__Group__1__Impl"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:768:1: rule__Command__Group__1__Impl : ( ( rule__Command__CodeAssignment_1 ) ) ;
+ public final void rule__Command__Group__1__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:772:1: ( ( ( rule__Command__CodeAssignment_1 ) ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:773:1: ( ( rule__Command__CodeAssignment_1 ) )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:773:1: ( ( rule__Command__CodeAssignment_1 ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:774:1: ( rule__Command__CodeAssignment_1 )
+ {
+ before(grammarAccess.getCommandAccess().getCodeAssignment_1());
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:775:1: ( rule__Command__CodeAssignment_1 )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:775:2: rule__Command__CodeAssignment_1
+ {
+ pushFollow(FOLLOW_rule__Command__CodeAssignment_1_in_rule__Command__Group__1__Impl1500);
+ rule__Command__CodeAssignment_1();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getCommandAccess().getCodeAssignment_1());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Command__Group__1__Impl"
+
+
+ // $ANTLR start "rule__State__Group__0"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:789:1: rule__State__Group__0 : rule__State__Group__0__Impl rule__State__Group__1 ;
+ public final void rule__State__Group__0() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:793:1: ( rule__State__Group__0__Impl rule__State__Group__1 )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:794:2: rule__State__Group__0__Impl rule__State__Group__1
+ {
+ pushFollow(FOLLOW_rule__State__Group__0__Impl_in_rule__State__Group__01534);
+ rule__State__Group__0__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__State__Group__1_in_rule__State__Group__01537);
+ rule__State__Group__1();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__State__Group__0"
+
+
+ // $ANTLR start "rule__State__Group__0__Impl"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:801:1: rule__State__Group__0__Impl : ( 'state' ) ;
+ public final void rule__State__Group__0__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:805:1: ( ( 'state' ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:806:1: ( 'state' )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:806:1: ( 'state' )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:807:1: 'state'
+ {
+ before(grammarAccess.getStateAccess().getStateKeyword_0());
+ match(input,15,FOLLOW_15_in_rule__State__Group__0__Impl1565);
+ after(grammarAccess.getStateAccess().getStateKeyword_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__State__Group__0__Impl"
+
+
+ // $ANTLR start "rule__State__Group__1"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:820:1: rule__State__Group__1 : rule__State__Group__1__Impl rule__State__Group__2 ;
+ public final void rule__State__Group__1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:824:1: ( rule__State__Group__1__Impl rule__State__Group__2 )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:825:2: rule__State__Group__1__Impl rule__State__Group__2
+ {
+ pushFollow(FOLLOW_rule__State__Group__1__Impl_in_rule__State__Group__11596);
+ rule__State__Group__1__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__State__Group__2_in_rule__State__Group__11599);
+ rule__State__Group__2();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__State__Group__1"
+
+
+ // $ANTLR start "rule__State__Group__1__Impl"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:832:1: rule__State__Group__1__Impl : ( ( rule__State__NameAssignment_1 ) ) ;
+ public final void rule__State__Group__1__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:836:1: ( ( ( rule__State__NameAssignment_1 ) ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:837:1: ( ( rule__State__NameAssignment_1 ) )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:837:1: ( ( rule__State__NameAssignment_1 ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:838:1: ( rule__State__NameAssignment_1 )
+ {
+ before(grammarAccess.getStateAccess().getNameAssignment_1());
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:839:1: ( rule__State__NameAssignment_1 )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:839:2: rule__State__NameAssignment_1
+ {
+ pushFollow(FOLLOW_rule__State__NameAssignment_1_in_rule__State__Group__1__Impl1626);
+ rule__State__NameAssignment_1();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getStateAccess().getNameAssignment_1());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__State__Group__1__Impl"
+
+
+ // $ANTLR start "rule__State__Group__2"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:849:1: rule__State__Group__2 : rule__State__Group__2__Impl rule__State__Group__3 ;
+ public final void rule__State__Group__2() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:853:1: ( rule__State__Group__2__Impl rule__State__Group__3 )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:854:2: rule__State__Group__2__Impl rule__State__Group__3
+ {
+ pushFollow(FOLLOW_rule__State__Group__2__Impl_in_rule__State__Group__21656);
+ rule__State__Group__2__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__State__Group__3_in_rule__State__Group__21659);
+ rule__State__Group__3();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__State__Group__2"
+
+
+ // $ANTLR start "rule__State__Group__2__Impl"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:861:1: rule__State__Group__2__Impl : ( ( rule__State__Group_2__0 )? ) ;
+ public final void rule__State__Group__2__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:865:1: ( ( ( rule__State__Group_2__0 )? ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:866:1: ( ( rule__State__Group_2__0 )? )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:866:1: ( ( rule__State__Group_2__0 )? )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:867:1: ( rule__State__Group_2__0 )?
+ {
+ before(grammarAccess.getStateAccess().getGroup_2());
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:868:1: ( rule__State__Group_2__0 )?
+ int alt8=2;
+ int LA8_0 = input.LA(1);
+
+ if ( (LA8_0==16) ) {
+ alt8=1;
+ }
+ switch (alt8) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:868:2: rule__State__Group_2__0
+ {
+ pushFollow(FOLLOW_rule__State__Group_2__0_in_rule__State__Group__2__Impl1686);
+ rule__State__Group_2__0();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ }
+
+ after(grammarAccess.getStateAccess().getGroup_2());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__State__Group__2__Impl"
+
+
+ // $ANTLR start "rule__State__Group__3"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:878:1: rule__State__Group__3 : rule__State__Group__3__Impl rule__State__Group__4 ;
+ public final void rule__State__Group__3() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:882:1: ( rule__State__Group__3__Impl rule__State__Group__4 )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:883:2: rule__State__Group__3__Impl rule__State__Group__4
+ {
+ pushFollow(FOLLOW_rule__State__Group__3__Impl_in_rule__State__Group__31717);
+ rule__State__Group__3__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__State__Group__4_in_rule__State__Group__31720);
+ rule__State__Group__4();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__State__Group__3"
+
+
+ // $ANTLR start "rule__State__Group__3__Impl"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:890:1: rule__State__Group__3__Impl : ( ( rule__State__TransitionsAssignment_3 )* ) ;
+ public final void rule__State__Group__3__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:894:1: ( ( ( rule__State__TransitionsAssignment_3 )* ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:895:1: ( ( rule__State__TransitionsAssignment_3 )* )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:895:1: ( ( rule__State__TransitionsAssignment_3 )* )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:896:1: ( rule__State__TransitionsAssignment_3 )*
+ {
+ before(grammarAccess.getStateAccess().getTransitionsAssignment_3());
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:897:1: ( rule__State__TransitionsAssignment_3 )*
+ loop9:
+ do {
+ int alt9=2;
+ int LA9_0 = input.LA(1);
+
+ if ( (LA9_0==RULE_ID) ) {
+ alt9=1;
+ }
+
+
+ switch (alt9) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:897:2: rule__State__TransitionsAssignment_3
+ {
+ pushFollow(FOLLOW_rule__State__TransitionsAssignment_3_in_rule__State__Group__3__Impl1747);
+ rule__State__TransitionsAssignment_3();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ default :
+ break loop9;
+ }
+ } while (true);
+
+ after(grammarAccess.getStateAccess().getTransitionsAssignment_3());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__State__Group__3__Impl"
+
+
+ // $ANTLR start "rule__State__Group__4"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:907:1: rule__State__Group__4 : rule__State__Group__4__Impl ;
+ public final void rule__State__Group__4() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:911:1: ( rule__State__Group__4__Impl )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:912:2: rule__State__Group__4__Impl
+ {
+ pushFollow(FOLLOW_rule__State__Group__4__Impl_in_rule__State__Group__41778);
+ rule__State__Group__4__Impl();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__State__Group__4"
+
+
+ // $ANTLR start "rule__State__Group__4__Impl"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:918:1: rule__State__Group__4__Impl : ( 'end' ) ;
+ public final void rule__State__Group__4__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:922:1: ( ( 'end' ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:923:1: ( 'end' )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:923:1: ( 'end' )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:924:1: 'end'
+ {
+ before(grammarAccess.getStateAccess().getEndKeyword_4());
+ match(input,12,FOLLOW_12_in_rule__State__Group__4__Impl1806);
+ after(grammarAccess.getStateAccess().getEndKeyword_4());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__State__Group__4__Impl"
+
+
+ // $ANTLR start "rule__State__Group_2__0"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:947:1: rule__State__Group_2__0 : rule__State__Group_2__0__Impl rule__State__Group_2__1 ;
+ public final void rule__State__Group_2__0() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:951:1: ( rule__State__Group_2__0__Impl rule__State__Group_2__1 )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:952:2: rule__State__Group_2__0__Impl rule__State__Group_2__1
+ {
+ pushFollow(FOLLOW_rule__State__Group_2__0__Impl_in_rule__State__Group_2__01847);
+ rule__State__Group_2__0__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__State__Group_2__1_in_rule__State__Group_2__01850);
+ rule__State__Group_2__1();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__State__Group_2__0"
+
+
+ // $ANTLR start "rule__State__Group_2__0__Impl"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:959:1: rule__State__Group_2__0__Impl : ( 'actions' ) ;
+ public final void rule__State__Group_2__0__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:963:1: ( ( 'actions' ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:964:1: ( 'actions' )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:964:1: ( 'actions' )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:965:1: 'actions'
+ {
+ before(grammarAccess.getStateAccess().getActionsKeyword_2_0());
+ match(input,16,FOLLOW_16_in_rule__State__Group_2__0__Impl1878);
+ after(grammarAccess.getStateAccess().getActionsKeyword_2_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__State__Group_2__0__Impl"
+
+
+ // $ANTLR start "rule__State__Group_2__1"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:978:1: rule__State__Group_2__1 : rule__State__Group_2__1__Impl rule__State__Group_2__2 ;
+ public final void rule__State__Group_2__1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:982:1: ( rule__State__Group_2__1__Impl rule__State__Group_2__2 )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:983:2: rule__State__Group_2__1__Impl rule__State__Group_2__2
+ {
+ pushFollow(FOLLOW_rule__State__Group_2__1__Impl_in_rule__State__Group_2__11909);
+ rule__State__Group_2__1__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__State__Group_2__2_in_rule__State__Group_2__11912);
+ rule__State__Group_2__2();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__State__Group_2__1"
+
+
+ // $ANTLR start "rule__State__Group_2__1__Impl"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:990:1: rule__State__Group_2__1__Impl : ( '{' ) ;
+ public final void rule__State__Group_2__1__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:994:1: ( ( '{' ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:995:1: ( '{' )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:995:1: ( '{' )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:996:1: '{'
+ {
+ before(grammarAccess.getStateAccess().getLeftCurlyBracketKeyword_2_1());
+ match(input,17,FOLLOW_17_in_rule__State__Group_2__1__Impl1940);
+ after(grammarAccess.getStateAccess().getLeftCurlyBracketKeyword_2_1());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__State__Group_2__1__Impl"
+
+
+ // $ANTLR start "rule__State__Group_2__2"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1009:1: rule__State__Group_2__2 : rule__State__Group_2__2__Impl rule__State__Group_2__3 ;
+ public final void rule__State__Group_2__2() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1013:1: ( rule__State__Group_2__2__Impl rule__State__Group_2__3 )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1014:2: rule__State__Group_2__2__Impl rule__State__Group_2__3
+ {
+ pushFollow(FOLLOW_rule__State__Group_2__2__Impl_in_rule__State__Group_2__21971);
+ rule__State__Group_2__2__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__State__Group_2__3_in_rule__State__Group_2__21974);
+ rule__State__Group_2__3();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__State__Group_2__2"
+
+
+ // $ANTLR start "rule__State__Group_2__2__Impl"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1021:1: rule__State__Group_2__2__Impl : ( ( ( rule__State__ActionsAssignment_2_2 ) ) ( ( rule__State__ActionsAssignment_2_2 )* ) ) ;
+ public final void rule__State__Group_2__2__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1025:1: ( ( ( ( rule__State__ActionsAssignment_2_2 ) ) ( ( rule__State__ActionsAssignment_2_2 )* ) ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1026:1: ( ( ( rule__State__ActionsAssignment_2_2 ) ) ( ( rule__State__ActionsAssignment_2_2 )* ) )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1026:1: ( ( ( rule__State__ActionsAssignment_2_2 ) ) ( ( rule__State__ActionsAssignment_2_2 )* ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1027:1: ( ( rule__State__ActionsAssignment_2_2 ) ) ( ( rule__State__ActionsAssignment_2_2 )* )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1027:1: ( ( rule__State__ActionsAssignment_2_2 ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1028:1: ( rule__State__ActionsAssignment_2_2 )
+ {
+ before(grammarAccess.getStateAccess().getActionsAssignment_2_2());
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1029:1: ( rule__State__ActionsAssignment_2_2 )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1029:2: rule__State__ActionsAssignment_2_2
+ {
+ pushFollow(FOLLOW_rule__State__ActionsAssignment_2_2_in_rule__State__Group_2__2__Impl2003);
+ rule__State__ActionsAssignment_2_2();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getStateAccess().getActionsAssignment_2_2());
+
+ }
+
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1032:1: ( ( rule__State__ActionsAssignment_2_2 )* )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1033:1: ( rule__State__ActionsAssignment_2_2 )*
+ {
+ before(grammarAccess.getStateAccess().getActionsAssignment_2_2());
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1034:1: ( rule__State__ActionsAssignment_2_2 )*
+ loop10:
+ do {
+ int alt10=2;
+ int LA10_0 = input.LA(1);
+
+ if ( (LA10_0==RULE_ID) ) {
+ alt10=1;
+ }
+
+
+ switch (alt10) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1034:2: rule__State__ActionsAssignment_2_2
+ {
+ pushFollow(FOLLOW_rule__State__ActionsAssignment_2_2_in_rule__State__Group_2__2__Impl2015);
+ rule__State__ActionsAssignment_2_2();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ default :
+ break loop10;
+ }
+ } while (true);
+
+ after(grammarAccess.getStateAccess().getActionsAssignment_2_2());
+
+ }
+
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__State__Group_2__2__Impl"
+
+
+ // $ANTLR start "rule__State__Group_2__3"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1045:1: rule__State__Group_2__3 : rule__State__Group_2__3__Impl ;
+ public final void rule__State__Group_2__3() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1049:1: ( rule__State__Group_2__3__Impl )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1050:2: rule__State__Group_2__3__Impl
+ {
+ pushFollow(FOLLOW_rule__State__Group_2__3__Impl_in_rule__State__Group_2__32048);
+ rule__State__Group_2__3__Impl();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__State__Group_2__3"
+
+
+ // $ANTLR start "rule__State__Group_2__3__Impl"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1056:1: rule__State__Group_2__3__Impl : ( '}' ) ;
+ public final void rule__State__Group_2__3__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1060:1: ( ( '}' ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1061:1: ( '}' )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1061:1: ( '}' )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1062:1: '}'
+ {
+ before(grammarAccess.getStateAccess().getRightCurlyBracketKeyword_2_3());
+ match(input,18,FOLLOW_18_in_rule__State__Group_2__3__Impl2076);
+ after(grammarAccess.getStateAccess().getRightCurlyBracketKeyword_2_3());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__State__Group_2__3__Impl"
+
+
+ // $ANTLR start "rule__Transition__Group__0"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1083:1: rule__Transition__Group__0 : rule__Transition__Group__0__Impl rule__Transition__Group__1 ;
+ public final void rule__Transition__Group__0() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1087:1: ( rule__Transition__Group__0__Impl rule__Transition__Group__1 )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1088:2: rule__Transition__Group__0__Impl rule__Transition__Group__1
+ {
+ pushFollow(FOLLOW_rule__Transition__Group__0__Impl_in_rule__Transition__Group__02115);
+ rule__Transition__Group__0__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__Transition__Group__1_in_rule__Transition__Group__02118);
+ rule__Transition__Group__1();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Transition__Group__0"
+
+
+ // $ANTLR start "rule__Transition__Group__0__Impl"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1095:1: rule__Transition__Group__0__Impl : ( ( rule__Transition__EventAssignment_0 ) ) ;
+ public final void rule__Transition__Group__0__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1099:1: ( ( ( rule__Transition__EventAssignment_0 ) ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1100:1: ( ( rule__Transition__EventAssignment_0 ) )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1100:1: ( ( rule__Transition__EventAssignment_0 ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1101:1: ( rule__Transition__EventAssignment_0 )
+ {
+ before(grammarAccess.getTransitionAccess().getEventAssignment_0());
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1102:1: ( rule__Transition__EventAssignment_0 )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1102:2: rule__Transition__EventAssignment_0
+ {
+ pushFollow(FOLLOW_rule__Transition__EventAssignment_0_in_rule__Transition__Group__0__Impl2145);
+ rule__Transition__EventAssignment_0();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getTransitionAccess().getEventAssignment_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Transition__Group__0__Impl"
+
+
+ // $ANTLR start "rule__Transition__Group__1"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1112:1: rule__Transition__Group__1 : rule__Transition__Group__1__Impl rule__Transition__Group__2 ;
+ public final void rule__Transition__Group__1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1116:1: ( rule__Transition__Group__1__Impl rule__Transition__Group__2 )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1117:2: rule__Transition__Group__1__Impl rule__Transition__Group__2
+ {
+ pushFollow(FOLLOW_rule__Transition__Group__1__Impl_in_rule__Transition__Group__12175);
+ rule__Transition__Group__1__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__Transition__Group__2_in_rule__Transition__Group__12178);
+ rule__Transition__Group__2();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Transition__Group__1"
+
+
+ // $ANTLR start "rule__Transition__Group__1__Impl"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1124:1: rule__Transition__Group__1__Impl : ( '=>' ) ;
+ public final void rule__Transition__Group__1__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1128:1: ( ( '=>' ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1129:1: ( '=>' )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1129:1: ( '=>' )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1130:1: '=>'
+ {
+ before(grammarAccess.getTransitionAccess().getEqualsSignGreaterThanSignKeyword_1());
+ match(input,19,FOLLOW_19_in_rule__Transition__Group__1__Impl2206);
+ after(grammarAccess.getTransitionAccess().getEqualsSignGreaterThanSignKeyword_1());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Transition__Group__1__Impl"
+
+
+ // $ANTLR start "rule__Transition__Group__2"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1143:1: rule__Transition__Group__2 : rule__Transition__Group__2__Impl ;
+ public final void rule__Transition__Group__2() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1147:1: ( rule__Transition__Group__2__Impl )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1148:2: rule__Transition__Group__2__Impl
+ {
+ pushFollow(FOLLOW_rule__Transition__Group__2__Impl_in_rule__Transition__Group__22237);
+ rule__Transition__Group__2__Impl();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Transition__Group__2"
+
+
+ // $ANTLR start "rule__Transition__Group__2__Impl"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1154:1: rule__Transition__Group__2__Impl : ( ( rule__Transition__StateAssignment_2 ) ) ;
+ public final void rule__Transition__Group__2__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1158:1: ( ( ( rule__Transition__StateAssignment_2 ) ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1159:1: ( ( rule__Transition__StateAssignment_2 ) )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1159:1: ( ( rule__Transition__StateAssignment_2 ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1160:1: ( rule__Transition__StateAssignment_2 )
+ {
+ before(grammarAccess.getTransitionAccess().getStateAssignment_2());
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1161:1: ( rule__Transition__StateAssignment_2 )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1161:2: rule__Transition__StateAssignment_2
+ {
+ pushFollow(FOLLOW_rule__Transition__StateAssignment_2_in_rule__Transition__Group__2__Impl2264);
+ rule__Transition__StateAssignment_2();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getTransitionAccess().getStateAssignment_2());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Transition__Group__2__Impl"
+
+
+ // $ANTLR start "rule__Statemachine__EventsAssignment_1_1"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1178:1: rule__Statemachine__EventsAssignment_1_1 : ( ruleEvent ) ;
+ public final void rule__Statemachine__EventsAssignment_1_1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1182:1: ( ( ruleEvent ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1183:1: ( ruleEvent )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1183:1: ( ruleEvent )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1184:1: ruleEvent
+ {
+ before(grammarAccess.getStatemachineAccess().getEventsEventParserRuleCall_1_1_0());
+ pushFollow(FOLLOW_ruleEvent_in_rule__Statemachine__EventsAssignment_1_12305);
+ ruleEvent();
+
+ state._fsp--;
+
+ after(grammarAccess.getStatemachineAccess().getEventsEventParserRuleCall_1_1_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Statemachine__EventsAssignment_1_1"
+
+
+ // $ANTLR start "rule__Statemachine__ResetEventsAssignment_2_1"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1193:1: rule__Statemachine__ResetEventsAssignment_2_1 : ( ( RULE_ID ) ) ;
+ public final void rule__Statemachine__ResetEventsAssignment_2_1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1197:1: ( ( ( RULE_ID ) ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1198:1: ( ( RULE_ID ) )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1198:1: ( ( RULE_ID ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1199:1: ( RULE_ID )
+ {
+ before(grammarAccess.getStatemachineAccess().getResetEventsEventCrossReference_2_1_0());
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1200:1: ( RULE_ID )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1201:1: RULE_ID
+ {
+ before(grammarAccess.getStatemachineAccess().getResetEventsEventIDTerminalRuleCall_2_1_0_1());
+ match(input,RULE_ID,FOLLOW_RULE_ID_in_rule__Statemachine__ResetEventsAssignment_2_12340);
+ after(grammarAccess.getStatemachineAccess().getResetEventsEventIDTerminalRuleCall_2_1_0_1());
+
+ }
+
+ after(grammarAccess.getStatemachineAccess().getResetEventsEventCrossReference_2_1_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Statemachine__ResetEventsAssignment_2_1"
+
+
+ // $ANTLR start "rule__Statemachine__CommandsAssignment_3_1"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1212:1: rule__Statemachine__CommandsAssignment_3_1 : ( ruleCommand ) ;
+ public final void rule__Statemachine__CommandsAssignment_3_1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1216:1: ( ( ruleCommand ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1217:1: ( ruleCommand )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1217:1: ( ruleCommand )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1218:1: ruleCommand
+ {
+ before(grammarAccess.getStatemachineAccess().getCommandsCommandParserRuleCall_3_1_0());
+ pushFollow(FOLLOW_ruleCommand_in_rule__Statemachine__CommandsAssignment_3_12375);
+ ruleCommand();
+
+ state._fsp--;
+
+ after(grammarAccess.getStatemachineAccess().getCommandsCommandParserRuleCall_3_1_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Statemachine__CommandsAssignment_3_1"
+
+
+ // $ANTLR start "rule__Statemachine__StatesAssignment_4"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1227:1: rule__Statemachine__StatesAssignment_4 : ( ruleState ) ;
+ public final void rule__Statemachine__StatesAssignment_4() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1231:1: ( ( ruleState ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1232:1: ( ruleState )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1232:1: ( ruleState )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1233:1: ruleState
+ {
+ before(grammarAccess.getStatemachineAccess().getStatesStateParserRuleCall_4_0());
+ pushFollow(FOLLOW_ruleState_in_rule__Statemachine__StatesAssignment_42406);
+ ruleState();
+
+ state._fsp--;
+
+ after(grammarAccess.getStatemachineAccess().getStatesStateParserRuleCall_4_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Statemachine__StatesAssignment_4"
+
+
+ // $ANTLR start "rule__Event__NameAssignment_0"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1242:1: rule__Event__NameAssignment_0 : ( RULE_ID ) ;
+ public final void rule__Event__NameAssignment_0() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1246:1: ( ( RULE_ID ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1247:1: ( RULE_ID )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1247:1: ( RULE_ID )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1248:1: RULE_ID
+ {
+ before(grammarAccess.getEventAccess().getNameIDTerminalRuleCall_0_0());
+ match(input,RULE_ID,FOLLOW_RULE_ID_in_rule__Event__NameAssignment_02437);
+ after(grammarAccess.getEventAccess().getNameIDTerminalRuleCall_0_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Event__NameAssignment_0"
+
+
+ // $ANTLR start "rule__Event__CodeAssignment_1"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1257:1: rule__Event__CodeAssignment_1 : ( RULE_ID ) ;
+ public final void rule__Event__CodeAssignment_1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1261:1: ( ( RULE_ID ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1262:1: ( RULE_ID )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1262:1: ( RULE_ID )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1263:1: RULE_ID
+ {
+ before(grammarAccess.getEventAccess().getCodeIDTerminalRuleCall_1_0());
+ match(input,RULE_ID,FOLLOW_RULE_ID_in_rule__Event__CodeAssignment_12468);
+ after(grammarAccess.getEventAccess().getCodeIDTerminalRuleCall_1_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Event__CodeAssignment_1"
+
+
+ // $ANTLR start "rule__Command__NameAssignment_0"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1272:1: rule__Command__NameAssignment_0 : ( RULE_ID ) ;
+ public final void rule__Command__NameAssignment_0() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1276:1: ( ( RULE_ID ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1277:1: ( RULE_ID )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1277:1: ( RULE_ID )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1278:1: RULE_ID
+ {
+ before(grammarAccess.getCommandAccess().getNameIDTerminalRuleCall_0_0());
+ match(input,RULE_ID,FOLLOW_RULE_ID_in_rule__Command__NameAssignment_02499);
+ after(grammarAccess.getCommandAccess().getNameIDTerminalRuleCall_0_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Command__NameAssignment_0"
+
+
+ // $ANTLR start "rule__Command__CodeAssignment_1"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1287:1: rule__Command__CodeAssignment_1 : ( RULE_ID ) ;
+ public final void rule__Command__CodeAssignment_1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1291:1: ( ( RULE_ID ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1292:1: ( RULE_ID )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1292:1: ( RULE_ID )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1293:1: RULE_ID
+ {
+ before(grammarAccess.getCommandAccess().getCodeIDTerminalRuleCall_1_0());
+ match(input,RULE_ID,FOLLOW_RULE_ID_in_rule__Command__CodeAssignment_12530);
+ after(grammarAccess.getCommandAccess().getCodeIDTerminalRuleCall_1_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Command__CodeAssignment_1"
+
+
+ // $ANTLR start "rule__State__NameAssignment_1"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1302:1: rule__State__NameAssignment_1 : ( RULE_ID ) ;
+ public final void rule__State__NameAssignment_1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1306:1: ( ( RULE_ID ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1307:1: ( RULE_ID )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1307:1: ( RULE_ID )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1308:1: RULE_ID
+ {
+ before(grammarAccess.getStateAccess().getNameIDTerminalRuleCall_1_0());
+ match(input,RULE_ID,FOLLOW_RULE_ID_in_rule__State__NameAssignment_12561);
+ after(grammarAccess.getStateAccess().getNameIDTerminalRuleCall_1_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__State__NameAssignment_1"
+
+
+ // $ANTLR start "rule__State__ActionsAssignment_2_2"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1317:1: rule__State__ActionsAssignment_2_2 : ( ( RULE_ID ) ) ;
+ public final void rule__State__ActionsAssignment_2_2() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1321:1: ( ( ( RULE_ID ) ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1322:1: ( ( RULE_ID ) )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1322:1: ( ( RULE_ID ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1323:1: ( RULE_ID )
+ {
+ before(grammarAccess.getStateAccess().getActionsCommandCrossReference_2_2_0());
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1324:1: ( RULE_ID )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1325:1: RULE_ID
+ {
+ before(grammarAccess.getStateAccess().getActionsCommandIDTerminalRuleCall_2_2_0_1());
+ match(input,RULE_ID,FOLLOW_RULE_ID_in_rule__State__ActionsAssignment_2_22596);
+ after(grammarAccess.getStateAccess().getActionsCommandIDTerminalRuleCall_2_2_0_1());
+
+ }
+
+ after(grammarAccess.getStateAccess().getActionsCommandCrossReference_2_2_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__State__ActionsAssignment_2_2"
+
+
+ // $ANTLR start "rule__State__TransitionsAssignment_3"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1336:1: rule__State__TransitionsAssignment_3 : ( ruleTransition ) ;
+ public final void rule__State__TransitionsAssignment_3() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1340:1: ( ( ruleTransition ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1341:1: ( ruleTransition )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1341:1: ( ruleTransition )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1342:1: ruleTransition
+ {
+ before(grammarAccess.getStateAccess().getTransitionsTransitionParserRuleCall_3_0());
+ pushFollow(FOLLOW_ruleTransition_in_rule__State__TransitionsAssignment_32631);
+ ruleTransition();
+
+ state._fsp--;
+
+ after(grammarAccess.getStateAccess().getTransitionsTransitionParserRuleCall_3_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__State__TransitionsAssignment_3"
+
+
+ // $ANTLR start "rule__Transition__EventAssignment_0"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1351:1: rule__Transition__EventAssignment_0 : ( ( RULE_ID ) ) ;
+ public final void rule__Transition__EventAssignment_0() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1355:1: ( ( ( RULE_ID ) ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1356:1: ( ( RULE_ID ) )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1356:1: ( ( RULE_ID ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1357:1: ( RULE_ID )
+ {
+ before(grammarAccess.getTransitionAccess().getEventEventCrossReference_0_0());
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1358:1: ( RULE_ID )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1359:1: RULE_ID
+ {
+ before(grammarAccess.getTransitionAccess().getEventEventIDTerminalRuleCall_0_0_1());
+ match(input,RULE_ID,FOLLOW_RULE_ID_in_rule__Transition__EventAssignment_02666);
+ after(grammarAccess.getTransitionAccess().getEventEventIDTerminalRuleCall_0_0_1());
+
+ }
+
+ after(grammarAccess.getTransitionAccess().getEventEventCrossReference_0_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Transition__EventAssignment_0"
+
+
+ // $ANTLR start "rule__Transition__StateAssignment_2"
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1370:1: rule__Transition__StateAssignment_2 : ( ( RULE_ID ) ) ;
+ public final void rule__Transition__StateAssignment_2() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1374:1: ( ( ( RULE_ID ) ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1375:1: ( ( RULE_ID ) )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1375:1: ( ( RULE_ID ) )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1376:1: ( RULE_ID )
+ {
+ before(grammarAccess.getTransitionAccess().getStateStateCrossReference_2_0());
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1377:1: ( RULE_ID )
+ // ../org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr/internal/InternalStatemachine.g:1378:1: RULE_ID
+ {
+ before(grammarAccess.getTransitionAccess().getStateStateIDTerminalRuleCall_2_0_1());
+ match(input,RULE_ID,FOLLOW_RULE_ID_in_rule__Transition__StateAssignment_22705);
+ after(grammarAccess.getTransitionAccess().getStateStateIDTerminalRuleCall_2_0_1());
+
+ }
+
+ after(grammarAccess.getTransitionAccess().getStateStateCrossReference_2_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Transition__StateAssignment_2"
+
+ // Delegated rules
+
+
+
+
+ public static final BitSet FOLLOW_ruleStatemachine_in_entryRuleStatemachine61 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleStatemachine68 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Statemachine__Group__0_in_ruleStatemachine94 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleEvent_in_entryRuleEvent121 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleEvent128 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Event__Group__0_in_ruleEvent154 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleCommand_in_entryRuleCommand181 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleCommand188 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Command__Group__0_in_ruleCommand214 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleState_in_entryRuleState241 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleState248 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__State__Group__0_in_ruleState274 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleTransition_in_entryRuleTransition301 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleTransition308 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Transition__Group__0_in_ruleTransition334 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Statemachine__Group__0__Impl_in_rule__Statemachine__Group__0368 = new BitSet(new long[]{0x000000000000E800L});
+ public static final BitSet FOLLOW_rule__Statemachine__Group__1_in_rule__Statemachine__Group__0371 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Statemachine__Group__1__Impl_in_rule__Statemachine__Group__1429 = new BitSet(new long[]{0x000000000000E800L});
+ public static final BitSet FOLLOW_rule__Statemachine__Group__2_in_rule__Statemachine__Group__1432 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Statemachine__Group_1__0_in_rule__Statemachine__Group__1__Impl459 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Statemachine__Group__2__Impl_in_rule__Statemachine__Group__2490 = new BitSet(new long[]{0x000000000000E800L});
+ public static final BitSet FOLLOW_rule__Statemachine__Group__3_in_rule__Statemachine__Group__2493 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Statemachine__Group_2__0_in_rule__Statemachine__Group__2__Impl520 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Statemachine__Group__3__Impl_in_rule__Statemachine__Group__3551 = new BitSet(new long[]{0x000000000000E800L});
+ public static final BitSet FOLLOW_rule__Statemachine__Group__4_in_rule__Statemachine__Group__3554 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Statemachine__Group_3__0_in_rule__Statemachine__Group__3__Impl581 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Statemachine__Group__4__Impl_in_rule__Statemachine__Group__4612 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Statemachine__StatesAssignment_4_in_rule__Statemachine__Group__4__Impl639 = new BitSet(new long[]{0x0000000000008002L});
+ public static final BitSet FOLLOW_rule__Statemachine__Group_1__0__Impl_in_rule__Statemachine__Group_1__0680 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_rule__Statemachine__Group_1__1_in_rule__Statemachine__Group_1__0683 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_11_in_rule__Statemachine__Group_1__0__Impl711 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Statemachine__Group_1__1__Impl_in_rule__Statemachine__Group_1__1742 = new BitSet(new long[]{0x0000000000001000L});
+ public static final BitSet FOLLOW_rule__Statemachine__Group_1__2_in_rule__Statemachine__Group_1__1745 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Statemachine__EventsAssignment_1_1_in_rule__Statemachine__Group_1__1__Impl774 = new BitSet(new long[]{0x0000000000000012L});
+ public static final BitSet FOLLOW_rule__Statemachine__EventsAssignment_1_1_in_rule__Statemachine__Group_1__1__Impl786 = new BitSet(new long[]{0x0000000000000012L});
+ public static final BitSet FOLLOW_rule__Statemachine__Group_1__2__Impl_in_rule__Statemachine__Group_1__2819 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_12_in_rule__Statemachine__Group_1__2__Impl847 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Statemachine__Group_2__0__Impl_in_rule__Statemachine__Group_2__0884 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_rule__Statemachine__Group_2__1_in_rule__Statemachine__Group_2__0887 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_13_in_rule__Statemachine__Group_2__0__Impl915 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Statemachine__Group_2__1__Impl_in_rule__Statemachine__Group_2__1946 = new BitSet(new long[]{0x0000000000001000L});
+ public static final BitSet FOLLOW_rule__Statemachine__Group_2__2_in_rule__Statemachine__Group_2__1949 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Statemachine__ResetEventsAssignment_2_1_in_rule__Statemachine__Group_2__1__Impl978 = new BitSet(new long[]{0x0000000000000012L});
+ public static final BitSet FOLLOW_rule__Statemachine__ResetEventsAssignment_2_1_in_rule__Statemachine__Group_2__1__Impl990 = new BitSet(new long[]{0x0000000000000012L});
+ public static final BitSet FOLLOW_rule__Statemachine__Group_2__2__Impl_in_rule__Statemachine__Group_2__21023 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_12_in_rule__Statemachine__Group_2__2__Impl1051 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Statemachine__Group_3__0__Impl_in_rule__Statemachine__Group_3__01088 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_rule__Statemachine__Group_3__1_in_rule__Statemachine__Group_3__01091 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_14_in_rule__Statemachine__Group_3__0__Impl1119 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Statemachine__Group_3__1__Impl_in_rule__Statemachine__Group_3__11150 = new BitSet(new long[]{0x0000000000001000L});
+ public static final BitSet FOLLOW_rule__Statemachine__Group_3__2_in_rule__Statemachine__Group_3__11153 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Statemachine__CommandsAssignment_3_1_in_rule__Statemachine__Group_3__1__Impl1182 = new BitSet(new long[]{0x0000000000000012L});
+ public static final BitSet FOLLOW_rule__Statemachine__CommandsAssignment_3_1_in_rule__Statemachine__Group_3__1__Impl1194 = new BitSet(new long[]{0x0000000000000012L});
+ public static final BitSet FOLLOW_rule__Statemachine__Group_3__2__Impl_in_rule__Statemachine__Group_3__21227 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_12_in_rule__Statemachine__Group_3__2__Impl1255 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Event__Group__0__Impl_in_rule__Event__Group__01292 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_rule__Event__Group__1_in_rule__Event__Group__01295 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Event__NameAssignment_0_in_rule__Event__Group__0__Impl1322 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Event__Group__1__Impl_in_rule__Event__Group__11352 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Event__CodeAssignment_1_in_rule__Event__Group__1__Impl1379 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Command__Group__0__Impl_in_rule__Command__Group__01413 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_rule__Command__Group__1_in_rule__Command__Group__01416 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Command__NameAssignment_0_in_rule__Command__Group__0__Impl1443 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Command__Group__1__Impl_in_rule__Command__Group__11473 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Command__CodeAssignment_1_in_rule__Command__Group__1__Impl1500 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__State__Group__0__Impl_in_rule__State__Group__01534 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_rule__State__Group__1_in_rule__State__Group__01537 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_15_in_rule__State__Group__0__Impl1565 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__State__Group__1__Impl_in_rule__State__Group__11596 = new BitSet(new long[]{0x0000000000011010L});
+ public static final BitSet FOLLOW_rule__State__Group__2_in_rule__State__Group__11599 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__State__NameAssignment_1_in_rule__State__Group__1__Impl1626 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__State__Group__2__Impl_in_rule__State__Group__21656 = new BitSet(new long[]{0x0000000000011010L});
+ public static final BitSet FOLLOW_rule__State__Group__3_in_rule__State__Group__21659 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__State__Group_2__0_in_rule__State__Group__2__Impl1686 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__State__Group__3__Impl_in_rule__State__Group__31717 = new BitSet(new long[]{0x0000000000011010L});
+ public static final BitSet FOLLOW_rule__State__Group__4_in_rule__State__Group__31720 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__State__TransitionsAssignment_3_in_rule__State__Group__3__Impl1747 = new BitSet(new long[]{0x0000000000000012L});
+ public static final BitSet FOLLOW_rule__State__Group__4__Impl_in_rule__State__Group__41778 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_12_in_rule__State__Group__4__Impl1806 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__State__Group_2__0__Impl_in_rule__State__Group_2__01847 = new BitSet(new long[]{0x0000000000020000L});
+ public static final BitSet FOLLOW_rule__State__Group_2__1_in_rule__State__Group_2__01850 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_16_in_rule__State__Group_2__0__Impl1878 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__State__Group_2__1__Impl_in_rule__State__Group_2__11909 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_rule__State__Group_2__2_in_rule__State__Group_2__11912 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_17_in_rule__State__Group_2__1__Impl1940 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__State__Group_2__2__Impl_in_rule__State__Group_2__21971 = new BitSet(new long[]{0x0000000000040000L});
+ public static final BitSet FOLLOW_rule__State__Group_2__3_in_rule__State__Group_2__21974 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__State__ActionsAssignment_2_2_in_rule__State__Group_2__2__Impl2003 = new BitSet(new long[]{0x0000000000000012L});
+ public static final BitSet FOLLOW_rule__State__ActionsAssignment_2_2_in_rule__State__Group_2__2__Impl2015 = new BitSet(new long[]{0x0000000000000012L});
+ public static final BitSet FOLLOW_rule__State__Group_2__3__Impl_in_rule__State__Group_2__32048 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_18_in_rule__State__Group_2__3__Impl2076 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Transition__Group__0__Impl_in_rule__Transition__Group__02115 = new BitSet(new long[]{0x0000000000080000L});
+ public static final BitSet FOLLOW_rule__Transition__Group__1_in_rule__Transition__Group__02118 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Transition__EventAssignment_0_in_rule__Transition__Group__0__Impl2145 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Transition__Group__1__Impl_in_rule__Transition__Group__12175 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_rule__Transition__Group__2_in_rule__Transition__Group__12178 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_19_in_rule__Transition__Group__1__Impl2206 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Transition__Group__2__Impl_in_rule__Transition__Group__22237 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Transition__StateAssignment_2_in_rule__Transition__Group__2__Impl2264 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleEvent_in_rule__Statemachine__EventsAssignment_1_12305 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_RULE_ID_in_rule__Statemachine__ResetEventsAssignment_2_12340 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleCommand_in_rule__Statemachine__CommandsAssignment_3_12375 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleState_in_rule__Statemachine__StatesAssignment_42406 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_RULE_ID_in_rule__Event__NameAssignment_02437 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_RULE_ID_in_rule__Event__CodeAssignment_12468 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_RULE_ID_in_rule__Command__NameAssignment_02499 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_RULE_ID_in_rule__Command__CodeAssignment_12530 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_RULE_ID_in_rule__State__NameAssignment_12561 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_RULE_ID_in_rule__State__ActionsAssignment_2_22596 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleTransition_in_rule__State__TransitionsAssignment_32631 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_RULE_ID_in_rule__Transition__EventAssignment_02666 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_RULE_ID_in_rule__Transition__StateAssignment_22705 = new BitSet(new long[]{0x0000000000000002L});
+
+}
\ No newline at end of file
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/internal/StatemachineActivator.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/internal/StatemachineActivator.java
new file mode 100644
index 0000000..0dfd18c
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/internal/StatemachineActivator.java
@@ -0,0 +1,95 @@
+/*
+ * generated by Xtext
+ */
+package org.eclipse.xtext.example.fowlerdsl.ui.internal;
+
+import java.util.Collections;
+import java.util.Map;
+
+import org.apache.log4j.Logger;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.eclipse.xtext.ui.shared.SharedStateModule;
+import org.eclipse.xtext.util.Modules2;
+import org.osgi.framework.BundleContext;
+
+import com.google.common.collect.Maps;
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+import com.google.inject.Module;
+
+/**
+ * This class was generated. Customizations should only happen in a newly
+ * introduced subclass.
+ */
+public class StatemachineActivator extends AbstractUIPlugin {
+
+ public static final String ORG_ECLIPSE_XTEXT_EXAMPLE_FOWLERDSL_STATEMACHINE = "org.eclipse.xtext.example.fowlerdsl.Statemachine";
+
+ private static final Logger logger = Logger.getLogger(StatemachineActivator.class);
+
+ private static StatemachineActivator INSTANCE;
+
+ private Map<String, Injector> injectors = Collections.synchronizedMap(Maps.<String, Injector> newHashMapWithExpectedSize(1));
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ INSTANCE = this;
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ injectors.clear();
+ INSTANCE = null;
+ super.stop(context);
+ }
+
+ public static StatemachineActivator getInstance() {
+ return INSTANCE;
+ }
+
+ public Injector getInjector(String language) {
+ synchronized (injectors) {
+ Injector injector = injectors.get(language);
+ if (injector == null) {
+ injectors.put(language, injector = createInjector(language));
+ }
+ return injector;
+ }
+ }
+
+ protected Injector createInjector(String language) {
+ try {
+ Module runtimeModule = getRuntimeModule(language);
+ Module sharedStateModule = getSharedStateModule();
+ Module uiModule = getUiModule(language);
+ Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule);
+ return Guice.createInjector(mergedModule);
+ } catch (Exception e) {
+ logger.error("Failed to create injector for " + language);
+ logger.error(e.getMessage(), e);
+ throw new RuntimeException("Failed to create injector for " + language, e);
+ }
+ }
+
+ protected Module getRuntimeModule(String grammar) {
+ if (ORG_ECLIPSE_XTEXT_EXAMPLE_FOWLERDSL_STATEMACHINE.equals(grammar)) {
+ return new org.eclipse.xtext.example.fowlerdsl.StatemachineRuntimeModule();
+ }
+
+ throw new IllegalArgumentException(grammar);
+ }
+
+ protected Module getUiModule(String grammar) {
+ if (ORG_ECLIPSE_XTEXT_EXAMPLE_FOWLERDSL_STATEMACHINE.equals(grammar)) {
+ return new org.eclipse.xtext.example.fowlerdsl.ui.StatemachineUiModule(this);
+ }
+
+ throw new IllegalArgumentException(grammar);
+ }
+
+ protected Module getSharedStateModule() {
+ return new SharedStateModule();
+ }
+
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src/org/eclipse/xtext/example/fowlerdsl/ui/StatemachineUiModule.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src/org/eclipse/xtext/example/fowlerdsl/ui/StatemachineUiModule.java
new file mode 100644
index 0000000..46ddc98
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src/org/eclipse/xtext/example/fowlerdsl/ui/StatemachineUiModule.java
@@ -0,0 +1,15 @@
+/*
+ * generated by Xtext
+ */
+package org.eclipse.xtext.example.fowlerdsl.ui;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+/**
+ * Use this class to register components to be used within the IDE.
+ */
+public class StatemachineUiModule extends org.eclipse.xtext.example.fowlerdsl.ui.AbstractStatemachineUiModule {
+ public StatemachineUiModule(AbstractUIPlugin plugin) {
+ super(plugin);
+ }
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/StatemachineProposalProvider.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/StatemachineProposalProvider.java
new file mode 100644
index 0000000..cb76b69
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/StatemachineProposalProvider.java
@@ -0,0 +1,12 @@
+/*
+* generated by Xtext
+*/
+package org.eclipse.xtext.example.fowlerdsl.ui.contentassist;
+
+import org.eclipse.xtext.example.fowlerdsl.ui.contentassist.AbstractStatemachineProposalProvider;
+/**
+ * see http://www.eclipse.org/Xtext/documentation/latest/xtext.html#contentAssist on how to customize content assistant
+ */
+public class StatemachineProposalProvider extends AbstractStatemachineProposalProvider {
+
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src/org/eclipse/xtext/example/fowlerdsl/ui/labeling/StatemachineDescriptionLabelProvider.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src/org/eclipse/xtext/example/fowlerdsl/ui/labeling/StatemachineDescriptionLabelProvider.java
new file mode 100644
index 0000000..971e69e
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src/org/eclipse/xtext/example/fowlerdsl/ui/labeling/StatemachineDescriptionLabelProvider.java
@@ -0,0 +1,27 @@
+/*
+* generated by Xtext
+*/
+package org.eclipse.xtext.example.fowlerdsl.ui.labeling;
+
+import org.eclipse.xtext.ui.label.DefaultDescriptionLabelProvider;
+
+/**
+ * Provides labels for a IEObjectDescriptions and IResourceDescriptions.
+ *
+ * see http://www.eclipse.org/Xtext/documentation/latest/xtext.html#labelProvider
+ */
+public class StatemachineDescriptionLabelProvider extends DefaultDescriptionLabelProvider {
+
+/*
+ //Labels and icons can be computed like this:
+
+ String text(IEObjectDescription ele) {
+ return "my "+ele.getName();
+ }
+
+ String image(IEObjectDescription ele) {
+ return ele.getEClass().getName() + ".gif";
+ }
+*/
+
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src/org/eclipse/xtext/example/fowlerdsl/ui/labeling/StatemachineLabelProvider.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src/org/eclipse/xtext/example/fowlerdsl/ui/labeling/StatemachineLabelProvider.java
new file mode 100644
index 0000000..e816442
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src/org/eclipse/xtext/example/fowlerdsl/ui/labeling/StatemachineLabelProvider.java
@@ -0,0 +1,34 @@
+/*
+* generated by Xtext
+*/
+package org.eclipse.xtext.example.fowlerdsl.ui.labeling;
+
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
+import org.eclipse.xtext.ui.label.DefaultEObjectLabelProvider;
+
+import com.google.inject.Inject;
+
+/**
+ * Provides labels for a EObjects.
+ *
+ * see http://www.eclipse.org/Xtext/documentation/latest/xtext.html#labelProvider
+ */
+public class StatemachineLabelProvider extends DefaultEObjectLabelProvider {
+
+ @Inject
+ public StatemachineLabelProvider(AdapterFactoryLabelProvider delegate) {
+ super(delegate);
+ }
+
+/*
+ //Labels and icons can be computed like this:
+
+ String text(MyModel ele) {
+ return "my "+ele.getName();
+ }
+
+ String image(MyModel ele) {
+ return "MyModel.gif";
+ }
+*/
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src/org/eclipse/xtext/example/fowlerdsl/ui/outline/StatemachineOutlineTreeProvider.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src/org/eclipse/xtext/example/fowlerdsl/ui/outline/StatemachineOutlineTreeProvider.java
new file mode 100644
index 0000000..2520ac5
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src/org/eclipse/xtext/example/fowlerdsl/ui/outline/StatemachineOutlineTreeProvider.java
@@ -0,0 +1,14 @@
+/*
+* generated by Xtext
+*/
+package org.eclipse.xtext.example.fowlerdsl.ui.outline;
+
+import org.eclipse.xtext.ui.editor.outline.impl.DefaultOutlineTreeProvider;
+
+/**
+ * customization of the default outline structure
+ *
+ */
+public class StatemachineOutlineTreeProvider extends DefaultOutlineTreeProvider {
+
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src/org/eclipse/xtext/example/fowlerdsl/ui/quickfix/StatemachineQuickfixProvider.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src/org/eclipse/xtext/example/fowlerdsl/ui/quickfix/StatemachineQuickfixProvider.java
new file mode 100644
index 0000000..7eb5eef
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl.ui/src/org/eclipse/xtext/example/fowlerdsl/ui/quickfix/StatemachineQuickfixProvider.java
@@ -0,0 +1,19 @@
+
+package org.eclipse.xtext.example.fowlerdsl.ui.quickfix;
+
+import org.eclipse.xtext.ui.editor.quickfix.DefaultQuickfixProvider;
+
+public class StatemachineQuickfixProvider extends DefaultQuickfixProvider {
+
+// @Fix(MyJavaValidator.INVALID_NAME)
+// public void capitalizeName(final Issue issue, IssueResolutionAcceptor acceptor) {
+// acceptor.accept(issue, "Capitalize name", "Capitalize the name.", "upcase.png", new IModification() {
+// public void apply(IModificationContext context) throws BadLocationException {
+// IXtextDocument xtextDocument = context.getXtextDocument();
+// String firstLetter = xtextDocument.get(issue.getOffset(), 1);
+// xtextDocument.replace(issue.getOffset(), 1, firstLetter.toUpperCase());
+// }
+// });
+// }
+
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/.classpath b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/.classpath
new file mode 100644
index 0000000..406ca4a
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/.classpath
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="src-gen"/>
+ <classpathentry kind="src" path="xtend-gen"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/.project b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/.project
new file mode 100644
index 0000000..383ddac
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.xtext.example.fowlerdsl</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
+ </natures>
+</projectDescription>
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/.settings/org.eclipse.core.resources.prefs b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..99f26c0
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/GenerateStatemachine.mwe2.launch b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/GenerateStatemachine.mwe2.launch
new file mode 100644
index 0000000..b8064f8
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/GenerateStatemachine.mwe2.launch
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.emf.mwe2.launch.Mwe2LaunchConfigurationType">
+<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?> <launchConfigurationWorkingSet factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1299248699643_13" label="working set" name="working set"> <item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/org.eclipse.xtext.example.fowlerdsl" type="4"/> <item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/org.eclipse.xtext.example.fowlerdsl.generator" type="4"/> <item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/org.eclipse.xtext.example.fowlerdsl.tests" type="4"/> <item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/org.eclipse.xtext.example.fowlerdsl.ui" type="4"/> </launchConfigurationWorkingSet>}"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.xtext.example.fowlerdsl"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="4"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="src/org/eclipse/xtext/example/fowlerdsl/GenerateStatemachine.mwe2"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.xtext.example.fowlerdsl"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx512m"/>
+</launchConfiguration>
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/META-INF/MANIFEST.MF b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..77e71bd
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/META-INF/MANIFEST.MF
@@ -0,0 +1,36 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.eclipse.xtext.example.fowlerdsl
+Bundle-Vendor: My Company
+Bundle-Version: 1.0.0
+Bundle-SymbolicName: org.eclipse.xtext.example.fowlerdsl; singleton:=true
+Bundle-ActivationPolicy: lazy
+Require-Bundle: org.eclipse.xtext;bundle-version="2.3.0";visibility:=reexport,
+ org.eclipse.xtext.generator;resolution:=optional;x-installation:=greedy,
+ org.eclipse.emf.codegen.ecore;resolution:=optional;x-installation:=greedy,
+ org.eclipse.emf.mwe.utils;resolution:=optional;x-installation:=greedy,
+ org.eclipse.emf.mwe2.launch;resolution:=optional;x-installation:=greedy,
+ org.eclipse.xtext.ui.codetemplates;resolution:=optional;x-installation:=greedy,
+ org.eclipse.xtext.util,
+ org.eclipse.emf.ecore,
+ org.eclipse.emf.common,
+ org.antlr.runtime;bundle-version="[3.2.0,3.2.1)",
+ org.eclipse.xtext.common.types,
+ org.eclipse.xtext.xbase.lib;bundle-version="2.3.0"
+Import-Package: org.apache.log4j,
+ org.apache.commons.logging,
+ org.eclipse.xtext.xbase.lib
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.eclipse.xtext.example.fowlerdsl,
+ org.eclipse.xtext.example.fowlerdsl.services,
+ org.eclipse.xtext.example.fowlerdsl.statemachine,
+ org.eclipse.xtext.example.fowlerdsl.statemachine.impl,
+ org.eclipse.xtext.example.fowlerdsl.statemachine.util,
+ org.eclipse.xtext.example.fowlerdsl.serializer,
+ org.eclipse.xtext.example.fowlerdsl.parser.antlr,
+ org.eclipse.xtext.example.fowlerdsl.parser.antlr.internal,
+ org.eclipse.xtext.example.fowlerdsl.validation,
+ org.eclipse.xtext.example.fowlerdsl.scoping,
+ org.eclipse.xtext.example.fowlerdsl.generator,
+ org.eclipse.xtext.example.fowlerdsl.formatting
+
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/README.TXT b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/README.TXT
new file mode 100644
index 0000000..17657ed
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/README.TXT
@@ -0,0 +1,46 @@
+Start a new Eclipse Application and create an empty Java project.
+Add new source folder called "src-gen/" and put the following statemachine into a file in the "src/" folder.
+
+// MrsGrantsSecretCompartments.statemachine
+
+events
+ doorClosed D1CL
+ drawOpened D2OP
+ lightOn L1ON
+ doorOpened D1OP
+ panelClosed PNCL
+end
+
+resetEvents
+ doorClosed
+end
+
+commands
+ unlockPanel PNUL
+ lockPanel PNLK
+ lockDoor D1LK
+ unlockDoor D1UL
+end
+
+state idle
+ actions {unlockDoor lockPanel}
+ doorClosed => active
+end
+
+state active
+ drawOpened => waitingForLight
+ lightOn => waitingForDraw
+end
+
+state waitingForLight
+ lightOn => unlockedPanel
+end
+
+state waitingForDraw
+ drawOpened => unlockedPanel
+end
+
+state unlockedPanel
+ actions {unlockPanel lockDoor}
+ panelClosed => idle
+end
\ No newline at end of file
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/build.properties b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/build.properties
new file mode 100644
index 0000000..31255ed
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/build.properties
@@ -0,0 +1,6 @@
+source.. = src/,\
+ src-gen/,\
+ xtend-gen/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml
\ No newline at end of file
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/plugin.xml b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/plugin.xml
new file mode 100644
index 0000000..1e5e947
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/plugin.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<plugin>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <package
+ uri = "http://www.eclipse.org/xtext/example/fowlerdsl/Statemachine"
+ class = "org.eclipse.xtext.example.fowlerdsl.statemachine.StatemachinePackage"
+ genModel = "org/eclipse/xtext/example/fowlerdsl/Statemachine.genmodel" />
+
+ </extension>
+
+
+
+
+
+</plugin>
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/plugin.xml_gen b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/plugin.xml_gen
new file mode 100644
index 0000000..bbf6ddc
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/plugin.xml_gen
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<plugin>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <package
+ uri = "http://www.eclipse.org/xtext/example/fowlerdsl/Statemachine"
+ class = "org.eclipse.xtext.example.fowlerdsl.statemachine.StatemachinePackage"
+ genModel = "org/eclipse/xtext/example/fowlerdsl/Statemachine.genmodel" />
+
+ </extension>
+
+
+
+
+</plugin>
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/AbstractStatemachineRuntimeModule.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/AbstractStatemachineRuntimeModule.java
new file mode 100644
index 0000000..de6a4e3
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/AbstractStatemachineRuntimeModule.java
@@ -0,0 +1,172 @@
+/*
+ * generated by Xtext
+ */
+package org.eclipse.xtext.example.fowlerdsl;
+
+import java.util.Properties;
+
+import org.eclipse.xtext.Constants;
+import org.eclipse.xtext.service.DefaultRuntimeModule;
+
+import com.google.inject.Binder;
+import com.google.inject.name.Names;
+
+/**
+ * Manual modifications go to {org.eclipse.xtext.example.fowlerdsl.StatemachineRuntimeModule}
+ */
+ @SuppressWarnings("all")
+public abstract class AbstractStatemachineRuntimeModule extends DefaultRuntimeModule {
+
+ protected Properties properties = null;
+
+ @Override
+ public void configure(Binder binder) {
+ properties = tryBindProperties(binder, "org/eclipse/xtext/example/fowlerdsl/Statemachine.properties");
+ super.configure(binder);
+ }
+
+ public void configureLanguageName(Binder binder) {
+ binder.bind(String.class).annotatedWith(Names.named(Constants.LANGUAGE_NAME)).toInstance("org.eclipse.xtext.example.fowlerdsl.Statemachine");
+ }
+
+ public void configureFileExtensions(Binder binder) {
+ if (properties == null || properties.getProperty(Constants.FILE_EXTENSIONS) == null)
+ binder.bind(String.class).annotatedWith(Names.named(Constants.FILE_EXTENSIONS)).toInstance("statemachine");
+ }
+
+ // contributed by org.eclipse.xtext.generator.grammarAccess.GrammarAccessFragment
+ public Class<? extends org.eclipse.xtext.IGrammarAccess> bindIGrammarAccess() {
+ return org.eclipse.xtext.example.fowlerdsl.services.StatemachineGrammarAccess.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.serializer.SerializerFragment
+ public Class<? extends org.eclipse.xtext.serializer.sequencer.ISemanticSequencer> bindISemanticSequencer() {
+ return org.eclipse.xtext.example.fowlerdsl.serializer.StatemachineSemanticSequencer.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.serializer.SerializerFragment
+ public Class<? extends org.eclipse.xtext.serializer.sequencer.ISyntacticSequencer> bindISyntacticSequencer() {
+ return org.eclipse.xtext.example.fowlerdsl.serializer.StatemachineSyntacticSequencer.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.serializer.SerializerFragment
+ public Class<? extends org.eclipse.xtext.serializer.ISerializer> bindISerializer() {
+ return org.eclipse.xtext.serializer.impl.Serializer.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
+ public Class<? extends org.eclipse.xtext.parser.IParser> bindIParser() {
+ return org.eclipse.xtext.example.fowlerdsl.parser.antlr.StatemachineParser.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
+ public Class<? extends org.eclipse.xtext.parser.ITokenToStringConverter> bindITokenToStringConverter() {
+ return org.eclipse.xtext.parser.antlr.AntlrTokenToStringConverter.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
+ public Class<? extends org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider> bindIAntlrTokenFileProvider() {
+ return org.eclipse.xtext.example.fowlerdsl.parser.antlr.StatemachineAntlrTokenFileProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
+ public Class<? extends org.eclipse.xtext.parser.antlr.Lexer> bindLexer() {
+ return org.eclipse.xtext.example.fowlerdsl.parser.antlr.internal.InternalStatemachineLexer.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
+ public com.google.inject.Provider<org.eclipse.xtext.example.fowlerdsl.parser.antlr.internal.InternalStatemachineLexer> provideInternalStatemachineLexer() {
+ return org.eclipse.xtext.parser.antlr.LexerProvider.create(org.eclipse.xtext.example.fowlerdsl.parser.antlr.internal.InternalStatemachineLexer.class);
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
+ public void configureRuntimeLexer(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.parser.antlr.Lexer.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.parser.antlr.LexerBindings.RUNTIME)).to(org.eclipse.xtext.example.fowlerdsl.parser.antlr.internal.InternalStatemachineLexer.class);
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
+ public Class<? extends org.eclipse.xtext.parser.antlr.ITokenDefProvider> bindITokenDefProvider() {
+ return org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.validation.JavaValidatorFragment
+ @org.eclipse.xtext.service.SingletonBinding(eager=true) public Class<? extends org.eclipse.xtext.example.fowlerdsl.validation.StatemachineJavaValidator> bindStatemachineJavaValidator() {
+ return org.eclipse.xtext.example.fowlerdsl.validation.StatemachineJavaValidator.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.scoping.AbstractScopingFragment
+ public Class<? extends org.eclipse.xtext.scoping.IScopeProvider> bindIScopeProvider() {
+ return org.eclipse.xtext.example.fowlerdsl.scoping.StatemachineScopeProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.scoping.AbstractScopingFragment
+ public void configureIScopeProviderDelegate(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.scoping.IScopeProvider.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider.NAMED_DELEGATE)).to(org.eclipse.xtext.scoping.impl.ImportedNamespaceAwareLocalScopeProvider.class);
+ }
+
+ // contributed by org.eclipse.xtext.generator.scoping.AbstractScopingFragment
+ public void configureIgnoreCaseLinking(com.google.inject.Binder binder) {
+ binder.bindConstant().annotatedWith(org.eclipse.xtext.scoping.IgnoreCaseLinking.class).to(false);
+ }
+
+ // contributed by org.eclipse.xtext.generator.exporting.QualifiedNamesFragment
+ public Class<? extends org.eclipse.xtext.naming.IQualifiedNameProvider> bindIQualifiedNameProvider() {
+ return org.eclipse.xtext.naming.DefaultDeclarativeQualifiedNameProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
+ public Class<? extends org.eclipse.xtext.resource.IContainer.Manager> bindIContainer$Manager() {
+ return org.eclipse.xtext.resource.containers.StateBasedContainerManager.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
+ public Class<? extends org.eclipse.xtext.resource.containers.IAllContainersState.Provider> bindIAllContainersState$Provider() {
+ return org.eclipse.xtext.resource.containers.ResourceSetBasedAllContainersStateProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
+ public void configureIResourceDescriptions(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.resource.IResourceDescriptions.class).to(org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions.class);
+ }
+
+ // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
+ public void configureIResourceDescriptionsBuilderScope(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.resource.IResourceDescriptions.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.resource.impl.ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE)).to(org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions.class);
+ }
+
+ // contributed by org.eclipse.xtext.generator.generator.GeneratorFragment
+ public Class<? extends org.eclipse.xtext.generator.IGenerator> bindIGenerator() {
+ return org.eclipse.xtext.example.fowlerdsl.generator.StatemachineGenerator.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.formatting.FormatterFragment
+ public Class<? extends org.eclipse.xtext.formatting.IFormatter> bindIFormatter() {
+ return org.eclipse.xtext.example.fowlerdsl.formatting.StatemachineFormatter.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.types.TypesGeneratorFragment
+ public java.lang.ClassLoader bindClassLoaderToInstance() {
+ return getClass().getClassLoader();
+ }
+
+ // contributed by org.eclipse.xtext.generator.types.TypesGeneratorFragment
+ public org.eclipse.xtext.common.types.TypesFactory bindTypesFactoryToInstance() {
+ return org.eclipse.xtext.common.types.TypesFactory.eINSTANCE;
+ }
+
+ // contributed by org.eclipse.xtext.generator.types.TypesGeneratorFragment
+ public Class<? extends org.eclipse.xtext.common.types.access.IJvmTypeProvider.Factory> bindIJvmTypeProvider$Factory() {
+ return org.eclipse.xtext.common.types.access.ClasspathTypeProviderFactory.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.types.TypesGeneratorFragment
+ public Class<? extends org.eclipse.xtext.common.types.xtext.AbstractTypeScopeProvider> bindAbstractTypeScopeProvider() {
+ return org.eclipse.xtext.common.types.xtext.ClasspathBasedTypeScopeProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.types.TypesGeneratorFragment
+ public Class<? extends org.eclipse.xtext.scoping.IGlobalScopeProvider> bindIGlobalScopeProvider() {
+ return org.eclipse.xtext.common.types.xtext.TypesAwareDefaultGlobalScopeProvider.class;
+ }
+
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/Statemachine.ecore b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/Statemachine.ecore
new file mode 100644
index 0000000..0a9240e
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/Statemachine.ecore
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="statemachine"
+ nsURI="http://www.eclipse.org/xtext/example/fowlerdsl/Statemachine" nsPrefix="statemachine">
+ <eClassifiers xsi:type="ecore:EClass" name="Statemachine">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="events" upperBound="-1"
+ eType="#//Event" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="resetEvents" unique="false"
+ upperBound="-1" eType="#//Event"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="commands" upperBound="-1"
+ eType="#//Command" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="states" upperBound="-1"
+ eType="#//State" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Event">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="code" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Command">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="code" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="State">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="actions" unique="false"
+ upperBound="-1" eType="#//Command"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="transitions" upperBound="-1"
+ eType="#//Transition" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Transition">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="event" eType="#//Event"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="state" eType="#//State"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/Statemachine.genmodel b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/Statemachine.genmodel
new file mode 100644
index 0000000..d5d7b68
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/Statemachine.genmodel
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.eclipse.xtext.example.fowlerdsl/src-gen"
+ editDirectory="/org.eclipse.xtext.example.fowlerdsl.edit/src" editorDirectory="/org.eclipse.xtext.example.fowlerdsl.editor/src"
+ modelPluginID="org.eclipse.xtext.example.fowlerdsl" forceOverwrite="true" modelName="Statemachine"
+ updateClasspath="false" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container"
+ complianceLevel="5.0" copyrightFields="false" editPluginID="org.eclipse.xtext.example.fowlerdsl.edit"
+ editorPluginID="org.eclipse.xtext.example.fowlerdsl.editor">
+ <genPackages prefix="Statemachine" basePackage="org.eclipse.xtext.example.fowlerdsl"
+ disposableProviderFactory="true" ecorePackage="Statemachine.ecore#/">
+ <genClasses ecoreClass="Statemachine.ecore#//Statemachine">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Statemachine.ecore#//Statemachine/events"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference Statemachine.ecore#//Statemachine/resetEvents"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Statemachine.ecore#//Statemachine/commands"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Statemachine.ecore#//Statemachine/states"/>
+ </genClasses>
+ <genClasses ecoreClass="Statemachine.ecore#//Event">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute Statemachine.ecore#//Event/name"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute Statemachine.ecore#//Event/code"/>
+ </genClasses>
+ <genClasses ecoreClass="Statemachine.ecore#//Command">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute Statemachine.ecore#//Command/name"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute Statemachine.ecore#//Command/code"/>
+ </genClasses>
+ <genClasses ecoreClass="Statemachine.ecore#//State">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute Statemachine.ecore#//State/name"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference Statemachine.ecore#//State/actions"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Statemachine.ecore#//State/transitions"/>
+ </genClasses>
+ <genClasses ecoreClass="Statemachine.ecore#//Transition">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference Statemachine.ecore#//Transition/event"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference Statemachine.ecore#//Transition/state"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/Statemachine.xmi b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/Statemachine.xmi
new file mode 100644
index 0000000..03a7437
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/Statemachine.xmi
@@ -0,0 +1,280 @@
+<?xml version="1.0" encoding="ASCII"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:xtext="http://www.eclipse.org/2008/Xtext">
+ <xtext:Grammar name="org.eclipse.xtext.example.fowlerdsl.Statemachine" usedGrammars="/1">
+ <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="statemachine">
+ <ePackage href="http://www.eclipse.org/xtext/example/fowlerdsl/Statemachine#/"/>
+ </metamodelDeclarations>
+ <rules xsi:type="xtext:ParserRule" name="Statemachine">
+ <type metamodel="/0/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EClass" href="http://www.eclipse.org/xtext/example/fowlerdsl/Statemachine#//Statemachine"/>
+ </type>
+ <alternatives xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Action">
+ <type metamodel="/0/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EClass" href="http://www.eclipse.org/xtext/example/fowlerdsl/Statemachine#//Statemachine"/>
+ </type>
+ </elements>
+ <elements xsi:type="xtext:Group" cardinality="?">
+ <elements xsi:type="xtext:Keyword" value="events"/>
+ <elements xsi:type="xtext:Assignment" cardinality="+" feature="events" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.1"/>
+ </elements>
+ <elements xsi:type="xtext:Keyword" value="end"/>
+ </elements>
+ <elements xsi:type="xtext:Group" cardinality="?">
+ <elements xsi:type="xtext:Keyword" value="resetEvents"/>
+ <elements xsi:type="xtext:Assignment" cardinality="+" feature="resetEvents" operator="+=">
+ <terminal xsi:type="xtext:CrossReference">
+ <type metamodel="/0/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EClass" href="http://www.eclipse.org/xtext/example/fowlerdsl/Statemachine#//Event"/>
+ </type>
+ <terminal xsi:type="xtext:RuleCall" rule="/1/@rules.0"/>
+ </terminal>
+ </elements>
+ <elements xsi:type="xtext:Keyword" value="end"/>
+ </elements>
+ <elements xsi:type="xtext:Group" cardinality="?">
+ <elements xsi:type="xtext:Keyword" value="commands"/>
+ <elements xsi:type="xtext:Assignment" cardinality="+" feature="commands" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.2"/>
+ </elements>
+ <elements xsi:type="xtext:Keyword" value="end"/>
+ </elements>
+ <elements xsi:type="xtext:Assignment" cardinality="*" feature="states" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.3"/>
+ </elements>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:ParserRule" name="Event">
+ <type metamodel="/0/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EClass" href="http://www.eclipse.org/xtext/example/fowlerdsl/Statemachine#//Event"/>
+ </type>
+ <alternatives xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="/1/@rules.0"/>
+ </elements>
+ <elements xsi:type="xtext:Assignment" feature="code" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="/1/@rules.0"/>
+ </elements>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:ParserRule" name="Command">
+ <type metamodel="/0/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EClass" href="http://www.eclipse.org/xtext/example/fowlerdsl/Statemachine#//Command"/>
+ </type>
+ <alternatives xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="/1/@rules.0"/>
+ </elements>
+ <elements xsi:type="xtext:Assignment" feature="code" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="/1/@rules.0"/>
+ </elements>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:ParserRule" name="State">
+ <type metamodel="/0/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EClass" href="http://www.eclipse.org/xtext/example/fowlerdsl/Statemachine#//State"/>
+ </type>
+ <alternatives xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Keyword" value="state"/>
+ <elements xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="/1/@rules.0"/>
+ </elements>
+ <elements xsi:type="xtext:Group" cardinality="?">
+ <elements xsi:type="xtext:Keyword" value="actions"/>
+ <elements xsi:type="xtext:Keyword" value="{"/>
+ <elements xsi:type="xtext:Assignment" cardinality="+" feature="actions" operator="+=">
+ <terminal xsi:type="xtext:CrossReference">
+ <type metamodel="/0/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EClass" href="http://www.eclipse.org/xtext/example/fowlerdsl/Statemachine#//Command"/>
+ </type>
+ <terminal xsi:type="xtext:RuleCall" rule="/1/@rules.0"/>
+ </terminal>
+ </elements>
+ <elements xsi:type="xtext:Keyword" value="}"/>
+ </elements>
+ <elements xsi:type="xtext:Assignment" cardinality="*" feature="transitions" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.4"/>
+ </elements>
+ <elements xsi:type="xtext:Keyword" value="end"/>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:ParserRule" name="Transition">
+ <type metamodel="/0/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EClass" href="http://www.eclipse.org/xtext/example/fowlerdsl/Statemachine#//Transition"/>
+ </type>
+ <alternatives xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Assignment" feature="event" operator="=">
+ <terminal xsi:type="xtext:CrossReference">
+ <type metamodel="/0/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EClass" href="http://www.eclipse.org/xtext/example/fowlerdsl/Statemachine#//Event"/>
+ </type>
+ <terminal xsi:type="xtext:RuleCall" rule="/1/@rules.0"/>
+ </terminal>
+ </elements>
+ <elements xsi:type="xtext:Keyword" value="=>"/>
+ <elements xsi:type="xtext:Assignment" feature="state" operator="=">
+ <terminal xsi:type="xtext:CrossReference">
+ <type metamodel="/0/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EClass" href="http://www.eclipse.org/xtext/example/fowlerdsl/Statemachine#//State"/>
+ </type>
+ <terminal xsi:type="xtext:RuleCall" rule="/1/@rules.0"/>
+ </terminal>
+ </elements>
+ </alternatives>
+ </rules>
+ </xtext:Grammar>
+ <xtext:Grammar name="org.eclipse.xtext.common.Terminals" definesHiddenTokens="true" hiddenTokens="/1/@rules.5 /1/@rules.3 /1/@rules.4">
+ <metamodelDeclarations xsi:type="xtext:ReferencedMetamodel" alias="ecore">
+ <ePackage href="http://www.eclipse.org/emf/2002/Ecore#/"/>
+ </metamodelDeclarations>
+ <rules xsi:type="xtext:TerminalRule" name="ID">
+ <type metamodel="/1/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </type>
+ <alternatives xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Keyword" cardinality="?" value="^"/>
+ <elements xsi:type="xtext:Alternatives">
+ <elements xsi:type="xtext:CharacterRange">
+ <left value="a"/>
+ <right value="z"/>
+ </elements>
+ <elements xsi:type="xtext:CharacterRange">
+ <left value="A"/>
+ <right value="Z"/>
+ </elements>
+ <elements xsi:type="xtext:Keyword" value="_"/>
+ </elements>
+ <elements xsi:type="xtext:Alternatives" cardinality="*">
+ <elements xsi:type="xtext:CharacterRange">
+ <left value="a"/>
+ <right value="z"/>
+ </elements>
+ <elements xsi:type="xtext:CharacterRange">
+ <left value="A"/>
+ <right value="Z"/>
+ </elements>
+ <elements xsi:type="xtext:Keyword" value="_"/>
+ <elements xsi:type="xtext:CharacterRange">
+ <left value="0"/>
+ <right value="9"/>
+ </elements>
+ </elements>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:TerminalRule" name="INT">
+ <type metamodel="/1/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ </type>
+ <alternatives xsi:type="xtext:CharacterRange" cardinality="+">
+ <left value="0"/>
+ <right value="9"/>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:TerminalRule" name="STRING">
+ <type metamodel="/1/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </type>
+ <alternatives xsi:type="xtext:Alternatives">
+ <elements xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Keyword" value="""/>
+ <elements xsi:type="xtext:Alternatives" cardinality="*">
+ <elements xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Keyword" value="\"/>
+ <elements xsi:type="xtext:Alternatives">
+ <elements xsi:type="xtext:Keyword" value="b"/>
+ <elements xsi:type="xtext:Keyword" value="t"/>
+ <elements xsi:type="xtext:Keyword" value="n"/>
+ <elements xsi:type="xtext:Keyword" value="f"/>
+ <elements xsi:type="xtext:Keyword" value="r"/>
+ <elements xsi:type="xtext:Keyword" value="u"/>
+ <elements xsi:type="xtext:Keyword" value="""/>
+ <elements xsi:type="xtext:Keyword" value="'"/>
+ <elements xsi:type="xtext:Keyword" value="\"/>
+ </elements>
+ </elements>
+ <elements xsi:type="xtext:NegatedToken">
+ <terminal xsi:type="xtext:Alternatives">
+ <elements xsi:type="xtext:Keyword" value="\"/>
+ <elements xsi:type="xtext:Keyword" value="""/>
+ </terminal>
+ </elements>
+ </elements>
+ <elements xsi:type="xtext:Keyword" value="""/>
+ </elements>
+ <elements xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Keyword" value="'"/>
+ <elements xsi:type="xtext:Alternatives" cardinality="*">
+ <elements xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Keyword" value="\"/>
+ <elements xsi:type="xtext:Alternatives">
+ <elements xsi:type="xtext:Keyword" value="b"/>
+ <elements xsi:type="xtext:Keyword" value="t"/>
+ <elements xsi:type="xtext:Keyword" value="n"/>
+ <elements xsi:type="xtext:Keyword" value="f"/>
+ <elements xsi:type="xtext:Keyword" value="r"/>
+ <elements xsi:type="xtext:Keyword" value="u"/>
+ <elements xsi:type="xtext:Keyword" value="""/>
+ <elements xsi:type="xtext:Keyword" value="'"/>
+ <elements xsi:type="xtext:Keyword" value="\"/>
+ </elements>
+ </elements>
+ <elements xsi:type="xtext:NegatedToken">
+ <terminal xsi:type="xtext:Alternatives">
+ <elements xsi:type="xtext:Keyword" value="\"/>
+ <elements xsi:type="xtext:Keyword" value="'"/>
+ </terminal>
+ </elements>
+ </elements>
+ <elements xsi:type="xtext:Keyword" value="'"/>
+ </elements>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:TerminalRule" name="ML_COMMENT">
+ <type metamodel="/1/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </type>
+ <alternatives xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Keyword" value="/*"/>
+ <elements xsi:type="xtext:UntilToken">
+ <terminal xsi:type="xtext:Keyword" value="*/"/>
+ </elements>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:TerminalRule" name="SL_COMMENT">
+ <type metamodel="/1/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </type>
+ <alternatives xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Keyword" value="//"/>
+ <elements xsi:type="xtext:NegatedToken" cardinality="*">
+ <terminal xsi:type="xtext:Alternatives">
+ <elements xsi:type="xtext:Keyword" value="
"/>
+ <elements xsi:type="xtext:Keyword" value="
"/>
+ </terminal>
+ </elements>
+ <elements xsi:type="xtext:Group" cardinality="?">
+ <elements xsi:type="xtext:Keyword" cardinality="?" value="
"/>
+ <elements xsi:type="xtext:Keyword" value="
"/>
+ </elements>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:TerminalRule" name="WS">
+ <type metamodel="/1/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </type>
+ <alternatives xsi:type="xtext:Alternatives" cardinality="+">
+ <elements xsi:type="xtext:Keyword" value=" "/>
+ <elements xsi:type="xtext:Keyword" value="	"/>
+ <elements xsi:type="xtext:Keyword" value="
"/>
+ <elements xsi:type="xtext:Keyword" value="
"/>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:TerminalRule" name="ANY_OTHER">
+ <type metamodel="/1/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </type>
+ <alternatives xsi:type="xtext:Wildcard"/>
+ </rules>
+ </xtext:Grammar>
+</xmi:XMI>
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/StatemachineStandaloneSetupGenerated.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/StatemachineStandaloneSetupGenerated.java
new file mode 100644
index 0000000..276e922
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/StatemachineStandaloneSetupGenerated.java
@@ -0,0 +1,43 @@
+
+package org.eclipse.xtext.example.fowlerdsl;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.xtext.ISetup;
+import org.eclipse.emf.ecore.resource.Resource;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+/**
+ * Generated from StandaloneSetup.xpt!
+ */
+@SuppressWarnings("all")
+public class StatemachineStandaloneSetupGenerated implements ISetup {
+
+ public Injector createInjectorAndDoEMFRegistration() {
+ org.eclipse.xtext.common.TerminalsStandaloneSetup.doSetup();
+
+ Injector injector = createInjector();
+ register(injector);
+ return injector;
+ }
+
+ public Injector createInjector() {
+ return Guice.createInjector(new org.eclipse.xtext.example.fowlerdsl.StatemachineRuntimeModule());
+ }
+
+ public void register(Injector injector) {
+ if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/xtext/example/fowlerdsl/Statemachine")) {
+ EPackage.Registry.INSTANCE.put("http://www.eclipse.org/xtext/example/fowlerdsl/Statemachine", org.eclipse.xtext.example.fowlerdsl.statemachine.StatemachinePackage.eINSTANCE);
+ }
+
+ org.eclipse.xtext.resource.IResourceFactory resourceFactory = injector.getInstance(org.eclipse.xtext.resource.IResourceFactory.class);
+ org.eclipse.xtext.resource.IResourceServiceProvider serviceProvider = injector.getInstance(org.eclipse.xtext.resource.IResourceServiceProvider.class);
+ Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("statemachine", resourceFactory);
+ org.eclipse.xtext.resource.IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("statemachine", serviceProvider);
+
+
+
+
+ }
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/StatemachineAntlrTokenFileProvider.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/StatemachineAntlrTokenFileProvider.java
new file mode 100644
index 0000000..1e06a56
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/StatemachineAntlrTokenFileProvider.java
@@ -0,0 +1,15 @@
+/*
+* generated by Xtext
+*/
+package org.eclipse.xtext.example.fowlerdsl.parser.antlr;
+
+import java.io.InputStream;
+import org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider;
+
+public class StatemachineAntlrTokenFileProvider implements IAntlrTokenFileProvider {
+
+ public InputStream getAntlrTokenFile() {
+ ClassLoader classLoader = getClass().getClassLoader();
+ return classLoader.getResourceAsStream("org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.tokens");
+ }
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/StatemachineParser.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/StatemachineParser.java
new file mode 100644
index 0000000..c984c48
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/StatemachineParser.java
@@ -0,0 +1,39 @@
+/*
+* generated by Xtext
+*/
+package org.eclipse.xtext.example.fowlerdsl.parser.antlr;
+
+import com.google.inject.Inject;
+
+import org.eclipse.xtext.parser.antlr.XtextTokenStream;
+import org.eclipse.xtext.example.fowlerdsl.services.StatemachineGrammarAccess;
+
+public class StatemachineParser extends org.eclipse.xtext.parser.antlr.AbstractAntlrParser {
+
+ @Inject
+ private StatemachineGrammarAccess grammarAccess;
+
+ @Override
+ protected void setInitialHiddenTokens(XtextTokenStream tokenStream) {
+ tokenStream.setInitialHiddenTokens("RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT");
+ }
+
+ @Override
+ protected org.eclipse.xtext.example.fowlerdsl.parser.antlr.internal.InternalStatemachineParser createParser(XtextTokenStream stream) {
+ return new org.eclipse.xtext.example.fowlerdsl.parser.antlr.internal.InternalStatemachineParser(stream, getGrammarAccess());
+ }
+
+ @Override
+ protected String getDefaultRuleName() {
+ return "Statemachine";
+ }
+
+ public StatemachineGrammarAccess getGrammarAccess() {
+ return this.grammarAccess;
+ }
+
+ public void setGrammarAccess(StatemachineGrammarAccess grammarAccess) {
+ this.grammarAccess = grammarAccess;
+ }
+
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g
new file mode 100644
index 0000000..81be6e5
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g
@@ -0,0 +1,453 @@
+/*
+* generated by Xtext
+*/
+grammar InternalStatemachine;
+
+options {
+ superClass=AbstractInternalAntlrParser;
+
+}
+
+@lexer::header {
+package org.eclipse.xtext.example.fowlerdsl.parser.antlr.internal;
+
+// Hack: Use our own Lexer superclass by means of import.
+// Currently there is no other way to specify the superclass for the lexer.
+import org.eclipse.xtext.parser.antlr.Lexer;
+}
+
+@parser::header {
+package org.eclipse.xtext.example.fowlerdsl.parser.antlr.internal;
+
+import org.eclipse.xtext.*;
+import org.eclipse.xtext.parser.*;
+import org.eclipse.xtext.parser.impl.*;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens;
+import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken;
+import org.eclipse.xtext.example.fowlerdsl.services.StatemachineGrammarAccess;
+
+}
+
+@parser::members {
+
+ private StatemachineGrammarAccess grammarAccess;
+
+ public InternalStatemachineParser(TokenStream input, StatemachineGrammarAccess grammarAccess) {
+ this(input);
+ this.grammarAccess = grammarAccess;
+ registerRules(grammarAccess.getGrammar());
+ }
+
+ @Override
+ protected String getFirstRuleName() {
+ return "Statemachine";
+ }
+
+ @Override
+ protected StatemachineGrammarAccess getGrammarAccess() {
+ return grammarAccess;
+ }
+}
+
+@rulecatch {
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+}
+
+
+
+
+// Entry rule entryRuleStatemachine
+entryRuleStatemachine returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getStatemachineRule()); }
+ iv_ruleStatemachine=ruleStatemachine
+ { $current=$iv_ruleStatemachine.current; }
+ EOF
+;
+
+// Rule Statemachine
+ruleStatemachine returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+((
+ {
+ $current = forceCreateModelElement(
+ grammarAccess.getStatemachineAccess().getStatemachineAction_0(),
+ $current);
+ }
+)( otherlv_1='events'
+ {
+ newLeafNode(otherlv_1, grammarAccess.getStatemachineAccess().getEventsKeyword_1_0());
+ }
+(
+(
+ {
+ newCompositeNode(grammarAccess.getStatemachineAccess().getEventsEventParserRuleCall_1_1_0());
+ }
+ lv_events_2_0=ruleEvent {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getStatemachineRule());
+ }
+ add(
+ $current,
+ "events",
+ lv_events_2_0,
+ "Event");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+)+ otherlv_3='end'
+ {
+ newLeafNode(otherlv_3, grammarAccess.getStatemachineAccess().getEndKeyword_1_2());
+ }
+)?( otherlv_4='resetEvents'
+ {
+ newLeafNode(otherlv_4, grammarAccess.getStatemachineAccess().getResetEventsKeyword_2_0());
+ }
+(
+(
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getStatemachineRule());
+ }
+ }
+ otherlv_5=RULE_ID
+ {
+ newLeafNode(otherlv_5, grammarAccess.getStatemachineAccess().getResetEventsEventCrossReference_2_1_0());
+ }
+
+)
+)+ otherlv_6='end'
+ {
+ newLeafNode(otherlv_6, grammarAccess.getStatemachineAccess().getEndKeyword_2_2());
+ }
+)?( otherlv_7='commands'
+ {
+ newLeafNode(otherlv_7, grammarAccess.getStatemachineAccess().getCommandsKeyword_3_0());
+ }
+(
+(
+ {
+ newCompositeNode(grammarAccess.getStatemachineAccess().getCommandsCommandParserRuleCall_3_1_0());
+ }
+ lv_commands_8_0=ruleCommand {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getStatemachineRule());
+ }
+ add(
+ $current,
+ "commands",
+ lv_commands_8_0,
+ "Command");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+)+ otherlv_9='end'
+ {
+ newLeafNode(otherlv_9, grammarAccess.getStatemachineAccess().getEndKeyword_3_2());
+ }
+)?(
+(
+ {
+ newCompositeNode(grammarAccess.getStatemachineAccess().getStatesStateParserRuleCall_4_0());
+ }
+ lv_states_10_0=ruleState {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getStatemachineRule());
+ }
+ add(
+ $current,
+ "states",
+ lv_states_10_0,
+ "State");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+)*)
+;
+
+
+
+
+
+// Entry rule entryRuleEvent
+entryRuleEvent returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getEventRule()); }
+ iv_ruleEvent=ruleEvent
+ { $current=$iv_ruleEvent.current; }
+ EOF
+;
+
+// Rule Event
+ruleEvent returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+((
+(
+ lv_name_0_0=RULE_ID
+ {
+ newLeafNode(lv_name_0_0, grammarAccess.getEventAccess().getNameIDTerminalRuleCall_0_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getEventRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "name",
+ lv_name_0_0,
+ "ID");
+ }
+
+)
+)(
+(
+ lv_code_1_0=RULE_ID
+ {
+ newLeafNode(lv_code_1_0, grammarAccess.getEventAccess().getCodeIDTerminalRuleCall_1_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getEventRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "code",
+ lv_code_1_0,
+ "ID");
+ }
+
+)
+))
+;
+
+
+
+
+
+// Entry rule entryRuleCommand
+entryRuleCommand returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getCommandRule()); }
+ iv_ruleCommand=ruleCommand
+ { $current=$iv_ruleCommand.current; }
+ EOF
+;
+
+// Rule Command
+ruleCommand returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+((
+(
+ lv_name_0_0=RULE_ID
+ {
+ newLeafNode(lv_name_0_0, grammarAccess.getCommandAccess().getNameIDTerminalRuleCall_0_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getCommandRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "name",
+ lv_name_0_0,
+ "ID");
+ }
+
+)
+)(
+(
+ lv_code_1_0=RULE_ID
+ {
+ newLeafNode(lv_code_1_0, grammarAccess.getCommandAccess().getCodeIDTerminalRuleCall_1_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getCommandRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "code",
+ lv_code_1_0,
+ "ID");
+ }
+
+)
+))
+;
+
+
+
+
+
+// Entry rule entryRuleState
+entryRuleState returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getStateRule()); }
+ iv_ruleState=ruleState
+ { $current=$iv_ruleState.current; }
+ EOF
+;
+
+// Rule State
+ruleState returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+( otherlv_0='state'
+ {
+ newLeafNode(otherlv_0, grammarAccess.getStateAccess().getStateKeyword_0());
+ }
+(
+(
+ lv_name_1_0=RULE_ID
+ {
+ newLeafNode(lv_name_1_0, grammarAccess.getStateAccess().getNameIDTerminalRuleCall_1_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getStateRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "name",
+ lv_name_1_0,
+ "ID");
+ }
+
+)
+)( otherlv_2='actions'
+ {
+ newLeafNode(otherlv_2, grammarAccess.getStateAccess().getActionsKeyword_2_0());
+ }
+ otherlv_3='{'
+ {
+ newLeafNode(otherlv_3, grammarAccess.getStateAccess().getLeftCurlyBracketKeyword_2_1());
+ }
+(
+(
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getStateRule());
+ }
+ }
+ otherlv_4=RULE_ID
+ {
+ newLeafNode(otherlv_4, grammarAccess.getStateAccess().getActionsCommandCrossReference_2_2_0());
+ }
+
+)
+)+ otherlv_5='}'
+ {
+ newLeafNode(otherlv_5, grammarAccess.getStateAccess().getRightCurlyBracketKeyword_2_3());
+ }
+)?(
+(
+ {
+ newCompositeNode(grammarAccess.getStateAccess().getTransitionsTransitionParserRuleCall_3_0());
+ }
+ lv_transitions_6_0=ruleTransition {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getStateRule());
+ }
+ add(
+ $current,
+ "transitions",
+ lv_transitions_6_0,
+ "Transition");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+)* otherlv_7='end'
+ {
+ newLeafNode(otherlv_7, grammarAccess.getStateAccess().getEndKeyword_4());
+ }
+)
+;
+
+
+
+
+
+// Entry rule entryRuleTransition
+entryRuleTransition returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getTransitionRule()); }
+ iv_ruleTransition=ruleTransition
+ { $current=$iv_ruleTransition.current; }
+ EOF
+;
+
+// Rule Transition
+ruleTransition returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+((
+(
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getTransitionRule());
+ }
+ }
+ otherlv_0=RULE_ID
+ {
+ newLeafNode(otherlv_0, grammarAccess.getTransitionAccess().getEventEventCrossReference_0_0());
+ }
+
+)
+) otherlv_1='=>'
+ {
+ newLeafNode(otherlv_1, grammarAccess.getTransitionAccess().getEqualsSignGreaterThanSignKeyword_1());
+ }
+(
+(
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getTransitionRule());
+ }
+ }
+ otherlv_2=RULE_ID
+ {
+ newLeafNode(otherlv_2, grammarAccess.getTransitionAccess().getStateStateCrossReference_2_0());
+ }
+
+)
+))
+;
+
+
+
+
+
+RULE_ID : '^'? ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*;
+
+RULE_INT : ('0'..'9')+;
+
+RULE_STRING : ('"' ('\\' ('b'|'t'|'n'|'f'|'r'|'u'|'"'|'\''|'\\')|~(('\\'|'"')))* '"'|'\'' ('\\' ('b'|'t'|'n'|'f'|'r'|'u'|'"'|'\''|'\\')|~(('\\'|'\'')))* '\'');
+
+RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )*'*/';
+
+RULE_SL_COMMENT : '//' ~(('\n'|'\r'))* ('\r'? '\n')?;
+
+RULE_WS : (' '|'\t'|'\r'|'\n')+;
+
+RULE_ANY_OTHER : .;
+
+
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.tokens b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.tokens
new file mode 100644
index 0000000..c40aca9
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.tokens
@@ -0,0 +1,25 @@
+RULE_ID=4
+RULE_ANY_OTHER=10
+RULE_SL_COMMENT=8
+RULE_ML_COMMENT=7
+T__19=19
+RULE_STRING=6
+T__16=16
+T__15=15
+T__18=18
+T__17=17
+T__12=12
+T__11=11
+T__14=14
+T__13=13
+RULE_INT=5
+RULE_WS=9
+'state'=15
+'end'=12
+'}'=18
+'actions'=16
+'commands'=14
+'=>'=19
+'events'=11
+'{'=17
+'resetEvents'=13
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachineLexer.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachineLexer.java
new file mode 100644
index 0000000..b7d2d6d
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachineLexer.java
@@ -0,0 +1,1072 @@
+package org.eclipse.xtext.example.fowlerdsl.parser.antlr.internal;
+
+// Hack: Use our own Lexer superclass by means of import.
+// Currently there is no other way to specify the superclass for the lexer.
+import org.eclipse.xtext.parser.antlr.Lexer;
+
+
+import org.antlr.runtime.*;
+import java.util.Stack;
+import java.util.List;
+import java.util.ArrayList;
+
+@SuppressWarnings("all")
+public class InternalStatemachineLexer extends Lexer {
+ public static final int RULE_ID=4;
+ public static final int RULE_ANY_OTHER=10;
+ public static final int RULE_SL_COMMENT=8;
+ public static final int EOF=-1;
+ public static final int RULE_ML_COMMENT=7;
+ public static final int T__19=19;
+ public static final int RULE_STRING=6;
+ public static final int T__16=16;
+ public static final int T__15=15;
+ public static final int T__18=18;
+ public static final int T__17=17;
+ public static final int T__12=12;
+ public static final int T__11=11;
+ public static final int T__14=14;
+ public static final int T__13=13;
+ public static final int RULE_INT=5;
+ public static final int RULE_WS=9;
+
+ // delegates
+ // delegators
+
+ public InternalStatemachineLexer() {;}
+ public InternalStatemachineLexer(CharStream input) {
+ this(input, new RecognizerSharedState());
+ }
+ public InternalStatemachineLexer(CharStream input, RecognizerSharedState state) {
+ super(input,state);
+
+ }
+ public String getGrammarFileName() { return "../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g"; }
+
+ // $ANTLR start "T__11"
+ public final void mT__11() throws RecognitionException {
+ try {
+ int _type = T__11;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:11:7: ( 'events' )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:11:9: 'events'
+ {
+ match("events");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__11"
+
+ // $ANTLR start "T__12"
+ public final void mT__12() throws RecognitionException {
+ try {
+ int _type = T__12;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:12:7: ( 'end' )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:12:9: 'end'
+ {
+ match("end");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__12"
+
+ // $ANTLR start "T__13"
+ public final void mT__13() throws RecognitionException {
+ try {
+ int _type = T__13;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:13:7: ( 'resetEvents' )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:13:9: 'resetEvents'
+ {
+ match("resetEvents");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__13"
+
+ // $ANTLR start "T__14"
+ public final void mT__14() throws RecognitionException {
+ try {
+ int _type = T__14;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:14:7: ( 'commands' )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:14:9: 'commands'
+ {
+ match("commands");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__14"
+
+ // $ANTLR start "T__15"
+ public final void mT__15() throws RecognitionException {
+ try {
+ int _type = T__15;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:15:7: ( 'state' )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:15:9: 'state'
+ {
+ match("state");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__15"
+
+ // $ANTLR start "T__16"
+ public final void mT__16() throws RecognitionException {
+ try {
+ int _type = T__16;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:16:7: ( 'actions' )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:16:9: 'actions'
+ {
+ match("actions");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__16"
+
+ // $ANTLR start "T__17"
+ public final void mT__17() throws RecognitionException {
+ try {
+ int _type = T__17;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:17:7: ( '{' )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:17:9: '{'
+ {
+ match('{');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__17"
+
+ // $ANTLR start "T__18"
+ public final void mT__18() throws RecognitionException {
+ try {
+ int _type = T__18;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:18:7: ( '}' )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:18:9: '}'
+ {
+ match('}');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__18"
+
+ // $ANTLR start "T__19"
+ public final void mT__19() throws RecognitionException {
+ try {
+ int _type = T__19;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:19:7: ( '=>' )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:19:9: '=>'
+ {
+ match("=>");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__19"
+
+ // $ANTLR start "RULE_ID"
+ public final void mRULE_ID() throws RecognitionException {
+ try {
+ int _type = RULE_ID;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:439:9: ( ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:439:11: ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:439:11: ( '^' )?
+ int alt1=2;
+ int LA1_0 = input.LA(1);
+
+ if ( (LA1_0=='^') ) {
+ alt1=1;
+ }
+ switch (alt1) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:439:11: '^'
+ {
+ match('^');
+
+ }
+ break;
+
+ }
+
+ if ( (input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:439:40: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
+ loop2:
+ do {
+ int alt2=2;
+ int LA2_0 = input.LA(1);
+
+ if ( ((LA2_0>='0' && LA2_0<='9')||(LA2_0>='A' && LA2_0<='Z')||LA2_0=='_'||(LA2_0>='a' && LA2_0<='z')) ) {
+ alt2=1;
+ }
+
+
+ switch (alt2) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:
+ {
+ if ( (input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+
+ default :
+ break loop2;
+ }
+ } while (true);
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_ID"
+
+ // $ANTLR start "RULE_INT"
+ public final void mRULE_INT() throws RecognitionException {
+ try {
+ int _type = RULE_INT;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:441:10: ( ( '0' .. '9' )+ )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:441:12: ( '0' .. '9' )+
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:441:12: ( '0' .. '9' )+
+ int cnt3=0;
+ loop3:
+ do {
+ int alt3=2;
+ int LA3_0 = input.LA(1);
+
+ if ( ((LA3_0>='0' && LA3_0<='9')) ) {
+ alt3=1;
+ }
+
+
+ switch (alt3) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:441:13: '0' .. '9'
+ {
+ matchRange('0','9');
+
+ }
+ break;
+
+ default :
+ if ( cnt3 >= 1 ) break loop3;
+ EarlyExitException eee =
+ new EarlyExitException(3, input);
+ throw eee;
+ }
+ cnt3++;
+ } while (true);
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_INT"
+
+ // $ANTLR start "RULE_STRING"
+ public final void mRULE_STRING() throws RecognitionException {
+ try {
+ int _type = RULE_STRING;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:443:13: ( ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:443:15: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:443:15: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
+ int alt6=2;
+ int LA6_0 = input.LA(1);
+
+ if ( (LA6_0=='\"') ) {
+ alt6=1;
+ }
+ else if ( (LA6_0=='\'') ) {
+ alt6=2;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("", 6, 0, input);
+
+ throw nvae;
+ }
+ switch (alt6) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:443:16: '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"'
+ {
+ match('\"');
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:443:20: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )*
+ loop4:
+ do {
+ int alt4=3;
+ int LA4_0 = input.LA(1);
+
+ if ( (LA4_0=='\\') ) {
+ alt4=1;
+ }
+ else if ( ((LA4_0>='\u0000' && LA4_0<='!')||(LA4_0>='#' && LA4_0<='[')||(LA4_0>=']' && LA4_0<='\uFFFF')) ) {
+ alt4=2;
+ }
+
+
+ switch (alt4) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:443:21: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' )
+ {
+ match('\\');
+ if ( input.LA(1)=='\"'||input.LA(1)=='\''||input.LA(1)=='\\'||input.LA(1)=='b'||input.LA(1)=='f'||input.LA(1)=='n'||input.LA(1)=='r'||(input.LA(1)>='t' && input.LA(1)<='u') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+ case 2 :
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:443:66: ~ ( ( '\\\\' | '\"' ) )
+ {
+ if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+
+ default :
+ break loop4;
+ }
+ } while (true);
+
+ match('\"');
+
+ }
+ break;
+ case 2 :
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:443:86: '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\''
+ {
+ match('\'');
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:443:91: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )*
+ loop5:
+ do {
+ int alt5=3;
+ int LA5_0 = input.LA(1);
+
+ if ( (LA5_0=='\\') ) {
+ alt5=1;
+ }
+ else if ( ((LA5_0>='\u0000' && LA5_0<='&')||(LA5_0>='(' && LA5_0<='[')||(LA5_0>=']' && LA5_0<='\uFFFF')) ) {
+ alt5=2;
+ }
+
+
+ switch (alt5) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:443:92: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' )
+ {
+ match('\\');
+ if ( input.LA(1)=='\"'||input.LA(1)=='\''||input.LA(1)=='\\'||input.LA(1)=='b'||input.LA(1)=='f'||input.LA(1)=='n'||input.LA(1)=='r'||(input.LA(1)>='t' && input.LA(1)<='u') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+ case 2 :
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:443:137: ~ ( ( '\\\\' | '\\'' ) )
+ {
+ if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+
+ default :
+ break loop5;
+ }
+ } while (true);
+
+ match('\'');
+
+ }
+ break;
+
+ }
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_STRING"
+
+ // $ANTLR start "RULE_ML_COMMENT"
+ public final void mRULE_ML_COMMENT() throws RecognitionException {
+ try {
+ int _type = RULE_ML_COMMENT;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:445:17: ( '/*' ( options {greedy=false; } : . )* '*/' )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:445:19: '/*' ( options {greedy=false; } : . )* '*/'
+ {
+ match("/*");
+
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:445:24: ( options {greedy=false; } : . )*
+ loop7:
+ do {
+ int alt7=2;
+ int LA7_0 = input.LA(1);
+
+ if ( (LA7_0=='*') ) {
+ int LA7_1 = input.LA(2);
+
+ if ( (LA7_1=='/') ) {
+ alt7=2;
+ }
+ else if ( ((LA7_1>='\u0000' && LA7_1<='.')||(LA7_1>='0' && LA7_1<='\uFFFF')) ) {
+ alt7=1;
+ }
+
+
+ }
+ else if ( ((LA7_0>='\u0000' && LA7_0<=')')||(LA7_0>='+' && LA7_0<='\uFFFF')) ) {
+ alt7=1;
+ }
+
+
+ switch (alt7) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:445:52: .
+ {
+ matchAny();
+
+ }
+ break;
+
+ default :
+ break loop7;
+ }
+ } while (true);
+
+ match("*/");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_ML_COMMENT"
+
+ // $ANTLR start "RULE_SL_COMMENT"
+ public final void mRULE_SL_COMMENT() throws RecognitionException {
+ try {
+ int _type = RULE_SL_COMMENT;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:447:17: ( '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:447:19: '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
+ {
+ match("//");
+
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:447:24: (~ ( ( '\\n' | '\\r' ) ) )*
+ loop8:
+ do {
+ int alt8=2;
+ int LA8_0 = input.LA(1);
+
+ if ( ((LA8_0>='\u0000' && LA8_0<='\t')||(LA8_0>='\u000B' && LA8_0<='\f')||(LA8_0>='\u000E' && LA8_0<='\uFFFF')) ) {
+ alt8=1;
+ }
+
+
+ switch (alt8) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:447:24: ~ ( ( '\\n' | '\\r' ) )
+ {
+ if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFF') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+
+ default :
+ break loop8;
+ }
+ } while (true);
+
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:447:40: ( ( '\\r' )? '\\n' )?
+ int alt10=2;
+ int LA10_0 = input.LA(1);
+
+ if ( (LA10_0=='\n'||LA10_0=='\r') ) {
+ alt10=1;
+ }
+ switch (alt10) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:447:41: ( '\\r' )? '\\n'
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:447:41: ( '\\r' )?
+ int alt9=2;
+ int LA9_0 = input.LA(1);
+
+ if ( (LA9_0=='\r') ) {
+ alt9=1;
+ }
+ switch (alt9) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:447:41: '\\r'
+ {
+ match('\r');
+
+ }
+ break;
+
+ }
+
+ match('\n');
+
+ }
+ break;
+
+ }
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_SL_COMMENT"
+
+ // $ANTLR start "RULE_WS"
+ public final void mRULE_WS() throws RecognitionException {
+ try {
+ int _type = RULE_WS;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:449:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:449:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:449:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
+ int cnt11=0;
+ loop11:
+ do {
+ int alt11=2;
+ int LA11_0 = input.LA(1);
+
+ if ( ((LA11_0>='\t' && LA11_0<='\n')||LA11_0=='\r'||LA11_0==' ') ) {
+ alt11=1;
+ }
+
+
+ switch (alt11) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:
+ {
+ if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)=='\r'||input.LA(1)==' ' ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+
+ default :
+ if ( cnt11 >= 1 ) break loop11;
+ EarlyExitException eee =
+ new EarlyExitException(11, input);
+ throw eee;
+ }
+ cnt11++;
+ } while (true);
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_WS"
+
+ // $ANTLR start "RULE_ANY_OTHER"
+ public final void mRULE_ANY_OTHER() throws RecognitionException {
+ try {
+ int _type = RULE_ANY_OTHER;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:451:16: ( . )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:451:18: .
+ {
+ matchAny();
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_ANY_OTHER"
+
+ public void mTokens() throws RecognitionException {
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:1:8: ( T__11 | T__12 | T__13 | T__14 | T__15 | T__16 | T__17 | T__18 | T__19 | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER )
+ int alt12=16;
+ alt12 = dfa12.predict(input);
+ switch (alt12) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:1:10: T__11
+ {
+ mT__11();
+
+ }
+ break;
+ case 2 :
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:1:16: T__12
+ {
+ mT__12();
+
+ }
+ break;
+ case 3 :
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:1:22: T__13
+ {
+ mT__13();
+
+ }
+ break;
+ case 4 :
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:1:28: T__14
+ {
+ mT__14();
+
+ }
+ break;
+ case 5 :
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:1:34: T__15
+ {
+ mT__15();
+
+ }
+ break;
+ case 6 :
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:1:40: T__16
+ {
+ mT__16();
+
+ }
+ break;
+ case 7 :
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:1:46: T__17
+ {
+ mT__17();
+
+ }
+ break;
+ case 8 :
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:1:52: T__18
+ {
+ mT__18();
+
+ }
+ break;
+ case 9 :
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:1:58: T__19
+ {
+ mT__19();
+
+ }
+ break;
+ case 10 :
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:1:64: RULE_ID
+ {
+ mRULE_ID();
+
+ }
+ break;
+ case 11 :
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:1:72: RULE_INT
+ {
+ mRULE_INT();
+
+ }
+ break;
+ case 12 :
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:1:81: RULE_STRING
+ {
+ mRULE_STRING();
+
+ }
+ break;
+ case 13 :
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:1:93: RULE_ML_COMMENT
+ {
+ mRULE_ML_COMMENT();
+
+ }
+ break;
+ case 14 :
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:1:109: RULE_SL_COMMENT
+ {
+ mRULE_SL_COMMENT();
+
+ }
+ break;
+ case 15 :
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:1:125: RULE_WS
+ {
+ mRULE_WS();
+
+ }
+ break;
+ case 16 :
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:1:133: RULE_ANY_OTHER
+ {
+ mRULE_ANY_OTHER();
+
+ }
+ break;
+
+ }
+
+ }
+
+
+ protected DFA12 dfa12 = new DFA12(this);
+ static final String DFA12_eotS =
+ "\1\uffff\5\23\2\uffff\2\20\2\uffff\3\20\2\uffff\2\23\1\uffff\4\23"+
+ "\10\uffff\1\23\1\47\5\23\1\uffff\7\23\1\64\1\23\1\66\2\23\1\uffff"+
+ "\1\23\1\uffff\2\23\1\74\1\23\1\76\1\uffff\1\23\1\uffff\1\23\1\101"+
+ "\1\uffff";
+ static final String DFA12_eofS =
+ "\102\uffff";
+ static final String DFA12_minS =
+ "\1\0\1\156\1\145\1\157\1\164\1\143\2\uffff\1\76\1\101\2\uffff\2"+
+ "\0\1\52\2\uffff\1\145\1\144\1\uffff\1\163\1\155\1\141\1\164\10\uffff"+
+ "\1\156\1\60\1\145\1\155\1\164\1\151\1\164\1\uffff\1\164\1\141\1"+
+ "\145\1\157\1\163\1\105\1\156\1\60\1\156\1\60\1\166\1\144\1\uffff"+
+ "\1\163\1\uffff\1\145\1\163\1\60\1\156\1\60\1\uffff\1\164\1\uffff"+
+ "\1\163\1\60\1\uffff";
+ static final String DFA12_maxS =
+ "\1\uffff\1\166\1\145\1\157\1\164\1\143\2\uffff\1\76\1\172\2\uffff"+
+ "\2\uffff\1\57\2\uffff\1\145\1\144\1\uffff\1\163\1\155\1\141\1\164"+
+ "\10\uffff\1\156\1\172\1\145\1\155\1\164\1\151\1\164\1\uffff\1\164"+
+ "\1\141\1\145\1\157\1\163\1\105\1\156\1\172\1\156\1\172\1\166\1\144"+
+ "\1\uffff\1\163\1\uffff\1\145\1\163\1\172\1\156\1\172\1\uffff\1\164"+
+ "\1\uffff\1\163\1\172\1\uffff";
+ static final String DFA12_acceptS =
+ "\6\uffff\1\7\1\10\2\uffff\1\12\1\13\3\uffff\1\17\1\20\2\uffff\1"+
+ "\12\4\uffff\1\7\1\10\1\11\1\13\1\14\1\15\1\16\1\17\7\uffff\1\2\14"+
+ "\uffff\1\5\1\uffff\1\1\5\uffff\1\6\1\uffff\1\4\2\uffff\1\3";
+ static final String DFA12_specialS =
+ "\1\1\13\uffff\1\2\1\0\64\uffff}>";
+ static final String[] DFA12_transitionS = {
+ "\11\20\2\17\2\20\1\17\22\20\1\17\1\20\1\14\4\20\1\15\7\20\1"+
+ "\16\12\13\3\20\1\10\3\20\32\12\3\20\1\11\1\12\1\20\1\5\1\12"+
+ "\1\3\1\12\1\1\14\12\1\2\1\4\7\12\1\6\1\20\1\7\uff82\20",
+ "\1\22\7\uffff\1\21",
+ "\1\24",
+ "\1\25",
+ "\1\26",
+ "\1\27",
+ "",
+ "",
+ "\1\32",
+ "\32\23\4\uffff\1\23\1\uffff\32\23",
+ "",
+ "",
+ "\0\34",
+ "\0\34",
+ "\1\35\4\uffff\1\36",
+ "",
+ "",
+ "\1\40",
+ "\1\41",
+ "",
+ "\1\42",
+ "\1\43",
+ "\1\44",
+ "\1\45",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "\1\46",
+ "\12\23\7\uffff\32\23\4\uffff\1\23\1\uffff\32\23",
+ "\1\50",
+ "\1\51",
+ "\1\52",
+ "\1\53",
+ "\1\54",
+ "",
+ "\1\55",
+ "\1\56",
+ "\1\57",
+ "\1\60",
+ "\1\61",
+ "\1\62",
+ "\1\63",
+ "\12\23\7\uffff\32\23\4\uffff\1\23\1\uffff\32\23",
+ "\1\65",
+ "\12\23\7\uffff\32\23\4\uffff\1\23\1\uffff\32\23",
+ "\1\67",
+ "\1\70",
+ "",
+ "\1\71",
+ "",
+ "\1\72",
+ "\1\73",
+ "\12\23\7\uffff\32\23\4\uffff\1\23\1\uffff\32\23",
+ "\1\75",
+ "\12\23\7\uffff\32\23\4\uffff\1\23\1\uffff\32\23",
+ "",
+ "\1\77",
+ "",
+ "\1\100",
+ "\12\23\7\uffff\32\23\4\uffff\1\23\1\uffff\32\23",
+ ""
+ };
+
+ static final short[] DFA12_eot = DFA.unpackEncodedString(DFA12_eotS);
+ static final short[] DFA12_eof = DFA.unpackEncodedString(DFA12_eofS);
+ static final char[] DFA12_min = DFA.unpackEncodedStringToUnsignedChars(DFA12_minS);
+ static final char[] DFA12_max = DFA.unpackEncodedStringToUnsignedChars(DFA12_maxS);
+ static final short[] DFA12_accept = DFA.unpackEncodedString(DFA12_acceptS);
+ static final short[] DFA12_special = DFA.unpackEncodedString(DFA12_specialS);
+ static final short[][] DFA12_transition;
+
+ static {
+ int numStates = DFA12_transitionS.length;
+ DFA12_transition = new short[numStates][];
+ for (int i=0; i<numStates; i++) {
+ DFA12_transition[i] = DFA.unpackEncodedString(DFA12_transitionS[i]);
+ }
+ }
+
+ class DFA12 extends DFA {
+
+ public DFA12(BaseRecognizer recognizer) {
+ this.recognizer = recognizer;
+ this.decisionNumber = 12;
+ this.eot = DFA12_eot;
+ this.eof = DFA12_eof;
+ this.min = DFA12_min;
+ this.max = DFA12_max;
+ this.accept = DFA12_accept;
+ this.special = DFA12_special;
+ this.transition = DFA12_transition;
+ }
+ public String getDescription() {
+ return "1:1: Tokens : ( T__11 | T__12 | T__13 | T__14 | T__15 | T__16 | T__17 | T__18 | T__19 | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER );";
+ }
+ public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
+ IntStream input = _input;
+ int _s = s;
+ switch ( s ) {
+ case 0 :
+ int LA12_13 = input.LA(1);
+
+ s = -1;
+ if ( ((LA12_13>='\u0000' && LA12_13<='\uFFFF')) ) {s = 28;}
+
+ else s = 16;
+
+ if ( s>=0 ) return s;
+ break;
+ case 1 :
+ int LA12_0 = input.LA(1);
+
+ s = -1;
+ if ( (LA12_0=='e') ) {s = 1;}
+
+ else if ( (LA12_0=='r') ) {s = 2;}
+
+ else if ( (LA12_0=='c') ) {s = 3;}
+
+ else if ( (LA12_0=='s') ) {s = 4;}
+
+ else if ( (LA12_0=='a') ) {s = 5;}
+
+ else if ( (LA12_0=='{') ) {s = 6;}
+
+ else if ( (LA12_0=='}') ) {s = 7;}
+
+ else if ( (LA12_0=='=') ) {s = 8;}
+
+ else if ( (LA12_0=='^') ) {s = 9;}
+
+ else if ( ((LA12_0>='A' && LA12_0<='Z')||LA12_0=='_'||LA12_0=='b'||LA12_0=='d'||(LA12_0>='f' && LA12_0<='q')||(LA12_0>='t' && LA12_0<='z')) ) {s = 10;}
+
+ else if ( ((LA12_0>='0' && LA12_0<='9')) ) {s = 11;}
+
+ else if ( (LA12_0=='\"') ) {s = 12;}
+
+ else if ( (LA12_0=='\'') ) {s = 13;}
+
+ else if ( (LA12_0=='/') ) {s = 14;}
+
+ else if ( ((LA12_0>='\t' && LA12_0<='\n')||LA12_0=='\r'||LA12_0==' ') ) {s = 15;}
+
+ else if ( ((LA12_0>='\u0000' && LA12_0<='\b')||(LA12_0>='\u000B' && LA12_0<='\f')||(LA12_0>='\u000E' && LA12_0<='\u001F')||LA12_0=='!'||(LA12_0>='#' && LA12_0<='&')||(LA12_0>='(' && LA12_0<='.')||(LA12_0>=':' && LA12_0<='<')||(LA12_0>='>' && LA12_0<='@')||(LA12_0>='[' && LA12_0<=']')||LA12_0=='`'||LA12_0=='|'||(LA12_0>='~' && LA12_0<='\uFFFF')) ) {s = 16;}
+
+ if ( s>=0 ) return s;
+ break;
+ case 2 :
+ int LA12_12 = input.LA(1);
+
+ s = -1;
+ if ( ((LA12_12>='\u0000' && LA12_12<='\uFFFF')) ) {s = 28;}
+
+ else s = 16;
+
+ if ( s>=0 ) return s;
+ break;
+ }
+ NoViableAltException nvae =
+ new NoViableAltException(getDescription(), 12, _s, input);
+ error(nvae);
+ throw nvae;
+ }
+ }
+
+
+}
\ No newline at end of file
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachineParser.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachineParser.java
new file mode 100644
index 0000000..c05b338
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachineParser.java
@@ -0,0 +1,1099 @@
+package org.eclipse.xtext.example.fowlerdsl.parser.antlr.internal;
+
+import org.eclipse.xtext.*;
+import org.eclipse.xtext.parser.*;
+import org.eclipse.xtext.parser.impl.*;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens;
+import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken;
+import org.eclipse.xtext.example.fowlerdsl.services.StatemachineGrammarAccess;
+
+
+
+import org.antlr.runtime.*;
+import java.util.Stack;
+import java.util.List;
+import java.util.ArrayList;
+
+@SuppressWarnings("all")
+public class InternalStatemachineParser extends AbstractInternalAntlrParser {
+ public static final String[] tokenNames = new String[] {
+ "<invalid>", "<EOR>", "<DOWN>", "<UP>", "RULE_ID", "RULE_INT", "RULE_STRING", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS", "RULE_ANY_OTHER", "'events'", "'end'", "'resetEvents'", "'commands'", "'state'", "'actions'", "'{'", "'}'", "'=>'"
+ };
+ public static final int RULE_ID=4;
+ public static final int RULE_ANY_OTHER=10;
+ public static final int EOF=-1;
+ public static final int RULE_SL_COMMENT=8;
+ public static final int RULE_ML_COMMENT=7;
+ public static final int T__19=19;
+ public static final int RULE_STRING=6;
+ public static final int T__16=16;
+ public static final int T__15=15;
+ public static final int T__18=18;
+ public static final int T__17=17;
+ public static final int T__12=12;
+ public static final int T__11=11;
+ public static final int T__14=14;
+ public static final int T__13=13;
+ public static final int RULE_INT=5;
+ public static final int RULE_WS=9;
+
+ // delegates
+ // delegators
+
+
+ public InternalStatemachineParser(TokenStream input) {
+ this(input, new RecognizerSharedState());
+ }
+ public InternalStatemachineParser(TokenStream input, RecognizerSharedState state) {
+ super(input, state);
+
+ }
+
+
+ public String[] getTokenNames() { return InternalStatemachineParser.tokenNames; }
+ public String getGrammarFileName() { return "../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g"; }
+
+
+
+ private StatemachineGrammarAccess grammarAccess;
+
+ public InternalStatemachineParser(TokenStream input, StatemachineGrammarAccess grammarAccess) {
+ this(input);
+ this.grammarAccess = grammarAccess;
+ registerRules(grammarAccess.getGrammar());
+ }
+
+ @Override
+ protected String getFirstRuleName() {
+ return "Statemachine";
+ }
+
+ @Override
+ protected StatemachineGrammarAccess getGrammarAccess() {
+ return grammarAccess;
+ }
+
+
+
+ // $ANTLR start "entryRuleStatemachine"
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:67:1: entryRuleStatemachine returns [EObject current=null] : iv_ruleStatemachine= ruleStatemachine EOF ;
+ public final EObject entryRuleStatemachine() throws RecognitionException {
+ EObject current = null;
+
+ EObject iv_ruleStatemachine = null;
+
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:68:2: (iv_ruleStatemachine= ruleStatemachine EOF )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:69:2: iv_ruleStatemachine= ruleStatemachine EOF
+ {
+ newCompositeNode(grammarAccess.getStatemachineRule());
+ pushFollow(FOLLOW_ruleStatemachine_in_entryRuleStatemachine75);
+ iv_ruleStatemachine=ruleStatemachine();
+
+ state._fsp--;
+
+ current =iv_ruleStatemachine;
+ match(input,EOF,FOLLOW_EOF_in_entryRuleStatemachine85);
+
+ }
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "entryRuleStatemachine"
+
+
+ // $ANTLR start "ruleStatemachine"
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:76:1: ruleStatemachine returns [EObject current=null] : ( () (otherlv_1= 'events' ( (lv_events_2_0= ruleEvent ) )+ otherlv_3= 'end' )? (otherlv_4= 'resetEvents' ( (otherlv_5= RULE_ID ) )+ otherlv_6= 'end' )? (otherlv_7= 'commands' ( (lv_commands_8_0= ruleCommand ) )+ otherlv_9= 'end' )? ( (lv_states_10_0= ruleState ) )* ) ;
+ public final EObject ruleStatemachine() throws RecognitionException {
+ EObject current = null;
+
+ Token otherlv_1=null;
+ Token otherlv_3=null;
+ Token otherlv_4=null;
+ Token otherlv_5=null;
+ Token otherlv_6=null;
+ Token otherlv_7=null;
+ Token otherlv_9=null;
+ EObject lv_events_2_0 = null;
+
+ EObject lv_commands_8_0 = null;
+
+ EObject lv_states_10_0 = null;
+
+
+ enterRule();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:79:28: ( ( () (otherlv_1= 'events' ( (lv_events_2_0= ruleEvent ) )+ otherlv_3= 'end' )? (otherlv_4= 'resetEvents' ( (otherlv_5= RULE_ID ) )+ otherlv_6= 'end' )? (otherlv_7= 'commands' ( (lv_commands_8_0= ruleCommand ) )+ otherlv_9= 'end' )? ( (lv_states_10_0= ruleState ) )* ) )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:80:1: ( () (otherlv_1= 'events' ( (lv_events_2_0= ruleEvent ) )+ otherlv_3= 'end' )? (otherlv_4= 'resetEvents' ( (otherlv_5= RULE_ID ) )+ otherlv_6= 'end' )? (otherlv_7= 'commands' ( (lv_commands_8_0= ruleCommand ) )+ otherlv_9= 'end' )? ( (lv_states_10_0= ruleState ) )* )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:80:1: ( () (otherlv_1= 'events' ( (lv_events_2_0= ruleEvent ) )+ otherlv_3= 'end' )? (otherlv_4= 'resetEvents' ( (otherlv_5= RULE_ID ) )+ otherlv_6= 'end' )? (otherlv_7= 'commands' ( (lv_commands_8_0= ruleCommand ) )+ otherlv_9= 'end' )? ( (lv_states_10_0= ruleState ) )* )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:80:2: () (otherlv_1= 'events' ( (lv_events_2_0= ruleEvent ) )+ otherlv_3= 'end' )? (otherlv_4= 'resetEvents' ( (otherlv_5= RULE_ID ) )+ otherlv_6= 'end' )? (otherlv_7= 'commands' ( (lv_commands_8_0= ruleCommand ) )+ otherlv_9= 'end' )? ( (lv_states_10_0= ruleState ) )*
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:80:2: ()
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:81:5:
+ {
+
+ current = forceCreateModelElement(
+ grammarAccess.getStatemachineAccess().getStatemachineAction_0(),
+ current);
+
+
+ }
+
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:86:2: (otherlv_1= 'events' ( (lv_events_2_0= ruleEvent ) )+ otherlv_3= 'end' )?
+ int alt2=2;
+ int LA2_0 = input.LA(1);
+
+ if ( (LA2_0==11) ) {
+ alt2=1;
+ }
+ switch (alt2) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:86:4: otherlv_1= 'events' ( (lv_events_2_0= ruleEvent ) )+ otherlv_3= 'end'
+ {
+ otherlv_1=(Token)match(input,11,FOLLOW_11_in_ruleStatemachine132);
+
+ newLeafNode(otherlv_1, grammarAccess.getStatemachineAccess().getEventsKeyword_1_0());
+
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:90:1: ( (lv_events_2_0= ruleEvent ) )+
+ int cnt1=0;
+ loop1:
+ do {
+ int alt1=2;
+ int LA1_0 = input.LA(1);
+
+ if ( (LA1_0==RULE_ID) ) {
+ alt1=1;
+ }
+
+
+ switch (alt1) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:91:1: (lv_events_2_0= ruleEvent )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:91:1: (lv_events_2_0= ruleEvent )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:92:3: lv_events_2_0= ruleEvent
+ {
+
+ newCompositeNode(grammarAccess.getStatemachineAccess().getEventsEventParserRuleCall_1_1_0());
+
+ pushFollow(FOLLOW_ruleEvent_in_ruleStatemachine153);
+ lv_events_2_0=ruleEvent();
+
+ state._fsp--;
+
+
+ if (current==null) {
+ current = createModelElementForParent(grammarAccess.getStatemachineRule());
+ }
+ add(
+ current,
+ "events",
+ lv_events_2_0,
+ "Event");
+ afterParserOrEnumRuleCall();
+
+
+ }
+
+
+ }
+ break;
+
+ default :
+ if ( cnt1 >= 1 ) break loop1;
+ EarlyExitException eee =
+ new EarlyExitException(1, input);
+ throw eee;
+ }
+ cnt1++;
+ } while (true);
+
+ otherlv_3=(Token)match(input,12,FOLLOW_12_in_ruleStatemachine166);
+
+ newLeafNode(otherlv_3, grammarAccess.getStatemachineAccess().getEndKeyword_1_2());
+
+
+ }
+ break;
+
+ }
+
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:112:3: (otherlv_4= 'resetEvents' ( (otherlv_5= RULE_ID ) )+ otherlv_6= 'end' )?
+ int alt4=2;
+ int LA4_0 = input.LA(1);
+
+ if ( (LA4_0==13) ) {
+ alt4=1;
+ }
+ switch (alt4) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:112:5: otherlv_4= 'resetEvents' ( (otherlv_5= RULE_ID ) )+ otherlv_6= 'end'
+ {
+ otherlv_4=(Token)match(input,13,FOLLOW_13_in_ruleStatemachine181);
+
+ newLeafNode(otherlv_4, grammarAccess.getStatemachineAccess().getResetEventsKeyword_2_0());
+
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:116:1: ( (otherlv_5= RULE_ID ) )+
+ int cnt3=0;
+ loop3:
+ do {
+ int alt3=2;
+ int LA3_0 = input.LA(1);
+
+ if ( (LA3_0==RULE_ID) ) {
+ alt3=1;
+ }
+
+
+ switch (alt3) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:117:1: (otherlv_5= RULE_ID )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:117:1: (otherlv_5= RULE_ID )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:118:3: otherlv_5= RULE_ID
+ {
+
+ if (current==null) {
+ current = createModelElement(grammarAccess.getStatemachineRule());
+ }
+
+ otherlv_5=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleStatemachine201);
+
+ newLeafNode(otherlv_5, grammarAccess.getStatemachineAccess().getResetEventsEventCrossReference_2_1_0());
+
+
+ }
+
+
+ }
+ break;
+
+ default :
+ if ( cnt3 >= 1 ) break loop3;
+ EarlyExitException eee =
+ new EarlyExitException(3, input);
+ throw eee;
+ }
+ cnt3++;
+ } while (true);
+
+ otherlv_6=(Token)match(input,12,FOLLOW_12_in_ruleStatemachine214);
+
+ newLeafNode(otherlv_6, grammarAccess.getStatemachineAccess().getEndKeyword_2_2());
+
+
+ }
+ break;
+
+ }
+
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:133:3: (otherlv_7= 'commands' ( (lv_commands_8_0= ruleCommand ) )+ otherlv_9= 'end' )?
+ int alt6=2;
+ int LA6_0 = input.LA(1);
+
+ if ( (LA6_0==14) ) {
+ alt6=1;
+ }
+ switch (alt6) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:133:5: otherlv_7= 'commands' ( (lv_commands_8_0= ruleCommand ) )+ otherlv_9= 'end'
+ {
+ otherlv_7=(Token)match(input,14,FOLLOW_14_in_ruleStatemachine229);
+
+ newLeafNode(otherlv_7, grammarAccess.getStatemachineAccess().getCommandsKeyword_3_0());
+
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:137:1: ( (lv_commands_8_0= ruleCommand ) )+
+ int cnt5=0;
+ loop5:
+ do {
+ int alt5=2;
+ int LA5_0 = input.LA(1);
+
+ if ( (LA5_0==RULE_ID) ) {
+ alt5=1;
+ }
+
+
+ switch (alt5) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:138:1: (lv_commands_8_0= ruleCommand )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:138:1: (lv_commands_8_0= ruleCommand )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:139:3: lv_commands_8_0= ruleCommand
+ {
+
+ newCompositeNode(grammarAccess.getStatemachineAccess().getCommandsCommandParserRuleCall_3_1_0());
+
+ pushFollow(FOLLOW_ruleCommand_in_ruleStatemachine250);
+ lv_commands_8_0=ruleCommand();
+
+ state._fsp--;
+
+
+ if (current==null) {
+ current = createModelElementForParent(grammarAccess.getStatemachineRule());
+ }
+ add(
+ current,
+ "commands",
+ lv_commands_8_0,
+ "Command");
+ afterParserOrEnumRuleCall();
+
+
+ }
+
+
+ }
+ break;
+
+ default :
+ if ( cnt5 >= 1 ) break loop5;
+ EarlyExitException eee =
+ new EarlyExitException(5, input);
+ throw eee;
+ }
+ cnt5++;
+ } while (true);
+
+ otherlv_9=(Token)match(input,12,FOLLOW_12_in_ruleStatemachine263);
+
+ newLeafNode(otherlv_9, grammarAccess.getStatemachineAccess().getEndKeyword_3_2());
+
+
+ }
+ break;
+
+ }
+
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:159:3: ( (lv_states_10_0= ruleState ) )*
+ loop7:
+ do {
+ int alt7=2;
+ int LA7_0 = input.LA(1);
+
+ if ( (LA7_0==15) ) {
+ alt7=1;
+ }
+
+
+ switch (alt7) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:160:1: (lv_states_10_0= ruleState )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:160:1: (lv_states_10_0= ruleState )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:161:3: lv_states_10_0= ruleState
+ {
+
+ newCompositeNode(grammarAccess.getStatemachineAccess().getStatesStateParserRuleCall_4_0());
+
+ pushFollow(FOLLOW_ruleState_in_ruleStatemachine286);
+ lv_states_10_0=ruleState();
+
+ state._fsp--;
+
+
+ if (current==null) {
+ current = createModelElementForParent(grammarAccess.getStatemachineRule());
+ }
+ add(
+ current,
+ "states",
+ lv_states_10_0,
+ "State");
+ afterParserOrEnumRuleCall();
+
+
+ }
+
+
+ }
+ break;
+
+ default :
+ break loop7;
+ }
+ } while (true);
+
+
+ }
+
+
+ }
+
+ leaveRule();
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "ruleStatemachine"
+
+
+ // $ANTLR start "entryRuleEvent"
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:185:1: entryRuleEvent returns [EObject current=null] : iv_ruleEvent= ruleEvent EOF ;
+ public final EObject entryRuleEvent() throws RecognitionException {
+ EObject current = null;
+
+ EObject iv_ruleEvent = null;
+
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:186:2: (iv_ruleEvent= ruleEvent EOF )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:187:2: iv_ruleEvent= ruleEvent EOF
+ {
+ newCompositeNode(grammarAccess.getEventRule());
+ pushFollow(FOLLOW_ruleEvent_in_entryRuleEvent323);
+ iv_ruleEvent=ruleEvent();
+
+ state._fsp--;
+
+ current =iv_ruleEvent;
+ match(input,EOF,FOLLOW_EOF_in_entryRuleEvent333);
+
+ }
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "entryRuleEvent"
+
+
+ // $ANTLR start "ruleEvent"
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:194:1: ruleEvent returns [EObject current=null] : ( ( (lv_name_0_0= RULE_ID ) ) ( (lv_code_1_0= RULE_ID ) ) ) ;
+ public final EObject ruleEvent() throws RecognitionException {
+ EObject current = null;
+
+ Token lv_name_0_0=null;
+ Token lv_code_1_0=null;
+
+ enterRule();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:197:28: ( ( ( (lv_name_0_0= RULE_ID ) ) ( (lv_code_1_0= RULE_ID ) ) ) )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:198:1: ( ( (lv_name_0_0= RULE_ID ) ) ( (lv_code_1_0= RULE_ID ) ) )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:198:1: ( ( (lv_name_0_0= RULE_ID ) ) ( (lv_code_1_0= RULE_ID ) ) )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:198:2: ( (lv_name_0_0= RULE_ID ) ) ( (lv_code_1_0= RULE_ID ) )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:198:2: ( (lv_name_0_0= RULE_ID ) )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:199:1: (lv_name_0_0= RULE_ID )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:199:1: (lv_name_0_0= RULE_ID )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:200:3: lv_name_0_0= RULE_ID
+ {
+ lv_name_0_0=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleEvent375);
+
+ newLeafNode(lv_name_0_0, grammarAccess.getEventAccess().getNameIDTerminalRuleCall_0_0());
+
+
+ if (current==null) {
+ current = createModelElement(grammarAccess.getEventRule());
+ }
+ setWithLastConsumed(
+ current,
+ "name",
+ lv_name_0_0,
+ "ID");
+
+
+ }
+
+
+ }
+
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:216:2: ( (lv_code_1_0= RULE_ID ) )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:217:1: (lv_code_1_0= RULE_ID )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:217:1: (lv_code_1_0= RULE_ID )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:218:3: lv_code_1_0= RULE_ID
+ {
+ lv_code_1_0=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleEvent397);
+
+ newLeafNode(lv_code_1_0, grammarAccess.getEventAccess().getCodeIDTerminalRuleCall_1_0());
+
+
+ if (current==null) {
+ current = createModelElement(grammarAccess.getEventRule());
+ }
+ setWithLastConsumed(
+ current,
+ "code",
+ lv_code_1_0,
+ "ID");
+
+
+ }
+
+
+ }
+
+
+ }
+
+
+ }
+
+ leaveRule();
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "ruleEvent"
+
+
+ // $ANTLR start "entryRuleCommand"
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:242:1: entryRuleCommand returns [EObject current=null] : iv_ruleCommand= ruleCommand EOF ;
+ public final EObject entryRuleCommand() throws RecognitionException {
+ EObject current = null;
+
+ EObject iv_ruleCommand = null;
+
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:243:2: (iv_ruleCommand= ruleCommand EOF )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:244:2: iv_ruleCommand= ruleCommand EOF
+ {
+ newCompositeNode(grammarAccess.getCommandRule());
+ pushFollow(FOLLOW_ruleCommand_in_entryRuleCommand438);
+ iv_ruleCommand=ruleCommand();
+
+ state._fsp--;
+
+ current =iv_ruleCommand;
+ match(input,EOF,FOLLOW_EOF_in_entryRuleCommand448);
+
+ }
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "entryRuleCommand"
+
+
+ // $ANTLR start "ruleCommand"
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:251:1: ruleCommand returns [EObject current=null] : ( ( (lv_name_0_0= RULE_ID ) ) ( (lv_code_1_0= RULE_ID ) ) ) ;
+ public final EObject ruleCommand() throws RecognitionException {
+ EObject current = null;
+
+ Token lv_name_0_0=null;
+ Token lv_code_1_0=null;
+
+ enterRule();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:254:28: ( ( ( (lv_name_0_0= RULE_ID ) ) ( (lv_code_1_0= RULE_ID ) ) ) )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:255:1: ( ( (lv_name_0_0= RULE_ID ) ) ( (lv_code_1_0= RULE_ID ) ) )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:255:1: ( ( (lv_name_0_0= RULE_ID ) ) ( (lv_code_1_0= RULE_ID ) ) )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:255:2: ( (lv_name_0_0= RULE_ID ) ) ( (lv_code_1_0= RULE_ID ) )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:255:2: ( (lv_name_0_0= RULE_ID ) )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:256:1: (lv_name_0_0= RULE_ID )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:256:1: (lv_name_0_0= RULE_ID )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:257:3: lv_name_0_0= RULE_ID
+ {
+ lv_name_0_0=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleCommand490);
+
+ newLeafNode(lv_name_0_0, grammarAccess.getCommandAccess().getNameIDTerminalRuleCall_0_0());
+
+
+ if (current==null) {
+ current = createModelElement(grammarAccess.getCommandRule());
+ }
+ setWithLastConsumed(
+ current,
+ "name",
+ lv_name_0_0,
+ "ID");
+
+
+ }
+
+
+ }
+
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:273:2: ( (lv_code_1_0= RULE_ID ) )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:274:1: (lv_code_1_0= RULE_ID )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:274:1: (lv_code_1_0= RULE_ID )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:275:3: lv_code_1_0= RULE_ID
+ {
+ lv_code_1_0=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleCommand512);
+
+ newLeafNode(lv_code_1_0, grammarAccess.getCommandAccess().getCodeIDTerminalRuleCall_1_0());
+
+
+ if (current==null) {
+ current = createModelElement(grammarAccess.getCommandRule());
+ }
+ setWithLastConsumed(
+ current,
+ "code",
+ lv_code_1_0,
+ "ID");
+
+
+ }
+
+
+ }
+
+
+ }
+
+
+ }
+
+ leaveRule();
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "ruleCommand"
+
+
+ // $ANTLR start "entryRuleState"
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:299:1: entryRuleState returns [EObject current=null] : iv_ruleState= ruleState EOF ;
+ public final EObject entryRuleState() throws RecognitionException {
+ EObject current = null;
+
+ EObject iv_ruleState = null;
+
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:300:2: (iv_ruleState= ruleState EOF )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:301:2: iv_ruleState= ruleState EOF
+ {
+ newCompositeNode(grammarAccess.getStateRule());
+ pushFollow(FOLLOW_ruleState_in_entryRuleState553);
+ iv_ruleState=ruleState();
+
+ state._fsp--;
+
+ current =iv_ruleState;
+ match(input,EOF,FOLLOW_EOF_in_entryRuleState563);
+
+ }
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "entryRuleState"
+
+
+ // $ANTLR start "ruleState"
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:308:1: ruleState returns [EObject current=null] : (otherlv_0= 'state' ( (lv_name_1_0= RULE_ID ) ) (otherlv_2= 'actions' otherlv_3= '{' ( (otherlv_4= RULE_ID ) )+ otherlv_5= '}' )? ( (lv_transitions_6_0= ruleTransition ) )* otherlv_7= 'end' ) ;
+ public final EObject ruleState() throws RecognitionException {
+ EObject current = null;
+
+ Token otherlv_0=null;
+ Token lv_name_1_0=null;
+ Token otherlv_2=null;
+ Token otherlv_3=null;
+ Token otherlv_4=null;
+ Token otherlv_5=null;
+ Token otherlv_7=null;
+ EObject lv_transitions_6_0 = null;
+
+
+ enterRule();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:311:28: ( (otherlv_0= 'state' ( (lv_name_1_0= RULE_ID ) ) (otherlv_2= 'actions' otherlv_3= '{' ( (otherlv_4= RULE_ID ) )+ otherlv_5= '}' )? ( (lv_transitions_6_0= ruleTransition ) )* otherlv_7= 'end' ) )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:312:1: (otherlv_0= 'state' ( (lv_name_1_0= RULE_ID ) ) (otherlv_2= 'actions' otherlv_3= '{' ( (otherlv_4= RULE_ID ) )+ otherlv_5= '}' )? ( (lv_transitions_6_0= ruleTransition ) )* otherlv_7= 'end' )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:312:1: (otherlv_0= 'state' ( (lv_name_1_0= RULE_ID ) ) (otherlv_2= 'actions' otherlv_3= '{' ( (otherlv_4= RULE_ID ) )+ otherlv_5= '}' )? ( (lv_transitions_6_0= ruleTransition ) )* otherlv_7= 'end' )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:312:3: otherlv_0= 'state' ( (lv_name_1_0= RULE_ID ) ) (otherlv_2= 'actions' otherlv_3= '{' ( (otherlv_4= RULE_ID ) )+ otherlv_5= '}' )? ( (lv_transitions_6_0= ruleTransition ) )* otherlv_7= 'end'
+ {
+ otherlv_0=(Token)match(input,15,FOLLOW_15_in_ruleState600);
+
+ newLeafNode(otherlv_0, grammarAccess.getStateAccess().getStateKeyword_0());
+
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:316:1: ( (lv_name_1_0= RULE_ID ) )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:317:1: (lv_name_1_0= RULE_ID )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:317:1: (lv_name_1_0= RULE_ID )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:318:3: lv_name_1_0= RULE_ID
+ {
+ lv_name_1_0=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleState617);
+
+ newLeafNode(lv_name_1_0, grammarAccess.getStateAccess().getNameIDTerminalRuleCall_1_0());
+
+
+ if (current==null) {
+ current = createModelElement(grammarAccess.getStateRule());
+ }
+ setWithLastConsumed(
+ current,
+ "name",
+ lv_name_1_0,
+ "ID");
+
+
+ }
+
+
+ }
+
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:334:2: (otherlv_2= 'actions' otherlv_3= '{' ( (otherlv_4= RULE_ID ) )+ otherlv_5= '}' )?
+ int alt9=2;
+ int LA9_0 = input.LA(1);
+
+ if ( (LA9_0==16) ) {
+ alt9=1;
+ }
+ switch (alt9) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:334:4: otherlv_2= 'actions' otherlv_3= '{' ( (otherlv_4= RULE_ID ) )+ otherlv_5= '}'
+ {
+ otherlv_2=(Token)match(input,16,FOLLOW_16_in_ruleState635);
+
+ newLeafNode(otherlv_2, grammarAccess.getStateAccess().getActionsKeyword_2_0());
+
+ otherlv_3=(Token)match(input,17,FOLLOW_17_in_ruleState647);
+
+ newLeafNode(otherlv_3, grammarAccess.getStateAccess().getLeftCurlyBracketKeyword_2_1());
+
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:342:1: ( (otherlv_4= RULE_ID ) )+
+ int cnt8=0;
+ loop8:
+ do {
+ int alt8=2;
+ int LA8_0 = input.LA(1);
+
+ if ( (LA8_0==RULE_ID) ) {
+ alt8=1;
+ }
+
+
+ switch (alt8) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:343:1: (otherlv_4= RULE_ID )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:343:1: (otherlv_4= RULE_ID )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:344:3: otherlv_4= RULE_ID
+ {
+
+ if (current==null) {
+ current = createModelElement(grammarAccess.getStateRule());
+ }
+
+ otherlv_4=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleState667);
+
+ newLeafNode(otherlv_4, grammarAccess.getStateAccess().getActionsCommandCrossReference_2_2_0());
+
+
+ }
+
+
+ }
+ break;
+
+ default :
+ if ( cnt8 >= 1 ) break loop8;
+ EarlyExitException eee =
+ new EarlyExitException(8, input);
+ throw eee;
+ }
+ cnt8++;
+ } while (true);
+
+ otherlv_5=(Token)match(input,18,FOLLOW_18_in_ruleState680);
+
+ newLeafNode(otherlv_5, grammarAccess.getStateAccess().getRightCurlyBracketKeyword_2_3());
+
+
+ }
+ break;
+
+ }
+
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:359:3: ( (lv_transitions_6_0= ruleTransition ) )*
+ loop10:
+ do {
+ int alt10=2;
+ int LA10_0 = input.LA(1);
+
+ if ( (LA10_0==RULE_ID) ) {
+ alt10=1;
+ }
+
+
+ switch (alt10) {
+ case 1 :
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:360:1: (lv_transitions_6_0= ruleTransition )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:360:1: (lv_transitions_6_0= ruleTransition )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:361:3: lv_transitions_6_0= ruleTransition
+ {
+
+ newCompositeNode(grammarAccess.getStateAccess().getTransitionsTransitionParserRuleCall_3_0());
+
+ pushFollow(FOLLOW_ruleTransition_in_ruleState703);
+ lv_transitions_6_0=ruleTransition();
+
+ state._fsp--;
+
+
+ if (current==null) {
+ current = createModelElementForParent(grammarAccess.getStateRule());
+ }
+ add(
+ current,
+ "transitions",
+ lv_transitions_6_0,
+ "Transition");
+ afterParserOrEnumRuleCall();
+
+
+ }
+
+
+ }
+ break;
+
+ default :
+ break loop10;
+ }
+ } while (true);
+
+ otherlv_7=(Token)match(input,12,FOLLOW_12_in_ruleState716);
+
+ newLeafNode(otherlv_7, grammarAccess.getStateAccess().getEndKeyword_4());
+
+
+ }
+
+
+ }
+
+ leaveRule();
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "ruleState"
+
+
+ // $ANTLR start "entryRuleTransition"
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:389:1: entryRuleTransition returns [EObject current=null] : iv_ruleTransition= ruleTransition EOF ;
+ public final EObject entryRuleTransition() throws RecognitionException {
+ EObject current = null;
+
+ EObject iv_ruleTransition = null;
+
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:390:2: (iv_ruleTransition= ruleTransition EOF )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:391:2: iv_ruleTransition= ruleTransition EOF
+ {
+ newCompositeNode(grammarAccess.getTransitionRule());
+ pushFollow(FOLLOW_ruleTransition_in_entryRuleTransition752);
+ iv_ruleTransition=ruleTransition();
+
+ state._fsp--;
+
+ current =iv_ruleTransition;
+ match(input,EOF,FOLLOW_EOF_in_entryRuleTransition762);
+
+ }
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "entryRuleTransition"
+
+
+ // $ANTLR start "ruleTransition"
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:398:1: ruleTransition returns [EObject current=null] : ( ( (otherlv_0= RULE_ID ) ) otherlv_1= '=>' ( (otherlv_2= RULE_ID ) ) ) ;
+ public final EObject ruleTransition() throws RecognitionException {
+ EObject current = null;
+
+ Token otherlv_0=null;
+ Token otherlv_1=null;
+ Token otherlv_2=null;
+
+ enterRule();
+
+ try {
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:401:28: ( ( ( (otherlv_0= RULE_ID ) ) otherlv_1= '=>' ( (otherlv_2= RULE_ID ) ) ) )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:402:1: ( ( (otherlv_0= RULE_ID ) ) otherlv_1= '=>' ( (otherlv_2= RULE_ID ) ) )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:402:1: ( ( (otherlv_0= RULE_ID ) ) otherlv_1= '=>' ( (otherlv_2= RULE_ID ) ) )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:402:2: ( (otherlv_0= RULE_ID ) ) otherlv_1= '=>' ( (otherlv_2= RULE_ID ) )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:402:2: ( (otherlv_0= RULE_ID ) )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:403:1: (otherlv_0= RULE_ID )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:403:1: (otherlv_0= RULE_ID )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:404:3: otherlv_0= RULE_ID
+ {
+
+ if (current==null) {
+ current = createModelElement(grammarAccess.getTransitionRule());
+ }
+
+ otherlv_0=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleTransition807);
+
+ newLeafNode(otherlv_0, grammarAccess.getTransitionAccess().getEventEventCrossReference_0_0());
+
+
+ }
+
+
+ }
+
+ otherlv_1=(Token)match(input,19,FOLLOW_19_in_ruleTransition819);
+
+ newLeafNode(otherlv_1, grammarAccess.getTransitionAccess().getEqualsSignGreaterThanSignKeyword_1());
+
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:419:1: ( (otherlv_2= RULE_ID ) )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:420:1: (otherlv_2= RULE_ID )
+ {
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:420:1: (otherlv_2= RULE_ID )
+ // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:421:3: otherlv_2= RULE_ID
+ {
+
+ if (current==null) {
+ current = createModelElement(grammarAccess.getTransitionRule());
+ }
+
+ otherlv_2=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleTransition839);
+
+ newLeafNode(otherlv_2, grammarAccess.getTransitionAccess().getStateStateCrossReference_2_0());
+
+
+ }
+
+
+ }
+
+
+ }
+
+
+ }
+
+ leaveRule();
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "ruleTransition"
+
+ // Delegated rules
+
+
+
+
+ public static final BitSet FOLLOW_ruleStatemachine_in_entryRuleStatemachine75 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleStatemachine85 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_11_in_ruleStatemachine132 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_ruleEvent_in_ruleStatemachine153 = new BitSet(new long[]{0x0000000000001010L});
+ public static final BitSet FOLLOW_12_in_ruleStatemachine166 = new BitSet(new long[]{0x000000000000E002L});
+ public static final BitSet FOLLOW_13_in_ruleStatemachine181 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_RULE_ID_in_ruleStatemachine201 = new BitSet(new long[]{0x0000000000001010L});
+ public static final BitSet FOLLOW_12_in_ruleStatemachine214 = new BitSet(new long[]{0x000000000000C002L});
+ public static final BitSet FOLLOW_14_in_ruleStatemachine229 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_ruleCommand_in_ruleStatemachine250 = new BitSet(new long[]{0x0000000000001010L});
+ public static final BitSet FOLLOW_12_in_ruleStatemachine263 = new BitSet(new long[]{0x0000000000008002L});
+ public static final BitSet FOLLOW_ruleState_in_ruleStatemachine286 = new BitSet(new long[]{0x0000000000008002L});
+ public static final BitSet FOLLOW_ruleEvent_in_entryRuleEvent323 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleEvent333 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_RULE_ID_in_ruleEvent375 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_RULE_ID_in_ruleEvent397 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleCommand_in_entryRuleCommand438 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleCommand448 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_RULE_ID_in_ruleCommand490 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_RULE_ID_in_ruleCommand512 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleState_in_entryRuleState553 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleState563 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_15_in_ruleState600 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_RULE_ID_in_ruleState617 = new BitSet(new long[]{0x0000000000011010L});
+ public static final BitSet FOLLOW_16_in_ruleState635 = new BitSet(new long[]{0x0000000000020000L});
+ public static final BitSet FOLLOW_17_in_ruleState647 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_RULE_ID_in_ruleState667 = new BitSet(new long[]{0x0000000000040010L});
+ public static final BitSet FOLLOW_18_in_ruleState680 = new BitSet(new long[]{0x0000000000001010L});
+ public static final BitSet FOLLOW_ruleTransition_in_ruleState703 = new BitSet(new long[]{0x0000000000001010L});
+ public static final BitSet FOLLOW_12_in_ruleState716 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleTransition_in_entryRuleTransition752 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleTransition762 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_RULE_ID_in_ruleTransition807 = new BitSet(new long[]{0x0000000000080000L});
+ public static final BitSet FOLLOW_19_in_ruleTransition819 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_RULE_ID_in_ruleTransition839 = new BitSet(new long[]{0x0000000000000002L});
+
+}
\ No newline at end of file
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/serializer/AbstractStatemachineSemanticSequencer.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/serializer/AbstractStatemachineSemanticSequencer.java
new file mode 100644
index 0000000..19b8b57
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/serializer/AbstractStatemachineSemanticSequencer.java
@@ -0,0 +1,159 @@
+package org.eclipse.xtext.example.fowlerdsl.serializer;
+
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.example.fowlerdsl.services.StatemachineGrammarAccess;
+import org.eclipse.xtext.example.fowlerdsl.statemachine.Command;
+import org.eclipse.xtext.example.fowlerdsl.statemachine.Event;
+import org.eclipse.xtext.example.fowlerdsl.statemachine.State;
+import org.eclipse.xtext.example.fowlerdsl.statemachine.Statemachine;
+import org.eclipse.xtext.example.fowlerdsl.statemachine.StatemachinePackage;
+import org.eclipse.xtext.example.fowlerdsl.statemachine.Transition;
+import org.eclipse.xtext.serializer.acceptor.ISemanticSequenceAcceptor;
+import org.eclipse.xtext.serializer.acceptor.SequenceFeeder;
+import org.eclipse.xtext.serializer.diagnostic.ISemanticSequencerDiagnosticProvider;
+import org.eclipse.xtext.serializer.diagnostic.ISerializationDiagnostic.Acceptor;
+import org.eclipse.xtext.serializer.sequencer.AbstractSemanticSequencer;
+import org.eclipse.xtext.serializer.sequencer.GenericSequencer;
+import org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider.INodesForEObjectProvider;
+import org.eclipse.xtext.serializer.sequencer.ISemanticSequencer;
+import org.eclipse.xtext.serializer.sequencer.ITransientValueService;
+import org.eclipse.xtext.serializer.sequencer.ITransientValueService.ValueTransient;
+
+@SuppressWarnings("restriction")
+public class AbstractStatemachineSemanticSequencer extends AbstractSemanticSequencer {
+
+ @Inject
+ protected StatemachineGrammarAccess grammarAccess;
+
+ @Inject
+ protected ISemanticSequencerDiagnosticProvider diagnosticProvider;
+
+ @Inject
+ protected ITransientValueService transientValues;
+
+ @Inject
+ @GenericSequencer
+ protected Provider<ISemanticSequencer> genericSequencerProvider;
+
+ protected ISemanticSequencer genericSequencer;
+
+
+ @Override
+ public void init(ISemanticSequencer sequencer, ISemanticSequenceAcceptor sequenceAcceptor, Acceptor errorAcceptor) {
+ super.init(sequencer, sequenceAcceptor, errorAcceptor);
+ this.genericSequencer = genericSequencerProvider.get();
+ this.genericSequencer.init(sequencer, sequenceAcceptor, errorAcceptor);
+ }
+
+ public void createSequence(EObject context, EObject semanticObject) {
+ if(semanticObject.eClass().getEPackage() == StatemachinePackage.eINSTANCE) switch(semanticObject.eClass().getClassifierID()) {
+ case StatemachinePackage.COMMAND:
+ if(context == grammarAccess.getCommandRule()) {
+ sequence_Command(context, (Command) semanticObject);
+ return;
+ }
+ else break;
+ case StatemachinePackage.EVENT:
+ if(context == grammarAccess.getEventRule()) {
+ sequence_Event(context, (Event) semanticObject);
+ return;
+ }
+ else break;
+ case StatemachinePackage.STATE:
+ if(context == grammarAccess.getStateRule()) {
+ sequence_State(context, (State) semanticObject);
+ return;
+ }
+ else break;
+ case StatemachinePackage.STATEMACHINE:
+ if(context == grammarAccess.getStatemachineRule()) {
+ sequence_Statemachine(context, (Statemachine) semanticObject);
+ return;
+ }
+ else break;
+ case StatemachinePackage.TRANSITION:
+ if(context == grammarAccess.getTransitionRule()) {
+ sequence_Transition(context, (Transition) semanticObject);
+ return;
+ }
+ else break;
+ }
+ if (errorAcceptor != null) errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
+ }
+
+ /**
+ * Constraint:
+ * (name=ID code=ID)
+ */
+ protected void sequence_Command(EObject context, Command semanticObject) {
+ if(errorAcceptor != null) {
+ if(transientValues.isValueTransient(semanticObject, StatemachinePackage.Literals.COMMAND__NAME) == ValueTransient.YES)
+ errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, StatemachinePackage.Literals.COMMAND__NAME));
+ if(transientValues.isValueTransient(semanticObject, StatemachinePackage.Literals.COMMAND__CODE) == ValueTransient.YES)
+ errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, StatemachinePackage.Literals.COMMAND__CODE));
+ }
+ INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
+ SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
+ feeder.accept(grammarAccess.getCommandAccess().getNameIDTerminalRuleCall_0_0(), semanticObject.getName());
+ feeder.accept(grammarAccess.getCommandAccess().getCodeIDTerminalRuleCall_1_0(), semanticObject.getCode());
+ feeder.finish();
+ }
+
+
+ /**
+ * Constraint:
+ * (name=ID code=ID)
+ */
+ protected void sequence_Event(EObject context, Event semanticObject) {
+ if(errorAcceptor != null) {
+ if(transientValues.isValueTransient(semanticObject, StatemachinePackage.Literals.EVENT__NAME) == ValueTransient.YES)
+ errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, StatemachinePackage.Literals.EVENT__NAME));
+ if(transientValues.isValueTransient(semanticObject, StatemachinePackage.Literals.EVENT__CODE) == ValueTransient.YES)
+ errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, StatemachinePackage.Literals.EVENT__CODE));
+ }
+ INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
+ SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
+ feeder.accept(grammarAccess.getEventAccess().getNameIDTerminalRuleCall_0_0(), semanticObject.getName());
+ feeder.accept(grammarAccess.getEventAccess().getCodeIDTerminalRuleCall_1_0(), semanticObject.getCode());
+ feeder.finish();
+ }
+
+
+ /**
+ * Constraint:
+ * (name=ID actions+=[Command|ID]* transitions+=Transition*)
+ */
+ protected void sequence_State(EObject context, State semanticObject) {
+ genericSequencer.createSequence(context, semanticObject);
+ }
+
+
+ /**
+ * Constraint:
+ * (events+=Event* resetEvents+=[Event|ID]* commands+=Command* states+=State*)
+ */
+ protected void sequence_Statemachine(EObject context, Statemachine semanticObject) {
+ genericSequencer.createSequence(context, semanticObject);
+ }
+
+
+ /**
+ * Constraint:
+ * (event=[Event|ID] state=[State|ID])
+ */
+ protected void sequence_Transition(EObject context, Transition semanticObject) {
+ if(errorAcceptor != null) {
+ if(transientValues.isValueTransient(semanticObject, StatemachinePackage.Literals.TRANSITION__EVENT) == ValueTransient.YES)
+ errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, StatemachinePackage.Literals.TRANSITION__EVENT));
+ if(transientValues.isValueTransient(semanticObject, StatemachinePackage.Literals.TRANSITION__STATE) == ValueTransient.YES)
+ errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, StatemachinePackage.Literals.TRANSITION__STATE));
+ }
+ INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
+ SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
+ feeder.accept(grammarAccess.getTransitionAccess().getEventEventIDTerminalRuleCall_0_0_1(), semanticObject.getEvent());
+ feeder.accept(grammarAccess.getTransitionAccess().getStateStateIDTerminalRuleCall_2_0_1(), semanticObject.getState());
+ feeder.finish();
+ }
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/serializer/AbstractStatemachineSyntacticSequencer.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/serializer/AbstractStatemachineSyntacticSequencer.java
new file mode 100644
index 0000000..02070f1
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/serializer/AbstractStatemachineSyntacticSequencer.java
@@ -0,0 +1,40 @@
+package org.eclipse.xtext.example.fowlerdsl.serializer;
+
+import com.google.inject.Inject;
+import java.util.List;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.IGrammarAccess;
+import org.eclipse.xtext.RuleCall;
+import org.eclipse.xtext.example.fowlerdsl.services.StatemachineGrammarAccess;
+import org.eclipse.xtext.nodemodel.INode;
+import org.eclipse.xtext.serializer.analysis.GrammarAlias.AbstractElementAlias;
+import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynTransition;
+import org.eclipse.xtext.serializer.sequencer.AbstractSyntacticSequencer;
+
+@SuppressWarnings("restriction")
+public class AbstractStatemachineSyntacticSequencer extends AbstractSyntacticSequencer {
+
+ protected StatemachineGrammarAccess grammarAccess;
+
+ @Inject
+ protected void init(IGrammarAccess access) {
+ grammarAccess = (StatemachineGrammarAccess) access;
+ }
+
+ @Override
+ protected String getUnassignedRuleCallToken(EObject semanticObject, RuleCall ruleCall, INode node) {
+ return "";
+ }
+
+
+ @Override
+ protected void emitUnassignedTokens(EObject semanticObject, ISynTransition transition, INode fromNode, INode toNode) {
+ if (transition.getAmbiguousSyntaxes().isEmpty()) return;
+ List<INode> transitionNodes = collectNodes(fromNode, toNode);
+ for (AbstractElementAlias syntax : transition.getAmbiguousSyntaxes()) {
+ List<INode> syntaxNodes = getNodesFor(transitionNodes, syntax);
+ acceptNodes(getLastNavigableState(), syntaxNodes);
+ }
+ }
+
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/services/StatemachineGrammarAccess.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/services/StatemachineGrammarAccess.java
new file mode 100644
index 0000000..d80624d
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/services/StatemachineGrammarAccess.java
@@ -0,0 +1,391 @@
+/*
+* generated by Xtext
+*/
+
+package org.eclipse.xtext.example.fowlerdsl.services;
+
+import com.google.inject.Singleton;
+import com.google.inject.Inject;
+
+import org.eclipse.xtext.*;
+import org.eclipse.xtext.service.GrammarProvider;
+import org.eclipse.xtext.service.AbstractElementFinder.*;
+
+import org.eclipse.xtext.common.services.TerminalsGrammarAccess;
+
+@Singleton
+public class StatemachineGrammarAccess extends AbstractGrammarElementFinder {
+
+
+ public class StatemachineElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Statemachine");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Action cStatemachineAction_0 = (Action)cGroup.eContents().get(0);
+ private final Group cGroup_1 = (Group)cGroup.eContents().get(1);
+ private final Keyword cEventsKeyword_1_0 = (Keyword)cGroup_1.eContents().get(0);
+ private final Assignment cEventsAssignment_1_1 = (Assignment)cGroup_1.eContents().get(1);
+ private final RuleCall cEventsEventParserRuleCall_1_1_0 = (RuleCall)cEventsAssignment_1_1.eContents().get(0);
+ private final Keyword cEndKeyword_1_2 = (Keyword)cGroup_1.eContents().get(2);
+ private final Group cGroup_2 = (Group)cGroup.eContents().get(2);
+ private final Keyword cResetEventsKeyword_2_0 = (Keyword)cGroup_2.eContents().get(0);
+ private final Assignment cResetEventsAssignment_2_1 = (Assignment)cGroup_2.eContents().get(1);
+ private final CrossReference cResetEventsEventCrossReference_2_1_0 = (CrossReference)cResetEventsAssignment_2_1.eContents().get(0);
+ private final RuleCall cResetEventsEventIDTerminalRuleCall_2_1_0_1 = (RuleCall)cResetEventsEventCrossReference_2_1_0.eContents().get(1);
+ private final Keyword cEndKeyword_2_2 = (Keyword)cGroup_2.eContents().get(2);
+ private final Group cGroup_3 = (Group)cGroup.eContents().get(3);
+ private final Keyword cCommandsKeyword_3_0 = (Keyword)cGroup_3.eContents().get(0);
+ private final Assignment cCommandsAssignment_3_1 = (Assignment)cGroup_3.eContents().get(1);
+ private final RuleCall cCommandsCommandParserRuleCall_3_1_0 = (RuleCall)cCommandsAssignment_3_1.eContents().get(0);
+ private final Keyword cEndKeyword_3_2 = (Keyword)cGroup_3.eContents().get(2);
+ private final Assignment cStatesAssignment_4 = (Assignment)cGroup.eContents().get(4);
+ private final RuleCall cStatesStateParserRuleCall_4_0 = (RuleCall)cStatesAssignment_4.eContents().get(0);
+
+ //Statemachine:
+ // {Statemachine} ("events" events+=Event+ "end")? ("resetEvents" resetEvents+=[Event]+ "end")? ("commands"
+ // commands+=Command+ "end")? states+=State*;
+ public ParserRule getRule() { return rule; }
+
+ //{Statemachine} ("events" events+=Event+ "end")? ("resetEvents" resetEvents+=[Event]+ "end")? ("commands"
+ //commands+=Command+ "end")? states+=State*
+ public Group getGroup() { return cGroup; }
+
+ //{Statemachine}
+ public Action getStatemachineAction_0() { return cStatemachineAction_0; }
+
+ //("events" events+=Event+ "end")?
+ public Group getGroup_1() { return cGroup_1; }
+
+ //"events"
+ public Keyword getEventsKeyword_1_0() { return cEventsKeyword_1_0; }
+
+ //events+=Event+
+ public Assignment getEventsAssignment_1_1() { return cEventsAssignment_1_1; }
+
+ //Event
+ public RuleCall getEventsEventParserRuleCall_1_1_0() { return cEventsEventParserRuleCall_1_1_0; }
+
+ //"end"
+ public Keyword getEndKeyword_1_2() { return cEndKeyword_1_2; }
+
+ //("resetEvents" resetEvents+=[Event]+ "end")?
+ public Group getGroup_2() { return cGroup_2; }
+
+ //"resetEvents"
+ public Keyword getResetEventsKeyword_2_0() { return cResetEventsKeyword_2_0; }
+
+ //resetEvents+=[Event]+
+ public Assignment getResetEventsAssignment_2_1() { return cResetEventsAssignment_2_1; }
+
+ //[Event]
+ public CrossReference getResetEventsEventCrossReference_2_1_0() { return cResetEventsEventCrossReference_2_1_0; }
+
+ //ID
+ public RuleCall getResetEventsEventIDTerminalRuleCall_2_1_0_1() { return cResetEventsEventIDTerminalRuleCall_2_1_0_1; }
+
+ //"end"
+ public Keyword getEndKeyword_2_2() { return cEndKeyword_2_2; }
+
+ //("commands" commands+=Command+ "end")?
+ public Group getGroup_3() { return cGroup_3; }
+
+ //"commands"
+ public Keyword getCommandsKeyword_3_0() { return cCommandsKeyword_3_0; }
+
+ //commands+=Command+
+ public Assignment getCommandsAssignment_3_1() { return cCommandsAssignment_3_1; }
+
+ //Command
+ public RuleCall getCommandsCommandParserRuleCall_3_1_0() { return cCommandsCommandParserRuleCall_3_1_0; }
+
+ //"end"
+ public Keyword getEndKeyword_3_2() { return cEndKeyword_3_2; }
+
+ //states+=State*
+ public Assignment getStatesAssignment_4() { return cStatesAssignment_4; }
+
+ //State
+ public RuleCall getStatesStateParserRuleCall_4_0() { return cStatesStateParserRuleCall_4_0; }
+ }
+
+ public class EventElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Event");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Assignment cNameAssignment_0 = (Assignment)cGroup.eContents().get(0);
+ private final RuleCall cNameIDTerminalRuleCall_0_0 = (RuleCall)cNameAssignment_0.eContents().get(0);
+ private final Assignment cCodeAssignment_1 = (Assignment)cGroup.eContents().get(1);
+ private final RuleCall cCodeIDTerminalRuleCall_1_0 = (RuleCall)cCodeAssignment_1.eContents().get(0);
+
+ //Event:
+ // name=ID code=ID;
+ public ParserRule getRule() { return rule; }
+
+ //name=ID code=ID
+ public Group getGroup() { return cGroup; }
+
+ //name=ID
+ public Assignment getNameAssignment_0() { return cNameAssignment_0; }
+
+ //ID
+ public RuleCall getNameIDTerminalRuleCall_0_0() { return cNameIDTerminalRuleCall_0_0; }
+
+ //code=ID
+ public Assignment getCodeAssignment_1() { return cCodeAssignment_1; }
+
+ //ID
+ public RuleCall getCodeIDTerminalRuleCall_1_0() { return cCodeIDTerminalRuleCall_1_0; }
+ }
+
+ public class CommandElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Command");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Assignment cNameAssignment_0 = (Assignment)cGroup.eContents().get(0);
+ private final RuleCall cNameIDTerminalRuleCall_0_0 = (RuleCall)cNameAssignment_0.eContents().get(0);
+ private final Assignment cCodeAssignment_1 = (Assignment)cGroup.eContents().get(1);
+ private final RuleCall cCodeIDTerminalRuleCall_1_0 = (RuleCall)cCodeAssignment_1.eContents().get(0);
+
+ //Command:
+ // name=ID code=ID;
+ public ParserRule getRule() { return rule; }
+
+ //name=ID code=ID
+ public Group getGroup() { return cGroup; }
+
+ //name=ID
+ public Assignment getNameAssignment_0() { return cNameAssignment_0; }
+
+ //ID
+ public RuleCall getNameIDTerminalRuleCall_0_0() { return cNameIDTerminalRuleCall_0_0; }
+
+ //code=ID
+ public Assignment getCodeAssignment_1() { return cCodeAssignment_1; }
+
+ //ID
+ public RuleCall getCodeIDTerminalRuleCall_1_0() { return cCodeIDTerminalRuleCall_1_0; }
+ }
+
+ public class StateElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "State");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Keyword cStateKeyword_0 = (Keyword)cGroup.eContents().get(0);
+ private final Assignment cNameAssignment_1 = (Assignment)cGroup.eContents().get(1);
+ private final RuleCall cNameIDTerminalRuleCall_1_0 = (RuleCall)cNameAssignment_1.eContents().get(0);
+ private final Group cGroup_2 = (Group)cGroup.eContents().get(2);
+ private final Keyword cActionsKeyword_2_0 = (Keyword)cGroup_2.eContents().get(0);
+ private final Keyword cLeftCurlyBracketKeyword_2_1 = (Keyword)cGroup_2.eContents().get(1);
+ private final Assignment cActionsAssignment_2_2 = (Assignment)cGroup_2.eContents().get(2);
+ private final CrossReference cActionsCommandCrossReference_2_2_0 = (CrossReference)cActionsAssignment_2_2.eContents().get(0);
+ private final RuleCall cActionsCommandIDTerminalRuleCall_2_2_0_1 = (RuleCall)cActionsCommandCrossReference_2_2_0.eContents().get(1);
+ private final Keyword cRightCurlyBracketKeyword_2_3 = (Keyword)cGroup_2.eContents().get(3);
+ private final Assignment cTransitionsAssignment_3 = (Assignment)cGroup.eContents().get(3);
+ private final RuleCall cTransitionsTransitionParserRuleCall_3_0 = (RuleCall)cTransitionsAssignment_3.eContents().get(0);
+ private final Keyword cEndKeyword_4 = (Keyword)cGroup.eContents().get(4);
+
+ //State:
+ // "state" name=ID ("actions" "{" actions+=[Command]+ "}")? transitions+=Transition* "end";
+ public ParserRule getRule() { return rule; }
+
+ //"state" name=ID ("actions" "{" actions+=[Command]+ "}")? transitions+=Transition* "end"
+ public Group getGroup() { return cGroup; }
+
+ //"state"
+ public Keyword getStateKeyword_0() { return cStateKeyword_0; }
+
+ //name=ID
+ public Assignment getNameAssignment_1() { return cNameAssignment_1; }
+
+ //ID
+ public RuleCall getNameIDTerminalRuleCall_1_0() { return cNameIDTerminalRuleCall_1_0; }
+
+ //("actions" "{" actions+=[Command]+ "}")?
+ public Group getGroup_2() { return cGroup_2; }
+
+ //"actions"
+ public Keyword getActionsKeyword_2_0() { return cActionsKeyword_2_0; }
+
+ //"{"
+ public Keyword getLeftCurlyBracketKeyword_2_1() { return cLeftCurlyBracketKeyword_2_1; }
+
+ //actions+=[Command]+
+ public Assignment getActionsAssignment_2_2() { return cActionsAssignment_2_2; }
+
+ //[Command]
+ public CrossReference getActionsCommandCrossReference_2_2_0() { return cActionsCommandCrossReference_2_2_0; }
+
+ //ID
+ public RuleCall getActionsCommandIDTerminalRuleCall_2_2_0_1() { return cActionsCommandIDTerminalRuleCall_2_2_0_1; }
+
+ //"}"
+ public Keyword getRightCurlyBracketKeyword_2_3() { return cRightCurlyBracketKeyword_2_3; }
+
+ //transitions+=Transition*
+ public Assignment getTransitionsAssignment_3() { return cTransitionsAssignment_3; }
+
+ //Transition
+ public RuleCall getTransitionsTransitionParserRuleCall_3_0() { return cTransitionsTransitionParserRuleCall_3_0; }
+
+ //"end"
+ public Keyword getEndKeyword_4() { return cEndKeyword_4; }
+ }
+
+ public class TransitionElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Transition");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Assignment cEventAssignment_0 = (Assignment)cGroup.eContents().get(0);
+ private final CrossReference cEventEventCrossReference_0_0 = (CrossReference)cEventAssignment_0.eContents().get(0);
+ private final RuleCall cEventEventIDTerminalRuleCall_0_0_1 = (RuleCall)cEventEventCrossReference_0_0.eContents().get(1);
+ private final Keyword cEqualsSignGreaterThanSignKeyword_1 = (Keyword)cGroup.eContents().get(1);
+ private final Assignment cStateAssignment_2 = (Assignment)cGroup.eContents().get(2);
+ private final CrossReference cStateStateCrossReference_2_0 = (CrossReference)cStateAssignment_2.eContents().get(0);
+ private final RuleCall cStateStateIDTerminalRuleCall_2_0_1 = (RuleCall)cStateStateCrossReference_2_0.eContents().get(1);
+
+ //Transition:
+ // event=[Event] "=>" state=[State];
+ public ParserRule getRule() { return rule; }
+
+ //event=[Event] "=>" state=[State]
+ public Group getGroup() { return cGroup; }
+
+ //event=[Event]
+ public Assignment getEventAssignment_0() { return cEventAssignment_0; }
+
+ //[Event]
+ public CrossReference getEventEventCrossReference_0_0() { return cEventEventCrossReference_0_0; }
+
+ //ID
+ public RuleCall getEventEventIDTerminalRuleCall_0_0_1() { return cEventEventIDTerminalRuleCall_0_0_1; }
+
+ //"=>"
+ public Keyword getEqualsSignGreaterThanSignKeyword_1() { return cEqualsSignGreaterThanSignKeyword_1; }
+
+ //state=[State]
+ public Assignment getStateAssignment_2() { return cStateAssignment_2; }
+
+ //[State]
+ public CrossReference getStateStateCrossReference_2_0() { return cStateStateCrossReference_2_0; }
+
+ //ID
+ public RuleCall getStateStateIDTerminalRuleCall_2_0_1() { return cStateStateIDTerminalRuleCall_2_0_1; }
+ }
+
+
+ private StatemachineElements pStatemachine;
+ private EventElements pEvent;
+ private CommandElements pCommand;
+ private StateElements pState;
+ private TransitionElements pTransition;
+
+ private final GrammarProvider grammarProvider;
+
+ private TerminalsGrammarAccess gaTerminals;
+
+ @Inject
+ public StatemachineGrammarAccess(GrammarProvider grammarProvider,
+ TerminalsGrammarAccess gaTerminals) {
+ this.grammarProvider = grammarProvider;
+ this.gaTerminals = gaTerminals;
+ }
+
+ public Grammar getGrammar() {
+ return grammarProvider.getGrammar(this);
+ }
+
+
+ public TerminalsGrammarAccess getTerminalsGrammarAccess() {
+ return gaTerminals;
+ }
+
+
+ //Statemachine:
+ // {Statemachine} ("events" events+=Event+ "end")? ("resetEvents" resetEvents+=[Event]+ "end")? ("commands"
+ // commands+=Command+ "end")? states+=State*;
+ public StatemachineElements getStatemachineAccess() {
+ return (pStatemachine != null) ? pStatemachine : (pStatemachine = new StatemachineElements());
+ }
+
+ public ParserRule getStatemachineRule() {
+ return getStatemachineAccess().getRule();
+ }
+
+ //Event:
+ // name=ID code=ID;
+ public EventElements getEventAccess() {
+ return (pEvent != null) ? pEvent : (pEvent = new EventElements());
+ }
+
+ public ParserRule getEventRule() {
+ return getEventAccess().getRule();
+ }
+
+ //Command:
+ // name=ID code=ID;
+ public CommandElements getCommandAccess() {
+ return (pCommand != null) ? pCommand : (pCommand = new CommandElements());
+ }
+
+ public ParserRule getCommandRule() {
+ return getCommandAccess().getRule();
+ }
+
+ //State:
+ // "state" name=ID ("actions" "{" actions+=[Command]+ "}")? transitions+=Transition* "end";
+ public StateElements getStateAccess() {
+ return (pState != null) ? pState : (pState = new StateElements());
+ }
+
+ public ParserRule getStateRule() {
+ return getStateAccess().getRule();
+ }
+
+ //Transition:
+ // event=[Event] "=>" state=[State];
+ public TransitionElements getTransitionAccess() {
+ return (pTransition != null) ? pTransition : (pTransition = new TransitionElements());
+ }
+
+ public ParserRule getTransitionRule() {
+ return getTransitionAccess().getRule();
+ }
+
+ //terminal ID:
+ // "^"? ("a".."z" | "A".."Z" | "_") ("a".."z" | "A".."Z" | "_" | "0".."9")*;
+ public TerminalRule getIDRule() {
+ return gaTerminals.getIDRule();
+ }
+
+ //terminal INT returns ecore::EInt:
+ // "0".."9"+;
+ public TerminalRule getINTRule() {
+ return gaTerminals.getINTRule();
+ }
+
+ //terminal STRING:
+ // "\"" ("\\" ("b" | "t" | "n" | "f" | "r" | "u" | "\"" | "\'" | "\\") | !("\\" | "\""))* "\"" | "\'" ("\\" ("b" | "t" |
+ // "n" | "f" | "r" | "u" | "\"" | "\'" | "\\") | !("\\" | "\'"))* "\'";
+ public TerminalRule getSTRINGRule() {
+ return gaTerminals.getSTRINGRule();
+ }
+
+ //terminal ML_COMMENT:
+ // "/ *"->"* /";
+ public TerminalRule getML_COMMENTRule() {
+ return gaTerminals.getML_COMMENTRule();
+ }
+
+ //terminal SL_COMMENT:
+ // "//" !("\n" | "\r")* ("\r"? "\n")?;
+ public TerminalRule getSL_COMMENTRule() {
+ return gaTerminals.getSL_COMMENTRule();
+ }
+
+ //terminal WS:
+ // (" " | "\t" | "\r" | "\n")+;
+ public TerminalRule getWSRule() {
+ return gaTerminals.getWSRule();
+ }
+
+ //terminal ANY_OTHER:
+ // .;
+ public TerminalRule getANY_OTHERRule() {
+ return gaTerminals.getANY_OTHERRule();
+ }
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/Command.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/Command.java
new file mode 100644
index 0000000..66ce3da
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/Command.java
@@ -0,0 +1,81 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.fowlerdsl.statemachine;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Command</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.xtext.example.fowlerdsl.statemachine.Command#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.xtext.example.fowlerdsl.statemachine.Command#getCode <em>Code</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.StatemachinePackage#getCommand()
+ * @model
+ * @generated
+ */
+public interface Command extends EObject
+{
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.StatemachinePackage#getCommand_Name()
+ * @model
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.xtext.example.fowlerdsl.statemachine.Command#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Code</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Code</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Code</em>' attribute.
+ * @see #setCode(String)
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.StatemachinePackage#getCommand_Code()
+ * @model
+ * @generated
+ */
+ String getCode();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.xtext.example.fowlerdsl.statemachine.Command#getCode <em>Code</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Code</em>' attribute.
+ * @see #getCode()
+ * @generated
+ */
+ void setCode(String value);
+
+} // Command
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/Event.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/Event.java
new file mode 100644
index 0000000..4eb4002
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/Event.java
@@ -0,0 +1,81 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.fowlerdsl.statemachine;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Event</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.xtext.example.fowlerdsl.statemachine.Event#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.xtext.example.fowlerdsl.statemachine.Event#getCode <em>Code</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.StatemachinePackage#getEvent()
+ * @model
+ * @generated
+ */
+public interface Event extends EObject
+{
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.StatemachinePackage#getEvent_Name()
+ * @model
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.xtext.example.fowlerdsl.statemachine.Event#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Code</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Code</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Code</em>' attribute.
+ * @see #setCode(String)
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.StatemachinePackage#getEvent_Code()
+ * @model
+ * @generated
+ */
+ String getCode();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.xtext.example.fowlerdsl.statemachine.Event#getCode <em>Code</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Code</em>' attribute.
+ * @see #getCode()
+ * @generated
+ */
+ void setCode(String value);
+
+} // Event
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/State.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/State.java
new file mode 100644
index 0000000..4cfa7f0
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/State.java
@@ -0,0 +1,90 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.fowlerdsl.statemachine;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>State</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.xtext.example.fowlerdsl.statemachine.State#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.xtext.example.fowlerdsl.statemachine.State#getActions <em>Actions</em>}</li>
+ * <li>{@link org.eclipse.xtext.example.fowlerdsl.statemachine.State#getTransitions <em>Transitions</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.StatemachinePackage#getState()
+ * @model
+ * @generated
+ */
+public interface State extends EObject
+{
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.StatemachinePackage#getState_Name()
+ * @model
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.xtext.example.fowlerdsl.statemachine.State#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Actions</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.xtext.example.fowlerdsl.statemachine.Command}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Actions</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Actions</em>' reference list.
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.StatemachinePackage#getState_Actions()
+ * @model
+ * @generated
+ */
+ EList<Command> getActions();
+
+ /**
+ * Returns the value of the '<em><b>Transitions</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.xtext.example.fowlerdsl.statemachine.Transition}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Transitions</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Transitions</em>' containment reference list.
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.StatemachinePackage#getState_Transitions()
+ * @model containment="true"
+ * @generated
+ */
+ EList<Transition> getTransitions();
+
+} // State
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/Statemachine.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/Statemachine.java
new file mode 100644
index 0000000..215aa75
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/Statemachine.java
@@ -0,0 +1,97 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.fowlerdsl.statemachine;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Statemachine</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.xtext.example.fowlerdsl.statemachine.Statemachine#getEvents <em>Events</em>}</li>
+ * <li>{@link org.eclipse.xtext.example.fowlerdsl.statemachine.Statemachine#getResetEvents <em>Reset Events</em>}</li>
+ * <li>{@link org.eclipse.xtext.example.fowlerdsl.statemachine.Statemachine#getCommands <em>Commands</em>}</li>
+ * <li>{@link org.eclipse.xtext.example.fowlerdsl.statemachine.Statemachine#getStates <em>States</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.StatemachinePackage#getStatemachine()
+ * @model
+ * @generated
+ */
+public interface Statemachine extends EObject
+{
+ /**
+ * Returns the value of the '<em><b>Events</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.xtext.example.fowlerdsl.statemachine.Event}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Events</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Events</em>' containment reference list.
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.StatemachinePackage#getStatemachine_Events()
+ * @model containment="true"
+ * @generated
+ */
+ EList<Event> getEvents();
+
+ /**
+ * Returns the value of the '<em><b>Reset Events</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.xtext.example.fowlerdsl.statemachine.Event}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Reset Events</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Reset Events</em>' reference list.
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.StatemachinePackage#getStatemachine_ResetEvents()
+ * @model
+ * @generated
+ */
+ EList<Event> getResetEvents();
+
+ /**
+ * Returns the value of the '<em><b>Commands</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.xtext.example.fowlerdsl.statemachine.Command}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Commands</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Commands</em>' containment reference list.
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.StatemachinePackage#getStatemachine_Commands()
+ * @model containment="true"
+ * @generated
+ */
+ EList<Command> getCommands();
+
+ /**
+ * Returns the value of the '<em><b>States</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.xtext.example.fowlerdsl.statemachine.State}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>States</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>States</em>' containment reference list.
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.StatemachinePackage#getStatemachine_States()
+ * @model containment="true"
+ * @generated
+ */
+ EList<State> getStates();
+
+} // Statemachine
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/StatemachineFactory.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/StatemachineFactory.java
new file mode 100644
index 0000000..73870cc
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/StatemachineFactory.java
@@ -0,0 +1,82 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.fowlerdsl.statemachine;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.StatemachinePackage
+ * @generated
+ */
+public interface StatemachineFactory extends EFactory
+{
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ StatemachineFactory eINSTANCE = org.eclipse.xtext.example.fowlerdsl.statemachine.impl.StatemachineFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Statemachine</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Statemachine</em>'.
+ * @generated
+ */
+ Statemachine createStatemachine();
+
+ /**
+ * Returns a new object of class '<em>Event</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Event</em>'.
+ * @generated
+ */
+ Event createEvent();
+
+ /**
+ * Returns a new object of class '<em>Command</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Command</em>'.
+ * @generated
+ */
+ Command createCommand();
+
+ /**
+ * Returns a new object of class '<em>State</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>State</em>'.
+ * @generated
+ */
+ State createState();
+
+ /**
+ * Returns a new object of class '<em>Transition</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Transition</em>'.
+ * @generated
+ */
+ Transition createTransition();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ StatemachinePackage getStatemachinePackage();
+
+} //StatemachineFactory
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/StatemachinePackage.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/StatemachinePackage.java
new file mode 100644
index 0000000..a181032
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/StatemachinePackage.java
@@ -0,0 +1,647 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.fowlerdsl.statemachine;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.StatemachineFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface StatemachinePackage extends EPackage
+{
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "statemachine";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/xtext/example/fowlerdsl/Statemachine";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "statemachine";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ StatemachinePackage eINSTANCE = org.eclipse.xtext.example.fowlerdsl.statemachine.impl.StatemachinePackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.xtext.example.fowlerdsl.statemachine.impl.StatemachineImpl <em>Statemachine</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.impl.StatemachineImpl
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.impl.StatemachinePackageImpl#getStatemachine()
+ * @generated
+ */
+ int STATEMACHINE = 0;
+
+ /**
+ * The feature id for the '<em><b>Events</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STATEMACHINE__EVENTS = 0;
+
+ /**
+ * The feature id for the '<em><b>Reset Events</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STATEMACHINE__RESET_EVENTS = 1;
+
+ /**
+ * The feature id for the '<em><b>Commands</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STATEMACHINE__COMMANDS = 2;
+
+ /**
+ * The feature id for the '<em><b>States</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STATEMACHINE__STATES = 3;
+
+ /**
+ * The number of structural features of the '<em>Statemachine</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STATEMACHINE_FEATURE_COUNT = 4;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.xtext.example.fowlerdsl.statemachine.impl.EventImpl <em>Event</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.impl.EventImpl
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.impl.StatemachinePackageImpl#getEvent()
+ * @generated
+ */
+ int EVENT = 1;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EVENT__NAME = 0;
+
+ /**
+ * The feature id for the '<em><b>Code</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EVENT__CODE = 1;
+
+ /**
+ * The number of structural features of the '<em>Event</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EVENT_FEATURE_COUNT = 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.xtext.example.fowlerdsl.statemachine.impl.CommandImpl <em>Command</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.impl.CommandImpl
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.impl.StatemachinePackageImpl#getCommand()
+ * @generated
+ */
+ int COMMAND = 2;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int COMMAND__NAME = 0;
+
+ /**
+ * The feature id for the '<em><b>Code</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int COMMAND__CODE = 1;
+
+ /**
+ * The number of structural features of the '<em>Command</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int COMMAND_FEATURE_COUNT = 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.xtext.example.fowlerdsl.statemachine.impl.StateImpl <em>State</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.impl.StateImpl
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.impl.StatemachinePackageImpl#getState()
+ * @generated
+ */
+ int STATE = 3;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STATE__NAME = 0;
+
+ /**
+ * The feature id for the '<em><b>Actions</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STATE__ACTIONS = 1;
+
+ /**
+ * The feature id for the '<em><b>Transitions</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STATE__TRANSITIONS = 2;
+
+ /**
+ * The number of structural features of the '<em>State</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STATE_FEATURE_COUNT = 3;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.xtext.example.fowlerdsl.statemachine.impl.TransitionImpl <em>Transition</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.impl.TransitionImpl
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.impl.StatemachinePackageImpl#getTransition()
+ * @generated
+ */
+ int TRANSITION = 4;
+
+ /**
+ * The feature id for the '<em><b>Event</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TRANSITION__EVENT = 0;
+
+ /**
+ * The feature id for the '<em><b>State</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TRANSITION__STATE = 1;
+
+ /**
+ * The number of structural features of the '<em>Transition</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TRANSITION_FEATURE_COUNT = 2;
+
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.xtext.example.fowlerdsl.statemachine.Statemachine <em>Statemachine</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Statemachine</em>'.
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.Statemachine
+ * @generated
+ */
+ EClass getStatemachine();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.xtext.example.fowlerdsl.statemachine.Statemachine#getEvents <em>Events</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Events</em>'.
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.Statemachine#getEvents()
+ * @see #getStatemachine()
+ * @generated
+ */
+ EReference getStatemachine_Events();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.xtext.example.fowlerdsl.statemachine.Statemachine#getResetEvents <em>Reset Events</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Reset Events</em>'.
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.Statemachine#getResetEvents()
+ * @see #getStatemachine()
+ * @generated
+ */
+ EReference getStatemachine_ResetEvents();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.xtext.example.fowlerdsl.statemachine.Statemachine#getCommands <em>Commands</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Commands</em>'.
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.Statemachine#getCommands()
+ * @see #getStatemachine()
+ * @generated
+ */
+ EReference getStatemachine_Commands();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.xtext.example.fowlerdsl.statemachine.Statemachine#getStates <em>States</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>States</em>'.
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.Statemachine#getStates()
+ * @see #getStatemachine()
+ * @generated
+ */
+ EReference getStatemachine_States();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.xtext.example.fowlerdsl.statemachine.Event <em>Event</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Event</em>'.
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.Event
+ * @generated
+ */
+ EClass getEvent();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.xtext.example.fowlerdsl.statemachine.Event#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.Event#getName()
+ * @see #getEvent()
+ * @generated
+ */
+ EAttribute getEvent_Name();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.xtext.example.fowlerdsl.statemachine.Event#getCode <em>Code</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Code</em>'.
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.Event#getCode()
+ * @see #getEvent()
+ * @generated
+ */
+ EAttribute getEvent_Code();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.xtext.example.fowlerdsl.statemachine.Command <em>Command</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Command</em>'.
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.Command
+ * @generated
+ */
+ EClass getCommand();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.xtext.example.fowlerdsl.statemachine.Command#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.Command#getName()
+ * @see #getCommand()
+ * @generated
+ */
+ EAttribute getCommand_Name();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.xtext.example.fowlerdsl.statemachine.Command#getCode <em>Code</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Code</em>'.
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.Command#getCode()
+ * @see #getCommand()
+ * @generated
+ */
+ EAttribute getCommand_Code();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.xtext.example.fowlerdsl.statemachine.State <em>State</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>State</em>'.
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.State
+ * @generated
+ */
+ EClass getState();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.xtext.example.fowlerdsl.statemachine.State#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.State#getName()
+ * @see #getState()
+ * @generated
+ */
+ EAttribute getState_Name();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.xtext.example.fowlerdsl.statemachine.State#getActions <em>Actions</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Actions</em>'.
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.State#getActions()
+ * @see #getState()
+ * @generated
+ */
+ EReference getState_Actions();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.xtext.example.fowlerdsl.statemachine.State#getTransitions <em>Transitions</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Transitions</em>'.
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.State#getTransitions()
+ * @see #getState()
+ * @generated
+ */
+ EReference getState_Transitions();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.xtext.example.fowlerdsl.statemachine.Transition <em>Transition</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Transition</em>'.
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.Transition
+ * @generated
+ */
+ EClass getTransition();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.xtext.example.fowlerdsl.statemachine.Transition#getEvent <em>Event</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Event</em>'.
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.Transition#getEvent()
+ * @see #getTransition()
+ * @generated
+ */
+ EReference getTransition_Event();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.xtext.example.fowlerdsl.statemachine.Transition#getState <em>State</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>State</em>'.
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.Transition#getState()
+ * @see #getTransition()
+ * @generated
+ */
+ EReference getTransition_State();
+
+ /**
+ * Returns the factory that creates the instances of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ StatemachineFactory getStatemachineFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals
+ {
+ /**
+ * The meta object literal for the '{@link org.eclipse.xtext.example.fowlerdsl.statemachine.impl.StatemachineImpl <em>Statemachine</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.impl.StatemachineImpl
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.impl.StatemachinePackageImpl#getStatemachine()
+ * @generated
+ */
+ EClass STATEMACHINE = eINSTANCE.getStatemachine();
+
+ /**
+ * The meta object literal for the '<em><b>Events</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference STATEMACHINE__EVENTS = eINSTANCE.getStatemachine_Events();
+
+ /**
+ * The meta object literal for the '<em><b>Reset Events</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference STATEMACHINE__RESET_EVENTS = eINSTANCE.getStatemachine_ResetEvents();
+
+ /**
+ * The meta object literal for the '<em><b>Commands</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference STATEMACHINE__COMMANDS = eINSTANCE.getStatemachine_Commands();
+
+ /**
+ * The meta object literal for the '<em><b>States</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference STATEMACHINE__STATES = eINSTANCE.getStatemachine_States();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.xtext.example.fowlerdsl.statemachine.impl.EventImpl <em>Event</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.impl.EventImpl
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.impl.StatemachinePackageImpl#getEvent()
+ * @generated
+ */
+ EClass EVENT = eINSTANCE.getEvent();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute EVENT__NAME = eINSTANCE.getEvent_Name();
+
+ /**
+ * The meta object literal for the '<em><b>Code</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute EVENT__CODE = eINSTANCE.getEvent_Code();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.xtext.example.fowlerdsl.statemachine.impl.CommandImpl <em>Command</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.impl.CommandImpl
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.impl.StatemachinePackageImpl#getCommand()
+ * @generated
+ */
+ EClass COMMAND = eINSTANCE.getCommand();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute COMMAND__NAME = eINSTANCE.getCommand_Name();
+
+ /**
+ * The meta object literal for the '<em><b>Code</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute COMMAND__CODE = eINSTANCE.getCommand_Code();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.xtext.example.fowlerdsl.statemachine.impl.StateImpl <em>State</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.impl.StateImpl
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.impl.StatemachinePackageImpl#getState()
+ * @generated
+ */
+ EClass STATE = eINSTANCE.getState();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute STATE__NAME = eINSTANCE.getState_Name();
+
+ /**
+ * The meta object literal for the '<em><b>Actions</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference STATE__ACTIONS = eINSTANCE.getState_Actions();
+
+ /**
+ * The meta object literal for the '<em><b>Transitions</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference STATE__TRANSITIONS = eINSTANCE.getState_Transitions();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.xtext.example.fowlerdsl.statemachine.impl.TransitionImpl <em>Transition</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.impl.TransitionImpl
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.impl.StatemachinePackageImpl#getTransition()
+ * @generated
+ */
+ EClass TRANSITION = eINSTANCE.getTransition();
+
+ /**
+ * The meta object literal for the '<em><b>Event</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference TRANSITION__EVENT = eINSTANCE.getTransition_Event();
+
+ /**
+ * The meta object literal for the '<em><b>State</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference TRANSITION__STATE = eINSTANCE.getTransition_State();
+
+ }
+
+} //StatemachinePackage
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/Transition.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/Transition.java
new file mode 100644
index 0000000..371407f
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/Transition.java
@@ -0,0 +1,81 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.fowlerdsl.statemachine;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Transition</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.xtext.example.fowlerdsl.statemachine.Transition#getEvent <em>Event</em>}</li>
+ * <li>{@link org.eclipse.xtext.example.fowlerdsl.statemachine.Transition#getState <em>State</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.StatemachinePackage#getTransition()
+ * @model
+ * @generated
+ */
+public interface Transition extends EObject
+{
+ /**
+ * Returns the value of the '<em><b>Event</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Event</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Event</em>' reference.
+ * @see #setEvent(Event)
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.StatemachinePackage#getTransition_Event()
+ * @model
+ * @generated
+ */
+ Event getEvent();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.xtext.example.fowlerdsl.statemachine.Transition#getEvent <em>Event</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Event</em>' reference.
+ * @see #getEvent()
+ * @generated
+ */
+ void setEvent(Event value);
+
+ /**
+ * Returns the value of the '<em><b>State</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>State</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>State</em>' reference.
+ * @see #setState(State)
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.StatemachinePackage#getTransition_State()
+ * @model
+ * @generated
+ */
+ State getState();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.xtext.example.fowlerdsl.statemachine.Transition#getState <em>State</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>State</em>' reference.
+ * @see #getState()
+ * @generated
+ */
+ void setState(State value);
+
+} // Transition
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/impl/CommandImpl.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/impl/CommandImpl.java
new file mode 100644
index 0000000..db5ed68
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/impl/CommandImpl.java
@@ -0,0 +1,236 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.fowlerdsl.statemachine.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.xtext.example.fowlerdsl.statemachine.Command;
+import org.eclipse.xtext.example.fowlerdsl.statemachine.StatemachinePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Command</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.xtext.example.fowlerdsl.statemachine.impl.CommandImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.xtext.example.fowlerdsl.statemachine.impl.CommandImpl#getCode <em>Code</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class CommandImpl extends MinimalEObjectImpl.Container implements Command
+{
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getCode() <em>Code</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCode()
+ * @generated
+ * @ordered
+ */
+ protected static final String CODE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getCode() <em>Code</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCode()
+ * @generated
+ * @ordered
+ */
+ protected String code = CODE_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected CommandImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return StatemachinePackage.Literals.COMMAND;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName)
+ {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, StatemachinePackage.COMMAND__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getCode()
+ {
+ return code;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setCode(String newCode)
+ {
+ String oldCode = code;
+ code = newCode;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, StatemachinePackage.COMMAND__CODE, oldCode, code));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID)
+ {
+ case StatemachinePackage.COMMAND__NAME:
+ return getName();
+ case StatemachinePackage.COMMAND__CODE:
+ return getCode();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID)
+ {
+ case StatemachinePackage.COMMAND__NAME:
+ setName((String)newValue);
+ return;
+ case StatemachinePackage.COMMAND__CODE:
+ setCode((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID)
+ {
+ case StatemachinePackage.COMMAND__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case StatemachinePackage.COMMAND__CODE:
+ setCode(CODE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID)
+ {
+ case StatemachinePackage.COMMAND__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case StatemachinePackage.COMMAND__CODE:
+ return CODE_EDEFAULT == null ? code != null : !CODE_EDEFAULT.equals(code);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString()
+ {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (name: ");
+ result.append(name);
+ result.append(", code: ");
+ result.append(code);
+ result.append(')');
+ return result.toString();
+ }
+
+} //CommandImpl
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/impl/EventImpl.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/impl/EventImpl.java
new file mode 100644
index 0000000..fd99bbd
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/impl/EventImpl.java
@@ -0,0 +1,236 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.fowlerdsl.statemachine.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.xtext.example.fowlerdsl.statemachine.Event;
+import org.eclipse.xtext.example.fowlerdsl.statemachine.StatemachinePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Event</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.xtext.example.fowlerdsl.statemachine.impl.EventImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.xtext.example.fowlerdsl.statemachine.impl.EventImpl#getCode <em>Code</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class EventImpl extends MinimalEObjectImpl.Container implements Event
+{
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getCode() <em>Code</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCode()
+ * @generated
+ * @ordered
+ */
+ protected static final String CODE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getCode() <em>Code</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCode()
+ * @generated
+ * @ordered
+ */
+ protected String code = CODE_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EventImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return StatemachinePackage.Literals.EVENT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName)
+ {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, StatemachinePackage.EVENT__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getCode()
+ {
+ return code;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setCode(String newCode)
+ {
+ String oldCode = code;
+ code = newCode;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, StatemachinePackage.EVENT__CODE, oldCode, code));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID)
+ {
+ case StatemachinePackage.EVENT__NAME:
+ return getName();
+ case StatemachinePackage.EVENT__CODE:
+ return getCode();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID)
+ {
+ case StatemachinePackage.EVENT__NAME:
+ setName((String)newValue);
+ return;
+ case StatemachinePackage.EVENT__CODE:
+ setCode((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID)
+ {
+ case StatemachinePackage.EVENT__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case StatemachinePackage.EVENT__CODE:
+ setCode(CODE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID)
+ {
+ case StatemachinePackage.EVENT__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case StatemachinePackage.EVENT__CODE:
+ return CODE_EDEFAULT == null ? code != null : !CODE_EDEFAULT.equals(code);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString()
+ {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (name: ");
+ result.append(name);
+ result.append(", code: ");
+ result.append(code);
+ result.append(')');
+ return result.toString();
+ }
+
+} //EventImpl
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/impl/StateImpl.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/impl/StateImpl.java
new file mode 100644
index 0000000..28afe4d
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/impl/StateImpl.java
@@ -0,0 +1,281 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.fowlerdsl.statemachine.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.xtext.example.fowlerdsl.statemachine.Command;
+import org.eclipse.xtext.example.fowlerdsl.statemachine.State;
+import org.eclipse.xtext.example.fowlerdsl.statemachine.StatemachinePackage;
+import org.eclipse.xtext.example.fowlerdsl.statemachine.Transition;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>State</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.xtext.example.fowlerdsl.statemachine.impl.StateImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.xtext.example.fowlerdsl.statemachine.impl.StateImpl#getActions <em>Actions</em>}</li>
+ * <li>{@link org.eclipse.xtext.example.fowlerdsl.statemachine.impl.StateImpl#getTransitions <em>Transitions</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class StateImpl extends MinimalEObjectImpl.Container implements State
+{
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getActions() <em>Actions</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getActions()
+ * @generated
+ * @ordered
+ */
+ protected EList<Command> actions;
+
+ /**
+ * The cached value of the '{@link #getTransitions() <em>Transitions</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTransitions()
+ * @generated
+ * @ordered
+ */
+ protected EList<Transition> transitions;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected StateImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return StatemachinePackage.Literals.STATE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName)
+ {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, StatemachinePackage.STATE__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Command> getActions()
+ {
+ if (actions == null)
+ {
+ actions = new EObjectResolvingEList<Command>(Command.class, this, StatemachinePackage.STATE__ACTIONS);
+ }
+ return actions;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Transition> getTransitions()
+ {
+ if (transitions == null)
+ {
+ transitions = new EObjectContainmentEList<Transition>(Transition.class, this, StatemachinePackage.STATE__TRANSITIONS);
+ }
+ return transitions;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+ {
+ switch (featureID)
+ {
+ case StatemachinePackage.STATE__TRANSITIONS:
+ return ((InternalEList<?>)getTransitions()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID)
+ {
+ case StatemachinePackage.STATE__NAME:
+ return getName();
+ case StatemachinePackage.STATE__ACTIONS:
+ return getActions();
+ case StatemachinePackage.STATE__TRANSITIONS:
+ return getTransitions();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID)
+ {
+ case StatemachinePackage.STATE__NAME:
+ setName((String)newValue);
+ return;
+ case StatemachinePackage.STATE__ACTIONS:
+ getActions().clear();
+ getActions().addAll((Collection<? extends Command>)newValue);
+ return;
+ case StatemachinePackage.STATE__TRANSITIONS:
+ getTransitions().clear();
+ getTransitions().addAll((Collection<? extends Transition>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID)
+ {
+ case StatemachinePackage.STATE__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case StatemachinePackage.STATE__ACTIONS:
+ getActions().clear();
+ return;
+ case StatemachinePackage.STATE__TRANSITIONS:
+ getTransitions().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID)
+ {
+ case StatemachinePackage.STATE__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case StatemachinePackage.STATE__ACTIONS:
+ return actions != null && !actions.isEmpty();
+ case StatemachinePackage.STATE__TRANSITIONS:
+ return transitions != null && !transitions.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString()
+ {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (name: ");
+ result.append(name);
+ result.append(')');
+ return result.toString();
+ }
+
+} //StateImpl
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/impl/StatemachineFactoryImpl.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/impl/StatemachineFactoryImpl.java
new file mode 100644
index 0000000..ce47f67
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/impl/StatemachineFactoryImpl.java
@@ -0,0 +1,157 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.fowlerdsl.statemachine.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+import org.eclipse.xtext.example.fowlerdsl.statemachine.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class StatemachineFactoryImpl extends EFactoryImpl implements StatemachineFactory
+{
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static StatemachineFactory init()
+ {
+ try
+ {
+ StatemachineFactory theStatemachineFactory = (StatemachineFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/xtext/example/fowlerdsl/Statemachine");
+ if (theStatemachineFactory != null)
+ {
+ return theStatemachineFactory;
+ }
+ }
+ catch (Exception exception)
+ {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new StatemachineFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public StatemachineFactoryImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass)
+ {
+ switch (eClass.getClassifierID())
+ {
+ case StatemachinePackage.STATEMACHINE: return createStatemachine();
+ case StatemachinePackage.EVENT: return createEvent();
+ case StatemachinePackage.COMMAND: return createCommand();
+ case StatemachinePackage.STATE: return createState();
+ case StatemachinePackage.TRANSITION: return createTransition();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Statemachine createStatemachine()
+ {
+ StatemachineImpl statemachine = new StatemachineImpl();
+ return statemachine;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Event createEvent()
+ {
+ EventImpl event = new EventImpl();
+ return event;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Command createCommand()
+ {
+ CommandImpl command = new CommandImpl();
+ return command;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public State createState()
+ {
+ StateImpl state = new StateImpl();
+ return state;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Transition createTransition()
+ {
+ TransitionImpl transition = new TransitionImpl();
+ return transition;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public StatemachinePackage getStatemachinePackage()
+ {
+ return (StatemachinePackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static StatemachinePackage getPackage()
+ {
+ return StatemachinePackage.eINSTANCE;
+ }
+
+} //StatemachineFactoryImpl
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/impl/StatemachineImpl.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/impl/StatemachineImpl.java
new file mode 100644
index 0000000..ebfc3fd
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/impl/StatemachineImpl.java
@@ -0,0 +1,285 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.fowlerdsl.statemachine.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.xtext.example.fowlerdsl.statemachine.Command;
+import org.eclipse.xtext.example.fowlerdsl.statemachine.Event;
+import org.eclipse.xtext.example.fowlerdsl.statemachine.State;
+import org.eclipse.xtext.example.fowlerdsl.statemachine.Statemachine;
+import org.eclipse.xtext.example.fowlerdsl.statemachine.StatemachinePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Statemachine</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.xtext.example.fowlerdsl.statemachine.impl.StatemachineImpl#getEvents <em>Events</em>}</li>
+ * <li>{@link org.eclipse.xtext.example.fowlerdsl.statemachine.impl.StatemachineImpl#getResetEvents <em>Reset Events</em>}</li>
+ * <li>{@link org.eclipse.xtext.example.fowlerdsl.statemachine.impl.StatemachineImpl#getCommands <em>Commands</em>}</li>
+ * <li>{@link org.eclipse.xtext.example.fowlerdsl.statemachine.impl.StatemachineImpl#getStates <em>States</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class StatemachineImpl extends MinimalEObjectImpl.Container implements Statemachine
+{
+ /**
+ * The cached value of the '{@link #getEvents() <em>Events</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getEvents()
+ * @generated
+ * @ordered
+ */
+ protected EList<Event> events;
+
+ /**
+ * The cached value of the '{@link #getResetEvents() <em>Reset Events</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getResetEvents()
+ * @generated
+ * @ordered
+ */
+ protected EList<Event> resetEvents;
+
+ /**
+ * The cached value of the '{@link #getCommands() <em>Commands</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCommands()
+ * @generated
+ * @ordered
+ */
+ protected EList<Command> commands;
+
+ /**
+ * The cached value of the '{@link #getStates() <em>States</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getStates()
+ * @generated
+ * @ordered
+ */
+ protected EList<State> states;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected StatemachineImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return StatemachinePackage.Literals.STATEMACHINE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Event> getEvents()
+ {
+ if (events == null)
+ {
+ events = new EObjectContainmentEList<Event>(Event.class, this, StatemachinePackage.STATEMACHINE__EVENTS);
+ }
+ return events;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Event> getResetEvents()
+ {
+ if (resetEvents == null)
+ {
+ resetEvents = new EObjectResolvingEList<Event>(Event.class, this, StatemachinePackage.STATEMACHINE__RESET_EVENTS);
+ }
+ return resetEvents;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Command> getCommands()
+ {
+ if (commands == null)
+ {
+ commands = new EObjectContainmentEList<Command>(Command.class, this, StatemachinePackage.STATEMACHINE__COMMANDS);
+ }
+ return commands;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<State> getStates()
+ {
+ if (states == null)
+ {
+ states = new EObjectContainmentEList<State>(State.class, this, StatemachinePackage.STATEMACHINE__STATES);
+ }
+ return states;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+ {
+ switch (featureID)
+ {
+ case StatemachinePackage.STATEMACHINE__EVENTS:
+ return ((InternalEList<?>)getEvents()).basicRemove(otherEnd, msgs);
+ case StatemachinePackage.STATEMACHINE__COMMANDS:
+ return ((InternalEList<?>)getCommands()).basicRemove(otherEnd, msgs);
+ case StatemachinePackage.STATEMACHINE__STATES:
+ return ((InternalEList<?>)getStates()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID)
+ {
+ case StatemachinePackage.STATEMACHINE__EVENTS:
+ return getEvents();
+ case StatemachinePackage.STATEMACHINE__RESET_EVENTS:
+ return getResetEvents();
+ case StatemachinePackage.STATEMACHINE__COMMANDS:
+ return getCommands();
+ case StatemachinePackage.STATEMACHINE__STATES:
+ return getStates();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID)
+ {
+ case StatemachinePackage.STATEMACHINE__EVENTS:
+ getEvents().clear();
+ getEvents().addAll((Collection<? extends Event>)newValue);
+ return;
+ case StatemachinePackage.STATEMACHINE__RESET_EVENTS:
+ getResetEvents().clear();
+ getResetEvents().addAll((Collection<? extends Event>)newValue);
+ return;
+ case StatemachinePackage.STATEMACHINE__COMMANDS:
+ getCommands().clear();
+ getCommands().addAll((Collection<? extends Command>)newValue);
+ return;
+ case StatemachinePackage.STATEMACHINE__STATES:
+ getStates().clear();
+ getStates().addAll((Collection<? extends State>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID)
+ {
+ case StatemachinePackage.STATEMACHINE__EVENTS:
+ getEvents().clear();
+ return;
+ case StatemachinePackage.STATEMACHINE__RESET_EVENTS:
+ getResetEvents().clear();
+ return;
+ case StatemachinePackage.STATEMACHINE__COMMANDS:
+ getCommands().clear();
+ return;
+ case StatemachinePackage.STATEMACHINE__STATES:
+ getStates().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID)
+ {
+ case StatemachinePackage.STATEMACHINE__EVENTS:
+ return events != null && !events.isEmpty();
+ case StatemachinePackage.STATEMACHINE__RESET_EVENTS:
+ return resetEvents != null && !resetEvents.isEmpty();
+ case StatemachinePackage.STATEMACHINE__COMMANDS:
+ return commands != null && !commands.isEmpty();
+ case StatemachinePackage.STATEMACHINE__STATES:
+ return states != null && !states.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //StatemachineImpl
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/impl/StatemachinePackageImpl.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/impl/StatemachinePackageImpl.java
new file mode 100644
index 0000000..b294227
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/impl/StatemachinePackageImpl.java
@@ -0,0 +1,421 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.fowlerdsl.statemachine.impl;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+import org.eclipse.xtext.example.fowlerdsl.statemachine.Command;
+import org.eclipse.xtext.example.fowlerdsl.statemachine.Event;
+import org.eclipse.xtext.example.fowlerdsl.statemachine.State;
+import org.eclipse.xtext.example.fowlerdsl.statemachine.Statemachine;
+import org.eclipse.xtext.example.fowlerdsl.statemachine.StatemachineFactory;
+import org.eclipse.xtext.example.fowlerdsl.statemachine.StatemachinePackage;
+import org.eclipse.xtext.example.fowlerdsl.statemachine.Transition;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class StatemachinePackageImpl extends EPackageImpl implements StatemachinePackage
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass statemachineEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass eventEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass commandEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass stateEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass transitionEClass = null;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * <p>Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.StatemachinePackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private StatemachinePackageImpl()
+ {
+ super(eNS_URI, StatemachineFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>This method is used to initialize {@link StatemachinePackage#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static StatemachinePackage init()
+ {
+ if (isInited) return (StatemachinePackage)EPackage.Registry.INSTANCE.getEPackage(StatemachinePackage.eNS_URI);
+
+ // Obtain or create and register package
+ StatemachinePackageImpl theStatemachinePackage = (StatemachinePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof StatemachinePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new StatemachinePackageImpl());
+
+ isInited = true;
+
+ // Create package meta-data objects
+ theStatemachinePackage.createPackageContents();
+
+ // Initialize created meta-data
+ theStatemachinePackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theStatemachinePackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(StatemachinePackage.eNS_URI, theStatemachinePackage);
+ return theStatemachinePackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getStatemachine()
+ {
+ return statemachineEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getStatemachine_Events()
+ {
+ return (EReference)statemachineEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getStatemachine_ResetEvents()
+ {
+ return (EReference)statemachineEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getStatemachine_Commands()
+ {
+ return (EReference)statemachineEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getStatemachine_States()
+ {
+ return (EReference)statemachineEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getEvent()
+ {
+ return eventEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getEvent_Name()
+ {
+ return (EAttribute)eventEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getEvent_Code()
+ {
+ return (EAttribute)eventEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getCommand()
+ {
+ return commandEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getCommand_Name()
+ {
+ return (EAttribute)commandEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getCommand_Code()
+ {
+ return (EAttribute)commandEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getState()
+ {
+ return stateEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getState_Name()
+ {
+ return (EAttribute)stateEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getState_Actions()
+ {
+ return (EReference)stateEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getState_Transitions()
+ {
+ return (EReference)stateEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getTransition()
+ {
+ return transitionEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getTransition_Event()
+ {
+ return (EReference)transitionEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getTransition_State()
+ {
+ return (EReference)transitionEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public StatemachineFactory getStatemachineFactory()
+ {
+ return (StatemachineFactory)getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createPackageContents()
+ {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ statemachineEClass = createEClass(STATEMACHINE);
+ createEReference(statemachineEClass, STATEMACHINE__EVENTS);
+ createEReference(statemachineEClass, STATEMACHINE__RESET_EVENTS);
+ createEReference(statemachineEClass, STATEMACHINE__COMMANDS);
+ createEReference(statemachineEClass, STATEMACHINE__STATES);
+
+ eventEClass = createEClass(EVENT);
+ createEAttribute(eventEClass, EVENT__NAME);
+ createEAttribute(eventEClass, EVENT__CODE);
+
+ commandEClass = createEClass(COMMAND);
+ createEAttribute(commandEClass, COMMAND__NAME);
+ createEAttribute(commandEClass, COMMAND__CODE);
+
+ stateEClass = createEClass(STATE);
+ createEAttribute(stateEClass, STATE__NAME);
+ createEReference(stateEClass, STATE__ACTIONS);
+ createEReference(stateEClass, STATE__TRANSITIONS);
+
+ transitionEClass = createEClass(TRANSITION);
+ createEReference(transitionEClass, TRANSITION__EVENT);
+ createEReference(transitionEClass, TRANSITION__STATE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents()
+ {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(statemachineEClass, Statemachine.class, "Statemachine", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getStatemachine_Events(), this.getEvent(), null, "events", null, 0, -1, Statemachine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getStatemachine_ResetEvents(), this.getEvent(), null, "resetEvents", null, 0, -1, Statemachine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getStatemachine_Commands(), this.getCommand(), null, "commands", null, 0, -1, Statemachine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getStatemachine_States(), this.getState(), null, "states", null, 0, -1, Statemachine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(eventEClass, Event.class, "Event", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getEvent_Name(), ecorePackage.getEString(), "name", null, 0, 1, Event.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getEvent_Code(), ecorePackage.getEString(), "code", null, 0, 1, Event.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(commandEClass, Command.class, "Command", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getCommand_Name(), ecorePackage.getEString(), "name", null, 0, 1, Command.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getCommand_Code(), ecorePackage.getEString(), "code", null, 0, 1, Command.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(stateEClass, State.class, "State", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getState_Name(), ecorePackage.getEString(), "name", null, 0, 1, State.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getState_Actions(), this.getCommand(), null, "actions", null, 0, -1, State.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getState_Transitions(), this.getTransition(), null, "transitions", null, 0, -1, State.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(transitionEClass, Transition.class, "Transition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getTransition_Event(), this.getEvent(), null, "event", null, 0, 1, Transition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getTransition_State(), this.getState(), null, "state", null, 0, 1, Transition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} //StatemachinePackageImpl
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/impl/TransitionImpl.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/impl/TransitionImpl.java
new file mode 100644
index 0000000..0ca8bfc
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/impl/TransitionImpl.java
@@ -0,0 +1,242 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.fowlerdsl.statemachine.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.xtext.example.fowlerdsl.statemachine.Event;
+import org.eclipse.xtext.example.fowlerdsl.statemachine.State;
+import org.eclipse.xtext.example.fowlerdsl.statemachine.StatemachinePackage;
+import org.eclipse.xtext.example.fowlerdsl.statemachine.Transition;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Transition</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.xtext.example.fowlerdsl.statemachine.impl.TransitionImpl#getEvent <em>Event</em>}</li>
+ * <li>{@link org.eclipse.xtext.example.fowlerdsl.statemachine.impl.TransitionImpl#getState <em>State</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class TransitionImpl extends MinimalEObjectImpl.Container implements Transition
+{
+ /**
+ * The cached value of the '{@link #getEvent() <em>Event</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getEvent()
+ * @generated
+ * @ordered
+ */
+ protected Event event;
+
+ /**
+ * The cached value of the '{@link #getState() <em>State</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getState()
+ * @generated
+ * @ordered
+ */
+ protected State state;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TransitionImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return StatemachinePackage.Literals.TRANSITION;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Event getEvent()
+ {
+ if (event != null && event.eIsProxy())
+ {
+ InternalEObject oldEvent = (InternalEObject)event;
+ event = (Event)eResolveProxy(oldEvent);
+ if (event != oldEvent)
+ {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, StatemachinePackage.TRANSITION__EVENT, oldEvent, event));
+ }
+ }
+ return event;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Event basicGetEvent()
+ {
+ return event;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setEvent(Event newEvent)
+ {
+ Event oldEvent = event;
+ event = newEvent;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, StatemachinePackage.TRANSITION__EVENT, oldEvent, event));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public State getState()
+ {
+ if (state != null && state.eIsProxy())
+ {
+ InternalEObject oldState = (InternalEObject)state;
+ state = (State)eResolveProxy(oldState);
+ if (state != oldState)
+ {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, StatemachinePackage.TRANSITION__STATE, oldState, state));
+ }
+ }
+ return state;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public State basicGetState()
+ {
+ return state;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setState(State newState)
+ {
+ State oldState = state;
+ state = newState;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, StatemachinePackage.TRANSITION__STATE, oldState, state));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID)
+ {
+ case StatemachinePackage.TRANSITION__EVENT:
+ if (resolve) return getEvent();
+ return basicGetEvent();
+ case StatemachinePackage.TRANSITION__STATE:
+ if (resolve) return getState();
+ return basicGetState();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID)
+ {
+ case StatemachinePackage.TRANSITION__EVENT:
+ setEvent((Event)newValue);
+ return;
+ case StatemachinePackage.TRANSITION__STATE:
+ setState((State)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID)
+ {
+ case StatemachinePackage.TRANSITION__EVENT:
+ setEvent((Event)null);
+ return;
+ case StatemachinePackage.TRANSITION__STATE:
+ setState((State)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID)
+ {
+ case StatemachinePackage.TRANSITION__EVENT:
+ return event != null;
+ case StatemachinePackage.TRANSITION__STATE:
+ return state != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //TransitionImpl
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/util/StatemachineAdapterFactory.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/util/StatemachineAdapterFactory.java
new file mode 100644
index 0000000..8083a50
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/util/StatemachineAdapterFactory.java
@@ -0,0 +1,215 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.fowlerdsl.statemachine.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.xtext.example.fowlerdsl.statemachine.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.StatemachinePackage
+ * @generated
+ */
+public class StatemachineAdapterFactory extends AdapterFactoryImpl
+{
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static StatemachinePackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public StatemachineAdapterFactory()
+ {
+ if (modelPackage == null)
+ {
+ modelPackage = StatemachinePackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc -->
+ * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+ * <!-- end-user-doc -->
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object)
+ {
+ if (object == modelPackage)
+ {
+ return true;
+ }
+ if (object instanceof EObject)
+ {
+ return ((EObject)object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+ /**
+ * The switch that delegates to the <code>createXXX</code> methods.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected StatemachineSwitch<Adapter> modelSwitch =
+ new StatemachineSwitch<Adapter>()
+ {
+ @Override
+ public Adapter caseStatemachine(Statemachine object)
+ {
+ return createStatemachineAdapter();
+ }
+ @Override
+ public Adapter caseEvent(Event object)
+ {
+ return createEventAdapter();
+ }
+ @Override
+ public Adapter caseCommand(Command object)
+ {
+ return createCommandAdapter();
+ }
+ @Override
+ public Adapter caseState(State object)
+ {
+ return createStateAdapter();
+ }
+ @Override
+ public Adapter caseTransition(Transition object)
+ {
+ return createTransitionAdapter();
+ }
+ @Override
+ public Adapter defaultCase(EObject object)
+ {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param target the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target)
+ {
+ return modelSwitch.doSwitch((EObject)target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.xtext.example.fowlerdsl.statemachine.Statemachine <em>Statemachine</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.Statemachine
+ * @generated
+ */
+ public Adapter createStatemachineAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.xtext.example.fowlerdsl.statemachine.Event <em>Event</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.Event
+ * @generated
+ */
+ public Adapter createEventAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.xtext.example.fowlerdsl.statemachine.Command <em>Command</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.Command
+ * @generated
+ */
+ public Adapter createCommandAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.xtext.example.fowlerdsl.statemachine.State <em>State</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.State
+ * @generated
+ */
+ public Adapter createStateAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.xtext.example.fowlerdsl.statemachine.Transition <em>Transition</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.Transition
+ * @generated
+ */
+ public Adapter createTransitionAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter()
+ {
+ return null;
+ }
+
+} //StatemachineAdapterFactory
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/util/StatemachineSwitch.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/util/StatemachineSwitch.java
new file mode 100644
index 0000000..b2a0f73
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/statemachine/util/StatemachineSwitch.java
@@ -0,0 +1,233 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ */
+package org.eclipse.xtext.example.fowlerdsl.statemachine.util;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.xtext.example.fowlerdsl.statemachine.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xtext.example.fowlerdsl.statemachine.StatemachinePackage
+ * @generated
+ */
+public class StatemachineSwitch<T>
+{
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static StatemachinePackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public StatemachineSwitch()
+ {
+ if (modelPackage == null)
+ {
+ modelPackage = StatemachinePackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ public T doSwitch(EObject theEObject)
+ {
+ return doSwitch(theEObject.eClass(), theEObject);
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ protected T doSwitch(EClass theEClass, EObject theEObject)
+ {
+ if (theEClass.eContainer() == modelPackage)
+ {
+ return doSwitch(theEClass.getClassifierID(), theEObject);
+ }
+ else
+ {
+ List<EClass> eSuperTypes = theEClass.getESuperTypes();
+ return
+ eSuperTypes.isEmpty() ?
+ defaultCase(theEObject) :
+ doSwitch(eSuperTypes.get(0), theEObject);
+ }
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ protected T doSwitch(int classifierID, EObject theEObject)
+ {
+ switch (classifierID)
+ {
+ case StatemachinePackage.STATEMACHINE:
+ {
+ Statemachine statemachine = (Statemachine)theEObject;
+ T result = caseStatemachine(statemachine);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case StatemachinePackage.EVENT:
+ {
+ Event event = (Event)theEObject;
+ T result = caseEvent(event);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case StatemachinePackage.COMMAND:
+ {
+ Command command = (Command)theEObject;
+ T result = caseCommand(command);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case StatemachinePackage.STATE:
+ {
+ State state = (State)theEObject;
+ T result = caseState(state);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case StatemachinePackage.TRANSITION:
+ {
+ Transition transition = (Transition)theEObject;
+ T result = caseTransition(transition);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Statemachine</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Statemachine</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseStatemachine(Statemachine object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Event</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Event</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseEvent(Event object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Command</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Command</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseCommand(Command object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>State</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>State</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseState(State object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Transition</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Transition</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTransition(Transition object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ public T defaultCase(EObject object)
+ {
+ return null;
+ }
+
+} //StatemachineSwitch
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/validation/AbstractStatemachineJavaValidator.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/validation/AbstractStatemachineJavaValidator.java
new file mode 100644
index 0000000..77450e6
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/validation/AbstractStatemachineJavaValidator.java
@@ -0,0 +1,20 @@
+package org.eclipse.xtext.example.fowlerdsl.validation;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.xtext.validation.AbstractDeclarativeValidator;
+import org.eclipse.xtext.validation.ComposedChecks;
+
+@ComposedChecks(validators= {org.eclipse.xtext.validation.ImportUriValidator.class, org.eclipse.xtext.validation.NamesAreUniqueValidator.class})
+public class AbstractStatemachineJavaValidator extends AbstractDeclarativeValidator {
+
+ @Override
+ protected List<EPackage> getEPackages() {
+ List<EPackage> result = new ArrayList<EPackage>();
+ result.add(org.eclipse.xtext.example.fowlerdsl.statemachine.StatemachinePackage.eINSTANCE);
+ return result;
+ }
+
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src/org/eclipse/xtext/example/fowlerdsl/GenerateStatemachine.mwe2 b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src/org/eclipse/xtext/example/fowlerdsl/GenerateStatemachine.mwe2
new file mode 100644
index 0000000..f8c90aa
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src/org/eclipse/xtext/example/fowlerdsl/GenerateStatemachine.mwe2
@@ -0,0 +1,133 @@
+module org.eclipse.xtext.example.fowlerdsl.GenerateStatemachine
+
+import org.eclipse.emf.mwe.utils.*
+import org.eclipse.xtext.generator.*
+import org.eclipse.xtext.ui.generator.*
+
+var grammarURI = "classpath:/org/eclipse/xtext/example/fowlerdsl/Statemachine.xtext"
+var file.extensions = "statemachine"
+var projectName = "org.eclipse.xtext.example.fowlerdsl"
+var runtimeProject = "../${projectName}"
+
+Workflow {
+ bean = StandaloneSetup {
+ scanClassPath = true
+ platformUri = "${runtimeProject}/.."
+ }
+
+ component = DirectoryCleaner {
+ directory = "${runtimeProject}/src-gen"
+ }
+
+ component = DirectoryCleaner {
+ directory = "${runtimeProject}.ui/src-gen"
+ }
+
+ component = Generator {
+ pathRtProject = runtimeProject
+ pathUiProject = "${runtimeProject}.ui"
+ pathTestProject = "${runtimeProject}.tests"
+ projectNameRt = projectName
+ projectNameUi = "${projectName}.ui"
+ language = {
+ uri = grammarURI
+ fileExtensions = file.extensions
+
+ // Java API to access grammar elements (required by several other fragments)
+ fragment = grammarAccess.GrammarAccessFragment {}
+
+ // generates Java API for the generated EPackages
+ fragment = ecore.EcoreGeneratorFragment {
+ // referencedGenModels = "
+ // platform:/resource/org.eclipse.xtext.xbase/model/Xbase.genmodel,
+ // platform:/resource/org.eclipse.xtext.common.types/model/JavaVMTypes.genmodel
+ // "
+ }
+
+ // Serializer 2.0
+ fragment = serializer.SerializerFragment {}
+
+ // the serialization component (1.0)
+ // fragment = parseTreeConstructor.ParseTreeConstructorFragment {}
+
+ // a custom ResourceFactory for use with EMF
+ fragment = resourceFactory.ResourceFactoryFragment {
+ fileExtensions = file.extensions
+ }
+
+ // The antlr parser generator fragment.
+ fragment = parser.antlr.XtextAntlrGeneratorFragment {
+ // options = {
+ // backtrack = true
+ // }
+ }
+
+ // java-based API for validation
+ fragment = validation.JavaValidatorFragment {
+ composedCheck = "org.eclipse.xtext.validation.ImportUriValidator"
+ composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator"
+ }
+
+ // scoping and exporting API
+ // fragment = scoping.ImportURIScopingFragment {}
+ // fragment = exporting.SimpleNamesFragment {}
+
+ // scoping and exporting API
+ fragment = scoping.ImportNamespacesScopingFragment {}
+ fragment = exporting.QualifiedNamesFragment {}
+ fragment = builder.BuilderIntegrationFragment {}
+
+ // generator API
+ fragment = generator.GeneratorFragment {
+ generateMwe = true
+ generateJavaMain = true
+ }
+
+ // formatter API
+ fragment = formatting.FormatterFragment {}
+
+ // labeling API
+ fragment = labeling.LabelProviderFragment {}
+
+ // outline API
+ fragment = outline.OutlineTreeProviderFragment {}
+ fragment = outline.QuickOutlineFragment {}
+
+ // quickfix API
+ fragment = quickfix.QuickfixProviderFragment {}
+
+ // content assist API
+ fragment = contentAssist.JavaBasedContentAssistFragment {}
+
+ // generates a more lightweight Antlr parser and lexer tailored for content assist
+ fragment = parser.antlr.XtextAntlrUiGeneratorFragment {}
+
+ // generates junit test support classes into Generator#pathTestProject
+ fragment = junit.Junit4Fragment {}
+
+ // project wizard (optional)
+ // fragment = projectWizard.SimpleProjectWizardFragment {
+ // generatorProjectName = "${projectName}.generator"
+ // modelFileExtension = file.extensions
+ // }
+
+ // provides the necessary bindings for java types integration
+ fragment = types.TypesGeneratorFragment {}
+
+ // generates the required bindings only if the grammar inherits from Xbase
+ fragment = xbase.XbaseGeneratorFragment {}
+
+ // provides a preference page for template proposals
+ fragment = templates.CodetemplatesGeneratorFragment {}
+
+ // rename refactoring
+ fragment = refactoring.RefactorElementNameFragment {}
+
+ // provides a compare view
+ fragment = compare.CompareFragment {
+ fileExtensions = file.extensions
+ }
+
+ }
+ }
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src/org/eclipse/xtext/example/fowlerdsl/Statemachine.xtext b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src/org/eclipse/xtext/example/fowlerdsl/Statemachine.xtext
new file mode 100644
index 0000000..4392eb8
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src/org/eclipse/xtext/example/fowlerdsl/Statemachine.xtext
@@ -0,0 +1,36 @@
+grammar org.eclipse.xtext.example.fowlerdsl.Statemachine with org.eclipse.xtext.common.Terminals
+
+generate statemachine "http://www.eclipse.org/xtext/example/fowlerdsl/Statemachine"
+
+Statemachine :
+ {Statemachine}
+ ('events'
+ events+=Event+
+ 'end')?
+ ('resetEvents'
+ resetEvents+=[Event]+
+ 'end')?
+ ('commands'
+ commands+=Command+
+ 'end')?
+ states+=State*
+;
+
+Event:
+ name=ID code=ID
+;
+
+Command:
+ name=ID code=ID
+;
+
+State:
+ 'state' name=ID
+ ('actions' '{' actions+=[Command]+ '}')?
+ transitions+=Transition*
+ 'end'
+;
+
+Transition:
+ event=[Event] '=>' state=[State]
+;
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src/org/eclipse/xtext/example/fowlerdsl/StatemachineRuntimeModule.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src/org/eclipse/xtext/example/fowlerdsl/StatemachineRuntimeModule.java
new file mode 100644
index 0000000..e1a01b4
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src/org/eclipse/xtext/example/fowlerdsl/StatemachineRuntimeModule.java
@@ -0,0 +1,11 @@
+/*
+ * generated by Xtext
+ */
+package org.eclipse.xtext.example.fowlerdsl;
+
+/**
+ * Use this class to register components to be used at runtime / without the Equinox extension registry.
+ */
+public class StatemachineRuntimeModule extends org.eclipse.xtext.example.fowlerdsl.AbstractStatemachineRuntimeModule {
+
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src/org/eclipse/xtext/example/fowlerdsl/StatemachineStandaloneSetup.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src/org/eclipse/xtext/example/fowlerdsl/StatemachineStandaloneSetup.java
new file mode 100644
index 0000000..3f56129
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src/org/eclipse/xtext/example/fowlerdsl/StatemachineStandaloneSetup.java
@@ -0,0 +1,14 @@
+
+package org.eclipse.xtext.example.fowlerdsl;
+
+/**
+ * Initialization support for running Xtext languages
+ * without equinox extension registry
+ */
+public class StatemachineStandaloneSetup extends StatemachineStandaloneSetupGenerated{
+
+ public static void doSetup() {
+ new StatemachineStandaloneSetup().createInjectorAndDoEMFRegistration();
+ }
+}
+
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src/org/eclipse/xtext/example/fowlerdsl/formatting/StatemachineFormatter.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src/org/eclipse/xtext/example/fowlerdsl/formatting/StatemachineFormatter.java
new file mode 100644
index 0000000..cfd31e2
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src/org/eclipse/xtext/example/fowlerdsl/formatting/StatemachineFormatter.java
@@ -0,0 +1,27 @@
+/*
+ * generated by Xtext
+ */
+package org.eclipse.xtext.example.fowlerdsl.formatting;
+
+import org.eclipse.xtext.formatting.impl.AbstractDeclarativeFormatter;
+import org.eclipse.xtext.formatting.impl.FormattingConfig;
+
+/**
+ * This class contains custom formatting description.
+ *
+ * see : http://www.eclipse.org/Xtext/documentation/latest/xtext.html#formatting
+ * on how and when to use it
+ *
+ * Also see {@link org.eclipse.xtext.xtext.XtextFormattingTokenSerializer} as an example
+ */
+public class StatemachineFormatter extends AbstractDeclarativeFormatter {
+
+ @Override
+ protected void configureFormatting(FormattingConfig c) {
+// It's usually a good idea to activate the following three statements.
+// They will add and preserve newlines around comments
+// c.setLinewrap(0, 1, 2).before(getGrammarAccess().getSL_COMMENTRule());
+// c.setLinewrap(0, 1, 2).before(getGrammarAccess().getML_COMMENTRule());
+// c.setLinewrap(0, 1, 1).after(getGrammarAccess().getML_COMMENTRule());
+ }
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src/org/eclipse/xtext/example/fowlerdsl/generator/Main.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src/org/eclipse/xtext/example/fowlerdsl/generator/Main.java
new file mode 100644
index 0000000..97de9f6
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src/org/eclipse/xtext/example/fowlerdsl/generator/Main.java
@@ -0,0 +1,67 @@
+
+/*
+ * generated by Xtext
+ */
+package org.eclipse.xtext.example.fowlerdsl.generator;
+
+import java.util.List;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.xtext.generator.IGenerator;
+import org.eclipse.xtext.generator.JavaIoFileSystemAccess;
+import org.eclipse.xtext.util.CancelIndicator;
+import org.eclipse.xtext.validation.CheckMode;
+import org.eclipse.xtext.validation.IResourceValidator;
+import org.eclipse.xtext.validation.Issue;
+
+import com.google.inject.Inject;
+import com.google.inject.Injector;
+import com.google.inject.Provider;
+
+public class Main {
+
+ public static void main(String[] args) {
+ if (args.length==0) {
+ System.err.println("Aborting: no path to EMF resource provided!");
+ return;
+ }
+ Injector injector = new org.eclipse.xtext.example.fowlerdsl.StatemachineStandaloneSetupGenerated().createInjectorAndDoEMFRegistration();
+ Main main = injector.getInstance(Main.class);
+ main.runGenerator(args[0]);
+ }
+
+ @Inject
+ private Provider<ResourceSet> resourceSetProvider;
+
+ @Inject
+ private IResourceValidator validator;
+
+ @Inject
+ private IGenerator generator;
+
+ @Inject
+ private JavaIoFileSystemAccess fileAccess;
+
+ protected void runGenerator(String string) {
+ // load the resource
+ ResourceSet set = resourceSetProvider.get();
+ Resource resource = set.getResource(URI.createURI(string), true);
+
+ // validate the resource
+ List<Issue> list = validator.validate(resource, CheckMode.ALL, CancelIndicator.NullImpl);
+ if (!list.isEmpty()) {
+ for (Issue issue : list) {
+ System.err.println(issue);
+ }
+ return;
+ }
+
+ // configure and start the generator
+ fileAccess.setOutputPath("src-gen/");
+ generator.doGenerate(resource, fileAccess);
+
+ System.out.println("Code generation finished.");
+ }
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src/org/eclipse/xtext/example/fowlerdsl/generator/StatemachineGenerator.xtend b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src/org/eclipse/xtext/example/fowlerdsl/generator/StatemachineGenerator.xtend
new file mode 100644
index 0000000..f87bd09
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src/org/eclipse/xtext/example/fowlerdsl/generator/StatemachineGenerator.xtend
@@ -0,0 +1,97 @@
+/*
+ * generated by Xtext
+ */
+package org.eclipse.xtext.example.fowlerdsl.generator
+
+import org.eclipse.emf.ecore.resource.Resource
+import org.eclipse.xtext.example.fowlerdsl.statemachine.Command
+import org.eclipse.xtext.example.fowlerdsl.statemachine.State
+import org.eclipse.xtext.example.fowlerdsl.statemachine.Statemachine
+import org.eclipse.xtext.generator.IFileSystemAccess
+import org.eclipse.xtext.generator.IGenerator
+
+class StatemachineGenerator implements IGenerator {
+
+ override void doGenerate(Resource resource, IFileSystemAccess fsa) {
+ fsa.generateFile(resource.className+".java", toJavaCode(resource.contents.head as Statemachine))
+ }
+
+ def className(Resource res) {
+ var name = res.URI.lastSegment
+ return name.substring(0, name.indexOf('.'))
+ }
+
+ def toJavaCode(Statemachine sm) '''
+ import java.io.BufferedReader;
+ import java.io.IOException;
+ import java.io.InputStreamReader;
+
+ public class «sm.eResource.className» {
+
+ public static void main(String[] args) {
+ new «sm.eResource.className»().run();
+ }
+
+ «FOR c : sm.commands»
+ «c.declareCommand»
+ «ENDFOR»
+
+ protected void run() {
+ boolean executeActions = true;
+ String currentState = "«sm.states.head.name»";
+ String lastEvent = null;
+ while (true) {
+ «FOR state : sm.states»
+ «state.generateCode»
+ «ENDFOR»
+ «FOR resetEvent : sm.resetEvents»
+ if ("«resetEvent.name»".equals(lastEvent)) {
+ System.out.println("Resetting state machine.");
+ currentState = "«sm.states.head.name»";
+ executeActions = true;
+ }
+ «ENDFOR»
+
+ }
+ }
+
+ private String receiveEvent() {
+ System.out.flush();
+ BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
+ try {
+ return br.readLine();
+ } catch (IOException ioe) {
+ System.out.println("Problem reading input");
+ return "";
+ }
+ }
+ }
+ '''
+
+ def declareCommand(Command command) '''
+ protected void do«command.name.toFirstUpper»() {
+ System.out.println("Executing command «command.name» («command.code»)");
+ }
+ '''
+
+ def generateCode(State state) '''
+ if (currentState.equals("«state.name»")) {
+ if (executeActions) {
+ «FOR c : state.actions»
+ do«c.name.toFirstUpper»();
+ «ENDFOR»
+ executeActions = false;
+ }
+ System.out.println("Your are now in state '«state.name»'. Possible events are [«
+ state.transitions.map(t | t.event.name).join(', ')»].");
+ lastEvent = receiveEvent();
+ «FOR t : state.transitions»
+ if ("«t.event.name»".equals(lastEvent)) {
+ currentState = "«t.state.name»";
+ executeActions = true;
+ }
+ «ENDFOR»
+ }
+ '''
+
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src/org/eclipse/xtext/example/fowlerdsl/generator/StatemachineGeneratorMWE.mwe2 b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src/org/eclipse/xtext/example/fowlerdsl/generator/StatemachineGeneratorMWE.mwe2
new file mode 100644
index 0000000..68b77c9
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src/org/eclipse/xtext/example/fowlerdsl/generator/StatemachineGeneratorMWE.mwe2
@@ -0,0 +1,32 @@
+
+module org.eclipse.xtext.example.fowlerdsl.generator.StatemachineGeneratorMWE
+
+import org.eclipse.emf.mwe.utils.*
+
+var targetDir
+var modelPath
+
+Workflow {
+
+ component = org.eclipse.xtext.mwe.Reader {
+ // lookup all resources on the classpath
+ // useJavaClassPath = true
+
+ // or define search scope explicitly
+ path = modelPath
+
+ // this class will be generated by the xtext generator
+ register = org.eclipse.xtext.example.fowlerdsl.StatemachineStandaloneSetup {}
+ loadResource = {
+ slot = "model"
+ }
+ }
+
+ component = org.eclipse.xtext.generator.GeneratorComponent {
+ register = org.eclipse.xtext.example.fowlerdsl.StatemachineStandaloneSetup {}
+ slot = 'model'
+ outlet = {
+ path = targetDir
+ }
+ }
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src/org/eclipse/xtext/example/fowlerdsl/scoping/StatemachineScopeProvider.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src/org/eclipse/xtext/example/fowlerdsl/scoping/StatemachineScopeProvider.java
new file mode 100644
index 0000000..c4d85e2
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src/org/eclipse/xtext/example/fowlerdsl/scoping/StatemachineScopeProvider.java
@@ -0,0 +1,17 @@
+/*
+ * generated by Xtext
+ */
+package org.eclipse.xtext.example.fowlerdsl.scoping;
+
+import org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider;
+
+/**
+ * This class contains custom scoping description.
+ *
+ * see : http://www.eclipse.org/Xtext/documentation/latest/xtext.html#scoping
+ * on how and when to use it
+ *
+ */
+public class StatemachineScopeProvider extends AbstractDeclarativeScopeProvider {
+
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src/org/eclipse/xtext/example/fowlerdsl/serializer/StatemachineSemanticSequencer.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src/org/eclipse/xtext/example/fowlerdsl/serializer/StatemachineSemanticSequencer.java
new file mode 100644
index 0000000..2a82631
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src/org/eclipse/xtext/example/fowlerdsl/serializer/StatemachineSemanticSequencer.java
@@ -0,0 +1,4 @@
+package org.eclipse.xtext.example.fowlerdsl.serializer;
+
+public class StatemachineSemanticSequencer extends AbstractStatemachineSemanticSequencer {
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src/org/eclipse/xtext/example/fowlerdsl/serializer/StatemachineSyntacticSequencer.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src/org/eclipse/xtext/example/fowlerdsl/serializer/StatemachineSyntacticSequencer.java
new file mode 100644
index 0000000..f0f7464
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src/org/eclipse/xtext/example/fowlerdsl/serializer/StatemachineSyntacticSequencer.java
@@ -0,0 +1,4 @@
+package org.eclipse.xtext.example.fowlerdsl.serializer;
+
+public class StatemachineSyntacticSequencer extends AbstractStatemachineSyntacticSequencer {
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src/org/eclipse/xtext/example/fowlerdsl/validation/StatemachineJavaValidator.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src/org/eclipse/xtext/example/fowlerdsl/validation/StatemachineJavaValidator.java
new file mode 100644
index 0000000..7165d15
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/src/org/eclipse/xtext/example/fowlerdsl/validation/StatemachineJavaValidator.java
@@ -0,0 +1,13 @@
+package org.eclipse.xtext.example.fowlerdsl.validation;
+
+
+public class StatemachineJavaValidator extends AbstractStatemachineJavaValidator {
+
+// @Check
+// public void checkGreetingStartsWithCapital(Greeting greeting) {
+// if (!Character.isUpperCase(greeting.getName().charAt(0))) {
+// warning("Name should start with a capital", MyDslPackage.Literals.GREETING__NAME);
+// }
+// }
+
+}
diff --git a/examples/plugins/org.eclipse.xtext.example.fowlerdsl/xtend-gen/org/eclipse/xtext/example/fowlerdsl/generator/StatemachineGenerator.java b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/xtend-gen/org/eclipse/xtext/example/fowlerdsl/generator/StatemachineGenerator.java
new file mode 100644
index 0000000..fbdd88b
--- /dev/null
+++ b/examples/plugins/org.eclipse.xtext.example.fowlerdsl/xtend-gen/org/eclipse/xtext/example/fowlerdsl/generator/StatemachineGenerator.java
@@ -0,0 +1,289 @@
+package org.eclipse.xtext.example.fowlerdsl.generator;
+
+import java.util.List;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.xtend2.lib.StringConcatenation;
+import org.eclipse.xtext.example.fowlerdsl.statemachine.Command;
+import org.eclipse.xtext.example.fowlerdsl.statemachine.Event;
+import org.eclipse.xtext.example.fowlerdsl.statemachine.State;
+import org.eclipse.xtext.example.fowlerdsl.statemachine.Statemachine;
+import org.eclipse.xtext.example.fowlerdsl.statemachine.Transition;
+import org.eclipse.xtext.generator.IFileSystemAccess;
+import org.eclipse.xtext.generator.IGenerator;
+import org.eclipse.xtext.xbase.lib.Functions.Function1;
+import org.eclipse.xtext.xbase.lib.IterableExtensions;
+import org.eclipse.xtext.xbase.lib.ListExtensions;
+import org.eclipse.xtext.xbase.lib.StringExtensions;
+
+@SuppressWarnings("all")
+public class StatemachineGenerator implements IGenerator {
+ public void doGenerate(final Resource resource, final IFileSystemAccess fsa) {
+ String _className = this.className(resource);
+ String _plus = (_className + ".java");
+ EList<EObject> _contents = resource.getContents();
+ EObject _head = IterableExtensions.<EObject>head(_contents);
+ CharSequence _javaCode = this.toJavaCode(((Statemachine) _head));
+ fsa.generateFile(_plus, _javaCode);
+ }
+
+ public String className(final Resource res) {
+ URI _uRI = res.getURI();
+ String name = _uRI.lastSegment();
+ int _indexOf = name.indexOf(".");
+ return name.substring(0, _indexOf);
+ }
+
+ public CharSequence toJavaCode(final Statemachine sm) {
+ StringConcatenation _builder = new StringConcatenation();
+ _builder.append("import java.io.BufferedReader;");
+ _builder.newLine();
+ _builder.append("import java.io.IOException;");
+ _builder.newLine();
+ _builder.append("import java.io.InputStreamReader;");
+ _builder.newLine();
+ _builder.newLine();
+ _builder.append("public class ");
+ Resource _eResource = sm.eResource();
+ String _className = this.className(_eResource);
+ _builder.append(_className, "");
+ _builder.append(" {");
+ _builder.newLineIfNotEmpty();
+ _builder.append("\t");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("public static void main(String[] args) {");
+ _builder.newLine();
+ _builder.append("\t\t");
+ _builder.append("new ");
+ Resource _eResource_1 = sm.eResource();
+ String _className_1 = this.className(_eResource_1);
+ _builder.append(_className_1, " ");
+ _builder.append("().run();");
+ _builder.newLineIfNotEmpty();
+ _builder.append("\t");
+ _builder.append("}");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.newLine();
+ {
+ EList<Command> _commands = sm.getCommands();
+ for(final Command c : _commands) {
+ _builder.append("\t");
+ CharSequence _declareCommand = this.declareCommand(c);
+ _builder.append(_declareCommand, " ");
+ _builder.newLineIfNotEmpty();
+ }
+ }
+ _builder.append("\t");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("protected void run() {");
+ _builder.newLine();
+ _builder.append("\t\t");
+ _builder.append("boolean executeActions = true;");
+ _builder.newLine();
+ _builder.append("\t\t");
+ _builder.append("String currentState = \"");
+ EList<State> _states = sm.getStates();
+ State _head = IterableExtensions.<State>head(_states);
+ String _name = _head.getName();
+ _builder.append(_name, " ");
+ _builder.append("\";");
+ _builder.newLineIfNotEmpty();
+ _builder.append("\t\t");
+ _builder.append("String lastEvent = null;");
+ _builder.newLine();
+ _builder.append("\t\t");
+ _builder.append("while (true) {");
+ _builder.newLine();
+ {
+ EList<State> _states_1 = sm.getStates();
+ for(final State state : _states_1) {
+ _builder.append("\t\t\t");
+ CharSequence _generateCode = this.generateCode(state);
+ _builder.append(_generateCode, " ");
+ _builder.newLineIfNotEmpty();
+ }
+ }
+ {
+ EList<Event> _resetEvents = sm.getResetEvents();
+ for(final Event resetEvent : _resetEvents) {
+ _builder.append("\t\t\t");
+ _builder.append("if (\"");
+ String _name_1 = resetEvent.getName();
+ _builder.append(_name_1, " ");
+ _builder.append("\".equals(lastEvent)) {");
+ _builder.newLineIfNotEmpty();
+ _builder.append("\t\t\t");
+ _builder.append("\t");
+ _builder.append("System.out.println(\"Resetting state machine.\");");
+ _builder.newLine();
+ _builder.append("\t\t\t");
+ _builder.append("\t");
+ _builder.append("currentState = \"");
+ EList<State> _states_2 = sm.getStates();
+ State _head_1 = IterableExtensions.<State>head(_states_2);
+ String _name_2 = _head_1.getName();
+ _builder.append(_name_2, " ");
+ _builder.append("\";");
+ _builder.newLineIfNotEmpty();
+ _builder.append("\t\t\t");
+ _builder.append("\t");
+ _builder.append("executeActions = true;");
+ _builder.newLine();
+ _builder.append("\t\t\t");
+ _builder.append("}");
+ _builder.newLine();
+ }
+ }
+ _builder.append("\t\t\t");
+ _builder.newLine();
+ _builder.append("\t\t");
+ _builder.append("}");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("}");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("private String receiveEvent() {");
+ _builder.newLine();
+ _builder.append("\t\t");
+ _builder.append("System.out.flush();");
+ _builder.newLine();
+ _builder.append("\t\t");
+ _builder.append("BufferedReader br = new BufferedReader(new InputStreamReader(System.in));");
+ _builder.newLine();
+ _builder.append("\t\t");
+ _builder.append("try {");
+ _builder.newLine();
+ _builder.append("\t\t\t");
+ _builder.append("return br.readLine();");
+ _builder.newLine();
+ _builder.append("\t\t");
+ _builder.append("} catch (IOException ioe) {");
+ _builder.newLine();
+ _builder.append("\t\t\t");
+ _builder.append("System.out.println(\"Problem reading input\");");
+ _builder.newLine();
+ _builder.append("\t\t\t");
+ _builder.append("return \"\";");
+ _builder.newLine();
+ _builder.append("\t\t");
+ _builder.append("}");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("}");
+ _builder.newLine();
+ _builder.append("}");
+ _builder.newLine();
+ return _builder;
+ }
+
+ public CharSequence declareCommand(final Command command) {
+ StringConcatenation _builder = new StringConcatenation();
+ _builder.append("protected void do");
+ String _name = command.getName();
+ String _firstUpper = StringExtensions.toFirstUpper(_name);
+ _builder.append(_firstUpper, "");
+ _builder.append("() {");
+ _builder.newLineIfNotEmpty();
+ _builder.append("\t");
+ _builder.append("System.out.println(\"Executing command ");
+ String _name_1 = command.getName();
+ _builder.append(_name_1, " ");
+ _builder.append(" (");
+ String _code = command.getCode();
+ _builder.append(_code, " ");
+ _builder.append(")\");");
+ _builder.newLineIfNotEmpty();
+ _builder.append("}");
+ _builder.newLine();
+ return _builder;
+ }
+
+ public CharSequence generateCode(final State state) {
+ StringConcatenation _builder = new StringConcatenation();
+ _builder.append("if (currentState.equals(\"");
+ String _name = state.getName();
+ _builder.append(_name, "");
+ _builder.append("\")) {");
+ _builder.newLineIfNotEmpty();
+ _builder.append("\t");
+ _builder.append("if (executeActions) {");
+ _builder.newLine();
+ {
+ EList<Command> _actions = state.getActions();
+ for(final Command c : _actions) {
+ _builder.append("\t\t");
+ _builder.append("do");
+ String _name_1 = c.getName();
+ String _firstUpper = StringExtensions.toFirstUpper(_name_1);
+ _builder.append(_firstUpper, " ");
+ _builder.append("();");
+ _builder.newLineIfNotEmpty();
+ }
+ }
+ _builder.append("\t\t");
+ _builder.append("executeActions = false;");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("}");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("System.out.println(\"Your are now in state \'");
+ String _name_2 = state.getName();
+ _builder.append(_name_2, " ");
+ _builder.append("\'. Possible events are [");
+ EList<Transition> _transitions = state.getTransitions();
+ final Function1<Transition,String> _function = new Function1<Transition,String>() {
+ public String apply(final Transition t) {
+ Event _event = t.getEvent();
+ String _name = _event.getName();
+ return _name;
+ }
+ };
+ List<String> _map = ListExtensions.<Transition, String>map(_transitions, _function);
+ String _join = IterableExtensions.join(_map, ", ");
+ _builder.append(_join, " ");
+ _builder.append("].\");");
+ _builder.newLineIfNotEmpty();
+ _builder.append("\t");
+ _builder.append("lastEvent = receiveEvent();");
+ _builder.newLine();
+ {
+ EList<Transition> _transitions_1 = state.getTransitions();
+ for(final Transition t : _transitions_1) {
+ _builder.append("\t");
+ _builder.append("if (\"");
+ Event _event = t.getEvent();
+ String _name_3 = _event.getName();
+ _builder.append(_name_3, " ");
+ _builder.append("\".equals(lastEvent)) {");
+ _builder.newLineIfNotEmpty();
+ _builder.append("\t");
+ _builder.append("\t");
+ _builder.append("currentState = \"");
+ State _state = t.getState();
+ String _name_4 = _state.getName();
+ _builder.append(_name_4, " ");
+ _builder.append("\";");
+ _builder.newLineIfNotEmpty();
+ _builder.append("\t");
+ _builder.append("\t");
+ _builder.append("executeActions = true;");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("}");
+ _builder.newLine();
+ }
+ }
+ _builder.append("}");
+ _builder.newLine();
+ return _builder;
+ }
+}
diff --git a/examples/plugins/org.xtext.example.mydsl.ui/.classpath b/examples/plugins/org.xtext.example.mydsl.ui/.classpath
new file mode 100644
index 0000000..7e8449d
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl.ui/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="src-gen"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/examples/plugins/org.xtext.example.mydsl.ui/.project b/examples/plugins/org.xtext.example.mydsl.ui/.project
new file mode 100644
index 0000000..276e2f5
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl.ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.xtext.example.mydsl.ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/examples/plugins/org.xtext.example.mydsl.ui/.settings/org.eclipse.core.resources.prefs b/examples/plugins/org.xtext.example.mydsl.ui/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..99f26c0
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl.ui/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/examples/plugins/org.xtext.example.mydsl.ui/META-INF/MANIFEST.MF b/examples/plugins/org.xtext.example.mydsl.ui/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..7ffd271
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,25 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.xtext.example.mydsl.ui
+Bundle-Vendor: My Company
+Bundle-Version: 1.0.0.qualifier
+Bundle-SymbolicName: org.xtext.example.mydsl.ui; singleton:=true
+Bundle-ActivationPolicy: lazy
+Require-Bundle: org.xtext.example.mydsl;visibility:=reexport,
+ org.eclipse.xtext.ui,
+ org.eclipse.ui.editors;bundle-version="3.5.0",
+ org.eclipse.ui.ide;bundle-version="3.5.0",
+ org.eclipse.xtext.ui.shared,
+ org.eclipse.ui,
+ org.eclipse.xtext.builder,
+ org.antlr.runtime,
+ org.eclipse.xtext.common.types.ui,
+ org.eclipse.xtext.ui.codetemplates.ui,
+ org.eclipse.compare
+Import-Package: org.apache.log4j
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.xtext.example.mydsl.ui,
+ org.xtext.example.mydsl.ui.contentassist,
+ org.xtext.example.mydsl.ui.contentassist.antlr,
+ org.xtext.example.mydsl.ui.internal
+Bundle-Activator: org.xtext.example.mydsl.ui.internal.MyDslActivator
diff --git a/examples/plugins/org.xtext.example.mydsl.ui/build.properties b/examples/plugins/org.xtext.example.mydsl.ui/build.properties
new file mode 100644
index 0000000..4b51b0a
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl.ui/build.properties
@@ -0,0 +1,7 @@
+source.. = src/,\
+ src-gen/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ icons/
+
diff --git a/examples/plugins/org.xtext.example.mydsl.ui/icons/sample.gif b/examples/plugins/org.xtext.example.mydsl.ui/icons/sample.gif
new file mode 100644
index 0000000..34fb3c9
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl.ui/icons/sample.gif
Binary files differ
diff --git a/examples/plugins/org.xtext.example.mydsl.ui/plugin.xml b/examples/plugins/org.xtext.example.mydsl.ui/plugin.xml
new file mode 100644
index 0000000..9b8415a
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl.ui/plugin.xml
@@ -0,0 +1,338 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<plugin>
+
+ <extension
+ point="org.eclipse.ui.editors">
+ <editor
+ class="org.xtext.example.mydsl.ui.MyDslExecutableExtensionFactory:org.eclipse.xtext.ui.editor.XtextEditor"
+ contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
+ default="true"
+ extensions="mydsl"
+ id="org.xtext.example.mydsl.MyDsl"
+ name="MyDsl Editor">
+ </editor>
+ </extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.xtext.example.mydsl.ui.MyDslExecutableExtensionFactory:org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclarationHandler"
+ commandId="org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclaration">
+ <activeWhen>
+ <reference
+ definitionId="org.xtext.example.mydsl.MyDsl.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ <handler
+ class="org.xtext.example.mydsl.ui.MyDslExecutableExtensionFactory:org.eclipse.xtext.ui.editor.handler.ValidateActionHandler"
+ commandId="org.xtext.example.mydsl.MyDsl.validate">
+ <activeWhen>
+ <reference
+ definitionId="org.xtext.example.mydsl.MyDsl.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.xtext.example.mydsl.MyDsl.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName"
+ value="org.xtext.example.mydsl.MyDsl"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ class="org.xtext.example.mydsl.ui.MyDslExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
+ id="org.xtext.example.mydsl.MyDsl"
+ name="MyDsl">
+ <keywordReference id="org.xtext.example.mydsl.ui.keyword_MyDsl"/>
+ </page>
+ <page
+ category="org.xtext.example.mydsl.MyDsl"
+ class="org.xtext.example.mydsl.ui.MyDslExecutableExtensionFactory:org.eclipse.xtext.ui.editor.syntaxcoloring.SyntaxColoringPreferencePage"
+ id="org.xtext.example.mydsl.MyDsl.coloring"
+ name="Syntax Coloring">
+ <keywordReference id="org.xtext.example.mydsl.ui.keyword_MyDsl"/>
+ </page>
+ <page
+ category="org.xtext.example.mydsl.MyDsl"
+ class="org.xtext.example.mydsl.ui.MyDslExecutableExtensionFactory:org.eclipse.xtext.ui.editor.templates.XtextTemplatePreferencePage"
+ id="org.xtext.example.mydsl.MyDsl.templates"
+ name="Templates">
+ <keywordReference id="org.xtext.example.mydsl.ui.keyword_MyDsl"/>
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.ui.propertyPages">
+ <page
+ class="org.xtext.example.mydsl.ui.MyDslExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
+ id="org.xtext.example.mydsl.MyDsl"
+ name="MyDsl">
+ <keywordReference id="org.xtext.example.mydsl.ui.keyword_MyDsl"/>
+ <enabledWhen>
+ <adapt type="org.eclipse.core.resources.IProject"/>
+ </enabledWhen>
+ <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/>
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.ui.keywords">
+ <keyword
+ id="org.xtext.example.mydsl.ui.keyword_MyDsl"
+ label="MyDsl"/>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ description="Trigger expensive validation"
+ id="org.xtext.example.mydsl.MyDsl.validate"
+ name="Validate">
+ </command>
+ </extension>
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="popup:#TextEditorContext?after=group.edit">
+ <command
+ commandId="org.xtext.example.mydsl.MyDsl.validate"
+ style="push"
+ tooltip="Trigger expensive validation">
+ <visibleWhen checkEnabled="false">
+ <reference
+ definitionId="org.xtext.example.mydsl.MyDsl.Editor.opened">
+ </reference>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution locationURI="popup:#TextEditorContext?endof=group.find">
+ <command commandId="org.eclipse.xtext.ui.editor.FindReferences">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="org.xtext.example.mydsl.MyDsl.Editor.opened">
+ </reference>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <extension point="org.eclipse.ui.handlers">
+ <handler
+ class="org.xtext.example.mydsl.ui.MyDslExecutableExtensionFactory:org.eclipse.xtext.ui.editor.findrefs.FindReferencesHandler"
+ commandId="org.eclipse.xtext.ui.editor.FindReferences">
+ <activeWhen>
+ <reference
+ definitionId="org.xtext.example.mydsl.MyDsl.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+
+<!-- adding resource factories -->
+
+ <extension
+ point="org.eclipse.emf.ecore.extension_parser">
+ <parser
+ class="org.xtext.example.mydsl.ui.MyDslExecutableExtensionFactory:org.eclipse.xtext.resource.IResourceFactory"
+ type="mydsl">
+ </parser>
+ </extension>
+ <extension point="org.eclipse.xtext.extension_resourceServiceProvider">
+ <resourceServiceProvider
+ class="org.xtext.example.mydsl.ui.MyDslExecutableExtensionFactory:org.eclipse.xtext.ui.resource.IResourceUIServiceProvider"
+ uriExtension="mydsl">
+ </resourceServiceProvider>
+ </extension>
+
+
+ <!-- marker definitions for org.xtext.example.mydsl.MyDsl -->
+ <extension
+ id="mydsl.check.fast"
+ name="MyDsl Problem"
+ point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.xtext.ui.check.fast"/>
+ <persistent value="true"/>
+ </extension>
+ <extension
+ id="mydsl.check.normal"
+ name="MyDsl Problem"
+ point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.xtext.ui.check.normal"/>
+ <persistent value="true"/>
+ </extension>
+ <extension
+ id="mydsl.check.expensive"
+ name="MyDsl Problem"
+ point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.xtext.ui.check.expensive"/>
+ <persistent value="true"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.xtext.builder.participant">
+ <participant
+ class="org.xtext.example.mydsl.ui.MyDslExecutableExtensionFactory:org.eclipse.xtext.builder.IXtextBuilderParticipant">
+ </participant>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ category="org.xtext.example.mydsl.MyDsl"
+ class="org.xtext.example.mydsl.ui.MyDslExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage"
+ id="org.xtext.example.mydsl.MyDsl.compiler.preferencePage"
+ name="Compiler">
+ <keywordReference id="org.xtext.example.mydsl.ui.keyword_MyDsl"/>
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.ui.propertyPages">
+ <page
+ category="org.xtext.example.mydsl.MyDsl"
+ class="org.xtext.example.mydsl.ui.MyDslExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage"
+ id="org.xtext.example.mydsl.MyDsl.compiler.propertyPage"
+ name="Compiler">
+ <keywordReference id="org.xtext.example.mydsl.ui.keyword_MyDsl"/>
+ <enabledWhen>
+ <adapt type="org.eclipse.core.resources.IProject"/>
+ </enabledWhen>
+ <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/>
+ </page>
+ </extension>
+
+ <!-- Quick Outline -->
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.xtext.example.mydsl.ui.MyDslExecutableExtensionFactory:org.eclipse.xtext.ui.editor.outline.quickoutline.ShowQuickOutlineActionHandler"
+ commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline">
+ <activeWhen>
+ <reference
+ definitionId="org.xtext.example.mydsl.MyDsl.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ description="Open the quick outline."
+ id="org.eclipse.xtext.ui.editor.outline.QuickOutline"
+ name="Quick Outline">
+ </command>
+ </extension>
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="popup:#TextEditorContext?after=group.open">
+ <command commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline"
+ style="push"
+ tooltip="Open Quick Outline">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="org.xtext.example.mydsl.MyDsl.Editor.opened"/>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <!-- quickfix marker resolution generator for org.xtext.example.mydsl.MyDsl -->
+ <extension
+ point="org.eclipse.ui.ide.markerResolution">
+ <markerResolutionGenerator
+ class="org.xtext.example.mydsl.ui.MyDslExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
+ markerType="org.xtext.example.mydsl.ui.mydsl.check.fast">
+ <attribute
+ name="FIXABLE_KEY"
+ value="true">
+ </attribute>
+ </markerResolutionGenerator>
+ <markerResolutionGenerator
+ class="org.xtext.example.mydsl.ui.MyDslExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
+ markerType="org.xtext.example.mydsl.ui.mydsl.check.normal">
+ <attribute
+ name="FIXABLE_KEY"
+ value="true">
+ </attribute>
+ </markerResolutionGenerator>
+ <markerResolutionGenerator
+ class="org.xtext.example.mydsl.ui.MyDslExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
+ markerType="org.xtext.example.mydsl.ui.mydsl.check.expensive">
+ <attribute
+ name="FIXABLE_KEY"
+ value="true">
+ </attribute>
+ </markerResolutionGenerator>
+ </extension>
+ <!-- Rename Refactoring -->
+ <extension point="org.eclipse.ui.handlers">
+ <handler
+ class="org.xtext.example.mydsl.ui.MyDslExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.IRenameElementHandler"
+ commandId="org.eclipse.xtext.ui.refactoring.RenameElement">
+ <activeWhen>
+ <reference
+ definitionId="org.xtext.example.mydsl.MyDsl.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="popup:#TextEditorContext?after=group.edit">
+ <command commandId="org.eclipse.xtext.ui.refactoring.RenameElement"
+ style="push">
+ <visibleWhen checkEnabled="false">
+ <reference
+ definitionId="org.xtext.example.mydsl.MyDsl.Editor.opened">
+ </reference>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <extension point="org.eclipse.ui.preferencePages">
+ <page
+ category="org.xtext.example.mydsl.MyDsl"
+ class="org.xtext.example.mydsl.ui.MyDslExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.RefactoringPreferencePage"
+ id="org.xtext.example.mydsl.MyDsl.refactoring"
+ name="Refactoring">
+ <keywordReference id="org.xtext.example.mydsl.ui.keyword_MyDsl"/>
+ </page>
+ </extension>
+
+ <extension point="org.eclipse.compare.contentViewers">
+ <viewer id="org.xtext.example.mydsl.MyDsl.compare.contentViewers"
+ class="org.xtext.example.mydsl.ui.MyDslExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator"
+ extensions="mydsl">
+ </viewer>
+ </extension>
+ <extension point="org.eclipse.compare.contentMergeViewers">
+ <viewer id="org.xtext.example.mydsl.MyDsl.compare.contentMergeViewers"
+ class="org.xtext.example.mydsl.ui.MyDslExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator"
+ extensions="mydsl" label="MyDsl Compare">
+ </viewer>
+ </extension>
+ <extension point="org.eclipse.ui.editors.documentProviders">
+ <provider id="org.xtext.example.mydsl.MyDsl.editors.documentProviders"
+ class="org.xtext.example.mydsl.ui.MyDslExecutableExtensionFactory:org.eclipse.xtext.ui.editor.model.XtextDocumentProvider"
+ extensions="mydsl">
+ </provider>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.views">
+ <category
+ name="Sample Category"
+ id="org.xtext.example.mydsl.views">
+ </category>
+ <view
+ name="Xtext Sample View"
+ icon="icons/sample.gif"
+ category="org.xtext.example.mydsl.views"
+ class="org.xtext.example.mydsl.ui.MyDslExecutableExtensionFactory:org.xtext.example.mydsl.ui.views.XtextSampleView"
+ id="org.xtext.example.mydsl.ui.views.XtextSampleView">
+ </view>
+ </extension>
+
+</plugin>
diff --git a/examples/plugins/org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/AbstractMyDslUiModule.java b/examples/plugins/org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/AbstractMyDslUiModule.java
new file mode 100644
index 0000000..8ac5655
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/AbstractMyDslUiModule.java
@@ -0,0 +1,247 @@
+
+/*
+ * generated by Xtext
+ */
+package org.xtext.example.mydsl.ui;
+
+import org.eclipse.xtext.ui.DefaultUiModule;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+/**
+ * Manual modifications go to {org.xtext.example.mydsl.ui.MyDslUiModule}
+ */
+@SuppressWarnings("all")
+public abstract class AbstractMyDslUiModule extends DefaultUiModule {
+
+ public AbstractMyDslUiModule(AbstractUIPlugin plugin) {
+ super(plugin);
+ }
+
+
+ // contributed by org.eclipse.xtext.ui.generator.ImplicitUiFragment
+ public com.google.inject.Provider<org.eclipse.xtext.resource.containers.IAllContainersState> provideIAllContainersState() {
+ return org.eclipse.xtext.ui.shared.Access.getJavaProjectsState();
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.contentassist.IProposalConflictHelper> bindIProposalConflictHelper() {
+ return org.eclipse.xtext.ui.editor.contentassist.antlr.AntlrProposalConflictHelper.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
+ public void configureHighlightingLexer(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.parser.antlr.Lexer.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.ui.LexerUIBindings.HIGHLIGHTING)).to(org.xtext.example.mydsl.parser.antlr.internal.InternalMyDslLexer.class);
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
+ public void configureHighlightingTokenDefProvider(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.parser.antlr.ITokenDefProvider.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.ui.LexerUIBindings.HIGHLIGHTING)).to(org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider.class);
+ }
+
+ // contributed by org.eclipse.xtext.generator.exporting.QualifiedNamesFragment
+ public Class<? extends org.eclipse.xtext.ui.refactoring.IDependentElementsCalculator> bindIDependentElementsCalculator() {
+ return org.eclipse.xtext.ui.refactoring.impl.DefaultDependentElementsCalculator.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
+ public void configureIResourceDescriptionsBuilderScope(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.resource.IResourceDescriptions.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.resource.impl.ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE)).to(org.eclipse.xtext.builder.clustering.CurrentDescriptions.ResourceSetAware.class);
+ }
+
+ // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.IXtextEditorCallback> bindIXtextEditorCallback() {
+ return org.eclipse.xtext.builder.nature.NatureAddingEditorCallback.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
+ public void configureIResourceDescriptionsPersisted(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.resource.IResourceDescriptions.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.builder.impl.PersistentDataAwareDirtyResource.PERSISTED_DESCRIPTIONS)).to(org.eclipse.xtext.builder.builderState.IBuilderState.class);
+ }
+
+ // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.DocumentBasedDirtyResource> bindDocumentBasedDirtyResource() {
+ return org.eclipse.xtext.builder.impl.PersistentDataAwareDirtyResource.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.generator.GeneratorFragment
+ public Class<? extends org.eclipse.xtext.builder.IXtextBuilderParticipant> bindIXtextBuilderParticipant() {
+ return org.eclipse.xtext.builder.BuilderParticipant.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.generator.GeneratorFragment
+ public org.eclipse.core.resources.IWorkspaceRoot bindIWorkspaceRootToInstance() {
+ return org.eclipse.core.resources.ResourcesPlugin.getWorkspace().getRoot();
+ }
+
+ // contributed by org.eclipse.xtext.generator.generator.GeneratorFragment
+ public void configureBuilderPreferenceStoreInitializer(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.ui.editor.preferences.IPreferenceStoreInitializer.class).annotatedWith(com.google.inject.name.Names.named("builderPreferenceInitializer")).to(org.eclipse.xtext.builder.preferences.BuilderPreferenceAccess.Initializer.class);
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.labeling.LabelProviderFragment
+ public Class<? extends org.eclipse.jface.viewers.ILabelProvider> bindILabelProvider() {
+ return org.xtext.example.mydsl.ui.labeling.MyDslLabelProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.labeling.LabelProviderFragment
+ public void configureResourceUIServiceLabelProvider(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.jface.viewers.ILabelProvider.class).annotatedWith(org.eclipse.xtext.ui.resource.ResourceServiceDescriptionLabelProvider.class).to(org.xtext.example.mydsl.ui.labeling.MyDslDescriptionLabelProvider.class);
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.outline.OutlineTreeProviderFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.outline.IOutlineTreeProvider> bindIOutlineTreeProvider() {
+ return org.xtext.example.mydsl.ui.outline.MyDslOutlineTreeProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.outline.OutlineTreeProviderFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.outline.impl.IOutlineTreeStructureProvider> bindIOutlineTreeStructureProvider() {
+ return org.xtext.example.mydsl.ui.outline.MyDslOutlineTreeProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.quickfix.QuickfixProviderFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.quickfix.IssueResolutionProvider> bindIssueResolutionProvider() {
+ return org.xtext.example.mydsl.ui.quickfix.MyDslQuickfixProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.contentAssist.JavaBasedContentAssistFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.contentassist.IContentProposalProvider> bindIContentProposalProvider() {
+ return org.xtext.example.mydsl.ui.contentassist.MyDslProposalProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrUiGeneratorFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext.Factory> bindContentAssistContext$Factory() {
+ return org.eclipse.xtext.ui.editor.contentassist.antlr.ParserBasedContentAssistContextFactory.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrUiGeneratorFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.contentassist.antlr.IContentAssistParser> bindIContentAssistParser() {
+ return org.xtext.example.mydsl.ui.contentassist.antlr.MyDslParser.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrUiGeneratorFragment
+ public void configureContentAssistLexerProvider(com.google.inject.Binder binder) {
+ binder.bind(org.xtext.example.mydsl.ui.contentassist.antlr.internal.InternalMyDslLexer.class).toProvider(org.eclipse.xtext.parser.antlr.LexerProvider.create(org.xtext.example.mydsl.ui.contentassist.antlr.internal.InternalMyDslLexer.class));
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrUiGeneratorFragment
+ public void configureContentAssistLexer(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.ui.editor.contentassist.antlr.internal.Lexer.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.ui.LexerUIBindings.CONTENT_ASSIST)).to(org.xtext.example.mydsl.ui.contentassist.antlr.internal.InternalMyDslLexer.class);
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.refactoring.RefactorElementNameFragment
+ public Class<? extends org.eclipse.xtext.ui.refactoring.IRenameStrategy> bindIRenameStrategy() {
+ return org.eclipse.xtext.ui.refactoring.impl.DefaultRenameStrategy.class;
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.refactoring.RefactorElementNameFragment
+ public Class<? extends org.eclipse.xtext.ui.refactoring.IReferenceUpdater> bindIReferenceUpdater() {
+ return org.eclipse.xtext.ui.refactoring.impl.DefaultReferenceUpdater.class;
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.refactoring.RefactorElementNameFragment
+ public void configureIPreferenceStoreInitializer(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.ui.editor.preferences.IPreferenceStoreInitializer.class).annotatedWith(com.google.inject.name.Names.named("RefactoringPreferences")).to(org.eclipse.xtext.ui.refactoring.ui.RefactoringPreferences.Initializer.class);
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.refactoring.RefactorElementNameFragment
+ public Class<? extends org.eclipse.xtext.ui.refactoring.IRenameRefactoringProvider> bindIRenameRefactoringProvider() {
+ return org.eclipse.xtext.ui.refactoring.impl.DefaultRenameRefactoringProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.refactoring.RefactorElementNameFragment
+ public Class<? extends org.eclipse.xtext.ui.refactoring.ui.IRenameSupport.Factory> bindIRenameSupport$Factory() {
+ return org.eclipse.xtext.ui.refactoring.ui.DefaultRenameSupport.Factory.class;
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.refactoring.RefactorElementNameFragment
+ public Class<? extends org.eclipse.xtext.ui.refactoring.ui.IRenameElementHandler> bindIRenameElementHandler() {
+ return org.eclipse.xtext.ui.refactoring.ui.DefaultRenameElementHandler.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.types.TypesGeneratorFragment
+ public java.lang.ClassLoader bindClassLoaderToInstance() {
+ return getClass().getClassLoader();
+ }
+
+ // contributed by org.eclipse.xtext.generator.types.TypesGeneratorFragment
+ public Class<? extends org.eclipse.xtext.common.types.access.IJvmTypeProvider.Factory> bindIJvmTypeProvider$Factory() {
+ return org.eclipse.xtext.common.types.access.jdt.JdtTypeProviderFactory.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.types.TypesGeneratorFragment
+ public Class<? extends org.eclipse.xtext.common.types.xtext.AbstractTypeScopeProvider> bindAbstractTypeScopeProvider() {
+ return org.eclipse.xtext.common.types.xtext.ui.JdtBasedSimpleTypeScopeProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.types.TypesGeneratorFragment
+ public Class<? extends org.eclipse.xtext.common.types.xtext.ui.ITypesProposalProvider> bindITypesProposalProvider() {
+ return org.eclipse.xtext.common.types.xtext.ui.JdtTypesProposalProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.types.TypesGeneratorFragment
+ public Class<? extends org.eclipse.xtext.common.types.access.jdt.IJavaProjectProvider> bindIJavaProjectProvider() {
+ return org.eclipse.xtext.common.types.xtext.ui.XtextResourceSetBasedProjectProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.types.TypesGeneratorFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.hyperlinking.IHyperlinkHelper> bindIHyperlinkHelper() {
+ return org.eclipse.xtext.common.types.xtext.ui.TypeAwareHyperlinkHelper.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.types.TypesGeneratorFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.contentassist.PrefixMatcher> bindPrefixMatcher() {
+ return org.eclipse.xtext.ui.editor.contentassist.FQNPrefixMatcher.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.types.TypesGeneratorFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.contentassist.AbstractJavaBasedContentProposalProvider.ReferenceProposalCreator> bindAbstractJavaBasedContentProposalProvider$ReferenceProposalCreator() {
+ return org.eclipse.xtext.common.types.xtext.ui.TypeAwareReferenceProposalCreator.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.types.TypesGeneratorFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.IValidationJobScheduler> bindIValidationJobScheduler() {
+ return org.eclipse.xtext.common.types.xtext.ui.JdtValidationJobScheduler.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.types.TypesGeneratorFragment
+ public Class<? extends org.eclipse.xtext.ui.refactoring.impl.RefactoringResourceSetProvider> bindRefactoringResourceSetProvider() {
+ return org.eclipse.xtext.common.types.ui.refactoring.JvmRefactoringResourceSetProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.types.TypesGeneratorFragment
+ public Class<? extends org.eclipse.xtext.common.types.ui.query.IJavaSearchParticipation> bindIJavaSearchParticipation() {
+ return org.eclipse.xtext.common.types.ui.query.IJavaSearchParticipation.Yes.class;
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.templates.CodetemplatesGeneratorFragment
+ public com.google.inject.Provider<org.eclipse.xtext.ui.codetemplates.ui.preferences.TemplatesLanguageConfiguration> provideTemplatesLanguageConfiguration() {
+ return org.eclipse.xtext.ui.codetemplates.ui.AccessibleCodetemplatesActivator.getTemplatesLanguageConfigurationProvider();
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.templates.CodetemplatesGeneratorFragment
+ public com.google.inject.Provider<org.eclipse.xtext.ui.codetemplates.ui.registry.LanguageRegistry> provideLanguageRegistry() {
+ return org.eclipse.xtext.ui.codetemplates.ui.AccessibleCodetemplatesActivator.getLanguageRegistry();
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.templates.CodetemplatesGeneratorFragment
+ @org.eclipse.xtext.service.SingletonBinding(eager=true) public Class<? extends org.eclipse.xtext.ui.codetemplates.ui.registry.LanguageRegistrar> bindLanguageRegistrar() {
+ return org.eclipse.xtext.ui.codetemplates.ui.registry.LanguageRegistrar.class;
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.templates.CodetemplatesGeneratorFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.templates.XtextTemplatePreferencePage> bindXtextTemplatePreferencePage() {
+ return org.eclipse.xtext.ui.codetemplates.ui.preferences.AdvancedTemplatesPreferencePage.class;
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.templates.CodetemplatesGeneratorFragment
+ public Class<? extends org.eclipse.xtext.ui.codetemplates.ui.partialEditing.IPartialContentAssistParser> bindIPartialContentAssistParser() {
+ return org.xtext.example.mydsl.ui.contentassist.antlr.PartialMyDslContentAssistParser.class;
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.compare.CompareFragment
+ public Class<? extends org.eclipse.compare.IViewerCreator> bindIViewerCreator() {
+ return org.eclipse.xtext.ui.compare.DefaultViewerCreator.class;
+ }
+
+
+}
diff --git a/examples/plugins/org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/MyDslExecutableExtensionFactory.java b/examples/plugins/org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/MyDslExecutableExtensionFactory.java
new file mode 100644
index 0000000..bd44482
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/MyDslExecutableExtensionFactory.java
@@ -0,0 +1,29 @@
+/*
+ * generated by Xtext
+ */
+package org.xtext.example.mydsl.ui;
+
+import org.eclipse.xtext.ui.guice.AbstractGuiceAwareExecutableExtensionFactory;
+import org.osgi.framework.Bundle;
+
+import com.google.inject.Injector;
+
+import org.xtext.example.mydsl.ui.internal.MyDslActivator;
+
+/**
+ * This class was generated. Customizations should only happen in a newly
+ * introduced subclass.
+ */
+public class MyDslExecutableExtensionFactory extends AbstractGuiceAwareExecutableExtensionFactory {
+
+ @Override
+ protected Bundle getBundle() {
+ return MyDslActivator.getInstance().getBundle();
+ }
+
+ @Override
+ protected Injector getInjector() {
+ return MyDslActivator.getInstance().getInjector(MyDslActivator.ORG_XTEXT_EXAMPLE_MYDSL_MYDSL);
+ }
+
+}
diff --git a/examples/plugins/org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/AbstractMyDslProposalProvider.java b/examples/plugins/org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/AbstractMyDslProposalProvider.java
new file mode 100644
index 0000000..a86abed
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/AbstractMyDslProposalProvider.java
@@ -0,0 +1,33 @@
+/*
+* generated by Xtext
+*/
+package org.xtext.example.mydsl.ui.contentassist;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.*;
+import org.eclipse.xtext.common.ui.contentassist.TerminalsProposalProvider;
+import org.eclipse.xtext.ui.editor.contentassist.ICompletionProposalAcceptor;
+import org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext;
+
+/**
+ * Represents a generated, default implementation of interface {@link IProposalProvider}.
+ * Methods are dynamically dispatched on the first parameter, i.e., you can override them
+ * with a more concrete subtype.
+ */
+@SuppressWarnings("all")
+public class AbstractMyDslProposalProvider extends TerminalsProposalProvider {
+
+ public void completeModel_Greetings(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
+ }
+ public void completeGreeting_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
+ }
+
+ public void complete_Model(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ // subclasses may override
+ }
+ public void complete_Greeting(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ // subclasses may override
+ }
+}
diff --git a/examples/plugins/org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/MyDslParser.java b/examples/plugins/org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/MyDslParser.java
new file mode 100644
index 0000000..4b01c3f
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/MyDslParser.java
@@ -0,0 +1,72 @@
+/*
+* generated by Xtext
+*/
+package org.xtext.example.mydsl.ui.contentassist.antlr;
+
+import java.util.Collection;
+import java.util.Map;
+import java.util.HashMap;
+
+import org.antlr.runtime.RecognitionException;
+import org.eclipse.xtext.AbstractElement;
+import org.eclipse.xtext.ui.editor.contentassist.antlr.AbstractContentAssistParser;
+import org.eclipse.xtext.ui.editor.contentassist.antlr.FollowElement;
+import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.AbstractInternalContentAssistParser;
+
+import com.google.inject.Inject;
+
+import org.xtext.example.mydsl.services.MyDslGrammarAccess;
+
+public class MyDslParser extends AbstractContentAssistParser {
+
+ @Inject
+ private MyDslGrammarAccess grammarAccess;
+
+ private Map<AbstractElement, String> nameMappings;
+
+ @Override
+ protected org.xtext.example.mydsl.ui.contentassist.antlr.internal.InternalMyDslParser createParser() {
+ org.xtext.example.mydsl.ui.contentassist.antlr.internal.InternalMyDslParser result = new org.xtext.example.mydsl.ui.contentassist.antlr.internal.InternalMyDslParser(null);
+ result.setGrammarAccess(grammarAccess);
+ return result;
+ }
+
+ @Override
+ protected String getRuleName(AbstractElement element) {
+ if (nameMappings == null) {
+ nameMappings = new HashMap<AbstractElement, String>() {
+ private static final long serialVersionUID = 1L;
+ {
+ put(grammarAccess.getGreetingAccess().getGroup(), "rule__Greeting__Group__0");
+ put(grammarAccess.getModelAccess().getGreetingsAssignment(), "rule__Model__GreetingsAssignment");
+ put(grammarAccess.getGreetingAccess().getNameAssignment_1(), "rule__Greeting__NameAssignment_1");
+ }
+ };
+ }
+ return nameMappings.get(element);
+ }
+
+ @Override
+ protected Collection<FollowElement> getFollowElements(AbstractInternalContentAssistParser parser) {
+ try {
+ org.xtext.example.mydsl.ui.contentassist.antlr.internal.InternalMyDslParser typedParser = (org.xtext.example.mydsl.ui.contentassist.antlr.internal.InternalMyDslParser) parser;
+ typedParser.entryRuleModel();
+ return typedParser.getFollowElements();
+ } catch(RecognitionException ex) {
+ throw new RuntimeException(ex);
+ }
+ }
+
+ @Override
+ protected String[] getInitialHiddenTokens() {
+ return new String[] { "RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT" };
+ }
+
+ public MyDslGrammarAccess getGrammarAccess() {
+ return this.grammarAccess;
+ }
+
+ public void setGrammarAccess(MyDslGrammarAccess grammarAccess) {
+ this.grammarAccess = grammarAccess;
+ }
+}
diff --git a/examples/plugins/org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/PartialMyDslContentAssistParser.java b/examples/plugins/org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/PartialMyDslContentAssistParser.java
new file mode 100644
index 0000000..523165a
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/PartialMyDslContentAssistParser.java
@@ -0,0 +1,37 @@
+/*
+ * generated by Xtext
+ */
+package org.xtext.example.mydsl.ui.contentassist.antlr;
+
+import java.util.Collection;
+import java.util.Collections;
+
+import org.eclipse.xtext.AbstractRule;
+import org.eclipse.xtext.ui.codetemplates.ui.partialEditing.IPartialContentAssistParser;
+import org.eclipse.xtext.ui.editor.contentassist.antlr.FollowElement;
+import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.AbstractInternalContentAssistParser;
+import org.eclipse.xtext.util.PolymorphicDispatcher;
+
+/**
+ * @author Sebastian Zarnekow - Initial contribution and API
+ */
+public class PartialMyDslContentAssistParser extends MyDslParser implements IPartialContentAssistParser {
+
+ private AbstractRule rule;
+
+ public void initializeFor(AbstractRule rule) {
+ this.rule = rule;
+ }
+
+ @Override
+ protected Collection<FollowElement> getFollowElements(AbstractInternalContentAssistParser parser) {
+ if (rule == null || rule.eIsProxy())
+ return Collections.emptyList();
+ String methodName = "entryRule" + rule.getName();
+ PolymorphicDispatcher<Collection<FollowElement>> dispatcher =
+ new PolymorphicDispatcher<Collection<FollowElement>>(methodName, 0, 0, Collections.singletonList(parser));
+ dispatcher.invoke();
+ return parser.getFollowElements();
+ }
+
+}
diff --git a/examples/plugins/org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g b/examples/plugins/org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g
new file mode 100644
index 0000000..43d27de
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g
@@ -0,0 +1,260 @@
+/*
+* generated by Xtext
+*/
+grammar InternalMyDsl;
+
+options {
+ superClass=AbstractInternalContentAssistParser;
+
+}
+
+@lexer::header {
+package org.xtext.example.mydsl.ui.contentassist.antlr.internal;
+
+// Hack: Use our own Lexer superclass by means of import.
+// Currently there is no other way to specify the superclass for the lexer.
+import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.Lexer;
+}
+
+@parser::header {
+package org.xtext.example.mydsl.ui.contentassist.antlr.internal;
+
+import java.io.InputStream;
+import org.eclipse.xtext.*;
+import org.eclipse.xtext.parser.*;
+import org.eclipse.xtext.parser.impl.*;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens;
+import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.AbstractInternalContentAssistParser;
+import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.DFA;
+import org.xtext.example.mydsl.services.MyDslGrammarAccess;
+
+}
+
+@parser::members {
+
+ private MyDslGrammarAccess grammarAccess;
+
+ public void setGrammarAccess(MyDslGrammarAccess grammarAccess) {
+ this.grammarAccess = grammarAccess;
+ }
+
+ @Override
+ protected Grammar getGrammar() {
+ return grammarAccess.getGrammar();
+ }
+
+ @Override
+ protected String getValueForTokenName(String tokenName) {
+ return tokenName;
+ }
+
+}
+
+
+
+
+// Entry rule entryRuleModel
+entryRuleModel
+:
+{ before(grammarAccess.getModelRule()); }
+ ruleModel
+{ after(grammarAccess.getModelRule()); }
+ EOF
+;
+
+// Rule Model
+ruleModel
+ @init {
+ int stackSize = keepStackSize();
+ }
+ :
+(
+{ before(grammarAccess.getModelAccess().getGreetingsAssignment()); }
+(rule__Model__GreetingsAssignment)*
+{ after(grammarAccess.getModelAccess().getGreetingsAssignment()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+// Entry rule entryRuleGreeting
+entryRuleGreeting
+:
+{ before(grammarAccess.getGreetingRule()); }
+ ruleGreeting
+{ after(grammarAccess.getGreetingRule()); }
+ EOF
+;
+
+// Rule Greeting
+ruleGreeting
+ @init {
+ int stackSize = keepStackSize();
+ }
+ :
+(
+{ before(grammarAccess.getGreetingAccess().getGroup()); }
+(rule__Greeting__Group__0)
+{ after(grammarAccess.getGreetingAccess().getGroup()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+
+
+
+rule__Greeting__Group__0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Greeting__Group__0__Impl
+ rule__Greeting__Group__1
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Greeting__Group__0__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getGreetingAccess().getHelloKeyword_0()); }
+
+ 'Hello'
+
+{ after(grammarAccess.getGreetingAccess().getHelloKeyword_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__Greeting__Group__1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Greeting__Group__1__Impl
+ rule__Greeting__Group__2
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Greeting__Group__1__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getGreetingAccess().getNameAssignment_1()); }
+(rule__Greeting__NameAssignment_1)
+{ after(grammarAccess.getGreetingAccess().getNameAssignment_1()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__Greeting__Group__2
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__Greeting__Group__2__Impl
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Greeting__Group__2__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getGreetingAccess().getExclamationMarkKeyword_2()); }
+
+ '!'
+
+{ after(grammarAccess.getGreetingAccess().getExclamationMarkKeyword_2()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+
+
+
+
+
+
+rule__Model__GreetingsAssignment
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getModelAccess().getGreetingsGreetingParserRuleCall_0()); }
+ ruleGreeting{ after(grammarAccess.getModelAccess().getGreetingsGreetingParserRuleCall_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__Greeting__NameAssignment_1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getGreetingAccess().getNameIDTerminalRuleCall_1_0()); }
+ RULE_ID{ after(grammarAccess.getGreetingAccess().getNameIDTerminalRuleCall_1_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+RULE_ID : '^'? ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*;
+
+RULE_INT : ('0'..'9')+;
+
+RULE_STRING : ('"' ('\\' ('b'|'t'|'n'|'f'|'r'|'u'|'"'|'\''|'\\')|~(('\\'|'"')))* '"'|'\'' ('\\' ('b'|'t'|'n'|'f'|'r'|'u'|'"'|'\''|'\\')|~(('\\'|'\'')))* '\'');
+
+RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )*'*/';
+
+RULE_SL_COMMENT : '//' ~(('\n'|'\r'))* ('\r'? '\n')?;
+
+RULE_WS : (' '|'\t'|'\r'|'\n')+;
+
+RULE_ANY_OTHER : .;
+
+
diff --git a/examples/plugins/org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.tokens b/examples/plugins/org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.tokens
new file mode 100644
index 0000000..056b618
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.tokens
@@ -0,0 +1,11 @@
+RULE_ID=4
+RULE_STRING=6
+T__12=12
+T__11=11
+RULE_ANY_OTHER=10
+RULE_INT=5
+RULE_WS=9
+RULE_SL_COMMENT=8
+RULE_ML_COMMENT=7
+'!'=12
+'Hello'=11
diff --git a/examples/plugins/org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDslLexer.java b/examples/plugins/org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDslLexer.java
new file mode 100644
index 0000000..086eae3
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDslLexer.java
@@ -0,0 +1,803 @@
+package org.xtext.example.mydsl.ui.contentassist.antlr.internal;
+
+// Hack: Use our own Lexer superclass by means of import.
+// Currently there is no other way to specify the superclass for the lexer.
+import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.Lexer;
+
+
+import org.antlr.runtime.*;
+import java.util.Stack;
+import java.util.List;
+import java.util.ArrayList;
+
+@SuppressWarnings("all")
+public class InternalMyDslLexer extends Lexer {
+ public static final int RULE_ID=4;
+ public static final int RULE_STRING=6;
+ public static final int T__12=12;
+ public static final int T__11=11;
+ public static final int RULE_ANY_OTHER=10;
+ public static final int RULE_INT=5;
+ public static final int RULE_WS=9;
+ public static final int RULE_SL_COMMENT=8;
+ public static final int EOF=-1;
+ public static final int RULE_ML_COMMENT=7;
+
+ // delegates
+ // delegators
+
+ public InternalMyDslLexer() {;}
+ public InternalMyDslLexer(CharStream input) {
+ this(input, new RecognizerSharedState());
+ }
+ public InternalMyDslLexer(CharStream input, RecognizerSharedState state) {
+ super(input,state);
+
+ }
+ public String getGrammarFileName() { return "../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g"; }
+
+ // $ANTLR start "T__11"
+ public final void mT__11() throws RecognitionException {
+ try {
+ int _type = T__11;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:11:7: ( 'Hello' )
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:11:9: 'Hello'
+ {
+ match("Hello");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__11"
+
+ // $ANTLR start "T__12"
+ public final void mT__12() throws RecognitionException {
+ try {
+ int _type = T__12;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:12:7: ( '!' )
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:12:9: '!'
+ {
+ match('!');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__12"
+
+ // $ANTLR start "RULE_ID"
+ public final void mRULE_ID() throws RecognitionException {
+ try {
+ int _type = RULE_ID;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:246:9: ( ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* )
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:246:11: ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
+ {
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:246:11: ( '^' )?
+ int alt1=2;
+ int LA1_0 = input.LA(1);
+
+ if ( (LA1_0=='^') ) {
+ alt1=1;
+ }
+ switch (alt1) {
+ case 1 :
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:246:11: '^'
+ {
+ match('^');
+
+ }
+ break;
+
+ }
+
+ if ( (input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:246:40: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
+ loop2:
+ do {
+ int alt2=2;
+ int LA2_0 = input.LA(1);
+
+ if ( ((LA2_0>='0' && LA2_0<='9')||(LA2_0>='A' && LA2_0<='Z')||LA2_0=='_'||(LA2_0>='a' && LA2_0<='z')) ) {
+ alt2=1;
+ }
+
+
+ switch (alt2) {
+ case 1 :
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:
+ {
+ if ( (input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+
+ default :
+ break loop2;
+ }
+ } while (true);
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_ID"
+
+ // $ANTLR start "RULE_INT"
+ public final void mRULE_INT() throws RecognitionException {
+ try {
+ int _type = RULE_INT;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:248:10: ( ( '0' .. '9' )+ )
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:248:12: ( '0' .. '9' )+
+ {
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:248:12: ( '0' .. '9' )+
+ int cnt3=0;
+ loop3:
+ do {
+ int alt3=2;
+ int LA3_0 = input.LA(1);
+
+ if ( ((LA3_0>='0' && LA3_0<='9')) ) {
+ alt3=1;
+ }
+
+
+ switch (alt3) {
+ case 1 :
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:248:13: '0' .. '9'
+ {
+ matchRange('0','9');
+
+ }
+ break;
+
+ default :
+ if ( cnt3 >= 1 ) break loop3;
+ EarlyExitException eee =
+ new EarlyExitException(3, input);
+ throw eee;
+ }
+ cnt3++;
+ } while (true);
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_INT"
+
+ // $ANTLR start "RULE_STRING"
+ public final void mRULE_STRING() throws RecognitionException {
+ try {
+ int _type = RULE_STRING;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:250:13: ( ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) )
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:250:15: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
+ {
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:250:15: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
+ int alt6=2;
+ int LA6_0 = input.LA(1);
+
+ if ( (LA6_0=='\"') ) {
+ alt6=1;
+ }
+ else if ( (LA6_0=='\'') ) {
+ alt6=2;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("", 6, 0, input);
+
+ throw nvae;
+ }
+ switch (alt6) {
+ case 1 :
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:250:16: '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"'
+ {
+ match('\"');
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:250:20: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )*
+ loop4:
+ do {
+ int alt4=3;
+ int LA4_0 = input.LA(1);
+
+ if ( (LA4_0=='\\') ) {
+ alt4=1;
+ }
+ else if ( ((LA4_0>='\u0000' && LA4_0<='!')||(LA4_0>='#' && LA4_0<='[')||(LA4_0>=']' && LA4_0<='\uFFFF')) ) {
+ alt4=2;
+ }
+
+
+ switch (alt4) {
+ case 1 :
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:250:21: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' )
+ {
+ match('\\');
+ if ( input.LA(1)=='\"'||input.LA(1)=='\''||input.LA(1)=='\\'||input.LA(1)=='b'||input.LA(1)=='f'||input.LA(1)=='n'||input.LA(1)=='r'||(input.LA(1)>='t' && input.LA(1)<='u') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+ case 2 :
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:250:66: ~ ( ( '\\\\' | '\"' ) )
+ {
+ if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+
+ default :
+ break loop4;
+ }
+ } while (true);
+
+ match('\"');
+
+ }
+ break;
+ case 2 :
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:250:86: '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\''
+ {
+ match('\'');
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:250:91: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )*
+ loop5:
+ do {
+ int alt5=3;
+ int LA5_0 = input.LA(1);
+
+ if ( (LA5_0=='\\') ) {
+ alt5=1;
+ }
+ else if ( ((LA5_0>='\u0000' && LA5_0<='&')||(LA5_0>='(' && LA5_0<='[')||(LA5_0>=']' && LA5_0<='\uFFFF')) ) {
+ alt5=2;
+ }
+
+
+ switch (alt5) {
+ case 1 :
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:250:92: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' )
+ {
+ match('\\');
+ if ( input.LA(1)=='\"'||input.LA(1)=='\''||input.LA(1)=='\\'||input.LA(1)=='b'||input.LA(1)=='f'||input.LA(1)=='n'||input.LA(1)=='r'||(input.LA(1)>='t' && input.LA(1)<='u') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+ case 2 :
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:250:137: ~ ( ( '\\\\' | '\\'' ) )
+ {
+ if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+
+ default :
+ break loop5;
+ }
+ } while (true);
+
+ match('\'');
+
+ }
+ break;
+
+ }
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_STRING"
+
+ // $ANTLR start "RULE_ML_COMMENT"
+ public final void mRULE_ML_COMMENT() throws RecognitionException {
+ try {
+ int _type = RULE_ML_COMMENT;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:252:17: ( '/*' ( options {greedy=false; } : . )* '*/' )
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:252:19: '/*' ( options {greedy=false; } : . )* '*/'
+ {
+ match("/*");
+
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:252:24: ( options {greedy=false; } : . )*
+ loop7:
+ do {
+ int alt7=2;
+ int LA7_0 = input.LA(1);
+
+ if ( (LA7_0=='*') ) {
+ int LA7_1 = input.LA(2);
+
+ if ( (LA7_1=='/') ) {
+ alt7=2;
+ }
+ else if ( ((LA7_1>='\u0000' && LA7_1<='.')||(LA7_1>='0' && LA7_1<='\uFFFF')) ) {
+ alt7=1;
+ }
+
+
+ }
+ else if ( ((LA7_0>='\u0000' && LA7_0<=')')||(LA7_0>='+' && LA7_0<='\uFFFF')) ) {
+ alt7=1;
+ }
+
+
+ switch (alt7) {
+ case 1 :
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:252:52: .
+ {
+ matchAny();
+
+ }
+ break;
+
+ default :
+ break loop7;
+ }
+ } while (true);
+
+ match("*/");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_ML_COMMENT"
+
+ // $ANTLR start "RULE_SL_COMMENT"
+ public final void mRULE_SL_COMMENT() throws RecognitionException {
+ try {
+ int _type = RULE_SL_COMMENT;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:254:17: ( '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:254:19: '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
+ {
+ match("//");
+
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:254:24: (~ ( ( '\\n' | '\\r' ) ) )*
+ loop8:
+ do {
+ int alt8=2;
+ int LA8_0 = input.LA(1);
+
+ if ( ((LA8_0>='\u0000' && LA8_0<='\t')||(LA8_0>='\u000B' && LA8_0<='\f')||(LA8_0>='\u000E' && LA8_0<='\uFFFF')) ) {
+ alt8=1;
+ }
+
+
+ switch (alt8) {
+ case 1 :
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:254:24: ~ ( ( '\\n' | '\\r' ) )
+ {
+ if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFF') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+
+ default :
+ break loop8;
+ }
+ } while (true);
+
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:254:40: ( ( '\\r' )? '\\n' )?
+ int alt10=2;
+ int LA10_0 = input.LA(1);
+
+ if ( (LA10_0=='\n'||LA10_0=='\r') ) {
+ alt10=1;
+ }
+ switch (alt10) {
+ case 1 :
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:254:41: ( '\\r' )? '\\n'
+ {
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:254:41: ( '\\r' )?
+ int alt9=2;
+ int LA9_0 = input.LA(1);
+
+ if ( (LA9_0=='\r') ) {
+ alt9=1;
+ }
+ switch (alt9) {
+ case 1 :
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:254:41: '\\r'
+ {
+ match('\r');
+
+ }
+ break;
+
+ }
+
+ match('\n');
+
+ }
+ break;
+
+ }
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_SL_COMMENT"
+
+ // $ANTLR start "RULE_WS"
+ public final void mRULE_WS() throws RecognitionException {
+ try {
+ int _type = RULE_WS;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:256:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ )
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:256:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
+ {
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:256:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
+ int cnt11=0;
+ loop11:
+ do {
+ int alt11=2;
+ int LA11_0 = input.LA(1);
+
+ if ( ((LA11_0>='\t' && LA11_0<='\n')||LA11_0=='\r'||LA11_0==' ') ) {
+ alt11=1;
+ }
+
+
+ switch (alt11) {
+ case 1 :
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:
+ {
+ if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)=='\r'||input.LA(1)==' ' ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+
+ default :
+ if ( cnt11 >= 1 ) break loop11;
+ EarlyExitException eee =
+ new EarlyExitException(11, input);
+ throw eee;
+ }
+ cnt11++;
+ } while (true);
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_WS"
+
+ // $ANTLR start "RULE_ANY_OTHER"
+ public final void mRULE_ANY_OTHER() throws RecognitionException {
+ try {
+ int _type = RULE_ANY_OTHER;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:258:16: ( . )
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:258:18: .
+ {
+ matchAny();
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_ANY_OTHER"
+
+ public void mTokens() throws RecognitionException {
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:1:8: ( T__11 | T__12 | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER )
+ int alt12=9;
+ alt12 = dfa12.predict(input);
+ switch (alt12) {
+ case 1 :
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:1:10: T__11
+ {
+ mT__11();
+
+ }
+ break;
+ case 2 :
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:1:16: T__12
+ {
+ mT__12();
+
+ }
+ break;
+ case 3 :
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:1:22: RULE_ID
+ {
+ mRULE_ID();
+
+ }
+ break;
+ case 4 :
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:1:30: RULE_INT
+ {
+ mRULE_INT();
+
+ }
+ break;
+ case 5 :
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:1:39: RULE_STRING
+ {
+ mRULE_STRING();
+
+ }
+ break;
+ case 6 :
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:1:51: RULE_ML_COMMENT
+ {
+ mRULE_ML_COMMENT();
+
+ }
+ break;
+ case 7 :
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:1:67: RULE_SL_COMMENT
+ {
+ mRULE_SL_COMMENT();
+
+ }
+ break;
+ case 8 :
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:1:83: RULE_WS
+ {
+ mRULE_WS();
+
+ }
+ break;
+ case 9 :
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:1:91: RULE_ANY_OTHER
+ {
+ mRULE_ANY_OTHER();
+
+ }
+ break;
+
+ }
+
+ }
+
+
+ protected DFA12 dfa12 = new DFA12(this);
+ static final String DFA12_eotS =
+ "\1\uffff\1\14\1\uffff\1\12\2\uffff\3\12\2\uffff\1\14\7\uffff\2\14"+
+ "\1\26\1\uffff";
+ static final String DFA12_eofS =
+ "\27\uffff";
+ static final String DFA12_minS =
+ "\1\0\1\145\1\uffff\1\101\2\uffff\2\0\1\52\2\uffff\1\154\7\uffff"+
+ "\1\154\1\157\1\60\1\uffff";
+ static final String DFA12_maxS =
+ "\1\uffff\1\145\1\uffff\1\172\2\uffff\2\uffff\1\57\2\uffff\1\154"+
+ "\7\uffff\1\154\1\157\1\172\1\uffff";
+ static final String DFA12_acceptS =
+ "\2\uffff\1\2\1\uffff\1\3\1\4\3\uffff\1\10\1\11\1\uffff\1\3\1\2\1"+
+ "\4\1\5\1\6\1\7\1\10\3\uffff\1\1";
+ static final String DFA12_specialS =
+ "\1\0\5\uffff\1\2\1\1\17\uffff}>";
+ static final String[] DFA12_transitionS = {
+ "\11\12\2\11\2\12\1\11\22\12\1\11\1\2\1\6\4\12\1\7\7\12\1\10"+
+ "\12\5\7\12\7\4\1\1\22\4\3\12\1\3\1\4\1\12\32\4\uff85\12",
+ "\1\13",
+ "",
+ "\32\14\4\uffff\1\14\1\uffff\32\14",
+ "",
+ "",
+ "\0\17",
+ "\0\17",
+ "\1\20\4\uffff\1\21",
+ "",
+ "",
+ "\1\23",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "\1\24",
+ "\1\25",
+ "\12\14\7\uffff\32\14\4\uffff\1\14\1\uffff\32\14",
+ ""
+ };
+
+ static final short[] DFA12_eot = DFA.unpackEncodedString(DFA12_eotS);
+ static final short[] DFA12_eof = DFA.unpackEncodedString(DFA12_eofS);
+ static final char[] DFA12_min = DFA.unpackEncodedStringToUnsignedChars(DFA12_minS);
+ static final char[] DFA12_max = DFA.unpackEncodedStringToUnsignedChars(DFA12_maxS);
+ static final short[] DFA12_accept = DFA.unpackEncodedString(DFA12_acceptS);
+ static final short[] DFA12_special = DFA.unpackEncodedString(DFA12_specialS);
+ static final short[][] DFA12_transition;
+
+ static {
+ int numStates = DFA12_transitionS.length;
+ DFA12_transition = new short[numStates][];
+ for (int i=0; i<numStates; i++) {
+ DFA12_transition[i] = DFA.unpackEncodedString(DFA12_transitionS[i]);
+ }
+ }
+
+ class DFA12 extends DFA {
+
+ public DFA12(BaseRecognizer recognizer) {
+ this.recognizer = recognizer;
+ this.decisionNumber = 12;
+ this.eot = DFA12_eot;
+ this.eof = DFA12_eof;
+ this.min = DFA12_min;
+ this.max = DFA12_max;
+ this.accept = DFA12_accept;
+ this.special = DFA12_special;
+ this.transition = DFA12_transition;
+ }
+ public String getDescription() {
+ return "1:1: Tokens : ( T__11 | T__12 | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER );";
+ }
+ public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
+ IntStream input = _input;
+ int _s = s;
+ switch ( s ) {
+ case 0 :
+ int LA12_0 = input.LA(1);
+
+ s = -1;
+ if ( (LA12_0=='H') ) {s = 1;}
+
+ else if ( (LA12_0=='!') ) {s = 2;}
+
+ else if ( (LA12_0=='^') ) {s = 3;}
+
+ else if ( ((LA12_0>='A' && LA12_0<='G')||(LA12_0>='I' && LA12_0<='Z')||LA12_0=='_'||(LA12_0>='a' && LA12_0<='z')) ) {s = 4;}
+
+ else if ( ((LA12_0>='0' && LA12_0<='9')) ) {s = 5;}
+
+ else if ( (LA12_0=='\"') ) {s = 6;}
+
+ else if ( (LA12_0=='\'') ) {s = 7;}
+
+ else if ( (LA12_0=='/') ) {s = 8;}
+
+ else if ( ((LA12_0>='\t' && LA12_0<='\n')||LA12_0=='\r'||LA12_0==' ') ) {s = 9;}
+
+ else if ( ((LA12_0>='\u0000' && LA12_0<='\b')||(LA12_0>='\u000B' && LA12_0<='\f')||(LA12_0>='\u000E' && LA12_0<='\u001F')||(LA12_0>='#' && LA12_0<='&')||(LA12_0>='(' && LA12_0<='.')||(LA12_0>=':' && LA12_0<='@')||(LA12_0>='[' && LA12_0<=']')||LA12_0=='`'||(LA12_0>='{' && LA12_0<='\uFFFF')) ) {s = 10;}
+
+ if ( s>=0 ) return s;
+ break;
+ case 1 :
+ int LA12_7 = input.LA(1);
+
+ s = -1;
+ if ( ((LA12_7>='\u0000' && LA12_7<='\uFFFF')) ) {s = 15;}
+
+ else s = 10;
+
+ if ( s>=0 ) return s;
+ break;
+ case 2 :
+ int LA12_6 = input.LA(1);
+
+ s = -1;
+ if ( ((LA12_6>='\u0000' && LA12_6<='\uFFFF')) ) {s = 15;}
+
+ else s = 10;
+
+ if ( s>=0 ) return s;
+ break;
+ }
+ NoViableAltException nvae =
+ new NoViableAltException(getDescription(), 12, _s, input);
+ error(nvae);
+ throw nvae;
+ }
+ }
+
+
+}
\ No newline at end of file
diff --git a/examples/plugins/org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDslParser.java b/examples/plugins/org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDslParser.java
new file mode 100644
index 0000000..fea397d
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDslParser.java
@@ -0,0 +1,576 @@
+package org.xtext.example.mydsl.ui.contentassist.antlr.internal;
+
+import java.io.InputStream;
+import org.eclipse.xtext.*;
+import org.eclipse.xtext.parser.*;
+import org.eclipse.xtext.parser.impl.*;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens;
+import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.AbstractInternalContentAssistParser;
+import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.DFA;
+import org.xtext.example.mydsl.services.MyDslGrammarAccess;
+
+
+
+import org.antlr.runtime.*;
+import java.util.Stack;
+import java.util.List;
+import java.util.ArrayList;
+
+@SuppressWarnings("all")
+public class InternalMyDslParser extends AbstractInternalContentAssistParser {
+ public static final String[] tokenNames = new String[] {
+ "<invalid>", "<EOR>", "<DOWN>", "<UP>", "RULE_ID", "RULE_INT", "RULE_STRING", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS", "RULE_ANY_OTHER", "'Hello'", "'!'"
+ };
+ public static final int RULE_ID=4;
+ public static final int RULE_STRING=6;
+ public static final int T__12=12;
+ public static final int T__11=11;
+ public static final int RULE_ANY_OTHER=10;
+ public static final int RULE_INT=5;
+ public static final int RULE_WS=9;
+ public static final int RULE_SL_COMMENT=8;
+ public static final int EOF=-1;
+ public static final int RULE_ML_COMMENT=7;
+
+ // delegates
+ // delegators
+
+
+ public InternalMyDslParser(TokenStream input) {
+ this(input, new RecognizerSharedState());
+ }
+ public InternalMyDslParser(TokenStream input, RecognizerSharedState state) {
+ super(input, state);
+
+ }
+
+
+ public String[] getTokenNames() { return InternalMyDslParser.tokenNames; }
+ public String getGrammarFileName() { return "../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g"; }
+
+
+
+ private MyDslGrammarAccess grammarAccess;
+
+ public void setGrammarAccess(MyDslGrammarAccess grammarAccess) {
+ this.grammarAccess = grammarAccess;
+ }
+
+ @Override
+ protected Grammar getGrammar() {
+ return grammarAccess.getGrammar();
+ }
+
+ @Override
+ protected String getValueForTokenName(String tokenName) {
+ return tokenName;
+ }
+
+
+
+
+ // $ANTLR start "entryRuleModel"
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:60:1: entryRuleModel : ruleModel EOF ;
+ public final void entryRuleModel() throws RecognitionException {
+ try {
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:61:1: ( ruleModel EOF )
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:62:1: ruleModel EOF
+ {
+ before(grammarAccess.getModelRule());
+ pushFollow(FOLLOW_ruleModel_in_entryRuleModel61);
+ ruleModel();
+
+ state._fsp--;
+
+ after(grammarAccess.getModelRule());
+ match(input,EOF,FOLLOW_EOF_in_entryRuleModel68);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "entryRuleModel"
+
+
+ // $ANTLR start "ruleModel"
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:69:1: ruleModel : ( ( rule__Model__GreetingsAssignment )* ) ;
+ public final void ruleModel() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:73:2: ( ( ( rule__Model__GreetingsAssignment )* ) )
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:74:1: ( ( rule__Model__GreetingsAssignment )* )
+ {
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:74:1: ( ( rule__Model__GreetingsAssignment )* )
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:75:1: ( rule__Model__GreetingsAssignment )*
+ {
+ before(grammarAccess.getModelAccess().getGreetingsAssignment());
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:76:1: ( rule__Model__GreetingsAssignment )*
+ loop1:
+ do {
+ int alt1=2;
+ int LA1_0 = input.LA(1);
+
+ if ( (LA1_0==11) ) {
+ alt1=1;
+ }
+
+
+ switch (alt1) {
+ case 1 :
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:76:2: rule__Model__GreetingsAssignment
+ {
+ pushFollow(FOLLOW_rule__Model__GreetingsAssignment_in_ruleModel94);
+ rule__Model__GreetingsAssignment();
+
+ state._fsp--;
+
+
+ }
+ break;
+
+ default :
+ break loop1;
+ }
+ } while (true);
+
+ after(grammarAccess.getModelAccess().getGreetingsAssignment());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "ruleModel"
+
+
+ // $ANTLR start "entryRuleGreeting"
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:88:1: entryRuleGreeting : ruleGreeting EOF ;
+ public final void entryRuleGreeting() throws RecognitionException {
+ try {
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:89:1: ( ruleGreeting EOF )
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:90:1: ruleGreeting EOF
+ {
+ before(grammarAccess.getGreetingRule());
+ pushFollow(FOLLOW_ruleGreeting_in_entryRuleGreeting122);
+ ruleGreeting();
+
+ state._fsp--;
+
+ after(grammarAccess.getGreetingRule());
+ match(input,EOF,FOLLOW_EOF_in_entryRuleGreeting129);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "entryRuleGreeting"
+
+
+ // $ANTLR start "ruleGreeting"
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:97:1: ruleGreeting : ( ( rule__Greeting__Group__0 ) ) ;
+ public final void ruleGreeting() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:101:2: ( ( ( rule__Greeting__Group__0 ) ) )
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:102:1: ( ( rule__Greeting__Group__0 ) )
+ {
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:102:1: ( ( rule__Greeting__Group__0 ) )
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:103:1: ( rule__Greeting__Group__0 )
+ {
+ before(grammarAccess.getGreetingAccess().getGroup());
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:104:1: ( rule__Greeting__Group__0 )
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:104:2: rule__Greeting__Group__0
+ {
+ pushFollow(FOLLOW_rule__Greeting__Group__0_in_ruleGreeting155);
+ rule__Greeting__Group__0();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getGreetingAccess().getGroup());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "ruleGreeting"
+
+
+ // $ANTLR start "rule__Greeting__Group__0"
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:118:1: rule__Greeting__Group__0 : rule__Greeting__Group__0__Impl rule__Greeting__Group__1 ;
+ public final void rule__Greeting__Group__0() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:122:1: ( rule__Greeting__Group__0__Impl rule__Greeting__Group__1 )
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:123:2: rule__Greeting__Group__0__Impl rule__Greeting__Group__1
+ {
+ pushFollow(FOLLOW_rule__Greeting__Group__0__Impl_in_rule__Greeting__Group__0189);
+ rule__Greeting__Group__0__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__Greeting__Group__1_in_rule__Greeting__Group__0192);
+ rule__Greeting__Group__1();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Greeting__Group__0"
+
+
+ // $ANTLR start "rule__Greeting__Group__0__Impl"
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:130:1: rule__Greeting__Group__0__Impl : ( 'Hello' ) ;
+ public final void rule__Greeting__Group__0__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:134:1: ( ( 'Hello' ) )
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:135:1: ( 'Hello' )
+ {
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:135:1: ( 'Hello' )
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:136:1: 'Hello'
+ {
+ before(grammarAccess.getGreetingAccess().getHelloKeyword_0());
+ match(input,11,FOLLOW_11_in_rule__Greeting__Group__0__Impl220);
+ after(grammarAccess.getGreetingAccess().getHelloKeyword_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Greeting__Group__0__Impl"
+
+
+ // $ANTLR start "rule__Greeting__Group__1"
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:149:1: rule__Greeting__Group__1 : rule__Greeting__Group__1__Impl rule__Greeting__Group__2 ;
+ public final void rule__Greeting__Group__1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:153:1: ( rule__Greeting__Group__1__Impl rule__Greeting__Group__2 )
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:154:2: rule__Greeting__Group__1__Impl rule__Greeting__Group__2
+ {
+ pushFollow(FOLLOW_rule__Greeting__Group__1__Impl_in_rule__Greeting__Group__1251);
+ rule__Greeting__Group__1__Impl();
+
+ state._fsp--;
+
+ pushFollow(FOLLOW_rule__Greeting__Group__2_in_rule__Greeting__Group__1254);
+ rule__Greeting__Group__2();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Greeting__Group__1"
+
+
+ // $ANTLR start "rule__Greeting__Group__1__Impl"
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:161:1: rule__Greeting__Group__1__Impl : ( ( rule__Greeting__NameAssignment_1 ) ) ;
+ public final void rule__Greeting__Group__1__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:165:1: ( ( ( rule__Greeting__NameAssignment_1 ) ) )
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:166:1: ( ( rule__Greeting__NameAssignment_1 ) )
+ {
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:166:1: ( ( rule__Greeting__NameAssignment_1 ) )
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:167:1: ( rule__Greeting__NameAssignment_1 )
+ {
+ before(grammarAccess.getGreetingAccess().getNameAssignment_1());
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:168:1: ( rule__Greeting__NameAssignment_1 )
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:168:2: rule__Greeting__NameAssignment_1
+ {
+ pushFollow(FOLLOW_rule__Greeting__NameAssignment_1_in_rule__Greeting__Group__1__Impl281);
+ rule__Greeting__NameAssignment_1();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getGreetingAccess().getNameAssignment_1());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Greeting__Group__1__Impl"
+
+
+ // $ANTLR start "rule__Greeting__Group__2"
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:178:1: rule__Greeting__Group__2 : rule__Greeting__Group__2__Impl ;
+ public final void rule__Greeting__Group__2() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:182:1: ( rule__Greeting__Group__2__Impl )
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:183:2: rule__Greeting__Group__2__Impl
+ {
+ pushFollow(FOLLOW_rule__Greeting__Group__2__Impl_in_rule__Greeting__Group__2311);
+ rule__Greeting__Group__2__Impl();
+
+ state._fsp--;
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Greeting__Group__2"
+
+
+ // $ANTLR start "rule__Greeting__Group__2__Impl"
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:189:1: rule__Greeting__Group__2__Impl : ( '!' ) ;
+ public final void rule__Greeting__Group__2__Impl() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:193:1: ( ( '!' ) )
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:194:1: ( '!' )
+ {
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:194:1: ( '!' )
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:195:1: '!'
+ {
+ before(grammarAccess.getGreetingAccess().getExclamationMarkKeyword_2());
+ match(input,12,FOLLOW_12_in_rule__Greeting__Group__2__Impl339);
+ after(grammarAccess.getGreetingAccess().getExclamationMarkKeyword_2());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Greeting__Group__2__Impl"
+
+
+ // $ANTLR start "rule__Model__GreetingsAssignment"
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:215:1: rule__Model__GreetingsAssignment : ( ruleGreeting ) ;
+ public final void rule__Model__GreetingsAssignment() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:219:1: ( ( ruleGreeting ) )
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:220:1: ( ruleGreeting )
+ {
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:220:1: ( ruleGreeting )
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:221:1: ruleGreeting
+ {
+ before(grammarAccess.getModelAccess().getGreetingsGreetingParserRuleCall_0());
+ pushFollow(FOLLOW_ruleGreeting_in_rule__Model__GreetingsAssignment381);
+ ruleGreeting();
+
+ state._fsp--;
+
+ after(grammarAccess.getModelAccess().getGreetingsGreetingParserRuleCall_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Model__GreetingsAssignment"
+
+
+ // $ANTLR start "rule__Greeting__NameAssignment_1"
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:230:1: rule__Greeting__NameAssignment_1 : ( RULE_ID ) ;
+ public final void rule__Greeting__NameAssignment_1() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:234:1: ( ( RULE_ID ) )
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:235:1: ( RULE_ID )
+ {
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:235:1: ( RULE_ID )
+ // ../org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyDsl.g:236:1: RULE_ID
+ {
+ before(grammarAccess.getGreetingAccess().getNameIDTerminalRuleCall_1_0());
+ match(input,RULE_ID,FOLLOW_RULE_ID_in_rule__Greeting__NameAssignment_1412);
+ after(grammarAccess.getGreetingAccess().getNameIDTerminalRuleCall_1_0());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__Greeting__NameAssignment_1"
+
+ // Delegated rules
+
+
+
+
+ public static final BitSet FOLLOW_ruleModel_in_entryRuleModel61 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleModel68 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Model__GreetingsAssignment_in_ruleModel94 = new BitSet(new long[]{0x0000000000000802L});
+ public static final BitSet FOLLOW_ruleGreeting_in_entryRuleGreeting122 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleGreeting129 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Greeting__Group__0_in_ruleGreeting155 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Greeting__Group__0__Impl_in_rule__Greeting__Group__0189 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_rule__Greeting__Group__1_in_rule__Greeting__Group__0192 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_11_in_rule__Greeting__Group__0__Impl220 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Greeting__Group__1__Impl_in_rule__Greeting__Group__1251 = new BitSet(new long[]{0x0000000000001000L});
+ public static final BitSet FOLLOW_rule__Greeting__Group__2_in_rule__Greeting__Group__1254 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Greeting__NameAssignment_1_in_rule__Greeting__Group__1__Impl281 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_rule__Greeting__Group__2__Impl_in_rule__Greeting__Group__2311 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_12_in_rule__Greeting__Group__2__Impl339 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleGreeting_in_rule__Model__GreetingsAssignment381 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_RULE_ID_in_rule__Greeting__NameAssignment_1412 = new BitSet(new long[]{0x0000000000000002L});
+
+}
\ No newline at end of file
diff --git a/examples/plugins/org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/internal/MyDslActivator.java b/examples/plugins/org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/internal/MyDslActivator.java
new file mode 100644
index 0000000..e0e717d
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/internal/MyDslActivator.java
@@ -0,0 +1,95 @@
+/*
+ * generated by Xtext
+ */
+package org.xtext.example.mydsl.ui.internal;
+
+import java.util.Collections;
+import java.util.Map;
+
+import org.apache.log4j.Logger;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.eclipse.xtext.ui.shared.SharedStateModule;
+import org.eclipse.xtext.util.Modules2;
+import org.osgi.framework.BundleContext;
+
+import com.google.common.collect.Maps;
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+import com.google.inject.Module;
+
+/**
+ * This class was generated. Customizations should only happen in a newly
+ * introduced subclass.
+ */
+public class MyDslActivator extends AbstractUIPlugin {
+
+ public static final String ORG_XTEXT_EXAMPLE_MYDSL_MYDSL = "org.xtext.example.mydsl.MyDsl";
+
+ private static final Logger logger = Logger.getLogger(MyDslActivator.class);
+
+ private static MyDslActivator INSTANCE;
+
+ private Map<String, Injector> injectors = Collections.synchronizedMap(Maps.<String, Injector> newHashMapWithExpectedSize(1));
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ INSTANCE = this;
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ injectors.clear();
+ INSTANCE = null;
+ super.stop(context);
+ }
+
+ public static MyDslActivator getInstance() {
+ return INSTANCE;
+ }
+
+ public Injector getInjector(String language) {
+ synchronized (injectors) {
+ Injector injector = injectors.get(language);
+ if (injector == null) {
+ injectors.put(language, injector = createInjector(language));
+ }
+ return injector;
+ }
+ }
+
+ protected Injector createInjector(String language) {
+ try {
+ Module runtimeModule = getRuntimeModule(language);
+ Module sharedStateModule = getSharedStateModule();
+ Module uiModule = getUiModule(language);
+ Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule);
+ return Guice.createInjector(mergedModule);
+ } catch (Exception e) {
+ logger.error("Failed to create injector for " + language);
+ logger.error(e.getMessage(), e);
+ throw new RuntimeException("Failed to create injector for " + language, e);
+ }
+ }
+
+ protected Module getRuntimeModule(String grammar) {
+ if (ORG_XTEXT_EXAMPLE_MYDSL_MYDSL.equals(grammar)) {
+ return new org.xtext.example.mydsl.MyDslRuntimeModule();
+ }
+
+ throw new IllegalArgumentException(grammar);
+ }
+
+ protected Module getUiModule(String grammar) {
+ if (ORG_XTEXT_EXAMPLE_MYDSL_MYDSL.equals(grammar)) {
+ return new org.xtext.example.mydsl.ui.MyDslUiModule(this);
+ }
+
+ throw new IllegalArgumentException(grammar);
+ }
+
+ protected Module getSharedStateModule() {
+ return new SharedStateModule();
+ }
+
+}
diff --git a/examples/plugins/org.xtext.example.mydsl.ui/src/org/xtext/example/mydsl/ui/MyDslUiModule.java b/examples/plugins/org.xtext.example.mydsl.ui/src/org/xtext/example/mydsl/ui/MyDslUiModule.java
new file mode 100644
index 0000000..31ca874
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl.ui/src/org/xtext/example/mydsl/ui/MyDslUiModule.java
@@ -0,0 +1,15 @@
+/*
+ * generated by Xtext
+ */
+package org.xtext.example.mydsl.ui;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+/**
+ * Use this class to register components to be used within the IDE.
+ */
+public class MyDslUiModule extends org.xtext.example.mydsl.ui.AbstractMyDslUiModule {
+ public MyDslUiModule(AbstractUIPlugin plugin) {
+ super(plugin);
+ }
+}
diff --git a/examples/plugins/org.xtext.example.mydsl.ui/src/org/xtext/example/mydsl/ui/MyXtextEmbeddedEditorProvider.java b/examples/plugins/org.xtext.example.mydsl.ui/src/org/xtext/example/mydsl/ui/MyXtextEmbeddedEditorProvider.java
new file mode 100644
index 0000000..6226d4a
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl.ui/src/org/xtext/example/mydsl/ui/MyXtextEmbeddedEditorProvider.java
@@ -0,0 +1,73 @@
+package org.xtext.example.mydsl.ui;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.xtext.Constants;
+import org.eclipse.xtext.resource.XtextResource;
+import org.eclipse.xtext.resource.XtextResourceFactory;
+import org.eclipse.xtext.resource.XtextResourceSet;
+import org.eclipse.xtext.ui.editor.embedded.EmbeddedEditor;
+import org.eclipse.xtext.ui.editor.embedded.EmbeddedEditorFactory;
+import org.eclipse.xtext.ui.editor.embedded.IEditedResourceProvider;
+
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+import com.google.inject.name.Named;
+
+@SuppressWarnings("restriction")
+public class MyXtextEmbeddedEditorProvider {
+
+ @Inject
+ protected EmbeddedEditorFactory editorFactory;
+
+ @Inject
+ private Provider<XtextResourceSet> resourceSetProvider;
+
+ @Inject
+ private XtextResourceFactory resourceFactory;
+
+ @Inject
+ @Named(Constants.FILE_EXTENSIONS)
+ public String fileExtension;
+
+ /**
+ * The constructor.
+ */
+ public MyXtextEmbeddedEditorProvider() {
+ }
+
+ public EmbeddedEditor getXtextEmbeddedEditor(Composite parent) {
+ IEditedResourceProvider resourceProvider = new IEditedResourceProvider() {
+
+ @Override
+ public XtextResource createResource() {
+ XtextResourceSet xtextResourceSet = resourceSetProvider.get();
+ Resource resource = resourceFactory
+ .createResource(computeUnusedUri(xtextResourceSet));
+ xtextResourceSet.getResources().add(resource);
+ return (XtextResource) resource;
+ }
+
+ protected URI computeUnusedUri(ResourceSet resourceSet) {
+ String name = "__synthetic";
+ for (int i = 0; i < Integer.MAX_VALUE; i++) {
+ URI syntheticUri = URI.createURI(name + i + "."
+ + fileExtension);
+ if (resourceSet.getResource(syntheticUri, false) == null)
+ return syntheticUri;
+ }
+ throw new IllegalStateException();
+ }
+ };
+
+ EmbeddedEditor editor = editorFactory.newEditor(resourceProvider)
+ .showErrorAndWarningAnnotations().withParent(parent);
+
+ editor.createPartialEditor(true);
+
+ return editor;
+ }
+
+}
\ No newline at end of file
diff --git a/examples/plugins/org.xtext.example.mydsl.ui/src/org/xtext/example/mydsl/ui/contentassist/MyDslProposalProvider.java b/examples/plugins/org.xtext.example.mydsl.ui/src/org/xtext/example/mydsl/ui/contentassist/MyDslProposalProvider.java
new file mode 100644
index 0000000..6c345b7
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl.ui/src/org/xtext/example/mydsl/ui/contentassist/MyDslProposalProvider.java
@@ -0,0 +1,12 @@
+/*
+* generated by Xtext
+*/
+package org.xtext.example.mydsl.ui.contentassist;
+
+import org.xtext.example.mydsl.ui.contentassist.AbstractMyDslProposalProvider;
+/**
+ * see http://www.eclipse.org/Xtext/documentation/latest/xtext.html#contentAssist on how to customize content assistant
+ */
+public class MyDslProposalProvider extends AbstractMyDslProposalProvider {
+
+}
diff --git a/examples/plugins/org.xtext.example.mydsl.ui/src/org/xtext/example/mydsl/ui/labeling/MyDslDescriptionLabelProvider.java b/examples/plugins/org.xtext.example.mydsl.ui/src/org/xtext/example/mydsl/ui/labeling/MyDslDescriptionLabelProvider.java
new file mode 100644
index 0000000..3282917
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl.ui/src/org/xtext/example/mydsl/ui/labeling/MyDslDescriptionLabelProvider.java
@@ -0,0 +1,27 @@
+/*
+* generated by Xtext
+*/
+package org.xtext.example.mydsl.ui.labeling;
+
+import org.eclipse.xtext.ui.label.DefaultDescriptionLabelProvider;
+
+/**
+ * Provides labels for a IEObjectDescriptions and IResourceDescriptions.
+ *
+ * see http://www.eclipse.org/Xtext/documentation/latest/xtext.html#labelProvider
+ */
+public class MyDslDescriptionLabelProvider extends DefaultDescriptionLabelProvider {
+
+/*
+ //Labels and icons can be computed like this:
+
+ String text(IEObjectDescription ele) {
+ return "my "+ele.getName();
+ }
+
+ String image(IEObjectDescription ele) {
+ return ele.getEClass().getName() + ".gif";
+ }
+*/
+
+}
diff --git a/examples/plugins/org.xtext.example.mydsl.ui/src/org/xtext/example/mydsl/ui/labeling/MyDslLabelProvider.java b/examples/plugins/org.xtext.example.mydsl.ui/src/org/xtext/example/mydsl/ui/labeling/MyDslLabelProvider.java
new file mode 100644
index 0000000..749018e
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl.ui/src/org/xtext/example/mydsl/ui/labeling/MyDslLabelProvider.java
@@ -0,0 +1,34 @@
+/*
+* generated by Xtext
+*/
+package org.xtext.example.mydsl.ui.labeling;
+
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
+import org.eclipse.xtext.ui.label.DefaultEObjectLabelProvider;
+
+import com.google.inject.Inject;
+
+/**
+ * Provides labels for a EObjects.
+ *
+ * see http://www.eclipse.org/Xtext/documentation/latest/xtext.html#labelProvider
+ */
+public class MyDslLabelProvider extends DefaultEObjectLabelProvider {
+
+ @Inject
+ public MyDslLabelProvider(AdapterFactoryLabelProvider delegate) {
+ super(delegate);
+ }
+
+/*
+ //Labels and icons can be computed like this:
+
+ String text(MyModel ele) {
+ return "my "+ele.getName();
+ }
+
+ String image(MyModel ele) {
+ return "MyModel.gif";
+ }
+*/
+}
diff --git a/examples/plugins/org.xtext.example.mydsl.ui/src/org/xtext/example/mydsl/ui/outline/MyDslOutlineTreeProvider.java b/examples/plugins/org.xtext.example.mydsl.ui/src/org/xtext/example/mydsl/ui/outline/MyDslOutlineTreeProvider.java
new file mode 100644
index 0000000..49a5f06
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl.ui/src/org/xtext/example/mydsl/ui/outline/MyDslOutlineTreeProvider.java
@@ -0,0 +1,14 @@
+/*
+* generated by Xtext
+*/
+package org.xtext.example.mydsl.ui.outline;
+
+import org.eclipse.xtext.ui.editor.outline.impl.DefaultOutlineTreeProvider;
+
+/**
+ * customization of the default outline structure
+ *
+ */
+public class MyDslOutlineTreeProvider extends DefaultOutlineTreeProvider {
+
+}
diff --git a/examples/plugins/org.xtext.example.mydsl.ui/src/org/xtext/example/mydsl/ui/quickfix/MyDslQuickfixProvider.java b/examples/plugins/org.xtext.example.mydsl.ui/src/org/xtext/example/mydsl/ui/quickfix/MyDslQuickfixProvider.java
new file mode 100644
index 0000000..d4f2885
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl.ui/src/org/xtext/example/mydsl/ui/quickfix/MyDslQuickfixProvider.java
@@ -0,0 +1,19 @@
+
+package org.xtext.example.mydsl.ui.quickfix;
+
+import org.eclipse.xtext.ui.editor.quickfix.DefaultQuickfixProvider;
+
+public class MyDslQuickfixProvider extends DefaultQuickfixProvider {
+
+// @Fix(MyJavaValidator.INVALID_NAME)
+// public void capitalizeName(final Issue issue, IssueResolutionAcceptor acceptor) {
+// acceptor.accept(issue, "Capitalize name", "Capitalize the name.", "upcase.png", new IModification() {
+// public void apply(IModificationContext context) throws BadLocationException {
+// IXtextDocument xtextDocument = context.getXtextDocument();
+// String firstLetter = xtextDocument.get(issue.getOffset(), 1);
+// xtextDocument.replace(issue.getOffset(), 1, firstLetter.toUpperCase());
+// }
+// });
+// }
+
+}
diff --git a/examples/plugins/org.xtext.example.mydsl.ui/src/org/xtext/example/mydsl/ui/views/XtextSampleView.java b/examples/plugins/org.xtext.example.mydsl.ui/src/org/xtext/example/mydsl/ui/views/XtextSampleView.java
new file mode 100644
index 0000000..7c25107
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl.ui/src/org/xtext/example/mydsl/ui/views/XtextSampleView.java
@@ -0,0 +1,123 @@
+package org.xtext.example.mydsl.ui.views;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.text.source.SourceViewer;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.ViewPart;
+import org.xtext.example.mydsl.ui.MyXtextEmbeddedEditorProvider;
+
+import com.google.inject.Inject;
+
+public class XtextSampleView extends ViewPart {
+
+ /**
+ * The ID of the view as specified by the extension.
+ */
+ public static final String ID = "org.xtext.example.mydsl.views.views.XtextSampleView";
+
+ private SourceViewer viewer;
+ private Action action1;
+ private Action action2;
+
+ @Inject
+ protected MyXtextEmbeddedEditorProvider xtextEmbeddedEditorProvider;
+ /**
+ * The constructor.
+ */
+ public XtextSampleView() {
+ }
+
+ /**
+ * This is a callback that will allow us to create the viewer and initialize
+ * it.
+ */
+ public void createPartControl(Composite parent) {
+ viewer = xtextEmbeddedEditorProvider.getXtextEmbeddedEditor(parent).getViewer();
+
+ makeActions();
+ hookContextMenu();
+ contributeToActionBars();
+ }
+
+ private void hookContextMenu() {
+ MenuManager menuMgr = new MenuManager("#PopupMenu");
+ menuMgr.setRemoveAllWhenShown(true);
+ menuMgr.addMenuListener(new IMenuListener() {
+ public void menuAboutToShow(IMenuManager manager) {
+ XtextSampleView.this.fillContextMenu(manager);
+ }
+ });
+ Menu menu = menuMgr.createContextMenu(viewer.getControl());
+ viewer.getControl().setMenu(menu);
+ getSite().registerContextMenu(menuMgr, viewer);
+ }
+
+ private void contributeToActionBars() {
+ IActionBars bars = getViewSite().getActionBars();
+ fillLocalPullDown(bars.getMenuManager());
+ fillLocalToolBar(bars.getToolBarManager());
+ }
+
+ private void fillLocalPullDown(IMenuManager manager) {
+ manager.add(action1);
+ manager.add(new Separator());
+ manager.add(action2);
+ }
+
+ private void fillContextMenu(IMenuManager manager) {
+ manager.add(action1);
+ manager.add(action2);
+ // Other plug-ins can contribute there actions here
+ manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
+ }
+
+ private void fillLocalToolBar(IToolBarManager manager) {
+ manager.add(action1);
+ manager.add(action2);
+ }
+
+ private void makeActions() {
+ action1 = new Action() {
+ public void run() {
+ showMessage("Action 1 executed");
+ }
+ };
+ action1.setText("Action 1");
+ action1.setToolTipText("Action 1 tooltip");
+ action1.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages()
+ .getImageDescriptor(ISharedImages.IMG_OBJS_INFO_TSK));
+
+ action2 = new Action() {
+ public void run() {
+ showMessage("Action 2 executed");
+ }
+ };
+ action2.setText("Action 2");
+ action2.setToolTipText("Action 2 tooltip");
+ action2.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages()
+ .getImageDescriptor(ISharedImages.IMG_OBJS_INFO_TSK));
+ }
+
+ private void showMessage(String message) {
+ MessageDialog.openInformation(viewer.getControl().getShell(),
+ "Xtext Sample View", message);
+ }
+
+ /**
+ * Passing the focus request to the viewer's control.
+ */
+ public void setFocus() {
+ viewer.getControl().setFocus();
+ }
+}
\ No newline at end of file
diff --git a/examples/plugins/org.xtext.example.mydsl/.antlr-generator-3.2.0.jar b/examples/plugins/org.xtext.example.mydsl/.antlr-generator-3.2.0.jar
new file mode 100644
index 0000000..4243492
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl/.antlr-generator-3.2.0.jar
Binary files differ
diff --git a/examples/plugins/org.xtext.example.mydsl/.classpath b/examples/plugins/org.xtext.example.mydsl/.classpath
new file mode 100644
index 0000000..406ca4a
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl/.classpath
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="src-gen"/>
+ <classpathentry kind="src" path="xtend-gen"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git "a/examples/plugins/org.xtext.example.mydsl/.launch/Generate Language Infrastructure \050org.xtext.example.mydsl\051.launch" "b/examples/plugins/org.xtext.example.mydsl/.launch/Generate Language Infrastructure \050org.xtext.example.mydsl\051.launch"
new file mode 100644
index 0000000..e1a38a6
--- /dev/null
+++ "b/examples/plugins/org.xtext.example.mydsl/.launch/Generate Language Infrastructure \050org.xtext.example.mydsl\051.launch"
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.RuntimeWorkbench">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="true"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bad_container_name" value="/org.xtext.example.mydsl/.launch/"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="false"/>
+<booleanAttribute key="clearws" value="false"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/Launch Runtime Eclipse"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../runtime-New_configuration"/>
+<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
+<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
+<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m -Xmx512m -XX:MaxPermSize=256m"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.platform.ide"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<stringAttribute key="templateConfig" value="${target_home}/configuration/config.ini"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="true"/>
+<booleanAttribute key="useProduct" value="true"/>
+<booleanAttribute key="usefeatures" value="false"/>
+</launchConfiguration>
diff --git a/examples/plugins/org.xtext.example.mydsl/.project b/examples/plugins/org.xtext.example.mydsl/.project
new file mode 100644
index 0000000..c12ea73
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.xtext.example.mydsl</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
+ </natures>
+</projectDescription>
diff --git a/examples/plugins/org.xtext.example.mydsl/.settings/org.eclipse.core.resources.prefs b/examples/plugins/org.xtext.example.mydsl/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..99f26c0
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/examples/plugins/org.xtext.example.mydsl/META-INF/MANIFEST.MF b/examples/plugins/org.xtext.example.mydsl/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..2e7bff2
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl/META-INF/MANIFEST.MF
@@ -0,0 +1,34 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.xtext.example.mydsl
+Bundle-Vendor: My Company
+Bundle-Version: 1.0.0.qualifier
+Bundle-SymbolicName: org.xtext.example.mydsl; singleton:=true
+Bundle-ActivationPolicy: lazy
+Require-Bundle: org.eclipse.xtext;visibility:=reexport,
+ org.eclipse.xtext.xbase;resolution:=optional;visibility:=reexport,
+ org.eclipse.xtext.generator;resolution:=optional,
+ org.apache.commons.logging;bundle-version="1.0.4";resolution:=optional,
+ org.eclipse.emf.codegen.ecore;resolution:=optional,
+ org.eclipse.emf.mwe.utils;resolution:=optional,
+ org.eclipse.emf.mwe2.launch;resolution:=optional,
+ org.eclipse.xtext.util,
+ org.eclipse.emf.ecore,
+ org.eclipse.emf.common,
+ org.antlr.runtime,
+ org.eclipse.xtext.common.types
+Import-Package: org.apache.log4j,
+ org.eclipse.xtext.xbase.lib
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.xtext.example.mydsl,
+ org.xtext.example.mydsl.services,
+ org.xtext.example.mydsl.myDsl,
+ org.xtext.example.mydsl.myDsl.impl,
+ org.xtext.example.mydsl.myDsl.util,
+ org.xtext.example.mydsl.serializer,
+ org.xtext.example.mydsl.parser.antlr,
+ org.xtext.example.mydsl.parser.antlr.internal,
+ org.xtext.example.mydsl.validation,
+ org.xtext.example.mydsl.scoping,
+ org.xtext.example.mydsl.generator,
+ org.xtext.example.mydsl.formatting
diff --git a/examples/plugins/org.xtext.example.mydsl/build.properties b/examples/plugins/org.xtext.example.mydsl/build.properties
new file mode 100644
index 0000000..31255ed
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl/build.properties
@@ -0,0 +1,6 @@
+source.. = src/,\
+ src-gen/,\
+ xtend-gen/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml
\ No newline at end of file
diff --git a/examples/plugins/org.xtext.example.mydsl/plugin.xml b/examples/plugins/org.xtext.example.mydsl/plugin.xml
new file mode 100644
index 0000000..ad7e4e4
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl/plugin.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<plugin>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <package
+ uri = "http://www.xtext.org/example/mydsl/MyDsl"
+ class = "org.xtext.example.mydsl.myDsl.MyDslPackage"
+ genModel = "org/xtext/example/mydsl/MyDsl.genmodel" />
+
+ </extension>
+
+
+
+
+</plugin>
diff --git a/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/AbstractMyDslRuntimeModule.java b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/AbstractMyDslRuntimeModule.java
new file mode 100644
index 0000000..44fd5ea
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/AbstractMyDslRuntimeModule.java
@@ -0,0 +1,172 @@
+/*
+ * generated by Xtext
+ */
+package org.xtext.example.mydsl;
+
+import java.util.Properties;
+
+import org.eclipse.xtext.Constants;
+import org.eclipse.xtext.service.DefaultRuntimeModule;
+
+import com.google.inject.Binder;
+import com.google.inject.name.Names;
+
+/**
+ * Manual modifications go to {org.xtext.example.mydsl.MyDslRuntimeModule}
+ */
+ @SuppressWarnings("all")
+public abstract class AbstractMyDslRuntimeModule extends DefaultRuntimeModule {
+
+ protected Properties properties = null;
+
+ @Override
+ public void configure(Binder binder) {
+ properties = tryBindProperties(binder, "org/xtext/example/mydsl/MyDsl.properties");
+ super.configure(binder);
+ }
+
+ public void configureLanguageName(Binder binder) {
+ binder.bind(String.class).annotatedWith(Names.named(Constants.LANGUAGE_NAME)).toInstance("org.xtext.example.mydsl.MyDsl");
+ }
+
+ public void configureFileExtensions(Binder binder) {
+ if (properties == null || properties.getProperty(Constants.FILE_EXTENSIONS) == null)
+ binder.bind(String.class).annotatedWith(Names.named(Constants.FILE_EXTENSIONS)).toInstance("mydsl");
+ }
+
+ // contributed by org.eclipse.xtext.generator.grammarAccess.GrammarAccessFragment
+ public Class<? extends org.eclipse.xtext.IGrammarAccess> bindIGrammarAccess() {
+ return org.xtext.example.mydsl.services.MyDslGrammarAccess.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.serializer.SerializerFragment
+ public Class<? extends org.eclipse.xtext.serializer.sequencer.ISemanticSequencer> bindISemanticSequencer() {
+ return org.xtext.example.mydsl.serializer.MyDslSemanticSequencer.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.serializer.SerializerFragment
+ public Class<? extends org.eclipse.xtext.serializer.sequencer.ISyntacticSequencer> bindISyntacticSequencer() {
+ return org.xtext.example.mydsl.serializer.MyDslSyntacticSequencer.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.serializer.SerializerFragment
+ public Class<? extends org.eclipse.xtext.serializer.ISerializer> bindISerializer() {
+ return org.eclipse.xtext.serializer.impl.Serializer.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
+ public Class<? extends org.eclipse.xtext.parser.IParser> bindIParser() {
+ return org.xtext.example.mydsl.parser.antlr.MyDslParser.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
+ public Class<? extends org.eclipse.xtext.parser.ITokenToStringConverter> bindITokenToStringConverter() {
+ return org.eclipse.xtext.parser.antlr.AntlrTokenToStringConverter.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
+ public Class<? extends org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider> bindIAntlrTokenFileProvider() {
+ return org.xtext.example.mydsl.parser.antlr.MyDslAntlrTokenFileProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
+ public Class<? extends org.eclipse.xtext.parser.antlr.Lexer> bindLexer() {
+ return org.xtext.example.mydsl.parser.antlr.internal.InternalMyDslLexer.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
+ public com.google.inject.Provider<org.xtext.example.mydsl.parser.antlr.internal.InternalMyDslLexer> provideInternalMyDslLexer() {
+ return org.eclipse.xtext.parser.antlr.LexerProvider.create(org.xtext.example.mydsl.parser.antlr.internal.InternalMyDslLexer.class);
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
+ public void configureRuntimeLexer(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.parser.antlr.Lexer.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.parser.antlr.LexerBindings.RUNTIME)).to(org.xtext.example.mydsl.parser.antlr.internal.InternalMyDslLexer.class);
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
+ public Class<? extends org.eclipse.xtext.parser.antlr.ITokenDefProvider> bindITokenDefProvider() {
+ return org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.validation.JavaValidatorFragment
+ @org.eclipse.xtext.service.SingletonBinding(eager=true) public Class<? extends org.xtext.example.mydsl.validation.MyDslJavaValidator> bindMyDslJavaValidator() {
+ return org.xtext.example.mydsl.validation.MyDslJavaValidator.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.scoping.AbstractScopingFragment
+ public Class<? extends org.eclipse.xtext.scoping.IScopeProvider> bindIScopeProvider() {
+ return org.xtext.example.mydsl.scoping.MyDslScopeProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.scoping.AbstractScopingFragment
+ public void configureIScopeProviderDelegate(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.scoping.IScopeProvider.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider.NAMED_DELEGATE)).to(org.eclipse.xtext.scoping.impl.ImportedNamespaceAwareLocalScopeProvider.class);
+ }
+
+ // contributed by org.eclipse.xtext.generator.scoping.AbstractScopingFragment
+ public void configureIgnoreCaseLinking(com.google.inject.Binder binder) {
+ binder.bindConstant().annotatedWith(org.eclipse.xtext.scoping.IgnoreCaseLinking.class).to(false);
+ }
+
+ // contributed by org.eclipse.xtext.generator.exporting.QualifiedNamesFragment
+ public Class<? extends org.eclipse.xtext.naming.IQualifiedNameProvider> bindIQualifiedNameProvider() {
+ return org.eclipse.xtext.naming.DefaultDeclarativeQualifiedNameProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
+ public Class<? extends org.eclipse.xtext.resource.IContainer.Manager> bindIContainer$Manager() {
+ return org.eclipse.xtext.resource.containers.StateBasedContainerManager.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
+ public Class<? extends org.eclipse.xtext.resource.containers.IAllContainersState.Provider> bindIAllContainersState$Provider() {
+ return org.eclipse.xtext.resource.containers.ResourceSetBasedAllContainersStateProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
+ public void configureIResourceDescriptions(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.resource.IResourceDescriptions.class).to(org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions.class);
+ }
+
+ // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
+ public void configureIResourceDescriptionsBuilderScope(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.resource.IResourceDescriptions.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.resource.impl.ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE)).to(org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions.class);
+ }
+
+ // contributed by org.eclipse.xtext.generator.generator.GeneratorFragment
+ public Class<? extends org.eclipse.xtext.generator.IGenerator> bindIGenerator() {
+ return org.xtext.example.mydsl.generator.MyDslGenerator.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.formatting.FormatterFragment
+ public Class<? extends org.eclipse.xtext.formatting.IFormatter> bindIFormatter() {
+ return org.xtext.example.mydsl.formatting.MyDslFormatter.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.types.TypesGeneratorFragment
+ public java.lang.ClassLoader bindClassLoaderToInstance() {
+ return getClass().getClassLoader();
+ }
+
+ // contributed by org.eclipse.xtext.generator.types.TypesGeneratorFragment
+ public org.eclipse.xtext.common.types.TypesFactory bindTypesFactoryToInstance() {
+ return org.eclipse.xtext.common.types.TypesFactory.eINSTANCE;
+ }
+
+ // contributed by org.eclipse.xtext.generator.types.TypesGeneratorFragment
+ public Class<? extends org.eclipse.xtext.common.types.access.IJvmTypeProvider.Factory> bindIJvmTypeProvider$Factory() {
+ return org.eclipse.xtext.common.types.access.ClasspathTypeProviderFactory.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.types.TypesGeneratorFragment
+ public Class<? extends org.eclipse.xtext.common.types.xtext.AbstractTypeScopeProvider> bindAbstractTypeScopeProvider() {
+ return org.eclipse.xtext.common.types.xtext.ClasspathBasedTypeScopeProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.types.TypesGeneratorFragment
+ public Class<? extends org.eclipse.xtext.scoping.IGlobalScopeProvider> bindIGlobalScopeProvider() {
+ return org.eclipse.xtext.common.types.xtext.TypesAwareDefaultGlobalScopeProvider.class;
+ }
+
+}
diff --git a/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/MyDsl.ecore b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/MyDsl.ecore
new file mode 100644
index 0000000..aef6378
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/MyDsl.ecore
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="myDsl" nsURI="http://www.xtext.org/example/mydsl/MyDsl" nsPrefix="myDsl">
+ <eClassifiers xsi:type="ecore:EClass" name="Model">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="greetings" upperBound="-1"
+ eType="#//Greeting" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Greeting">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/MyDsl.genmodel b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/MyDsl.genmodel
new file mode 100644
index 0000000..4fbd5c6
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/MyDsl.genmodel
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.xtext.example.mydsl/src-gen" editDirectory="/org.xtext.example.mydsl.edit/src"
+ editorDirectory="/org.xtext.example.mydsl.editor/src" modelPluginID="org.xtext.example.mydsl"
+ forceOverwrite="true" modelName="MyDsl" updateClasspath="false" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container"
+ complianceLevel="5.0" copyrightFields="false" editPluginID="org.xtext.example.mydsl.edit"
+ editorPluginID="org.xtext.example.mydsl.editor" runtimeVersion="2.8">
+ <genPackages prefix="MyDsl" basePackage="org.xtext.example.mydsl" disposableProviderFactory="true"
+ ecorePackage="MyDsl.ecore#/">
+ <genClasses ecoreClass="MyDsl.ecore#//Model">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference MyDsl.ecore#//Model/greetings"/>
+ </genClasses>
+ <genClasses ecoreClass="MyDsl.ecore#//Greeting">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute MyDsl.ecore#//Greeting/name"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/MyDsl.xmi b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/MyDsl.xmi
new file mode 100644
index 0000000..f971a27
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/MyDsl.xmi
@@ -0,0 +1,181 @@
+<?xml version="1.0" encoding="ASCII"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:xtext="http://www.eclipse.org/2008/Xtext">
+ <xtext:Grammar name="org.xtext.example.mydsl.MyDsl" usedGrammars="/1">
+ <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="myDsl">
+ <ePackage href="http://www.xtext.org/example/mydsl/MyDsl#/"/>
+ </metamodelDeclarations>
+ <rules xsi:type="xtext:ParserRule" name="Model">
+ <type metamodel="/0/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EClass" href="http://www.xtext.org/example/mydsl/MyDsl#//Model"/>
+ </type>
+ <alternatives xsi:type="xtext:Assignment" cardinality="*" feature="greetings" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.1"/>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:ParserRule" name="Greeting">
+ <type metamodel="/0/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EClass" href="http://www.xtext.org/example/mydsl/MyDsl#//Greeting"/>
+ </type>
+ <alternatives xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Keyword" value="Hello"/>
+ <elements xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="/1/@rules.0"/>
+ </elements>
+ <elements xsi:type="xtext:Keyword" value="!"/>
+ </alternatives>
+ </rules>
+ </xtext:Grammar>
+ <xtext:Grammar name="org.eclipse.xtext.common.Terminals" definesHiddenTokens="true" hiddenTokens="/1/@rules.5 /1/@rules.3 /1/@rules.4">
+ <metamodelDeclarations xsi:type="xtext:ReferencedMetamodel" alias="ecore">
+ <ePackage href="http://www.eclipse.org/emf/2002/Ecore#/"/>
+ </metamodelDeclarations>
+ <rules xsi:type="xtext:TerminalRule" name="ID">
+ <type metamodel="/1/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </type>
+ <alternatives xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Keyword" cardinality="?" value="^"/>
+ <elements xsi:type="xtext:Alternatives">
+ <elements xsi:type="xtext:CharacterRange">
+ <left value="a"/>
+ <right value="z"/>
+ </elements>
+ <elements xsi:type="xtext:CharacterRange">
+ <left value="A"/>
+ <right value="Z"/>
+ </elements>
+ <elements xsi:type="xtext:Keyword" value="_"/>
+ </elements>
+ <elements xsi:type="xtext:Alternatives" cardinality="*">
+ <elements xsi:type="xtext:CharacterRange">
+ <left value="a"/>
+ <right value="z"/>
+ </elements>
+ <elements xsi:type="xtext:CharacterRange">
+ <left value="A"/>
+ <right value="Z"/>
+ </elements>
+ <elements xsi:type="xtext:Keyword" value="_"/>
+ <elements xsi:type="xtext:CharacterRange">
+ <left value="0"/>
+ <right value="9"/>
+ </elements>
+ </elements>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:TerminalRule" name="INT">
+ <type metamodel="/1/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ </type>
+ <alternatives xsi:type="xtext:CharacterRange" cardinality="+">
+ <left value="0"/>
+ <right value="9"/>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:TerminalRule" name="STRING">
+ <type metamodel="/1/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </type>
+ <alternatives xsi:type="xtext:Alternatives">
+ <elements xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Keyword" value="""/>
+ <elements xsi:type="xtext:Alternatives" cardinality="*">
+ <elements xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Keyword" value="\"/>
+ <elements xsi:type="xtext:Alternatives">
+ <elements xsi:type="xtext:Keyword" value="b"/>
+ <elements xsi:type="xtext:Keyword" value="t"/>
+ <elements xsi:type="xtext:Keyword" value="n"/>
+ <elements xsi:type="xtext:Keyword" value="f"/>
+ <elements xsi:type="xtext:Keyword" value="r"/>
+ <elements xsi:type="xtext:Keyword" value="u"/>
+ <elements xsi:type="xtext:Keyword" value="""/>
+ <elements xsi:type="xtext:Keyword" value="'"/>
+ <elements xsi:type="xtext:Keyword" value="\"/>
+ </elements>
+ </elements>
+ <elements xsi:type="xtext:NegatedToken">
+ <terminal xsi:type="xtext:Alternatives">
+ <elements xsi:type="xtext:Keyword" value="\"/>
+ <elements xsi:type="xtext:Keyword" value="""/>
+ </terminal>
+ </elements>
+ </elements>
+ <elements xsi:type="xtext:Keyword" value="""/>
+ </elements>
+ <elements xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Keyword" value="'"/>
+ <elements xsi:type="xtext:Alternatives" cardinality="*">
+ <elements xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Keyword" value="\"/>
+ <elements xsi:type="xtext:Alternatives">
+ <elements xsi:type="xtext:Keyword" value="b"/>
+ <elements xsi:type="xtext:Keyword" value="t"/>
+ <elements xsi:type="xtext:Keyword" value="n"/>
+ <elements xsi:type="xtext:Keyword" value="f"/>
+ <elements xsi:type="xtext:Keyword" value="r"/>
+ <elements xsi:type="xtext:Keyword" value="u"/>
+ <elements xsi:type="xtext:Keyword" value="""/>
+ <elements xsi:type="xtext:Keyword" value="'"/>
+ <elements xsi:type="xtext:Keyword" value="\"/>
+ </elements>
+ </elements>
+ <elements xsi:type="xtext:NegatedToken">
+ <terminal xsi:type="xtext:Alternatives">
+ <elements xsi:type="xtext:Keyword" value="\"/>
+ <elements xsi:type="xtext:Keyword" value="'"/>
+ </terminal>
+ </elements>
+ </elements>
+ <elements xsi:type="xtext:Keyword" value="'"/>
+ </elements>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:TerminalRule" name="ML_COMMENT">
+ <type metamodel="/1/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </type>
+ <alternatives xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Keyword" value="/*"/>
+ <elements xsi:type="xtext:UntilToken">
+ <terminal xsi:type="xtext:Keyword" value="*/"/>
+ </elements>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:TerminalRule" name="SL_COMMENT">
+ <type metamodel="/1/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </type>
+ <alternatives xsi:type="xtext:Group">
+ <elements xsi:type="xtext:Keyword" value="//"/>
+ <elements xsi:type="xtext:NegatedToken" cardinality="*">
+ <terminal xsi:type="xtext:Alternatives">
+ <elements xsi:type="xtext:Keyword" value="
"/>
+ <elements xsi:type="xtext:Keyword" value="
"/>
+ </terminal>
+ </elements>
+ <elements xsi:type="xtext:Group" cardinality="?">
+ <elements xsi:type="xtext:Keyword" cardinality="?" value="
"/>
+ <elements xsi:type="xtext:Keyword" value="
"/>
+ </elements>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:TerminalRule" name="WS">
+ <type metamodel="/1/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </type>
+ <alternatives xsi:type="xtext:Alternatives" cardinality="+">
+ <elements xsi:type="xtext:Keyword" value=" "/>
+ <elements xsi:type="xtext:Keyword" value="	"/>
+ <elements xsi:type="xtext:Keyword" value="
"/>
+ <elements xsi:type="xtext:Keyword" value="
"/>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:TerminalRule" name="ANY_OTHER">
+ <type metamodel="/1/@metamodelDeclarations.0">
+ <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </type>
+ <alternatives xsi:type="xtext:Wildcard"/>
+ </rules>
+ </xtext:Grammar>
+</xmi:XMI>
diff --git a/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/MyDslStandaloneSetupGenerated.java b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/MyDslStandaloneSetupGenerated.java
new file mode 100644
index 0000000..92cd5f4
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/MyDslStandaloneSetupGenerated.java
@@ -0,0 +1,43 @@
+
+package org.xtext.example.mydsl;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.xtext.ISetup;
+import org.eclipse.emf.ecore.resource.Resource;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+/**
+ * Generated from StandaloneSetup.xpt!
+ */
+@SuppressWarnings("all")
+public class MyDslStandaloneSetupGenerated implements ISetup {
+
+ public Injector createInjectorAndDoEMFRegistration() {
+ org.eclipse.xtext.common.TerminalsStandaloneSetup.doSetup();
+
+ Injector injector = createInjector();
+ register(injector);
+ return injector;
+ }
+
+ public Injector createInjector() {
+ return Guice.createInjector(new org.xtext.example.mydsl.MyDslRuntimeModule());
+ }
+
+ public void register(Injector injector) {
+ if (!EPackage.Registry.INSTANCE.containsKey("http://www.xtext.org/example/mydsl/MyDsl")) {
+ EPackage.Registry.INSTANCE.put("http://www.xtext.org/example/mydsl/MyDsl", org.xtext.example.mydsl.myDsl.MyDslPackage.eINSTANCE);
+ }
+
+ org.eclipse.xtext.resource.IResourceFactory resourceFactory = injector.getInstance(org.eclipse.xtext.resource.IResourceFactory.class);
+ org.eclipse.xtext.resource.IResourceServiceProvider serviceProvider = injector.getInstance(org.eclipse.xtext.resource.IResourceServiceProvider.class);
+ Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("mydsl", resourceFactory);
+ org.eclipse.xtext.resource.IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("mydsl", serviceProvider);
+
+
+
+
+ }
+}
diff --git a/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/myDsl/Greeting.java b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/myDsl/Greeting.java
new file mode 100644
index 0000000..19b373b
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/myDsl/Greeting.java
@@ -0,0 +1,51 @@
+/**
+ */
+package org.xtext.example.mydsl.myDsl;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Greeting</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.xtext.example.mydsl.myDsl.Greeting#getName <em>Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.xtext.example.mydsl.myDsl.MyDslPackage#getGreeting()
+ * @model
+ * @generated
+ */
+public interface Greeting extends EObject
+{
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see org.xtext.example.mydsl.myDsl.MyDslPackage#getGreeting_Name()
+ * @model
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.xtext.example.mydsl.myDsl.Greeting#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+} // Greeting
diff --git a/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/myDsl/Model.java b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/myDsl/Model.java
new file mode 100644
index 0000000..21088f3
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/myDsl/Model.java
@@ -0,0 +1,43 @@
+/**
+ */
+package org.xtext.example.mydsl.myDsl;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Model</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.xtext.example.mydsl.myDsl.Model#getGreetings <em>Greetings</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.xtext.example.mydsl.myDsl.MyDslPackage#getModel()
+ * @model
+ * @generated
+ */
+public interface Model extends EObject
+{
+ /**
+ * Returns the value of the '<em><b>Greetings</b></em>' containment reference list.
+ * The list contents are of type {@link org.xtext.example.mydsl.myDsl.Greeting}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Greetings</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Greetings</em>' containment reference list.
+ * @see org.xtext.example.mydsl.myDsl.MyDslPackage#getModel_Greetings()
+ * @model containment="true"
+ * @generated
+ */
+ EList<Greeting> getGreetings();
+
+} // Model
diff --git a/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/myDsl/MyDslFactory.java b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/myDsl/MyDslFactory.java
new file mode 100644
index 0000000..436626a
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/myDsl/MyDslFactory.java
@@ -0,0 +1,52 @@
+/**
+ */
+package org.xtext.example.mydsl.myDsl;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.xtext.example.mydsl.myDsl.MyDslPackage
+ * @generated
+ */
+public interface MyDslFactory extends EFactory
+{
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ MyDslFactory eINSTANCE = org.xtext.example.mydsl.myDsl.impl.MyDslFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Model</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Model</em>'.
+ * @generated
+ */
+ Model createModel();
+
+ /**
+ * Returns a new object of class '<em>Greeting</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Greeting</em>'.
+ * @generated
+ */
+ Greeting createGreeting();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ MyDslPackage getMyDslPackage();
+
+} //MyDslFactory
diff --git a/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/myDsl/MyDslPackage.java b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/myDsl/MyDslPackage.java
new file mode 100644
index 0000000..3e012d3
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/myDsl/MyDslPackage.java
@@ -0,0 +1,219 @@
+/**
+ */
+package org.xtext.example.mydsl.myDsl;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.xtext.example.mydsl.myDsl.MyDslFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface MyDslPackage extends EPackage
+{
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "myDsl";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.xtext.org/example/mydsl/MyDsl";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "myDsl";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ MyDslPackage eINSTANCE = org.xtext.example.mydsl.myDsl.impl.MyDslPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.xtext.example.mydsl.myDsl.impl.ModelImpl <em>Model</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.xtext.example.mydsl.myDsl.impl.ModelImpl
+ * @see org.xtext.example.mydsl.myDsl.impl.MyDslPackageImpl#getModel()
+ * @generated
+ */
+ int MODEL = 0;
+
+ /**
+ * The feature id for the '<em><b>Greetings</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MODEL__GREETINGS = 0;
+
+ /**
+ * The number of structural features of the '<em>Model</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MODEL_FEATURE_COUNT = 1;
+
+ /**
+ * The meta object id for the '{@link org.xtext.example.mydsl.myDsl.impl.GreetingImpl <em>Greeting</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.xtext.example.mydsl.myDsl.impl.GreetingImpl
+ * @see org.xtext.example.mydsl.myDsl.impl.MyDslPackageImpl#getGreeting()
+ * @generated
+ */
+ int GREETING = 1;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GREETING__NAME = 0;
+
+ /**
+ * The number of structural features of the '<em>Greeting</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GREETING_FEATURE_COUNT = 1;
+
+
+ /**
+ * Returns the meta object for class '{@link org.xtext.example.mydsl.myDsl.Model <em>Model</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Model</em>'.
+ * @see org.xtext.example.mydsl.myDsl.Model
+ * @generated
+ */
+ EClass getModel();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.xtext.example.mydsl.myDsl.Model#getGreetings <em>Greetings</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Greetings</em>'.
+ * @see org.xtext.example.mydsl.myDsl.Model#getGreetings()
+ * @see #getModel()
+ * @generated
+ */
+ EReference getModel_Greetings();
+
+ /**
+ * Returns the meta object for class '{@link org.xtext.example.mydsl.myDsl.Greeting <em>Greeting</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Greeting</em>'.
+ * @see org.xtext.example.mydsl.myDsl.Greeting
+ * @generated
+ */
+ EClass getGreeting();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.xtext.example.mydsl.myDsl.Greeting#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.xtext.example.mydsl.myDsl.Greeting#getName()
+ * @see #getGreeting()
+ * @generated
+ */
+ EAttribute getGreeting_Name();
+
+ /**
+ * Returns the factory that creates the instances of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ MyDslFactory getMyDslFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals
+ {
+ /**
+ * The meta object literal for the '{@link org.xtext.example.mydsl.myDsl.impl.ModelImpl <em>Model</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.xtext.example.mydsl.myDsl.impl.ModelImpl
+ * @see org.xtext.example.mydsl.myDsl.impl.MyDslPackageImpl#getModel()
+ * @generated
+ */
+ EClass MODEL = eINSTANCE.getModel();
+
+ /**
+ * The meta object literal for the '<em><b>Greetings</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference MODEL__GREETINGS = eINSTANCE.getModel_Greetings();
+
+ /**
+ * The meta object literal for the '{@link org.xtext.example.mydsl.myDsl.impl.GreetingImpl <em>Greeting</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.xtext.example.mydsl.myDsl.impl.GreetingImpl
+ * @see org.xtext.example.mydsl.myDsl.impl.MyDslPackageImpl#getGreeting()
+ * @generated
+ */
+ EClass GREETING = eINSTANCE.getGreeting();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute GREETING__NAME = eINSTANCE.getGreeting_Name();
+
+ }
+
+} //MyDslPackage
diff --git a/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/myDsl/impl/GreetingImpl.java b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/myDsl/impl/GreetingImpl.java
new file mode 100644
index 0000000..b80b107
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/myDsl/impl/GreetingImpl.java
@@ -0,0 +1,177 @@
+/**
+ */
+package org.xtext.example.mydsl.myDsl.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.xtext.example.mydsl.myDsl.Greeting;
+import org.xtext.example.mydsl.myDsl.MyDslPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Greeting</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.xtext.example.mydsl.myDsl.impl.GreetingImpl#getName <em>Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class GreetingImpl extends MinimalEObjectImpl.Container implements Greeting
+{
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected GreetingImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return MyDslPackage.Literals.GREETING;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName)
+ {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, MyDslPackage.GREETING__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID)
+ {
+ case MyDslPackage.GREETING__NAME:
+ return getName();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID)
+ {
+ case MyDslPackage.GREETING__NAME:
+ setName((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID)
+ {
+ case MyDslPackage.GREETING__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID)
+ {
+ case MyDslPackage.GREETING__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString()
+ {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (name: ");
+ result.append(name);
+ result.append(')');
+ return result.toString();
+ }
+
+} //GreetingImpl
diff --git a/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/myDsl/impl/ModelImpl.java b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/myDsl/impl/ModelImpl.java
new file mode 100644
index 0000000..0716b1f
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/myDsl/impl/ModelImpl.java
@@ -0,0 +1,167 @@
+/**
+ */
+package org.xtext.example.mydsl.myDsl.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.xtext.example.mydsl.myDsl.Greeting;
+import org.xtext.example.mydsl.myDsl.Model;
+import org.xtext.example.mydsl.myDsl.MyDslPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Model</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.xtext.example.mydsl.myDsl.impl.ModelImpl#getGreetings <em>Greetings</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ModelImpl extends MinimalEObjectImpl.Container implements Model
+{
+ /**
+ * The cached value of the '{@link #getGreetings() <em>Greetings</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getGreetings()
+ * @generated
+ * @ordered
+ */
+ protected EList<Greeting> greetings;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ModelImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return MyDslPackage.Literals.MODEL;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Greeting> getGreetings()
+ {
+ if (greetings == null)
+ {
+ greetings = new EObjectContainmentEList<Greeting>(Greeting.class, this, MyDslPackage.MODEL__GREETINGS);
+ }
+ return greetings;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+ {
+ switch (featureID)
+ {
+ case MyDslPackage.MODEL__GREETINGS:
+ return ((InternalEList<?>)getGreetings()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID)
+ {
+ case MyDslPackage.MODEL__GREETINGS:
+ return getGreetings();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID)
+ {
+ case MyDslPackage.MODEL__GREETINGS:
+ getGreetings().clear();
+ getGreetings().addAll((Collection<? extends Greeting>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID)
+ {
+ case MyDslPackage.MODEL__GREETINGS:
+ getGreetings().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID)
+ {
+ case MyDslPackage.MODEL__GREETINGS:
+ return greetings != null && !greetings.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //ModelImpl
diff --git a/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/myDsl/impl/MyDslFactoryImpl.java b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/myDsl/impl/MyDslFactoryImpl.java
new file mode 100644
index 0000000..be32c1d
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/myDsl/impl/MyDslFactoryImpl.java
@@ -0,0 +1,118 @@
+/**
+ */
+package org.xtext.example.mydsl.myDsl.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+import org.xtext.example.mydsl.myDsl.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class MyDslFactoryImpl extends EFactoryImpl implements MyDslFactory
+{
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static MyDslFactory init()
+ {
+ try
+ {
+ MyDslFactory theMyDslFactory = (MyDslFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.xtext.org/example/mydsl/MyDsl");
+ if (theMyDslFactory != null)
+ {
+ return theMyDslFactory;
+ }
+ }
+ catch (Exception exception)
+ {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new MyDslFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public MyDslFactoryImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass)
+ {
+ switch (eClass.getClassifierID())
+ {
+ case MyDslPackage.MODEL: return createModel();
+ case MyDslPackage.GREETING: return createGreeting();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Model createModel()
+ {
+ ModelImpl model = new ModelImpl();
+ return model;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Greeting createGreeting()
+ {
+ GreetingImpl greeting = new GreetingImpl();
+ return greeting;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public MyDslPackage getMyDslPackage()
+ {
+ return (MyDslPackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static MyDslPackage getPackage()
+ {
+ return MyDslPackage.eINSTANCE;
+ }
+
+} //MyDslFactoryImpl
diff --git a/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/myDsl/impl/MyDslPackageImpl.java b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/myDsl/impl/MyDslPackageImpl.java
new file mode 100644
index 0000000..b869f30
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/myDsl/impl/MyDslPackageImpl.java
@@ -0,0 +1,220 @@
+/**
+ */
+package org.xtext.example.mydsl.myDsl.impl;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+import org.xtext.example.mydsl.myDsl.Greeting;
+import org.xtext.example.mydsl.myDsl.Model;
+import org.xtext.example.mydsl.myDsl.MyDslFactory;
+import org.xtext.example.mydsl.myDsl.MyDslPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class MyDslPackageImpl extends EPackageImpl implements MyDslPackage
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass modelEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass greetingEClass = null;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * <p>Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.xtext.example.mydsl.myDsl.MyDslPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private MyDslPackageImpl()
+ {
+ super(eNS_URI, MyDslFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>This method is used to initialize {@link MyDslPackage#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static MyDslPackage init()
+ {
+ if (isInited) return (MyDslPackage)EPackage.Registry.INSTANCE.getEPackage(MyDslPackage.eNS_URI);
+
+ // Obtain or create and register package
+ MyDslPackageImpl theMyDslPackage = (MyDslPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof MyDslPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new MyDslPackageImpl());
+
+ isInited = true;
+
+ // Create package meta-data objects
+ theMyDslPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theMyDslPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theMyDslPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(MyDslPackage.eNS_URI, theMyDslPackage);
+ return theMyDslPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getModel()
+ {
+ return modelEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getModel_Greetings()
+ {
+ return (EReference)modelEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getGreeting()
+ {
+ return greetingEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getGreeting_Name()
+ {
+ return (EAttribute)greetingEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public MyDslFactory getMyDslFactory()
+ {
+ return (MyDslFactory)getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createPackageContents()
+ {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ modelEClass = createEClass(MODEL);
+ createEReference(modelEClass, MODEL__GREETINGS);
+
+ greetingEClass = createEClass(GREETING);
+ createEAttribute(greetingEClass, GREETING__NAME);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents()
+ {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(modelEClass, Model.class, "Model", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getModel_Greetings(), this.getGreeting(), null, "greetings", null, 0, -1, Model.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(greetingEClass, Greeting.class, "Greeting", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getGreeting_Name(), ecorePackage.getEString(), "name", null, 0, 1, Greeting.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} //MyDslPackageImpl
diff --git a/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/myDsl/util/MyDslAdapterFactory.java b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/myDsl/util/MyDslAdapterFactory.java
new file mode 100644
index 0000000..95ad725
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/myDsl/util/MyDslAdapterFactory.java
@@ -0,0 +1,152 @@
+/**
+ */
+package org.xtext.example.mydsl.myDsl.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.xtext.example.mydsl.myDsl.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see org.xtext.example.mydsl.myDsl.MyDslPackage
+ * @generated
+ */
+public class MyDslAdapterFactory extends AdapterFactoryImpl
+{
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static MyDslPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public MyDslAdapterFactory()
+ {
+ if (modelPackage == null)
+ {
+ modelPackage = MyDslPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc -->
+ * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+ * <!-- end-user-doc -->
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object)
+ {
+ if (object == modelPackage)
+ {
+ return true;
+ }
+ if (object instanceof EObject)
+ {
+ return ((EObject)object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+ /**
+ * The switch that delegates to the <code>createXXX</code> methods.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected MyDslSwitch<Adapter> modelSwitch =
+ new MyDslSwitch<Adapter>()
+ {
+ @Override
+ public Adapter caseModel(Model object)
+ {
+ return createModelAdapter();
+ }
+ @Override
+ public Adapter caseGreeting(Greeting object)
+ {
+ return createGreetingAdapter();
+ }
+ @Override
+ public Adapter defaultCase(EObject object)
+ {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param target the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target)
+ {
+ return modelSwitch.doSwitch((EObject)target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.xtext.example.mydsl.myDsl.Model <em>Model</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.xtext.example.mydsl.myDsl.Model
+ * @generated
+ */
+ public Adapter createModelAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.xtext.example.mydsl.myDsl.Greeting <em>Greeting</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.xtext.example.mydsl.myDsl.Greeting
+ * @generated
+ */
+ public Adapter createGreetingAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter()
+ {
+ return null;
+ }
+
+} //MyDslAdapterFactory
diff --git a/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/myDsl/util/MyDslSwitch.java b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/myDsl/util/MyDslSwitch.java
new file mode 100644
index 0000000..8e8abbc
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/myDsl/util/MyDslSwitch.java
@@ -0,0 +1,142 @@
+/**
+ */
+package org.xtext.example.mydsl.myDsl.util;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.util.Switch;
+
+import org.xtext.example.mydsl.myDsl.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.xtext.example.mydsl.myDsl.MyDslPackage
+ * @generated
+ */
+public class MyDslSwitch<T> extends Switch<T>
+{
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static MyDslPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public MyDslSwitch()
+ {
+ if (modelPackage == null)
+ {
+ modelPackage = MyDslPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Checks whether this is a switch for the given package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @parameter ePackage the package in question.
+ * @return whether this is a switch for the given package.
+ * @generated
+ */
+ @Override
+ protected boolean isSwitchFor(EPackage ePackage)
+ {
+ return ePackage == modelPackage;
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject)
+ {
+ switch (classifierID)
+ {
+ case MyDslPackage.MODEL:
+ {
+ Model model = (Model)theEObject;
+ T result = caseModel(model);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case MyDslPackage.GREETING:
+ {
+ Greeting greeting = (Greeting)theEObject;
+ T result = caseGreeting(greeting);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Model</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Model</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseModel(Model object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Greeting</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Greeting</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseGreeting(Greeting object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ @Override
+ public T defaultCase(EObject object)
+ {
+ return null;
+ }
+
+} //MyDslSwitch
diff --git a/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/MyDslAntlrTokenFileProvider.java b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/MyDslAntlrTokenFileProvider.java
new file mode 100644
index 0000000..09037f0
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/MyDslAntlrTokenFileProvider.java
@@ -0,0 +1,15 @@
+/*
+* generated by Xtext
+*/
+package org.xtext.example.mydsl.parser.antlr;
+
+import java.io.InputStream;
+import org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider;
+
+public class MyDslAntlrTokenFileProvider implements IAntlrTokenFileProvider {
+
+ public InputStream getAntlrTokenFile() {
+ ClassLoader classLoader = getClass().getClassLoader();
+ return classLoader.getResourceAsStream("org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.tokens");
+ }
+}
diff --git a/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/MyDslParser.java b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/MyDslParser.java
new file mode 100644
index 0000000..cabcc76
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/MyDslParser.java
@@ -0,0 +1,39 @@
+/*
+* generated by Xtext
+*/
+package org.xtext.example.mydsl.parser.antlr;
+
+import com.google.inject.Inject;
+
+import org.eclipse.xtext.parser.antlr.XtextTokenStream;
+import org.xtext.example.mydsl.services.MyDslGrammarAccess;
+
+public class MyDslParser extends org.eclipse.xtext.parser.antlr.AbstractAntlrParser {
+
+ @Inject
+ private MyDslGrammarAccess grammarAccess;
+
+ @Override
+ protected void setInitialHiddenTokens(XtextTokenStream tokenStream) {
+ tokenStream.setInitialHiddenTokens("RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT");
+ }
+
+ @Override
+ protected org.xtext.example.mydsl.parser.antlr.internal.InternalMyDslParser createParser(XtextTokenStream stream) {
+ return new org.xtext.example.mydsl.parser.antlr.internal.InternalMyDslParser(stream, getGrammarAccess());
+ }
+
+ @Override
+ protected String getDefaultRuleName() {
+ return "Model";
+ }
+
+ public MyDslGrammarAccess getGrammarAccess() {
+ return this.grammarAccess;
+ }
+
+ public void setGrammarAccess(MyDslGrammarAccess grammarAccess) {
+ this.grammarAccess = grammarAccess;
+ }
+
+}
diff --git a/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g
new file mode 100644
index 0000000..5ab5569
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g
@@ -0,0 +1,166 @@
+/*
+* generated by Xtext
+*/
+grammar InternalMyDsl;
+
+options {
+ superClass=AbstractInternalAntlrParser;
+
+}
+
+@lexer::header {
+package org.xtext.example.mydsl.parser.antlr.internal;
+
+// Hack: Use our own Lexer superclass by means of import.
+// Currently there is no other way to specify the superclass for the lexer.
+import org.eclipse.xtext.parser.antlr.Lexer;
+}
+
+@parser::header {
+package org.xtext.example.mydsl.parser.antlr.internal;
+
+import org.eclipse.xtext.*;
+import org.eclipse.xtext.parser.*;
+import org.eclipse.xtext.parser.impl.*;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens;
+import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken;
+import org.xtext.example.mydsl.services.MyDslGrammarAccess;
+
+}
+
+@parser::members {
+
+ private MyDslGrammarAccess grammarAccess;
+
+ public InternalMyDslParser(TokenStream input, MyDslGrammarAccess grammarAccess) {
+ this(input);
+ this.grammarAccess = grammarAccess;
+ registerRules(grammarAccess.getGrammar());
+ }
+
+ @Override
+ protected String getFirstRuleName() {
+ return "Model";
+ }
+
+ @Override
+ protected MyDslGrammarAccess getGrammarAccess() {
+ return grammarAccess;
+ }
+}
+
+@rulecatch {
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+}
+
+
+
+
+// Entry rule entryRuleModel
+entryRuleModel returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getModelRule()); }
+ iv_ruleModel=ruleModel
+ { $current=$iv_ruleModel.current; }
+ EOF
+;
+
+// Rule Model
+ruleModel returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+(
+(
+ {
+ newCompositeNode(grammarAccess.getModelAccess().getGreetingsGreetingParserRuleCall_0());
+ }
+ lv_greetings_0_0=ruleGreeting {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getModelRule());
+ }
+ add(
+ $current,
+ "greetings",
+ lv_greetings_0_0,
+ "Greeting");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+)*
+;
+
+
+
+
+
+// Entry rule entryRuleGreeting
+entryRuleGreeting returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getGreetingRule()); }
+ iv_ruleGreeting=ruleGreeting
+ { $current=$iv_ruleGreeting.current; }
+ EOF
+;
+
+// Rule Greeting
+ruleGreeting returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+( otherlv_0='Hello'
+ {
+ newLeafNode(otherlv_0, grammarAccess.getGreetingAccess().getHelloKeyword_0());
+ }
+(
+(
+ lv_name_1_0=RULE_ID
+ {
+ newLeafNode(lv_name_1_0, grammarAccess.getGreetingAccess().getNameIDTerminalRuleCall_1_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getGreetingRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "name",
+ lv_name_1_0,
+ "ID");
+ }
+
+)
+) otherlv_2='!'
+ {
+ newLeafNode(otherlv_2, grammarAccess.getGreetingAccess().getExclamationMarkKeyword_2());
+ }
+)
+;
+
+
+
+
+
+RULE_ID : '^'? ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*;
+
+RULE_INT : ('0'..'9')+;
+
+RULE_STRING : ('"' ('\\' ('b'|'t'|'n'|'f'|'r'|'u'|'"'|'\''|'\\')|~(('\\'|'"')))* '"'|'\'' ('\\' ('b'|'t'|'n'|'f'|'r'|'u'|'"'|'\''|'\\')|~(('\\'|'\'')))* '\'');
+
+RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )*'*/';
+
+RULE_SL_COMMENT : '//' ~(('\n'|'\r'))* ('\r'? '\n')?;
+
+RULE_WS : (' '|'\t'|'\r'|'\n')+;
+
+RULE_ANY_OTHER : .;
+
+
diff --git a/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.tokens b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.tokens
new file mode 100644
index 0000000..056b618
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.tokens
@@ -0,0 +1,11 @@
+RULE_ID=4
+RULE_STRING=6
+T__12=12
+T__11=11
+RULE_ANY_OTHER=10
+RULE_INT=5
+RULE_WS=9
+RULE_SL_COMMENT=8
+RULE_ML_COMMENT=7
+'!'=12
+'Hello'=11
diff --git a/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDslLexer.java b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDslLexer.java
new file mode 100644
index 0000000..bdb004c
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDslLexer.java
@@ -0,0 +1,803 @@
+package org.xtext.example.mydsl.parser.antlr.internal;
+
+// Hack: Use our own Lexer superclass by means of import.
+// Currently there is no other way to specify the superclass for the lexer.
+import org.eclipse.xtext.parser.antlr.Lexer;
+
+
+import org.antlr.runtime.*;
+import java.util.Stack;
+import java.util.List;
+import java.util.ArrayList;
+
+@SuppressWarnings("all")
+public class InternalMyDslLexer extends Lexer {
+ public static final int RULE_ID=4;
+ public static final int RULE_STRING=6;
+ public static final int T__12=12;
+ public static final int T__11=11;
+ public static final int RULE_ANY_OTHER=10;
+ public static final int RULE_INT=5;
+ public static final int RULE_WS=9;
+ public static final int RULE_SL_COMMENT=8;
+ public static final int EOF=-1;
+ public static final int RULE_ML_COMMENT=7;
+
+ // delegates
+ // delegators
+
+ public InternalMyDslLexer() {;}
+ public InternalMyDslLexer(CharStream input) {
+ this(input, new RecognizerSharedState());
+ }
+ public InternalMyDslLexer(CharStream input, RecognizerSharedState state) {
+ super(input,state);
+
+ }
+ public String getGrammarFileName() { return "../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g"; }
+
+ // $ANTLR start "T__11"
+ public final void mT__11() throws RecognitionException {
+ try {
+ int _type = T__11;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:11:7: ( 'Hello' )
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:11:9: 'Hello'
+ {
+ match("Hello");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__11"
+
+ // $ANTLR start "T__12"
+ public final void mT__12() throws RecognitionException {
+ try {
+ int _type = T__12;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:12:7: ( '!' )
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:12:9: '!'
+ {
+ match('!');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__12"
+
+ // $ANTLR start "RULE_ID"
+ public final void mRULE_ID() throws RecognitionException {
+ try {
+ int _type = RULE_ID;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:152:9: ( ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* )
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:152:11: ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
+ {
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:152:11: ( '^' )?
+ int alt1=2;
+ int LA1_0 = input.LA(1);
+
+ if ( (LA1_0=='^') ) {
+ alt1=1;
+ }
+ switch (alt1) {
+ case 1 :
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:152:11: '^'
+ {
+ match('^');
+
+ }
+ break;
+
+ }
+
+ if ( (input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:152:40: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
+ loop2:
+ do {
+ int alt2=2;
+ int LA2_0 = input.LA(1);
+
+ if ( ((LA2_0>='0' && LA2_0<='9')||(LA2_0>='A' && LA2_0<='Z')||LA2_0=='_'||(LA2_0>='a' && LA2_0<='z')) ) {
+ alt2=1;
+ }
+
+
+ switch (alt2) {
+ case 1 :
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:
+ {
+ if ( (input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+
+ default :
+ break loop2;
+ }
+ } while (true);
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_ID"
+
+ // $ANTLR start "RULE_INT"
+ public final void mRULE_INT() throws RecognitionException {
+ try {
+ int _type = RULE_INT;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:154:10: ( ( '0' .. '9' )+ )
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:154:12: ( '0' .. '9' )+
+ {
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:154:12: ( '0' .. '9' )+
+ int cnt3=0;
+ loop3:
+ do {
+ int alt3=2;
+ int LA3_0 = input.LA(1);
+
+ if ( ((LA3_0>='0' && LA3_0<='9')) ) {
+ alt3=1;
+ }
+
+
+ switch (alt3) {
+ case 1 :
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:154:13: '0' .. '9'
+ {
+ matchRange('0','9');
+
+ }
+ break;
+
+ default :
+ if ( cnt3 >= 1 ) break loop3;
+ EarlyExitException eee =
+ new EarlyExitException(3, input);
+ throw eee;
+ }
+ cnt3++;
+ } while (true);
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_INT"
+
+ // $ANTLR start "RULE_STRING"
+ public final void mRULE_STRING() throws RecognitionException {
+ try {
+ int _type = RULE_STRING;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:156:13: ( ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) )
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:156:15: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
+ {
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:156:15: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
+ int alt6=2;
+ int LA6_0 = input.LA(1);
+
+ if ( (LA6_0=='\"') ) {
+ alt6=1;
+ }
+ else if ( (LA6_0=='\'') ) {
+ alt6=2;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("", 6, 0, input);
+
+ throw nvae;
+ }
+ switch (alt6) {
+ case 1 :
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:156:16: '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"'
+ {
+ match('\"');
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:156:20: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )*
+ loop4:
+ do {
+ int alt4=3;
+ int LA4_0 = input.LA(1);
+
+ if ( (LA4_0=='\\') ) {
+ alt4=1;
+ }
+ else if ( ((LA4_0>='\u0000' && LA4_0<='!')||(LA4_0>='#' && LA4_0<='[')||(LA4_0>=']' && LA4_0<='\uFFFF')) ) {
+ alt4=2;
+ }
+
+
+ switch (alt4) {
+ case 1 :
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:156:21: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' )
+ {
+ match('\\');
+ if ( input.LA(1)=='\"'||input.LA(1)=='\''||input.LA(1)=='\\'||input.LA(1)=='b'||input.LA(1)=='f'||input.LA(1)=='n'||input.LA(1)=='r'||(input.LA(1)>='t' && input.LA(1)<='u') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+ case 2 :
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:156:66: ~ ( ( '\\\\' | '\"' ) )
+ {
+ if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+
+ default :
+ break loop4;
+ }
+ } while (true);
+
+ match('\"');
+
+ }
+ break;
+ case 2 :
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:156:86: '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\''
+ {
+ match('\'');
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:156:91: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )*
+ loop5:
+ do {
+ int alt5=3;
+ int LA5_0 = input.LA(1);
+
+ if ( (LA5_0=='\\') ) {
+ alt5=1;
+ }
+ else if ( ((LA5_0>='\u0000' && LA5_0<='&')||(LA5_0>='(' && LA5_0<='[')||(LA5_0>=']' && LA5_0<='\uFFFF')) ) {
+ alt5=2;
+ }
+
+
+ switch (alt5) {
+ case 1 :
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:156:92: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' )
+ {
+ match('\\');
+ if ( input.LA(1)=='\"'||input.LA(1)=='\''||input.LA(1)=='\\'||input.LA(1)=='b'||input.LA(1)=='f'||input.LA(1)=='n'||input.LA(1)=='r'||(input.LA(1)>='t' && input.LA(1)<='u') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+ case 2 :
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:156:137: ~ ( ( '\\\\' | '\\'' ) )
+ {
+ if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+
+ default :
+ break loop5;
+ }
+ } while (true);
+
+ match('\'');
+
+ }
+ break;
+
+ }
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_STRING"
+
+ // $ANTLR start "RULE_ML_COMMENT"
+ public final void mRULE_ML_COMMENT() throws RecognitionException {
+ try {
+ int _type = RULE_ML_COMMENT;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:158:17: ( '/*' ( options {greedy=false; } : . )* '*/' )
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:158:19: '/*' ( options {greedy=false; } : . )* '*/'
+ {
+ match("/*");
+
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:158:24: ( options {greedy=false; } : . )*
+ loop7:
+ do {
+ int alt7=2;
+ int LA7_0 = input.LA(1);
+
+ if ( (LA7_0=='*') ) {
+ int LA7_1 = input.LA(2);
+
+ if ( (LA7_1=='/') ) {
+ alt7=2;
+ }
+ else if ( ((LA7_1>='\u0000' && LA7_1<='.')||(LA7_1>='0' && LA7_1<='\uFFFF')) ) {
+ alt7=1;
+ }
+
+
+ }
+ else if ( ((LA7_0>='\u0000' && LA7_0<=')')||(LA7_0>='+' && LA7_0<='\uFFFF')) ) {
+ alt7=1;
+ }
+
+
+ switch (alt7) {
+ case 1 :
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:158:52: .
+ {
+ matchAny();
+
+ }
+ break;
+
+ default :
+ break loop7;
+ }
+ } while (true);
+
+ match("*/");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_ML_COMMENT"
+
+ // $ANTLR start "RULE_SL_COMMENT"
+ public final void mRULE_SL_COMMENT() throws RecognitionException {
+ try {
+ int _type = RULE_SL_COMMENT;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:160:17: ( '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:160:19: '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
+ {
+ match("//");
+
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:160:24: (~ ( ( '\\n' | '\\r' ) ) )*
+ loop8:
+ do {
+ int alt8=2;
+ int LA8_0 = input.LA(1);
+
+ if ( ((LA8_0>='\u0000' && LA8_0<='\t')||(LA8_0>='\u000B' && LA8_0<='\f')||(LA8_0>='\u000E' && LA8_0<='\uFFFF')) ) {
+ alt8=1;
+ }
+
+
+ switch (alt8) {
+ case 1 :
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:160:24: ~ ( ( '\\n' | '\\r' ) )
+ {
+ if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFF') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+
+ default :
+ break loop8;
+ }
+ } while (true);
+
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:160:40: ( ( '\\r' )? '\\n' )?
+ int alt10=2;
+ int LA10_0 = input.LA(1);
+
+ if ( (LA10_0=='\n'||LA10_0=='\r') ) {
+ alt10=1;
+ }
+ switch (alt10) {
+ case 1 :
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:160:41: ( '\\r' )? '\\n'
+ {
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:160:41: ( '\\r' )?
+ int alt9=2;
+ int LA9_0 = input.LA(1);
+
+ if ( (LA9_0=='\r') ) {
+ alt9=1;
+ }
+ switch (alt9) {
+ case 1 :
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:160:41: '\\r'
+ {
+ match('\r');
+
+ }
+ break;
+
+ }
+
+ match('\n');
+
+ }
+ break;
+
+ }
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_SL_COMMENT"
+
+ // $ANTLR start "RULE_WS"
+ public final void mRULE_WS() throws RecognitionException {
+ try {
+ int _type = RULE_WS;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:162:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ )
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:162:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
+ {
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:162:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
+ int cnt11=0;
+ loop11:
+ do {
+ int alt11=2;
+ int LA11_0 = input.LA(1);
+
+ if ( ((LA11_0>='\t' && LA11_0<='\n')||LA11_0=='\r'||LA11_0==' ') ) {
+ alt11=1;
+ }
+
+
+ switch (alt11) {
+ case 1 :
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:
+ {
+ if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)=='\r'||input.LA(1)==' ' ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+
+ default :
+ if ( cnt11 >= 1 ) break loop11;
+ EarlyExitException eee =
+ new EarlyExitException(11, input);
+ throw eee;
+ }
+ cnt11++;
+ } while (true);
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_WS"
+
+ // $ANTLR start "RULE_ANY_OTHER"
+ public final void mRULE_ANY_OTHER() throws RecognitionException {
+ try {
+ int _type = RULE_ANY_OTHER;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:164:16: ( . )
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:164:18: .
+ {
+ matchAny();
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_ANY_OTHER"
+
+ public void mTokens() throws RecognitionException {
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:1:8: ( T__11 | T__12 | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER )
+ int alt12=9;
+ alt12 = dfa12.predict(input);
+ switch (alt12) {
+ case 1 :
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:1:10: T__11
+ {
+ mT__11();
+
+ }
+ break;
+ case 2 :
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:1:16: T__12
+ {
+ mT__12();
+
+ }
+ break;
+ case 3 :
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:1:22: RULE_ID
+ {
+ mRULE_ID();
+
+ }
+ break;
+ case 4 :
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:1:30: RULE_INT
+ {
+ mRULE_INT();
+
+ }
+ break;
+ case 5 :
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:1:39: RULE_STRING
+ {
+ mRULE_STRING();
+
+ }
+ break;
+ case 6 :
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:1:51: RULE_ML_COMMENT
+ {
+ mRULE_ML_COMMENT();
+
+ }
+ break;
+ case 7 :
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:1:67: RULE_SL_COMMENT
+ {
+ mRULE_SL_COMMENT();
+
+ }
+ break;
+ case 8 :
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:1:83: RULE_WS
+ {
+ mRULE_WS();
+
+ }
+ break;
+ case 9 :
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:1:91: RULE_ANY_OTHER
+ {
+ mRULE_ANY_OTHER();
+
+ }
+ break;
+
+ }
+
+ }
+
+
+ protected DFA12 dfa12 = new DFA12(this);
+ static final String DFA12_eotS =
+ "\1\uffff\1\14\1\uffff\1\12\2\uffff\3\12\2\uffff\1\14\7\uffff\2\14"+
+ "\1\26\1\uffff";
+ static final String DFA12_eofS =
+ "\27\uffff";
+ static final String DFA12_minS =
+ "\1\0\1\145\1\uffff\1\101\2\uffff\2\0\1\52\2\uffff\1\154\7\uffff"+
+ "\1\154\1\157\1\60\1\uffff";
+ static final String DFA12_maxS =
+ "\1\uffff\1\145\1\uffff\1\172\2\uffff\2\uffff\1\57\2\uffff\1\154"+
+ "\7\uffff\1\154\1\157\1\172\1\uffff";
+ static final String DFA12_acceptS =
+ "\2\uffff\1\2\1\uffff\1\3\1\4\3\uffff\1\10\1\11\1\uffff\1\3\1\2\1"+
+ "\4\1\5\1\6\1\7\1\10\3\uffff\1\1";
+ static final String DFA12_specialS =
+ "\1\0\5\uffff\1\2\1\1\17\uffff}>";
+ static final String[] DFA12_transitionS = {
+ "\11\12\2\11\2\12\1\11\22\12\1\11\1\2\1\6\4\12\1\7\7\12\1\10"+
+ "\12\5\7\12\7\4\1\1\22\4\3\12\1\3\1\4\1\12\32\4\uff85\12",
+ "\1\13",
+ "",
+ "\32\14\4\uffff\1\14\1\uffff\32\14",
+ "",
+ "",
+ "\0\17",
+ "\0\17",
+ "\1\20\4\uffff\1\21",
+ "",
+ "",
+ "\1\23",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "\1\24",
+ "\1\25",
+ "\12\14\7\uffff\32\14\4\uffff\1\14\1\uffff\32\14",
+ ""
+ };
+
+ static final short[] DFA12_eot = DFA.unpackEncodedString(DFA12_eotS);
+ static final short[] DFA12_eof = DFA.unpackEncodedString(DFA12_eofS);
+ static final char[] DFA12_min = DFA.unpackEncodedStringToUnsignedChars(DFA12_minS);
+ static final char[] DFA12_max = DFA.unpackEncodedStringToUnsignedChars(DFA12_maxS);
+ static final short[] DFA12_accept = DFA.unpackEncodedString(DFA12_acceptS);
+ static final short[] DFA12_special = DFA.unpackEncodedString(DFA12_specialS);
+ static final short[][] DFA12_transition;
+
+ static {
+ int numStates = DFA12_transitionS.length;
+ DFA12_transition = new short[numStates][];
+ for (int i=0; i<numStates; i++) {
+ DFA12_transition[i] = DFA.unpackEncodedString(DFA12_transitionS[i]);
+ }
+ }
+
+ class DFA12 extends DFA {
+
+ public DFA12(BaseRecognizer recognizer) {
+ this.recognizer = recognizer;
+ this.decisionNumber = 12;
+ this.eot = DFA12_eot;
+ this.eof = DFA12_eof;
+ this.min = DFA12_min;
+ this.max = DFA12_max;
+ this.accept = DFA12_accept;
+ this.special = DFA12_special;
+ this.transition = DFA12_transition;
+ }
+ public String getDescription() {
+ return "1:1: Tokens : ( T__11 | T__12 | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER );";
+ }
+ public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
+ IntStream input = _input;
+ int _s = s;
+ switch ( s ) {
+ case 0 :
+ int LA12_0 = input.LA(1);
+
+ s = -1;
+ if ( (LA12_0=='H') ) {s = 1;}
+
+ else if ( (LA12_0=='!') ) {s = 2;}
+
+ else if ( (LA12_0=='^') ) {s = 3;}
+
+ else if ( ((LA12_0>='A' && LA12_0<='G')||(LA12_0>='I' && LA12_0<='Z')||LA12_0=='_'||(LA12_0>='a' && LA12_0<='z')) ) {s = 4;}
+
+ else if ( ((LA12_0>='0' && LA12_0<='9')) ) {s = 5;}
+
+ else if ( (LA12_0=='\"') ) {s = 6;}
+
+ else if ( (LA12_0=='\'') ) {s = 7;}
+
+ else if ( (LA12_0=='/') ) {s = 8;}
+
+ else if ( ((LA12_0>='\t' && LA12_0<='\n')||LA12_0=='\r'||LA12_0==' ') ) {s = 9;}
+
+ else if ( ((LA12_0>='\u0000' && LA12_0<='\b')||(LA12_0>='\u000B' && LA12_0<='\f')||(LA12_0>='\u000E' && LA12_0<='\u001F')||(LA12_0>='#' && LA12_0<='&')||(LA12_0>='(' && LA12_0<='.')||(LA12_0>=':' && LA12_0<='@')||(LA12_0>='[' && LA12_0<=']')||LA12_0=='`'||(LA12_0>='{' && LA12_0<='\uFFFF')) ) {s = 10;}
+
+ if ( s>=0 ) return s;
+ break;
+ case 1 :
+ int LA12_7 = input.LA(1);
+
+ s = -1;
+ if ( ((LA12_7>='\u0000' && LA12_7<='\uFFFF')) ) {s = 15;}
+
+ else s = 10;
+
+ if ( s>=0 ) return s;
+ break;
+ case 2 :
+ int LA12_6 = input.LA(1);
+
+ s = -1;
+ if ( ((LA12_6>='\u0000' && LA12_6<='\uFFFF')) ) {s = 15;}
+
+ else s = 10;
+
+ if ( s>=0 ) return s;
+ break;
+ }
+ NoViableAltException nvae =
+ new NoViableAltException(getDescription(), 12, _s, input);
+ error(nvae);
+ throw nvae;
+ }
+ }
+
+
+}
\ No newline at end of file
diff --git a/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDslParser.java b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDslParser.java
new file mode 100644
index 0000000..d735c56
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDslParser.java
@@ -0,0 +1,312 @@
+package org.xtext.example.mydsl.parser.antlr.internal;
+
+import org.eclipse.xtext.*;
+import org.eclipse.xtext.parser.*;
+import org.eclipse.xtext.parser.impl.*;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens;
+import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken;
+import org.xtext.example.mydsl.services.MyDslGrammarAccess;
+
+
+
+import org.antlr.runtime.*;
+import java.util.Stack;
+import java.util.List;
+import java.util.ArrayList;
+
+@SuppressWarnings("all")
+public class InternalMyDslParser extends AbstractInternalAntlrParser {
+ public static final String[] tokenNames = new String[] {
+ "<invalid>", "<EOR>", "<DOWN>", "<UP>", "RULE_ID", "RULE_INT", "RULE_STRING", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS", "RULE_ANY_OTHER", "'Hello'", "'!'"
+ };
+ public static final int RULE_ID=4;
+ public static final int RULE_STRING=6;
+ public static final int T__12=12;
+ public static final int T__11=11;
+ public static final int RULE_ANY_OTHER=10;
+ public static final int RULE_INT=5;
+ public static final int RULE_WS=9;
+ public static final int RULE_SL_COMMENT=8;
+ public static final int EOF=-1;
+ public static final int RULE_ML_COMMENT=7;
+
+ // delegates
+ // delegators
+
+
+ public InternalMyDslParser(TokenStream input) {
+ this(input, new RecognizerSharedState());
+ }
+ public InternalMyDslParser(TokenStream input, RecognizerSharedState state) {
+ super(input, state);
+
+ }
+
+
+ public String[] getTokenNames() { return InternalMyDslParser.tokenNames; }
+ public String getGrammarFileName() { return "../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g"; }
+
+
+
+ private MyDslGrammarAccess grammarAccess;
+
+ public InternalMyDslParser(TokenStream input, MyDslGrammarAccess grammarAccess) {
+ this(input);
+ this.grammarAccess = grammarAccess;
+ registerRules(grammarAccess.getGrammar());
+ }
+
+ @Override
+ protected String getFirstRuleName() {
+ return "Model";
+ }
+
+ @Override
+ protected MyDslGrammarAccess getGrammarAccess() {
+ return grammarAccess;
+ }
+
+
+
+ // $ANTLR start "entryRuleModel"
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:67:1: entryRuleModel returns [EObject current=null] : iv_ruleModel= ruleModel EOF ;
+ public final EObject entryRuleModel() throws RecognitionException {
+ EObject current = null;
+
+ EObject iv_ruleModel = null;
+
+
+ try {
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:68:2: (iv_ruleModel= ruleModel EOF )
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:69:2: iv_ruleModel= ruleModel EOF
+ {
+ newCompositeNode(grammarAccess.getModelRule());
+ pushFollow(FOLLOW_ruleModel_in_entryRuleModel75);
+ iv_ruleModel=ruleModel();
+
+ state._fsp--;
+
+ current =iv_ruleModel;
+ match(input,EOF,FOLLOW_EOF_in_entryRuleModel85);
+
+ }
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "entryRuleModel"
+
+
+ // $ANTLR start "ruleModel"
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:76:1: ruleModel returns [EObject current=null] : ( (lv_greetings_0_0= ruleGreeting ) )* ;
+ public final EObject ruleModel() throws RecognitionException {
+ EObject current = null;
+
+ EObject lv_greetings_0_0 = null;
+
+
+ enterRule();
+
+ try {
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:79:28: ( ( (lv_greetings_0_0= ruleGreeting ) )* )
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:80:1: ( (lv_greetings_0_0= ruleGreeting ) )*
+ {
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:80:1: ( (lv_greetings_0_0= ruleGreeting ) )*
+ loop1:
+ do {
+ int alt1=2;
+ int LA1_0 = input.LA(1);
+
+ if ( (LA1_0==11) ) {
+ alt1=1;
+ }
+
+
+ switch (alt1) {
+ case 1 :
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:81:1: (lv_greetings_0_0= ruleGreeting )
+ {
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:81:1: (lv_greetings_0_0= ruleGreeting )
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:82:3: lv_greetings_0_0= ruleGreeting
+ {
+
+ newCompositeNode(grammarAccess.getModelAccess().getGreetingsGreetingParserRuleCall_0());
+
+ pushFollow(FOLLOW_ruleGreeting_in_ruleModel130);
+ lv_greetings_0_0=ruleGreeting();
+
+ state._fsp--;
+
+
+ if (current==null) {
+ current = createModelElementForParent(grammarAccess.getModelRule());
+ }
+ add(
+ current,
+ "greetings",
+ lv_greetings_0_0,
+ "Greeting");
+ afterParserOrEnumRuleCall();
+
+
+ }
+
+
+ }
+ break;
+
+ default :
+ break loop1;
+ }
+ } while (true);
+
+
+ }
+
+ leaveRule();
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "ruleModel"
+
+
+ // $ANTLR start "entryRuleGreeting"
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:106:1: entryRuleGreeting returns [EObject current=null] : iv_ruleGreeting= ruleGreeting EOF ;
+ public final EObject entryRuleGreeting() throws RecognitionException {
+ EObject current = null;
+
+ EObject iv_ruleGreeting = null;
+
+
+ try {
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:107:2: (iv_ruleGreeting= ruleGreeting EOF )
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:108:2: iv_ruleGreeting= ruleGreeting EOF
+ {
+ newCompositeNode(grammarAccess.getGreetingRule());
+ pushFollow(FOLLOW_ruleGreeting_in_entryRuleGreeting166);
+ iv_ruleGreeting=ruleGreeting();
+
+ state._fsp--;
+
+ current =iv_ruleGreeting;
+ match(input,EOF,FOLLOW_EOF_in_entryRuleGreeting176);
+
+ }
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "entryRuleGreeting"
+
+
+ // $ANTLR start "ruleGreeting"
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:115:1: ruleGreeting returns [EObject current=null] : (otherlv_0= 'Hello' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '!' ) ;
+ public final EObject ruleGreeting() throws RecognitionException {
+ EObject current = null;
+
+ Token otherlv_0=null;
+ Token lv_name_1_0=null;
+ Token otherlv_2=null;
+
+ enterRule();
+
+ try {
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:118:28: ( (otherlv_0= 'Hello' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '!' ) )
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:119:1: (otherlv_0= 'Hello' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '!' )
+ {
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:119:1: (otherlv_0= 'Hello' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '!' )
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:119:3: otherlv_0= 'Hello' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '!'
+ {
+ otherlv_0=(Token)match(input,11,FOLLOW_11_in_ruleGreeting213);
+
+ newLeafNode(otherlv_0, grammarAccess.getGreetingAccess().getHelloKeyword_0());
+
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:123:1: ( (lv_name_1_0= RULE_ID ) )
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:124:1: (lv_name_1_0= RULE_ID )
+ {
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:124:1: (lv_name_1_0= RULE_ID )
+ // ../org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.g:125:3: lv_name_1_0= RULE_ID
+ {
+ lv_name_1_0=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleGreeting230);
+
+ newLeafNode(lv_name_1_0, grammarAccess.getGreetingAccess().getNameIDTerminalRuleCall_1_0());
+
+
+ if (current==null) {
+ current = createModelElement(grammarAccess.getGreetingRule());
+ }
+ setWithLastConsumed(
+ current,
+ "name",
+ lv_name_1_0,
+ "ID");
+
+
+ }
+
+
+ }
+
+ otherlv_2=(Token)match(input,12,FOLLOW_12_in_ruleGreeting247);
+
+ newLeafNode(otherlv_2, grammarAccess.getGreetingAccess().getExclamationMarkKeyword_2());
+
+
+ }
+
+
+ }
+
+ leaveRule();
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "ruleGreeting"
+
+ // Delegated rules
+
+
+
+
+ public static final BitSet FOLLOW_ruleModel_in_entryRuleModel75 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleModel85 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleGreeting_in_ruleModel130 = new BitSet(new long[]{0x0000000000000802L});
+ public static final BitSet FOLLOW_ruleGreeting_in_entryRuleGreeting166 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleGreeting176 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_11_in_ruleGreeting213 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_RULE_ID_in_ruleGreeting230 = new BitSet(new long[]{0x0000000000001000L});
+ public static final BitSet FOLLOW_12_in_ruleGreeting247 = new BitSet(new long[]{0x0000000000000002L});
+
+}
\ No newline at end of file
diff --git a/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/serializer/MyDslSemanticSequencer.java b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/serializer/MyDslSemanticSequencer.java
new file mode 100644
index 0000000..5e0a5c8
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/serializer/MyDslSemanticSequencer.java
@@ -0,0 +1,68 @@
+package org.xtext.example.mydsl.serializer;
+
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.serializer.acceptor.ISemanticSequenceAcceptor;
+import org.eclipse.xtext.serializer.acceptor.SequenceFeeder;
+import org.eclipse.xtext.serializer.diagnostic.ISemanticSequencerDiagnosticProvider;
+import org.eclipse.xtext.serializer.diagnostic.ISerializationDiagnostic.Acceptor;
+import org.eclipse.xtext.serializer.sequencer.AbstractDelegatingSemanticSequencer;
+import org.eclipse.xtext.serializer.sequencer.GenericSequencer;
+import org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider.INodesForEObjectProvider;
+import org.eclipse.xtext.serializer.sequencer.ISemanticSequencer;
+import org.eclipse.xtext.serializer.sequencer.ITransientValueService;
+import org.eclipse.xtext.serializer.sequencer.ITransientValueService.ValueTransient;
+import org.xtext.example.mydsl.myDsl.Greeting;
+import org.xtext.example.mydsl.myDsl.Model;
+import org.xtext.example.mydsl.myDsl.MyDslPackage;
+import org.xtext.example.mydsl.services.MyDslGrammarAccess;
+
+@SuppressWarnings("all")
+public class MyDslSemanticSequencer extends AbstractDelegatingSemanticSequencer {
+
+ @Inject
+ private MyDslGrammarAccess grammarAccess;
+
+ public void createSequence(EObject context, EObject semanticObject) {
+ if(semanticObject.eClass().getEPackage() == MyDslPackage.eINSTANCE) switch(semanticObject.eClass().getClassifierID()) {
+ case MyDslPackage.GREETING:
+ if(context == grammarAccess.getGreetingRule()) {
+ sequence_Greeting(context, (Greeting) semanticObject);
+ return;
+ }
+ else break;
+ case MyDslPackage.MODEL:
+ if(context == grammarAccess.getModelRule()) {
+ sequence_Model(context, (Model) semanticObject);
+ return;
+ }
+ else break;
+ }
+ if (errorAcceptor != null) errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
+ }
+
+ /**
+ * Constraint:
+ * name=ID
+ */
+ protected void sequence_Greeting(EObject context, Greeting semanticObject) {
+ if(errorAcceptor != null) {
+ if(transientValues.isValueTransient(semanticObject, MyDslPackage.Literals.GREETING__NAME) == ValueTransient.YES)
+ errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MyDslPackage.Literals.GREETING__NAME));
+ }
+ INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
+ SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
+ feeder.accept(grammarAccess.getGreetingAccess().getNameIDTerminalRuleCall_1_0(), semanticObject.getName());
+ feeder.finish();
+ }
+
+
+ /**
+ * Constraint:
+ * greetings+=Greeting*
+ */
+ protected void sequence_Model(EObject context, Model semanticObject) {
+ genericSequencer.createSequence(context, semanticObject);
+ }
+}
diff --git a/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/serializer/MyDslSyntacticSequencer.java b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/serializer/MyDslSyntacticSequencer.java
new file mode 100644
index 0000000..181399b
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/serializer/MyDslSyntacticSequencer.java
@@ -0,0 +1,40 @@
+package org.xtext.example.mydsl.serializer;
+
+import com.google.inject.Inject;
+import java.util.List;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.IGrammarAccess;
+import org.eclipse.xtext.RuleCall;
+import org.eclipse.xtext.nodemodel.INode;
+import org.eclipse.xtext.serializer.analysis.GrammarAlias.AbstractElementAlias;
+import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynTransition;
+import org.eclipse.xtext.serializer.sequencer.AbstractSyntacticSequencer;
+import org.xtext.example.mydsl.services.MyDslGrammarAccess;
+
+@SuppressWarnings("all")
+public class MyDslSyntacticSequencer extends AbstractSyntacticSequencer {
+
+ protected MyDslGrammarAccess grammarAccess;
+
+ @Inject
+ protected void init(IGrammarAccess access) {
+ grammarAccess = (MyDslGrammarAccess) access;
+ }
+
+ @Override
+ protected String getUnassignedRuleCallToken(EObject semanticObject, RuleCall ruleCall, INode node) {
+ return "";
+ }
+
+
+ @Override
+ protected void emitUnassignedTokens(EObject semanticObject, ISynTransition transition, INode fromNode, INode toNode) {
+ if (transition.getAmbiguousSyntaxes().isEmpty()) return;
+ List<INode> transitionNodes = collectNodes(fromNode, toNode);
+ for (AbstractElementAlias syntax : transition.getAmbiguousSyntaxes()) {
+ List<INode> syntaxNodes = getNodesFor(transitionNodes, syntax);
+ acceptNodes(getLastNavigableState(), syntaxNodes);
+ }
+ }
+
+}
diff --git a/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/services/MyDslGrammarAccess.java b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/services/MyDslGrammarAccess.java
new file mode 100644
index 0000000..4826514
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/services/MyDslGrammarAccess.java
@@ -0,0 +1,170 @@
+/*
+* generated by Xtext
+*/
+
+package org.xtext.example.mydsl.services;
+
+import com.google.inject.Singleton;
+import com.google.inject.Inject;
+
+import java.util.List;
+
+import org.eclipse.xtext.*;
+import org.eclipse.xtext.service.GrammarProvider;
+import org.eclipse.xtext.service.AbstractElementFinder.*;
+
+import org.eclipse.xtext.common.services.TerminalsGrammarAccess;
+
+@Singleton
+public class MyDslGrammarAccess extends AbstractGrammarElementFinder {
+
+
+ public class ModelElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Model");
+ private final Assignment cGreetingsAssignment = (Assignment)rule.eContents().get(1);
+ private final RuleCall cGreetingsGreetingParserRuleCall_0 = (RuleCall)cGreetingsAssignment.eContents().get(0);
+
+ //Model:
+ // greetings+=Greeting*;
+ public ParserRule getRule() { return rule; }
+
+ //greetings+=Greeting*
+ public Assignment getGreetingsAssignment() { return cGreetingsAssignment; }
+
+ //Greeting
+ public RuleCall getGreetingsGreetingParserRuleCall_0() { return cGreetingsGreetingParserRuleCall_0; }
+ }
+
+ public class GreetingElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Greeting");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Keyword cHelloKeyword_0 = (Keyword)cGroup.eContents().get(0);
+ private final Assignment cNameAssignment_1 = (Assignment)cGroup.eContents().get(1);
+ private final RuleCall cNameIDTerminalRuleCall_1_0 = (RuleCall)cNameAssignment_1.eContents().get(0);
+ private final Keyword cExclamationMarkKeyword_2 = (Keyword)cGroup.eContents().get(2);
+
+ //Greeting:
+ // "Hello" name=ID "!";
+ public ParserRule getRule() { return rule; }
+
+ //"Hello" name=ID "!"
+ public Group getGroup() { return cGroup; }
+
+ //"Hello"
+ public Keyword getHelloKeyword_0() { return cHelloKeyword_0; }
+
+ //name=ID
+ public Assignment getNameAssignment_1() { return cNameAssignment_1; }
+
+ //ID
+ public RuleCall getNameIDTerminalRuleCall_1_0() { return cNameIDTerminalRuleCall_1_0; }
+
+ //"!"
+ public Keyword getExclamationMarkKeyword_2() { return cExclamationMarkKeyword_2; }
+ }
+
+
+ private ModelElements pModel;
+ private GreetingElements pGreeting;
+
+ private final Grammar grammar;
+
+ private TerminalsGrammarAccess gaTerminals;
+
+ @Inject
+ public MyDslGrammarAccess(GrammarProvider grammarProvider,
+ TerminalsGrammarAccess gaTerminals) {
+ this.grammar = internalFindGrammar(grammarProvider);
+ this.gaTerminals = gaTerminals;
+ }
+
+ protected Grammar internalFindGrammar(GrammarProvider grammarProvider) {
+ Grammar grammar = grammarProvider.getGrammar(this);
+ while (grammar != null) {
+ if ("org.xtext.example.mydsl.MyDsl".equals(grammar.getName())) {
+ return grammar;
+ }
+ List<Grammar> grammars = grammar.getUsedGrammars();
+ if (!grammars.isEmpty()) {
+ grammar = grammars.iterator().next();
+ } else {
+ return null;
+ }
+ }
+ return grammar;
+ }
+
+
+ public Grammar getGrammar() {
+ return grammar;
+ }
+
+
+ public TerminalsGrammarAccess getTerminalsGrammarAccess() {
+ return gaTerminals;
+ }
+
+
+ //Model:
+ // greetings+=Greeting*;
+ public ModelElements getModelAccess() {
+ return (pModel != null) ? pModel : (pModel = new ModelElements());
+ }
+
+ public ParserRule getModelRule() {
+ return getModelAccess().getRule();
+ }
+
+ //Greeting:
+ // "Hello" name=ID "!";
+ public GreetingElements getGreetingAccess() {
+ return (pGreeting != null) ? pGreeting : (pGreeting = new GreetingElements());
+ }
+
+ public ParserRule getGreetingRule() {
+ return getGreetingAccess().getRule();
+ }
+
+ //terminal ID:
+ // "^"? ("a".."z" | "A".."Z" | "_") ("a".."z" | "A".."Z" | "_" | "0".."9")*;
+ public TerminalRule getIDRule() {
+ return gaTerminals.getIDRule();
+ }
+
+ //terminal INT returns ecore::EInt:
+ // "0".."9"+;
+ public TerminalRule getINTRule() {
+ return gaTerminals.getINTRule();
+ }
+
+ //terminal STRING:
+ // "\"" ("\\" ("b" | "t" | "n" | "f" | "r" | "u" | "\"" | "\'" | "\\") | !("\\" | "\""))* "\"" | "\'" ("\\" ("b" | "t" |
+ // "n" | "f" | "r" | "u" | "\"" | "\'" | "\\") | !("\\" | "\'"))* "\'";
+ public TerminalRule getSTRINGRule() {
+ return gaTerminals.getSTRINGRule();
+ }
+
+ //terminal ML_COMMENT:
+ // "/ *"->"* /";
+ public TerminalRule getML_COMMENTRule() {
+ return gaTerminals.getML_COMMENTRule();
+ }
+
+ //terminal SL_COMMENT:
+ // "//" !("\n" | "\r")* ("\r"? "\n")?;
+ public TerminalRule getSL_COMMENTRule() {
+ return gaTerminals.getSL_COMMENTRule();
+ }
+
+ //terminal WS:
+ // (" " | "\t" | "\r" | "\n")+;
+ public TerminalRule getWSRule() {
+ return gaTerminals.getWSRule();
+ }
+
+ //terminal ANY_OTHER:
+ // .;
+ public TerminalRule getANY_OTHERRule() {
+ return gaTerminals.getANY_OTHERRule();
+ }
+}
diff --git a/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/validation/AbstractMyDslJavaValidator.java b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/validation/AbstractMyDslJavaValidator.java
new file mode 100644
index 0000000..7a1bb29
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/validation/AbstractMyDslJavaValidator.java
@@ -0,0 +1,18 @@
+package org.xtext.example.mydsl.validation;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.xtext.validation.AbstractDeclarativeValidator;
+
+public class AbstractMyDslJavaValidator extends AbstractDeclarativeValidator {
+
+ @Override
+ protected List<EPackage> getEPackages() {
+ List<EPackage> result = new ArrayList<EPackage>();
+ result.add(org.xtext.example.mydsl.myDsl.MyDslPackage.eINSTANCE);
+ return result;
+ }
+
+}
diff --git a/examples/plugins/org.xtext.example.mydsl/src/org/xtext/example/mydsl/GenerateMyDsl.mwe2 b/examples/plugins/org.xtext.example.mydsl/src/org/xtext/example/mydsl/GenerateMyDsl.mwe2
new file mode 100644
index 0000000..9a6c883
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl/src/org/xtext/example/mydsl/GenerateMyDsl.mwe2
@@ -0,0 +1,139 @@
+module org.xtext.example.mydsl.GenerateMyDsl
+
+import org.eclipse.emf.mwe.utils.*
+import org.eclipse.xtext.generator.*
+import org.eclipse.xtext.ui.generator.*
+
+var grammarURI = "classpath:/org/xtext/example/mydsl/MyDsl.xtext"
+var file.extensions = "mydsl"
+var projectName = "org.xtext.example.mydsl"
+var runtimeProject = "../${projectName}"
+
+Workflow {
+ bean = StandaloneSetup {
+ scanClassPath = true
+ platformUri = "${runtimeProject}/.."
+ // The following two lines can be removed, if Xbase is not used.
+ registerGeneratedEPackage = "org.eclipse.xtext.xbase.XbasePackage"
+ registerGenModelFile = "platform:/resource/org.eclipse.xtext.xbase/model/Xbase.genmodel"
+ }
+
+ component = DirectoryCleaner {
+ directory = "${runtimeProject}/src-gen"
+ }
+
+ component = DirectoryCleaner {
+ directory = "${runtimeProject}.ui/src-gen"
+ }
+
+ component = Generator {
+ pathRtProject = runtimeProject
+ pathUiProject = "${runtimeProject}.ui"
+ pathTestProject = "${runtimeProject}.tests"
+ projectNameRt = projectName
+ projectNameUi = "${projectName}.ui"
+ language = {
+ uri = grammarURI
+ fileExtensions = file.extensions
+
+ // Java API to access grammar elements (required by several other fragments)
+ fragment = grammarAccess.GrammarAccessFragment {}
+
+ // generates Java API for the generated EPackages
+ fragment = ecore.EcoreGeneratorFragment {
+ // referencedGenModels = "
+ // platform:/resource/org.eclipse.xtext.xbase/model/Xbase.genmodel,
+ // platform:/resource/org.eclipse.xtext.common.types/model/JavaVMTypes.genmodel
+ // "
+ }
+
+ // Serializer 2.0
+ fragment = serializer.SerializerFragment {
+ generateStub = false
+ }
+
+ // the serialization component (1.0)
+ // fragment = parseTreeConstructor.ParseTreeConstructorFragment {}
+
+ // a custom ResourceFactory for use with EMF
+ fragment = resourceFactory.ResourceFactoryFragment {
+ fileExtensions = file.extensions
+ }
+
+ // The antlr parser generator fragment.
+ fragment = parser.antlr.XtextAntlrGeneratorFragment {
+ // options = {
+ // backtrack = true
+ // }
+ }
+
+ // java-based API for validation
+ fragment = validation.JavaValidatorFragment {
+ // composedCheck = "org.eclipse.xtext.validation.ImportUriValidator"
+ // composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator"
+ }
+
+ // scoping and exporting API
+ // fragment = scoping.ImportURIScopingFragment {}
+ // fragment = exporting.SimpleNamesFragment {}
+
+ // scoping and exporting API
+ fragment = scoping.ImportNamespacesScopingFragment {}
+ fragment = exporting.QualifiedNamesFragment {}
+ fragment = builder.BuilderIntegrationFragment {}
+
+ // generator API
+ fragment = generator.GeneratorFragment {
+ generateMwe = false
+ generateJavaMain = false
+ }
+
+ // formatter API
+ fragment = formatting.FormatterFragment {}
+
+ // labeling API
+ fragment = labeling.LabelProviderFragment {}
+
+ // outline API
+ fragment = outline.OutlineTreeProviderFragment {}
+ fragment = outline.QuickOutlineFragment {}
+
+ // quickfix API
+ fragment = quickfix.QuickfixProviderFragment {}
+
+ // content assist API
+ fragment = contentAssist.JavaBasedContentAssistFragment {}
+
+ // generates a more lightweight Antlr parser and lexer tailored for content assist
+ fragment = parser.antlr.XtextAntlrUiGeneratorFragment {}
+
+ // generates junit test support classes into Generator#pathTestProject
+ fragment = junit.Junit4Fragment {}
+
+ // project wizard (optional)
+ // fragment = projectWizard.SimpleProjectWizardFragment {
+ // generatorProjectName = "${projectName}"
+ // modelFileExtension = file.extensions
+ // }
+
+ // rename refactoring
+ fragment = refactoring.RefactorElementNameFragment {}
+
+ // provides the necessary bindings for java types integration
+ fragment = types.TypesGeneratorFragment {}
+
+ // generates the required bindings only if the grammar inherits from Xbase
+ fragment = xbase.XbaseGeneratorFragment {}
+
+ // provides a preference page for template proposals
+ fragment = templates.CodetemplatesGeneratorFragment {}
+
+ // provides a compare view
+ fragment = compare.CompareFragment {
+ fileExtensions = file.extensions
+ }
+
+ }
+ }
+}
+
diff --git a/examples/plugins/org.xtext.example.mydsl/src/org/xtext/example/mydsl/MyDsl.xtext b/examples/plugins/org.xtext.example.mydsl/src/org/xtext/example/mydsl/MyDsl.xtext
new file mode 100644
index 0000000..046e930
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl/src/org/xtext/example/mydsl/MyDsl.xtext
@@ -0,0 +1,9 @@
+grammar org.xtext.example.mydsl.MyDsl with org.eclipse.xtext.common.Terminals
+
+generate myDsl "http://www.xtext.org/example/mydsl/MyDsl"
+
+Model:
+ greetings+=Greeting*;
+
+Greeting:
+ 'Hello' name=ID '!';
diff --git a/examples/plugins/org.xtext.example.mydsl/src/org/xtext/example/mydsl/MyDslRuntimeModule.java b/examples/plugins/org.xtext.example.mydsl/src/org/xtext/example/mydsl/MyDslRuntimeModule.java
new file mode 100644
index 0000000..3867acb
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl/src/org/xtext/example/mydsl/MyDslRuntimeModule.java
@@ -0,0 +1,11 @@
+/*
+ * generated by Xtext
+ */
+package org.xtext.example.mydsl;
+
+/**
+ * Use this class to register components to be used at runtime / without the Equinox extension registry.
+ */
+public class MyDslRuntimeModule extends org.xtext.example.mydsl.AbstractMyDslRuntimeModule {
+
+}
diff --git a/examples/plugins/org.xtext.example.mydsl/src/org/xtext/example/mydsl/MyDslStandaloneSetup.java b/examples/plugins/org.xtext.example.mydsl/src/org/xtext/example/mydsl/MyDslStandaloneSetup.java
new file mode 100644
index 0000000..864cb5b
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl/src/org/xtext/example/mydsl/MyDslStandaloneSetup.java
@@ -0,0 +1,14 @@
+
+package org.xtext.example.mydsl;
+
+/**
+ * Initialization support for running Xtext languages
+ * without equinox extension registry
+ */
+public class MyDslStandaloneSetup extends MyDslStandaloneSetupGenerated{
+
+ public static void doSetup() {
+ new MyDslStandaloneSetup().createInjectorAndDoEMFRegistration();
+ }
+}
+
diff --git a/examples/plugins/org.xtext.example.mydsl/src/org/xtext/example/mydsl/formatting/MyDslFormatter.java b/examples/plugins/org.xtext.example.mydsl/src/org/xtext/example/mydsl/formatting/MyDslFormatter.java
new file mode 100644
index 0000000..5f74094
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl/src/org/xtext/example/mydsl/formatting/MyDslFormatter.java
@@ -0,0 +1,27 @@
+/*
+ * generated by Xtext
+ */
+package org.xtext.example.mydsl.formatting;
+
+import org.eclipse.xtext.formatting.impl.AbstractDeclarativeFormatter;
+import org.eclipse.xtext.formatting.impl.FormattingConfig;
+
+/**
+ * This class contains custom formatting description.
+ *
+ * see : http://www.eclipse.org/Xtext/documentation/latest/xtext.html#formatting
+ * on how and when to use it
+ *
+ * Also see {@link org.eclipse.xtext.xtext.XtextFormattingTokenSerializer} as an example
+ */
+public class MyDslFormatter extends AbstractDeclarativeFormatter {
+
+ @Override
+ protected void configureFormatting(FormattingConfig c) {
+// It's usually a good idea to activate the following three statements.
+// They will add and preserve newlines around comments
+// c.setLinewrap(0, 1, 2).before(getGrammarAccess().getSL_COMMENTRule());
+// c.setLinewrap(0, 1, 2).before(getGrammarAccess().getML_COMMENTRule());
+// c.setLinewrap(0, 1, 1).after(getGrammarAccess().getML_COMMENTRule());
+ }
+}
diff --git a/examples/plugins/org.xtext.example.mydsl/src/org/xtext/example/mydsl/generator/MyDslGenerator.xtend b/examples/plugins/org.xtext.example.mydsl/src/org/xtext/example/mydsl/generator/MyDslGenerator.xtend
new file mode 100644
index 0000000..b8abd8f
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl/src/org/xtext/example/mydsl/generator/MyDslGenerator.xtend
@@ -0,0 +1,15 @@
+/*
+ * generated by Xtext
+ */
+package org.xtext.example.mydsl.generator
+
+import org.eclipse.emf.ecore.resource.Resource
+import org.eclipse.xtext.generator.IGenerator
+import org.eclipse.xtext.generator.IFileSystemAccess
+
+class MyDslGenerator implements IGenerator {
+
+ override void doGenerate(Resource resource, IFileSystemAccess fsa) {
+ //TODO implement me
+ }
+}
diff --git a/examples/plugins/org.xtext.example.mydsl/src/org/xtext/example/mydsl/scoping/MyDslScopeProvider.java b/examples/plugins/org.xtext.example.mydsl/src/org/xtext/example/mydsl/scoping/MyDslScopeProvider.java
new file mode 100644
index 0000000..af5c509
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl/src/org/xtext/example/mydsl/scoping/MyDslScopeProvider.java
@@ -0,0 +1,17 @@
+/*
+ * generated by Xtext
+ */
+package org.xtext.example.mydsl.scoping;
+
+import org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider;
+
+/**
+ * This class contains custom scoping description.
+ *
+ * see : http://www.eclipse.org/Xtext/documentation/latest/xtext.html#scoping
+ * on how and when to use it
+ *
+ */
+public class MyDslScopeProvider extends AbstractDeclarativeScopeProvider {
+
+}
diff --git a/examples/plugins/org.xtext.example.mydsl/src/org/xtext/example/mydsl/validation/MyDslJavaValidator.java b/examples/plugins/org.xtext.example.mydsl/src/org/xtext/example/mydsl/validation/MyDslJavaValidator.java
new file mode 100644
index 0000000..ea0ab44
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl/src/org/xtext/example/mydsl/validation/MyDslJavaValidator.java
@@ -0,0 +1,13 @@
+package org.xtext.example.mydsl.validation;
+
+
+public class MyDslJavaValidator extends AbstractMyDslJavaValidator {
+
+// @Check
+// public void checkGreetingStartsWithCapital(Greeting greeting) {
+// if (!Character.isUpperCase(greeting.getName().charAt(0))) {
+// warning("Name should start with a capital", MyDslPackage.Literals.GREETING__NAME);
+// }
+// }
+
+}
diff --git a/examples/plugins/org.xtext.example.mydsl/xtend-gen/org/xtext/example/mydsl/generator/MyDslGenerator.java b/examples/plugins/org.xtext.example.mydsl/xtend-gen/org/xtext/example/mydsl/generator/MyDslGenerator.java
new file mode 100644
index 0000000..ba71c71
--- /dev/null
+++ b/examples/plugins/org.xtext.example.mydsl/xtend-gen/org/xtext/example/mydsl/generator/MyDslGenerator.java
@@ -0,0 +1,11 @@
+package org.xtext.example.mydsl.generator;
+
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.xtext.generator.IFileSystemAccess;
+import org.eclipse.xtext.generator.IGenerator;
+
+@SuppressWarnings("all")
+public class MyDslGenerator implements IGenerator {
+ public void doGenerate(final Resource resource, final IFileSystemAccess fsa) {
+ }
+}
diff --git a/features/org.eclipse.bpel.apache.ode.runtime.feature/feature.xml b/features/org.eclipse.bpel.apache.ode.runtime.feature/feature.xml
index cf9926d..4192c4f 100644
--- a/features/org.eclipse.bpel.apache.ode.runtime.feature/feature.xml
+++ b/features/org.eclipse.bpel.apache.ode.runtime.feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.bpel.apache.ode.runtime.feature"
label="%name"
- version="1.0.1.qualifier"
+ version="1.0.2.qualifier"
provider-name="%providerName">
<description url="http://www.eclipse.org/bpel/">
diff --git a/features/org.eclipse.bpel.apache.ode.runtime.feature/pom.xml b/features/org.eclipse.bpel.apache.ode.runtime.feature/pom.xml
index dffea86..3928370 100644
--- a/features/org.eclipse.bpel.apache.ode.runtime.feature/pom.xml
+++ b/features/org.eclipse.bpel.apache.ode.runtime.feature/pom.xml
@@ -9,6 +9,6 @@
</parent>
<groupId>org.eclipse.bpel.features</groupId>
<artifactId>org.eclipse.bpel.apache.ode.runtime.feature</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
</project>
diff --git a/features/org.eclipse.bpel.common.feature/feature.xml b/features/org.eclipse.bpel.common.feature/feature.xml
index 328cb76..ab44d21 100644
--- a/features/org.eclipse.bpel.common.feature/feature.xml
+++ b/features/org.eclipse.bpel.common.feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.bpel.common.feature"
label="%name"
- version="1.0.1.qualifier"
+ version="1.0.2.qualifier"
provider-name="%providerName">
<description url="http://www.eclipse.org/bpel/">
diff --git a/features/org.eclipse.bpel.common.feature/pom.xml b/features/org.eclipse.bpel.common.feature/pom.xml
index 4b4b3b7..7fe3567 100644
--- a/features/org.eclipse.bpel.common.feature/pom.xml
+++ b/features/org.eclipse.bpel.common.feature/pom.xml
@@ -10,6 +10,6 @@
<groupId>org.eclipse.bpel.features</groupId>
<artifactId>org.eclipse.bpel.common.feature</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
</project>
diff --git a/features/org.eclipse.bpel.feature/feature.xml b/features/org.eclipse.bpel.feature/feature.xml
index 21864d7..6e944ee 100644
--- a/features/org.eclipse.bpel.feature/feature.xml
+++ b/features/org.eclipse.bpel.feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.bpel.feature"
label="%name"
- version="1.0.1.qualifier"
+ version="1.0.2.qualifier"
provider-name="%providerName">
<description url="http://www.eclipse.org/bpel/">
diff --git a/features/org.eclipse.bpel.feature/pom.xml b/features/org.eclipse.bpel.feature/pom.xml
index d4747c6..e18a17a 100644
--- a/features/org.eclipse.bpel.feature/pom.xml
+++ b/features/org.eclipse.bpel.feature/pom.xml
@@ -9,6 +9,6 @@
</parent>
<groupId>org.eclipse.bpel.features</groupId>
<artifactId>org.eclipse.bpel.feature</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
</project>
diff --git a/features/org.eclipse.bpel.jboss.riftsaw.runtime.feature/feature.xml b/features/org.eclipse.bpel.jboss.riftsaw.runtime.feature/feature.xml
index 9f3cdd5..886e88d 100644
--- a/features/org.eclipse.bpel.jboss.riftsaw.runtime.feature/feature.xml
+++ b/features/org.eclipse.bpel.jboss.riftsaw.runtime.feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.bpel.jboss.riftsaw.runtime.feature"
label="%name"
- version="1.0.1.qualifier"
+ version="1.0.2.qualifier"
provider-name="%providerName">
<description url="http://www.eclipse.org/bpel/">
diff --git a/features/org.eclipse.bpel.jboss.riftsaw.runtime.feature/pom.xml b/features/org.eclipse.bpel.jboss.riftsaw.runtime.feature/pom.xml
index 0223721..6f63cc2 100644
--- a/features/org.eclipse.bpel.jboss.riftsaw.runtime.feature/pom.xml
+++ b/features/org.eclipse.bpel.jboss.riftsaw.runtime.feature/pom.xml
@@ -9,6 +9,6 @@
</parent>
<groupId>org.eclipse.bpel.features</groupId>
<artifactId>org.eclipse.bpel.jboss.riftsaw.runtime.feature</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
</project>
diff --git a/features/org.eclipse.bpel.source.feature/feature.xml b/features/org.eclipse.bpel.source.feature/feature.xml
index 3188fb4..40ea581 100644
--- a/features/org.eclipse.bpel.source.feature/feature.xml
+++ b/features/org.eclipse.bpel.source.feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.bpel.source.feature"
label="%name"
- version="1.0.1.qualifier"
+ version="1.0.2.qualifier"
provider-name="%providerName">
<description url="http://www.eclipse.org/bpel/">
diff --git a/features/org.eclipse.bpel.source.feature/pom.xml b/features/org.eclipse.bpel.source.feature/pom.xml
index c6f0205..59cad70 100644
--- a/features/org.eclipse.bpel.source.feature/pom.xml
+++ b/features/org.eclipse.bpel.source.feature/pom.xml
@@ -9,6 +9,6 @@
</parent>
<groupId>org.eclipse.bpel.features</groupId>
<artifactId>org.eclipse.bpel.source.feature</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
</project>
diff --git a/features/pom.xml b/features/pom.xml
index 017e3a1..0ee98cc 100644
--- a/features/pom.xml
+++ b/features/pom.xml
@@ -18,7 +18,7 @@
<module>org.eclipse.bpel.source.feature</module>
<!-- <module>org.eclipse.bpel.tests.feature</module> -->
<module>org.eclipse.bpel.apache.ode.runtime.feature</module>
- <module>org.eclipse.bpel.jboss.riftsaw.runtime.feature</module>
+ <!-- <module>org.eclipse.bpel.jboss.riftsaw.runtime.feature</module> -->
</modules>
</project>
diff --git a/plugins/org.eclipse.bpel.apache.ode.deploy.model/META-INF/MANIFEST.MF b/plugins/org.eclipse.bpel.apache.ode.deploy.model/META-INF/MANIFEST.MF
index 9044001..bcace69 100644
--- a/plugins/org.eclipse.bpel.apache.ode.deploy.model/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.bpel.apache.ode.deploy.model/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.bpel.apache.ode.deploy.model; singleton:=true
-Bundle-Version: 1.0.1.qualifier
+Bundle-Version: 1.0.2.qualifier
Bundle-ClassPath: .
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/plugins/org.eclipse.bpel.apache.ode.deploy.model/pom.xml b/plugins/org.eclipse.bpel.apache.ode.deploy.model/pom.xml
index 54baa5a..2cd305c 100644
--- a/plugins/org.eclipse.bpel.apache.ode.deploy.model/pom.xml
+++ b/plugins/org.eclipse.bpel.apache.ode.deploy.model/pom.xml
@@ -9,7 +9,7 @@
</parent>
<groupId>org.eclipse.bpel.plugins</groupId>
<artifactId>org.eclipse.bpel.apache.ode.deploy.model</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<dependencies>
</dependencies>
diff --git a/plugins/org.eclipse.bpel.apache.ode.deploy.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.bpel.apache.ode.deploy.ui/META-INF/MANIFEST.MF
index ff61a3a..c5dbe6f 100644
--- a/plugins/org.eclipse.bpel.apache.ode.deploy.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.bpel.apache.ode.deploy.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.bpel.apache.ode.deploy.ui; singleton:=true
-Bundle-Version: 1.0.1.qualifier
+Bundle-Version: 1.0.2.qualifier
Bundle-Localization: plugin
Bundle-Activator: org.eclipse.bpel.apache.ode.deploy.ui.Activator
Require-Bundle: org.eclipse.ui;bundle-version="[3.4.0,4.0.0)",
diff --git a/plugins/org.eclipse.bpel.apache.ode.deploy.ui/pom.xml b/plugins/org.eclipse.bpel.apache.ode.deploy.ui/pom.xml
index e557317..94afb6c 100644
--- a/plugins/org.eclipse.bpel.apache.ode.deploy.ui/pom.xml
+++ b/plugins/org.eclipse.bpel.apache.ode.deploy.ui/pom.xml
@@ -9,6 +9,6 @@
</parent>
<groupId>org.eclipse.bpel.plugins</groupId>
<artifactId>org.eclipse.bpel.apache.ode.deploy.ui</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/plugins/org.eclipse.bpel.apache.ode.runtime/META-INF/MANIFEST.MF b/plugins/org.eclipse.bpel.apache.ode.runtime/META-INF/MANIFEST.MF
index 87726be..e1af368 100644
--- a/plugins/org.eclipse.bpel.apache.ode.runtime/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.bpel.apache.ode.runtime/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.bpel.apache.ode.runtime;singleton:=true
-Bundle-Version: 1.0.1.qualifier
+Bundle-Version: 1.0.2.qualifier
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui;bundle-version="[3.4.0,4.0.0)",
diff --git a/plugins/org.eclipse.bpel.apache.ode.runtime/pom.xml b/plugins/org.eclipse.bpel.apache.ode.runtime/pom.xml
index c29af29..237951b 100644
--- a/plugins/org.eclipse.bpel.apache.ode.runtime/pom.xml
+++ b/plugins/org.eclipse.bpel.apache.ode.runtime/pom.xml
@@ -9,6 +9,6 @@
</parent>
<groupId>org.eclipse.bpel.plugins</groupId>
<artifactId>org.eclipse.bpel.apache.ode.runtime</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/plugins/org.eclipse.bpel.cheatsheet/META-INF/MANIFEST.MF b/plugins/org.eclipse.bpel.cheatsheet/META-INF/MANIFEST.MF
index 2f4f34b..8bcbd0d 100644
--- a/plugins/org.eclipse.bpel.cheatsheet/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.bpel.cheatsheet/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %PLUGIN_NAME
Bundle-SymbolicName: org.eclipse.bpel.cheatsheet;singleton:=true
-Bundle-Version: 1.0.1.qualifier
+Bundle-Version: 1.0.2.qualifier
Bundle-Activator: org.eclipse.bpel.cheatsheet.Activator
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
diff --git a/plugins/org.eclipse.bpel.cheatsheet/pom.xml b/plugins/org.eclipse.bpel.cheatsheet/pom.xml
index b7862cb..936021b 100644
--- a/plugins/org.eclipse.bpel.cheatsheet/pom.xml
+++ b/plugins/org.eclipse.bpel.cheatsheet/pom.xml
@@ -9,6 +9,6 @@
</parent>
<groupId>org.eclipse.bpel.plugins</groupId>
<artifactId>org.eclipse.bpel.cheatsheet</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/plugins/org.eclipse.bpel.common.model/META-INF/MANIFEST.MF b/plugins/org.eclipse.bpel.common.model/META-INF/MANIFEST.MF
index aa26760..49f4e7e 100644
--- a/plugins/org.eclipse.bpel.common.model/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.bpel.common.model/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.bpel.common.model; singleton:=true
-Bundle-Version: 1.0.1.qualifier
+Bundle-Version: 1.0.2.qualifier
Bundle-Activator: org.eclipse.bpel.common.extension.model.Activator
Bundle-Localization: plugin
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
diff --git a/plugins/org.eclipse.bpel.common.model/pom.xml b/plugins/org.eclipse.bpel.common.model/pom.xml
index 034375c..ee9d672 100644
--- a/plugins/org.eclipse.bpel.common.model/pom.xml
+++ b/plugins/org.eclipse.bpel.common.model/pom.xml
@@ -9,6 +9,6 @@
</parent>
<groupId>org.eclipse.bpel.plugins</groupId>
<artifactId>org.eclipse.bpel.common.model</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/plugins/org.eclipse.bpel.common.ui.noEmbeddedEditors/META-INF/MANIFEST.MF b/plugins/org.eclipse.bpel.common.ui.noEmbeddedEditors/META-INF/MANIFEST.MF
index d83e597..33014cd 100644
--- a/plugins/org.eclipse.bpel.common.ui.noEmbeddedEditors/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.bpel.common.ui.noEmbeddedEditors/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.bpel.common.ui; singleton:=true
-Bundle-Version: 1.0.1.qualifier
+Bundle-Version: 1.0.2.qualifier
Bundle-Activator: org.eclipse.bpel.common.ui.CommonUIPlugin
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui;bundle-version="[3.4.0,4.0.0)",
diff --git a/plugins/org.eclipse.bpel.common.ui.noEmbeddedEditors/pom.xml b/plugins/org.eclipse.bpel.common.ui.noEmbeddedEditors/pom.xml
index 69c610d..c33e6f3 100644
--- a/plugins/org.eclipse.bpel.common.ui.noEmbeddedEditors/pom.xml
+++ b/plugins/org.eclipse.bpel.common.ui.noEmbeddedEditors/pom.xml
@@ -9,6 +9,6 @@
</parent>
<groupId>org.eclipse.bpel.plugins</groupId>
<artifactId>org.eclipse.bpel.common.ui</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/plugins/org.eclipse.bpel.common.ui.noEmbeddedEditors/schema/paletteAdditions.exsd b/plugins/org.eclipse.bpel.common.ui.noEmbeddedEditors/schema/paletteAdditions.exsd
index 17927e1..1536423 100644
--- a/plugins/org.eclipse.bpel.common.ui.noEmbeddedEditors/schema/paletteAdditions.exsd
+++ b/plugins/org.eclipse.bpel.common.ui.noEmbeddedEditors/schema/paletteAdditions.exsd
@@ -3,7 +3,7 @@
<schema targetNamespace="org.eclipse.bpel.common.ui">
<annotation>
<appInfo>
- <meta.schema plugin="org.eclipse.bpel.common.ui" id="paletteAdditions" name="Palette Additions"/>
+ <meta.schema plugin="org.eclipse.bpel.common.ui" id="org.eclipse.bpel.common.ui.paletteAdditions" name="Palette Additions"/>
</appInfo>
<documentation>
This exension point allows for contributing BPEL pallette items. You can either create an individual addition for each palette element or you can create a bulk addition by specifying a palette provider.
diff --git a/plugins/org.eclipse.bpel.common.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.bpel.common.ui/META-INF/MANIFEST.MF
index 64b55bd..fb5c72f 100644
--- a/plugins/org.eclipse.bpel.common.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.bpel.common.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.bpel.common.ui; singleton:=true
-Bundle-Version: 1.0.1.qualifier
+Bundle-Version: 1.0.2.qualifier
Bundle-Activator: org.eclipse.bpel.common.ui.CommonUIPlugin
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui;bundle-version="[3.4.0,4.0.0)",
diff --git a/plugins/org.eclipse.bpel.common.ui/pom.xml b/plugins/org.eclipse.bpel.common.ui/pom.xml
index 69c610d..c33e6f3 100644
--- a/plugins/org.eclipse.bpel.common.ui/pom.xml
+++ b/plugins/org.eclipse.bpel.common.ui/pom.xml
@@ -9,6 +9,6 @@
</parent>
<groupId>org.eclipse.bpel.plugins</groupId>
<artifactId>org.eclipse.bpel.common.ui</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/plugins/org.eclipse.bpel.common.wsdl/META-INF/MANIFEST.MF b/plugins/org.eclipse.bpel.common.wsdl/META-INF/MANIFEST.MF
index 2c8f1ec..61522c2 100644
--- a/plugins/org.eclipse.bpel.common.wsdl/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.bpel.common.wsdl/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.bpel.common.wsdl;singleton:=true
-Bundle-Version: 1.0.1.qualifier
+Bundle-Version: 1.0.2.qualifier
Bundle-Activator: org.eclipse.bpel.common.wsdl.SoaWsdlCommonPlugin
Bundle-Vendor: %providerName
Require-Bundle: org.eclipse.ui,
diff --git a/plugins/org.eclipse.bpel.common.wsdl/pom.xml b/plugins/org.eclipse.bpel.common.wsdl/pom.xml
index 41cf856..31d1fee 100644
--- a/plugins/org.eclipse.bpel.common.wsdl/pom.xml
+++ b/plugins/org.eclipse.bpel.common.wsdl/pom.xml
@@ -9,6 +9,6 @@
</parent>
<groupId>org.eclipse.bpel.plugins</groupId>
<artifactId>org.eclipse.bpel.common.wsdl</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/plugins/org.eclipse.bpel.compare.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.bpel.compare.ui/META-INF/MANIFEST.MF
index 2d760c3..b520c7b 100644
--- a/plugins/org.eclipse.bpel.compare.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.bpel.compare.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.bpel.compare.ui;singleton:=true
-Bundle-Version: 1.0.1.qualifier
+Bundle-Version: 1.0.2.qualifier
Bundle-Activator: org.eclipse.bpel.compare.ui.Activator
Require-Bundle: org.eclipse.ui;bundle-version="[3.5.0,4.0.0)",
org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
diff --git a/plugins/org.eclipse.bpel.compare.ui/pom.xml b/plugins/org.eclipse.bpel.compare.ui/pom.xml
index 086a7dc..3381916 100644
--- a/plugins/org.eclipse.bpel.compare.ui/pom.xml
+++ b/plugins/org.eclipse.bpel.compare.ui/pom.xml
@@ -9,6 +9,6 @@
</parent>
<groupId>org.eclipse.bpel.plugins</groupId>
<artifactId>org.eclipse.bpel.compare.ui</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/plugins/org.eclipse.bpel.examples.extensionPoints.noEmbeddedEditors/META-INF/MANIFEST.MF b/plugins/org.eclipse.bpel.examples.extensionPoints.noEmbeddedEditors/META-INF/MANIFEST.MF
index f514ad7..291e9f1 100644
--- a/plugins/org.eclipse.bpel.examples.extensionPoints.noEmbeddedEditors/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.bpel.examples.extensionPoints.noEmbeddedEditors/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.bpel.examples.extensionPoints;singleton:=true
-Bundle-Version: 1.0.1.qualifier
+Bundle-Version: 1.0.2.qualifier
Bundle-Activator: org.eclipse.bpel.examples.extensionpoints.Activator
Bundle-Vendor: %providerName
Require-Bundle: org.eclipse.ui;bundle-version="3.3.0",
diff --git a/plugins/org.eclipse.bpel.examples.extensionPoints.noEmbeddedEditors/pom.xml b/plugins/org.eclipse.bpel.examples.extensionPoints.noEmbeddedEditors/pom.xml
index f8e32a3..34316a2 100644
--- a/plugins/org.eclipse.bpel.examples.extensionPoints.noEmbeddedEditors/pom.xml
+++ b/plugins/org.eclipse.bpel.examples.extensionPoints.noEmbeddedEditors/pom.xml
@@ -9,6 +9,6 @@
</parent>
<groupId>org.eclipse.bpel.plugins</groupId>
<artifactId>org.eclipse.bpel.examples.extensionPoints</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/plugins/org.eclipse.bpel.examples.extensionPoints/META-INF/MANIFEST.MF b/plugins/org.eclipse.bpel.examples.extensionPoints/META-INF/MANIFEST.MF
index 696796d..33f18d3 100644
--- a/plugins/org.eclipse.bpel.examples.extensionPoints/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.bpel.examples.extensionPoints/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.bpel.examples.extensionPoints;singleton:=true
-Bundle-Version: 1.0.1.qualifier
+Bundle-Version: 1.0.2.qualifier
Bundle-Activator: org.eclipse.bpel.examples.extensionpoints.Activator
Bundle-Vendor: %providerName
Require-Bundle: org.eclipse.ui;bundle-version="3.3.0",
diff --git a/plugins/org.eclipse.bpel.examples.extensionPoints/pom.xml b/plugins/org.eclipse.bpel.examples.extensionPoints/pom.xml
index f8e32a3..34316a2 100644
--- a/plugins/org.eclipse.bpel.examples.extensionPoints/pom.xml
+++ b/plugins/org.eclipse.bpel.examples.extensionPoints/pom.xml
@@ -9,6 +9,6 @@
</parent>
<groupId>org.eclipse.bpel.plugins</groupId>
<artifactId>org.eclipse.bpel.examples.extensionPoints</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/plugins/org.eclipse.bpel.help/META-INF/MANIFEST.MF b/plugins/org.eclipse.bpel.help/META-INF/MANIFEST.MF
index 03ef0f3..1385040 100644
--- a/plugins/org.eclipse.bpel.help/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.bpel.help/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.bpel.help;singleton:=true
-Bundle-Version: 1.0.1.qualifier
+Bundle-Version: 1.0.2.qualifier
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Require-Bundle: org.eclipse.help
diff --git a/plugins/org.eclipse.bpel.help/pom.xml b/plugins/org.eclipse.bpel.help/pom.xml
index 4c5b76e..1b22776 100644
--- a/plugins/org.eclipse.bpel.help/pom.xml
+++ b/plugins/org.eclipse.bpel.help/pom.xml
@@ -9,6 +9,6 @@
</parent>
<groupId>org.eclipse.bpel.plugins</groupId>
<artifactId>org.eclipse.bpel.help</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/META-INF/MANIFEST.MF b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/META-INF/MANIFEST.MF
index d3fcd19..db3d63b 100644
--- a/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.bpel.jboss.riftsaw.runtime;singleton:=true
-Bundle-Version: 1.0.1.qualifier
+Bundle-Version: 1.0.2.qualifier
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui;bundle-version="[3.4.0,4.0.0)",
diff --git a/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/pom.xml b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/pom.xml
index 8abaee6..d0fb518 100644
--- a/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/pom.xml
+++ b/plugins/org.eclipse.bpel.jboss.riftsaw.runtime/pom.xml
@@ -9,6 +9,6 @@
</parent>
<groupId>org.eclipse.bpel.plugins</groupId>
<artifactId>org.eclipse.bpel.jboss.riftsaw.runtime</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/plugins/org.eclipse.bpel.model/META-INF/MANIFEST.MF b/plugins/org.eclipse.bpel.model/META-INF/MANIFEST.MF
index fe8ccf2..2ccbdf9 100644
--- a/plugins/org.eclipse.bpel.model/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.bpel.model/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.bpel.model; singleton:=true
-Bundle-Version: 1.0.1.qualifier
+Bundle-Version: 1.0.2.qualifier
Bundle-Activator: org.eclipse.bpel.model.BPELPlugin$Implementation
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/plugins/org.eclipse.bpel.model/pom.xml b/plugins/org.eclipse.bpel.model/pom.xml
index cd7d47d..a824aed 100644
--- a/plugins/org.eclipse.bpel.model/pom.xml
+++ b/plugins/org.eclipse.bpel.model/pom.xml
@@ -9,6 +9,6 @@
</parent>
<groupId>org.eclipse.bpel.plugins</groupId>
<artifactId>org.eclipse.bpel.model</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/plugins/org.eclipse.bpel.runtimes/META-INF/MANIFEST.MF b/plugins/org.eclipse.bpel.runtimes/META-INF/MANIFEST.MF
index 604bd76..632bfee 100644
--- a/plugins/org.eclipse.bpel.runtimes/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.bpel.runtimes/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.bpel.runtimes; singleton:=true
-Bundle-Version: 1.0.1.qualifier
+Bundle-Version: 1.0.2.qualifier
Bundle-Activator: org.eclipse.bpel.runtimes.RuntimesPlugin
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui;bundle-version="[3.4.0,4.0.0)",
diff --git a/plugins/org.eclipse.bpel.runtimes/pom.xml b/plugins/org.eclipse.bpel.runtimes/pom.xml
index aece468..8024636 100644
--- a/plugins/org.eclipse.bpel.runtimes/pom.xml
+++ b/plugins/org.eclipse.bpel.runtimes/pom.xml
@@ -9,6 +9,6 @@
</parent>
<groupId>org.eclipse.bpel.plugins</groupId>
<artifactId>org.eclipse.bpel.runtimes</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/plugins/org.eclipse.bpel.ui.noEmbeddedEditors/META-INF/MANIFEST.MF b/plugins/org.eclipse.bpel.ui.noEmbeddedEditors/META-INF/MANIFEST.MF
index 679428a..4f7d524 100644
--- a/plugins/org.eclipse.bpel.ui.noEmbeddedEditors/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.bpel.ui.noEmbeddedEditors/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.bpel.ui; singleton:=true
-Bundle-Version: 1.0.1.qualifier
+Bundle-Version: 1.0.2.qualifier
Bundle-Activator: org.eclipse.bpel.ui.BPELUIPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/plugins/org.eclipse.bpel.ui.noEmbeddedEditors/pom.xml b/plugins/org.eclipse.bpel.ui.noEmbeddedEditors/pom.xml
index cda2ce7..78e6e6e 100644
--- a/plugins/org.eclipse.bpel.ui.noEmbeddedEditors/pom.xml
+++ b/plugins/org.eclipse.bpel.ui.noEmbeddedEditors/pom.xml
@@ -9,6 +9,6 @@
</parent>
<groupId>org.eclipse.bpel.plugins</groupId>
<artifactId>org.eclipse.bpel.ui</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/plugins/org.eclipse.bpel.ui.xtext/.classpath b/plugins/org.eclipse.bpel.ui.xtext/.classpath
new file mode 100644
index 0000000..ad32c83
--- /dev/null
+++ b/plugins/org.eclipse.bpel.ui.xtext/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.bpel.ui.xtext/.project b/plugins/org.eclipse.bpel.ui.xtext/.project
new file mode 100644
index 0000000..0eb73ee
--- /dev/null
+++ b/plugins/org.eclipse.bpel.ui.xtext/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.bpel.ui.xtext</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.bpel.ui.xtext/META-INF/MANIFEST.MF b/plugins/org.eclipse.bpel.ui.xtext/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..2741ad1
--- /dev/null
+++ b/plugins/org.eclipse.bpel.ui.xtext/META-INF/MANIFEST.MF
@@ -0,0 +1,17 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Xtext Embeddable Editor in Bpel Designer
+Bundle-SymbolicName: org.eclipse.bpel.ui.xtext
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.bpel.ui.xtext.Activator
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.xtext.ui;bundle-version="2.3.0";visibility:=reexport,
+ org.eclipse.bpel.ui;bundle-version="1.0.1";visibility:=reexport,
+ org.eclipse.bpel.model;bundle-version="1.0.1";visibility:=reexport,
+ org.eclipse.ui.views.properties.tabbed;bundle-version="3.5.300";visibility:=reexport,
+ org.eclipse.gef;visibility:=reexport,
+ org.eclipse.bpel.common.ui;bundle-version="1.0.1";visibility:=reexport
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Export-Package: org.eclipse.bpel.ui.properties.xtext
+Bundle-Vendor: Lorenzo Bettini
diff --git a/plugins/org.eclipse.bpel.ui.xtext/build.properties b/plugins/org.eclipse.bpel.ui.xtext/build.properties
new file mode 100644
index 0000000..34d2e4d
--- /dev/null
+++ b/plugins/org.eclipse.bpel.ui.xtext/build.properties
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
diff --git a/plugins/org.eclipse.bpel.ui.xtext/src/org/eclipse/bpel/ui/properties/xtext/AbstractXtextExpressionAssignCategory.java b/plugins/org.eclipse.bpel.ui.xtext/src/org/eclipse/bpel/ui/properties/xtext/AbstractXtextExpressionAssignCategory.java
new file mode 100644
index 0000000..a58c811
--- /dev/null
+++ b/plugins/org.eclipse.bpel.ui.xtext/src/org/eclipse/bpel/ui/properties/xtext/AbstractXtextExpressionAssignCategory.java
@@ -0,0 +1,74 @@
+package org.eclipse.bpel.ui.properties.xtext;
+
+import org.eclipse.bpel.ui.properties.AbstractExpressionAssignCategory;
+import org.eclipse.bpel.ui.properties.IAssignCategory;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.xtext.ui.editor.XtextSourceViewer;
+import org.eclipse.xtext.ui.editor.embedded.EmbeddedEditor;
+
+import com.google.inject.Injector;
+
+/**
+ * An {@link IAssignCategory} specialized to provide a StyledText configured for
+ * an Xtext DSL, relying on {@link EmbeddedEditor} which is NOT an editor, but
+ * provides a {@link XtextSourceViewer}.
+ *
+ * @author Lorenzo Bettini
+ *
+ */
+@SuppressWarnings("restriction")
+public abstract class AbstractXtextExpressionAssignCategory extends
+ AbstractExpressionAssignCategory implements IAssignCategory {
+
+ /**
+ * @param styledTextComposite
+ * the Composite for the StyledText
+ * @return the created and configured StyledText based on an
+ * {@link EmbeddedEditor}
+ */
+ protected StyledText createStyledText(Composite styledTextComposite) {
+ Composite editor = getWidgetFactory().createComposite(this.fEditorArea,
+ SWT.BORDER);
+ editor.setLayout(new GridLayout());
+
+ GridData layoutData = new GridData(GridData.FILL_BOTH);
+ editor.setLayoutData(layoutData);
+
+ EmbeddedEditor embeddedEditor = getInjector().getInstance(
+ XtextEmbeddedEditorProvider.class).getXtextEmbeddedEditor(
+ editor);
+ final ISourceViewer viewer = embeddedEditor.getViewer();
+ StyledText textWidget = viewer.getTextWidget();
+ // textWidget.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ return textWidget;
+ }
+
+ /**
+ * This must redefined so to return the {@link Injector} for your own Xtext
+ * DSL.
+ *
+ * You can get the injector from the Activator generated by Xtext for your
+ * DSL in the ui plugin, for instance
+ *
+ * <pre>
+ * org.xtext.example.mydsl.ui.internal.MyDslActivator.getInstance().getInjector(
+ * MyDslActivator.ORG_XTEXT_EXAMPLE_MYDSL_MYDSL);
+ * </pre>
+ *
+ * @return
+ */
+ public abstract Injector getInjector();
+
+ /**
+ * A string to identify your DSL.
+ *
+ * @see org.eclipse.bpel.ui.properties.AbstractExpressionAssignCategory#getExpressionLanguage()
+ */
+ public abstract String getExpressionLanguage();
+}
diff --git a/plugins/org.eclipse.bpel.ui.xtext/src/org/eclipse/bpel/ui/properties/xtext/XtextEmbeddedEditorProvider.java b/plugins/org.eclipse.bpel.ui.xtext/src/org/eclipse/bpel/ui/properties/xtext/XtextEmbeddedEditorProvider.java
new file mode 100644
index 0000000..3cbabd0
--- /dev/null
+++ b/plugins/org.eclipse.bpel.ui.xtext/src/org/eclipse/bpel/ui/properties/xtext/XtextEmbeddedEditorProvider.java
@@ -0,0 +1,81 @@
+package org.eclipse.bpel.ui.properties.xtext;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.xtext.Constants;
+import org.eclipse.xtext.resource.XtextResource;
+import org.eclipse.xtext.resource.XtextResourceFactory;
+import org.eclipse.xtext.resource.XtextResourceSet;
+import org.eclipse.xtext.ui.editor.embedded.EmbeddedEditor;
+import org.eclipse.xtext.ui.editor.embedded.EmbeddedEditorFactory;
+import org.eclipse.xtext.ui.editor.embedded.IEditedResourceProvider;
+
+import com.google.inject.Inject;
+import com.google.inject.Injector;
+import com.google.inject.Provider;
+import com.google.inject.name.Named;
+
+/**
+ * The provider for creating the Xtext {@link EmbeddedEditor}, this class must
+ * be instantiated through an {@link Injector}.
+ *
+ * @author Lorenzo Bettini
+ *
+ */
+@SuppressWarnings("restriction")
+public class XtextEmbeddedEditorProvider {
+
+ @Inject
+ protected EmbeddedEditorFactory editorFactory;
+
+ @Inject
+ private Provider<XtextResourceSet> resourceSetProvider;
+
+ @Inject
+ private XtextResourceFactory resourceFactory;
+
+ @Inject
+ @Named(Constants.FILE_EXTENSIONS)
+ public String fileExtension;
+
+ /**
+ * The constructor.
+ */
+ public XtextEmbeddedEditorProvider() {
+ }
+
+ public EmbeddedEditor getXtextEmbeddedEditor(Composite parent) {
+ IEditedResourceProvider resourceProvider = new IEditedResourceProvider() {
+
+ @Override
+ public XtextResource createResource() {
+ XtextResourceSet xtextResourceSet = resourceSetProvider.get();
+ Resource resource = resourceFactory
+ .createResource(computeUnusedUri(xtextResourceSet));
+ xtextResourceSet.getResources().add(resource);
+ return (XtextResource) resource;
+ }
+
+ protected URI computeUnusedUri(ResourceSet resourceSet) {
+ String name = "__synthetic";
+ for (int i = 0; i < Integer.MAX_VALUE; i++) {
+ URI syntheticUri = URI.createURI(name + i + "."
+ + fileExtension);
+ if (resourceSet.getResource(syntheticUri, false) == null)
+ return syntheticUri;
+ }
+ throw new IllegalStateException();
+ }
+ };
+
+ EmbeddedEditor editor = editorFactory.newEditor(resourceProvider)
+ .showErrorAndWarningAnnotations().withParent(parent);
+
+ editor.createPartialEditor(true);
+
+ return editor;
+ }
+
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.bpel.ui.xtext/src/org/eclipse/bpel/ui/xtext/Activator.java b/plugins/org.eclipse.bpel.ui.xtext/src/org/eclipse/bpel/ui/xtext/Activator.java
new file mode 100644
index 0000000..a1ba176
--- /dev/null
+++ b/plugins/org.eclipse.bpel.ui.xtext/src/org/eclipse/bpel/ui/xtext/Activator.java
@@ -0,0 +1,30 @@
+package org.eclipse.bpel.ui.xtext;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class Activator implements BundleActivator {
+
+ private static BundleContext context;
+
+ static BundleContext getContext() {
+ return context;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext bundleContext) throws Exception {
+ Activator.context = bundleContext;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext bundleContext) throws Exception {
+ Activator.context = null;
+ }
+
+}
diff --git a/plugins/org.eclipse.bpel.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.bpel.ui/META-INF/MANIFEST.MF
index c95d4ab..214eed1 100644
--- a/plugins/org.eclipse.bpel.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.bpel.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.bpel.ui; singleton:=true
-Bundle-Version: 1.0.1.qualifier
+Bundle-Version: 1.0.2.qualifier
Bundle-Activator: org.eclipse.bpel.ui.BPELUIPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/plugins/org.eclipse.bpel.ui/pom.xml b/plugins/org.eclipse.bpel.ui/pom.xml
index cda2ce7..78e6e6e 100644
--- a/plugins/org.eclipse.bpel.ui/pom.xml
+++ b/plugins/org.eclipse.bpel.ui/pom.xml
@@ -9,6 +9,6 @@
</parent>
<groupId>org.eclipse.bpel.plugins</groupId>
<artifactId>org.eclipse.bpel.ui</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/plugins/org.eclipse.bpel.validator.junit/pom.xml b/plugins/org.eclipse.bpel.validator.junit/pom.xml
index 5310260..21455e7 100644
--- a/plugins/org.eclipse.bpel.validator.junit/pom.xml
+++ b/plugins/org.eclipse.bpel.validator.junit/pom.xml
@@ -9,6 +9,6 @@
</parent>
<groupId>org.eclipse.bpel.plugins</groupId>
<artifactId>org.eclipse.bpel.validator.junit</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/plugins/org.eclipse.bpel.validator/META-INF/MANIFEST.MF b/plugins/org.eclipse.bpel.validator/META-INF/MANIFEST.MF
index cdc54b5..a193cfc 100644
--- a/plugins/org.eclipse.bpel.validator/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.bpel.validator/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.bpel.validator;singleton:=true
-Bundle-Version: 1.0.1.qualifier
+Bundle-Version: 1.0.2.qualifier
Bundle-Activator: org.eclipse.bpel.validator.Activator
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/plugins/org.eclipse.bpel.validator/pom.xml b/plugins/org.eclipse.bpel.validator/pom.xml
index c43ef9f..060e473 100644
--- a/plugins/org.eclipse.bpel.validator/pom.xml
+++ b/plugins/org.eclipse.bpel.validator/pom.xml
@@ -9,6 +9,6 @@
</parent>
<groupId>org.eclipse.bpel.plugins</groupId>
<artifactId>org.eclipse.bpel.validator</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/plugins/org.eclipse.bpel.wsil.model/META-INF/MANIFEST.MF b/plugins/org.eclipse.bpel.wsil.model/META-INF/MANIFEST.MF
index 664523d..281e92f 100644
--- a/plugins/org.eclipse.bpel.wsil.model/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.bpel.wsil.model/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.bpel.wsil.model; singleton:=true
-Bundle-Version: 1.0.1.qualifier
+Bundle-Version: 1.0.2.qualifier
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Export-Package: org.eclipse.bpel.wsil.model.inspection;uses:="org.eclipse.emf.ecore.util,org.eclipse.emf.ecore,org.eclipse.emf.common.util",
diff --git a/plugins/org.eclipse.bpel.wsil.model/pom.xml b/plugins/org.eclipse.bpel.wsil.model/pom.xml
index 1c51fd5..caaf1cc 100644
--- a/plugins/org.eclipse.bpel.wsil.model/pom.xml
+++ b/plugins/org.eclipse.bpel.wsil.model/pom.xml
@@ -9,6 +9,6 @@
</parent>
<groupId>org.eclipse.bpelins</groupId>
<artifactId>org.eclipse.bpel.wsil.model</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/plugins/org.eclipse.bpel.xpath10.junit/META-INF/MANIFEST.MF b/plugins/org.eclipse.bpel.xpath10.junit/META-INF/MANIFEST.MF
index bdf6dd3..5c70bde 100644
--- a/plugins/org.eclipse.bpel.xpath10.junit/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.bpel.xpath10.junit/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.bpel.xpath10.junit
-Bundle-Version: 1.0.1.qualifier
+Bundle-Version: 1.0.2.qualifier
Fragment-Host: org.eclipse.bpel.xpath10;bundle-version="1.0.1"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.junit;bundle-version="4.8.1"
diff --git a/plugins/org.eclipse.bpel.xpath10.junit/pom.xml b/plugins/org.eclipse.bpel.xpath10.junit/pom.xml
index 55faf45..b5ca354 100644
--- a/plugins/org.eclipse.bpel.xpath10.junit/pom.xml
+++ b/plugins/org.eclipse.bpel.xpath10.junit/pom.xml
@@ -9,6 +9,6 @@
</parent>
<groupId>org.eclipse.bpel.plugins</groupId>
<artifactId>org.eclipse.bpel.xpath10.junit</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/plugins/org.eclipse.bpel.xpath10/META-INF/MANIFEST.MF b/plugins/org.eclipse.bpel.xpath10/META-INF/MANIFEST.MF
index 6068305..5d68398 100644
--- a/plugins/org.eclipse.bpel.xpath10/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.bpel.xpath10/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.bpel.xpath10
-Bundle-Version: 1.0.1.qualifier
+Bundle-Version: 1.0.2.qualifier
Bundle-Localization: plugin
Bundle-ClassPath: .,
lib/antlr-runtime-3.0.1.jar
diff --git a/plugins/org.eclipse.bpel.xpath10/pom.xml b/plugins/org.eclipse.bpel.xpath10/pom.xml
index ab2dd71..3ae306a 100644
--- a/plugins/org.eclipse.bpel.xpath10/pom.xml
+++ b/plugins/org.eclipse.bpel.xpath10/pom.xml
@@ -9,6 +9,6 @@
</parent>
<groupId>org.eclipse.bpelins</groupId>
<artifactId>org.eclipse.bpel.xpath10</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/plugins/pom.xml b/plugins/pom.xml
index 595e489..dafc7a3 100644
--- a/plugins/pom.xml
+++ b/plugins/pom.xml
@@ -34,7 +34,6 @@
<module>org.eclipse.bpel.common.model</module>
<module>org.eclipse.bpel.common.ui</module>
<module>org.eclipse.bpel.common.wsdl</module>
- <module>org.eclipse.bpel.jboss.riftsaw.runtime</module>
<module>org.eclipse.bpel.model</module>
<module>org.eclipse.bpel.runtimes</module>
<module>org.eclipse.bpel.ui</module>
@@ -63,7 +62,6 @@
<module>org.eclipse.bpel.common.model</module>
<module>org.eclipse.bpel.common.ui</module>
<module>org.eclipse.bpel.common.wsdl</module>
- <module>org.eclipse.bpel.jboss.riftsaw.runtime</module>
<module>org.eclipse.bpel.model</module>
<module>org.eclipse.bpel.runtimes</module>
<module>org.eclipse.bpel.ui</module>
@@ -92,7 +90,6 @@
<module>org.eclipse.bpel.common.model</module>
<module>org.eclipse.bpel.common.ui.noEmbeddedEditors</module>
<module>org.eclipse.bpel.common.wsdl</module>
- <module>org.eclipse.bpel.jboss.riftsaw.runtime</module>
<module>org.eclipse.bpel.model</module>
<module>org.eclipse.bpel.runtimes</module>
<module>org.eclipse.bpel.ui.noEmbeddedEditors</module>
diff --git a/site/category.xml b/site/category.xml
index dd107de..e3b3067 100644
--- a/site/category.xml
+++ b/site/category.xml
@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<site>
- <feature url="features/org.eclipse.bpel.apache.ode.runtime.feature_1.0.1.qualifier.jar" id="org.eclipse.bpel.apache.ode.runtime.feature" version="1.0.1.qualifier">
+ <feature url="features/org.eclipse.bpel.apache.ode.runtime.feature_1.0.2.qualifier.jar" id="org.eclipse.bpel.apache.ode.runtime.feature" version="1.0.2.qualifier">
<category name="Eclipse BPEL Designer"/>
</feature>
- <feature url="features/org.eclipse.bpel.feature_1.0.1.qualifier.jar" id="org.eclipse.bpel.feature" version="1.0.1.qualifier">
+ <feature url="features/org.eclipse.bpel.feature_1.0.2.qualifier.jar" id="org.eclipse.bpel.feature" version="1.0.2.qualifier">
<category name="Eclipse BPEL Designer"/>
</feature>
<!-- Removed for now because it conflicts with jboss tools' own deployment plugin for Riftsaw.
This was only intended as an additional example deployer anyway, which was more-or-less similar to the Ode deployer.
- <feature url="features/org.eclipse.bpel.jboss.riftsaw.runtime.feature_1.0.1.qualifier.jar" id="org.eclipse.bpel.jboss.riftsaw.runtime.feature" version="1.0.1.qualifier">
+ <feature url="features/org.eclipse.bpel.jboss.riftsaw.runtime.feature_1.0.2.qualifier.jar" id="org.eclipse.bpel.jboss.riftsaw.runtime.feature" version="1.0.2.qualifier">
<category name="Eclipse BPEL Designer"/>
</feature>
-->
- <feature url="features/org.eclipse.bpel.common.feature_1.0.1.qualifier.jar" id="org.eclipse.bpel.common.feature" version="1.0.1.qualifier">
+ <feature url="features/org.eclipse.bpel.common.feature_1.0.2.qualifier.jar" id="org.eclipse.bpel.common.feature" version="1.0.2.qualifier">
<category name="Eclipse BPEL Designer"/>
</feature>
<category-def name="Eclipse BPEL Designer" label="Eclipse BPEL Designer">
diff --git a/site/pom.xml b/site/pom.xml
index 09a1200..439a07f 100644
--- a/site/pom.xml
+++ b/site/pom.xml
@@ -18,7 +18,7 @@
<groupId>org.eclipse.bpel</groupId>
<artifactId>site</artifactId>
<name>bpel.site</name>
- <version>1.0.1</version>
+ <version>1.0.2</version>
<packaging>eclipse-repository</packaging>
<profiles>
diff --git a/tests/org.eclipse.bpel.common.wsdl.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.bpel.common.wsdl.tests/META-INF/MANIFEST.MF
index afeb084..c733fc4 100644
--- a/tests/org.eclipse.bpel.common.wsdl.tests/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.bpel.common.wsdl.tests/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: Tests - SOA Commons for WSDL and XML Schemas
Bundle-SymbolicName: org.eclipse.bpel.common.wsdl.tests;singleton:=true
-Bundle-Version: 1.0.1.qualifier
+Bundle-Version: 1.0.2.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Vendor: Eclipse.org
Bundle-ActivationPolicy: lazy
diff --git a/tests/org.eclipse.bpel.common.wsdl.tests/pom.xml b/tests/org.eclipse.bpel.common.wsdl.tests/pom.xml
index c7bee0c..7e5c2c4 100644
--- a/tests/org.eclipse.bpel.common.wsdl.tests/pom.xml
+++ b/tests/org.eclipse.bpel.common.wsdl.tests/pom.xml
@@ -10,7 +10,7 @@
<groupId>org.eclipse.bpel.tests</groupId>
<artifactId>org.eclipse.bpel.common.wsdl.tests</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
<build>
diff --git a/tests/org.eclipse.bpel.ui.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.bpel.ui.tests/META-INF/MANIFEST.MF
index 07b1332..9483b71 100644
--- a/tests/org.eclipse.bpel.ui.tests/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.bpel.ui.tests/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: Tests - BPEL Editor
Bundle-SymbolicName: org.eclipse.bpel.ui.tests;singleton:=true
-Bundle-Version: 1.0.1.qualifier
+Bundle-Version: 1.0.2.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Bundle-Vendor: Eclipse.org
diff --git a/tests/org.eclipse.bpel.ui.tests/pom.xml b/tests/org.eclipse.bpel.ui.tests/pom.xml
index ea3b398..a6f4ae6 100644
--- a/tests/org.eclipse.bpel.ui.tests/pom.xml
+++ b/tests/org.eclipse.bpel.ui.tests/pom.xml
@@ -10,7 +10,7 @@
<groupId>org.eclipse.bpel.tests</groupId>
<artifactId>org.eclipse.bpel.ui.tests</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
<build>