aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorszarnekow2008-12-02 05:53:16 (EST)
committersefftinge2008-12-02 05:53:16 (EST)
commit37b7ff710d755f7a7322c6e508c819e353a3c48e (patch)
tree4c0aee8b8dad9cdf8427be634ce58bd94cd29651
parent9d274878d8e73210aa423129dbf64b13628b4163 (diff)
downloadorg.eclipse.xtext-37b7ff710d755f7a7322c6e508c819e353a3c48e.zip
org.eclipse.xtext-37b7ff710d755f7a7322c6e508c819e353a3c48e.tar.gz
org.eclipse.xtext-37b7ff710d755f7a7322c6e508c819e353a3c48e.tar.bz2
- *Bootstrap* to update UI-Gen in lastversion.jar
- new testlanguage to test entry points for partial parsing
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractPartialParserTestLanguageRuntimeConfig.java70
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/IPartialParserTestLanguage.java23
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi168
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/PartialParserTestLanguageStandaloneSetup.java53
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ReferenceGrammar.ecore6
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/PartialParserTestLanguageAntlrTokenFileProvider.java15
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/PartialParserTestLanguageParser.java44
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g594
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.tokens20
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguageLexer.java1249
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguageParser.java1596
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage__.g45
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parsetree/reconstr/PartialParserTestLanguageParseTreeConstructor.java1798
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/partialParserTestLanguage.ecore37
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/services/PartialParserTestLanguageGrammarAccess.java97
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/services/PartialParserTestLanguageMetamodelAccess.java51
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/services/PartialParserTestLanguageResourceFactory.java28
-rwxr-xr-xtests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/GenerateAllTestGrammars.java7
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/PartialParserTest.java73
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/FowlerDslTestLanguage.xtext8
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.java15
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xtext49
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/PartialParserTestLanguageChecks.chk7
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/PartialParserTestLanguageRuntimeConfig.java19
24 files changed, 6067 insertions, 5 deletions
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractPartialParserTestLanguageRuntimeConfig.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractPartialParserTestLanguageRuntimeConfig.java
new file mode 100644
index 0000000..6738314
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractPartialParserTestLanguageRuntimeConfig.java
@@ -0,0 +1,70 @@
+package org.eclipse.xtext.testlanguages;
+
+import java.util.Set;
+
+import org.eclipse.xtext.service.AbstractServiceRegistrationFactory;
+
+/**
+ * used to register components to be used at runtime.
+ */
+public abstract class AbstractPartialParserTestLanguageRuntimeConfig extends AbstractServiceRegistrationFactory {
+
+ protected Class<? extends org.eclipse.xtext.IGrammarAccess> getIGrammarAccess() {
+ return org.eclipse.xtext.testlanguages.services.PartialParserTestLanguageGrammarAccess.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.IMetamodelAccess> getIMetamodelAccess() {
+ return org.eclipse.xtext.testlanguages.services.PartialParserTestLanguageMetamodelAccess.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parser.IAstFactory> getIAstFactory() {
+ return org.eclipse.xtext.parser.GenericEcoreElementFactory.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ return org.eclipse.xtext.testlanguages.parser.PartialParserTestLanguageParser.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider> getIAntlrTokenFileProvider() {
+ return org.eclipse.xtext.testlanguages.parser.PartialParserTestLanguageAntlrTokenFileProvider.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.resource.IResourceFactory> getIResourceFactory() {
+ return org.eclipse.xtext.testlanguages.services.PartialParserTestLanguageResourceFactory.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parsetree.reconstr.IParseTreeConstructor> getIParseTreeConstructor() {
+ return org.eclipse.xtext.testlanguages.parsetree.reconstr.PartialParserTestLanguageParseTreeConstructor.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parsetree.reconstr.ITokenSerializer> getITokenSerializer() {
+ return org.eclipse.xtext.parsetree.reconstr.impl.WhitespacePreservingTokenSerializer.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parsetree.reconstr.ICrossReferenceSerializer> getICrossReferenceSerializer() {
+ return org.eclipse.xtext.parsetree.reconstr.impl.SimpleCrossReferenceSerializer.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parser.antlr.Lexer> getLexer() {
+ return org.eclipse.xtext.testlanguages.parser.internal.InternalPartialParserTestLanguageLexer.class;
+ }
+
+
+ public Set<IServiceRegistration> registrations() {
+ return scope(org.eclipse.xtext.testlanguages.IPartialParserTestLanguage.SCOPE)
+ .with(org.eclipse.xtext.IGrammarAccess.class, getIGrammarAccess())
+ .with(org.eclipse.xtext.IMetamodelAccess.class, getIMetamodelAccess())
+ .with(org.eclipse.xtext.parser.IAstFactory.class, getIAstFactory())
+ .with(org.eclipse.xtext.parser.IParser.class, getIParser())
+ .with(org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider.class, getIAntlrTokenFileProvider())
+ .with(org.eclipse.xtext.resource.IResourceFactory.class, getIResourceFactory())
+ .with(org.eclipse.xtext.parsetree.reconstr.IParseTreeConstructor.class, getIParseTreeConstructor())
+ .with(org.eclipse.xtext.parsetree.reconstr.ITokenSerializer.class, getITokenSerializer())
+ .with(org.eclipse.xtext.parsetree.reconstr.ICrossReferenceSerializer.class, getICrossReferenceSerializer())
+ .with(org.eclipse.xtext.parser.antlr.Lexer.class, getLexer())
+
+ .registrations();
+ }
+
+}
+
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/IPartialParserTestLanguage.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/IPartialParserTestLanguage.java
new file mode 100644
index 0000000..3bf6c44
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/IPartialParserTestLanguage.java
@@ -0,0 +1,23 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.testlanguages;
+
+import org.eclipse.xtext.service.IServiceScope;
+import org.eclipse.xtext.service.ServiceScopeFactory;
+
+public interface IPartialParserTestLanguage {
+
+ /**
+ * the unique identifier of this language.
+ * To be used to get the language descriptor and related services from the registry.
+ * Within ILanguageServices it is encouraged to use dependency injection instead
+ * of directly accessing the ServiceRegistry
+ */
+ public static final String ID = "org.eclipse.xtext.testlanguages.PartialParserTestLanguage";
+ public static final String NAME = "PartialParserTestLanguage";
+ public static final String NAMESPACE = "org.eclipse.xtext.testlanguages";
+ public static final String[] FILE_EXTENSIONS = new String[]{"partialparsertestlanguage"};
+ public static final IServiceScope SCOPE = ServiceScopeFactory.createScope(ID, org.eclipse.xtext.builtin.IXtextBuiltin.SCOPE);
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi
new file mode 100644
index 0000000..c8abe0d
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="ASCII"?>
+<xtext:Grammar xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xtext="http://www.eclipse.org/2008/Xtext">
+ <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="partialParserTestLanguage" nsURI="http://example.xtext.org/PartialParserTestLanguage"/>
+ <idElements>org</idElements>
+ <idElements>eclipse</idElements>
+ <idElements>xtext</idElements>
+ <idElements>testlanguages</idElements>
+ <idElements>PartialParserTestLanguage</idElements>
+ <rules xsi:type="xtext:ParserRule" name="Container">
+ <alternatives xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Keyword" value="container"/>
+ <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="name">
+ <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ </abstractTokens>
+ </abstractTokens>
+ <abstractTokens xsi:type="xtext:Keyword" value="{"/>
+ </abstractTokens>
+ <abstractTokens xsi:type="xtext:Alternatives" cardinality="*">
+ <groups xsi:type="xtext:Assignment" operator="+=" feature="nested">
+ <terminal xsi:type="xtext:RuleCall" name="Nested"/>
+ </groups>
+ <groups xsi:type="xtext:Assignment" operator="+=" feature="content">
+ <terminal xsi:type="xtext:RuleCall" name="Content"/>
+ </groups>
+ </abstractTokens>
+ </abstractTokens>
+ <abstractTokens xsi:type="xtext:Keyword" value="}"/>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:ParserRule" name="Nested">
+ <alternatives xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Keyword" value="nested"/>
+ <abstractTokens xsi:type="xtext:Keyword" value="{"/>
+ </abstractTokens>
+ <abstractTokens xsi:type="xtext:Assignment" cardinality="+" operator="+=" feature="nested">
+ <terminal xsi:type="xtext:RuleCall" name="Container"/>
+ </abstractTokens>
+ </abstractTokens>
+ <abstractTokens xsi:type="xtext:Keyword" value="}"/>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:ParserRule" name="Content">
+ <alternatives xsi:type="xtext:Alternatives">
+ <groups xsi:type="xtext:RuleCall" name="Children"/>
+ <groups xsi:type="xtext:RuleCall" name="AbstractChildren"/>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:ParserRule" name="Children">
+ <alternatives xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Keyword" value="children"/>
+ <abstractTokens xsi:type="xtext:Keyword" value="{"/>
+ </abstractTokens>
+ <abstractTokens xsi:type="xtext:Assignment" operator="+=" feature="children">
+ <terminal xsi:type="xtext:RuleCall" name="Child"/>
+ </abstractTokens>
+ </abstractTokens>
+ <abstractTokens xsi:type="xtext:Group" cardinality="*">
+ <abstractTokens xsi:type="xtext:Keyword" value=","/>
+ <abstractTokens xsi:type="xtext:Assignment" operator="+=" feature="children">
+ <terminal xsi:type="xtext:RuleCall" name="Child"/>
+ </abstractTokens>
+ </abstractTokens>
+ </abstractTokens>
+ <abstractTokens xsi:type="xtext:Keyword" value="}"/>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:ParserRule" name="Child">
+ <alternatives xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Keyword" value="->"/>
+ <abstractTokens xsi:type="xtext:Keyword" value="C"/>
+ </abstractTokens>
+ <abstractTokens xsi:type="xtext:Keyword" value="("/>
+ </abstractTokens>
+ <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="value">
+ <terminal xsi:type="xtext:RuleCall" name="Named"/>
+ </abstractTokens>
+ </abstractTokens>
+ <abstractTokens xsi:type="xtext:Keyword" value=")"/>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:ParserRule" name="AbstractChildren">
+ <alternatives xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Keyword" value="abstract children"/>
+ <abstractTokens xsi:type="xtext:Keyword" value="{"/>
+ </abstractTokens>
+ <abstractTokens xsi:type="xtext:Assignment" cardinality="+" operator="+=" feature="abstractChildren">
+ <terminal xsi:type="xtext:RuleCall" name="AbstractChild"/>
+ </abstractTokens>
+ </abstractTokens>
+ <abstractTokens xsi:type="xtext:Keyword" value="}"/>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:ParserRule" name="AbstractChild">
+ <alternatives xsi:type="xtext:Alternatives">
+ <groups xsi:type="xtext:RuleCall" name="FirstConcrete"/>
+ <groups xsi:type="xtext:RuleCall" name="SecondConcrete"/>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:ParserRule" name="FirstConcrete">
+ <alternatives xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Keyword" value="->"/>
+ <abstractTokens xsi:type="xtext:Keyword" value="F"/>
+ </abstractTokens>
+ <abstractTokens xsi:type="xtext:Keyword" value="("/>
+ </abstractTokens>
+ <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="value">
+ <terminal xsi:type="xtext:RuleCall" name="Named"/>
+ </abstractTokens>
+ </abstractTokens>
+ <abstractTokens xsi:type="xtext:Assignment" cardinality="?" operator="=" feature="referencedContainer">
+ <terminal xsi:type="xtext:CrossReference">
+ <type name="Container"/>
+ </terminal>
+ </abstractTokens>
+ </abstractTokens>
+ <abstractTokens xsi:type="xtext:Keyword" value=")"/>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:ParserRule" name="SecondConcrete">
+ <alternatives xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Keyword" value="->"/>
+ <abstractTokens xsi:type="xtext:Keyword" value="F"/>
+ </abstractTokens>
+ <abstractTokens xsi:type="xtext:Keyword" value="S"/>
+ </abstractTokens>
+ <abstractTokens xsi:type="xtext:Keyword" value="("/>
+ </abstractTokens>
+ <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="value">
+ <terminal xsi:type="xtext:RuleCall" name="Named"/>
+ </abstractTokens>
+ </abstractTokens>
+ <abstractTokens xsi:type="xtext:Assignment" cardinality="?" operator="+=" feature="referencedChildren">
+ <terminal xsi:type="xtext:CrossReference">
+ <type name="Child"/>
+ </terminal>
+ </abstractTokens>
+ </abstractTokens>
+ <abstractTokens xsi:type="xtext:Keyword" value=")"/>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:ParserRule" name="Named">
+ <alternatives xsi:type="xtext:Assignment" operator="=" feature="name">
+ <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ </alternatives>
+ </rules>
+</xtext:Grammar>
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/PartialParserTestLanguageStandaloneSetup.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/PartialParserTestLanguageStandaloneSetup.java
new file mode 100644
index 0000000..2fba842
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/PartialParserTestLanguageStandaloneSetup.java
@@ -0,0 +1,53 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.testlanguages;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.xtext.EcoreUtil2;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.xtext.resource.IResourceFactory;
+import org.eclipse.xtext.service.IServiceScope;
+import org.eclipse.xtext.service.ServiceRegistry;
+import org.eclipse.xtext.service.IServiceRegistrationFactory.IServiceRegistration;
+
+import org.eclipse.xtext.testlanguages.IPartialParserTestLanguage;
+
+public abstract class PartialParserTestLanguageStandaloneSetup {
+
+ private static boolean isInitialized = false;
+
+ public synchronized static void doSetup() {
+ if(!isInitialized) {
+ // setup super language first
+ org.eclipse.xtext.builtin.XtextBuiltinStandaloneSetup.doSetup();
+
+ for (IServiceRegistration reg : new org.eclipse.xtext.testlanguages.PartialParserTestLanguageRuntimeConfig().registrations()) {
+ ServiceRegistry.registerFactory(reg.scope(), reg.serviceFactory(), reg.priority());
+ }
+
+ // register resource factory to EMF
+ IResourceFactory resourceFactory = new org.eclipse.xtext.testlanguages.services.PartialParserTestLanguageResourceFactory();
+ Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("partialparsertestlanguage", resourceFactory);
+
+
+ // initialize EPackages
+
+ if (!EPackage.Registry.INSTANCE.containsKey("http://example.xtext.org/PartialParserTestLanguage")) {
+ EPackage partialParserTestLanguage = EcoreUtil2.loadEPackage(
+ "classpath:/org/eclipse/xtext/testlanguages/partialParserTestLanguage.ecore",
+ PartialParserTestLanguageStandaloneSetup.class.getClassLoader());
+ if (partialParserTestLanguage == null)
+ throw new IllegalStateException(
+ "Couldn't load EPackage from 'classpath:/org/eclipse/xtext/testlanguages/partialParserTestLanguage.ecore'");
+ EPackage.Registry.INSTANCE.put("http://example.xtext.org/PartialParserTestLanguage", partialParserTestLanguage);
+ }
+
+ isInitialized = true;
+ }
+ }
+
+ public static IServiceScope getServiceScope() {
+ return org.eclipse.xtext.testlanguages.IPartialParserTestLanguage.SCOPE;
+ }
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ReferenceGrammar.ecore b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ReferenceGrammar.ecore
index e06ff31..d5d6059 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ReferenceGrammar.ecore
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ReferenceGrammar.ecore
@@ -13,12 +13,12 @@
<eStructuralFeatures xsi:type="ecore:EReference" name="familie" upperBound="-1" eType="//Familie" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Person">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="name">
- <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- </eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="age">
<eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
</eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Kind" eSuperTypes="//Person"/>
<eClassifiers xsi:type="ecore:EClass" name="Erwachsener" eSuperTypes="//Person"/>
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/PartialParserTestLanguageAntlrTokenFileProvider.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/PartialParserTestLanguageAntlrTokenFileProvider.java
new file mode 100644
index 0000000..8f5fc84
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/PartialParserTestLanguageAntlrTokenFileProvider.java
@@ -0,0 +1,15 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.testlanguages.parser;
+
+import java.io.InputStream;
+import org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider;
+
+public class PartialParserTestLanguageAntlrTokenFileProvider implements IAntlrTokenFileProvider {
+
+ public InputStream getAntlrTokenFile() {
+ ClassLoader classLoader = PartialParserTestLanguageAntlrTokenFileProvider.class.getClassLoader();
+ return classLoader.getResourceAsStream("org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.tokens");
+ }
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/PartialParserTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/PartialParserTestLanguageParser.java
new file mode 100644
index 0000000..c4389dc
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/PartialParserTestLanguageParser.java
@@ -0,0 +1,44 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.testlanguages.parser;
+
+import org.antlr.runtime.ANTLRInputStream;
+import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
+import org.eclipse.xtext.parser.IAstFactory;
+import org.eclipse.xtext.parser.IParseResult;
+import org.eclipse.xtext.parser.ParseException;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream;
+import org.eclipse.xtext.service.Inject;
+
+import org.eclipse.xtext.testlanguages.parser.internal.InternalPartialParserTestLanguageLexer;
+import org.eclipse.xtext.testlanguages.parser.internal.InternalPartialParserTestLanguageParser;
+
+public class PartialParserTestLanguageParser extends org.eclipse.xtext.parser.AbstractParser {
+
+ @Inject
+ protected AntlrTokenDefProvider antlrTokenDefProvider;
+
+ @Override
+ protected IParseResult parse(String ruleName, ANTLRInputStream in, IAstFactory factory) {
+ InternalPartialParserTestLanguageLexer lexer = new InternalPartialParserTestLanguageLexer(in);
+ XtextTokenStream stream = new XtextTokenStream(lexer);
+ InternalPartialParserTestLanguageParser parser = new InternalPartialParserTestLanguageParser(
+ stream, factory, grammarAccess.getGrammar());
+ parser.setTokenTypeMap(antlrTokenDefProvider.getTokenDefMap());
+ try {
+ if(ruleName != null) {
+ return parser.parse(ruleName);
+ } else {
+ return parser.parse();
+ }
+ } catch (Exception re) {
+ throw new ParseException(re.getMessage(),re);
+ }
+ }
+
+ @Override
+ protected String getDefaultRuleName() {
+ return "Container";
+ }
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g
new file mode 100644
index 0000000..156d052
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g
@@ -0,0 +1,594 @@
+/*
+Generated with Xtext
+*/
+grammar InternalPartialParserTestLanguage;
+
+options {
+ superClass=AbstractAntlrParser;
+}
+
+@lexer::header {
+package org.eclipse.xtext.testlanguages.parser.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.testlanguages.parser.internal;
+
+import java.io.InputStream;
+import org.eclipse.xtext.*;
+import org.eclipse.xtext.parser.*;
+import org.eclipse.xtext.parser.impl.*;
+import org.eclipse.xtext.parsetree.*;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.parser.antlr.AbstractAntlrParser;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream;
+}
+
+@parser::members {
+
+ public InternalPartialParserTestLanguageParser(TokenStream input, IAstFactory factory, Grammar g) {
+ this(input);
+ this.factory = factory;
+ grammar = g;
+ }
+
+ @Override
+ protected InputStream getTokenFile() {
+ ClassLoader classLoader = InternalPartialParserTestLanguageParser.class.getClassLoader();
+ return classLoader.getResourceAsStream("org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.tokens");
+ }
+
+ @Override
+ protected String getFirstRuleName() {
+ return "Container";
+ }
+}
+
+@rulecatch {
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+}
+
+
+
+// Entry rule entryRuleContainer
+entryRuleContainer returns [EObject current=null] :
+ { currentNode = createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.0" /* xtext::ParserRule */, currentNode); }
+ iv_ruleContainer=ruleContainer
+ { $current=$iv_ruleContainer.current; }
+ EOF
+;
+
+// Rule Container
+ruleContainer returns [EObject current=null]
+ @init { EObject temp=null; setCurrentLookahead(); resetLookahead(); }
+ @after { resetLookahead(); }:
+(((('container'
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0" /* xtext::Keyword */, null);
+ }
+(
+
+ lv_name=RULE_ID
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1/@terminal" /* xtext::RuleCall */, "name");
+ }
+
+ {
+ if ($current==null) {
+ $current = factory.create("Container");
+ associateNodeWithAstElement(currentNode, $current);
+ }
+
+ factory.set($current, "name", lv_name,"ID");
+ }
+
+))'{'
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1" /* xtext::Keyword */, null);
+ }
+)((
+
+
+ {
+ currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.1/@groups.0/@terminal" /* xtext::RuleCall */, currentNode);
+ }
+ lv_nested=ruleNested
+ {
+ currentNode = currentNode.getParent();
+ if ($current==null) {
+ $current = factory.create("Container");
+ associateNodeWithAstElement(currentNode, $current);
+ }
+
+ factory.add($current, "nested", lv_nested,null);
+ }
+
+)
+ |(
+
+
+ {
+ currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.1/@groups.1/@terminal" /* xtext::RuleCall */, currentNode);
+ }
+ lv_content=ruleContent
+ {
+ currentNode = currentNode.getParent();
+ if ($current==null) {
+ $current = factory.create("Container");
+ associateNodeWithAstElement(currentNode, $current);
+ }
+
+ factory.add($current, "content", lv_content,null);
+ }
+
+))*)'}'
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.0/@alternatives/@abstractTokens.1" /* xtext::Keyword */, null);
+ }
+);
+
+
+
+// Entry rule entryRuleNested
+entryRuleNested returns [EObject current=null] :
+ { currentNode = createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.1" /* xtext::ParserRule */, currentNode); }
+ iv_ruleNested=ruleNested
+ { $current=$iv_ruleNested.current; }
+ EOF
+;
+
+// Rule Nested
+ruleNested returns [EObject current=null]
+ @init { EObject temp=null; setCurrentLookahead(); resetLookahead(); }
+ @after { resetLookahead(); }:
+((('nested'
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.1/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0" /* xtext::Keyword */, null);
+ }
+'{'
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.1/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1" /* xtext::Keyword */, null);
+ }
+)(
+
+
+ {
+ currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.1/@alternatives/@abstractTokens.0/@abstractTokens.1/@terminal" /* xtext::RuleCall */, currentNode);
+ }
+ lv_nested=ruleContainer
+ {
+ currentNode = currentNode.getParent();
+ if ($current==null) {
+ $current = factory.create("Nested");
+ associateNodeWithAstElement(currentNode, $current);
+ }
+
+ factory.add($current, "nested", lv_nested,null);
+ }
+
+)+)'}'
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.1/@alternatives/@abstractTokens.1" /* xtext::Keyword */, null);
+ }
+);
+
+
+
+// Entry rule entryRuleContent
+entryRuleContent returns [EObject current=null] :
+ { currentNode = createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.2" /* xtext::ParserRule */, currentNode); }
+ iv_ruleContent=ruleContent
+ { $current=$iv_ruleContent.current; }
+ EOF
+;
+
+// Rule Content
+ruleContent returns [EObject current=null]
+ @init { EObject temp=null; setCurrentLookahead(); resetLookahead(); }
+ @after { resetLookahead(); }:
+(
+ {
+ currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.2/@alternatives/@groups.0" /* xtext::RuleCall */, currentNode);
+ }
+ this_Children=ruleChildren
+ {
+ $current = $this_Children.current;
+ currentNode = currentNode.getParent();
+ }
+
+ |
+ {
+ currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.2/@alternatives/@groups.1" /* xtext::RuleCall */, currentNode);
+ }
+ this_AbstractChildren=ruleAbstractChildren
+ {
+ $current = $this_AbstractChildren.current;
+ currentNode = currentNode.getParent();
+ }
+);
+
+
+
+// Entry rule entryRuleChildren
+entryRuleChildren returns [EObject current=null] :
+ { currentNode = createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.3" /* xtext::ParserRule */, currentNode); }
+ iv_ruleChildren=ruleChildren
+ { $current=$iv_ruleChildren.current; }
+ EOF
+;
+
+// Rule Children
+ruleChildren returns [EObject current=null]
+ @init { EObject temp=null; setCurrentLookahead(); resetLookahead(); }
+ @after { resetLookahead(); }:
+(((('children'
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.3/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0" /* xtext::Keyword */, null);
+ }
+'{'
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.3/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1" /* xtext::Keyword */, null);
+ }
+)(
+
+
+ {
+ currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.3/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1/@terminal" /* xtext::RuleCall */, currentNode);
+ }
+ lv_children=ruleChild
+ {
+ currentNode = currentNode.getParent();
+ if ($current==null) {
+ $current = factory.create("Children");
+ associateNodeWithAstElement(currentNode, $current);
+ }
+
+ factory.add($current, "children", lv_children,null);
+ }
+
+))(','
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.3/@alternatives/@abstractTokens.0/@abstractTokens.1/@abstractTokens.0" /* xtext::Keyword */, null);
+ }
+(
+
+
+ {
+ currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.3/@alternatives/@abstractTokens.0/@abstractTokens.1/@abstractTokens.1/@terminal" /* xtext::RuleCall */, currentNode);
+ }
+ lv_children=ruleChild
+ {
+ currentNode = currentNode.getParent();
+ if ($current==null) {
+ $current = factory.create("Children");
+ associateNodeWithAstElement(currentNode, $current);
+ }
+
+ factory.add($current, "children", lv_children,null);
+ }
+
+))*)'}'
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.3/@alternatives/@abstractTokens.1" /* xtext::Keyword */, null);
+ }
+);
+
+
+
+// Entry rule entryRuleChild
+entryRuleChild returns [EObject current=null] :
+ { currentNode = createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.4" /* xtext::ParserRule */, currentNode); }
+ iv_ruleChild=ruleChild
+ { $current=$iv_ruleChild.current; }
+ EOF
+;
+
+// Rule Child
+ruleChild returns [EObject current=null]
+ @init { EObject temp=null; setCurrentLookahead(); resetLookahead(); }
+ @after { resetLookahead(); }:
+(((('->'
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.4/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0" /* xtext::Keyword */, null);
+ }
+'C'
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.4/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1" /* xtext::Keyword */, null);
+ }
+)'('
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.4/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1" /* xtext::Keyword */, null);
+ }
+)(
+
+
+ {
+ currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.4/@alternatives/@abstractTokens.0/@abstractTokens.1/@terminal" /* xtext::RuleCall */, currentNode);
+ }
+ lv_value=ruleNamed
+ {
+ currentNode = currentNode.getParent();
+ if ($current==null) {
+ $current = factory.create("Child");
+ associateNodeWithAstElement(currentNode, $current);
+ }
+
+ factory.set($current, "value", lv_value,null);
+ }
+
+))')'
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.4/@alternatives/@abstractTokens.1" /* xtext::Keyword */, null);
+ }
+);
+
+
+
+// Entry rule entryRuleAbstractChildren
+entryRuleAbstractChildren returns [EObject current=null] :
+ { currentNode = createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.5" /* xtext::ParserRule */, currentNode); }
+ iv_ruleAbstractChildren=ruleAbstractChildren
+ { $current=$iv_ruleAbstractChildren.current; }
+ EOF
+;
+
+// Rule AbstractChildren
+ruleAbstractChildren returns [EObject current=null]
+ @init { EObject temp=null; setCurrentLookahead(); resetLookahead(); }
+ @after { resetLookahead(); }:
+((('abstract children'
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.5/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0" /* xtext::Keyword */, null);
+ }
+'{'
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.5/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1" /* xtext::Keyword */, null);
+ }
+)(
+
+
+ {
+ currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.5/@alternatives/@abstractTokens.0/@abstractTokens.1/@terminal" /* xtext::RuleCall */, currentNode);
+ }
+ lv_abstractChildren=ruleAbstractChild
+ {
+ currentNode = currentNode.getParent();
+ if ($current==null) {
+ $current = factory.create("AbstractChildren");
+ associateNodeWithAstElement(currentNode, $current);
+ }
+
+ factory.add($current, "abstractChildren", lv_abstractChildren,null);
+ }
+
+)+)'}'
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.5/@alternatives/@abstractTokens.1" /* xtext::Keyword */, null);
+ }
+);
+
+
+
+// Entry rule entryRuleAbstractChild
+entryRuleAbstractChild returns [EObject current=null] :
+ { currentNode = createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.6" /* xtext::ParserRule */, currentNode); }
+ iv_ruleAbstractChild=ruleAbstractChild
+ { $current=$iv_ruleAbstractChild.current; }
+ EOF
+;
+
+// Rule AbstractChild
+ruleAbstractChild returns [EObject current=null]
+ @init { EObject temp=null; setCurrentLookahead(); resetLookahead(); }
+ @after { resetLookahead(); }:
+(
+ {
+ currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.6/@alternatives/@groups.0" /* xtext::RuleCall */, currentNode);
+ }
+ this_FirstConcrete=ruleFirstConcrete
+ {
+ $current = $this_FirstConcrete.current;
+ currentNode = currentNode.getParent();
+ }
+
+ |
+ {
+ currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.6/@alternatives/@groups.1" /* xtext::RuleCall */, currentNode);
+ }
+ this_SecondConcrete=ruleSecondConcrete
+ {
+ $current = $this_SecondConcrete.current;
+ currentNode = currentNode.getParent();
+ }
+);
+
+
+
+// Entry rule entryRuleFirstConcrete
+entryRuleFirstConcrete returns [EObject current=null] :
+ { currentNode = createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.7" /* xtext::ParserRule */, currentNode); }
+ iv_ruleFirstConcrete=ruleFirstConcrete
+ { $current=$iv_ruleFirstConcrete.current; }
+ EOF
+;
+
+// Rule FirstConcrete
+ruleFirstConcrete returns [EObject current=null]
+ @init { EObject temp=null; setCurrentLookahead(); resetLookahead(); }
+ @after { resetLookahead(); }:
+((((('->'
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.7/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0" /* xtext::Keyword */, null);
+ }
+'F'
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.7/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1" /* xtext::Keyword */, null);
+ }
+)'('
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.7/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1" /* xtext::Keyword */, null);
+ }
+)(
+
+
+ {
+ currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.7/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1/@terminal" /* xtext::RuleCall */, currentNode);
+ }
+ lv_value=ruleNamed
+ {
+ currentNode = currentNode.getParent();
+ if ($current==null) {
+ $current = factory.create("FirstConcrete");
+ associateNodeWithAstElement(currentNode, $current);
+ }
+
+ factory.set($current, "value", lv_value,null);
+ }
+
+))(
+
+
+ {
+ if ($current==null) {
+ $current = factory.create("FirstConcrete");
+ associateNodeWithAstElement(currentNode, $current);
+ }
+ }
+(
+ RULE_ID {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.7/@alternatives/@abstractTokens.0/@abstractTokens.1/@terminal" /* xtext::CrossReference */, "referencedContainer");
+ }
+)
+
+)?)')'
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.7/@alternatives/@abstractTokens.1" /* xtext::Keyword */, null);
+ }
+);
+
+
+
+// Entry rule entryRuleSecondConcrete
+entryRuleSecondConcrete returns [EObject current=null] :
+ { currentNode = createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.8" /* xtext::ParserRule */, currentNode); }
+ iv_ruleSecondConcrete=ruleSecondConcrete
+ { $current=$iv_ruleSecondConcrete.current; }
+ EOF
+;
+
+// Rule SecondConcrete
+ruleSecondConcrete returns [EObject current=null]
+ @init { EObject temp=null; setCurrentLookahead(); resetLookahead(); }
+ @after { resetLookahead(); }:
+(((((('->'
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.8/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0" /* xtext::Keyword */, null);
+ }
+'F'
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.8/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1" /* xtext::Keyword */, null);
+ }
+)'S'
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.8/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1" /* xtext::Keyword */, null);
+ }
+)'('
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.8/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1" /* xtext::Keyword */, null);
+ }
+)(
+
+
+ {
+ currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.8/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1/@terminal" /* xtext::RuleCall */, currentNode);
+ }
+ lv_value=ruleNamed
+ {
+ currentNode = currentNode.getParent();
+ if ($current==null) {
+ $current = factory.create("SecondConcrete");
+ associateNodeWithAstElement(currentNode, $current);
+ }
+
+ factory.set($current, "value", lv_value,null);
+ }
+
+))(
+
+
+ {
+ if ($current==null) {
+ $current = factory.create("SecondConcrete");
+ associateNodeWithAstElement(currentNode, $current);
+ }
+ }
+(
+ RULE_ID {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.8/@alternatives/@abstractTokens.0/@abstractTokens.1/@terminal" /* xtext::CrossReference */, "referencedChildren");
+ }
+)
+
+)?)')'
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.8/@alternatives/@abstractTokens.1" /* xtext::Keyword */, null);
+ }
+);
+
+
+
+// Entry rule entryRuleNamed
+entryRuleNamed returns [EObject current=null] :
+ { currentNode = createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.9" /* xtext::ParserRule */, currentNode); }
+ iv_ruleNamed=ruleNamed
+ { $current=$iv_ruleNamed.current; }
+ EOF
+;
+
+// Rule Named
+ruleNamed returns [EObject current=null]
+ @init { EObject temp=null; setCurrentLookahead(); resetLookahead(); }
+ @after { resetLookahead(); }:
+(
+
+ lv_name=RULE_ID
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.9/@alternatives/@terminal" /* xtext::RuleCall */, "name");
+ }
+
+ {
+ if ($current==null) {
+ $current = factory.create("Named");
+ associateNodeWithAstElement(currentNode, $current);
+ }
+
+ factory.set($current, "name", lv_name,"ID");
+ }
+
+);
+
+
+
+
+RULE_ID : ('^')?('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*;
+
+RULE_INT : ('0'..'9')+;
+
+RULE_STRING : '"' ( '\\' ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\') | ~('\\'|'"') )* '"' | '\'' ( '\\' ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\') | ~('\\'|'\'') )* '\'';
+
+RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )* '*/' {$channel=HIDDEN;};
+
+RULE_SL_COMMENT : '//' ~('\n'|'\r')* ('\r'? '\n')? {$channel=HIDDEN;};
+
+RULE_WS : (' '|'\t'|'\r'|'\n')+ {$channel=HIDDEN;};
+
+RULE_ANY_OTHER : .;
+
+
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.tokens b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.tokens
new file mode 100644
index 0000000..a71b000
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.tokens
@@ -0,0 +1,20 @@
+RULE_ML_COMMENT=7
+RULE_ID=4
+RULE_WS=9
+RULE_INT=5
+RULE_STRING=6
+RULE_ANY_OTHER=10
+RULE_SL_COMMENT=8
+'->'=17
+'C'=18
+')'=20
+'abstract children'=21
+'{'=12
+'nested'=14
+','=16
+'('=19
+'children'=15
+'S'=23
+'container'=11
+'}'=13
+'F'=22
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguageLexer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguageLexer.java
new file mode 100644
index 0000000..e4735da
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguageLexer.java
@@ -0,0 +1,1249 @@
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g 2008-11-28 17:29:28
+
+package org.eclipse.xtext.testlanguages.parser.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;
+
+public class InternalPartialParserTestLanguageLexer extends Lexer {
+ public static final int T21=21;
+ public static final int RULE_ML_COMMENT=7;
+ public static final int T14=14;
+ public static final int RULE_ID=4;
+ public static final int T22=22;
+ public static final int T11=11;
+ public static final int RULE_STRING=6;
+ public static final int T12=12;
+ public static final int T23=23;
+ public static final int T13=13;
+ public static final int T20=20;
+ public static final int T18=18;
+ public static final int RULE_WS=9;
+ public static final int T15=15;
+ public static final int RULE_INT=5;
+ public static final int EOF=-1;
+ public static final int T17=17;
+ public static final int Tokens=24;
+ public static final int RULE_ANY_OTHER=10;
+ public static final int T16=16;
+ public static final int RULE_SL_COMMENT=8;
+ public static final int T19=19;
+ public InternalPartialParserTestLanguageLexer() {;}
+ public InternalPartialParserTestLanguageLexer(CharStream input) {
+ super(input);
+ }
+ public String getGrammarFileName() { return "./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g"; }
+
+ // $ANTLR start T11
+ public final void mT11() throws RecognitionException {
+ try {
+ int _type = T11;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:10:5: ( 'container' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:10:7: 'container'
+ {
+ match("container");
+
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end T11
+
+ // $ANTLR start T12
+ public final void mT12() throws RecognitionException {
+ try {
+ int _type = T12;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:11:5: ( '{' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:11:7: '{'
+ {
+ match('{');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end T12
+
+ // $ANTLR start T13
+ public final void mT13() throws RecognitionException {
+ try {
+ int _type = T13;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:12:5: ( '}' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:12:7: '}'
+ {
+ match('}');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end T13
+
+ // $ANTLR start T14
+ public final void mT14() throws RecognitionException {
+ try {
+ int _type = T14;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:13:5: ( 'nested' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:13:7: 'nested'
+ {
+ match("nested");
+
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end T14
+
+ // $ANTLR start T15
+ public final void mT15() throws RecognitionException {
+ try {
+ int _type = T15;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:14:5: ( 'children' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:14:7: 'children'
+ {
+ match("children");
+
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end T15
+
+ // $ANTLR start T16
+ public final void mT16() throws RecognitionException {
+ try {
+ int _type = T16;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:15:5: ( ',' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:15:7: ','
+ {
+ match(',');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end T16
+
+ // $ANTLR start T17
+ public final void mT17() throws RecognitionException {
+ try {
+ int _type = T17;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:16:5: ( '->' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:16:7: '->'
+ {
+ match("->");
+
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end T17
+
+ // $ANTLR start T18
+ public final void mT18() throws RecognitionException {
+ try {
+ int _type = T18;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:17:5: ( 'C' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:17:7: 'C'
+ {
+ match('C');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end T18
+
+ // $ANTLR start T19
+ public final void mT19() throws RecognitionException {
+ try {
+ int _type = T19;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:18:5: ( '(' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:18:7: '('
+ {
+ match('(');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end T19
+
+ // $ANTLR start T20
+ public final void mT20() throws RecognitionException {
+ try {
+ int _type = T20;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:19:5: ( ')' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:19:7: ')'
+ {
+ match(')');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end T20
+
+ // $ANTLR start T21
+ public final void mT21() throws RecognitionException {
+ try {
+ int _type = T21;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:20:5: ( 'abstract children' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:20:7: 'abstract children'
+ {
+ match("abstract children");
+
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end T21
+
+ // $ANTLR start T22
+ public final void mT22() throws RecognitionException {
+ try {
+ int _type = T22;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:21:5: ( 'F' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:21:7: 'F'
+ {
+ match('F');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end T22
+
+ // $ANTLR start T23
+ public final void mT23() throws RecognitionException {
+ try {
+ int _type = T23;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:22:5: ( 'S' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:22:7: 'S'
+ {
+ match('S');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end T23
+
+ // $ANTLR start RULE_ID
+ public final void mRULE_ID() throws RecognitionException {
+ try {
+ int _type = RULE_ID;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:580:9: ( ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:580:11: ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:580:11: ( '^' )?
+ int alt1=2;
+ int LA1_0 = input.LA(1);
+
+ if ( (LA1_0=='^') ) {
+ alt1=1;
+ }
+ switch (alt1) {
+ case 1 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:580:12: '^'
+ {
+ 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;
+ }
+
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:580:41: ( '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 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.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);
+
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end RULE_ID
+
+ // $ANTLR start RULE_INT
+ public final void mRULE_INT() throws RecognitionException {
+ try {
+ int _type = RULE_INT;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:582:10: ( ( '0' .. '9' )+ )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:582:12: ( '0' .. '9' )+
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:582: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 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:582:13: '0' .. '9'
+ {
+ matchRange('0','9');
+
+ }
+ break;
+
+ default :
+ if ( cnt3 >= 1 ) break loop3;
+ EarlyExitException eee =
+ new EarlyExitException(3, input);
+ throw eee;
+ }
+ cnt3++;
+ } while (true);
+
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end RULE_INT
+
+ // $ANTLR start RULE_STRING
+ public final void mRULE_STRING() throws RecognitionException {
+ try {
+ int _type = RULE_STRING;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:584:13: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\"' ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\\'' ) )* '\\'' )
+ 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("584:1: RULE_STRING : ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\"' ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\\'' ) )* '\\'' );", 6, 0, input);
+
+ throw nvae;
+ }
+ switch (alt6) {
+ case 1 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:584:15: '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\"' ) )* '\"'
+ {
+ match('\"');
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:584:19: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\"' ) )*
+ 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<='\uFFFE')) ) {
+ alt4=2;
+ }
+
+
+ switch (alt4) {
+ case 1 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:584:21: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' )
+ {
+ 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.consume();
+
+ }
+ else {
+ MismatchedSetException mse =
+ new MismatchedSetException(null,input);
+ recover(mse); throw mse;
+ }
+
+
+ }
+ break;
+ case 2 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:584:65: ~ ( '\\\\' | '\"' )
+ {
+ if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFE') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse =
+ new MismatchedSetException(null,input);
+ recover(mse); throw mse;
+ }
+
+
+ }
+ break;
+
+ default :
+ break loop4;
+ }
+ } while (true);
+
+ match('\"');
+
+ }
+ break;
+ case 2 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:584:101: '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\\'' ) )* '\\''
+ {
+ match('\'');
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:584:106: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\\'' ) )*
+ 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<='\uFFFE')) ) {
+ alt5=2;
+ }
+
+
+ switch (alt5) {
+ case 1 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:584:108: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' )
+ {
+ 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.consume();
+
+ }
+ else {
+ MismatchedSetException mse =
+ new MismatchedSetException(null,input);
+ recover(mse); throw mse;
+ }
+
+
+ }
+ break;
+ case 2 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:584:152: ~ ( '\\\\' | '\\'' )
+ {
+ if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFE') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse =
+ new MismatchedSetException(null,input);
+ recover(mse); throw mse;
+ }
+
+
+ }
+ break;
+
+ default :
+ break loop5;
+ }
+ } while (true);
+
+ match('\'');
+
+ }
+ break;
+
+ }
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end RULE_STRING
+
+ // $ANTLR start RULE_ML_COMMENT
+ public final void mRULE_ML_COMMENT() throws RecognitionException {
+ try {
+ int _type = RULE_ML_COMMENT;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:586:17: ( '/*' ( options {greedy=false; } : . )* '*/' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:586:19: '/*' ( options {greedy=false; } : . )* '*/'
+ {
+ match("/*");
+
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:586: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<='\uFFFE')) ) {
+ alt7=1;
+ }
+
+
+ }
+ else if ( ((LA7_0>='\u0000' && LA7_0<=')')||(LA7_0>='+' && LA7_0<='\uFFFE')) ) {
+ alt7=1;
+ }
+
+
+ switch (alt7) {
+ case 1 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:586:52: .
+ {
+ matchAny();
+
+ }
+ break;
+
+ default :
+ break loop7;
+ }
+ } while (true);
+
+ match("*/");
+
+ channel=HIDDEN;
+
+ }
+
+ this.type = _type;
+ }
+ 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;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:588:17: ( '//' (~ ( '\\n' | '\\r' ) )* ( ( '\\r' )? '\\n' )? )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:588:19: '//' (~ ( '\\n' | '\\r' ) )* ( ( '\\r' )? '\\n' )?
+ {
+ match("//");
+
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:588: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<='\uFFFE')) ) {
+ alt8=1;
+ }
+
+
+ switch (alt8) {
+ case 1 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:588: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)<='\uFFFE') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse =
+ new MismatchedSetException(null,input);
+ recover(mse); throw mse;
+ }
+
+
+ }
+ break;
+
+ default :
+ break loop8;
+ }
+ } while (true);
+
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:588:38: ( ( '\\r' )? '\\n' )?
+ int alt10=2;
+ int LA10_0 = input.LA(1);
+
+ if ( (LA10_0=='\n'||LA10_0=='\r') ) {
+ alt10=1;
+ }
+ switch (alt10) {
+ case 1 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:588:39: ( '\\r' )? '\\n'
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:588:39: ( '\\r' )?
+ int alt9=2;
+ int LA9_0 = input.LA(1);
+
+ if ( (LA9_0=='\r') ) {
+ alt9=1;
+ }
+ switch (alt9) {
+ case 1 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:588:39: '\\r'
+ {
+ match('\r');
+
+ }
+ break;
+
+ }
+
+ match('\n');
+
+ }
+ break;
+
+ }
+
+ channel=HIDDEN;
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end RULE_SL_COMMENT
+
+ // $ANTLR start RULE_WS
+ public final void mRULE_WS() throws RecognitionException {
+ try {
+ int _type = RULE_WS;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:590:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:590:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:590: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 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.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);
+
+ channel=HIDDEN;
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end RULE_WS
+
+ // $ANTLR start RULE_ANY_OTHER
+ public final void mRULE_ANY_OTHER() throws RecognitionException {
+ try {
+ int _type = RULE_ANY_OTHER;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:592:16: ( . )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:592:18: .
+ {
+ matchAny();
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end RULE_ANY_OTHER
+
+ public void mTokens() throws RecognitionException {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:1:8: ( T11 | T12 | T13 | T14 | T15 | T16 | T17 | T18 | T19 | T20 | T21 | T22 | T23 | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER )
+ int alt12=20;
+ int LA12_0 = input.LA(1);
+
+ if ( (LA12_0=='c') ) {
+ switch ( input.LA(2) ) {
+ case 'o':
+ {
+ int LA12_21 = input.LA(3);
+
+ if ( (LA12_21=='n') ) {
+ int LA12_40 = input.LA(4);
+
+ if ( (LA12_40=='t') ) {
+ int LA12_44 = input.LA(5);
+
+ if ( (LA12_44=='a') ) {
+ int LA12_48 = input.LA(6);
+
+ if ( (LA12_48=='i') ) {
+ int LA12_52 = input.LA(7);
+
+ if ( (LA12_52=='n') ) {
+ int LA12_56 = input.LA(8);
+
+ if ( (LA12_56=='e') ) {
+ int LA12_60 = input.LA(9);
+
+ if ( (LA12_60=='r') ) {
+ int LA12_63 = input.LA(10);
+
+ if ( ((LA12_63>='0' && LA12_63<='9')||(LA12_63>='A' && LA12_63<='Z')||LA12_63=='_'||(LA12_63>='a' && LA12_63<='z')) ) {
+ alt12=14;
+ }
+ else {
+ alt12=1;}
+ }
+ else {
+ alt12=14;}
+ }
+ else {
+ alt12=14;}
+ }
+ else {
+ alt12=14;}
+ }
+ else {
+ alt12=14;}
+ }
+ else {
+ alt12=14;}
+ }
+ else {
+ alt12=14;}
+ }
+ else {
+ alt12=14;}
+ }
+ break;
+ case 'h':
+ {
+ int LA12_22 = input.LA(3);
+
+ if ( (LA12_22=='i') ) {
+ int LA12_41 = input.LA(4);
+
+ if ( (LA12_41=='l') ) {
+ int LA12_45 = input.LA(5);
+
+ if ( (LA12_45=='d') ) {
+ int LA12_49 = input.LA(6);
+
+ if ( (LA12_49=='r') ) {
+ int LA12_53 = input.LA(7);
+
+ if ( (LA12_53=='e') ) {
+ int LA12_57 = input.LA(8);
+
+ if ( (LA12_57=='n') ) {
+ int LA12_61 = input.LA(9);
+
+ if ( ((LA12_61>='0' && LA12_61<='9')||(LA12_61>='A' && LA12_61<='Z')||LA12_61=='_'||(LA12_61>='a' && LA12_61<='z')) ) {
+ alt12=14;
+ }
+ else {
+ alt12=5;}
+ }
+ else {
+ alt12=14;}
+ }
+ else {
+ alt12=14;}
+ }
+ else {
+ alt12=14;}
+ }
+ else {
+ alt12=14;}
+ }
+ else {
+ alt12=14;}
+ }
+ else {
+ alt12=14;}
+ }
+ break;
+ default:
+ alt12=14;}
+
+ }
+ else if ( (LA12_0=='{') ) {
+ alt12=2;
+ }
+ else if ( (LA12_0=='}') ) {
+ alt12=3;
+ }
+ else if ( (LA12_0=='n') ) {
+ int LA12_4 = input.LA(2);
+
+ if ( (LA12_4=='e') ) {
+ int LA12_26 = input.LA(3);
+
+ if ( (LA12_26=='s') ) {
+ int LA12_42 = input.LA(4);
+
+ if ( (LA12_42=='t') ) {
+ int LA12_46 = input.LA(5);
+
+ if ( (LA12_46=='e') ) {
+ int LA12_50 = input.LA(6);
+
+ if ( (LA12_50=='d') ) {
+ int LA12_54 = input.LA(7);
+
+ if ( ((LA12_54>='0' && LA12_54<='9')||(LA12_54>='A' && LA12_54<='Z')||LA12_54=='_'||(LA12_54>='a' && LA12_54<='z')) ) {
+ alt12=14;
+ }
+ else {
+ alt12=4;}
+ }
+ else {
+ alt12=14;}
+ }
+ else {
+ alt12=14;}
+ }
+ else {
+ alt12=14;}
+ }
+ else {
+ alt12=14;}
+ }
+ else {
+ alt12=14;}
+ }
+ else if ( (LA12_0==',') ) {
+ alt12=6;
+ }
+ else if ( (LA12_0=='-') ) {
+ int LA12_6 = input.LA(2);
+
+ if ( (LA12_6=='>') ) {
+ alt12=7;
+ }
+ else {
+ alt12=20;}
+ }
+ else if ( (LA12_0=='C') ) {
+ int LA12_7 = input.LA(2);
+
+ if ( ((LA12_7>='0' && LA12_7<='9')||(LA12_7>='A' && LA12_7<='Z')||LA12_7=='_'||(LA12_7>='a' && LA12_7<='z')) ) {
+ alt12=14;
+ }
+ else {
+ alt12=8;}
+ }
+ else if ( (LA12_0=='(') ) {
+ alt12=9;
+ }
+ else if ( (LA12_0==')') ) {
+ alt12=10;
+ }
+ else if ( (LA12_0=='a') ) {
+ int LA12_10 = input.LA(2);
+
+ if ( (LA12_10=='b') ) {
+ int LA12_32 = input.LA(3);
+
+ if ( (LA12_32=='s') ) {
+ int LA12_43 = input.LA(4);
+
+ if ( (LA12_43=='t') ) {
+ int LA12_47 = input.LA(5);
+
+ if ( (LA12_47=='r') ) {
+ int LA12_51 = input.LA(6);
+
+ if ( (LA12_51=='a') ) {
+ int LA12_55 = input.LA(7);
+
+ if ( (LA12_55=='c') ) {
+ int LA12_59 = input.LA(8);
+
+ if ( (LA12_59=='t') ) {
+ int LA12_62 = input.LA(9);
+
+ if ( (LA12_62==' ') ) {
+ alt12=11;
+ }
+ else {
+ alt12=14;}
+ }
+ else {
+ alt12=14;}
+ }
+ else {
+ alt12=14;}
+ }
+ else {
+ alt12=14;}
+ }
+ else {
+ alt12=14;}
+ }
+ else {
+ alt12=14;}
+ }
+ else {
+ alt12=14;}
+ }
+ else {
+ alt12=14;}
+ }
+ else if ( (LA12_0=='F') ) {
+ int LA12_11 = input.LA(2);
+
+ if ( ((LA12_11>='0' && LA12_11<='9')||(LA12_11>='A' && LA12_11<='Z')||LA12_11=='_'||(LA12_11>='a' && LA12_11<='z')) ) {
+ alt12=14;
+ }
+ else {
+ alt12=12;}
+ }
+ else if ( (LA12_0=='S') ) {
+ int LA12_12 = input.LA(2);
+
+ if ( ((LA12_12>='0' && LA12_12<='9')||(LA12_12>='A' && LA12_12<='Z')||LA12_12=='_'||(LA12_12>='a' && LA12_12<='z')) ) {
+ alt12=14;
+ }
+ else {
+ alt12=13;}
+ }
+ else if ( (LA12_0=='^') ) {
+ int LA12_13 = input.LA(2);
+
+ if ( ((LA12_13>='A' && LA12_13<='Z')||LA12_13=='_'||(LA12_13>='a' && LA12_13<='z')) ) {
+ alt12=14;
+ }
+ else {
+ alt12=20;}
+ }
+ else if ( ((LA12_0>='A' && LA12_0<='B')||(LA12_0>='D' && LA12_0<='E')||(LA12_0>='G' && LA12_0<='R')||(LA12_0>='T' && LA12_0<='Z')||LA12_0=='_'||LA12_0=='b'||(LA12_0>='d' && LA12_0<='m')||(LA12_0>='o' && LA12_0<='z')) ) {
+ alt12=14;
+ }
+ else if ( ((LA12_0>='0' && LA12_0<='9')) ) {
+ alt12=15;
+ }
+ else if ( (LA12_0=='\"') ) {
+ int LA12_16 = input.LA(2);
+
+ if ( ((LA12_16>='\u0000' && LA12_16<='\uFFFE')) ) {
+ alt12=16;
+ }
+ else {
+ alt12=20;}
+ }
+ else if ( (LA12_0=='\'') ) {
+ int LA12_17 = input.LA(2);
+
+ if ( ((LA12_17>='\u0000' && LA12_17<='\uFFFE')) ) {
+ alt12=16;
+ }
+ else {
+ alt12=20;}
+ }
+ else if ( (LA12_0=='/') ) {
+ switch ( input.LA(2) ) {
+ case '/':
+ {
+ alt12=18;
+ }
+ break;
+ case '*':
+ {
+ alt12=17;
+ }
+ break;
+ default:
+ alt12=20;}
+
+ }
+ else if ( ((LA12_0>='\t' && LA12_0<='\n')||LA12_0=='\r'||LA12_0==' ') ) {
+ alt12=19;
+ }
+ 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<='\uFFFE')) ) {
+ alt12=20;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("1:1: Tokens : ( T11 | T12 | T13 | T14 | T15 | T16 | T17 | T18 | T19 | T20 | T21 | T22 | T23 | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER );", 12, 0, input);
+
+ throw nvae;
+ }
+ switch (alt12) {
+ case 1 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:1:10: T11
+ {
+ mT11();
+
+ }
+ break;
+ case 2 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:1:14: T12
+ {
+ mT12();
+
+ }
+ break;
+ case 3 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:1:18: T13
+ {
+ mT13();
+
+ }
+ break;
+ case 4 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:1:22: T14
+ {
+ mT14();
+
+ }
+ break;
+ case 5 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:1:26: T15
+ {
+ mT15();
+
+ }
+ break;
+ case 6 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:1:30: T16
+ {
+ mT16();
+
+ }
+ break;
+ case 7 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:1:34: T17
+ {
+ mT17();
+
+ }
+ break;
+ case 8 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:1:38: T18
+ {
+ mT18();
+
+ }
+ break;
+ case 9 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:1:42: T19
+ {
+ mT19();
+
+ }
+ break;
+ case 10 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:1:46: T20
+ {
+ mT20();
+
+ }
+ break;
+ case 11 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:1:50: T21
+ {
+ mT21();
+
+ }
+ break;
+ case 12 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:1:54: T22
+ {
+ mT22();
+
+ }
+ break;
+ case 13 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:1:58: T23
+ {
+ mT23();
+
+ }
+ break;
+ case 14 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:1:62: RULE_ID
+ {
+ mRULE_ID();
+
+ }
+ break;
+ case 15 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:1:70: RULE_INT
+ {
+ mRULE_INT();
+
+ }
+ break;
+ case 16 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:1:79: RULE_STRING
+ {
+ mRULE_STRING();
+
+ }
+ break;
+ case 17 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:1:91: RULE_ML_COMMENT
+ {
+ mRULE_ML_COMMENT();
+
+ }
+ break;
+ case 18 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:1:107: RULE_SL_COMMENT
+ {
+ mRULE_SL_COMMENT();
+
+ }
+ break;
+ case 19 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:1:123: RULE_WS
+ {
+ mRULE_WS();
+
+ }
+ break;
+ case 20 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:1:131: RULE_ANY_OTHER
+ {
+ mRULE_ANY_OTHER();
+
+ }
+ break;
+
+ }
+
+ }
+
+
+
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguageParser.java
new file mode 100644
index 0000000..337c848
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguageParser.java
@@ -0,0 +1,1596 @@
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g 2008-11-28 17:29:28
+
+package org.eclipse.xtext.testlanguages.parser.internal;
+
+import java.io.InputStream;
+import org.eclipse.xtext.*;
+import org.eclipse.xtext.parser.*;
+import org.eclipse.xtext.parser.impl.*;
+import org.eclipse.xtext.parsetree.*;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.parser.antlr.AbstractAntlrParser;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream;
+
+
+import org.antlr.runtime.*;
+import java.util.Stack;
+import java.util.List;
+import java.util.ArrayList;
+
+public class InternalPartialParserTestLanguageParser extends AbstractAntlrParser {
+ 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", "'container'", "'{'", "'}'", "'nested'", "'children'", "','", "'->'", "'C'", "'('", "')'", "'abstract children'", "'F'", "'S'"
+ };
+ public static final int RULE_ML_COMMENT=7;
+ public static final int RULE_ID=4;
+ public static final int RULE_WS=9;
+ public static final int EOF=-1;
+ public static final int RULE_INT=5;
+ public static final int RULE_STRING=6;
+ public static final int RULE_ANY_OTHER=10;
+ public static final int RULE_SL_COMMENT=8;
+
+ public InternalPartialParserTestLanguageParser(TokenStream input) {
+ super(input);
+ }
+
+
+ public String[] getTokenNames() { return tokenNames; }
+ public String getGrammarFileName() { return "./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g"; }
+
+
+
+ public InternalPartialParserTestLanguageParser(TokenStream input, IAstFactory factory, Grammar g) {
+ this(input);
+ this.factory = factory;
+ grammar = g;
+ }
+
+ @Override
+ protected InputStream getTokenFile() {
+ ClassLoader classLoader = InternalPartialParserTestLanguageParser.class.getClassLoader();
+ return classLoader.getResourceAsStream("org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.tokens");
+ }
+
+ @Override
+ protected String getFirstRuleName() {
+ return "Container";
+ }
+
+
+
+ // $ANTLR start entryRuleContainer
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:62:1: entryRuleContainer returns [EObject current=null] : iv_ruleContainer= ruleContainer EOF ;
+ public final EObject entryRuleContainer() throws RecognitionException {
+ EObject current = null;
+
+ EObject iv_ruleContainer = null;
+
+
+ try {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:62:51: (iv_ruleContainer= ruleContainer EOF )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:63:2: iv_ruleContainer= ruleContainer EOF
+ {
+ currentNode = createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.0" /* xtext::ParserRule */, currentNode);
+ pushFollow(FOLLOW_ruleContainer_in_entryRuleContainer70);
+ iv_ruleContainer=ruleContainer();
+ _fsp--;
+
+ current =iv_ruleContainer;
+ match(input,EOF,FOLLOW_EOF_in_entryRuleContainer80);
+
+ }
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end entryRuleContainer
+
+
+ // $ANTLR start ruleContainer
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:70:1: ruleContainer returns [EObject current=null] : ( ( ( ( 'container' (lv_name= RULE_ID ) ) '{' ) ( (lv_nested= ruleNested ) | (lv_content= ruleContent ) )* ) '}' ) ;
+ public final EObject ruleContainer() throws RecognitionException {
+ EObject current = null;
+
+ Token lv_name=null;
+ EObject lv_nested = null;
+
+ EObject lv_content = null;
+
+
+ EObject temp=null; setCurrentLookahead(); resetLookahead();
+ try {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:72:33: ( ( ( ( ( 'container' (lv_name= RULE_ID ) ) '{' ) ( (lv_nested= ruleNested ) | (lv_content= ruleContent ) )* ) '}' ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:73:1: ( ( ( ( 'container' (lv_name= RULE_ID ) ) '{' ) ( (lv_nested= ruleNested ) | (lv_content= ruleContent ) )* ) '}' )
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:73:1: ( ( ( ( 'container' (lv_name= RULE_ID ) ) '{' ) ( (lv_nested= ruleNested ) | (lv_content= ruleContent ) )* ) '}' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:73:2: ( ( ( 'container' (lv_name= RULE_ID ) ) '{' ) ( (lv_nested= ruleNested ) | (lv_content= ruleContent ) )* ) '}'
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:73:2: ( ( ( 'container' (lv_name= RULE_ID ) ) '{' ) ( (lv_nested= ruleNested ) | (lv_content= ruleContent ) )* )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:73:3: ( ( 'container' (lv_name= RULE_ID ) ) '{' ) ( (lv_nested= ruleNested ) | (lv_content= ruleContent ) )*
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:73:3: ( ( 'container' (lv_name= RULE_ID ) ) '{' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:73:4: ( 'container' (lv_name= RULE_ID ) ) '{'
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:73:4: ( 'container' (lv_name= RULE_ID ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:73:5: 'container' (lv_name= RULE_ID )
+ {
+ match(input,11,FOLLOW_11_in_ruleContainer117);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0" /* xtext::Keyword */, null);
+
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:77:1: (lv_name= RULE_ID )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:79:6: lv_name= RULE_ID
+ {
+ lv_name=(Token)input.LT(1);
+ match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleContainer138);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1/@terminal" /* xtext::RuleCall */, "name");
+
+
+ if (current==null) {
+ current = factory.create("Container");
+ associateNodeWithAstElement(currentNode, current);
+ }
+
+ factory.set(current, "name", lv_name,"ID");
+
+
+ }
+
+
+ }
+
+ match(input,12,FOLLOW_12_in_ruleContainer159);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1" /* xtext::Keyword */, null);
+
+
+ }
+
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:97:2: ( (lv_nested= ruleNested ) | (lv_content= ruleContent ) )*
+ loop1:
+ do {
+ int alt1=3;
+ int LA1_0 = input.LA(1);
+
+ if ( (LA1_0==14) ) {
+ alt1=1;
+ }
+ else if ( (LA1_0==15||LA1_0==21) ) {
+ alt1=2;
+ }
+
+
+ switch (alt1) {
+ case 1 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:97:3: (lv_nested= ruleNested )
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:97:3: (lv_nested= ruleNested )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:100:6: lv_nested= ruleNested
+ {
+
+ currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.1/@groups.0/@terminal" /* xtext::RuleCall */, currentNode);
+
+ pushFollow(FOLLOW_ruleNested_in_ruleContainer195);
+ lv_nested=ruleNested();
+ _fsp--;
+
+
+ currentNode = currentNode.getParent();
+ if (current==null) {
+ current = factory.create("Container");
+ associateNodeWithAstElement(currentNode, current);
+ }
+
+ factory.add(current, "nested", lv_nested,null);
+
+
+ }
+
+
+ }
+ break;
+ case 2 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:115:6: (lv_content= ruleContent )
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:115:6: (lv_content= ruleContent )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:118:6: lv_content= ruleContent
+ {
+
+ currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.1/@groups.1/@terminal" /* xtext::RuleCall */, currentNode);
+
+ pushFollow(FOLLOW_ruleContent_in_ruleContainer239);
+ lv_content=ruleContent();
+ _fsp--;
+
+
+ currentNode = currentNode.getParent();
+ if (current==null) {
+ current = factory.create("Container");
+ associateNodeWithAstElement(currentNode, current);
+ }
+
+ factory.add(current, "content", lv_content,null);
+
+
+ }
+
+
+ }
+ break;
+
+ default :
+ break loop1;
+ }
+ } while (true);
+
+
+ }
+
+ match(input,13,FOLLOW_13_in_ruleContainer255);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.0/@alternatives/@abstractTokens.1" /* xtext::Keyword */, null);
+
+
+ }
+
+
+ }
+
+ resetLookahead();
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end ruleContainer
+
+
+ // $ANTLR start entryRuleNested
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:141:1: entryRuleNested returns [EObject current=null] : iv_ruleNested= ruleNested EOF ;
+ public final EObject entryRuleNested() throws RecognitionException {
+ EObject current = null;
+
+ EObject iv_ruleNested = null;
+
+
+ try {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:141:48: (iv_ruleNested= ruleNested EOF )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:142:2: iv_ruleNested= ruleNested EOF
+ {
+ currentNode = createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.1" /* xtext::ParserRule */, currentNode);
+ pushFollow(FOLLOW_ruleNested_in_entryRuleNested290);
+ iv_ruleNested=ruleNested();
+ _fsp--;
+
+ current =iv_ruleNested;
+ match(input,EOF,FOLLOW_EOF_in_entryRuleNested300);
+
+ }
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end entryRuleNested
+
+
+ // $ANTLR start ruleNested
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:149:1: ruleNested returns [EObject current=null] : ( ( ( 'nested' '{' ) (lv_nested= ruleContainer )+ ) '}' ) ;
+ public final EObject ruleNested() throws RecognitionException {
+ EObject current = null;
+
+ EObject lv_nested = null;
+
+
+ EObject temp=null; setCurrentLookahead(); resetLookahead();
+ try {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:151:33: ( ( ( ( 'nested' '{' ) (lv_nested= ruleContainer )+ ) '}' ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:152:1: ( ( ( 'nested' '{' ) (lv_nested= ruleContainer )+ ) '}' )
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:152:1: ( ( ( 'nested' '{' ) (lv_nested= ruleContainer )+ ) '}' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:152:2: ( ( 'nested' '{' ) (lv_nested= ruleContainer )+ ) '}'
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:152:2: ( ( 'nested' '{' ) (lv_nested= ruleContainer )+ )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:152:3: ( 'nested' '{' ) (lv_nested= ruleContainer )+
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:152:3: ( 'nested' '{' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:152:4: 'nested' '{'
+ {
+ match(input,14,FOLLOW_14_in_ruleNested336);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.1/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0" /* xtext::Keyword */, null);
+
+ match(input,12,FOLLOW_12_in_ruleNested345);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.1/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1" /* xtext::Keyword */, null);
+
+
+ }
+
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:160:2: (lv_nested= ruleContainer )+
+ int cnt2=0;
+ loop2:
+ do {
+ int alt2=2;
+ int LA2_0 = input.LA(1);
+
+ if ( (LA2_0==11) ) {
+ alt2=1;
+ }
+
+
+ switch (alt2) {
+ case 1 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:163:6: lv_nested= ruleContainer
+ {
+
+ currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.1/@alternatives/@abstractTokens.0/@abstractTokens.1/@terminal" /* xtext::RuleCall */, currentNode);
+
+ pushFollow(FOLLOW_ruleContainer_in_ruleNested380);
+ lv_nested=ruleContainer();
+ _fsp--;
+
+
+ currentNode = currentNode.getParent();
+ if (current==null) {
+ current = factory.create("Nested");
+ associateNodeWithAstElement(currentNode, current);
+ }
+
+ factory.add(current, "nested", lv_nested,null);
+
+
+ }
+ break;
+
+ default :
+ if ( cnt2 >= 1 ) break loop2;
+ EarlyExitException eee =
+ new EarlyExitException(2, input);
+ throw eee;
+ }
+ cnt2++;
+ } while (true);
+
+
+ }
+
+ match(input,13,FOLLOW_13_in_ruleNested395);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.1/@alternatives/@abstractTokens.1" /* xtext::Keyword */, null);
+
+
+ }
+
+
+ }
+
+ resetLookahead();
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end ruleNested
+
+
+ // $ANTLR start entryRuleContent
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:186:1: entryRuleContent returns [EObject current=null] : iv_ruleContent= ruleContent EOF ;
+ public final EObject entryRuleContent() throws RecognitionException {
+ EObject current = null;
+
+ EObject iv_ruleContent = null;
+
+
+ try {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:186:49: (iv_ruleContent= ruleContent EOF )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:187:2: iv_ruleContent= ruleContent EOF
+ {
+ currentNode = createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.2" /* xtext::ParserRule */, currentNode);
+ pushFollow(FOLLOW_ruleContent_in_entryRuleContent430);
+ iv_ruleContent=ruleContent();
+ _fsp--;
+
+ current =iv_ruleContent;
+ match(input,EOF,FOLLOW_EOF_in_entryRuleContent440);
+
+ }
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end entryRuleContent
+
+
+ // $ANTLR start ruleContent
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:194:1: ruleContent returns [EObject current=null] : (this_Children= ruleChildren | this_AbstractChildren= ruleAbstractChildren ) ;
+ public final EObject ruleContent() throws RecognitionException {
+ EObject current = null;
+
+ EObject this_Children = null;
+
+ EObject this_AbstractChildren = null;
+
+
+ EObject temp=null; setCurrentLookahead(); resetLookahead();
+ try {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:196:33: ( (this_Children= ruleChildren | this_AbstractChildren= ruleAbstractChildren ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:197:1: (this_Children= ruleChildren | this_AbstractChildren= ruleAbstractChildren )
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:197:1: (this_Children= ruleChildren | this_AbstractChildren= ruleAbstractChildren )
+ int alt3=2;
+ int LA3_0 = input.LA(1);
+
+ if ( (LA3_0==15) ) {
+ alt3=1;
+ }
+ else if ( (LA3_0==21) ) {
+ alt3=2;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("197:1: (this_Children= ruleChildren | this_AbstractChildren= ruleAbstractChildren )", 3, 0, input);
+
+ throw nvae;
+ }
+ switch (alt3) {
+ case 1 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:198:5: this_Children= ruleChildren
+ {
+
+ currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.2/@alternatives/@groups.0" /* xtext::RuleCall */, currentNode);
+
+ pushFollow(FOLLOW_ruleChildren_in_ruleContent487);
+ this_Children=ruleChildren();
+ _fsp--;
+
+
+ current = this_Children;
+ currentNode = currentNode.getParent();
+
+
+ }
+ break;
+ case 2 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:208:5: this_AbstractChildren= ruleAbstractChildren
+ {
+
+ currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.2/@alternatives/@groups.1" /* xtext::RuleCall */, currentNode);
+
+ pushFollow(FOLLOW_ruleAbstractChildren_in_ruleContent514);
+ this_AbstractChildren=ruleAbstractChildren();
+ _fsp--;
+
+
+ current = this_AbstractChildren;
+ currentNode = currentNode.getParent();
+
+
+ }
+ break;
+
+ }
+
+
+ }
+
+ resetLookahead();
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end ruleContent
+
+
+ // $ANTLR start entryRuleChildren
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:221:1: entryRuleChildren returns [EObject current=null] : iv_ruleChildren= ruleChildren EOF ;
+ public final EObject entryRuleChildren() throws RecognitionException {
+ EObject current = null;
+
+ EObject iv_ruleChildren = null;
+
+
+ try {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:221:50: (iv_ruleChildren= ruleChildren EOF )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:222:2: iv_ruleChildren= ruleChildren EOF
+ {
+ currentNode = createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.3" /* xtext::ParserRule */, currentNode);
+ pushFollow(FOLLOW_ruleChildren_in_entryRuleChildren548);
+ iv_ruleChildren=ruleChildren();
+ _fsp--;
+
+ current =iv_ruleChildren;
+ match(input,EOF,FOLLOW_EOF_in_entryRuleChildren558);
+
+ }
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end entryRuleChildren
+
+
+ // $ANTLR start ruleChildren
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:229:1: ruleChildren returns [EObject current=null] : ( ( ( ( 'children' '{' ) (lv_children= ruleChild ) ) ( ',' (lv_children= ruleChild ) )* ) '}' ) ;
+ public final EObject ruleChildren() throws RecognitionException {
+ EObject current = null;
+
+ EObject lv_children = null;
+
+
+ EObject temp=null; setCurrentLookahead(); resetLookahead();
+ try {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:231:33: ( ( ( ( ( 'children' '{' ) (lv_children= ruleChild ) ) ( ',' (lv_children= ruleChild ) )* ) '}' ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:232:1: ( ( ( ( 'children' '{' ) (lv_children= ruleChild ) ) ( ',' (lv_children= ruleChild ) )* ) '}' )
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:232:1: ( ( ( ( 'children' '{' ) (lv_children= ruleChild ) ) ( ',' (lv_children= ruleChild ) )* ) '}' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:232:2: ( ( ( 'children' '{' ) (lv_children= ruleChild ) ) ( ',' (lv_children= ruleChild ) )* ) '}'
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:232:2: ( ( ( 'children' '{' ) (lv_children= ruleChild ) ) ( ',' (lv_children= ruleChild ) )* )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:232:3: ( ( 'children' '{' ) (lv_children= ruleChild ) ) ( ',' (lv_children= ruleChild ) )*
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:232:3: ( ( 'children' '{' ) (lv_children= ruleChild ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:232:4: ( 'children' '{' ) (lv_children= ruleChild )
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:232:4: ( 'children' '{' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:232:5: 'children' '{'
+ {
+ match(input,15,FOLLOW_15_in_ruleChildren595);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.3/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0" /* xtext::Keyword */, null);
+
+ match(input,12,FOLLOW_12_in_ruleChildren604);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.3/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1" /* xtext::Keyword */, null);
+
+
+ }
+
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:240:2: (lv_children= ruleChild )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:243:6: lv_children= ruleChild
+ {
+
+ currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.3/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1/@terminal" /* xtext::RuleCall */, currentNode);
+
+ pushFollow(FOLLOW_ruleChild_in_ruleChildren639);
+ lv_children=ruleChild();
+ _fsp--;
+
+
+ currentNode = currentNode.getParent();
+ if (current==null) {
+ current = factory.create("Children");
+ associateNodeWithAstElement(currentNode, current);
+ }
+
+ factory.add(current, "children", lv_children,null);
+
+
+ }
+
+
+ }
+
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:257:3: ( ',' (lv_children= ruleChild ) )*
+ loop4:
+ do {
+ int alt4=2;
+ int LA4_0 = input.LA(1);
+
+ if ( (LA4_0==16) ) {
+ alt4=1;
+ }
+
+
+ switch (alt4) {
+ case 1 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:257:4: ',' (lv_children= ruleChild )
+ {
+ match(input,16,FOLLOW_16_in_ruleChildren654);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.3/@alternatives/@abstractTokens.0/@abstractTokens.1/@abstractTokens.0" /* xtext::Keyword */, null);
+
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:261:1: (lv_children= ruleChild )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:264:6: lv_children= ruleChild
+ {
+
+ currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.3/@alternatives/@abstractTokens.0/@abstractTokens.1/@abstractTokens.1/@terminal" /* xtext::RuleCall */, currentNode);
+
+ pushFollow(FOLLOW_ruleChild_in_ruleChildren688);
+ lv_children=ruleChild();
+ _fsp--;
+
+
+ currentNode = currentNode.getParent();
+ if (current==null) {
+ current = factory.create("Children");
+ associateNodeWithAstElement(currentNode, current);
+ }
+
+ factory.add(current, "children", lv_children,null);
+
+
+ }
+
+
+ }
+ break;
+
+ default :
+ break loop4;
+ }
+ } while (true);
+
+
+ }
+
+ match(input,13,FOLLOW_13_in_ruleChildren704);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.3/@alternatives/@abstractTokens.1" /* xtext::Keyword */, null);
+
+
+ }
+
+
+ }
+
+ resetLookahead();
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end ruleChildren
+
+
+ // $ANTLR start entryRuleChild
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:287:1: entryRuleChild returns [EObject current=null] : iv_ruleChild= ruleChild EOF ;
+ public final EObject entryRuleChild() throws RecognitionException {
+ EObject current = null;
+
+ EObject iv_ruleChild = null;
+
+
+ try {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:287:47: (iv_ruleChild= ruleChild EOF )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:288:2: iv_ruleChild= ruleChild EOF
+ {
+ currentNode = createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.4" /* xtext::ParserRule */, currentNode);
+ pushFollow(FOLLOW_ruleChild_in_entryRuleChild739);
+ iv_ruleChild=ruleChild();
+ _fsp--;
+
+ current =iv_ruleChild;
+ match(input,EOF,FOLLOW_EOF_in_entryRuleChild749);
+
+ }
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end entryRuleChild
+
+
+ // $ANTLR start ruleChild
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:295:1: ruleChild returns [EObject current=null] : ( ( ( ( '->' 'C' ) '(' ) (lv_value= ruleNamed ) ) ')' ) ;
+ public final EObject ruleChild() throws RecognitionException {
+ EObject current = null;
+
+ EObject lv_value = null;
+
+
+ EObject temp=null; setCurrentLookahead(); resetLookahead();
+ try {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:297:33: ( ( ( ( ( '->' 'C' ) '(' ) (lv_value= ruleNamed ) ) ')' ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:298:1: ( ( ( ( '->' 'C' ) '(' ) (lv_value= ruleNamed ) ) ')' )
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:298:1: ( ( ( ( '->' 'C' ) '(' ) (lv_value= ruleNamed ) ) ')' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:298:2: ( ( ( '->' 'C' ) '(' ) (lv_value= ruleNamed ) ) ')'
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:298:2: ( ( ( '->' 'C' ) '(' ) (lv_value= ruleNamed ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:298:3: ( ( '->' 'C' ) '(' ) (lv_value= ruleNamed )
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:298:3: ( ( '->' 'C' ) '(' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:298:4: ( '->' 'C' ) '('
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:298:4: ( '->' 'C' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:298:5: '->' 'C'
+ {
+ match(input,17,FOLLOW_17_in_ruleChild786);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.4/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0" /* xtext::Keyword */, null);
+
+ match(input,18,FOLLOW_18_in_ruleChild795);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.4/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1" /* xtext::Keyword */, null);
+
+
+ }
+
+ match(input,19,FOLLOW_19_in_ruleChild805);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.4/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1" /* xtext::Keyword */, null);
+
+
+ }
+
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:310:2: (lv_value= ruleNamed )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:313:6: lv_value= ruleNamed
+ {
+
+ currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.4/@alternatives/@abstractTokens.0/@abstractTokens.1/@terminal" /* xtext::RuleCall */, currentNode);
+
+ pushFollow(FOLLOW_ruleNamed_in_ruleChild840);
+ lv_value=ruleNamed();
+ _fsp--;
+
+
+ currentNode = currentNode.getParent();
+ if (current==null) {
+ current = factory.create("Child");
+ associateNodeWithAstElement(currentNode, current);
+ }
+
+ factory.set(current, "value", lv_value,null);
+
+
+ }
+
+
+ }
+
+ match(input,20,FOLLOW_20_in_ruleChild854);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.4/@alternatives/@abstractTokens.1" /* xtext::Keyword */, null);
+
+
+ }
+
+
+ }
+
+ resetLookahead();
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end ruleChild
+
+
+ // $ANTLR start entryRuleAbstractChildren
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:336:1: entryRuleAbstractChildren returns [EObject current=null] : iv_ruleAbstractChildren= ruleAbstractChildren EOF ;
+ public final EObject entryRuleAbstractChildren() throws RecognitionException {
+ EObject current = null;
+
+ EObject iv_ruleAbstractChildren = null;
+
+
+ try {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:336:58: (iv_ruleAbstractChildren= ruleAbstractChildren EOF )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:337:2: iv_ruleAbstractChildren= ruleAbstractChildren EOF
+ {
+ currentNode = createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.5" /* xtext::ParserRule */, currentNode);
+ pushFollow(FOLLOW_ruleAbstractChildren_in_entryRuleAbstractChildren889);
+ iv_ruleAbstractChildren=ruleAbstractChildren();
+ _fsp--;
+
+ current =iv_ruleAbstractChildren;
+ match(input,EOF,FOLLOW_EOF_in_entryRuleAbstractChildren899);
+
+ }
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end entryRuleAbstractChildren
+
+
+ // $ANTLR start ruleAbstractChildren
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:344:1: ruleAbstractChildren returns [EObject current=null] : ( ( ( 'abstract children' '{' ) (lv_abstractChildren= ruleAbstractChild )+ ) '}' ) ;
+ public final EObject ruleAbstractChildren() throws RecognitionException {
+ EObject current = null;
+
+ EObject lv_abstractChildren = null;
+
+
+ EObject temp=null; setCurrentLookahead(); resetLookahead();
+ try {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:346:33: ( ( ( ( 'abstract children' '{' ) (lv_abstractChildren= ruleAbstractChild )+ ) '}' ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:347:1: ( ( ( 'abstract children' '{' ) (lv_abstractChildren= ruleAbstractChild )+ ) '}' )
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:347:1: ( ( ( 'abstract children' '{' ) (lv_abstractChildren= ruleAbstractChild )+ ) '}' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:347:2: ( ( 'abstract children' '{' ) (lv_abstractChildren= ruleAbstractChild )+ ) '}'
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:347:2: ( ( 'abstract children' '{' ) (lv_abstractChildren= ruleAbstractChild )+ )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:347:3: ( 'abstract children' '{' ) (lv_abstractChildren= ruleAbstractChild )+
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:347:3: ( 'abstract children' '{' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:347:4: 'abstract children' '{'
+ {
+ match(input,21,FOLLOW_21_in_ruleAbstractChildren935);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.5/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0" /* xtext::Keyword */, null);
+
+ match(input,12,FOLLOW_12_in_ruleAbstractChildren944);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.5/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1" /* xtext::Keyword */, null);
+
+
+ }
+
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:355:2: (lv_abstractChildren= ruleAbstractChild )+
+ int cnt5=0;
+ loop5:
+ do {
+ int alt5=2;
+ int LA5_0 = input.LA(1);
+
+ if ( (LA5_0==17) ) {
+ alt5=1;
+ }
+
+
+ switch (alt5) {
+ case 1 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:358:6: lv_abstractChildren= ruleAbstractChild
+ {
+
+ currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.5/@alternatives/@abstractTokens.0/@abstractTokens.1/@terminal" /* xtext::RuleCall */, currentNode);
+
+ pushFollow(FOLLOW_ruleAbstractChild_in_ruleAbstractChildren979);
+ lv_abstractChildren=ruleAbstractChild();
+ _fsp--;
+
+
+ currentNode = currentNode.getParent();
+ if (current==null) {
+ current = factory.create("AbstractChildren");
+ associateNodeWithAstElement(currentNode, current);
+ }
+
+ factory.add(current, "abstractChildren", lv_abstractChildren,null);
+
+
+ }
+ break;
+
+ default :
+ if ( cnt5 >= 1 ) break loop5;
+ EarlyExitException eee =
+ new EarlyExitException(5, input);
+ throw eee;
+ }
+ cnt5++;
+ } while (true);
+
+
+ }
+
+ match(input,13,FOLLOW_13_in_ruleAbstractChildren994);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.5/@alternatives/@abstractTokens.1" /* xtext::Keyword */, null);
+
+
+ }
+
+
+ }
+
+ resetLookahead();
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end ruleAbstractChildren
+
+
+ // $ANTLR start entryRuleAbstractChild
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:381:1: entryRuleAbstractChild returns [EObject current=null] : iv_ruleAbstractChild= ruleAbstractChild EOF ;
+ public final EObject entryRuleAbstractChild() throws RecognitionException {
+ EObject current = null;
+
+ EObject iv_ruleAbstractChild = null;
+
+
+ try {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:381:55: (iv_ruleAbstractChild= ruleAbstractChild EOF )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:382:2: iv_ruleAbstractChild= ruleAbstractChild EOF
+ {
+ currentNode = createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.6" /* xtext::ParserRule */, currentNode);
+ pushFollow(FOLLOW_ruleAbstractChild_in_entryRuleAbstractChild1029);
+ iv_ruleAbstractChild=ruleAbstractChild();
+ _fsp--;
+
+ current =iv_ruleAbstractChild;
+ match(input,EOF,FOLLOW_EOF_in_entryRuleAbstractChild1039);
+
+ }
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end entryRuleAbstractChild
+
+
+ // $ANTLR start ruleAbstractChild
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:389:1: ruleAbstractChild returns [EObject current=null] : (this_FirstConcrete= ruleFirstConcrete | this_SecondConcrete= ruleSecondConcrete ) ;
+ public final EObject ruleAbstractChild() throws RecognitionException {
+ EObject current = null;
+
+ EObject this_FirstConcrete = null;
+
+ EObject this_SecondConcrete = null;
+
+
+ EObject temp=null; setCurrentLookahead(); resetLookahead();
+ try {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:391:33: ( (this_FirstConcrete= ruleFirstConcrete | this_SecondConcrete= ruleSecondConcrete ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:392:1: (this_FirstConcrete= ruleFirstConcrete | this_SecondConcrete= ruleSecondConcrete )
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:392:1: (this_FirstConcrete= ruleFirstConcrete | this_SecondConcrete= ruleSecondConcrete )
+ int alt6=2;
+ int LA6_0 = input.LA(1);
+
+ if ( (LA6_0==17) ) {
+ int LA6_1 = input.LA(2);
+
+ if ( (LA6_1==22) ) {
+ int LA6_2 = input.LA(3);
+
+ if ( (LA6_2==19) ) {
+ alt6=1;
+ }
+ else if ( (LA6_2==23) ) {
+ alt6=2;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("392:1: (this_FirstConcrete= ruleFirstConcrete | this_SecondConcrete= ruleSecondConcrete )", 6, 2, input);
+
+ throw nvae;
+ }
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("392:1: (this_FirstConcrete= ruleFirstConcrete | this_SecondConcrete= ruleSecondConcrete )", 6, 1, input);
+
+ throw nvae;
+ }
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("392:1: (this_FirstConcrete= ruleFirstConcrete | this_SecondConcrete= ruleSecondConcrete )", 6, 0, input);
+
+ throw nvae;
+ }
+ switch (alt6) {
+ case 1 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:393:5: this_FirstConcrete= ruleFirstConcrete
+ {
+
+ currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.6/@alternatives/@groups.0" /* xtext::RuleCall */, currentNode);
+
+ pushFollow(FOLLOW_ruleFirstConcrete_in_ruleAbstractChild1086);
+ this_FirstConcrete=ruleFirstConcrete();
+ _fsp--;
+
+
+ current = this_FirstConcrete;
+ currentNode = currentNode.getParent();
+
+
+ }
+ break;
+ case 2 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:403:5: this_SecondConcrete= ruleSecondConcrete
+ {
+
+ currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.6/@alternatives/@groups.1" /* xtext::RuleCall */, currentNode);
+
+ pushFollow(FOLLOW_ruleSecondConcrete_in_ruleAbstractChild1113);
+ this_SecondConcrete=ruleSecondConcrete();
+ _fsp--;
+
+
+ current = this_SecondConcrete;
+ currentNode = currentNode.getParent();
+
+
+ }
+ break;
+
+ }
+
+
+ }
+
+ resetLookahead();
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end ruleAbstractChild
+
+
+ // $ANTLR start entryRuleFirstConcrete
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:416:1: entryRuleFirstConcrete returns [EObject current=null] : iv_ruleFirstConcrete= ruleFirstConcrete EOF ;
+ public final EObject entryRuleFirstConcrete() throws RecognitionException {
+ EObject current = null;
+
+ EObject iv_ruleFirstConcrete = null;
+
+
+ try {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:416:55: (iv_ruleFirstConcrete= ruleFirstConcrete EOF )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:417:2: iv_ruleFirstConcrete= ruleFirstConcrete EOF
+ {
+ currentNode = createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.7" /* xtext::ParserRule */, currentNode);
+ pushFollow(FOLLOW_ruleFirstConcrete_in_entryRuleFirstConcrete1147);
+ iv_ruleFirstConcrete=ruleFirstConcrete();
+ _fsp--;
+
+ current =iv_ruleFirstConcrete;
+ match(input,EOF,FOLLOW_EOF_in_entryRuleFirstConcrete1157);
+
+ }
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end entryRuleFirstConcrete
+
+
+ // $ANTLR start ruleFirstConcrete
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:424:1: ruleFirstConcrete returns [EObject current=null] : ( ( ( ( ( '->' 'F' ) '(' ) (lv_value= ruleNamed ) ) ( ( RULE_ID ) )? ) ')' ) ;
+ public final EObject ruleFirstConcrete() throws RecognitionException {
+ EObject current = null;
+
+ EObject lv_value = null;
+
+
+ EObject temp=null; setCurrentLookahead(); resetLookahead();
+ try {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:426:33: ( ( ( ( ( ( '->' 'F' ) '(' ) (lv_value= ruleNamed ) ) ( ( RULE_ID ) )? ) ')' ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:427:1: ( ( ( ( ( '->' 'F' ) '(' ) (lv_value= ruleNamed ) ) ( ( RULE_ID ) )? ) ')' )
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:427:1: ( ( ( ( ( '->' 'F' ) '(' ) (lv_value= ruleNamed ) ) ( ( RULE_ID ) )? ) ')' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:427:2: ( ( ( ( '->' 'F' ) '(' ) (lv_value= ruleNamed ) ) ( ( RULE_ID ) )? ) ')'
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:427:2: ( ( ( ( '->' 'F' ) '(' ) (lv_value= ruleNamed ) ) ( ( RULE_ID ) )? )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:427:3: ( ( ( '->' 'F' ) '(' ) (lv_value= ruleNamed ) ) ( ( RULE_ID ) )?
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:427:3: ( ( ( '->' 'F' ) '(' ) (lv_value= ruleNamed ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:427:4: ( ( '->' 'F' ) '(' ) (lv_value= ruleNamed )
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:427:4: ( ( '->' 'F' ) '(' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:427:5: ( '->' 'F' ) '('
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:427:5: ( '->' 'F' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:427:6: '->' 'F'
+ {
+ match(input,17,FOLLOW_17_in_ruleFirstConcrete1195);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.7/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0" /* xtext::Keyword */, null);
+
+ match(input,22,FOLLOW_22_in_ruleFirstConcrete1204);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.7/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1" /* xtext::Keyword */, null);
+
+
+ }
+
+ match(input,19,FOLLOW_19_in_ruleFirstConcrete1214);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.7/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1" /* xtext::Keyword */, null);
+
+
+ }
+
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:439:2: (lv_value= ruleNamed )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:442:6: lv_value= ruleNamed
+ {
+
+ currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.7/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1/@terminal" /* xtext::RuleCall */, currentNode);
+
+ pushFollow(FOLLOW_ruleNamed_in_ruleFirstConcrete1249);
+ lv_value=ruleNamed();
+ _fsp--;
+
+
+ currentNode = currentNode.getParent();
+ if (current==null) {
+ current = factory.create("FirstConcrete");
+ associateNodeWithAstElement(currentNode, current);
+ }
+
+ factory.set(current, "value", lv_value,null);
+
+
+ }
+
+
+ }
+
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:456:3: ( ( RULE_ID ) )?
+ int alt7=2;
+ int LA7_0 = input.LA(1);
+
+ if ( (LA7_0==RULE_ID) ) {
+ alt7=1;
+ }
+ switch (alt7) {
+ case 1 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:459:3: ( RULE_ID )
+ {
+
+ if (current==null) {
+ current = factory.create("FirstConcrete");
+ associateNodeWithAstElement(currentNode, current);
+ }
+
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:465:1: ( RULE_ID )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:466:2: RULE_ID
+ {
+ match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleFirstConcrete1278);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.7/@alternatives/@abstractTokens.0/@abstractTokens.1/@terminal" /* xtext::CrossReference */, "referencedContainer");
+
+
+ }
+
+
+ }
+ break;
+
+ }
+
+
+ }
+
+ match(input,20,FOLLOW_20_in_ruleFirstConcrete1293);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.7/@alternatives/@abstractTokens.1" /* xtext::Keyword */, null);
+
+
+ }
+
+
+ }
+
+ resetLookahead();
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end ruleFirstConcrete
+
+
+ // $ANTLR start entryRuleSecondConcrete
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:480:1: entryRuleSecondConcrete returns [EObject current=null] : iv_ruleSecondConcrete= ruleSecondConcrete EOF ;
+ public final EObject entryRuleSecondConcrete() throws RecognitionException {
+ EObject current = null;
+
+ EObject iv_ruleSecondConcrete = null;
+
+
+ try {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:480:56: (iv_ruleSecondConcrete= ruleSecondConcrete EOF )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:481:2: iv_ruleSecondConcrete= ruleSecondConcrete EOF
+ {
+ currentNode = createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.8" /* xtext::ParserRule */, currentNode);
+ pushFollow(FOLLOW_ruleSecondConcrete_in_entryRuleSecondConcrete1328);
+ iv_ruleSecondConcrete=ruleSecondConcrete();
+ _fsp--;
+
+ current =iv_ruleSecondConcrete;
+ match(input,EOF,FOLLOW_EOF_in_entryRuleSecondConcrete1338);
+
+ }
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end entryRuleSecondConcrete
+
+
+ // $ANTLR start ruleSecondConcrete
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:488:1: ruleSecondConcrete returns [EObject current=null] : ( ( ( ( ( ( '->' 'F' ) 'S' ) '(' ) (lv_value= ruleNamed ) ) ( ( RULE_ID ) )? ) ')' ) ;
+ public final EObject ruleSecondConcrete() throws RecognitionException {
+ EObject current = null;
+
+ EObject lv_value = null;
+
+
+ EObject temp=null; setCurrentLookahead(); resetLookahead();
+ try {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:490:33: ( ( ( ( ( ( ( '->' 'F' ) 'S' ) '(' ) (lv_value= ruleNamed ) ) ( ( RULE_ID ) )? ) ')' ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:491:1: ( ( ( ( ( ( '->' 'F' ) 'S' ) '(' ) (lv_value= ruleNamed ) ) ( ( RULE_ID ) )? ) ')' )
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:491:1: ( ( ( ( ( ( '->' 'F' ) 'S' ) '(' ) (lv_value= ruleNamed ) ) ( ( RULE_ID ) )? ) ')' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:491:2: ( ( ( ( ( '->' 'F' ) 'S' ) '(' ) (lv_value= ruleNamed ) ) ( ( RULE_ID ) )? ) ')'
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:491:2: ( ( ( ( ( '->' 'F' ) 'S' ) '(' ) (lv_value= ruleNamed ) ) ( ( RULE_ID ) )? )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:491:3: ( ( ( ( '->' 'F' ) 'S' ) '(' ) (lv_value= ruleNamed ) ) ( ( RULE_ID ) )?
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:491:3: ( ( ( ( '->' 'F' ) 'S' ) '(' ) (lv_value= ruleNamed ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:491:4: ( ( ( '->' 'F' ) 'S' ) '(' ) (lv_value= ruleNamed )
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:491:4: ( ( ( '->' 'F' ) 'S' ) '(' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:491:5: ( ( '->' 'F' ) 'S' ) '('
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:491:5: ( ( '->' 'F' ) 'S' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:491:6: ( '->' 'F' ) 'S'
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:491:6: ( '->' 'F' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:491:7: '->' 'F'
+ {
+ match(input,17,FOLLOW_17_in_ruleSecondConcrete1377);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.8/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0" /* xtext::Keyword */, null);
+
+ match(input,22,FOLLOW_22_in_ruleSecondConcrete1386);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.8/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1" /* xtext::Keyword */, null);
+
+
+ }
+
+ match(input,23,FOLLOW_23_in_ruleSecondConcrete1396);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.8/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1" /* xtext::Keyword */, null);
+
+
+ }
+
+ match(input,19,FOLLOW_19_in_ruleSecondConcrete1406);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.8/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1" /* xtext::Keyword */, null);
+
+
+ }
+
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:507:2: (lv_value= ruleNamed )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:510:6: lv_value= ruleNamed
+ {
+
+ currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.8/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1/@terminal" /* xtext::RuleCall */, currentNode);
+
+ pushFollow(FOLLOW_ruleNamed_in_ruleSecondConcrete1441);
+ lv_value=ruleNamed();
+ _fsp--;
+
+
+ currentNode = currentNode.getParent();
+ if (current==null) {
+ current = factory.create("SecondConcrete");
+ associateNodeWithAstElement(currentNode, current);
+ }
+
+ factory.set(current, "value", lv_value,null);
+
+
+ }
+
+
+ }
+
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:524:3: ( ( RULE_ID ) )?
+ int alt8=2;
+ int LA8_0 = input.LA(1);
+
+ if ( (LA8_0==RULE_ID) ) {
+ alt8=1;
+ }
+ switch (alt8) {
+ case 1 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:527:3: ( RULE_ID )
+ {
+
+ if (current==null) {
+ current = factory.create("SecondConcrete");
+ associateNodeWithAstElement(currentNode, current);
+ }
+
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:533:1: ( RULE_ID )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:534:2: RULE_ID
+ {
+ match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleSecondConcrete1470);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.8/@alternatives/@abstractTokens.0/@abstractTokens.1/@terminal" /* xtext::CrossReference */, "referencedChildren");
+
+
+ }
+
+
+ }
+ break;
+
+ }
+
+
+ }
+
+ match(input,20,FOLLOW_20_in_ruleSecondConcrete1485);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.8/@alternatives/@abstractTokens.1" /* xtext::Keyword */, null);
+
+
+ }
+
+
+ }
+
+ resetLookahead();
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end ruleSecondConcrete
+
+
+ // $ANTLR start entryRuleNamed
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:548:1: entryRuleNamed returns [EObject current=null] : iv_ruleNamed= ruleNamed EOF ;
+ public final EObject entryRuleNamed() throws RecognitionException {
+ EObject current = null;
+
+ EObject iv_ruleNamed = null;
+
+
+ try {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:548:47: (iv_ruleNamed= ruleNamed EOF )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:549:2: iv_ruleNamed= ruleNamed EOF
+ {
+ currentNode = createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.9" /* xtext::ParserRule */, currentNode);
+ pushFollow(FOLLOW_ruleNamed_in_entryRuleNamed1520);
+ iv_ruleNamed=ruleNamed();
+ _fsp--;
+
+ current =iv_ruleNamed;
+ match(input,EOF,FOLLOW_EOF_in_entryRuleNamed1530);
+
+ }
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end entryRuleNamed
+
+
+ // $ANTLR start ruleNamed
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:556:1: ruleNamed returns [EObject current=null] : (lv_name= RULE_ID ) ;
+ public final EObject ruleNamed() throws RecognitionException {
+ EObject current = null;
+
+ Token lv_name=null;
+
+ EObject temp=null; setCurrentLookahead(); resetLookahead();
+ try {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:558:33: ( (lv_name= RULE_ID ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:559:1: (lv_name= RULE_ID )
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:559:1: (lv_name= RULE_ID )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g:561:6: lv_name= RULE_ID
+ {
+ lv_name=(Token)input.LT(1);
+ match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleNamed1575);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.9/@alternatives/@terminal" /* xtext::RuleCall */, "name");
+
+
+ if (current==null) {
+ current = factory.create("Named");
+ associateNodeWithAstElement(currentNode, current);
+ }
+
+ factory.set(current, "name", lv_name,"ID");
+
+
+ }
+
+
+ }
+
+ resetLookahead();
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end ruleNamed
+
+
+
+
+ public static final BitSet FOLLOW_ruleContainer_in_entryRuleContainer70 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleContainer80 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_11_in_ruleContainer117 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_RULE_ID_in_ruleContainer138 = new BitSet(new long[]{0x0000000000001000L});
+ public static final BitSet FOLLOW_12_in_ruleContainer159 = new BitSet(new long[]{0x000000000020E000L});
+ public static final BitSet FOLLOW_ruleNested_in_ruleContainer195 = new BitSet(new long[]{0x000000000020E000L});
+ public static final BitSet FOLLOW_ruleContent_in_ruleContainer239 = new BitSet(new long[]{0x000000000020E000L});
+ public static final BitSet FOLLOW_13_in_ruleContainer255 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleNested_in_entryRuleNested290 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleNested300 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_14_in_ruleNested336 = new BitSet(new long[]{0x0000000000001000L});
+ public static final BitSet FOLLOW_12_in_ruleNested345 = new BitSet(new long[]{0x0000000000000800L});
+ public static final BitSet FOLLOW_ruleContainer_in_ruleNested380 = new BitSet(new long[]{0x0000000000002800L});
+ public static final BitSet FOLLOW_13_in_ruleNested395 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleContent_in_entryRuleContent430 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleContent440 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleChildren_in_ruleContent487 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleAbstractChildren_in_ruleContent514 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleChildren_in_entryRuleChildren548 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleChildren558 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_15_in_ruleChildren595 = new BitSet(new long[]{0x0000000000001000L});
+ public static final BitSet FOLLOW_12_in_ruleChildren604 = new BitSet(new long[]{0x0000000000020000L});
+ public static final BitSet FOLLOW_ruleChild_in_ruleChildren639 = new BitSet(new long[]{0x0000000000012000L});
+ public static final BitSet FOLLOW_16_in_ruleChildren654 = new BitSet(new long[]{0x0000000000020000L});
+ public static final BitSet FOLLOW_ruleChild_in_ruleChildren688 = new BitSet(new long[]{0x0000000000012000L});
+ public static final BitSet FOLLOW_13_in_ruleChildren704 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleChild_in_entryRuleChild739 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleChild749 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_17_in_ruleChild786 = new BitSet(new long[]{0x0000000000040000L});
+ public static final BitSet FOLLOW_18_in_ruleChild795 = new BitSet(new long[]{0x0000000000080000L});
+ public static final BitSet FOLLOW_19_in_ruleChild805 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_ruleNamed_in_ruleChild840 = new BitSet(new long[]{0x0000000000100000L});
+ public static final BitSet FOLLOW_20_in_ruleChild854 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleAbstractChildren_in_entryRuleAbstractChildren889 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleAbstractChildren899 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_21_in_ruleAbstractChildren935 = new BitSet(new long[]{0x0000000000001000L});
+ public static final BitSet FOLLOW_12_in_ruleAbstractChildren944 = new BitSet(new long[]{0x0000000000020000L});
+ public static final BitSet FOLLOW_ruleAbstractChild_in_ruleAbstractChildren979 = new BitSet(new long[]{0x0000000000022000L});
+ public static final BitSet FOLLOW_13_in_ruleAbstractChildren994 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleAbstractChild_in_entryRuleAbstractChild1029 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleAbstractChild1039 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleFirstConcrete_in_ruleAbstractChild1086 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleSecondConcrete_in_ruleAbstractChild1113 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleFirstConcrete_in_entryRuleFirstConcrete1147 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleFirstConcrete1157 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_17_in_ruleFirstConcrete1195 = new BitSet(new long[]{0x0000000000400000L});
+ public static final BitSet FOLLOW_22_in_ruleFirstConcrete1204 = new BitSet(new long[]{0x0000000000080000L});
+ public static final BitSet FOLLOW_19_in_ruleFirstConcrete1214 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_ruleNamed_in_ruleFirstConcrete1249 = new BitSet(new long[]{0x0000000000100010L});
+ public static final BitSet FOLLOW_RULE_ID_in_ruleFirstConcrete1278 = new BitSet(new long[]{0x0000000000100000L});
+ public static final BitSet FOLLOW_20_in_ruleFirstConcrete1293 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleSecondConcrete_in_entryRuleSecondConcrete1328 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleSecondConcrete1338 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_17_in_ruleSecondConcrete1377 = new BitSet(new long[]{0x0000000000400000L});
+ public static final BitSet FOLLOW_22_in_ruleSecondConcrete1386 = new BitSet(new long[]{0x0000000000800000L});
+ public static final BitSet FOLLOW_23_in_ruleSecondConcrete1396 = new BitSet(new long[]{0x0000000000080000L});
+ public static final BitSet FOLLOW_19_in_ruleSecondConcrete1406 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_ruleNamed_in_ruleSecondConcrete1441 = new BitSet(new long[]{0x0000000000100010L});
+ public static final BitSet FOLLOW_RULE_ID_in_ruleSecondConcrete1470 = new BitSet(new long[]{0x0000000000100000L});
+ public static final BitSet FOLLOW_20_in_ruleSecondConcrete1485 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleNamed_in_entryRuleNamed1520 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleNamed1530 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_RULE_ID_in_ruleNamed1575 = new BitSet(new long[]{0x0000000000000002L});
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage__.g b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage__.g
new file mode 100644
index 0000000..367c2e1
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage__.g
@@ -0,0 +1,45 @@
+lexer grammar InternalPartialParserTestLanguage;
+@header {
+package org.eclipse.xtext.testlanguages.parser.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;
+}
+
+T11 : 'container' ;
+T12 : '{' ;
+T13 : '}' ;
+T14 : 'nested' ;
+T15 : 'children' ;
+T16 : ',' ;
+T17 : '->' ;
+T18 : 'C' ;
+T19 : '(' ;
+T20 : ')' ;
+T21 : 'abstract children' ;
+T22 : 'F' ;
+T23 : 'S' ;
+
+// $ANTLR src "./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g" 580
+RULE_ID : ('^')?('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*;
+
+// $ANTLR src "./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g" 582
+RULE_INT : ('0'..'9')+;
+
+// $ANTLR src "./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g" 584
+RULE_STRING : '"' ( '\\' ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\') | ~('\\'|'"') )* '"' | '\'' ( '\\' ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\') | ~('\\'|'\'') )* '\'';
+
+// $ANTLR src "./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g" 586
+RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )* '*/' {$channel=HIDDEN;};
+
+// $ANTLR src "./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g" 588
+RULE_SL_COMMENT : '//' ~('\n'|'\r')* ('\r'? '\n')? {$channel=HIDDEN;};
+
+// $ANTLR src "./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g" 590
+RULE_WS : (' '|'\t'|'\r'|'\n')+ {$channel=HIDDEN;};
+
+// $ANTLR src "./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g" 592
+RULE_ANY_OTHER : .;
+
+
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parsetree/reconstr/PartialParserTestLanguageParseTreeConstructor.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parsetree/reconstr/PartialParserTestLanguageParseTreeConstructor.java
new file mode 100644
index 0000000..0f0ea95
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parsetree/reconstr/PartialParserTestLanguageParseTreeConstructor.java
@@ -0,0 +1,1798 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.testlanguages.parsetree.reconstr;
+
+//import org.apache.log4j.Logger;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.*;
+import org.eclipse.xtext.parsetree.reconstr.*;
+import org.eclipse.xtext.parsetree.reconstr.impl.*;
+import org.eclipse.xtext.parsetree.reconstr.impl.AbstractParseTreeConstructor.AbstractToken.Solution;
+
+
+public class PartialParserTestLanguageParseTreeConstructor extends AbstractParseTreeConstructor {
+
+ public IAbstractToken serialize(EObject object) {
+ Solution t = internalSerialize(object);
+ if(t == null) throw new XtextSerializationException(getDescr(object), "No rule found for serialization");
+ return t.getPredecessor();
+ }
+
+ protected Solution internalSerialize(EObject obj) {
+ IInstanceDescription inst = getDescr(obj);
+ Solution s;
+ if(inst.isInstanceOf("Container") && (s = new Container_Group(inst, null).firstSolution()) != null) return s;
+ if(inst.isInstanceOf("Nested") && (s = new Nested_Group(inst, null).firstSolution()) != null) return s;
+ if(inst.isInstanceOf("Content") && (s = new Content_Alternatives(inst, null).firstSolution()) != null) return s;
+ if(inst.isInstanceOf("Children") && (s = new Children_Group(inst, null).firstSolution()) != null) return s;
+ if(inst.isInstanceOf("Child") && (s = new Child_Group(inst, null).firstSolution()) != null) return s;
+ if(inst.isInstanceOf("AbstractChildren") && (s = new AbstractChildren_Group(inst, null).firstSolution()) != null) return s;
+ if(inst.isInstanceOf("AbstractChild") && (s = new AbstractChild_Alternatives(inst, null).firstSolution()) != null) return s;
+ if(inst.isInstanceOf("FirstConcrete") && (s = new FirstConcrete_Group(inst, null).firstSolution()) != null) return s;
+ if(inst.isInstanceOf("SecondConcrete") && (s = new SecondConcrete_Group(inst, null).firstSolution()) != null) return s;
+ if(inst.isInstanceOf("Named") && (s = new Named_Assignment_name(inst, null).firstSolution()) != null) return s;
+ return null;
+ }
+
+/************ begin Rule Container ****************
+ *
+ * Container : 'container' name = ID '{' ( nested += Nested | content += Content ) * '}' ;
+ *
+ **/
+
+
+// 'container' name = ID '{' ( nested += Nested | content += Content ) * '}'
+protected class Container_Group extends GroupToken {
+
+ public Container_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.0/@alternatives");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new Container_1_Keyword(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new Container_0_Group(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// 'container' name = ID '{' ( nested += Nested | content += Content ) *
+protected class Container_0_Group extends GroupToken {
+
+ public Container_0_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.0/@alternatives/@abstractTokens.0");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new Container_0_1_Alternatives(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new Container_0_0_Group(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// 'container' name = ID '{'
+protected class Container_0_0_Group extends GroupToken {
+
+ public Container_0_0_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.0");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new Container_0_0_1_Keyword(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new Container_0_0_0_Group(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// 'container' name = ID
+protected class Container_0_0_0_Group extends GroupToken {
+
+ public Container_0_0_0_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new Container_0_0_0_1_Assignment_name(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new Container_0_0_0_0_Keyword_container(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// 'container'
+protected class Container_0_0_0_0_Keyword_container extends KeywordToken {
+
+ public Container_0_0_0_0_Keyword_container(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Keyword getGrammarElement() {
+ return (Keyword)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0");
+ }
+}
+
+// name = ID
+protected class Container_0_0_0_1_Assignment_name extends AssignmentToken {
+
+ public Container_0_0_0_1_Assignment_name(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Assignment getGrammarElement() {
+ return (Assignment)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1");
+ }
+
+ protected Solution createSolution() {
+ if((value = current.getConsumable("name",required)) == null) return null;
+ IInstanceDescription obj = current.cloneAndConsume("name");
+ if(true) { // xtext::RuleCall FIXME: check if value is valid for lexer rule
+ type = AssignmentType.LRC;
+ element = (AbstractElement)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1/@terminal");
+ return new Solution(obj);
+ }
+ return null;
+ }
+}
+
+
+// '{'
+protected class Container_0_0_1_Keyword extends KeywordToken {
+
+ public Container_0_0_1_Keyword(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Keyword getGrammarElement() {
+ return (Keyword)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1");
+ }
+}
+
+
+// ( nested += Nested | content += Content ) *
+protected class Container_0_1_Alternatives extends AlternativesToken {
+
+ public Container_0_1_Alternatives(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, IS_MANY, !IS_REQUIRED);
+ }
+
+ public Alternatives getGrammarElement() {
+ return (Alternatives)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.1");
+ }
+
+ protected Solution createSolution() {
+ AbstractToken t = (first) ? new Container_0_1_1_Assignment_content(current, this) : new Container_0_1_0_Assignment_nested(current, this);
+ Solution s = t.firstSolution();
+ if(s == null && activateNextSolution()) s = createSolution();
+ if(s == null) return null;
+ last = s.getPredecessor();
+ return s;
+ }
+}
+
+// nested += Nested
+protected class Container_0_1_0_Assignment_nested extends AssignmentToken {
+
+ public Container_0_1_0_Assignment_nested(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Assignment getGrammarElement() {
+ return (Assignment)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.1/@groups.0");
+ }
+
+ protected Solution createSolution() {
+ if((value = current.getConsumable("nested",required)) == null) return null;
+ IInstanceDescription obj = current.cloneAndConsume("nested");
+ if(value instanceof EObject) { // xtext::RuleCall
+ IInstanceDescription param = getDescr((EObject)value);
+ if(param.isInstanceOf("Nested")) {
+ Solution s = new Nested_Group(param, this).firstSolution();
+ if(s != null) {
+ type = AssignmentType.PRC;
+ return new Solution(obj,s.getPredecessor());
+ }
+ }
+ }
+ return null;
+ }
+}
+
+// content += Content
+protected class Container_0_1_1_Assignment_content extends AssignmentToken {
+
+ public Container_0_1_1_Assignment_content(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Assignment getGrammarElement() {
+ return (Assignment)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.1/@groups.1");
+ }
+
+ protected Solution createSolution() {
+ if((value = current.getConsumable("content",required)) == null) return null;
+ IInstanceDescription obj = current.cloneAndConsume("content");
+ if(value instanceof EObject) { // xtext::RuleCall
+ IInstanceDescription param = getDescr((EObject)value);
+ if(param.isInstanceOf("Content")) {
+ Solution s = new Content_Alternatives(param, this).firstSolution();
+ if(s != null) {
+ type = AssignmentType.PRC;
+ return new Solution(obj,s.getPredecessor());
+ }
+ }
+ }
+ return null;
+ }
+}
+
+
+
+// '}'
+protected class Container_1_Keyword extends KeywordToken {
+
+ public Container_1_Keyword(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Keyword getGrammarElement() {
+ return (Keyword)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.0/@alternatives/@abstractTokens.1");
+ }
+}
+
+
+/************ end Rule Container ****************/
+
+/************ begin Rule Nested ****************
+ *
+ * Nested : 'nested' '{' ( nested += Container ) + '}' ;
+ *
+ **/
+
+
+// 'nested' '{' ( nested += Container ) + '}'
+protected class Nested_Group extends GroupToken {
+
+ public Nested_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.1/@alternatives");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new Nested_1_Keyword(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new Nested_0_Group(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// 'nested' '{' ( nested += Container ) +
+protected class Nested_0_Group extends GroupToken {
+
+ public Nested_0_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.1/@alternatives/@abstractTokens.0");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new Nested_0_1_Assignment_nested(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new Nested_0_0_Group(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// 'nested' '{'
+protected class Nested_0_0_Group extends GroupToken {
+
+ public Nested_0_0_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.1/@alternatives/@abstractTokens.0/@abstractTokens.0");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new Nested_0_0_1_Keyword(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new Nested_0_0_0_Keyword_nested(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// 'nested'
+protected class Nested_0_0_0_Keyword_nested extends KeywordToken {
+
+ public Nested_0_0_0_Keyword_nested(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Keyword getGrammarElement() {
+ return (Keyword)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.1/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0");
+ }
+}
+
+// '{'
+protected class Nested_0_0_1_Keyword extends KeywordToken {
+
+ public Nested_0_0_1_Keyword(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Keyword getGrammarElement() {
+ return (Keyword)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.1/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1");
+ }
+}
+
+
+// ( nested += Container ) +
+protected class Nested_0_1_Assignment_nested extends AssignmentToken {
+
+ public Nested_0_1_Assignment_nested(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, IS_MANY, IS_REQUIRED);
+ }
+
+ public Assignment getGrammarElement() {
+ return (Assignment)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.1/@alternatives/@abstractTokens.0/@abstractTokens.1");
+ }
+
+ protected Solution createSolution() {
+ if((value = current.getConsumable("nested",required)) == null) return null;
+ IInstanceDescription obj = current.cloneAndConsume("nested");
+ if(value instanceof EObject) { // xtext::RuleCall
+ IInstanceDescription param = getDescr((EObject)value);
+ if(param.isInstanceOf("Container")) {
+ Solution s = new Container_Group(param, this).firstSolution();
+ if(s != null) {
+ type = AssignmentType.PRC;
+ return new Solution(obj,s.getPredecessor());
+ }
+ }
+ }
+ return null;
+ }
+}
+
+
+// '}'
+protected class Nested_1_Keyword extends KeywordToken {
+
+ public Nested_1_Keyword(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Keyword getGrammarElement() {
+ return (Keyword)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.1/@alternatives/@abstractTokens.1");
+ }
+}
+
+
+/************ end Rule Nested ****************/
+
+/************ begin Rule Content ****************
+ *
+ * Content : Children | AbstractChildren ;
+ *
+ **/
+
+
+// Children | AbstractChildren
+protected class Content_Alternatives extends AlternativesToken {
+
+ public Content_Alternatives(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Alternatives getGrammarElement() {
+ return (Alternatives)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.2/@alternatives");
+ }
+
+ protected Solution createSolution() {
+ AbstractToken t = (first) ? new Content_1_RuleCall_AbstractChildren(current, this) : new Content_0_RuleCall_Children(current, this);
+ Solution s = t.firstSolution();
+ if(s == null && activateNextSolution()) s = createSolution();
+ if(s == null) return null;
+ last = s.getPredecessor();
+ return s;
+ }
+}
+
+// Children
+protected class Content_0_RuleCall_Children extends RuleCallToken {
+
+ public Content_0_RuleCall_Children(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public RuleCall getGrammarElement() {
+ return (RuleCall)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.2/@alternatives/@groups.0");
+ }
+
+ protected Solution createSolution() {
+ if(checkForRecursion(Children_Group.class, current)) return null;
+ if(!current.isInstanceOf("Children")) return null;
+ return new Children_Group(current, this).firstSolution();
+ }
+}
+
+// AbstractChildren
+protected class Content_1_RuleCall_AbstractChildren extends RuleCallToken {
+
+ public Content_1_RuleCall_AbstractChildren(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public RuleCall getGrammarElement() {
+ return (RuleCall)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.2/@alternatives/@groups.1");
+ }
+
+ protected Solution createSolution() {
+ if(checkForRecursion(AbstractChildren_Group.class, current)) return null;
+ if(!current.isInstanceOf("AbstractChildren")) return null;
+ return new AbstractChildren_Group(current, this).firstSolution();
+ }
+}
+
+
+/************ end Rule Content ****************/
+
+/************ begin Rule Children ****************
+ *
+ * Children : 'children' '{' children += Child ( ',' children += Child ) * '}' ;
+ *
+ **/
+
+
+// 'children' '{' children += Child ( ',' children += Child ) * '}'
+protected class Children_Group extends GroupToken {
+
+ public Children_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.3/@alternatives");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new Children_1_Keyword(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new Children_0_Group(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// 'children' '{' children += Child ( ',' children += Child ) *
+protected class Children_0_Group extends GroupToken {
+
+ public Children_0_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.3/@alternatives/@abstractTokens.0");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new Children_0_1_Group(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new Children_0_0_Group(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// 'children' '{' children += Child
+protected class Children_0_0_Group extends GroupToken {
+
+ public Children_0_0_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.3/@alternatives/@abstractTokens.0/@abstractTokens.0");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new Children_0_0_1_Assignment_children(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new Children_0_0_0_Group(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// 'children' '{'
+protected class Children_0_0_0_Group extends GroupToken {
+
+ public Children_0_0_0_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.3/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new Children_0_0_0_1_Keyword(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new Children_0_0_0_0_Keyword_children(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// 'children'
+protected class Children_0_0_0_0_Keyword_children extends KeywordToken {
+
+ public Children_0_0_0_0_Keyword_children(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Keyword getGrammarElement() {
+ return (Keyword)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.3/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0");
+ }
+}
+
+// '{'
+protected class Children_0_0_0_1_Keyword extends KeywordToken {
+
+ public Children_0_0_0_1_Keyword(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Keyword getGrammarElement() {
+ return (Keyword)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.3/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1");
+ }
+}
+
+
+// children += Child
+protected class Children_0_0_1_Assignment_children extends AssignmentToken {
+
+ public Children_0_0_1_Assignment_children(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Assignment getGrammarElement() {
+ return (Assignment)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.3/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1");
+ }
+
+ protected Solution createSolution() {
+ if((value = current.getConsumable("children",required)) == null) return null;
+ IInstanceDescription obj = current.cloneAndConsume("children");
+ if(value instanceof EObject) { // xtext::RuleCall
+ IInstanceDescription param = getDescr((EObject)value);
+ if(param.isInstanceOf("Child")) {
+ Solution s = new Child_Group(param, this).firstSolution();
+ if(s != null) {
+ type = AssignmentType.PRC;
+ return new Solution(obj,s.getPredecessor());
+ }
+ }
+ }
+ return null;
+ }
+}
+
+
+// ( ',' children += Child ) *
+protected class Children_0_1_Group extends GroupToken {
+
+ public Children_0_1_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, IS_MANY, !IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.3/@alternatives/@abstractTokens.0/@abstractTokens.1");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new Children_0_1_1_Assignment_children(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new Children_0_1_0_Keyword(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// ','
+protected class Children_0_1_0_Keyword extends KeywordToken {
+
+ public Children_0_1_0_Keyword(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Keyword getGrammarElement() {
+ return (Keyword)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.3/@alternatives/@abstractTokens.0/@abstractTokens.1/@abstractTokens.0");
+ }
+}
+
+// children += Child
+protected class Children_0_1_1_Assignment_children extends AssignmentToken {
+
+ public Children_0_1_1_Assignment_children(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Assignment getGrammarElement() {
+ return (Assignment)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.3/@alternatives/@abstractTokens.0/@abstractTokens.1/@abstractTokens.1");
+ }
+
+ protected Solution createSolution() {
+ if((value = current.getConsumable("children",required)) == null) return null;
+ IInstanceDescription obj = current.cloneAndConsume("children");
+ if(value instanceof EObject) { // xtext::RuleCall
+ IInstanceDescription param = getDescr((EObject)value);
+ if(param.isInstanceOf("Child")) {
+ Solution s = new Child_Group(param, this).firstSolution();
+ if(s != null) {
+ type = AssignmentType.PRC;
+ return new Solution(obj,s.getPredecessor());
+ }
+ }
+ }
+ return null;
+ }
+}
+
+
+
+// '}'
+protected class Children_1_Keyword extends KeywordToken {
+
+ public Children_1_Keyword(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Keyword getGrammarElement() {
+ return (Keyword)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.3/@alternatives/@abstractTokens.1");
+ }
+}
+
+
+/************ end Rule Children ****************/
+
+/************ begin Rule Child ****************
+ *
+ * Child : '->' 'C' '(' value = Named ')' ;
+ *
+ **/
+
+
+// '->' 'C' '(' value = Named ')'
+protected class Child_Group extends GroupToken {
+
+ public Child_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.4/@alternatives");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new Child_1_Keyword(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new Child_0_Group(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// '->' 'C' '(' value = Named
+protected class Child_0_Group extends GroupToken {
+
+ public Child_0_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.4/@alternatives/@abstractTokens.0");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new Child_0_1_Assignment_value(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new Child_0_0_Group(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// '->' 'C' '('
+protected class Child_0_0_Group extends GroupToken {
+
+ public Child_0_0_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.4/@alternatives/@abstractTokens.0/@abstractTokens.0");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new Child_0_0_1_Keyword(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new Child_0_0_0_Group(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// '->' 'C'
+protected class Child_0_0_0_Group extends GroupToken {
+
+ public Child_0_0_0_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.4/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new Child_0_0_0_1_Keyword_C(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new Child_0_0_0_0_Keyword(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// '->'
+protected class Child_0_0_0_0_Keyword extends KeywordToken {
+
+ public Child_0_0_0_0_Keyword(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Keyword getGrammarElement() {
+ return (Keyword)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.4/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0");
+ }
+}
+
+// 'C'
+protected class Child_0_0_0_1_Keyword_C extends KeywordToken {
+
+ public Child_0_0_0_1_Keyword_C(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Keyword getGrammarElement() {
+ return (Keyword)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.4/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1");
+ }
+}
+
+
+// '('
+protected class Child_0_0_1_Keyword extends KeywordToken {
+
+ public Child_0_0_1_Keyword(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Keyword getGrammarElement() {
+ return (Keyword)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.4/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1");
+ }
+}
+
+
+// value = Named
+protected class Child_0_1_Assignment_value extends AssignmentToken {
+
+ public Child_0_1_Assignment_value(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Assignment getGrammarElement() {
+ return (Assignment)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.4/@alternatives/@abstractTokens.0/@abstractTokens.1");
+ }
+
+ protected Solution createSolution() {
+ if((value = current.getConsumable("value",required)) == null) return null;
+ IInstanceDescription obj = current.cloneAndConsume("value");
+ if(value instanceof EObject) { // xtext::RuleCall
+ IInstanceDescription param = getDescr((EObject)value);
+ if(param.isInstanceOf("Named")) {
+ Solution s = new Named_Assignment_name(param, this).firstSolution();
+ if(s != null) {
+ type = AssignmentType.PRC;
+ return new Solution(obj,s.getPredecessor());
+ }
+ }
+ }
+ return null;
+ }
+}
+
+
+// ')'
+protected class Child_1_Keyword extends KeywordToken {
+
+ public Child_1_Keyword(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Keyword getGrammarElement() {
+ return (Keyword)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.4/@alternatives/@abstractTokens.1");
+ }
+}
+
+
+/************ end Rule Child ****************/
+
+/************ begin Rule AbstractChildren ****************
+ *
+ * AbstractChildren : 'abstract children' '{' ( abstractChildren += AbstractChild ) + '}' ;
+ *
+ **/
+
+
+// 'abstract children' '{' ( abstractChildren += AbstractChild ) + '}'
+protected class AbstractChildren_Group extends GroupToken {
+
+ public AbstractChildren_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.5/@alternatives");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new AbstractChildren_1_Keyword(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new AbstractChildren_0_Group(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// 'abstract children' '{' ( abstractChildren += AbstractChild ) +
+protected class AbstractChildren_0_Group extends GroupToken {
+
+ public AbstractChildren_0_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.5/@alternatives/@abstractTokens.0");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new AbstractChildren_0_1_Assignment_abstractChildren(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new AbstractChildren_0_0_Group(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// 'abstract children' '{'
+protected class AbstractChildren_0_0_Group extends GroupToken {
+
+ public AbstractChildren_0_0_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.5/@alternatives/@abstractTokens.0/@abstractTokens.0");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new AbstractChildren_0_0_1_Keyword(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new AbstractChildren_0_0_0_Keyword_abstractchildren(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// 'abstract children'
+protected class AbstractChildren_0_0_0_Keyword_abstractchildren extends KeywordToken {
+
+ public AbstractChildren_0_0_0_Keyword_abstractchildren(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Keyword getGrammarElement() {
+ return (Keyword)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.5/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0");
+ }
+}
+
+// '{'
+protected class AbstractChildren_0_0_1_Keyword extends KeywordToken {
+
+ public AbstractChildren_0_0_1_Keyword(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Keyword getGrammarElement() {
+ return (Keyword)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.5/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1");
+ }
+}
+
+
+// ( abstractChildren += AbstractChild ) +
+protected class AbstractChildren_0_1_Assignment_abstractChildren extends AssignmentToken {
+
+ public AbstractChildren_0_1_Assignment_abstractChildren(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, IS_MANY, IS_REQUIRED);
+ }
+
+ public Assignment getGrammarElement() {
+ return (Assignment)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.5/@alternatives/@abstractTokens.0/@abstractTokens.1");
+ }
+
+ protected Solution createSolution() {
+ if((value = current.getConsumable("abstractChildren",required)) == null) return null;
+ IInstanceDescription obj = current.cloneAndConsume("abstractChildren");
+ if(value instanceof EObject) { // xtext::RuleCall
+ IInstanceDescription param = getDescr((EObject)value);
+ if(param.isInstanceOf("AbstractChild")) {
+ Solution s = new AbstractChild_Alternatives(param, this).firstSolution();
+ if(s != null) {
+ type = AssignmentType.PRC;
+ return new Solution(obj,s.getPredecessor());
+ }
+ }
+ }
+ return null;
+ }
+}
+
+
+// '}'
+protected class AbstractChildren_1_Keyword extends KeywordToken {
+
+ public AbstractChildren_1_Keyword(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Keyword getGrammarElement() {
+ return (Keyword)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.5/@alternatives/@abstractTokens.1");
+ }
+}
+
+
+/************ end Rule AbstractChildren ****************/
+
+/************ begin Rule AbstractChild ****************
+ *
+ * AbstractChild : FirstConcrete | SecondConcrete ;
+ *
+ **/
+
+
+// FirstConcrete | SecondConcrete
+protected class AbstractChild_Alternatives extends AlternativesToken {
+
+ public AbstractChild_Alternatives(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Alternatives getGrammarElement() {
+ return (Alternatives)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.6/@alternatives");
+ }
+
+ protected Solution createSolution() {
+ AbstractToken t = (first) ? new AbstractChild_1_RuleCall_SecondConcrete(current, this) : new AbstractChild_0_RuleCall_FirstConcrete(current, this);
+ Solution s = t.firstSolution();
+ if(s == null && activateNextSolution()) s = createSolution();
+ if(s == null) return null;
+ last = s.getPredecessor();
+ return s;
+ }
+}
+
+// FirstConcrete
+protected class AbstractChild_0_RuleCall_FirstConcrete extends RuleCallToken {
+
+ public AbstractChild_0_RuleCall_FirstConcrete(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public RuleCall getGrammarElement() {
+ return (RuleCall)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.6/@alternatives/@groups.0");
+ }
+
+ protected Solution createSolution() {
+ if(checkForRecursion(FirstConcrete_Group.class, current)) return null;
+ if(!current.isInstanceOf("FirstConcrete")) return null;
+ return new FirstConcrete_Group(current, this).firstSolution();
+ }
+}
+
+// SecondConcrete
+protected class AbstractChild_1_RuleCall_SecondConcrete extends RuleCallToken {
+
+ public AbstractChild_1_RuleCall_SecondConcrete(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public RuleCall getGrammarElement() {
+ return (RuleCall)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.6/@alternatives/@groups.1");
+ }
+
+ protected Solution createSolution() {
+ if(checkForRecursion(SecondConcrete_Group.class, current)) return null;
+ if(!current.isInstanceOf("SecondConcrete")) return null;
+ return new SecondConcrete_Group(current, this).firstSolution();
+ }
+}
+
+
+/************ end Rule AbstractChild ****************/
+
+/************ begin Rule FirstConcrete ****************
+ *
+ * FirstConcrete : '->' 'F' '(' value = Named ( referencedContainer = [ Container ] ) ? ')' ;
+ *
+ **/
+
+
+// '->' 'F' '(' value = Named ( referencedContainer = [ Container ] ) ? ')'
+protected class FirstConcrete_Group extends GroupToken {
+
+ public FirstConcrete_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.7/@alternatives");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new FirstConcrete_1_Keyword(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new FirstConcrete_0_Group(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// '->' 'F' '(' value = Named ( referencedContainer = [ Container ] ) ?
+protected class FirstConcrete_0_Group extends GroupToken {
+
+ public FirstConcrete_0_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.7/@alternatives/@abstractTokens.0");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new FirstConcrete_0_1_Assignment_referencedContainer(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new FirstConcrete_0_0_Group(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// '->' 'F' '(' value = Named
+protected class FirstConcrete_0_0_Group extends GroupToken {
+
+ public FirstConcrete_0_0_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.7/@alternatives/@abstractTokens.0/@abstractTokens.0");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new FirstConcrete_0_0_1_Assignment_value(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new FirstConcrete_0_0_0_Group(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// '->' 'F' '('
+protected class FirstConcrete_0_0_0_Group extends GroupToken {
+
+ public FirstConcrete_0_0_0_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.7/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new FirstConcrete_0_0_0_1_Keyword(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new FirstConcrete_0_0_0_0_Group(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// '->' 'F'
+protected class FirstConcrete_0_0_0_0_Group extends GroupToken {
+
+ public FirstConcrete_0_0_0_0_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.7/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new FirstConcrete_0_0_0_0_1_Keyword_F(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new FirstConcrete_0_0_0_0_0_Keyword(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// '->'
+protected class FirstConcrete_0_0_0_0_0_Keyword extends KeywordToken {
+
+ public FirstConcrete_0_0_0_0_0_Keyword(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Keyword getGrammarElement() {
+ return (Keyword)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.7/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0");
+ }
+}
+
+// 'F'
+protected class FirstConcrete_0_0_0_0_1_Keyword_F extends KeywordToken {
+
+ public FirstConcrete_0_0_0_0_1_Keyword_F(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Keyword getGrammarElement() {
+ return (Keyword)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.7/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1");
+ }
+}
+
+
+// '('
+protected class FirstConcrete_0_0_0_1_Keyword extends KeywordToken {
+
+ public FirstConcrete_0_0_0_1_Keyword(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Keyword getGrammarElement() {
+ return (Keyword)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.7/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1");
+ }
+}
+
+
+// value = Named
+protected class FirstConcrete_0_0_1_Assignment_value extends AssignmentToken {
+
+ public FirstConcrete_0_0_1_Assignment_value(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Assignment getGrammarElement() {
+ return (Assignment)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.7/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1");
+ }
+
+ protected Solution createSolution() {
+ if((value = current.getConsumable("value",required)) == null) return null;
+ IInstanceDescription obj = current.cloneAndConsume("value");
+ if(value instanceof EObject) { // xtext::RuleCall
+ IInstanceDescription param = getDescr((EObject)value);
+ if(param.isInstanceOf("Named")) {
+ Solution s = new Named_Assignment_name(param, this).firstSolution();
+ if(s != null) {
+ type = AssignmentType.PRC;
+ return new Solution(obj,s.getPredecessor());
+ }
+ }
+ }
+ return null;
+ }
+}
+
+
+// ( referencedContainer = [ Container ] ) ?
+protected class FirstConcrete_0_1_Assignment_referencedContainer extends AssignmentToken {
+
+ public FirstConcrete_0_1_Assignment_referencedContainer(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, !IS_REQUIRED);
+ }
+
+ public Assignment getGrammarElement() {
+ return (Assignment)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.7/@alternatives/@abstractTokens.0/@abstractTokens.1");
+ }
+
+ protected Solution createSolution() {
+ if((value = current.getConsumable("referencedContainer",required)) == null) return null;
+ IInstanceDescription obj = current.cloneAndConsume("referencedContainer");
+ if(value instanceof EObject) { // xtext::CrossReference
+ IInstanceDescription param = getDescr((EObject)value);
+ if(param.isInstanceOf("Container")) {
+ type = AssignmentType.CR;
+ element = (AbstractElement)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.7/@alternatives/@abstractTokens.0/@abstractTokens.1/@terminal");
+ return new Solution(obj);
+ }
+ }
+ return null;
+ }
+}
+
+
+// ')'
+protected class FirstConcrete_1_Keyword extends KeywordToken {
+
+ public FirstConcrete_1_Keyword(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Keyword getGrammarElement() {
+ return (Keyword)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.7/@alternatives/@abstractTokens.1");
+ }
+}
+
+
+/************ end Rule FirstConcrete ****************/
+
+/************ begin Rule SecondConcrete ****************
+ *
+ * SecondConcrete : '->' 'F' 'S' '(' value = Named ( referencedChildren += [ Child ] ) ? ')' ;
+ *
+ **/
+
+
+// '->' 'F' 'S' '(' value = Named ( referencedChildren += [ Child ] ) ? ')'
+protected class SecondConcrete_Group extends GroupToken {
+
+ public SecondConcrete_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.8/@alternatives");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new SecondConcrete_1_Keyword(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new SecondConcrete_0_Group(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// '->' 'F' 'S' '(' value = Named ( referencedChildren += [ Child ] ) ?
+protected class SecondConcrete_0_Group extends GroupToken {
+
+ public SecondConcrete_0_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.8/@alternatives/@abstractTokens.0");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new SecondConcrete_0_1_Assignment_referencedChildren(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new SecondConcrete_0_0_Group(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// '->' 'F' 'S' '(' value = Named
+protected class SecondConcrete_0_0_Group extends GroupToken {
+
+ public SecondConcrete_0_0_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.8/@alternatives/@abstractTokens.0/@abstractTokens.0");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new SecondConcrete_0_0_1_Assignment_value(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new SecondConcrete_0_0_0_Group(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// '->' 'F' 'S' '('
+protected class SecondConcrete_0_0_0_Group extends GroupToken {
+
+ public SecondConcrete_0_0_0_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.8/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new SecondConcrete_0_0_0_1_Keyword(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new SecondConcrete_0_0_0_0_Group(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// '->' 'F' 'S'
+protected class SecondConcrete_0_0_0_0_Group extends GroupToken {
+
+ public SecondConcrete_0_0_0_0_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.8/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new SecondConcrete_0_0_0_0_1_Keyword_S(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new SecondConcrete_0_0_0_0_0_Group(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// '->' 'F'
+protected class SecondConcrete_0_0_0_0_0_Group extends GroupToken {
+
+ public SecondConcrete_0_0_0_0_0_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.8/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new SecondConcrete_0_0_0_0_0_1_Keyword_F(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new SecondConcrete_0_0_0_0_0_0_Keyword(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// '->'
+protected class SecondConcrete_0_0_0_0_0_0_Keyword extends KeywordToken {
+
+ public SecondConcrete_0_0_0_0_0_0_Keyword(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Keyword getGrammarElement() {
+ return (Keyword)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.8/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0");
+ }
+}
+
+// 'F'
+protected class SecondConcrete_0_0_0_0_0_1_Keyword_F extends KeywordToken {
+
+ public SecondConcrete_0_0_0_0_0_1_Keyword_F(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Keyword getGrammarElement() {
+ return (Keyword)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.8/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1");
+ }
+}
+
+
+// 'S'
+protected class SecondConcrete_0_0_0_0_1_Keyword_S extends KeywordToken {
+
+ public SecondConcrete_0_0_0_0_1_Keyword_S(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Keyword getGrammarElement() {
+ return (Keyword)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.8/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1");
+ }
+}
+
+
+// '('
+protected class SecondConcrete_0_0_0_1_Keyword extends KeywordToken {
+
+ public SecondConcrete_0_0_0_1_Keyword(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Keyword getGrammarElement() {
+ return (Keyword)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.8/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1");
+ }
+}
+
+
+// value = Named
+protected class SecondConcrete_0_0_1_Assignment_value extends AssignmentToken {
+
+ public SecondConcrete_0_0_1_Assignment_value(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Assignment getGrammarElement() {
+ return (Assignment)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.8/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1");
+ }
+
+ protected Solution createSolution() {
+ if((value = current.getConsumable("value",required)) == null) return null;
+ IInstanceDescription obj = current.cloneAndConsume("value");
+ if(value instanceof EObject) { // xtext::RuleCall
+ IInstanceDescription param = getDescr((EObject)value);
+ if(param.isInstanceOf("Named")) {
+ Solution s = new Named_Assignment_name(param, this).firstSolution();
+ if(s != null) {
+ type = AssignmentType.PRC;
+ return new Solution(obj,s.getPredecessor());
+ }
+ }
+ }
+ return null;
+ }
+}
+
+
+// ( referencedChildren += [ Child ] ) ?
+protected class SecondConcrete_0_1_Assignment_referencedChildren extends AssignmentToken {
+
+ public SecondConcrete_0_1_Assignment_referencedChildren(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, !IS_REQUIRED);
+ }
+
+ public Assignment getGrammarElement() {
+ return (Assignment)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.8/@alternatives/@abstractTokens.0/@abstractTokens.1");
+ }
+
+ protected Solution createSolution() {
+ if((value = current.getConsumable("referencedChildren",required)) == null) return null;
+ IInstanceDescription obj = current.cloneAndConsume("referencedChildren");
+ if(value instanceof EObject) { // xtext::CrossReference
+ IInstanceDescription param = getDescr((EObject)value);
+ if(param.isInstanceOf("Child")) {
+ type = AssignmentType.CR;
+ element = (AbstractElement)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.8/@alternatives/@abstractTokens.0/@abstractTokens.1/@terminal");
+ return new Solution(obj);
+ }
+ }
+ return null;
+ }
+}
+
+
+// ')'
+protected class SecondConcrete_1_Keyword extends KeywordToken {
+
+ public SecondConcrete_1_Keyword(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Keyword getGrammarElement() {
+ return (Keyword)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.8/@alternatives/@abstractTokens.1");
+ }
+}
+
+
+/************ end Rule SecondConcrete ****************/
+
+/************ begin Rule Named ****************
+ *
+ * Named : name = ID ;
+ *
+ **/
+
+
+// name = ID
+protected class Named_Assignment_name extends AssignmentToken {
+
+ public Named_Assignment_name(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Assignment getGrammarElement() {
+ return (Assignment)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.9/@alternatives");
+ }
+
+ protected Solution createSolution() {
+ if((value = current.getConsumable("name",required)) == null) return null;
+ IInstanceDescription obj = current.cloneAndConsume("name");
+ if(true) { // xtext::RuleCall FIXME: check if value is valid for lexer rule
+ type = AssignmentType.LRC;
+ element = (AbstractElement)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.9/@alternatives/@terminal");
+ return new Solution(obj);
+ }
+ return null;
+ }
+}
+
+/************ end Rule Named ****************/
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/partialParserTestLanguage.ecore b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/partialParserTestLanguage.ecore
new file mode 100644
index 0000000..639510b
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/partialParserTestLanguage.ecore
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ASCII"?>
+<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="partialParserTestLanguage" nsURI="http://example.xtext.org/PartialParserTestLanguage" nsPrefix="partialParserTestLanguage">
+ <eClassifiers xsi:type="ecore:EClass" name="Container">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="nested" upperBound="-1" eType="//Nested" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="content" upperBound="-1" eType="//Content" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Nested">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="nested" upperBound="-1" eType="//Container" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Content"/>
+ <eClassifiers xsi:type="ecore:EClass" name="Children" eSuperTypes="//Content">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="children" upperBound="-1" eType="//Child" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="AbstractChildren" eSuperTypes="//Content">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="abstractChildren" upperBound="-1" eType="//AbstractChild" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Child">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="value" eType="//Named" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="AbstractChild">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="value" eType="//Named" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="FirstConcrete" eSuperTypes="//AbstractChild">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="referencedContainer" eType="//Container"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="SecondConcrete" eSuperTypes="//AbstractChild">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="referencedChildren" upperBound="-1" eType="//Child"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Named">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/services/PartialParserTestLanguageGrammarAccess.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/services/PartialParserTestLanguageGrammarAccess.java
new file mode 100644
index 0000000..18ce6d5
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/services/PartialParserTestLanguageGrammarAccess.java
@@ -0,0 +1,97 @@
+/*
+Generated with Xtext
+*/
+
+package org.eclipse.xtext.testlanguages.services;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.xtext.*;
+import org.eclipse.xtext.parser.BaseEPackageAccess;
+
+public class PartialParserTestLanguageGrammarAccess extends BaseEPackageAccess implements IGrammarAccess {
+
+ private static final String PARTIALPARSERTESTLANGUAGE_GRAMMAR_CP_URI = "classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi";
+ private static Grammar GRAMMAR = null;
+
+ @SuppressWarnings("unused")
+ public synchronized Grammar getGrammar() {
+ if (GRAMMAR==null) {
+ // assert the XtextPackage implementation is loaded
+ XtextPackage xtextPackage = XtextPackage.eINSTANCE;
+ GRAMMAR = (Grammar) loadGrammarFile(PartialParserTestLanguageGrammarAccess.class.getClassLoader(),PARTIALPARSERTESTLANGUAGE_GRAMMAR_CP_URI);
+ }
+ return GRAMMAR;
+ }
+
+
+ public ParserRule pr_Container() {
+ return (ParserRule) getGrammar().eResource().getResourceSet().getEObject(URI.createURI("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.0"),true);
+ }
+
+ public ParserRule pr_Nested() {
+ return (ParserRule) getGrammar().eResource().getResourceSet().getEObject(URI.createURI("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.1"),true);
+ }
+
+ public ParserRule pr_Content() {
+ return (ParserRule) getGrammar().eResource().getResourceSet().getEObject(URI.createURI("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.2"),true);
+ }
+
+ public ParserRule pr_Children() {
+ return (ParserRule) getGrammar().eResource().getResourceSet().getEObject(URI.createURI("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.3"),true);
+ }
+
+ public ParserRule pr_Child() {
+ return (ParserRule) getGrammar().eResource().getResourceSet().getEObject(URI.createURI("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.4"),true);
+ }
+
+ public ParserRule pr_AbstractChildren() {
+ return (ParserRule) getGrammar().eResource().getResourceSet().getEObject(URI.createURI("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.5"),true);
+ }
+
+ public ParserRule pr_AbstractChild() {
+ return (ParserRule) getGrammar().eResource().getResourceSet().getEObject(URI.createURI("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.6"),true);
+ }
+
+ public ParserRule pr_FirstConcrete() {
+ return (ParserRule) getGrammar().eResource().getResourceSet().getEObject(URI.createURI("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.7"),true);
+ }
+
+ public ParserRule pr_SecondConcrete() {
+ return (ParserRule) getGrammar().eResource().getResourceSet().getEObject(URI.createURI("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.8"),true);
+ }
+
+ public ParserRule pr_Named() {
+ return (ParserRule) getGrammar().eResource().getResourceSet().getEObject(URI.createURI("classpath:/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi#//@rules.9"),true);
+ }
+
+
+ public LexerRule lr_ID() {
+ return (LexerRule) getGrammar().eResource().getResourceSet().getEObject(URI.createURI("classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"),true);
+ }
+
+ public LexerRule lr_INT() {
+ return (LexerRule) getGrammar().eResource().getResourceSet().getEObject(URI.createURI("classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.1"),true);
+ }
+
+ public LexerRule lr_STRING() {
+ return (LexerRule) getGrammar().eResource().getResourceSet().getEObject(URI.createURI("classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.2"),true);
+ }
+
+ public LexerRule lr_ML_COMMENT() {
+ return (LexerRule) getGrammar().eResource().getResourceSet().getEObject(URI.createURI("classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.3"),true);
+ }
+
+ public LexerRule lr_SL_COMMENT() {
+ return (LexerRule) getGrammar().eResource().getResourceSet().getEObject(URI.createURI("classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.4"),true);
+ }
+
+ public LexerRule lr_WS() {
+ return (LexerRule) getGrammar().eResource().getResourceSet().getEObject(URI.createURI("classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.5"),true);
+ }
+
+ public LexerRule lr_ANY_OTHER() {
+ return (LexerRule) getGrammar().eResource().getResourceSet().getEObject(URI.createURI("classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.6"),true);
+ }
+
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/services/PartialParserTestLanguageMetamodelAccess.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/services/PartialParserTestLanguageMetamodelAccess.java
new file mode 100644
index 0000000..259fe62
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/services/PartialParserTestLanguageMetamodelAccess.java
@@ -0,0 +1,51 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.testlanguages.services;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.xtext.IMetamodelAccess;
+import org.eclipse.xtext.parser.BaseEPackageAccess;
+
+public class PartialParserTestLanguageMetamodelAccess extends BaseEPackageAccess implements IMetamodelAccess {
+
+{
+
+ if (!EPackage.Registry.INSTANCE.containsKey(PARTIALPARSERTESTLANGUAGE_NS_URI))
+ EPackage.Registry.INSTANCE.put(PARTIALPARSERTESTLANGUAGE_NS_URI, loadEcoreFile(getClass().getClassLoader(), "classpath:/org/eclipse/xtext/testlanguages/partialParserTestLanguage.ecore"));
+
+}
+
+ private EPackage[] generated = new EPackage[] {
+
+ getPartialParserTestLanguageEPackage()
+
+ };
+
+ public EPackage[] getGeneratedEPackages() {
+ return generated;
+ }
+
+ private EPackage[] referenced = new EPackage[] {
+
+ };
+ public EPackage[] getReferencedEPackages() {
+ return referenced;
+ }
+
+ private EPackage[] all = new EPackage[] {
+ getPartialParserTestLanguageEPackage()
+ };
+
+ public EPackage[] getAllEPackages() {
+ return all;
+ }
+
+
+ protected static final String PARTIALPARSERTESTLANGUAGE_NS_URI = "http://example.xtext.org/PartialParserTestLanguage";
+
+ protected EPackage getPartialParserTestLanguageEPackage() {
+ return EPackage.Registry.INSTANCE.getEPackage(PARTIALPARSERTESTLANGUAGE_NS_URI);
+ }
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/services/PartialParserTestLanguageResourceFactory.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/services/PartialParserTestLanguageResourceFactory.java
new file mode 100644
index 0000000..c140a19
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/services/PartialParserTestLanguageResourceFactory.java
@@ -0,0 +1,28 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.testlanguages.services;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.xtext.resource.IResourceFactory;
+import org.eclipse.xtext.resource.XtextResource;
+import org.eclipse.xtext.service.ServiceRegistry;
+import org.eclipse.xtext.service.ServiceScopeFactory;
+
+public class PartialParserTestLanguageResourceFactory implements IResourceFactory {
+
+ public String[] getModelFileExtensions() {
+ return new String[] { "partialparsertestlanguage" };
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.emf.ecore.resource.Resource.Factory#createResource(org.eclipse.emf.common.util.URI)
+ */
+ public Resource createResource(URI uri) {
+ XtextResource resource = new XtextResource(uri);
+ ServiceRegistry.injectServices(ServiceScopeFactory.get("org.eclipse.xtext.testlanguages.PartialParserTestLanguage"), resource);
+ return resource;
+ }
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/GenerateAllTestGrammars.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/GenerateAllTestGrammars.java
index 832ecb3..c851d6f 100755
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/GenerateAllTestGrammars.java
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/GenerateAllTestGrammars.java
@@ -26,6 +26,7 @@ import org.eclipse.xtext.testlanguages.FowlerDslTestLanguage;
import org.eclipse.xtext.testlanguages.LexerLanguage;
import org.eclipse.xtext.testlanguages.LookaheadLanguage;
import org.eclipse.xtext.testlanguages.OptionalEmptyLanguage;
+import org.eclipse.xtext.testlanguages.PartialParserTestLanguage;
import org.eclipse.xtext.testlanguages.ReferenceGrammar;
import org.eclipse.xtext.testlanguages.SimpleExpressions;
import org.eclipse.xtext.testlanguages.TestLanguage;
@@ -41,11 +42,13 @@ public class GenerateAllTestGrammars {
private static Logger log = Logger.getLogger(GenerateAllTestGrammars.class);
- public final static Class<?>[] testclasses = new Class[] { LangA.class, AbstractTestLanguage.class,
+ public final static Class<?>[] testclasses = new Class[] {
+ LangA.class, AbstractTestLanguage.class,
ConcreteTestLanguage.class, XtextGrammarTest.class, MetamodelRefTest.class, DummyLanguage.class,
TestLanguage.class, SimpleReconstrTest.class, ComplexReconstrTest.class, LexerLanguage.class,
SimpleExpressions.class, ActionTestLanguage.class, OptionalEmptyLanguage.class, ReferenceGrammar.class,
- LookaheadLanguage.class, Bug250313.class, FowlerDslTestLanguage.class, TreeTestLanguage.class, ImportUriTestLanguage.class };
+ LookaheadLanguage.class, Bug250313.class, FowlerDslTestLanguage.class, TreeTestLanguage.class, ImportUriTestLanguage.class,
+ PartialParserTestLanguage.class };
public static void main(String[] args) throws Exception {
try {
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/PartialParserTest.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/PartialParserTest.java
index d1be1ae..d040155 100644
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/PartialParserTest.java
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/PartialParserTest.java
@@ -23,6 +23,7 @@ import org.eclipse.xtext.parsetree.LeafNode;
import org.eclipse.xtext.parsetree.NodeUtil;
import org.eclipse.xtext.resource.XtextResource;
import org.eclipse.xtext.testlanguages.LookaheadLanguageStandaloneSetup;
+import org.eclipse.xtext.testlanguages.PartialParserTestLanguageStandaloneSetup;
import org.eclipse.xtext.testlanguages.ReferenceGrammarStandaloneSetup;
import org.eclipse.xtext.testlanguages.SimpleExpressionsStandaloneSetup;
import org.eclipse.xtext.util.StringInputStream;
@@ -106,6 +107,78 @@ public class PartialParserTest extends AbstractPartialParserTest {
resource.update(model.indexOf("k 1"), 3, "m 3");
assertSame(rootNode, resource.getParseResult().getRootNode());
}
+
+ private AbstractNode findLeafNodeByText(CompositeNode root, String model, String text) {
+ return NodeUtil.findLeafNodeAtOffset(root, model.indexOf(text) + 1);
+ }
+
+ public void testPartialParseConcreteRuleInnermostToken() throws Exception {
+ with(PartialParserTestLanguageStandaloneSetup.class);
+ String model = "container c1 {\n" +
+ " children {\n" +
+ " -> C ( ch1 )\n" +
+ " }" +
+ "}";
+ XtextResource resource = getResourceFromString(model);
+ assertTrue(resource.getErrors().isEmpty());
+ CompositeNode root = resource.getParseResult().getRootNode();
+ AbstractNode children = findLeafNodeByText(root, model, "children");
+ resource.update(model.indexOf("ch1") + 1, 1, "h");
+ resource.update(model.indexOf("ch1") + 1, 1, "h");
+ assertSame(root, resource.getParseResult().getRootNode());
+ assertNotSame(children, findLeafNodeByText(root, model, "children"));
+ }
+
+ public void testPartialParseConcreteRuleInnerToken() throws Exception {
+ with(PartialParserTestLanguageStandaloneSetup.class);
+ String model = "container c1 {\n" +
+ " children {\n" +
+ " -> C ( ch1 )\n" +
+ " }" +
+ "}";
+ XtextResource resource = getResourceFromString(model);
+ assertTrue(resource.getErrors().isEmpty());
+ CompositeNode root = resource.getParseResult().getRootNode();
+ AbstractNode children = findLeafNodeByText(root, model, "children");
+ resource.update(model.indexOf("C"), 1, "C");
+ resource.update(model.indexOf("C"), 1, "C");
+ assertSame(root, resource.getParseResult().getRootNode());
+ assertNotSame(children, findLeafNodeByText(root, model, "children"));
+ }
+
+ public void testPartialParseConcreteRuleFirstInnerToken() throws Exception {
+ with(PartialParserTestLanguageStandaloneSetup.class);
+ String model = "container c1 {\n" +
+ " children {\n" +
+ " -> C ( ch1 )\n" +
+ " }" +
+ "}";
+ XtextResource resource = getResourceFromString(model);
+ assertTrue(resource.getErrors().isEmpty());
+ CompositeNode root = resource.getParseResult().getRootNode();
+ AbstractNode children = findLeafNodeByText(root, model, "children");
+ resource.update(model.indexOf("->"), 2, "->");
+ resource.update(model.indexOf("->"), 2, "->");
+ assertSame(root, resource.getParseResult().getRootNode());
+ assertNotSame(children, findLeafNodeByText(root, model, "children"));
+ }
+
+ public void testPartialParseConcreteRuleFirstToken() throws Exception {
+ with(PartialParserTestLanguageStandaloneSetup.class);
+ String model = "container c1 {\n" +
+ " children {\n" +
+ " -> C ( ch1 )\n" +
+ " }" +
+ "}";
+ XtextResource resource = getResourceFromString(model);
+ assertTrue(resource.getErrors().isEmpty());
+ CompositeNode root = resource.getParseResult().getRootNode();
+ AbstractNode children = findLeafNodeByText(root, model, "children");
+ resource.update(model.indexOf("n {") + 2, 1, "{");
+ resource.update(model.indexOf("n {") + 2, 1, "{");
+ assertSame(root, resource.getParseResult().getRootNode());
+ assertNotSame(children, findLeafNodeByText(root, model, "children"));
+ }
@SuppressWarnings("serial")
private void checkGrammarAssigned(CompositeNode rootNode) {
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/FowlerDslTestLanguage.xtext b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/FowlerDslTestLanguage.xtext
index 785e27a..c075fd0 100644
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/FowlerDslTestLanguage.xtext
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/FowlerDslTestLanguage.xtext
@@ -1,3 +1,11 @@
+/*******************************************************************************
+ * Copyright (c) 2008 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
+ *
+ *******************************************************************************/
language org.eclipse.xtext.testlanguages.FowlerDslTestLanguage
generate fowlerdsl "http://example.xtext.org/FowlerDslTestLanguage"
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.java
new file mode 100644
index 0000000..8820949
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.java
@@ -0,0 +1,15 @@
+/*******************************************************************************
+ * Copyright (c) 2008 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.testlanguages;
+
+/**
+ * @author Sebastian Zarnekow - Initial contribution and API
+ */
+public class PartialParserTestLanguage {
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xtext b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xtext
new file mode 100644
index 0000000..741e725
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xtext
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2008 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
+ *
+ *******************************************************************************/
+language org.eclipse.xtext.testlanguages.PartialParserTestLanguage
+generate partialParserTestLanguage "http://example.xtext.org/PartialParserTestLanguage"
+
+Container :
+ 'container' name=ID '{'
+ ( nested+=Nested | content+=Content )*
+ '}';
+
+Nested:
+ 'nested' '{'
+ (nested+=Container)+
+ '}';
+
+Content:
+ Children | AbstractChildren;
+
+Children:
+ 'children' '{'
+ children += Child (',' children += Child )*
+ '}';
+
+Child :
+ '->' 'C' '(' value=Named ')';
+
+AbstractChildren :
+ 'abstract children' '{'
+ ( abstractChildren += AbstractChild )+
+ '}';
+
+AbstractChild :
+ FirstConcrete | SecondConcrete;
+
+FirstConcrete :
+ '->' 'F' '(' value=Named referencedContainer=[Container]? ')';
+
+SecondConcrete :
+ '->' 'F' 'S' '(' value=Named referencedChildren+=[Child]? ')';
+
+Named:
+ name=ID;
+ \ No newline at end of file
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/PartialParserTestLanguageChecks.chk b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/PartialParserTestLanguageChecks.chk
new file mode 100644
index 0000000..90b5c54
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/PartialParserTestLanguageChecks.chk
@@ -0,0 +1,7 @@
+import partialParserTestLanguage;
+/*
+ * this check file is used to specify constraints for the derived metamodels
+ * example:
+ * context Entity WARNING "Entity names should start with a capital" :
+ * name.toFirstUpper() == name;
+ */
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/PartialParserTestLanguageRuntimeConfig.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/PartialParserTestLanguageRuntimeConfig.java
new file mode 100644
index 0000000..8a3dae2
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/PartialParserTestLanguageRuntimeConfig.java
@@ -0,0 +1,19 @@
+package org.eclipse.xtext.testlanguages;
+
+import java.util.Set;
+
+import org.eclipse.xtext.service.AbstractServiceRegistrationFactory;
+
+/**
+ * used to register components to be used at runtime.
+ */
+public class PartialParserTestLanguageRuntimeConfig extends AbstractPartialParserTestLanguageRuntimeConfig {
+
+ public Set<IServiceRegistration> registrations() {
+ Set<IServiceRegistration> generated = super.registrations();
+ // do stuff
+ return generated;
+ }
+
+}
+