aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorszarnekow2009-02-16 11:00:44 (EST)
committersefftinge2009-02-16 11:00:44 (EST)
commitfea85682c76ce475717cb824c2042f5325031580 (patch)
tree4d04dd7385d74513fc30684948b8df9852b1e372
parent9811c0f9d3f1a3ca83ec7f9b06ef0624d0af0b87 (diff)
downloadorg.eclipse.xtext-fea85682c76ce475717cb824c2042f5325031580.zip
org.eclipse.xtext-fea85682c76ce475717cb824c2042f5325031580.tar.gz
org.eclipse.xtext-fea85682c76ce475717cb824c2042f5325031580.tar.bz2
Fix: grammar inheritance does not work in editor (see bug #265019)
Fix: Typo in template
-rw-r--r--devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/ReferenceGrammarParserConfiguration.java4
-rw-r--r--examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/DomainmodelParserConfiguration.java3
-rw-r--r--examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/EcoreDslParserConfiguration.java4
-rw-r--r--examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/packrat/FowlerDslParserConfiguration.java3
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/ImportUriTestLanguageParserConfiguration.java3
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/LangATestLanguageParserConfiguration.java3
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/parser/packrat/DummyTestLanguageParserConfiguration.java3
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/packrat/LowerCaseNamedTestLanguageParserConfiguration.java3
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/AbstractBaseInheritanceTestLanguageRuntimeModule.java59
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/AbstractInheritanceTestLanguageRuntimeModule.java59
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/BaseInheritanceTestLanguage.xmi59
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/BaseInheritanceTestLanguageStandaloneSetup.java58
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/InheritanceTestLanguage.xmi97
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/InheritanceTestLanguageStandaloneSetup.java58
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/baseInheritanceTest.ecore8
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/inheritanceTest.ecore12
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/BaseInheritanceTestLanguageAntlrTokenFileProvider.java15
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/BaseInheritanceTestLanguageParser.java56
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/InheritanceTestLanguageAntlrTokenFileProvider.java15
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/InheritanceTestLanguageParser.java56
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g135
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.tokens8
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguageLexer.java714
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguageParser.java174
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage__.g36
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g213
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.tokens11
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguageLexer.java844
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguageParser.java353
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage__.g39
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/AbstractTestLanguageParserConfiguration.java3
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/BaseInheritanceTestLanguageDelimiters.java28
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/BaseInheritanceTestLanguagePackratParser.java31
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/BaseInheritanceTestLanguageParserConfiguration.java114
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/ConcreteTestLanguageParserConfiguration.java3
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/InheritanceTestLanguageDelimiters.java30
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/InheritanceTestLanguagePackratParser.java31
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/InheritanceTestLanguageParserConfiguration.java131
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/BaseInheritanceTestLanguageModelConsumer.java125
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/InheritanceTestLanguageElementConsumer.java125
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/InheritanceTestLanguageModelConsumer.java205
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parsetree/reconstr/BaseInheritanceTestLanguageParseTreeConstructor.java104
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parsetree/reconstr/InheritanceTestLanguageParseTreeConstructor.java327
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/services/BaseInheritanceTestLanguageGrammarAccess.java104
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/services/BaseInheritanceTestLanguageMetamodelAccess.java51
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/services/InheritanceTestLanguageGrammarAccess.java161
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/services/InheritanceTestLanguageMetamodelAccess.java51
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/packrat/MetamodelRefTestLanguageParserConfiguration.java3
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/packrat/MultiGenMMTestLanguageParserConfiguration.java3
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/packrat/DatatypeRulesTestLanguageParserConfiguration.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/EpatchTestLanguageParserConfiguration.java3
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/keywords/parser/packrat/KeywordsTestLanguageParserConfiguration.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/XtextGrammarTestLanguageParserConfiguration.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/HiddenTerminalsTestLanguageParserConfiguration.java10
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/TerminalRulesTestLanguageParserConfiguration.java10
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/XtextTerminalsTestLanguageParserConfiguration.java11
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/formatter/parser/packrat/FormatterTestLanguageParserConfiguration.java3
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/ComplexReconstrTestLanguageParserConfiguration.java3
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/SimpleReconstrTestLanguageParserConfiguration.java3
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/transientvalues/parser/packrat/TransientValuesTestParserConfiguration.java3
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/resource/metamodel/parser/packrat/MultiValueFeatureTestLanguageParserConfiguration.java3
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/ActionTestLanguageParserConfiguration.java3
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/ContentAssistTestLanguageParserConfiguration.java3
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/FowlerDslTestLanguageParserConfiguration.java3
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/LexerTestLanguageParserConfiguration.java3
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/LookaheadTestLanguageParserConfiguration.java6
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/OptionalEmptyTestLanguageParserConfiguration.java3
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/PartialParserTestLanguageParserConfiguration.java3
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/ReferenceGrammarTestLanguageParserConfiguration.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/SimpleExpressionsTestLanguageParserConfiguration.java3
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/TestLanguageParserConfiguration.java3
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/TreeTestLanguageParserConfiguration.java3
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/parser/packrat/Bug250313ParserConfiguration.java3
-rwxr-xr-xtests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/GenerateAllTestGrammars.java6
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/generator/lowerCaseNamedTestLanguage.xtext1
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/generator/resource/ResourceTest.java9
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/AbstractTestLanguage.xtext7
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/BaseInheritanceTestChecks.chk7
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/BaseInheritanceTestLanguage.java15
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/BaseInheritanceTestLanguage.xtext12
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/BaseInheritanceTestLanguageRuntimeModule.java18
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/ConcreteTestLanguage.xtext7
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/Inheritance2Test.java53
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/InheritanceTestChecks.chk7
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/InheritanceTestLanguage.java15
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/InheritanceTestLanguage.xtext21
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/InheritanceTestLanguageRuntimeModule.java18
-rw-r--r--tests/org.eclipse.xtext.ui.integration.tests/src-gen/org/eclipse/xtext/ui/integration/parser/packrat/TestLanguageParserConfiguration.java3
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/GenXtextGrammarTestLanguageScopeProvider.ext32
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/parser/keywords/parser/packrat/KeywordsTestLanguageParserConfiguration.java4
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/parser/packrat/XtextGrammarTestLanguageParserConfiguration.java4
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/GenReferenceGrammarTestLanguageScopeProvider.ext8
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/ContentAssistTestLanguageParserConfiguration.java3
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/ReferenceGrammarTestLanguageParserConfiguration.java4
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/TreeTestLanguageParserConfiguration.java3
95 files changed, 4983 insertions, 110 deletions
diff --git a/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/ReferenceGrammarParserConfiguration.java b/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/ReferenceGrammarParserConfiguration.java
index 52a6594..769e29b 100644
--- a/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/ReferenceGrammarParserConfiguration.java
+++ b/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/ReferenceGrammarParserConfiguration.java
@@ -87,7 +87,7 @@ public class ReferenceGrammarParserConfiguration extends AbstractParserConfigura
public void configureConsumers() {
if (grammarAccess == null)
- throw new NullPointerException("grammarAccess may not be null, you call configureConsumers");
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
getSpielplatzConsumer().setRule(grammarAccess.prSpielplatz());
getPersonConsumer().setRule(grammarAccess.prPerson());
getKindConsumer().setRule(grammarAccess.prKind());
@@ -128,6 +128,7 @@ public class ReferenceGrammarParserConfiguration extends AbstractParserConfigura
getFamilieConsumer().setIdConsumer(getIdConsumer());
getFamilieConsumer().setStringConsumer(getStringConsumer());
+
getCustomTypeParserRuleConsumer().setIdConsumer(getIdConsumer());
getSpielplatzConsumer().setKeyword$11$Delimiter(ReferenceGrammarDelimiters.keyword$14$Delimiter);
@@ -233,7 +234,6 @@ public class ReferenceGrammarParserConfiguration extends AbstractParserConfigura
return getXtextBuiltinConfiguration().getAnyOtherConsumer();
}
-
@Override
public ITerminalConsumer[] getInitialHiddenTerminals() {
return getXtextBuiltinConfiguration().getInitialHiddenTerminals();
diff --git a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/DomainmodelParserConfiguration.java b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/DomainmodelParserConfiguration.java
index 37fe41f..05d60c2 100644
--- a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/DomainmodelParserConfiguration.java
+++ b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/DomainmodelParserConfiguration.java
@@ -127,7 +127,7 @@ public class DomainmodelParserConfiguration extends AbstractParserConfiguration
public void configureConsumers() {
if (grammarAccess == null)
- throw new NullPointerException("grammarAccess may not be null, you call configureConsumers");
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
getFileConsumer().setRule(grammarAccess.prFile());
getImportConsumer().setRule(grammarAccess.prImport());
getNamedElementConsumer().setRule(grammarAccess.prNamedElement());
@@ -329,7 +329,6 @@ public class DomainmodelParserConfiguration extends AbstractParserConfiguration
return getXtextBuiltinConfiguration().getAnyOtherConsumer();
}
-
@Override
public ITerminalConsumer[] getInitialHiddenTerminals() {
return getXtextBuiltinConfiguration().getInitialHiddenTerminals();
diff --git a/examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/EcoreDslParserConfiguration.java b/examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/EcoreDslParserConfiguration.java
index ce4f75a..b05b909 100644
--- a/examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/EcoreDslParserConfiguration.java
+++ b/examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/EcoreDslParserConfiguration.java
@@ -167,7 +167,7 @@ public class EcoreDslParserConfiguration extends AbstractParserConfiguration {
public void configureConsumers() {
if (grammarAccess == null)
- throw new NullPointerException("grammarAccess may not be null, you call configureConsumers");
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
getEcoreDslConsumer().setRule(grammarAccess.prEcoreDsl());
getImportStatementDeclConsumer().setRule(grammarAccess.prImportStatementDecl());
getEPackageDeclConsumer().setRule(grammarAccess.prEPackageDecl());
@@ -287,6 +287,7 @@ public class EcoreDslParserConfiguration extends AbstractParserConfiguration {
getMapEntryConsumer().setIdConsumer(getIdConsumer());
getMapEntryConsumer().setStringConsumer(getStringConsumer());
+
getQidConsumer().setIdConsumer(getIdConsumer());
getStringOrQidConsumer().setQidConsumer(getQidConsumer());
@@ -554,7 +555,6 @@ public class EcoreDslParserConfiguration extends AbstractParserConfiguration {
return getXtextBuiltinConfiguration().getAnyOtherConsumer();
}
-
@Override
public ITerminalConsumer[] getInitialHiddenTerminals() {
return getXtextBuiltinConfiguration().getInitialHiddenTerminals();
diff --git a/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/packrat/FowlerDslParserConfiguration.java b/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/packrat/FowlerDslParserConfiguration.java
index 93f2730..8d0b8ae 100644
--- a/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/packrat/FowlerDslParserConfiguration.java
+++ b/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/packrat/FowlerDslParserConfiguration.java
@@ -72,7 +72,7 @@ public class FowlerDslParserConfiguration extends AbstractParserConfiguration {
public void configureConsumers() {
if (grammarAccess == null)
- throw new NullPointerException("grammarAccess may not be null, you call configureConsumers");
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
getStatemachineConsumer().setRule(grammarAccess.prStatemachine());
getEventConsumer().setRule(grammarAccess.prEvent());
getCommandConsumer().setRule(grammarAccess.prCommand());
@@ -174,7 +174,6 @@ public class FowlerDslParserConfiguration extends AbstractParserConfiguration {
return getXtextBuiltinConfiguration().getAnyOtherConsumer();
}
-
@Override
public ITerminalConsumer[] getInitialHiddenTerminals() {
return getXtextBuiltinConfiguration().getInitialHiddenTerminals();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/ImportUriTestLanguageParserConfiguration.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/ImportUriTestLanguageParserConfiguration.java
index 7ee44da..f50183b 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/ImportUriTestLanguageParserConfiguration.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/ImportUriTestLanguageParserConfiguration.java
@@ -62,7 +62,7 @@ public class ImportUriTestLanguageParserConfiguration extends AbstractParserConf
public void configureConsumers() {
if (grammarAccess == null)
- throw new NullPointerException("grammarAccess may not be null, you call configureConsumers");
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
getMainConsumer().setRule(grammarAccess.prMain());
getImportConsumer().setRule(grammarAccess.prImport());
getTypeConsumer().setRule(grammarAccess.prType());
@@ -135,7 +135,6 @@ public class ImportUriTestLanguageParserConfiguration extends AbstractParserConf
return getXtextBuiltinConfiguration().getAnyOtherConsumer();
}
-
@Override
public ITerminalConsumer[] getInitialHiddenTerminals() {
return getXtextBuiltinConfiguration().getInitialHiddenTerminals();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/LangATestLanguageParserConfiguration.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/LangATestLanguageParserConfiguration.java
index 59b836e..09e752a 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/LangATestLanguageParserConfiguration.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/LangATestLanguageParserConfiguration.java
@@ -62,7 +62,7 @@ public class LangATestLanguageParserConfiguration extends AbstractParserConfigur
public void configureConsumers() {
if (grammarAccess == null)
- throw new NullPointerException("grammarAccess may not be null, you call configureConsumers");
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
getMainConsumer().setRule(grammarAccess.prMain());
getImportConsumer().setRule(grammarAccess.prImport());
getTypeConsumer().setRule(grammarAccess.prType());
@@ -135,7 +135,6 @@ public class LangATestLanguageParserConfiguration extends AbstractParserConfigur
return getXtextBuiltinConfiguration().getAnyOtherConsumer();
}
-
@Override
public ITerminalConsumer[] getInitialHiddenTerminals() {
return getXtextBuiltinConfiguration().getInitialHiddenTerminals();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/parser/packrat/DummyTestLanguageParserConfiguration.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/parser/packrat/DummyTestLanguageParserConfiguration.java
index e129513..146725e 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/parser/packrat/DummyTestLanguageParserConfiguration.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/parser/packrat/DummyTestLanguageParserConfiguration.java
@@ -57,7 +57,7 @@ public class DummyTestLanguageParserConfiguration extends AbstractParserConfigur
public void configureConsumers() {
if (grammarAccess == null)
- throw new NullPointerException("grammarAccess may not be null, you call configureConsumers");
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
getModelConsumer().setRule(grammarAccess.prModel());
getElementConsumer().setRule(grammarAccess.prElement());
getIdConsumer().setRule(grammarAccess.lrID());
@@ -122,7 +122,6 @@ public class DummyTestLanguageParserConfiguration extends AbstractParserConfigur
return getXtextBuiltinConfiguration().getAnyOtherConsumer();
}
-
@Override
public ITerminalConsumer[] getInitialHiddenTerminals() {
return getXtextBuiltinConfiguration().getInitialHiddenTerminals();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/packrat/LowerCaseNamedTestLanguageParserConfiguration.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/packrat/LowerCaseNamedTestLanguageParserConfiguration.java
index b182c67..446e2de 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/packrat/LowerCaseNamedTestLanguageParserConfiguration.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/packrat/LowerCaseNamedTestLanguageParserConfiguration.java
@@ -52,7 +52,7 @@ public class LowerCaseNamedTestLanguageParserConfiguration extends AbstractParse
public void configureConsumers() {
if (grammarAccess == null)
- throw new NullPointerException("grammarAccess may not be null, you call configureConsumers");
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
getModelConsumer().setRule(grammarAccess.prModel());
getIdConsumer().setRule(grammarAccess.lrID());
getIntConsumer().setRule(grammarAccess.lrINT());
@@ -105,7 +105,6 @@ public class LowerCaseNamedTestLanguageParserConfiguration extends AbstractParse
return getXtextBuiltinConfiguration().getAnyOtherConsumer();
}
-
@Override
public ITerminalConsumer[] getInitialHiddenTerminals() {
return getXtextBuiltinConfiguration().getInitialHiddenTerminals();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/AbstractBaseInheritanceTestLanguageRuntimeModule.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/AbstractBaseInheritanceTestLanguageRuntimeModule.java
new file mode 100644
index 0000000..16690c2
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/AbstractBaseInheritanceTestLanguageRuntimeModule.java
@@ -0,0 +1,59 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.grammarinheritance;
+
+import org.eclipse.xtext.Constants;
+import org.eclipse.xtext.service.DefaultRuntimeModule;
+
+import com.google.inject.Binder;
+import com.google.inject.name.Names;
+
+/**
+ * Generated from ServiceConfig.xpt!
+ * Manual modifications go to BaseInheritanceTestLanguageRuntimeModule
+ */
+public abstract class AbstractBaseInheritanceTestLanguageRuntimeModule extends DefaultRuntimeModule {
+
+ @Override
+ public void configure(Binder binder) {
+ super.configure(binder);
+ binder.bind(String.class).annotatedWith(Names.named(Constants.LANGUAGE_NAME)).toInstance(
+ "org.eclipse.xtext.grammarinheritance.BaseInheritanceTestLanguage");
+ }
+
+ public Class<? extends org.eclipse.xtext.IMetamodelAccess> bindIMetamodelAccess() {
+ return org.eclipse.xtext.grammarinheritance.services.BaseInheritanceTestLanguageMetamodelAccess.class;
+ }
+ public Class<? extends org.eclipse.xtext.IGrammarAccess> bindIGrammarAccess() {
+ return org.eclipse.xtext.grammarinheritance.services.BaseInheritanceTestLanguageGrammarAccess.class;
+ }
+ public Class<? extends org.eclipse.xtext.parsetree.reconstr.IParseTreeConstructor> bindIParseTreeConstructor() {
+ return org.eclipse.xtext.grammarinheritance.parsetree.reconstr.BaseInheritanceTestLanguageParseTreeConstructor.class;
+ }
+ public Class<? extends org.eclipse.xtext.parser.antlr.IAntlrParser> bindIAntlrParser() {
+ return org.eclipse.xtext.grammarinheritance.parser.antlr.BaseInheritanceTestLanguageParser.class;
+ }
+ public Class<? extends org.eclipse.xtext.parser.ITokenToStringConverter> bindITokenToStringConverter() {
+ return org.eclipse.xtext.parser.antlr.AntlrTokenToStringConverter.class;
+ }
+ public Class<? extends org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider> bindIAntlrTokenFileProvider() {
+ return org.eclipse.xtext.grammarinheritance.parser.antlr.BaseInheritanceTestLanguageAntlrTokenFileProvider.class;
+ }
+ public Class<? extends org.eclipse.xtext.parser.antlr.Lexer> bindLexer() {
+ return org.eclipse.xtext.grammarinheritance.parser.antlr.internal.InternalBaseInheritanceTestLanguageLexer.class;
+ }
+ public Class<? extends org.eclipse.xtext.parser.antlr.ITokenDefProvider> bindITokenDefProvider() {
+ return org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider.class;
+ }
+ public Class<? extends org.eclipse.xtext.parser.packrat.IPackratParser> bindIPackratParser() {
+ return org.eclipse.xtext.grammarinheritance.parser.packrat.BaseInheritanceTestLanguagePackratParser.class;
+ }
+ public Class<? extends org.eclipse.xtext.parser.packrat.IParseResultFactory> bindIParseResultFactory() {
+ return org.eclipse.xtext.parser.packrat.ParseResultFactory.class;
+ }
+ public Class<? extends org.eclipse.xtext.parser.ISwitchingParser> bindISwitchingParser() {
+ return org.eclipse.xtext.parser.SwitchingParser.class;
+ }
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/AbstractInheritanceTestLanguageRuntimeModule.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/AbstractInheritanceTestLanguageRuntimeModule.java
new file mode 100644
index 0000000..77c0430
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/AbstractInheritanceTestLanguageRuntimeModule.java
@@ -0,0 +1,59 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.grammarinheritance;
+
+import org.eclipse.xtext.Constants;
+import org.eclipse.xtext.service.DefaultRuntimeModule;
+
+import com.google.inject.Binder;
+import com.google.inject.name.Names;
+
+/**
+ * Generated from ServiceConfig.xpt!
+ * Manual modifications go to InheritanceTestLanguageRuntimeModule
+ */
+public abstract class AbstractInheritanceTestLanguageRuntimeModule extends DefaultRuntimeModule {
+
+ @Override
+ public void configure(Binder binder) {
+ super.configure(binder);
+ binder.bind(String.class).annotatedWith(Names.named(Constants.LANGUAGE_NAME)).toInstance(
+ "org.eclipse.xtext.grammarinheritance.InheritanceTestLanguage");
+ }
+
+ public Class<? extends org.eclipse.xtext.IMetamodelAccess> bindIMetamodelAccess() {
+ return org.eclipse.xtext.grammarinheritance.services.InheritanceTestLanguageMetamodelAccess.class;
+ }
+ public Class<? extends org.eclipse.xtext.IGrammarAccess> bindIGrammarAccess() {
+ return org.eclipse.xtext.grammarinheritance.services.InheritanceTestLanguageGrammarAccess.class;
+ }
+ public Class<? extends org.eclipse.xtext.parsetree.reconstr.IParseTreeConstructor> bindIParseTreeConstructor() {
+ return org.eclipse.xtext.grammarinheritance.parsetree.reconstr.InheritanceTestLanguageParseTreeConstructor.class;
+ }
+ public Class<? extends org.eclipse.xtext.parser.antlr.IAntlrParser> bindIAntlrParser() {
+ return org.eclipse.xtext.grammarinheritance.parser.antlr.InheritanceTestLanguageParser.class;
+ }
+ public Class<? extends org.eclipse.xtext.parser.ITokenToStringConverter> bindITokenToStringConverter() {
+ return org.eclipse.xtext.parser.antlr.AntlrTokenToStringConverter.class;
+ }
+ public Class<? extends org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider> bindIAntlrTokenFileProvider() {
+ return org.eclipse.xtext.grammarinheritance.parser.antlr.InheritanceTestLanguageAntlrTokenFileProvider.class;
+ }
+ public Class<? extends org.eclipse.xtext.parser.antlr.Lexer> bindLexer() {
+ return org.eclipse.xtext.grammarinheritance.parser.antlr.internal.InternalInheritanceTestLanguageLexer.class;
+ }
+ public Class<? extends org.eclipse.xtext.parser.antlr.ITokenDefProvider> bindITokenDefProvider() {
+ return org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider.class;
+ }
+ public Class<? extends org.eclipse.xtext.parser.packrat.IPackratParser> bindIPackratParser() {
+ return org.eclipse.xtext.grammarinheritance.parser.packrat.InheritanceTestLanguagePackratParser.class;
+ }
+ public Class<? extends org.eclipse.xtext.parser.packrat.IParseResultFactory> bindIParseResultFactory() {
+ return org.eclipse.xtext.parser.packrat.ParseResultFactory.class;
+ }
+ public Class<? extends org.eclipse.xtext.parser.ISwitchingParser> bindISwitchingParser() {
+ return org.eclipse.xtext.parser.SwitchingParser.class;
+ }
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/BaseInheritanceTestLanguage.xmi b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/BaseInheritanceTestLanguage.xmi
new file mode 100644
index 0000000..3551f79
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/BaseInheritanceTestLanguage.xmi
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="ASCII"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:xtext="http://www.eclipse.org/2008/Xtext">
+ <xtext:Grammar name="org.eclipse.xtext.grammarinheritance.BaseInheritanceTestLanguage" superGrammar="/1">
+ <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="baseInheritanceTest">
+ <ePackage href="http://www.eclipse.org/2009/tmf/xtext/BaseInheritanceTestLanguage#/"/>
+ </metamodelDeclarations>
+ <rules xsi:type="xtext:ParserRule" name="Model">
+ <type metamodel="/0/@metamodelDeclarations.0">
+ <type xsi:type="ecore:EClass" href="http://www.eclipse.org/2009/tmf/xtext/BaseInheritanceTestLanguage#//Model"/>
+ </type>
+ <alternatives xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Keyword" value="model"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="/1/@rules.0"/>
+ </abstractTokens>
+ </alternatives>
+ </rules>
+ </xtext:Grammar>
+ <xtext:Grammar abstract="true" name="org.eclipse.xtext.builtin.XtextBuiltin" definesHiddenTokens="true" hiddenTokens="/1/@rules.5 /1/@rules.3 /1/@rules.4">
+ <metamodelDeclarations xsi:type="xtext:ReferencedMetamodel" alias="ecore">
+ <ePackage href="http://www.eclipse.org/emf/2002/Ecore#/"/>
+ </metamodelDeclarations>
+ <rules xsi:type="xtext:LexerRule" name="ID" body="('^')?('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*">
+ <type metamodel="/1/@metamodelDeclarations.0">
+ <type xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </type>
+ </rules>
+ <rules xsi:type="xtext:LexerRule" name="INT" body="('0'..'9')+">
+ <type metamodel="/1/@metamodelDeclarations.0">
+ <type xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ </type>
+ </rules>
+ <rules xsi:type="xtext:LexerRule" name="STRING" body="&#xA;&#x9;&#x9;&#x9; '&quot;' ( '\\' ('b'|'t'|'n'|'f'|'r'|'\&quot;'|'\''|'\\') | ~('\\'|'&quot;') )* '&quot;' | &#xA; '\'' ( '\\' ('b'|'t'|'n'|'f'|'r'|'\&quot;'|'\''|'\\') | ~('\\'|'\'') )* '\''&#xA; ">
+ <type metamodel="/1/@metamodelDeclarations.0">
+ <type xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </type>
+ </rules>
+ <rules xsi:type="xtext:LexerRule" name="ML_COMMENT" body="'/*' ( options {greedy=false;} : . )* '*/'">
+ <type metamodel="/1/@metamodelDeclarations.0">
+ <type xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </type>
+ </rules>
+ <rules xsi:type="xtext:LexerRule" name="SL_COMMENT" body="'//' ~('\n'|'\r')* ('\r'? '\n')?">
+ <type metamodel="/1/@metamodelDeclarations.0">
+ <type xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </type>
+ </rules>
+ <rules xsi:type="xtext:LexerRule" name="WS" body="(' '|'\t'|'\r'|'\n')+">
+ <type metamodel="/1/@metamodelDeclarations.0">
+ <type xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </type>
+ </rules>
+ <rules xsi:type="xtext:LexerRule" name="ANY_OTHER" body=".">
+ <type metamodel="/1/@metamodelDeclarations.0">
+ <type xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </type>
+ </rules>
+ </xtext:Grammar>
+</xmi:XMI>
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/BaseInheritanceTestLanguageStandaloneSetup.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/BaseInheritanceTestLanguageStandaloneSetup.java
new file mode 100644
index 0000000..30119a7
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/BaseInheritanceTestLanguageStandaloneSetup.java
@@ -0,0 +1,58 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.grammarinheritance;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.xtext.EcoreUtil2;
+import org.eclipse.xtext.ISetup;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.xtext.resource.IResourceFactory;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+/**
+ * Generated from StandaloneSetup.xpt!
+ */
+public class BaseInheritanceTestLanguageStandaloneSetup implements ISetup {
+
+ public static void doSetup() {
+ new BaseInheritanceTestLanguageStandaloneSetup().createInjectorAndDoEMFRegistration();
+ }
+
+ public Injector createInjectorAndDoEMFRegistration() {
+
+ org.eclipse.xtext.builtin.XtextBuiltinStandaloneSetup.doSetup();
+ registerEPackages();
+ Injector injector = createInjector();
+ IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
+ registerResourceFactory(resourceFactory);
+ return injector;
+ }
+
+ public Injector createInjector() {
+ return Guice.createInjector(new org.eclipse.xtext.grammarinheritance.BaseInheritanceTestLanguageRuntimeModule());
+ }
+
+ public void registerResourceFactory(IResourceFactory resourceFactory) {
+ Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("baseinheritancetestlanguage", resourceFactory);
+
+ }
+
+ /**
+ * Initializes all EPackages generated for this language and registers them with EPackage.Registry.INSTANCE
+ */
+ public void registerEPackages() {
+ if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/2009/tmf/xtext/BaseInheritanceTestLanguage")) {
+ EPackage baseInheritanceTest = EcoreUtil2.loadEPackage(
+ "classpath:/org/eclipse/xtext/grammarinheritance/baseInheritanceTest.ecore",
+ BaseInheritanceTestLanguageStandaloneSetup.class.getClassLoader());
+ if (baseInheritanceTest == null)
+ throw new IllegalStateException(
+ "Couldn't load EPackage from 'classpath:/org/eclipse/xtext/grammarinheritance/baseInheritanceTest.ecore'");
+ EPackage.Registry.INSTANCE.put("http://www.eclipse.org/2009/tmf/xtext/BaseInheritanceTestLanguage", baseInheritanceTest);
+ }
+ }
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/InheritanceTestLanguage.xmi b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/InheritanceTestLanguage.xmi
new file mode 100644
index 0000000..f94d9f7
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/InheritanceTestLanguage.xmi
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="ASCII"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:xtext="http://www.eclipse.org/2008/Xtext">
+ <xtext:Grammar name="org.eclipse.xtext.grammarinheritance.InheritanceTestLanguage" superGrammar="/1">
+ <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="inheritanceTest">
+ <ePackage href="http://www.eclipse.org/2009/tmf/xtext/InheritanceTestLanguage#/"/>
+ </metamodelDeclarations>
+ <rules xsi:type="xtext:ParserRule" name="Model">
+ <type metamodel="/0/@metamodelDeclarations.0">
+ <type xsi:type="ecore:EClass" href="http://www.eclipse.org/2009/tmf/xtext/InheritanceTestLanguage#//Model"/>
+ </type>
+ <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="model"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="/2/@rules.0"/>
+ </abstractTokens>
+ </abstractTokens>
+ <abstractTokens xsi:type="xtext:Keyword" value="{"/>
+ </abstractTokens>
+ <abstractTokens xsi:type="xtext:Assignment" cardinality="*" feature="elements" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.1"/>
+ </abstractTokens>
+ </abstractTokens>
+ <abstractTokens xsi:type="xtext:Keyword" value="}"/>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:ParserRule" name="Element">
+ <type metamodel="/0/@metamodelDeclarations.0">
+ <type xsi:type="ecore:EClass" href="http://www.eclipse.org/2009/tmf/xtext/InheritanceTestLanguage#//Element"/>
+ </type>
+ <alternatives xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Keyword" value="element"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="/2/@rules.0"/>
+ </abstractTokens>
+ </alternatives>
+ </rules>
+ </xtext:Grammar>
+ <xtext:Grammar name="org.eclipse.xtext.grammarinheritance.BaseInheritanceTestLanguage" superGrammar="/2">
+ <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="baseInheritanceTest">
+ <ePackage href="http://www.eclipse.org/2009/tmf/xtext/BaseInheritanceTestLanguage#/"/>
+ </metamodelDeclarations>
+ <rules xsi:type="xtext:ParserRule" name="Model">
+ <type metamodel="/1/@metamodelDeclarations.0">
+ <type xsi:type="ecore:EClass" href="http://www.eclipse.org/2009/tmf/xtext/BaseInheritanceTestLanguage#//Model"/>
+ </type>
+ <alternatives xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Keyword" value="model"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="/2/@rules.0"/>
+ </abstractTokens>
+ </alternatives>
+ </rules>
+ </xtext:Grammar>
+ <xtext:Grammar abstract="true" name="org.eclipse.xtext.builtin.XtextBuiltin" definesHiddenTokens="true" hiddenTokens="/2/@rules.5 /2/@rules.3 /2/@rules.4">
+ <metamodelDeclarations xsi:type="xtext:ReferencedMetamodel" alias="ecore">
+ <ePackage href="http://www.eclipse.org/emf/2002/Ecore#/"/>
+ </metamodelDeclarations>
+ <rules xsi:type="xtext:LexerRule" name="ID" body="('^')?('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*">
+ <type metamodel="/2/@metamodelDeclarations.0">
+ <type xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </type>
+ </rules>
+ <rules xsi:type="xtext:LexerRule" name="INT" body="('0'..'9')+">
+ <type metamodel="/2/@metamodelDeclarations.0">
+ <type xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ </type>
+ </rules>
+ <rules xsi:type="xtext:LexerRule" name="STRING" body="&#xA;&#x9;&#x9;&#x9; '&quot;' ( '\\' ('b'|'t'|'n'|'f'|'r'|'\&quot;'|'\''|'\\') | ~('\\'|'&quot;') )* '&quot;' | &#xA; '\'' ( '\\' ('b'|'t'|'n'|'f'|'r'|'\&quot;'|'\''|'\\') | ~('\\'|'\'') )* '\''&#xA; ">
+ <type metamodel="/2/@metamodelDeclarations.0">
+ <type xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </type>
+ </rules>
+ <rules xsi:type="xtext:LexerRule" name="ML_COMMENT" body="'/*' ( options {greedy=false;} : . )* '*/'">
+ <type metamodel="/2/@metamodelDeclarations.0">
+ <type xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </type>
+ </rules>
+ <rules xsi:type="xtext:LexerRule" name="SL_COMMENT" body="'//' ~('\n'|'\r')* ('\r'? '\n')?">
+ <type metamodel="/2/@metamodelDeclarations.0">
+ <type xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </type>
+ </rules>
+ <rules xsi:type="xtext:LexerRule" name="WS" body="(' '|'\t'|'\r'|'\n')+">
+ <type metamodel="/2/@metamodelDeclarations.0">
+ <type xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </type>
+ </rules>
+ <rules xsi:type="xtext:LexerRule" name="ANY_OTHER" body=".">
+ <type metamodel="/2/@metamodelDeclarations.0">
+ <type xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </type>
+ </rules>
+ </xtext:Grammar>
+</xmi:XMI>
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/InheritanceTestLanguageStandaloneSetup.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/InheritanceTestLanguageStandaloneSetup.java
new file mode 100644
index 0000000..652ffd5
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/InheritanceTestLanguageStandaloneSetup.java
@@ -0,0 +1,58 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.grammarinheritance;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.xtext.EcoreUtil2;
+import org.eclipse.xtext.ISetup;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.xtext.resource.IResourceFactory;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+/**
+ * Generated from StandaloneSetup.xpt!
+ */
+public class InheritanceTestLanguageStandaloneSetup implements ISetup {
+
+ public static void doSetup() {
+ new InheritanceTestLanguageStandaloneSetup().createInjectorAndDoEMFRegistration();
+ }
+
+ public Injector createInjectorAndDoEMFRegistration() {
+
+ org.eclipse.xtext.grammarinheritance.BaseInheritanceTestLanguageStandaloneSetup.doSetup();
+ registerEPackages();
+ Injector injector = createInjector();
+ IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
+ registerResourceFactory(resourceFactory);
+ return injector;
+ }
+
+ public Injector createInjector() {
+ return Guice.createInjector(new org.eclipse.xtext.grammarinheritance.InheritanceTestLanguageRuntimeModule());
+ }
+
+ public void registerResourceFactory(IResourceFactory resourceFactory) {
+ Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("inheritancetestlanguage", resourceFactory);
+
+ }
+
+ /**
+ * Initializes all EPackages generated for this language and registers them with EPackage.Registry.INSTANCE
+ */
+ public void registerEPackages() {
+ if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/2009/tmf/xtext/InheritanceTestLanguage")) {
+ EPackage inheritanceTest = EcoreUtil2.loadEPackage(
+ "classpath:/org/eclipse/xtext/grammarinheritance/inheritanceTest.ecore",
+ InheritanceTestLanguageStandaloneSetup.class.getClassLoader());
+ if (inheritanceTest == null)
+ throw new IllegalStateException(
+ "Couldn't load EPackage from 'classpath:/org/eclipse/xtext/grammarinheritance/inheritanceTest.ecore'");
+ EPackage.Registry.INSTANCE.put("http://www.eclipse.org/2009/tmf/xtext/InheritanceTestLanguage", inheritanceTest);
+ }
+ }
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/baseInheritanceTest.ecore b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/baseInheritanceTest.ecore
new file mode 100644
index 0000000..86244bb
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/baseInheritanceTest.ecore
@@ -0,0 +1,8 @@
+<?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="baseInheritanceTest" nsURI="http://www.eclipse.org/2009/tmf/xtext/BaseInheritanceTestLanguage" nsPrefix="baseInheritanceTest">
+ <eClassifiers xsi:type="ecore:EClass" name="Model">
+ <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/grammarinheritance/inheritanceTest.ecore b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/inheritanceTest.ecore
new file mode 100644
index 0000000..d5633c7
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/inheritanceTest.ecore
@@ -0,0 +1,12 @@
+<?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="inheritanceTest" nsURI="http://www.eclipse.org/2009/tmf/xtext/InheritanceTestLanguage" nsPrefix="inheritanceTest">
+ <eClassifiers xsi:type="ecore:EClass" name="Model">
+ <eSuperTypes href="http://www.eclipse.org/2009/tmf/xtext/BaseInheritanceTestLanguage#//Model"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="elements" upperBound="-1" eType="//Element" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Element">
+ <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/grammarinheritance/parser/antlr/BaseInheritanceTestLanguageAntlrTokenFileProvider.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/BaseInheritanceTestLanguageAntlrTokenFileProvider.java
new file mode 100644
index 0000000..cc5a4ba
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/BaseInheritanceTestLanguageAntlrTokenFileProvider.java
@@ -0,0 +1,15 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.grammarinheritance.parser.antlr;
+
+import java.io.InputStream;
+import org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider;
+
+public class BaseInheritanceTestLanguageAntlrTokenFileProvider implements IAntlrTokenFileProvider {
+
+ public InputStream getAntlrTokenFile() {
+ ClassLoader classLoader = BaseInheritanceTestLanguageAntlrTokenFileProvider.class.getClassLoader();
+ return classLoader.getResourceAsStream("org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.tokens");
+ }
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/BaseInheritanceTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/BaseInheritanceTestLanguageParser.java
new file mode 100644
index 0000000..8730457
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/BaseInheritanceTestLanguageParser.java
@@ -0,0 +1,56 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.grammarinheritance.parser.antlr;
+
+import org.antlr.runtime.ANTLRInputStream;
+import org.eclipse.xtext.parser.antlr.ITokenDefProvider;
+import org.eclipse.xtext.parser.IParseResult;
+import org.eclipse.xtext.parser.ParseException;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream;
+
+import com.google.inject.Inject;
+
+import org.eclipse.xtext.grammarinheritance.parser.antlr.internal.InternalBaseInheritanceTestLanguageLexer;
+import org.eclipse.xtext.grammarinheritance.parser.antlr.internal.InternalBaseInheritanceTestLanguageParser;
+
+import org.eclipse.xtext.grammarinheritance.services.BaseInheritanceTestLanguageGrammarAccess;
+
+public class BaseInheritanceTestLanguageParser extends org.eclipse.xtext.parser.antlr.AbstractAntlrParser {
+
+ @Inject
+ protected ITokenDefProvider antlrTokenDefProvider;
+
+ @Inject
+ private BaseInheritanceTestLanguageGrammarAccess grammarAccess;
+
+ @Override
+ protected IParseResult parse(String ruleName, ANTLRInputStream in) {
+ InternalBaseInheritanceTestLanguageLexer lexer = new InternalBaseInheritanceTestLanguageLexer(in);
+ XtextTokenStream stream = new XtextTokenStream(lexer, antlrTokenDefProvider);
+ stream.setInitialHiddenTokens("RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT");
+ InternalBaseInheritanceTestLanguageParser parser = new InternalBaseInheritanceTestLanguageParser(
+ stream, getElementFactory(), grammarAccess);
+ parser.setTokenTypeMap(antlrTokenDefProvider.getTokenDefMap());
+ try {
+ if(ruleName != null)
+ return parser.parse(ruleName);
+ return parser.parse();
+ } catch (Exception re) {
+ throw new ParseException(re.getMessage(),re);
+ }
+ }
+
+ @Override
+ protected String getDefaultRuleName() {
+ return "Model";
+ }
+
+ public BaseInheritanceTestLanguageGrammarAccess getGrammarAccess() {
+ return this.grammarAccess;
+ }
+
+ public void setGrammarAccess(BaseInheritanceTestLanguageGrammarAccess grammarAccess) {
+ this.grammarAccess = grammarAccess;
+ }
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/InheritanceTestLanguageAntlrTokenFileProvider.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/InheritanceTestLanguageAntlrTokenFileProvider.java
new file mode 100644
index 0000000..f10e315
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/InheritanceTestLanguageAntlrTokenFileProvider.java
@@ -0,0 +1,15 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.grammarinheritance.parser.antlr;
+
+import java.io.InputStream;
+import org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider;
+
+public class InheritanceTestLanguageAntlrTokenFileProvider implements IAntlrTokenFileProvider {
+
+ public InputStream getAntlrTokenFile() {
+ ClassLoader classLoader = InheritanceTestLanguageAntlrTokenFileProvider.class.getClassLoader();
+ return classLoader.getResourceAsStream("org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.tokens");
+ }
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/InheritanceTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/InheritanceTestLanguageParser.java
new file mode 100644
index 0000000..e296663
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/InheritanceTestLanguageParser.java
@@ -0,0 +1,56 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.grammarinheritance.parser.antlr;
+
+import org.antlr.runtime.ANTLRInputStream;
+import org.eclipse.xtext.parser.antlr.ITokenDefProvider;
+import org.eclipse.xtext.parser.IParseResult;
+import org.eclipse.xtext.parser.ParseException;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream;
+
+import com.google.inject.Inject;
+
+import org.eclipse.xtext.grammarinheritance.parser.antlr.internal.InternalInheritanceTestLanguageLexer;
+import org.eclipse.xtext.grammarinheritance.parser.antlr.internal.InternalInheritanceTestLanguageParser;
+
+import org.eclipse.xtext.grammarinheritance.services.InheritanceTestLanguageGrammarAccess;
+
+public class InheritanceTestLanguageParser extends org.eclipse.xtext.parser.antlr.AbstractAntlrParser {
+
+ @Inject
+ protected ITokenDefProvider antlrTokenDefProvider;
+
+ @Inject
+ private InheritanceTestLanguageGrammarAccess grammarAccess;
+
+ @Override
+ protected IParseResult parse(String ruleName, ANTLRInputStream in) {
+ InternalInheritanceTestLanguageLexer lexer = new InternalInheritanceTestLanguageLexer(in);
+ XtextTokenStream stream = new XtextTokenStream(lexer, antlrTokenDefProvider);
+ stream.setInitialHiddenTokens("RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT");
+ InternalInheritanceTestLanguageParser parser = new InternalInheritanceTestLanguageParser(
+ stream, getElementFactory(), grammarAccess);
+ parser.setTokenTypeMap(antlrTokenDefProvider.getTokenDefMap());
+ try {
+ if(ruleName != null)
+ return parser.parse(ruleName);
+ return parser.parse();
+ } catch (Exception re) {
+ throw new ParseException(re.getMessage(),re);
+ }
+ }
+
+ @Override
+ protected String getDefaultRuleName() {
+ return "Model";
+ }
+
+ public InheritanceTestLanguageGrammarAccess getGrammarAccess() {
+ return this.grammarAccess;
+ }
+
+ public void setGrammarAccess(InheritanceTestLanguageGrammarAccess grammarAccess) {
+ this.grammarAccess = grammarAccess;
+ }
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g
new file mode 100644
index 0000000..781d5ce
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g
@@ -0,0 +1,135 @@
+/*
+Generated with Xtext
+*/
+grammar InternalBaseInheritanceTestLanguage;
+
+options {
+ superClass=AbstractInternalAntlrParser;
+}
+
+@lexer::header {
+package org.eclipse.xtext.grammarinheritance.parser.antlr.internal;
+
+// Hack: Use our own Lexer superclass by means of import.
+// Currently there is no other way to specify the superclass for the lexer.
+import org.eclipse.xtext.parser.antlr.Lexer;
+}
+
+@parser::header {
+package org.eclipse.xtext.grammarinheritance.parser.antlr.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.AbstractInternalAntlrParser;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens;
+import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken;
+import org.eclipse.xtext.conversion.ValueConverterException;
+import org.eclipse.xtext.grammarinheritance.services.BaseInheritanceTestLanguageGrammarAccess;
+
+}
+
+@parser::members {
+
+ private BaseInheritanceTestLanguageGrammarAccess grammarAccess;
+
+ public InternalBaseInheritanceTestLanguageParser(TokenStream input, IAstFactory factory, BaseInheritanceTestLanguageGrammarAccess grammarAccess) {
+ super(input, factory, grammarAccess.getGrammar());
+ this.grammarAccess = grammarAccess;
+ }
+
+ @Override
+ protected InputStream getTokenFile() {
+ ClassLoader classLoader = InternalBaseInheritanceTestLanguageParser.class.getClassLoader();
+ return classLoader.getResourceAsStream("org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.tokens");
+ }
+
+ @Override
+ protected String getFirstRuleName() {
+ return "Model";
+ }
+}
+
+@rulecatch {
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+}
+
+
+
+
+
+// Entry rule entryRuleModel
+entryRuleModel returns [EObject current=null] :
+ { currentNode = createCompositeNode(grammarAccess.prModel().getRule(), currentNode); }
+ iv_ruleModel=ruleModel
+ { $current=$iv_ruleModel.current; }
+ EOF
+;
+
+// Rule Model
+ruleModel returns [EObject current=null]
+ @init { EObject temp=null; setCurrentLookahead(); resetLookahead();
+ }
+ @after { resetLookahead();
+ lastConsumedNode = currentNode;
+ }:
+('model'
+ {
+ createLeafNode(grammarAccess.prModel().ele0KeywordModel(), null);
+ }
+(
+
+ lv_name_1= RULE_ID
+ {
+ createLeafNode(grammarAccess.prModel().ele10LexerRuleCallID(), "name");
+ }
+
+ {
+ if ($current==null) {
+ $current = factory.create("Model");
+ associateNodeWithAstElement(currentNode, $current);
+ }
+
+ try {
+ set($current, "name", lv_name_1, "ID", lastConsumedNode);
+ } catch (ValueConverterException vce) {
+ handleValueConverterException(vce);
+ }
+ }
+
+));
+
+
+
+
+
+
+
+
+
+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;} : . )* '*/';
+
+RULE_SL_COMMENT : '//' ~('\n'|'\r')* ('\r'? '\n')?;
+
+RULE_WS : (' '|'\t'|'\r'|'\n')+;
+
+RULE_ANY_OTHER : .;
+
+
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.tokens b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.tokens
new file mode 100644
index 0000000..1a64f20
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.tokens
@@ -0,0 +1,8 @@
+RULE_ML_COMMENT=7
+RULE_ID=4
+RULE_WS=9
+RULE_INT=5
+RULE_STRING=6
+RULE_ANY_OTHER=10
+RULE_SL_COMMENT=8
+'model'=11
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguageLexer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguageLexer.java
new file mode 100644
index 0000000..f0a5247
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguageLexer.java
@@ -0,0 +1,714 @@
+package org.eclipse.xtext.grammarinheritance.parser.antlr.internal;
+
+// Hack: Use our own Lexer superclass by means of import.
+// Currently there is no other way to specify the superclass for the lexer.
+import org.eclipse.xtext.parser.antlr.Lexer;
+
+
+import org.antlr.runtime.*;
+import java.util.Stack;
+import java.util.List;
+import java.util.ArrayList;
+
+public class InternalBaseInheritanceTestLanguageLexer extends Lexer {
+ 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 T11=11;
+ public static final int EOF=-1;
+ public static final int RULE_INT=5;
+ public static final int RULE_STRING=6;
+ public static final int Tokens=12;
+ public static final int RULE_ANY_OTHER=10;
+ public static final int RULE_SL_COMMENT=8;
+ public InternalBaseInheritanceTestLanguageLexer() {;}
+ public InternalBaseInheritanceTestLanguageLexer(CharStream input) {
+ super(input);
+ }
+ public String getGrammarFileName() { return "../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g"; }
+
+ // $ANTLR start T11
+ public final void mT11() throws RecognitionException {
+ try {
+ int _type = T11;
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:10:5: ( 'model' )
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:10:7: 'model'
+ {
+ match("model");
+
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end T11
+
+ // $ANTLR start RULE_ID
+ public final void mRULE_ID() throws RecognitionException {
+ try {
+ int _type = RULE_ID;
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:118:9: ( ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* )
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:118:11: ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
+ {
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:118:11: ( '^' )?
+ int alt1=2;
+ int LA1_0 = input.LA(1);
+
+ if ( (LA1_0=='^') ) {
+ alt1=1;
+ }
+ switch (alt1) {
+ case 1 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:118: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;
+ }
+
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:118: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 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.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;
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:120:10: ( ( '0' .. '9' )+ )
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:120:12: ( '0' .. '9' )+
+ {
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:120:12: ( '0' .. '9' )+
+ int cnt3=0;
+ loop3:
+ do {
+ int alt3=2;
+ int LA3_0 = input.LA(1);
+
+ if ( ((LA3_0>='0' && LA3_0<='9')) ) {
+ alt3=1;
+ }
+
+
+ switch (alt3) {
+ case 1 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:120: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;
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:122: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("122:1: RULE_STRING : ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\"' ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\\'' ) )* '\\'' );", 6, 0, input);
+
+ throw nvae;
+ }
+ switch (alt6) {
+ case 1 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:123:6: '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\"' ) )* '\"'
+ {
+ match('\"');
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:123:10: ( '\\\\' ( '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 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:123:12: '\\\\' ( '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 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:123:56: ~ ( '\\\\' | '\"' )
+ {
+ 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 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:124:15: '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\\'' ) )* '\\''
+ {
+ match('\'');
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:124:20: ( '\\\\' ( '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 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:124:22: '\\\\' ( '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 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:124:66: ~ ( '\\\\' | '\\'' )
+ {
+ 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;
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:127:17: ( '/*' ( options {greedy=false; } : . )* '*/' )
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:127:19: '/*' ( options {greedy=false; } : . )* '*/'
+ {
+ match("/*");
+
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:127: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 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:127:52: .
+ {
+ matchAny();
+
+ }
+ break;
+
+ default :
+ break loop7;
+ }
+ } while (true);
+
+ match("*/");
+
+
+ }
+
+ 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;
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:129:17: ( '//' (~ ( '\\n' | '\\r' ) )* ( ( '\\r' )? '\\n' )? )
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:129:19: '//' (~ ( '\\n' | '\\r' ) )* ( ( '\\r' )? '\\n' )?
+ {
+ match("//");
+
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:129: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 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:129: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);
+
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:129: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 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:129:39: ( '\\r' )? '\\n'
+ {
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:129:39: ( '\\r' )?
+ int alt9=2;
+ int LA9_0 = input.LA(1);
+
+ if ( (LA9_0=='\r') ) {
+ alt9=1;
+ }
+ switch (alt9) {
+ case 1 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:129:39: '\\r'
+ {
+ match('\r');
+
+ }
+ break;
+
+ }
+
+ match('\n');
+
+ }
+ break;
+
+ }
+
+
+ }
+
+ 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;
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:131:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ )
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:131:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
+ {
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:131:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
+ int cnt11=0;
+ loop11:
+ do {
+ int alt11=2;
+ int LA11_0 = input.LA(1);
+
+ if ( ((LA11_0>='\t' && LA11_0<='\n')||LA11_0=='\r'||LA11_0==' ') ) {
+ alt11=1;
+ }
+
+
+ switch (alt11) {
+ case 1 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.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);
+
+
+ }
+
+ 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;
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:133:16: ( . )
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:133:18: .
+ {
+ matchAny();
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end RULE_ANY_OTHER
+
+ public void mTokens() throws RecognitionException {
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:1:8: ( T11 | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER )
+ int alt12=8;
+ int LA12_0 = input.LA(1);
+
+ if ( (LA12_0=='m') ) {
+ int LA12_1 = input.LA(2);
+
+ if ( (LA12_1=='o') ) {
+ int LA12_10 = input.LA(3);
+
+ if ( (LA12_10=='d') ) {
+ int LA12_17 = input.LA(4);
+
+ if ( (LA12_17=='e') ) {
+ int LA12_18 = input.LA(5);
+
+ if ( (LA12_18=='l') ) {
+ int LA12_19 = input.LA(6);
+
+ if ( ((LA12_19>='0' && LA12_19<='9')||(LA12_19>='A' && LA12_19<='Z')||LA12_19=='_'||(LA12_19>='a' && LA12_19<='z')) ) {
+ alt12=2;
+ }
+ else {
+ alt12=1;}
+ }
+ else {
+ alt12=2;}
+ }
+ else {
+ alt12=2;}
+ }
+ else {
+ alt12=2;}
+ }
+ else {
+ alt12=2;}
+ }
+ else if ( (LA12_0=='^') ) {
+ int LA12_2 = input.LA(2);
+
+ if ( ((LA12_2>='A' && LA12_2<='Z')||LA12_2=='_'||(LA12_2>='a' && LA12_2<='z')) ) {
+ alt12=2;
+ }
+ else {
+ alt12=8;}
+ }
+ else if ( ((LA12_0>='A' && LA12_0<='Z')||LA12_0=='_'||(LA12_0>='a' && LA12_0<='l')||(LA12_0>='n' && LA12_0<='z')) ) {
+ alt12=2;
+ }
+ else if ( ((LA12_0>='0' && LA12_0<='9')) ) {
+ alt12=3;
+ }
+ else if ( (LA12_0=='\"') ) {
+ int LA12_5 = input.LA(2);
+
+ if ( ((LA12_5>='\u0000' && LA12_5<='\uFFFE')) ) {
+ alt12=4;
+ }
+ else {
+ alt12=8;}
+ }
+ else if ( (LA12_0=='\'') ) {
+ int LA12_6 = input.LA(2);
+
+ if ( ((LA12_6>='\u0000' && LA12_6<='\uFFFE')) ) {
+ alt12=4;
+ }
+ else {
+ alt12=8;}
+ }
+ else if ( (LA12_0=='/') ) {
+ switch ( input.LA(2) ) {
+ case '/':
+ {
+ alt12=6;
+ }
+ break;
+ case '*':
+ {
+ alt12=5;
+ }
+ break;
+ default:
+ alt12=8;}
+
+ }
+ else if ( ((LA12_0>='\t' && LA12_0<='\n')||LA12_0=='\r'||LA12_0==' ') ) {
+ alt12=7;
+ }
+ 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<='\uFFFE')) ) {
+ alt12=8;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("1:1: Tokens : ( T11 | 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 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:1:10: T11
+ {
+ mT11();
+
+ }
+ break;
+ case 2 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:1:14: RULE_ID
+ {
+ mRULE_ID();
+
+ }
+ break;
+ case 3 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:1:22: RULE_INT
+ {
+ mRULE_INT();
+
+ }
+ break;
+ case 4 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:1:31: RULE_STRING
+ {
+ mRULE_STRING();
+
+ }
+ break;
+ case 5 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:1:43: RULE_ML_COMMENT
+ {
+ mRULE_ML_COMMENT();
+
+ }
+ break;
+ case 6 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:1:59: RULE_SL_COMMENT
+ {
+ mRULE_SL_COMMENT();
+
+ }
+ break;
+ case 7 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:1:75: RULE_WS
+ {
+ mRULE_WS();
+
+ }
+ break;
+ case 8 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:1:83: 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/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguageParser.java
new file mode 100644
index 0000000..71e68db
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguageParser.java
@@ -0,0 +1,174 @@
+package org.eclipse.xtext.grammarinheritance.parser.antlr.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.AbstractInternalAntlrParser;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens;
+import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken;
+import org.eclipse.xtext.conversion.ValueConverterException;
+import org.eclipse.xtext.grammarinheritance.services.BaseInheritanceTestLanguageGrammarAccess;
+
+
+
+import org.antlr.runtime.*;
+import java.util.Stack;
+import java.util.List;
+import java.util.ArrayList;
+
+public class InternalBaseInheritanceTestLanguageParser extends AbstractInternalAntlrParser {
+ public static final String[] tokenNames = new String[] {
+ "<invalid>", "<EOR>", "<DOWN>", "<UP>", "RULE_ID", "RULE_INT", "RULE_STRING", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS", "RULE_ANY_OTHER", "'model'"
+ };
+ 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 InternalBaseInheritanceTestLanguageParser(TokenStream input) {
+ super(input);
+ }
+
+
+ public String[] getTokenNames() { return tokenNames; }
+ public String getGrammarFileName() { return "../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g"; }
+
+
+
+ private BaseInheritanceTestLanguageGrammarAccess grammarAccess;
+
+ public InternalBaseInheritanceTestLanguageParser(TokenStream input, IAstFactory factory, BaseInheritanceTestLanguageGrammarAccess grammarAccess) {
+ super(input, factory, grammarAccess.getGrammar());
+ this.grammarAccess = grammarAccess;
+ }
+
+ @Override
+ protected InputStream getTokenFile() {
+ ClassLoader classLoader = InternalBaseInheritanceTestLanguageParser.class.getClassLoader();
+ return classLoader.getResourceAsStream("org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.tokens");
+ }
+
+ @Override
+ protected String getFirstRuleName() {
+ return "Model";
+ }
+
+
+
+ // $ANTLR start entryRuleModel
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:70:1: entryRuleModel returns [EObject current=null] : iv_ruleModel= ruleModel EOF ;
+ public final EObject entryRuleModel() throws RecognitionException {
+ EObject current = null;
+
+ EObject iv_ruleModel = null;
+
+
+ try {
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:70:47: (iv_ruleModel= ruleModel EOF )
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:71:2: iv_ruleModel= ruleModel EOF
+ {
+ currentNode = createCompositeNode(grammarAccess.prModel().getRule(), currentNode);
+ pushFollow(FOLLOW_ruleModel_in_entryRuleModel72);
+ iv_ruleModel=ruleModel();
+ _fsp--;
+
+ current =iv_ruleModel;
+ match(input,EOF,FOLLOW_EOF_in_entryRuleModel82);
+
+ }
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end entryRuleModel
+
+
+ // $ANTLR start ruleModel
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:78:1: ruleModel returns [EObject current=null] : ( 'model' (lv_name_1= RULE_ID ) ) ;
+ public final EObject ruleModel() throws RecognitionException {
+ EObject current = null;
+
+ Token lv_name_1=null;
+
+ EObject temp=null; setCurrentLookahead(); resetLookahead();
+
+ try {
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:83:6: ( ( 'model' (lv_name_1= RULE_ID ) ) )
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:84:1: ( 'model' (lv_name_1= RULE_ID ) )
+ {
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:84:1: ( 'model' (lv_name_1= RULE_ID ) )
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:84:2: 'model' (lv_name_1= RULE_ID )
+ {
+ match(input,11,FOLLOW_11_in_ruleModel116);
+
+ createLeafNode(grammarAccess.prModel().ele0KeywordModel(), null);
+
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:88:1: (lv_name_1= RULE_ID )
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g:90:6: lv_name_1= RULE_ID
+ {
+ lv_name_1=(Token)input.LT(1);
+ match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleModel138);
+
+ createLeafNode(grammarAccess.prModel().ele10LexerRuleCallID(), "name");
+
+
+ if (current==null) {
+ current = factory.create("Model");
+ associateNodeWithAstElement(currentNode, current);
+ }
+
+ try {
+ set(current, "name", lv_name_1, "ID", lastConsumedNode);
+ } catch (ValueConverterException vce) {
+ handleValueConverterException(vce);
+ }
+
+
+ }
+
+
+ }
+
+
+ }
+
+ resetLookahead();
+ lastConsumedNode = currentNode;
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end ruleModel
+
+
+
+
+ public static final BitSet FOLLOW_ruleModel_in_entryRuleModel72 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleModel82 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_11_in_ruleModel116 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_RULE_ID_in_ruleModel138 = 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/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage__.g b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage__.g
new file mode 100644
index 0000000..42726d1
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage__.g
@@ -0,0 +1,36 @@
+lexer grammar InternalBaseInheritanceTestLanguage;
+@header {
+package org.eclipse.xtext.grammarinheritance.parser.antlr.internal;
+
+// Hack: Use our own Lexer superclass by means of import.
+// Currently there is no other way to specify the superclass for the lexer.
+import org.eclipse.xtext.parser.antlr.Lexer;
+}
+
+T11 : 'model' ;
+
+// $ANTLR src "../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g" 118
+RULE_ID : ('^')?('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*;
+
+// $ANTLR src "../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g" 120
+RULE_INT : ('0'..'9')+;
+
+// $ANTLR src "../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g" 122
+RULE_STRING :
+ '"' ( '\\' ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\') | ~('\\'|'"') )* '"' |
+ '\'' ( '\\' ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\') | ~('\\'|'\'') )* '\''
+ ;
+
+// $ANTLR src "../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g" 127
+RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )* '*/';
+
+// $ANTLR src "../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g" 129
+RULE_SL_COMMENT : '//' ~('\n'|'\r')* ('\r'? '\n')?;
+
+// $ANTLR src "../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g" 131
+RULE_WS : (' '|'\t'|'\r'|'\n')+;
+
+// $ANTLR src "../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalBaseInheritanceTestLanguage.g" 133
+RULE_ANY_OTHER : .;
+
+
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g
new file mode 100644
index 0000000..a30f24b
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g
@@ -0,0 +1,213 @@
+/*
+Generated with Xtext
+*/
+grammar InternalInheritanceTestLanguage;
+
+options {
+ superClass=AbstractInternalAntlrParser;
+}
+
+@lexer::header {
+package org.eclipse.xtext.grammarinheritance.parser.antlr.internal;
+
+// Hack: Use our own Lexer superclass by means of import.
+// Currently there is no other way to specify the superclass for the lexer.
+import org.eclipse.xtext.parser.antlr.Lexer;
+}
+
+@parser::header {
+package org.eclipse.xtext.grammarinheritance.parser.antlr.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.AbstractInternalAntlrParser;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens;
+import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken;
+import org.eclipse.xtext.conversion.ValueConverterException;
+import org.eclipse.xtext.grammarinheritance.services.InheritanceTestLanguageGrammarAccess;
+
+}
+
+@parser::members {
+
+ private InheritanceTestLanguageGrammarAccess grammarAccess;
+
+ public InternalInheritanceTestLanguageParser(TokenStream input, IAstFactory factory, InheritanceTestLanguageGrammarAccess grammarAccess) {
+ super(input, factory, grammarAccess.getGrammar());
+ this.grammarAccess = grammarAccess;
+ }
+
+ @Override
+ protected InputStream getTokenFile() {
+ ClassLoader classLoader = InternalInheritanceTestLanguageParser.class.getClassLoader();
+ return classLoader.getResourceAsStream("org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.tokens");
+ }
+
+ @Override
+ protected String getFirstRuleName() {
+ return "Model";
+ }
+}
+
+@rulecatch {
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+}
+
+
+
+
+
+// Entry rule entryRuleModel
+entryRuleModel returns [EObject current=null] :
+ { currentNode = createCompositeNode(grammarAccess.prModel().getRule(), currentNode); }
+ iv_ruleModel=ruleModel
+ { $current=$iv_ruleModel.current; }
+ EOF
+;
+
+// Rule Model
+ruleModel returns [EObject current=null]
+ @init { EObject temp=null; setCurrentLookahead(); resetLookahead();
+ }
+ @after { resetLookahead();
+ lastConsumedNode = currentNode;
+ }:
+(((('model'
+ {
+ createLeafNode(grammarAccess.prModel().ele0000KeywordModel(), null);
+ }
+(
+
+ lv_name_1= RULE_ID
+ {
+ createLeafNode(grammarAccess.prModel().ele00010LexerRuleCallID(), "name");
+ }
+
+ {
+ if ($current==null) {
+ $current = factory.create("Model");
+ associateNodeWithAstElement(currentNode, $current);
+ }
+
+ try {
+ set($current, "name", lv_name_1, "ID", lastConsumedNode);
+ } catch (ValueConverterException vce) {
+ handleValueConverterException(vce);
+ }
+ }
+
+))'{'
+ {
+ createLeafNode(grammarAccess.prModel().ele001KeywordLeftCurlyBracket(), null);
+ }
+)(
+
+
+ {
+ currentNode=createCompositeNode(grammarAccess.prModel().ele010ParserRuleCallElement(), currentNode);
+ }
+ lv_elements_3=ruleElement
+ {
+ if ($current==null) {
+ $current = factory.create("Model");
+ associateNodeWithAstElement(currentNode.getParent(), $current);
+ }
+
+ try {
+ add($current, "elements", lv_elements_3, "Element", currentNode);
+ } catch (ValueConverterException vce) {
+ handleValueConverterException(vce);
+ }
+ currentNode = currentNode.getParent();
+ }
+
+)*)'}'
+ {
+ createLeafNode(grammarAccess.prModel().ele1KeywordRightCurlyBracket(), null);
+ }
+);
+
+
+
+
+
+
+
+// Entry rule entryRuleElement
+entryRuleElement returns [EObject current=null] :
+ { currentNode = createCompositeNode(grammarAccess.prElement().getRule(), currentNode); }
+ iv_ruleElement=ruleElement
+ { $current=$iv_ruleElement.current; }
+ EOF
+;
+
+// Rule Element
+ruleElement returns [EObject current=null]
+ @init { EObject temp=null; setCurrentLookahead(); resetLookahead();
+ }
+ @after { resetLookahead();
+ lastConsumedNode = currentNode;
+ }:
+('element'
+ {
+ createLeafNode(grammarAccess.prElement().ele0KeywordElement(), null);
+ }
+(
+
+ lv_name_1= RULE_ID
+ {
+ createLeafNode(grammarAccess.prElement().ele10LexerRuleCallID(), "name");
+ }
+
+ {
+ if ($current==null) {
+ $current = factory.create("Element");
+ associateNodeWithAstElement(currentNode, $current);
+ }
+
+ try {
+ set($current, "name", lv_name_1, "ID", lastConsumedNode);
+ } catch (ValueConverterException vce) {
+ handleValueConverterException(vce);
+ }
+ }
+
+));
+
+
+
+
+
+
+
+
+
+
+
+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;} : . )* '*/';
+
+RULE_SL_COMMENT : '//' ~('\n'|'\r')* ('\r'? '\n')?;
+
+RULE_WS : (' '|'\t'|'\r'|'\n')+;
+
+RULE_ANY_OTHER : .;
+
+
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.tokens b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.tokens
new file mode 100644
index 0000000..36e7311
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.tokens
@@ -0,0 +1,11 @@
+RULE_ML_COMMENT=7
+RULE_ID=4
+RULE_WS=9
+RULE_INT=5
+RULE_STRING=6
+RULE_ANY_OTHER=10
+RULE_SL_COMMENT=8
+'element'=14
+'}'=13
+'{'=12
+'model'=11
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguageLexer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguageLexer.java
new file mode 100644
index 0000000..102aeda
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguageLexer.java
@@ -0,0 +1,844 @@
+package org.eclipse.xtext.grammarinheritance.parser.antlr.internal;
+
+// Hack: Use our own Lexer superclass by means of import.
+// Currently there is no other way to specify the superclass for the lexer.
+import org.eclipse.xtext.parser.antlr.Lexer;
+
+
+import org.antlr.runtime.*;
+import java.util.Stack;
+import java.util.List;
+import java.util.ArrayList;
+
+public class InternalInheritanceTestLanguageLexer extends Lexer {
+ 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 RULE_WS=9;
+ public static final int T11=11;
+ public static final int EOF=-1;
+ public static final int RULE_INT=5;
+ public static final int RULE_STRING=6;
+ public static final int T12=12;
+ public static final int Tokens=15;
+ public static final int RULE_ANY_OTHER=10;
+ public static final int RULE_SL_COMMENT=8;
+ public static final int T13=13;
+ public InternalInheritanceTestLanguageLexer() {;}
+ public InternalInheritanceTestLanguageLexer(CharStream input) {
+ super(input);
+ }
+ public String getGrammarFileName() { return "../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g"; }
+
+ // $ANTLR start T11
+ public final void mT11() throws RecognitionException {
+ try {
+ int _type = T11;
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:10:5: ( 'model' )
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:10:7: 'model'
+ {
+ match("model");
+
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end T11
+
+ // $ANTLR start T12
+ public final void mT12() throws RecognitionException {
+ try {
+ int _type = T12;
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:11:5: ( '{' )
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:11:7: '{'
+ {
+ match('{');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end T12
+
+ // $ANTLR start T13
+ public final void mT13() throws RecognitionException {
+ try {
+ int _type = T13;
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:12:5: ( '}' )
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:12:7: '}'
+ {
+ match('}');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end T13
+
+ // $ANTLR start T14
+ public final void mT14() throws RecognitionException {
+ try {
+ int _type = T14;
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:13:5: ( 'element' )
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:13:7: 'element'
+ {
+ match("element");
+
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end T14
+
+ // $ANTLR start RULE_ID
+ public final void mRULE_ID() throws RecognitionException {
+ try {
+ int _type = RULE_ID;
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:196:9: ( ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* )
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:196:11: ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
+ {
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:196:11: ( '^' )?
+ int alt1=2;
+ int LA1_0 = input.LA(1);
+
+ if ( (LA1_0=='^') ) {
+ alt1=1;
+ }
+ switch (alt1) {
+ case 1 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:196: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;
+ }
+
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:196: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 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.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;
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:198:10: ( ( '0' .. '9' )+ )
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:198:12: ( '0' .. '9' )+
+ {
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:198:12: ( '0' .. '9' )+
+ int cnt3=0;
+ loop3:
+ do {
+ int alt3=2;
+ int LA3_0 = input.LA(1);
+
+ if ( ((LA3_0>='0' && LA3_0<='9')) ) {
+ alt3=1;
+ }
+
+
+ switch (alt3) {
+ case 1 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:198: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;
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:200: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("200:1: RULE_STRING : ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\"' ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\\'' ) )* '\\'' );", 6, 0, input);
+
+ throw nvae;
+ }
+ switch (alt6) {
+ case 1 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:201:6: '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\"' ) )* '\"'
+ {
+ match('\"');
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:201:10: ( '\\\\' ( '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 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:201:12: '\\\\' ( '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 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:201:56: ~ ( '\\\\' | '\"' )
+ {
+ 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 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:202:15: '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\\'' ) )* '\\''
+ {
+ match('\'');
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:202:20: ( '\\\\' ( '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 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:202:22: '\\\\' ( '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 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:202:66: ~ ( '\\\\' | '\\'' )
+ {
+ 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;
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:205:17: ( '/*' ( options {greedy=false; } : . )* '*/' )
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:205:19: '/*' ( options {greedy=false; } : . )* '*/'
+ {
+ match("/*");
+
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:205: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 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:205:52: .
+ {
+ matchAny();
+
+ }
+ break;
+
+ default :
+ break loop7;
+ }
+ } while (true);
+
+ match("*/");
+
+
+ }
+
+ 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;
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:207:17: ( '//' (~ ( '\\n' | '\\r' ) )* ( ( '\\r' )? '\\n' )? )
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:207:19: '//' (~ ( '\\n' | '\\r' ) )* ( ( '\\r' )? '\\n' )?
+ {
+ match("//");
+
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:207: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 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:207: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);
+
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:207: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 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:207:39: ( '\\r' )? '\\n'
+ {
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:207:39: ( '\\r' )?
+ int alt9=2;
+ int LA9_0 = input.LA(1);
+
+ if ( (LA9_0=='\r') ) {
+ alt9=1;
+ }
+ switch (alt9) {
+ case 1 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:207:39: '\\r'
+ {
+ match('\r');
+
+ }
+ break;
+
+ }
+
+ match('\n');
+
+ }
+ break;
+
+ }
+
+
+ }
+
+ 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;
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:209:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ )
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:209:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
+ {
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:209:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
+ int cnt11=0;
+ loop11:
+ do {
+ int alt11=2;
+ int LA11_0 = input.LA(1);
+
+ if ( ((LA11_0>='\t' && LA11_0<='\n')||LA11_0=='\r'||LA11_0==' ') ) {
+ alt11=1;
+ }
+
+
+ switch (alt11) {
+ case 1 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.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);
+
+
+ }
+
+ 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;
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:211:16: ( . )
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:211:18: .
+ {
+ matchAny();
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end RULE_ANY_OTHER
+
+ public void mTokens() throws RecognitionException {
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:1:8: ( T11 | T12 | T13 | T14 | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER )
+ int alt12=11;
+ int LA12_0 = input.LA(1);
+
+ if ( (LA12_0=='m') ) {
+ int LA12_1 = input.LA(2);
+
+ if ( (LA12_1=='o') ) {
+ int LA12_13 = input.LA(3);
+
+ if ( (LA12_13=='d') ) {
+ int LA12_23 = input.LA(4);
+
+ if ( (LA12_23=='e') ) {
+ int LA12_25 = input.LA(5);
+
+ if ( (LA12_25=='l') ) {
+ int LA12_27 = input.LA(6);
+
+ if ( ((LA12_27>='0' && LA12_27<='9')||(LA12_27>='A' && LA12_27<='Z')||LA12_27=='_'||(LA12_27>='a' && LA12_27<='z')) ) {
+ alt12=5;
+ }
+ else {
+ alt12=1;}
+ }
+ else {
+ alt12=5;}
+ }
+ else {
+ alt12=5;}
+ }
+ else {
+ alt12=5;}
+ }
+ else {
+ alt12=5;}
+ }
+ else if ( (LA12_0=='{') ) {
+ alt12=2;
+ }
+ else if ( (LA12_0=='}') ) {
+ alt12=3;
+ }
+ else if ( (LA12_0=='e') ) {
+ int LA12_4 = input.LA(2);
+
+ if ( (LA12_4=='l') ) {
+ int LA12_17 = input.LA(3);
+
+ if ( (LA12_17=='e') ) {
+ int LA12_24 = input.LA(4);
+
+ if ( (LA12_24=='m') ) {
+ int LA12_26 = input.LA(5);
+
+ if ( (LA12_26=='e') ) {
+ int LA12_28 = input.LA(6);
+
+ if ( (LA12_28=='n') ) {
+ int LA12_30 = input.LA(7);
+
+ if ( (LA12_30=='t') ) {
+ int LA12_31 = input.LA(8);
+
+ if ( ((LA12_31>='0' && LA12_31<='9')||(LA12_31>='A' && LA12_31<='Z')||LA12_31=='_'||(LA12_31>='a' && LA12_31<='z')) ) {
+ alt12=5;
+ }
+ else {
+ alt12=4;}
+ }
+ else {
+ alt12=5;}
+ }
+ else {
+ alt12=5;}
+ }
+ else {
+ alt12=5;}
+ }
+ else {
+ alt12=5;}
+ }
+ else {
+ alt12=5;}
+ }
+ else {
+ alt12=5;}
+ }
+ else if ( (LA12_0=='^') ) {
+ int LA12_5 = input.LA(2);
+
+ if ( ((LA12_5>='A' && LA12_5<='Z')||LA12_5=='_'||(LA12_5>='a' && LA12_5<='z')) ) {
+ alt12=5;
+ }
+ else {
+ alt12=11;}
+ }
+ else if ( ((LA12_0>='A' && LA12_0<='Z')||LA12_0=='_'||(LA12_0>='a' && LA12_0<='d')||(LA12_0>='f' && LA12_0<='l')||(LA12_0>='n' && LA12_0<='z')) ) {
+ alt12=5;
+ }
+ else if ( ((LA12_0>='0' && LA12_0<='9')) ) {
+ alt12=6;
+ }
+ else if ( (LA12_0=='\"') ) {
+ int LA12_8 = input.LA(2);
+
+ if ( ((LA12_8>='\u0000' && LA12_8<='\uFFFE')) ) {
+ alt12=7;
+ }
+ else {
+ alt12=11;}
+ }
+ else if ( (LA12_0=='\'') ) {
+ int LA12_9 = input.LA(2);
+
+ if ( ((LA12_9>='\u0000' && LA12_9<='\uFFFE')) ) {
+ alt12=7;
+ }
+ else {
+ alt12=11;}
+ }
+ else if ( (LA12_0=='/') ) {
+ switch ( input.LA(2) ) {
+ case '/':
+ {
+ alt12=9;
+ }
+ break;
+ case '*':
+ {
+ alt12=8;
+ }
+ break;
+ default:
+ alt12=11;}
+
+ }
+ else if ( ((LA12_0>='\t' && LA12_0<='\n')||LA12_0=='\r'||LA12_0==' ') ) {
+ alt12=10;
+ }
+ 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<='\uFFFE')) ) {
+ alt12=11;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("1:1: Tokens : ( T11 | T12 | T13 | T14 | 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 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:1:10: T11
+ {
+ mT11();
+
+ }
+ break;
+ case 2 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:1:14: T12
+ {
+ mT12();
+
+ }
+ break;
+ case 3 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:1:18: T13
+ {
+ mT13();
+
+ }
+ break;
+ case 4 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:1:22: T14
+ {
+ mT14();
+
+ }
+ break;
+ case 5 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:1:26: RULE_ID
+ {
+ mRULE_ID();
+
+ }
+ break;
+ case 6 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:1:34: RULE_INT
+ {
+ mRULE_INT();
+
+ }
+ break;
+ case 7 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:1:43: RULE_STRING
+ {
+ mRULE_STRING();
+
+ }
+ break;
+ case 8 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:1:55: RULE_ML_COMMENT
+ {
+ mRULE_ML_COMMENT();
+
+ }
+ break;
+ case 9 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:1:71: RULE_SL_COMMENT
+ {
+ mRULE_SL_COMMENT();
+
+ }
+ break;
+ case 10 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:1:87: RULE_WS
+ {
+ mRULE_WS();
+
+ }
+ break;
+ case 11 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:1:95: 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/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguageParser.java
new file mode 100644
index 0000000..6de2624
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguageParser.java
@@ -0,0 +1,353 @@
+package org.eclipse.xtext.grammarinheritance.parser.antlr.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.AbstractInternalAntlrParser;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens;
+import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken;
+import org.eclipse.xtext.conversion.ValueConverterException;
+import org.eclipse.xtext.grammarinheritance.services.InheritanceTestLanguageGrammarAccess;
+
+
+
+import org.antlr.runtime.*;
+import java.util.Stack;
+import java.util.List;
+import java.util.ArrayList;
+
+public class InternalInheritanceTestLanguageParser extends AbstractInternalAntlrParser {
+ public static final String[] tokenNames = new String[] {
+ "<invalid>", "<EOR>", "<DOWN>", "<UP>", "RULE_ID", "RULE_INT", "RULE_STRING", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS", "RULE_ANY_OTHER", "'model'", "'{'", "'}'", "'element'"
+ };
+ 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 InternalInheritanceTestLanguageParser(TokenStream input) {
+ super(input);
+ }
+
+
+ public String[] getTokenNames() { return tokenNames; }
+ public String getGrammarFileName() { return "../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g"; }
+
+
+
+ private InheritanceTestLanguageGrammarAccess grammarAccess;
+
+ public InternalInheritanceTestLanguageParser(TokenStream input, IAstFactory factory, InheritanceTestLanguageGrammarAccess grammarAccess) {
+ super(input, factory, grammarAccess.getGrammar());
+ this.grammarAccess = grammarAccess;
+ }
+
+ @Override
+ protected InputStream getTokenFile() {
+ ClassLoader classLoader = InternalInheritanceTestLanguageParser.class.getClassLoader();
+ return classLoader.getResourceAsStream("org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.tokens");
+ }
+
+ @Override
+ protected String getFirstRuleName() {
+ return "Model";
+ }
+
+
+
+ // $ANTLR start entryRuleModel
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:70:1: entryRuleModel returns [EObject current=null] : iv_ruleModel= ruleModel EOF ;
+ public final EObject entryRuleModel() throws RecognitionException {
+ EObject current = null;
+
+ EObject iv_ruleModel = null;
+
+
+ try {
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:70:47: (iv_ruleModel= ruleModel EOF )
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:71:2: iv_ruleModel= ruleModel EOF
+ {
+ currentNode = createCompositeNode(grammarAccess.prModel().getRule(), currentNode);
+ pushFollow(FOLLOW_ruleModel_in_entryRuleModel72);
+ iv_ruleModel=ruleModel();
+ _fsp--;
+
+ current =iv_ruleModel;
+ match(input,EOF,FOLLOW_EOF_in_entryRuleModel82);
+
+ }
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end entryRuleModel
+
+
+ // $ANTLR start ruleModel
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:78:1: ruleModel returns [EObject current=null] : ( ( ( ( 'model' (lv_name_1= RULE_ID ) ) '{' ) (lv_elements_3= ruleElement )* ) '}' ) ;
+ public final EObject ruleModel() throws RecognitionException {
+ EObject current = null;
+
+ Token lv_name_1=null;
+ EObject lv_elements_3 = null;
+
+
+ EObject temp=null; setCurrentLookahead(); resetLookahead();
+
+ try {
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:83:6: ( ( ( ( ( 'model' (lv_name_1= RULE_ID ) ) '{' ) (lv_elements_3= ruleElement )* ) '}' ) )
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:84:1: ( ( ( ( 'model' (lv_name_1= RULE_ID ) ) '{' ) (lv_elements_3= ruleElement )* ) '}' )
+ {
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:84:1: ( ( ( ( 'model' (lv_name_1= RULE_ID ) ) '{' ) (lv_elements_3= ruleElement )* ) '}' )
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:84:2: ( ( ( 'model' (lv_name_1= RULE_ID ) ) '{' ) (lv_elements_3= ruleElement )* ) '}'
+ {
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:84:2: ( ( ( 'model' (lv_name_1= RULE_ID ) ) '{' ) (lv_elements_3= ruleElement )* )
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:84:3: ( ( 'model' (lv_name_1= RULE_ID ) ) '{' ) (lv_elements_3= ruleElement )*
+ {
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:84:3: ( ( 'model' (lv_name_1= RULE_ID ) ) '{' )
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:84:4: ( 'model' (lv_name_1= RULE_ID ) ) '{'
+ {
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:84:4: ( 'model' (lv_name_1= RULE_ID ) )
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:84:5: 'model' (lv_name_1= RULE_ID )
+ {
+ match(input,11,FOLLOW_11_in_ruleModel119);
+
+ createLeafNode(grammarAccess.prModel().ele0000KeywordModel(), null);
+
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:88:1: (lv_name_1= RULE_ID )
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:90:6: lv_name_1= RULE_ID
+ {
+ lv_name_1=(Token)input.LT(1);
+ match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleModel141);
+
+ createLeafNode(grammarAccess.prModel().ele00010LexerRuleCallID(), "name");
+
+
+ if (current==null) {
+ current = factory.create("Model");
+ associateNodeWithAstElement(currentNode, current);
+ }
+
+ try {
+ set(current, "name", lv_name_1, "ID", lastConsumedNode);
+ } catch (ValueConverterException vce) {
+ handleValueConverterException(vce);
+ }
+
+
+ }
+
+
+ }
+
+ match(input,12,FOLLOW_12_in_ruleModel159);
+
+ createLeafNode(grammarAccess.prModel().ele001KeywordLeftCurlyBracket(), null);
+
+
+ }
+
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:112:2: (lv_elements_3= ruleElement )*
+ loop1:
+ do {
+ int alt1=2;
+ int LA1_0 = input.LA(1);
+
+ if ( (LA1_0==14) ) {
+ alt1=1;
+ }
+
+
+ switch (alt1) {
+ case 1 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:115:6: lv_elements_3= ruleElement
+ {
+
+ currentNode=createCompositeNode(grammarAccess.prModel().ele010ParserRuleCallElement(), currentNode);
+
+ pushFollow(FOLLOW_ruleElement_in_ruleModel194);
+ lv_elements_3=ruleElement();
+ _fsp--;
+
+
+ if (current==null) {
+ current = factory.create("Model");
+ associateNodeWithAstElement(currentNode.getParent(), current);
+ }
+
+ try {
+ add(current, "elements", lv_elements_3, "Element", currentNode);
+ } catch (ValueConverterException vce) {
+ handleValueConverterException(vce);
+ }
+ currentNode = currentNode.getParent();
+
+
+ }
+ break;
+
+ default :
+ break loop1;
+ }
+ } while (true);
+
+
+ }
+
+ match(input,13,FOLLOW_13_in_ruleModel209);
+
+ createLeafNode(grammarAccess.prModel().ele1KeywordRightCurlyBracket(), null);
+
+
+ }
+
+
+ }
+
+ resetLookahead();
+ lastConsumedNode = currentNode;
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end ruleModel
+
+
+ // $ANTLR start entryRuleElement
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:146:1: entryRuleElement returns [EObject current=null] : iv_ruleElement= ruleElement EOF ;
+ public final EObject entryRuleElement() throws RecognitionException {
+ EObject current = null;
+
+ EObject iv_ruleElement = null;
+
+
+ try {
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:146:49: (iv_ruleElement= ruleElement EOF )
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:147:2: iv_ruleElement= ruleElement EOF
+ {
+ currentNode = createCompositeNode(grammarAccess.prElement().getRule(), currentNode);
+ pushFollow(FOLLOW_ruleElement_in_entryRuleElement244);
+ iv_ruleElement=ruleElement();
+ _fsp--;
+
+ current =iv_ruleElement;
+ match(input,EOF,FOLLOW_EOF_in_entryRuleElement254);
+
+ }
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end entryRuleElement
+
+
+ // $ANTLR start ruleElement
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:154:1: ruleElement returns [EObject current=null] : ( 'element' (lv_name_1= RULE_ID ) ) ;
+ public final EObject ruleElement() throws RecognitionException {
+ EObject current = null;
+
+ Token lv_name_1=null;
+
+ EObject temp=null; setCurrentLookahead(); resetLookahead();
+
+ try {
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:159:6: ( ( 'element' (lv_name_1= RULE_ID ) ) )
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:160:1: ( 'element' (lv_name_1= RULE_ID ) )
+ {
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:160:1: ( 'element' (lv_name_1= RULE_ID ) )
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:160:2: 'element' (lv_name_1= RULE_ID )
+ {
+ match(input,14,FOLLOW_14_in_ruleElement288);
+
+ createLeafNode(grammarAccess.prElement().ele0KeywordElement(), null);
+
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:164:1: (lv_name_1= RULE_ID )
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g:166:6: lv_name_1= RULE_ID
+ {
+ lv_name_1=(Token)input.LT(1);
+ match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleElement310);
+
+ createLeafNode(grammarAccess.prElement().ele10LexerRuleCallID(), "name");
+
+
+ if (current==null) {
+ current = factory.create("Element");
+ associateNodeWithAstElement(currentNode, current);
+ }
+
+ try {
+ set(current, "name", lv_name_1, "ID", lastConsumedNode);
+ } catch (ValueConverterException vce) {
+ handleValueConverterException(vce);
+ }
+
+
+ }
+
+
+ }
+
+
+ }
+
+ resetLookahead();
+ lastConsumedNode = currentNode;
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end ruleElement
+
+
+
+
+ public static final BitSet FOLLOW_ruleModel_in_entryRuleModel72 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleModel82 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_11_in_ruleModel119 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_RULE_ID_in_ruleModel141 = new BitSet(new long[]{0x0000000000001000L});
+ public static final BitSet FOLLOW_12_in_ruleModel159 = new BitSet(new long[]{0x0000000000006000L});
+ public static final BitSet FOLLOW_ruleElement_in_ruleModel194 = new BitSet(new long[]{0x0000000000006000L});
+ public static final BitSet FOLLOW_13_in_ruleModel209 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleElement_in_entryRuleElement244 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleElement254 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_14_in_ruleElement288 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_RULE_ID_in_ruleElement310 = 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/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage__.g b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage__.g
new file mode 100644
index 0000000..9d80531
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage__.g
@@ -0,0 +1,39 @@
+lexer grammar InternalInheritanceTestLanguage;
+@header {
+package org.eclipse.xtext.grammarinheritance.parser.antlr.internal;
+
+// Hack: Use our own Lexer superclass by means of import.
+// Currently there is no other way to specify the superclass for the lexer.
+import org.eclipse.xtext.parser.antlr.Lexer;
+}
+
+T11 : 'model' ;
+T12 : '{' ;
+T13 : '}' ;
+T14 : 'element' ;
+
+// $ANTLR src "../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g" 196
+RULE_ID : ('^')?('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*;
+
+// $ANTLR src "../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g" 198
+RULE_INT : ('0'..'9')+;
+
+// $ANTLR src "../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g" 200
+RULE_STRING :
+ '"' ( '\\' ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\') | ~('\\'|'"') )* '"' |
+ '\'' ( '\\' ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\') | ~('\\'|'\'') )* '\''
+ ;
+
+// $ANTLR src "../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g" 205
+RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )* '*/';
+
+// $ANTLR src "../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g" 207
+RULE_SL_COMMENT : '//' ~('\n'|'\r')* ('\r'? '\n')?;
+
+// $ANTLR src "../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g" 209
+RULE_WS : (' '|'\t'|'\r'|'\n')+;
+
+// $ANTLR src "../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/internal/InternalInheritanceTestLanguage.g" 211
+RULE_ANY_OTHER : .;
+
+
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/AbstractTestLanguageParserConfiguration.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/AbstractTestLanguageParserConfiguration.java
index 54ac360..6d81381 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/AbstractTestLanguageParserConfiguration.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/AbstractTestLanguageParserConfiguration.java
@@ -82,7 +82,7 @@ public class AbstractTestLanguageParserConfiguration extends AbstractParserConfi
public void configureConsumers() {
if (grammarAccess == null)
- throw new NullPointerException("grammarAccess may not be null, you call configureConsumers");
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
getInheritedParserRuleConsumer().setRule(grammarAccess.prInheritedParserRule());
getAbstractCallOverridenParserRuleConsumer().setRule(grammarAccess.prAbstractCallOverridenParserRule());
getOverridableParserRuleConsumer().setRule(grammarAccess.prOverridableParserRule());
@@ -184,7 +184,6 @@ public class AbstractTestLanguageParserConfiguration extends AbstractParserConfi
return getXtextBuiltinConfiguration().getAnyOtherConsumer();
}
-
@Override
public ITerminalConsumer[] getInitialHiddenTerminals() {
return getXtextBuiltinConfiguration().getInitialHiddenTerminals();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/BaseInheritanceTestLanguageDelimiters.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/BaseInheritanceTestLanguageDelimiters.java
new file mode 100644
index 0000000..c339b12
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/BaseInheritanceTestLanguageDelimiters.java
@@ -0,0 +1,28 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.grammarinheritance.parser.packrat;
+
+import org.eclipse.xtext.parser.packrat.matching.ICharacterClass;
+import org.eclipse.xtext.parser.packrat.matching.ISequenceMatcher;
+import org.eclipse.xtext.parser.packrat.matching.SetBasedKeywordMatcher;
+
+@SuppressWarnings("unused")
+public final class BaseInheritanceTestLanguageDelimiters {
+
+ private BaseInheritanceTestLanguageDelimiters() {
+ throw new UnsupportedOperationException("Utility classes may not be initialized");
+ }
+
+ // TODO: remove hardcoded character class from template
+ public static ICharacterClass keyword$4$Delimiter = ICharacterClass.Factory.join(
+ ICharacterClass.Factory.createRange('a', 'z'),
+ ICharacterClass.Factory.createRange('A', 'Z'),
+ ICharacterClass.Factory.create('_'),
+ ICharacterClass.Factory.createRange('0', '9')
+ );
+
+ public static ISequenceMatcher ruleCall$6$Delimiter = new SetBasedKeywordMatcher(
+ "model");
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/BaseInheritanceTestLanguagePackratParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/BaseInheritanceTestLanguagePackratParser.java
new file mode 100644
index 0000000..a3f4ab8
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/BaseInheritanceTestLanguagePackratParser.java
@@ -0,0 +1,31 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.grammarinheritance.parser.packrat;
+
+import com.google.inject.Inject;
+
+import org.eclipse.xtext.parser.packrat.AbstractPackratParser;
+import org.eclipse.xtext.parser.packrat.IParseResultFactory;
+import org.eclipse.xtext.parser.packrat.AbstractParserConfiguration.IInternalParserConfiguration;
+
+import org.eclipse.xtext.grammarinheritance.services.BaseInheritanceTestLanguageGrammarAccess;
+
+public class BaseInheritanceTestLanguagePackratParser extends AbstractPackratParser {
+
+ @Inject
+ public BaseInheritanceTestLanguagePackratParser(IParseResultFactory parseResultFactory, BaseInheritanceTestLanguageGrammarAccess grammarAccess) {
+ super(parseResultFactory, grammarAccess);
+ }
+
+ @Override
+ protected BaseInheritanceTestLanguageParserConfiguration createParserConfiguration(IInternalParserConfiguration configuration) {
+ return new BaseInheritanceTestLanguageParserConfiguration(configuration, getGrammarAccess());
+ }
+
+ @Override
+ protected BaseInheritanceTestLanguageGrammarAccess getGrammarAccess() {
+ return (BaseInheritanceTestLanguageGrammarAccess)super.getGrammarAccess();
+ }
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/BaseInheritanceTestLanguageParserConfiguration.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/BaseInheritanceTestLanguageParserConfiguration.java
new file mode 100644
index 0000000..43515dd
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/BaseInheritanceTestLanguageParserConfiguration.java
@@ -0,0 +1,114 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.grammarinheritance.parser.packrat;
+
+import org.eclipse.xtext.parser.packrat.AbstractParserConfiguration;
+import org.eclipse.xtext.parser.packrat.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.INonTerminalConsumer;
+
+import org.eclipse.xtext.grammarinheritance.services.BaseInheritanceTestLanguageGrammarAccess;
+
+import org.eclipse.xtext.builtin.parser.packrat.XtextBuiltinParserConfiguration;
+
+import org.eclipse.xtext.grammarinheritance.parser.packrat.consumers.BaseInheritanceTestLanguageModelConsumer;
+import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinIDConsumer;
+import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinINTConsumer;
+import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinSTRINGConsumer;
+import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinML_COMMENTConsumer;
+import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinSL_COMMENTConsumer;
+import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinWSConsumer;
+import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinANY_OTHERConsumer;
+
+@SuppressWarnings("unused")
+public class BaseInheritanceTestLanguageParserConfiguration extends AbstractParserConfiguration {
+
+ private XtextBuiltinParserConfiguration xtextBuiltinConfiguration;
+
+ private BaseInheritanceTestLanguageModelConsumer modelConsumer;
+
+ private BaseInheritanceTestLanguageGrammarAccess grammarAccess;
+
+ public BaseInheritanceTestLanguageParserConfiguration(IInternalParserConfiguration configuration, BaseInheritanceTestLanguageGrammarAccess grammarAccess) {
+ super(configuration);
+ this.grammarAccess = grammarAccess;
+ this.xtextBuiltinConfiguration = new XtextBuiltinParserConfiguration(configuration, null);
+ }
+
+ public BaseInheritanceTestLanguageModelConsumer getRootConsumer() {
+ return modelConsumer;
+ }
+
+ public void createNonTerminalConsumers() {
+ getXtextBuiltinConfiguration().createNonTerminalConsumers();
+ modelConsumer = new BaseInheritanceTestLanguageModelConsumer(
+ this, null
+ );
+ }
+
+ public void createTerminalConsumers() {
+ getXtextBuiltinConfiguration().createTerminalConsumers();
+ }
+
+ public void configureConsumers() {
+ if (grammarAccess == null)
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
+ getModelConsumer().setRule(grammarAccess.prModel());
+ getIdConsumer().setRule(grammarAccess.lrID());
+ getIntConsumer().setRule(grammarAccess.lrINT());
+ getStringConsumer().setRule(grammarAccess.lrSTRING());
+ getMlCommentConsumer().setRule(grammarAccess.lrML_COMMENT());
+ getSlCommentConsumer().setRule(grammarAccess.lrSL_COMMENT());
+ getWsConsumer().setRule(grammarAccess.lrWS());
+ getAnyOtherConsumer().setRule(grammarAccess.lrANY_OTHER());
+
+
+ getModelConsumer().setIdConsumer(getIdConsumer());
+
+ getModelConsumer().setKeyword$2$Delimiter(BaseInheritanceTestLanguageDelimiters.keyword$4$Delimiter);
+ getModelConsumer().setRuleCall$4$Delimiter(BaseInheritanceTestLanguageDelimiters.ruleCall$6$Delimiter);
+ }
+
+ // TODO collect superGrammars transitive
+ public XtextBuiltinParserConfiguration getXtextBuiltinConfiguration() {
+ return xtextBuiltinConfiguration;
+ }
+
+ public BaseInheritanceTestLanguageModelConsumer getModelConsumer() {
+ return modelConsumer;
+ }
+
+ public XtextBuiltinIDConsumer getIdConsumer() {
+ return getXtextBuiltinConfiguration().getIdConsumer();
+ }
+
+ public XtextBuiltinINTConsumer getIntConsumer() {
+ return getXtextBuiltinConfiguration().getIntConsumer();
+ }
+
+ public XtextBuiltinSTRINGConsumer getStringConsumer() {
+ return getXtextBuiltinConfiguration().getStringConsumer();
+ }
+
+ public XtextBuiltinML_COMMENTConsumer getMlCommentConsumer() {
+ return getXtextBuiltinConfiguration().getMlCommentConsumer();
+ }
+
+ public XtextBuiltinSL_COMMENTConsumer getSlCommentConsumer() {
+ return getXtextBuiltinConfiguration().getSlCommentConsumer();
+ }
+
+ public XtextBuiltinWSConsumer getWsConsumer() {
+ return getXtextBuiltinConfiguration().getWsConsumer();
+ }
+
+ public XtextBuiltinANY_OTHERConsumer getAnyOtherConsumer() {
+ return getXtextBuiltinConfiguration().getAnyOtherConsumer();
+ }
+
+ @Override
+ public ITerminalConsumer[] getInitialHiddenTerminals() {
+ return getXtextBuiltinConfiguration().getInitialHiddenTerminals();
+ }
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/ConcreteTestLanguageParserConfiguration.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/ConcreteTestLanguageParserConfiguration.java
index 80d3c6b..f51b500 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/ConcreteTestLanguageParserConfiguration.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/ConcreteTestLanguageParserConfiguration.java
@@ -101,7 +101,7 @@ public class ConcreteTestLanguageParserConfiguration extends AbstractParserConfi
public void configureConsumers() {
if (grammarAccess == null)
- throw new NullPointerException("grammarAccess may not be null, you call configureConsumers");
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
getRootRuleConsumer().setRule(grammarAccess.prRootRule());
getConcreteParserRuleConsumer().setRule(grammarAccess.prConcreteParserRule());
getOverridableParserRuleConsumer().setRule(grammarAccess.prOverridableParserRule());
@@ -273,7 +273,6 @@ public class ConcreteTestLanguageParserConfiguration extends AbstractParserConfi
return getAbstractTestLanguageConfiguration().getAnyOtherConsumer();
}
-
@Override
public ITerminalConsumer[] getInitialHiddenTerminals() {
return getAbstractTestLanguageConfiguration().getInitialHiddenTerminals();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/InheritanceTestLanguageDelimiters.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/InheritanceTestLanguageDelimiters.java
new file mode 100644
index 0000000..efcac66
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/InheritanceTestLanguageDelimiters.java
@@ -0,0 +1,30 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.grammarinheritance.parser.packrat;
+
+import org.eclipse.xtext.parser.packrat.matching.ICharacterClass;
+import org.eclipse.xtext.parser.packrat.matching.ISequenceMatcher;
+import org.eclipse.xtext.parser.packrat.matching.SetBasedKeywordMatcher;
+
+@SuppressWarnings("unused")
+public final class InheritanceTestLanguageDelimiters {
+
+ private InheritanceTestLanguageDelimiters() {
+ throw new UnsupportedOperationException("Utility classes may not be initialized");
+ }
+
+ public static ICharacterClass keyword$10$Delimiter = ICharacterClass.Factory.nullClass();
+
+ // TODO: remove hardcoded character class from template
+ public static ICharacterClass keyword$7$Delimiter = ICharacterClass.Factory.join(
+ ICharacterClass.Factory.createRange('a', 'z'),
+ ICharacterClass.Factory.createRange('A', 'Z'),
+ ICharacterClass.Factory.create('_'),
+ ICharacterClass.Factory.createRange('0', '9')
+ );
+
+ public static ISequenceMatcher ruleCall$9$Delimiter = new SetBasedKeywordMatcher(
+ "model", "element");
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/InheritanceTestLanguagePackratParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/InheritanceTestLanguagePackratParser.java
new file mode 100644
index 0000000..55c7255
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/InheritanceTestLanguagePackratParser.java
@@ -0,0 +1,31 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.grammarinheritance.parser.packrat;
+
+import com.google.inject.Inject;
+
+import org.eclipse.xtext.parser.packrat.AbstractPackratParser;
+import org.eclipse.xtext.parser.packrat.IParseResultFactory;
+import org.eclipse.xtext.parser.packrat.AbstractParserConfiguration.IInternalParserConfiguration;
+
+import org.eclipse.xtext.grammarinheritance.services.InheritanceTestLanguageGrammarAccess;
+
+public class InheritanceTestLanguagePackratParser extends AbstractPackratParser {
+
+ @Inject
+ public InheritanceTestLanguagePackratParser(IParseResultFactory parseResultFactory, InheritanceTestLanguageGrammarAccess grammarAccess) {
+ super(parseResultFactory, grammarAccess);
+ }
+
+ @Override
+ protected InheritanceTestLanguageParserConfiguration createParserConfiguration(IInternalParserConfiguration configuration) {
+ return new InheritanceTestLanguageParserConfiguration(configuration, getGrammarAccess());
+ }
+
+ @Override
+ protected InheritanceTestLanguageGrammarAccess getGrammarAccess() {
+ return (InheritanceTestLanguageGrammarAccess)super.getGrammarAccess();
+ }
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/InheritanceTestLanguageParserConfiguration.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/InheritanceTestLanguageParserConfiguration.java
new file mode 100644
index 0000000..b905b38
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/InheritanceTestLanguageParserConfiguration.java
@@ -0,0 +1,131 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.grammarinheritance.parser.packrat;
+
+import org.eclipse.xtext.parser.packrat.AbstractParserConfiguration;
+import org.eclipse.xtext.parser.packrat.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.INonTerminalConsumer;
+
+import org.eclipse.xtext.grammarinheritance.services.InheritanceTestLanguageGrammarAccess;
+
+import org.eclipse.xtext.grammarinheritance.parser.packrat.BaseInheritanceTestLanguageParserConfiguration;
+
+import org.eclipse.xtext.grammarinheritance.parser.packrat.consumers.InheritanceTestLanguageModelConsumer;
+import org.eclipse.xtext.grammarinheritance.parser.packrat.consumers.InheritanceTestLanguageElementConsumer;
+import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinIDConsumer;
+import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinINTConsumer;
+import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinSTRINGConsumer;
+import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinML_COMMENTConsumer;
+import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinSL_COMMENTConsumer;
+import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinWSConsumer;
+import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinANY_OTHERConsumer;
+
+@SuppressWarnings("unused")
+public class InheritanceTestLanguageParserConfiguration extends AbstractParserConfiguration {
+
+ private BaseInheritanceTestLanguageParserConfiguration baseInheritanceTestLanguageConfiguration;
+
+ private InheritanceTestLanguageModelConsumer modelConsumer;
+ private InheritanceTestLanguageElementConsumer elementConsumer;
+
+ private InheritanceTestLanguageGrammarAccess grammarAccess;
+
+ public InheritanceTestLanguageParserConfiguration(IInternalParserConfiguration configuration, InheritanceTestLanguageGrammarAccess grammarAccess) {
+ super(configuration);
+ this.grammarAccess = grammarAccess;
+ this.baseInheritanceTestLanguageConfiguration = new BaseInheritanceTestLanguageParserConfiguration(configuration, null);
+ }
+
+ public InheritanceTestLanguageModelConsumer getRootConsumer() {
+ return modelConsumer;
+ }
+
+ public void createNonTerminalConsumers() {
+ getBaseInheritanceTestLanguageConfiguration().createNonTerminalConsumers();
+ modelConsumer = new InheritanceTestLanguageModelConsumer(
+ this, null
+ );
+ elementConsumer = new InheritanceTestLanguageElementConsumer(
+ this, null
+ );
+ }
+
+ public void createTerminalConsumers() {
+ getBaseInheritanceTestLanguageConfiguration().createTerminalConsumers();
+ }
+
+ public void configureConsumers() {
+ if (grammarAccess == null)
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
+ getModelConsumer().setRule(grammarAccess.prModel());
+ getElementConsumer().setRule(grammarAccess.prElement());
+ getIdConsumer().setRule(grammarAccess.lrID());
+ getIntConsumer().setRule(grammarAccess.lrINT());
+ getStringConsumer().setRule(grammarAccess.lrSTRING());
+ getMlCommentConsumer().setRule(grammarAccess.lrML_COMMENT());
+ getSlCommentConsumer().setRule(grammarAccess.lrSL_COMMENT());
+ getWsConsumer().setRule(grammarAccess.lrWS());
+ getAnyOtherConsumer().setRule(grammarAccess.lrANY_OTHER());
+
+
+ getModelConsumer().setElementConsumer(getElementConsumer());
+ getModelConsumer().setIdConsumer(getIdConsumer());
+
+ getElementConsumer().setIdConsumer(getIdConsumer());
+
+ getModelConsumer().setKeyword$8$Delimiter(InheritanceTestLanguageDelimiters.keyword$10$Delimiter);
+ getModelConsumer().setKeyword$11$Delimiter(InheritanceTestLanguageDelimiters.keyword$10$Delimiter);
+ getModelConsumer().setKeyword$5$Delimiter(InheritanceTestLanguageDelimiters.keyword$7$Delimiter);
+ getModelConsumer().setRuleCall$7$Delimiter(InheritanceTestLanguageDelimiters.ruleCall$9$Delimiter);
+ getElementConsumer().setKeyword$2$Delimiter(InheritanceTestLanguageDelimiters.keyword$7$Delimiter);
+ getElementConsumer().setRuleCall$4$Delimiter(InheritanceTestLanguageDelimiters.ruleCall$9$Delimiter);
+ }
+
+ // TODO collect superGrammars transitive
+ public BaseInheritanceTestLanguageParserConfiguration getBaseInheritanceTestLanguageConfiguration() {
+ return baseInheritanceTestLanguageConfiguration;
+ }
+
+ public InheritanceTestLanguageModelConsumer getModelConsumer() {
+ return modelConsumer;
+ }
+
+ public InheritanceTestLanguageElementConsumer getElementConsumer() {
+ return elementConsumer;
+ }
+
+ public XtextBuiltinIDConsumer getIdConsumer() {
+ return getBaseInheritanceTestLanguageConfiguration().getIdConsumer();
+ }
+
+ public XtextBuiltinINTConsumer getIntConsumer() {
+ return getBaseInheritanceTestLanguageConfiguration().getIntConsumer();
+ }
+
+ public XtextBuiltinSTRINGConsumer getStringConsumer() {
+ return getBaseInheritanceTestLanguageConfiguration().getStringConsumer();
+ }
+
+ public XtextBuiltinML_COMMENTConsumer getMlCommentConsumer() {
+ return getBaseInheritanceTestLanguageConfiguration().getMlCommentConsumer();
+ }
+
+ public XtextBuiltinSL_COMMENTConsumer getSlCommentConsumer() {
+ return getBaseInheritanceTestLanguageConfiguration().getSlCommentConsumer();
+ }
+
+ public XtextBuiltinWSConsumer getWsConsumer() {
+ return getBaseInheritanceTestLanguageConfiguration().getWsConsumer();
+ }
+
+ public XtextBuiltinANY_OTHERConsumer getAnyOtherConsumer() {
+ return getBaseInheritanceTestLanguageConfiguration().getAnyOtherConsumer();
+ }
+
+ @Override
+ public ITerminalConsumer[] getInitialHiddenTerminals() {
+ return getBaseInheritanceTestLanguageConfiguration().getInitialHiddenTerminals();
+ }
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/BaseInheritanceTestLanguageModelConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/BaseInheritanceTestLanguageModelConsumer.java
new file mode 100644
index 0000000..13a070f
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/BaseInheritanceTestLanguageModelConsumer.java
@@ -0,0 +1,125 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.grammarinheritance.parser.packrat.consumers;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.parser.packrat.IMarkerFactory.IMarker;
+import org.eclipse.xtext.parser.packrat.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.INonTerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.NonTerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.INonTerminalConsumerConfiguration;
+import org.eclipse.xtext.parser.packrat.consumers.ConsumeResult;
+import org.eclipse.xtext.parser.packrat.matching.ICharacterClass;
+import org.eclipse.xtext.parser.packrat.matching.ISequenceMatcher;
+
+import org.eclipse.xtext.grammarinheritance.services.BaseInheritanceTestLanguageGrammarAccess;
+import org.eclipse.xtext.grammarinheritance.services.BaseInheritanceTestLanguageGrammarAccess.ModelElements;
+
+import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinIDConsumer;
+
+@SuppressWarnings("unused")
+public final class BaseInheritanceTestLanguageModelConsumer extends NonTerminalConsumer {
+
+ private ModelElements rule;
+
+ private ITerminalConsumer idConsumer;
+
+ private ICharacterClass keyword$2$Delimiter;
+
+ private ISequenceMatcher ruleCall$4$Delimiter;
+
+ public BaseInheritanceTestLanguageModelConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
+ super(configuration, hiddenTokens);
+ keyword$2$Delimiter = ICharacterClass.Factory.nullClass();
+ ruleCall$4$Delimiter = ISequenceMatcher.Factory.nullMatcher();
+ }
+
+ @Override
+ protected int doConsume(int entryPoint) throws Exception {
+ return consumeGroup$1(entryPoint);
+ }
+
+ protected int consumeGroup$1(int entryPoint) throws Exception {
+ announceNextLevel();
+ final IMarker marker = mark();
+ int result = ConsumeResult.SUCCESS;
+ switch(entryPoint) {
+ case -1: // use fall through semantics of switch case
+ result = ConsumeResult.EMPTY_MATCH;
+ case 0:
+ announceNextStep();
+ result = consumeKeyword$2(nextEntryPoint());
+ if (result!=ConsumeResult.SUCCESS) {
+ error("Another token expected.", getRule().ele0KeywordModel());
+ marker.commit();
+ announceLevelFinished();
+ return result;
+ }
+ case 1:
+ announceNextStep();
+ result = consumeAssignment$3(nextEntryPoint());
+ if (result!=ConsumeResult.SUCCESS) {
+ error("Another token expected.", getRule().ele1AssignmentName());
+ marker.commit();
+ announceLevelFinished();
+ return result;
+ }
+ }
+ marker.commit();
+ announceLevelFinished();
+ return result;
+ }
+
+ protected int consumeKeyword$2(int entryPoint) throws Exception {
+ return consumeKeyword(getRule().ele0KeywordModel(), null, false, false, getKeyword$2$Delimiter());
+ }
+
+ protected int consumeAssignment$3(int entryPoint) throws Exception {
+ return consumeRuleCall$4(entryPoint);
+ }
+
+ protected int consumeRuleCall$4(int entryPoint) throws Exception {
+ return consumeTerminal(idConsumer, "name", false, false, getRule().ele10LexerRuleCallID(), getRuleCall$4$Delimiter());
+ }
+
+ public ModelElements getRule() {
+ // BaseInheritanceTestLanguageGrammarAccess.INSTANCE.prModel()
+ return rule;
+ }
+
+ public void setRule(ModelElements rule) {
+ this.rule = rule;
+ }
+
+ @Override
+ protected EObject getGrammarElement() {
+ return getRule().getRule();
+ }
+
+ @Override
+ protected String getDefaultTypeName() {
+ return "Model";
+ }
+
+ public void setIdConsumer(ITerminalConsumer idConsumer) {
+ this.idConsumer = idConsumer;
+ }
+
+ public ICharacterClass getKeyword$2$Delimiter() {
+ return keyword$2$Delimiter;
+ }
+
+ public void setKeyword$2$Delimiter(ICharacterClass characterClass) {
+ keyword$2$Delimiter = characterClass != null ? characterClass : ICharacterClass.Factory.nullClass();
+ }
+
+ public ISequenceMatcher getRuleCall$4$Delimiter() {
+ return ruleCall$4$Delimiter;
+ }
+
+ public void setRuleCall$4$Delimiter(ISequenceMatcher matcher) {
+ ruleCall$4$Delimiter = matcher != null ? matcher : ISequenceMatcher.Factory.nullMatcher();
+ }
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/InheritanceTestLanguageElementConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/InheritanceTestLanguageElementConsumer.java
new file mode 100644
index 0000000..fdbeac0
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/InheritanceTestLanguageElementConsumer.java
@@ -0,0 +1,125 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.grammarinheritance.parser.packrat.consumers;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.parser.packrat.IMarkerFactory.IMarker;
+import org.eclipse.xtext.parser.packrat.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.INonTerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.NonTerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.INonTerminalConsumerConfiguration;
+import org.eclipse.xtext.parser.packrat.consumers.ConsumeResult;
+import org.eclipse.xtext.parser.packrat.matching.ICharacterClass;
+import org.eclipse.xtext.parser.packrat.matching.ISequenceMatcher;
+
+import org.eclipse.xtext.grammarinheritance.services.InheritanceTestLanguageGrammarAccess;
+import org.eclipse.xtext.grammarinheritance.services.InheritanceTestLanguageGrammarAccess.ElementElements;
+
+import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinIDConsumer;
+
+@SuppressWarnings("unused")
+public final class InheritanceTestLanguageElementConsumer extends NonTerminalConsumer {
+
+ private ElementElements rule;
+
+ private ITerminalConsumer idConsumer;
+
+ private ICharacterClass keyword$2$Delimiter;
+
+ private ISequenceMatcher ruleCall$4$Delimiter;
+
+ public InheritanceTestLanguageElementConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
+ super(configuration, hiddenTokens);
+ keyword$2$Delimiter = ICharacterClass.Factory.nullClass();
+ ruleCall$4$Delimiter = ISequenceMatcher.Factory.nullMatcher();
+ }
+
+ @Override
+ protected int doConsume(int entryPoint) throws Exception {
+ return consumeGroup$1(entryPoint);
+ }
+
+ protected int consumeGroup$1(int entryPoint) throws Exception {
+ announceNextLevel();
+ final IMarker marker = mark();
+ int result = ConsumeResult.SUCCESS;
+ switch(entryPoint) {
+ case -1: // use fall through semantics of switch case
+ result = ConsumeResult.EMPTY_MATCH;
+ case 0:
+ announceNextStep();
+ result = consumeKeyword$2(nextEntryPoint());
+ if (result!=ConsumeResult.SUCCESS) {
+ error("Another token expected.", getRule().ele0KeywordElement());
+ marker.commit();
+ announceLevelFinished();
+ return result;
+ }
+ case 1:
+ announceNextStep();
+ result = consumeAssignment$3(nextEntryPoint());
+ if (result!=ConsumeResult.SUCCESS) {
+ error("Another token expected.", getRule().ele1AssignmentName());
+ marker.commit();
+ announceLevelFinished();
+ return result;
+ }
+ }
+ marker.commit();
+ announceLevelFinished();
+ return result;
+ }
+
+ protected int consumeKeyword$2(int entryPoint) throws Exception {
+ return consumeKeyword(getRule().ele0KeywordElement(), null, false, false, getKeyword$2$Delimiter());
+ }
+
+ protected int consumeAssignment$3(int entryPoint) throws Exception {
+ return consumeRuleCall$4(entryPoint);
+ }
+
+ protected int consumeRuleCall$4(int entryPoint) throws Exception {
+ return consumeTerminal(idConsumer, "name", false, false, getRule().ele10LexerRuleCallID(), getRuleCall$4$Delimiter());
+ }
+
+ public ElementElements getRule() {
+ // InheritanceTestLanguageGrammarAccess.INSTANCE.prElement()
+ return rule;
+ }
+
+ public void setRule(ElementElements rule) {
+ this.rule = rule;
+ }
+
+ @Override
+ protected EObject getGrammarElement() {
+ return getRule().getRule();
+ }
+
+ @Override
+ protected String getDefaultTypeName() {
+ return "Element";
+ }
+
+ public void setIdConsumer(ITerminalConsumer idConsumer) {
+ this.idConsumer = idConsumer;
+ }
+
+ public ICharacterClass getKeyword$2$Delimiter() {
+ return keyword$2$Delimiter;
+ }
+
+ public void setKeyword$2$Delimiter(ICharacterClass characterClass) {
+ keyword$2$Delimiter = characterClass != null ? characterClass : ICharacterClass.Factory.nullClass();
+ }
+
+ public ISequenceMatcher getRuleCall$4$Delimiter() {
+ return ruleCall$4$Delimiter;
+ }
+
+ public void setRuleCall$4$Delimiter(ISequenceMatcher matcher) {
+ ruleCall$4$Delimiter = matcher != null ? matcher : ISequenceMatcher.Factory.nullMatcher();
+ }
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/InheritanceTestLanguageModelConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/InheritanceTestLanguageModelConsumer.java
new file mode 100644
index 0000000..587f43f
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/InheritanceTestLanguageModelConsumer.java
@@ -0,0 +1,205 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.grammarinheritance.parser.packrat.consumers;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.parser.packrat.IMarkerFactory.IMarker;
+import org.eclipse.xtext.parser.packrat.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.INonTerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.NonTerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.INonTerminalConsumerConfiguration;
+import org.eclipse.xtext.parser.packrat.consumers.ConsumeResult;
+import org.eclipse.xtext.parser.packrat.matching.ICharacterClass;
+import org.eclipse.xtext.parser.packrat.matching.ISequenceMatcher;
+
+import org.eclipse.xtext.grammarinheritance.services.InheritanceTestLanguageGrammarAccess;
+import org.eclipse.xtext.grammarinheritance.services.InheritanceTestLanguageGrammarAccess.ModelElements;
+
+import org.eclipse.xtext.grammarinheritance.parser.packrat.consumers.InheritanceTestLanguageElementConsumer;
+import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinIDConsumer;
+
+@SuppressWarnings("unused")
+public final class InheritanceTestLanguageModelConsumer extends NonTerminalConsumer {
+
+ private ModelElements rule;
+
+ private INonTerminalConsumer elementConsumer;
+ private ITerminalConsumer idConsumer;
+
+ private ICharacterClass keyword$8$Delimiter;
+
+ private ICharacterClass keyword$11$Delimiter;
+
+ private ICharacterClass keyword$5$Delimiter;
+
+ private ISequenceMatcher ruleCall$7$Delimiter;
+
+ public InheritanceTestLanguageModelConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
+ super(configuration, hiddenTokens);
+ keyword$8$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$11$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$5$Delimiter = ICharacterClass.Factory.nullClass();
+ ruleCall$7$Delimiter = ISequenceMatcher.Factory.nullMatcher();
+ }
+
+ @Override
+ protected int doConsume(int entryPoint) throws Exception {
+ return consumeGroup$1(entryPoint);
+ }
+
+ protected int consumeGroup$1(int entryPoint) throws Exception {
+ announceNextLevel();
+ final IMarker marker = mark();
+ int result = ConsumeResult.SUCCESS;
+ switch(entryPoint) {
+ case -1: // use fall through semantics of switch case
+ result = ConsumeResult.EMPTY_MATCH;
+ case 0:
+ announceNextStep();
+ result = consumeKeyword$5(nextEntryPoint());
+ if (result!=ConsumeResult.SUCCESS) {
+ error("Another token expected.", getRule().ele0000KeywordModel());
+ marker.commit();
+ announceLevelFinished();
+ return result;
+ }
+ case 1:
+ announceNextStep();
+ result = consumeAssignment$6(nextEntryPoint());
+ if (result!=ConsumeResult.SUCCESS) {
+ error("Another token expected.", getRule().ele0001AssignmentName());
+ marker.commit();
+ announceLevelFinished();
+ return result;
+ }
+ case 2:
+ announceNextStep();
+ result = consumeKeyword$8(nextEntryPoint());
+ if (result!=ConsumeResult.SUCCESS) {
+ error("Another token expected.", getRule().ele001KeywordLeftCurlyBracket());
+ marker.commit();
+ announceLevelFinished();
+ return result;
+ }
+ case 3:
+ announceNextStep();
+ result = consumeAssignment$9(nextEntryPoint());
+ if (result!=ConsumeResult.SUCCESS) {
+ error("Another token expected.", getRule().ele01AssignmentElements());
+ marker.commit();
+ announceLevelFinished();
+ return result;
+ }
+ case 4:
+ announceNextStep();
+ result = consumeKeyword$11(nextEntryPoint());
+ if (result!=ConsumeResult.SUCCESS) {
+ error("Another token expected.", getRule().ele1KeywordRightCurlyBracket());
+ marker.commit();
+ announceLevelFinished();
+ return result;
+ }
+ }
+ marker.commit();
+ announceLevelFinished();
+ return result;
+ }
+
+ protected int consumeKeyword$5(int entryPoint) throws Exception {
+ return consumeKeyword(getRule().ele0000KeywordModel(), null, false, false, getKeyword$5$Delimiter());
+ }
+
+ protected int consumeAssignment$6(int entryPoint) throws Exception {
+ return consumeRuleCall$7(entryPoint);
+ }
+
+ protected int consumeRuleCall$7(int entryPoint) throws Exception {
+ return consumeTerminal(idConsumer, "name", false, false, getRule().ele00010LexerRuleCallID(), getRuleCall$7$Delimiter());
+ }
+
+ protected int consumeKeyword$8(int entryPoint) throws Exception {
+ return consumeKeyword(getRule().ele001KeywordLeftCurlyBracket(), null, false, false, getKeyword$8$Delimiter());
+ }
+
+ protected int consumeAssignment$9(int entryPoint) throws Exception {
+ IMarker marker = mark();
+ while(doConsumeAssignment$9(entryPoint) == ConsumeResult.SUCCESS) {
+ marker.flush();
+ }
+ marker.rollback();
+ return ConsumeResult.SUCCESS;
+ }
+
+ protected int doConsumeAssignment$9(int entryPoint) throws Exception {
+ return consumeRuleCall$10(entryPoint);
+ }
+
+ protected int consumeRuleCall$10(int entryPoint) throws Exception {
+ return consumeNonTerminal(elementConsumer, "elements", true, false, false, getRule().ele010ParserRuleCallElement());
+ }
+
+ protected int consumeKeyword$11(int entryPoint) throws Exception {
+ return consumeKeyword(getRule().ele1KeywordRightCurlyBracket(), null, false, false, getKeyword$11$Delimiter());
+ }
+
+ public ModelElements getRule() {
+ // InheritanceTestLanguageGrammarAccess.INSTANCE.prModel()
+ return rule;
+ }
+
+ public void setRule(ModelElements rule) {
+ this.rule = rule;
+ }
+
+ @Override
+ protected EObject getGrammarElement() {
+ return getRule().getRule();
+ }
+
+ @Override
+ protected String getDefaultTypeName() {
+ return "Model";
+ }
+
+ public void setElementConsumer(INonTerminalConsumer elementConsumer) {
+ this.elementConsumer = elementConsumer;
+ }
+
+ public void setIdConsumer(ITerminalConsumer idConsumer) {
+ this.idConsumer = idConsumer;
+ }
+
+ public ICharacterClass getKeyword$8$Delimiter() {
+ return keyword$8$Delimiter;
+ }
+
+ public void setKeyword$8$Delimiter(ICharacterClass characterClass) {
+ keyword$8$Delimiter = characterClass != null ? characterClass : ICharacterClass.Factory.nullClass();
+ }
+
+ public ICharacterClass getKeyword$11$Delimiter() {
+ return keyword$11$Delimiter;
+ }
+
+ public void setKeyword$11$Delimiter(ICharacterClass characterClass) {
+ keyword$11$Delimiter = characterClass != null ? characterClass : ICharacterClass.Factory.nullClass();
+ }
+
+ public ICharacterClass getKeyword$5$Delimiter() {
+ return keyword$5$Delimiter;
+ }
+
+ public void setKeyword$5$Delimiter(ICharacterClass characterClass) {
+ keyword$5$Delimiter = characterClass != null ? characterClass : ICharacterClass.Factory.nullClass();
+ }
+
+ public ISequenceMatcher getRuleCall$7$Delimiter() {
+ return ruleCall$7$Delimiter;
+ }
+
+ public void setRuleCall$7$Delimiter(ISequenceMatcher matcher) {
+ ruleCall$7$Delimiter = matcher != null ? matcher : ISequenceMatcher.Factory.nullMatcher();
+ }
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parsetree/reconstr/BaseInheritanceTestLanguageParseTreeConstructor.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parsetree/reconstr/BaseInheritanceTestLanguageParseTreeConstructor.java
new file mode 100644
index 0000000..f32509d
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parsetree/reconstr/BaseInheritanceTestLanguageParseTreeConstructor.java
@@ -0,0 +1,104 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.grammarinheritance.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;
+import org.eclipse.xtext.grammarinheritance.services.BaseInheritanceTestLanguageGrammarAccess;
+
+import com.google.inject.Inject;
+
+public class BaseInheritanceTestLanguageParseTreeConstructor extends AbstractParseTreeConstructor {
+
+ @Inject
+ private BaseInheritanceTestLanguageGrammarAccess grammarAccess;
+
+ protected Solution internalSerialize(EObject obj) {
+ IInstanceDescription inst = getDescr(obj);
+ Solution s;
+ if(inst.isInstanceOf("Model") && (s = new Model_Group(inst, null).firstSolution()) != null && isConsumed(s,null)) return s;
+ return null;
+ }
+
+
+/************ begin Rule Model ****************
+ *
+ * Model: "model" name=ID;
+ *
+ **/
+
+
+// "model" name=ID
+protected class Model_Group extends GroupToken {
+
+ public Model_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return grammarAccess.prModel().eleGroup();
+ }
+
+ @Override
+ protected Solution createSolution() {
+ Solution s1 = new Model_1_Assignment_name(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new Model_0_Keyword_model(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this,s1);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// "model"
+protected class Model_0_Keyword_model extends KeywordToken {
+
+ public Model_0_Keyword_model(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Keyword getGrammarElement() {
+ return grammarAccess.prModel().ele0KeywordModel();
+ }
+}
+
+// name=ID
+protected class Model_1_Assignment_name extends AssignmentToken {
+
+ public Model_1_Assignment_name(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Assignment getGrammarElement() {
+ return grammarAccess.prModel().ele1AssignmentName();
+ }
+
+ @Override
+ protected Solution createSolution() {
+ if((value = current.getConsumable("name",IS_REQUIRED)) == null) return null;
+ IInstanceDescription obj = current.cloneAndConsume("name");
+ if(Boolean.TRUE.booleanValue()) { // xtext::RuleCall FIXME: check if value is valid for lexer rule
+ type = AssignmentType.LRC;
+ element = grammarAccess.prModel().ele10LexerRuleCallID();
+ return new Solution(obj);
+ }
+ return null;
+ }
+}
+
+
+/************ end Rule Model ****************/
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parsetree/reconstr/InheritanceTestLanguageParseTreeConstructor.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parsetree/reconstr/InheritanceTestLanguageParseTreeConstructor.java
new file mode 100644
index 0000000..606579b
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parsetree/reconstr/InheritanceTestLanguageParseTreeConstructor.java
@@ -0,0 +1,327 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.grammarinheritance.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;
+import org.eclipse.xtext.grammarinheritance.services.InheritanceTestLanguageGrammarAccess;
+
+import com.google.inject.Inject;
+
+public class InheritanceTestLanguageParseTreeConstructor extends AbstractParseTreeConstructor {
+
+ @Inject
+ private InheritanceTestLanguageGrammarAccess grammarAccess;
+
+ protected Solution internalSerialize(EObject obj) {
+ IInstanceDescription inst = getDescr(obj);
+ Solution s;
+ if(inst.isInstanceOf("Model") && (s = new Model_Group(inst, null).firstSolution()) != null && isConsumed(s,null)) return s;
+ if(inst.isInstanceOf("Element") && (s = new Element_Group(inst, null).firstSolution()) != null && isConsumed(s,null)) return s;
+ return null;
+ }
+
+
+/************ begin Rule Model ****************
+ *
+ * Model: "model" name=ID "{" (elements+=Element)* "}";
+ *
+ **/
+
+
+// "model" name=ID "{" (elements+=Element)* "}"
+protected class Model_Group extends GroupToken {
+
+ public Model_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return grammarAccess.prModel().eleGroup();
+ }
+
+ @Override
+ protected Solution createSolution() {
+ Solution s1 = new Model_1_Keyword(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new Model_0_Group(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this,s1);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// "model" name=ID "{" (elements+=Element)*
+protected class Model_0_Group extends GroupToken {
+
+ public Model_0_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return grammarAccess.prModel().ele0Group();
+ }
+
+ @Override
+ protected Solution createSolution() {
+ Solution s1 = new Model_0_1_Assignment_elements(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new Model_0_0_Group(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this,s1);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// "model" name=ID "{"
+protected class Model_0_0_Group extends GroupToken {
+
+ public Model_0_0_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return grammarAccess.prModel().ele00Group();
+ }
+
+ @Override
+ protected Solution createSolution() {
+ Solution s1 = new Model_0_0_1_Keyword(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new Model_0_0_0_Group(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this,s1);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// "model" name=ID
+protected class Model_0_0_0_Group extends GroupToken {
+
+ public Model_0_0_0_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return grammarAccess.prModel().ele000Group();
+ }
+
+ @Override
+ protected Solution createSolution() {
+ Solution s1 = new Model_0_0_0_1_Assignment_name(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new Model_0_0_0_0_Keyword_model(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this,s1);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// "model"
+protected class Model_0_0_0_0_Keyword_model extends KeywordToken {
+
+ public Model_0_0_0_0_Keyword_model(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Keyword getGrammarElement() {
+ return grammarAccess.prModel().ele0000KeywordModel();
+ }
+}
+
+// name=ID
+protected class Model_0_0_0_1_Assignment_name extends AssignmentToken {
+
+ public Model_0_0_0_1_Assignment_name(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Assignment getGrammarElement() {
+ return grammarAccess.prModel().ele0001AssignmentName();
+ }
+
+ @Override
+ protected Solution createSolution() {
+ if((value = current.getConsumable("name",IS_REQUIRED)) == null) return null;
+ IInstanceDescription obj = current.cloneAndConsume("name");
+ if(Boolean.TRUE.booleanValue()) { // xtext::RuleCall FIXME: check if value is valid for lexer rule
+ type = AssignmentType.LRC;
+ element = grammarAccess.prModel().ele00010LexerRuleCallID();
+ return new Solution(obj);
+ }
+ return null;
+ }
+}
+
+
+// "{"
+protected class Model_0_0_1_Keyword extends KeywordToken {
+
+ public Model_0_0_1_Keyword(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Keyword getGrammarElement() {
+ return grammarAccess.prModel().ele001KeywordLeftCurlyBracket();
+ }
+}
+
+
+// (elements+=Element)*
+protected class Model_0_1_Assignment_elements extends AssignmentToken {
+
+ public Model_0_1_Assignment_elements(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, IS_MANY, !IS_REQUIRED);
+ }
+
+ public Assignment getGrammarElement() {
+ return grammarAccess.prModel().ele01AssignmentElements();
+ }
+
+ @Override
+ protected Solution createSolution() {
+ if((value = current.getConsumable("elements",!IS_REQUIRED)) == null) return null;
+ IInstanceDescription obj = current.cloneAndConsume("elements");
+
+ if(value instanceof EObject) { // xtext::RuleCall
+ IInstanceDescription param = getDescr((EObject)value);
+ if(param.isInstanceOf("Element")) {
+ Solution s = new Element_Group(param, this).firstSolution();
+ while(s != null && !isConsumed(s,this)) s = s.getPredecessor().nextSolution(this,s);
+ if(s != null) {
+ type = AssignmentType.PRC;
+ return new Solution(obj,s.getPredecessor());
+ }
+ }
+ }
+
+ return null;
+ }
+}
+
+
+// "}"
+protected class Model_1_Keyword extends KeywordToken {
+
+ public Model_1_Keyword(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Keyword getGrammarElement() {
+ return grammarAccess.prModel().ele1KeywordRightCurlyBracket();
+ }
+}
+
+
+/************ end Rule Model ****************/
+
+
+/************ begin Rule Element ****************
+ *
+ * Element: "element" name=ID;
+ *
+ **/
+
+
+// "element" name=ID
+protected class Element_Group extends GroupToken {
+
+ public Element_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return grammarAccess.prElement().eleGroup();
+ }
+
+ @Override
+ protected Solution createSolution() {
+ Solution s1 = new Element_1_Assignment_name(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new Element_0_Keyword_element(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this,s1);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// "element"
+protected class Element_0_Keyword_element extends KeywordToken {
+
+ public Element_0_Keyword_element(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Keyword getGrammarElement() {
+ return grammarAccess.prElement().ele0KeywordElement();
+ }
+}
+
+// name=ID
+protected class Element_1_Assignment_name extends AssignmentToken {
+
+ public Element_1_Assignment_name(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Assignment getGrammarElement() {
+ return grammarAccess.prElement().ele1AssignmentName();
+ }
+
+ @Override
+ protected Solution createSolution() {
+ if((value = current.getConsumable("name",IS_REQUIRED)) == null) return null;
+ IInstanceDescription obj = current.cloneAndConsume("name");
+ if(Boolean.TRUE.booleanValue()) { // xtext::RuleCall FIXME: check if value is valid for lexer rule
+ type = AssignmentType.LRC;
+ element = grammarAccess.prElement().ele10LexerRuleCallID();
+ return new Solution(obj);
+ }
+ return null;
+ }
+}
+
+
+/************ end Rule Element ****************/
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/services/BaseInheritanceTestLanguageGrammarAccess.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/services/BaseInheritanceTestLanguageGrammarAccess.java
new file mode 100644
index 0000000..d3020db
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/services/BaseInheritanceTestLanguageGrammarAccess.java
@@ -0,0 +1,104 @@
+/*
+Generated with Xtext
+*/
+
+package org.eclipse.xtext.grammarinheritance.services;
+
+import com.google.inject.Singleton;
+import com.google.inject.Inject;
+
+import org.eclipse.xtext.*;
+
+import org.eclipse.xtext.service.GrammarProvider;
+
+import org.eclipse.xtext.builtin.XtextBuiltinGrammarAccess;
+
+@Singleton
+public class BaseInheritanceTestLanguageGrammarAccess implements IGrammarAccess {
+
+
+ public class ModelElements implements IParserRuleAccess {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Model");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Keyword c0KeywordModel = (Keyword)cGroup.eContents().get(0);
+ private final Assignment c1AssignmentName = (Assignment)cGroup.eContents().get(1);
+ private final RuleCall c10LexerRuleCallID = (RuleCall)c1AssignmentName.eContents().get(0);
+
+ // Model: "model" name=ID;
+ public ParserRule getRule() { return rule; }
+
+ // "model" name=ID
+ public Group eleGroup() { return cGroup; }
+
+ // "model"
+ public Keyword ele0KeywordModel() { return c0KeywordModel; }
+
+ // name=ID
+ public Assignment ele1AssignmentName() { return c1AssignmentName; }
+
+ // ID
+ public RuleCall ele10LexerRuleCallID() { return c10LexerRuleCallID; }
+ }
+
+ private ModelElements pModel;
+
+ private final GrammarProvider grammarProvider;
+
+ private XtextBuiltinGrammarAccess superGrammarAccess;
+
+ @Inject
+ public BaseInheritanceTestLanguageGrammarAccess(GrammarProvider grammarProvider, XtextBuiltinGrammarAccess superGrammarAccess) {
+ this.grammarProvider = grammarProvider;
+ this.superGrammarAccess = superGrammarAccess;
+ }
+
+ public Grammar getGrammar() {
+ return grammarProvider.getGrammar(this);
+ }
+
+
+ public XtextBuiltinGrammarAccess getSuperGrammarAccess() {
+ return superGrammarAccess;
+ }
+
+
+ // Model: "model" name=ID;
+ public ModelElements prModel() {
+ return (pModel != null) ? pModel : (pModel = new ModelElements());
+ }
+
+ // lexer ID: "(\'^\')?(\'a\'..\'z\'|\'A\'..\'Z\'|\'_\') (\'a\'..\'z\'|\'A\'..\'Z\'|\'_\'|\'0\'..\'9\')*";
+ public LexerRule lrID() {
+ return superGrammarAccess.lrID();
+ }
+
+ // lexer INT returns EInt: "(\'0\'..\'9\')+";
+ public LexerRule lrINT() {
+ return superGrammarAccess.lrINT();
+ }
+
+ // lexer STRING: "\n\t\t\t \'\"\' ( \'\\\\\' (\'b\'|\'t\'|\'n\'|\'f\'|\'r\'|\'\\\"\'|\'\\\'\'|\'\\\\\') | ~(\'\\\\\'|\'\"\') )* \'\"\' | \n \'\\\'\' ( \'\\\\\' (\'b\'|\'t\'|\'n\'|\'f\'|\'r\'|\'\\\"\'|\'\\\'\'|\'\\\\\') | ~(\'\\\\\'|\'\\\'\') )* \'\\\'\'\n ";
+ public LexerRule lrSTRING() {
+ return superGrammarAccess.lrSTRING();
+ }
+
+ // lexer ML_COMMENT: "\'/*\' ( options {greedy=false;} : . )* \'*/\'";
+ public LexerRule lrML_COMMENT() {
+ return superGrammarAccess.lrML_COMMENT();
+ }
+
+ // lexer SL_COMMENT: "\'//\' ~(\'\\n\'|\'\\r\')* (\'\\r\'? \'\\n\')?";
+ public LexerRule lrSL_COMMENT() {
+ return superGrammarAccess.lrSL_COMMENT();
+ }
+
+ // lexer WS: "(\' \'|\'\\t\'|\'\\r\'|\'\\n\')+";
+ public LexerRule lrWS() {
+ return superGrammarAccess.lrWS();
+ }
+
+ // lexer ANY_OTHER: ".";
+ public LexerRule lrANY_OTHER() {
+ return superGrammarAccess.lrANY_OTHER();
+ }
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/services/BaseInheritanceTestLanguageMetamodelAccess.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/services/BaseInheritanceTestLanguageMetamodelAccess.java
new file mode 100644
index 0000000..d5e175a
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/services/BaseInheritanceTestLanguageMetamodelAccess.java
@@ -0,0 +1,51 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.grammarinheritance.services;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.xtext.IMetamodelAccess;
+import org.eclipse.xtext.parser.BaseEPackageAccess;
+
+public class BaseInheritanceTestLanguageMetamodelAccess extends BaseEPackageAccess implements IMetamodelAccess {
+
+{
+
+ if (!EPackage.Registry.INSTANCE.containsKey(BASEINHERITANCETEST_NS_URI))
+ EPackage.Registry.INSTANCE.put(BASEINHERITANCETEST_NS_URI, loadEcoreFile(getClass().getClassLoader(), "classpath:/org/eclipse/xtext/grammarinheritance/baseInheritanceTest.ecore"));
+
+}
+
+ private EPackage[] generated = new EPackage[] {
+
+ getBaseInheritanceTestEPackage()
+
+ };
+
+ public EPackage[] getGeneratedEPackages() {
+ return generated;
+ }
+
+ private EPackage[] referenced = new EPackage[] {
+
+ };
+ public EPackage[] getReferencedEPackages() {
+ return referenced;
+ }
+
+ private EPackage[] all = new EPackage[] {
+ getBaseInheritanceTestEPackage()
+ };
+
+ public EPackage[] getAllEPackages() {
+ return all;
+ }
+
+
+ protected static final String BASEINHERITANCETEST_NS_URI = "http://www.eclipse.org/2009/tmf/xtext/BaseInheritanceTestLanguage";
+
+ protected EPackage getBaseInheritanceTestEPackage() {
+ return EPackage.Registry.INSTANCE.getEPackage(BASEINHERITANCETEST_NS_URI);
+ }
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/services/InheritanceTestLanguageGrammarAccess.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/services/InheritanceTestLanguageGrammarAccess.java
new file mode 100644
index 0000000..7804735
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/services/InheritanceTestLanguageGrammarAccess.java
@@ -0,0 +1,161 @@
+/*
+Generated with Xtext
+*/
+
+package org.eclipse.xtext.grammarinheritance.services;
+
+import com.google.inject.Singleton;
+import com.google.inject.Inject;
+
+import org.eclipse.xtext.*;
+
+import org.eclipse.xtext.service.GrammarProvider;
+
+import org.eclipse.xtext.grammarinheritance.services.BaseInheritanceTestLanguageGrammarAccess;
+
+@Singleton
+public class InheritanceTestLanguageGrammarAccess implements IGrammarAccess {
+
+
+ public class ModelElements implements IParserRuleAccess {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Model");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Group c0Group = (Group)cGroup.eContents().get(0);
+ private final Group c00Group = (Group)c0Group.eContents().get(0);
+ private final Group c000Group = (Group)c00Group.eContents().get(0);
+ private final Keyword c0000KeywordModel = (Keyword)c000Group.eContents().get(0);
+ private final Assignment c0001AssignmentName = (Assignment)c000Group.eContents().get(1);
+ private final RuleCall c00010LexerRuleCallID = (RuleCall)c0001AssignmentName.eContents().get(0);
+ private final Keyword c001KeywordLeftCurlyBracket = (Keyword)c00Group.eContents().get(1);
+ private final Assignment c01AssignmentElements = (Assignment)c0Group.eContents().get(1);
+ private final RuleCall c010ParserRuleCallElement = (RuleCall)c01AssignmentElements.eContents().get(0);
+ private final Keyword c1KeywordRightCurlyBracket = (Keyword)cGroup.eContents().get(1);
+
+ // Model: "model" name=ID "{" (elements+=Element)* "}";
+ public ParserRule getRule() { return rule; }
+
+ // "model" name=ID "{" (elements+=Element)* "}"
+ public Group eleGroup() { return cGroup; }
+
+ // "model" name=ID "{" (elements+=Element)*
+ public Group ele0Group() { return c0Group; }
+
+ // "model" name=ID "{"
+ public Group ele00Group() { return c00Group; }
+
+ // "model" name=ID
+ public Group ele000Group() { return c000Group; }
+
+ // "model"
+ public Keyword ele0000KeywordModel() { return c0000KeywordModel; }
+
+ // name=ID
+ public Assignment ele0001AssignmentName() { return c0001AssignmentName; }
+
+ // ID
+ public RuleCall ele00010LexerRuleCallID() { return c00010LexerRuleCallID; }
+
+ // "{"
+ public Keyword ele001KeywordLeftCurlyBracket() { return c001KeywordLeftCurlyBracket; }
+
+ // (elements+=Element)*
+ public Assignment ele01AssignmentElements() { return c01AssignmentElements; }
+
+ // Element
+ public RuleCall ele010ParserRuleCallElement() { return c010ParserRuleCallElement; }
+
+ // "}"
+ public Keyword ele1KeywordRightCurlyBracket() { return c1KeywordRightCurlyBracket; }
+ }
+
+ public class ElementElements implements IParserRuleAccess {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Element");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Keyword c0KeywordElement = (Keyword)cGroup.eContents().get(0);
+ private final Assignment c1AssignmentName = (Assignment)cGroup.eContents().get(1);
+ private final RuleCall c10LexerRuleCallID = (RuleCall)c1AssignmentName.eContents().get(0);
+
+ // Element: "element" name=ID;
+ public ParserRule getRule() { return rule; }
+
+ // "element" name=ID
+ public Group eleGroup() { return cGroup; }
+
+ // "element"
+ public Keyword ele0KeywordElement() { return c0KeywordElement; }
+
+ // name=ID
+ public Assignment ele1AssignmentName() { return c1AssignmentName; }
+
+ // ID
+ public RuleCall ele10LexerRuleCallID() { return c10LexerRuleCallID; }
+ }
+
+ private ModelElements pModel;
+ private ElementElements pElement;
+
+ private final GrammarProvider grammarProvider;
+
+ private BaseInheritanceTestLanguageGrammarAccess superGrammarAccess;
+
+ @Inject
+ public InheritanceTestLanguageGrammarAccess(GrammarProvider grammarProvider, BaseInheritanceTestLanguageGrammarAccess superGrammarAccess) {
+ this.grammarProvider = grammarProvider;
+ this.superGrammarAccess = superGrammarAccess;
+ }
+
+ public Grammar getGrammar() {
+ return grammarProvider.getGrammar(this);
+ }
+
+
+ public BaseInheritanceTestLanguageGrammarAccess getSuperGrammarAccess() {
+ return superGrammarAccess;
+ }
+
+
+ // Model: "model" name=ID "{" (elements+=Element)* "}";
+ public ModelElements prModel() {
+ return (pModel != null) ? pModel : (pModel = new ModelElements());
+ }
+
+ // Element: "element" name=ID;
+ public ElementElements prElement() {
+ return (pElement != null) ? pElement : (pElement = new ElementElements());
+ }
+
+ // lexer ID: "(\'^\')?(\'a\'..\'z\'|\'A\'..\'Z\'|\'_\') (\'a\'..\'z\'|\'A\'..\'Z\'|\'_\'|\'0\'..\'9\')*";
+ public LexerRule lrID() {
+ return superGrammarAccess.lrID();
+ }
+
+ // lexer INT returns EInt: "(\'0\'..\'9\')+";
+ public LexerRule lrINT() {
+ return superGrammarAccess.lrINT();
+ }
+
+ // lexer STRING: "\n\t\t\t \'\"\' ( \'\\\\\' (\'b\'|\'t\'|\'n\'|\'f\'|\'r\'|\'\\\"\'|\'\\\'\'|\'\\\\\') | ~(\'\\\\\'|\'\"\') )* \'\"\' | \n \'\\\'\' ( \'\\\\\' (\'b\'|\'t\'|\'n\'|\'f\'|\'r\'|\'\\\"\'|\'\\\'\'|\'\\\\\') | ~(\'\\\\\'|\'\\\'\') )* \'\\\'\'\n ";
+ public LexerRule lrSTRING() {
+ return superGrammarAccess.lrSTRING();
+ }
+
+ // lexer ML_COMMENT: "\'/*\' ( options {greedy=false;} : . )* \'*/\'";
+ public LexerRule lrML_COMMENT() {
+ return superGrammarAccess.lrML_COMMENT();
+ }
+
+ // lexer SL_COMMENT: "\'//\' ~(\'\\n\'|\'\\r\')* (\'\\r\'? \'\\n\')?";
+ public LexerRule lrSL_COMMENT() {
+ return superGrammarAccess.lrSL_COMMENT();
+ }
+
+ // lexer WS: "(\' \'|\'\\t\'|\'\\r\'|\'\\n\')+";
+ public LexerRule lrWS() {
+ return superGrammarAccess.lrWS();
+ }
+
+ // lexer ANY_OTHER: ".";
+ public LexerRule lrANY_OTHER() {
+ return superGrammarAccess.lrANY_OTHER();
+ }
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/services/InheritanceTestLanguageMetamodelAccess.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/services/InheritanceTestLanguageMetamodelAccess.java
new file mode 100644
index 0000000..f2bcba4
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/services/InheritanceTestLanguageMetamodelAccess.java
@@ -0,0 +1,51 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.grammarinheritance.services;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.xtext.IMetamodelAccess;
+import org.eclipse.xtext.parser.BaseEPackageAccess;
+
+public class InheritanceTestLanguageMetamodelAccess extends BaseEPackageAccess implements IMetamodelAccess {
+
+{
+
+ if (!EPackage.Registry.INSTANCE.containsKey(INHERITANCETEST_NS_URI))
+ EPackage.Registry.INSTANCE.put(INHERITANCETEST_NS_URI, loadEcoreFile(getClass().getClassLoader(), "classpath:/org/eclipse/xtext/grammarinheritance/inheritanceTest.ecore"));
+
+}
+
+ private EPackage[] generated = new EPackage[] {
+
+ getInheritanceTestEPackage()
+
+ };
+
+ public EPackage[] getGeneratedEPackages() {
+ return generated;
+ }
+
+ private EPackage[] referenced = new EPackage[] {
+
+ };
+ public EPackage[] getReferencedEPackages() {
+ return referenced;
+ }
+
+ private EPackage[] all = new EPackage[] {
+ getInheritanceTestEPackage()
+ };
+
+ public EPackage[] getAllEPackages() {
+ return all;
+ }
+
+
+ protected static final String INHERITANCETEST_NS_URI = "http://www.eclipse.org/2009/tmf/xtext/InheritanceTestLanguage";
+
+ protected EPackage getInheritanceTestEPackage() {
+ return EPackage.Registry.INSTANCE.getEPackage(INHERITANCETEST_NS_URI);
+ }
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/packrat/MetamodelRefTestLanguageParserConfiguration.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/packrat/MetamodelRefTestLanguageParserConfiguration.java
index af0205a..518a7d1 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/packrat/MetamodelRefTestLanguageParserConfiguration.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/packrat/MetamodelRefTestLanguageParserConfiguration.java
@@ -62,7 +62,7 @@ public class MetamodelRefTestLanguageParserConfiguration extends AbstractParserC
public void configureConsumers() {
if (grammarAccess == null)
- throw new NullPointerException("grammarAccess may not be null, you call configureConsumers");
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
getFooConsumer().setRule(grammarAccess.prFoo());
getNameRefConsumer().setRule(grammarAccess.prNameRef());
getMyRuleConsumer().setRule(grammarAccess.prMyRule());
@@ -132,7 +132,6 @@ public class MetamodelRefTestLanguageParserConfiguration extends AbstractParserC
return getXtextBuiltinConfiguration().getAnyOtherConsumer();
}
-
@Override
public ITerminalConsumer[] getInitialHiddenTerminals() {
return getXtextBuiltinConfiguration().getInitialHiddenTerminals();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/packrat/MultiGenMMTestLanguageParserConfiguration.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/packrat/MultiGenMMTestLanguageParserConfiguration.java
index df0cc23..ba8414a 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/packrat/MultiGenMMTestLanguageParserConfiguration.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/packrat/MultiGenMMTestLanguageParserConfiguration.java
@@ -57,7 +57,7 @@ public class MultiGenMMTestLanguageParserConfiguration extends AbstractParserCon
public void configureConsumers() {
if (grammarAccess == null)
- throw new NullPointerException("grammarAccess may not be null, you call configureConsumers");
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
getFooConsumer().setRule(grammarAccess.prFoo());
getNameRefConsumer().setRule(grammarAccess.prNameRef());
getIdConsumer().setRule(grammarAccess.lrID());
@@ -119,7 +119,6 @@ public class MultiGenMMTestLanguageParserConfiguration extends AbstractParserCon
return getXtextBuiltinConfiguration().getAnyOtherConsumer();
}
-
@Override
public ITerminalConsumer[] getInitialHiddenTerminals() {
return getXtextBuiltinConfiguration().getInitialHiddenTerminals();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/packrat/DatatypeRulesTestLanguageParserConfiguration.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/packrat/DatatypeRulesTestLanguageParserConfiguration.java
index b20a512..2a594fd 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/packrat/DatatypeRulesTestLanguageParserConfiguration.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/packrat/DatatypeRulesTestLanguageParserConfiguration.java
@@ -82,7 +82,7 @@ public class DatatypeRulesTestLanguageParserConfiguration extends AbstractParser
public void configureConsumers() {
if (grammarAccess == null)
- throw new NullPointerException("grammarAccess may not be null, you call configureConsumers");
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
getCompositeModelConsumer().setRule(grammarAccess.prCompositeModel());
getModelConsumer().setRule(grammarAccess.prModel());
getModelIdConsumer().setRule(grammarAccess.prModelId());
@@ -114,6 +114,7 @@ public class DatatypeRulesTestLanguageParserConfiguration extends AbstractParser
getVectorConsumer().setIntConsumer(getIntConsumer());
+
getModelConsumer().setKeyword$8$Delimiter(DatatypeRulesTestLanguageDelimiters.keyword$15$Delimiter);
getModelConsumer().setKeyword$12$Delimiter(DatatypeRulesTestLanguageDelimiters.keyword$15$Delimiter);
getModelConsumer().setKeyword$16$Delimiter(DatatypeRulesTestLanguageDelimiters.keyword$15$Delimiter);
@@ -195,7 +196,6 @@ public class DatatypeRulesTestLanguageParserConfiguration extends AbstractParser
return getXtextBuiltinConfiguration().getAnyOtherConsumer();
}
-
@Override
public ITerminalConsumer[] getInitialHiddenTerminals() {
return getXtextBuiltinConfiguration().getInitialHiddenTerminals();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/EpatchTestLanguageParserConfiguration.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/EpatchTestLanguageParserConfiguration.java
index 9158ab1..3f19578 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/EpatchTestLanguageParserConfiguration.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/EpatchTestLanguageParserConfiguration.java
@@ -175,7 +175,7 @@ public class EpatchTestLanguageParserConfiguration extends AbstractParserConfigu
public void configureConsumers() {
if (grammarAccess == null)
- throw new NullPointerException("grammarAccess may not be null, you call configureConsumers");
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
getEPatchConsumer().setRule(grammarAccess.prEPatch());
getImportConsumer().setRule(grammarAccess.prImport());
getModelImportConsumer().setRule(grammarAccess.prModelImport());
@@ -562,7 +562,6 @@ public class EpatchTestLanguageParserConfiguration extends AbstractParserConfigu
return getXtextBuiltinConfiguration().getAnyOtherConsumer();
}
-
@Override
public ITerminalConsumer[] getInitialHiddenTerminals() {
return getXtextBuiltinConfiguration().getInitialHiddenTerminals();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/keywords/parser/packrat/KeywordsTestLanguageParserConfiguration.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/keywords/parser/packrat/KeywordsTestLanguageParserConfiguration.java
index 8b96a4a..c04cb5c 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/keywords/parser/packrat/KeywordsTestLanguageParserConfiguration.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/keywords/parser/packrat/KeywordsTestLanguageParserConfiguration.java
@@ -52,7 +52,7 @@ public class KeywordsTestLanguageParserConfiguration extends AbstractParserConfi
public void configureConsumers() {
if (grammarAccess == null)
- throw new NullPointerException("grammarAccess may not be null, you call configureConsumers");
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
getModelConsumer().setRule(grammarAccess.prModel());
getIdConsumer().setRule(grammarAccess.lrID());
getIntConsumer().setRule(grammarAccess.lrINT());
@@ -63,6 +63,7 @@ public class KeywordsTestLanguageParserConfiguration extends AbstractParserConfi
getAnyOtherConsumer().setRule(grammarAccess.lrANY_OTHER());
+
getModelConsumer().setKeyword$9$Delimiter(KeywordsTestLanguageDelimiters.keyword$11$Delimiter);
getModelConsumer().setKeyword$11$Delimiter(KeywordsTestLanguageDelimiters.keyword$11$Delimiter);
getModelConsumer().setKeyword$5$Delimiter(KeywordsTestLanguageDelimiters.keyword$7$Delimiter);
@@ -106,7 +107,6 @@ public class KeywordsTestLanguageParserConfiguration extends AbstractParserConfi
return getXtextBuiltinConfiguration().getAnyOtherConsumer();
}
-
@Override
public ITerminalConsumer[] getInitialHiddenTerminals() {
return getXtextBuiltinConfiguration().getInitialHiddenTerminals();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/XtextGrammarTestLanguageParserConfiguration.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/XtextGrammarTestLanguageParserConfiguration.java
index cf836c8..9e37c32 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/XtextGrammarTestLanguageParserConfiguration.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/XtextGrammarTestLanguageParserConfiguration.java
@@ -197,7 +197,7 @@ public class XtextGrammarTestLanguageParserConfiguration extends AbstractParserC
public void configureConsumers() {
if (grammarAccess == null)
- throw new NullPointerException("grammarAccess may not be null, you call configureConsumers");
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
getGrammarConsumer().setRule(grammarAccess.prGrammar());
getGrammarIdConsumer().setRule(grammarAccess.prGrammarID());
getAbstractRuleConsumer().setRule(grammarAccess.prAbstractRule());
@@ -309,6 +309,7 @@ public class XtextGrammarTestLanguageParserConfiguration extends AbstractParserC
getUpToTokenConsumer().setTerminalTokenElementConsumer(getTerminalTokenElementConsumer());
+
getCharacterRangeConsumer().setKeywordConsumer(getKeywordConsumer());
getCrossReferenceConsumer().setIdConsumer(getIdConsumer());
@@ -558,7 +559,6 @@ public class XtextGrammarTestLanguageParserConfiguration extends AbstractParserC
return getXtextBuiltinConfiguration().getAnyOtherConsumer();
}
-
@Override
public ITerminalConsumer[] getInitialHiddenTerminals() {
return getXtextBuiltinConfiguration().getInitialHiddenTerminals();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/HiddenTerminalsTestLanguageParserConfiguration.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/HiddenTerminalsTestLanguageParserConfiguration.java
index 3881854..d37e211 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/HiddenTerminalsTestLanguageParserConfiguration.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/HiddenTerminalsTestLanguageParserConfiguration.java
@@ -95,7 +95,7 @@ public class HiddenTerminalsTestLanguageParserConfiguration extends AbstractPars
public void configureConsumers() {
if (grammarAccess == null)
- throw new NullPointerException("grammarAccess may not be null, you call configureConsumers");
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
getModelConsumer().setRule(grammarAccess.prModel());
getWithoutHiddensConsumer().setRule(grammarAccess.prWithoutHiddens());
getWithHiddensConsumer().setRule(grammarAccess.prWithHiddens());
@@ -120,6 +120,7 @@ public class HiddenTerminalsTestLanguageParserConfiguration extends AbstractPars
getWithoutHiddensConsumer().setWsConsumer(getWsConsumer());
+
getOverridingHiddensConsumer().setOverridingHiddensCallConsumer(getOverridingHiddensCallConsumer());
getOverridingHiddensCallConsumer().setWsConsumer(getWsConsumer());
@@ -129,9 +130,15 @@ public class HiddenTerminalsTestLanguageParserConfiguration extends AbstractPars
getDatatypeHiddensConsumer().setDatatypeRuleConsumer(getDatatypeRuleConsumer());
+
getHidingHiddensConsumer().setInheritingHiddensCallConsumer(getInheritingHiddensCallConsumer());
getHidingHiddensConsumer().setWsConsumer(getWsConsumer());
+
+
+
+
+
getWithoutHiddensConsumer().setKeyword$5$Delimiter(HiddenTerminalsTestLanguageDelimiters.keyword$19$Delimiter);
getWithoutHiddensConsumer().setKeyword$8$Delimiter(HiddenTerminalsTestLanguageDelimiters.keyword$19$Delimiter);
getWithoutHiddensConsumer().setKeyword$12$Delimiter(HiddenTerminalsTestLanguageDelimiters.keyword$19$Delimiter);
@@ -218,5 +225,4 @@ public class HiddenTerminalsTestLanguageParserConfiguration extends AbstractPars
return anyOtherConsumer;
}
-
}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/TerminalRulesTestLanguageParserConfiguration.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/TerminalRulesTestLanguageParserConfiguration.java
index a56aa84..57edfe6 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/TerminalRulesTestLanguageParserConfiguration.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/TerminalRulesTestLanguageParserConfiguration.java
@@ -59,7 +59,7 @@ public class TerminalRulesTestLanguageParserConfiguration extends AbstractParser
public void configureConsumers() {
if (grammarAccess == null)
- throw new NullPointerException("grammarAccess may not be null, you call configureConsumers");
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
getModelConsumer().setRule(grammarAccess.prModel());
getIdConsumer().setRule(grammarAccess.prID());
getIntConsumer().setRule(grammarAccess.prINT());
@@ -78,6 +78,13 @@ public class TerminalRulesTestLanguageParserConfiguration extends AbstractParser
getModelConsumer().setStringConsumer(getStringConsumer());
getModelConsumer().setWsConsumer(getWsConsumer());
+
+
+
+
+
+
+
getModelConsumer().setRuleCall$8$Delimiter(TerminalRulesTestLanguageDelimiters.ruleCall$11$Delimiter);
getModelConsumer().setRuleCall$10$Delimiter(TerminalRulesTestLanguageDelimiters.ruleCall$11$Delimiter);
getModelConsumer().setRuleCall$12$Delimiter(TerminalRulesTestLanguageDelimiters.ruleCall$11$Delimiter);
@@ -119,5 +126,4 @@ public class TerminalRulesTestLanguageParserConfiguration extends AbstractParser
return anyOtherConsumer;
}
-
}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/XtextTerminalsTestLanguageParserConfiguration.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/XtextTerminalsTestLanguageParserConfiguration.java
index 53fecca..2c44232 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/XtextTerminalsTestLanguageParserConfiguration.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/XtextTerminalsTestLanguageParserConfiguration.java
@@ -204,7 +204,7 @@ public class XtextTerminalsTestLanguageParserConfiguration extends AbstractParse
public void configureConsumers() {
if (grammarAccess == null)
- throw new NullPointerException("grammarAccess may not be null, you call configureConsumers");
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
getGrammarConsumer().setRule(grammarAccess.prGrammar());
getGrammarIdConsumer().setRule(grammarAccess.prGrammarID());
getAbstractRuleConsumer().setRule(grammarAccess.prAbstractRule());
@@ -316,6 +316,7 @@ public class XtextTerminalsTestLanguageParserConfiguration extends AbstractParse
getUpToTokenConsumer().setTerminalTokenElementConsumer(getTerminalTokenElementConsumer());
+
getCharacterRangeConsumer().setKeywordConsumer(getKeywordConsumer());
getCrossReferenceConsumer().setIdConsumer(getIdConsumer());
@@ -329,6 +330,13 @@ public class XtextTerminalsTestLanguageParserConfiguration extends AbstractParse
getRuleCallConsumer().setIdConsumer(getIdConsumer());
+
+
+
+
+
+
+
getGrammarConsumer().setCrossReference$25$Delimiter(XtextTerminalsTestLanguageDelimiters.crossReference$28$Delimiter);
getGrammarConsumer().setCrossReference$30$Delimiter(XtextTerminalsTestLanguageDelimiters.crossReference$28$Delimiter);
getGrammarConsumer().setKeyword$8$Delimiter(XtextTerminalsTestLanguageDelimiters.keyword$11$Delimiter);
@@ -560,7 +568,6 @@ public class XtextTerminalsTestLanguageParserConfiguration extends AbstractParse
return anyOtherConsumer;
}
-
@Override
public ITerminalConsumer[] getInitialHiddenTerminals() {
return new ITerminalConsumer[]{ getWsConsumer(), getMlCommentConsumer(), getSlCommentConsumer() };
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/formatter/parser/packrat/FormatterTestLanguageParserConfiguration.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/formatter/parser/packrat/FormatterTestLanguageParserConfiguration.java
index 561b506..6371298 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/formatter/parser/packrat/FormatterTestLanguageParserConfiguration.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/formatter/parser/packrat/FormatterTestLanguageParserConfiguration.java
@@ -67,7 +67,7 @@ public class FormatterTestLanguageParserConfiguration extends AbstractParserConf
public void configureConsumers() {
if (grammarAccess == null)
- throw new NullPointerException("grammarAccess may not be null, you call configureConsumers");
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
getRootConsumer().setRule(grammarAccess.prRoot());
getLineConsumer().setRule(grammarAccess.prLine());
getTestLinewrapConsumer().setRule(grammarAccess.prTestLinewrap());
@@ -150,7 +150,6 @@ public class FormatterTestLanguageParserConfiguration extends AbstractParserConf
return getXtextBuiltinConfiguration().getAnyOtherConsumer();
}
-
@Override
public ITerminalConsumer[] getInitialHiddenTerminals() {
return getXtextBuiltinConfiguration().getInitialHiddenTerminals();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/ComplexReconstrTestLanguageParserConfiguration.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/ComplexReconstrTestLanguageParserConfiguration.java
index 9632526..5b92ac1 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/ComplexReconstrTestLanguageParserConfiguration.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/ComplexReconstrTestLanguageParserConfiguration.java
@@ -122,7 +122,7 @@ public class ComplexReconstrTestLanguageParserConfiguration extends AbstractPars
public void configureConsumers() {
if (grammarAccess == null)
- throw new NullPointerException("grammarAccess may not be null, you call configureConsumers");
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
getRootConsumer().setRule(grammarAccess.prRoot());
getOpConsumer().setRule(grammarAccess.prOp());
getTermConsumer().setRule(grammarAccess.prTerm());
@@ -328,7 +328,6 @@ public class ComplexReconstrTestLanguageParserConfiguration extends AbstractPars
return getXtextBuiltinConfiguration().getAnyOtherConsumer();
}
-
@Override
public ITerminalConsumer[] getInitialHiddenTerminals() {
return getXtextBuiltinConfiguration().getInitialHiddenTerminals();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/SimpleReconstrTestLanguageParserConfiguration.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/SimpleReconstrTestLanguageParserConfiguration.java
index 01367f3..93660cc 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/SimpleReconstrTestLanguageParserConfiguration.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/SimpleReconstrTestLanguageParserConfiguration.java
@@ -97,7 +97,7 @@ public class SimpleReconstrTestLanguageParserConfiguration extends AbstractParse
public void configureConsumers() {
if (grammarAccess == null)
- throw new NullPointerException("grammarAccess may not be null, you call configureConsumers");
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
getOpConsumer().setRule(grammarAccess.prOp());
getTermConsumer().setRule(grammarAccess.prTerm());
getAtomConsumer().setRule(grammarAccess.prAtom());
@@ -246,7 +246,6 @@ public class SimpleReconstrTestLanguageParserConfiguration extends AbstractParse
return getXtextBuiltinConfiguration().getAnyOtherConsumer();
}
-
@Override
public ITerminalConsumer[] getInitialHiddenTerminals() {
return getXtextBuiltinConfiguration().getInitialHiddenTerminals();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/transientvalues/parser/packrat/TransientValuesTestParserConfiguration.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/transientvalues/parser/packrat/TransientValuesTestParserConfiguration.java
index e7e595a..9644105 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/transientvalues/parser/packrat/TransientValuesTestParserConfiguration.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/transientvalues/parser/packrat/TransientValuesTestParserConfiguration.java
@@ -67,7 +67,7 @@ public class TransientValuesTestParserConfiguration extends AbstractParserConfig
public void configureConsumers() {
if (grammarAccess == null)
- throw new NullPointerException("grammarAccess may not be null, you call configureConsumers");
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
getRootConsumer().setRule(grammarAccess.prRoot());
getTestRequiredConsumer().setRule(grammarAccess.prTestRequired());
getTestOptionalConsumer().setRule(grammarAccess.prTestOptional());
@@ -152,7 +152,6 @@ public class TransientValuesTestParserConfiguration extends AbstractParserConfig
return getXtextBuiltinConfiguration().getAnyOtherConsumer();
}
-
@Override
public ITerminalConsumer[] getInitialHiddenTerminals() {
return getXtextBuiltinConfiguration().getInitialHiddenTerminals();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/resource/metamodel/parser/packrat/MultiValueFeatureTestLanguageParserConfiguration.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/resource/metamodel/parser/packrat/MultiValueFeatureTestLanguageParserConfiguration.java
index 5733151..fff0fc6 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/resource/metamodel/parser/packrat/MultiValueFeatureTestLanguageParserConfiguration.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/resource/metamodel/parser/packrat/MultiValueFeatureTestLanguageParserConfiguration.java
@@ -52,7 +52,7 @@ public class MultiValueFeatureTestLanguageParserConfiguration extends AbstractPa
public void configureConsumers() {
if (grammarAccess == null)
- throw new NullPointerException("grammarAccess may not be null, you call configureConsumers");
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
getStartConsumer().setRule(grammarAccess.prStart());
getIdConsumer().setRule(grammarAccess.lrID());
getIntConsumer().setRule(grammarAccess.lrINT());
@@ -105,7 +105,6 @@ public class MultiValueFeatureTestLanguageParserConfiguration extends AbstractPa
return getXtextBuiltinConfiguration().getAnyOtherConsumer();
}
-
@Override
public ITerminalConsumer[] getInitialHiddenTerminals() {
return getXtextBuiltinConfiguration().getInitialHiddenTerminals();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/ActionTestLanguageParserConfiguration.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/ActionTestLanguageParserConfiguration.java
index 3e851b6..0e7ad6f 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/ActionTestLanguageParserConfiguration.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/ActionTestLanguageParserConfiguration.java
@@ -62,7 +62,7 @@ public class ActionTestLanguageParserConfiguration extends AbstractParserConfigu
public void configureConsumers() {
if (grammarAccess == null)
- throw new NullPointerException("grammarAccess may not be null, you call configureConsumers");
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
getModelConsumer().setRule(grammarAccess.prModel());
getElementConsumer().setRule(grammarAccess.prElement());
getItemConsumer().setRule(grammarAccess.prItem());
@@ -129,7 +129,6 @@ public class ActionTestLanguageParserConfiguration extends AbstractParserConfigu
return getXtextBuiltinConfiguration().getAnyOtherConsumer();
}
-
@Override
public ITerminalConsumer[] getInitialHiddenTerminals() {
return getXtextBuiltinConfiguration().getInitialHiddenTerminals();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/ContentAssistTestLanguageParserConfiguration.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/ContentAssistTestLanguageParserConfiguration.java
index 65e6c21..cf026d3 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/ContentAssistTestLanguageParserConfiguration.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/ContentAssistTestLanguageParserConfiguration.java
@@ -72,7 +72,7 @@ public class ContentAssistTestLanguageParserConfiguration extends AbstractParser
public void configureConsumers() {
if (grammarAccess == null)
- throw new NullPointerException("grammarAccess may not be null, you call configureConsumers");
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
getStartConsumer().setRule(grammarAccess.prStart());
getAbstractRuleConsumer().setRule(grammarAccess.prAbstractRule());
getFirstAbstractRuleChildConsumer().setRule(grammarAccess.prFirstAbstractRuleChild());
@@ -166,7 +166,6 @@ public class ContentAssistTestLanguageParserConfiguration extends AbstractParser
return getXtextBuiltinConfiguration().getAnyOtherConsumer();
}
-
@Override
public ITerminalConsumer[] getInitialHiddenTerminals() {
return getXtextBuiltinConfiguration().getInitialHiddenTerminals();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/FowlerDslTestLanguageParserConfiguration.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/FowlerDslTestLanguageParserConfiguration.java
index 79ca84a..dd8181f 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/FowlerDslTestLanguageParserConfiguration.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/FowlerDslTestLanguageParserConfiguration.java
@@ -72,7 +72,7 @@ public class FowlerDslTestLanguageParserConfiguration extends AbstractParserConf
public void configureConsumers() {
if (grammarAccess == null)
- throw new NullPointerException("grammarAccess may not be null, you call configureConsumers");
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
getStatemachineConsumer().setRule(grammarAccess.prStatemachine());
getEventConsumer().setRule(grammarAccess.prEvent());
getCommandConsumer().setRule(grammarAccess.prCommand());
@@ -174,7 +174,6 @@ public class FowlerDslTestLanguageParserConfiguration extends AbstractParserConf
return getXtextBuiltinConfiguration().getAnyOtherConsumer();
}
-
@Override
public ITerminalConsumer[] getInitialHiddenTerminals() {
return getXtextBuiltinConfiguration().getInitialHiddenTerminals();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/LexerTestLanguageParserConfiguration.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/LexerTestLanguageParserConfiguration.java
index aacc403..1b5dacd 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/LexerTestLanguageParserConfiguration.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/LexerTestLanguageParserConfiguration.java
@@ -59,7 +59,7 @@ public class LexerTestLanguageParserConfiguration extends AbstractParserConfigur
public void configureConsumers() {
if (grammarAccess == null)
- throw new NullPointerException("grammarAccess may not be null, you call configureConsumers");
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
getModelConsumer().setRule(grammarAccess.prModel());
getElementConsumer().setRule(grammarAccess.prElement());
getStringConsumer().setRule(grammarAccess.lrSTRING());
@@ -121,7 +121,6 @@ public class LexerTestLanguageParserConfiguration extends AbstractParserConfigur
return getXtextBuiltinConfiguration().getAnyOtherConsumer();
}
-
@Override
public ITerminalConsumer[] getInitialHiddenTerminals() {
return getXtextBuiltinConfiguration().getInitialHiddenTerminals();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/LookaheadTestLanguageParserConfiguration.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/LookaheadTestLanguageParserConfiguration.java
index 5403f85..3d2c699 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/LookaheadTestLanguageParserConfiguration.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/LookaheadTestLanguageParserConfiguration.java
@@ -82,7 +82,7 @@ public class LookaheadTestLanguageParserConfiguration extends AbstractParserConf
public void configureConsumers() {
if (grammarAccess == null)
- throw new NullPointerException("grammarAccess may not be null, you call configureConsumers");
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
getEntryConsumer().setRule(grammarAccess.prEntry());
getAltsConsumer().setRule(grammarAccess.prAlts());
getLookAhead0Consumer().setRule(grammarAccess.prLookAhead0());
@@ -105,10 +105,13 @@ public class LookaheadTestLanguageParserConfiguration extends AbstractParserConf
getAltsConsumer().setLookAhead1Consumer(getLookAhead1Consumer());
getAltsConsumer().setLookAhead3Consumer(getLookAhead3Consumer());
+
getLookAhead1Consumer().setLookAhead2Consumer(getLookAhead2Consumer());
+
getLookAhead3Consumer().setLookAhead4Consumer(getLookAhead4Consumer());
+
getLookAhead0Consumer().setKeyword$2$Delimiter(LookaheadTestLanguageDelimiters.keyword$15$Delimiter);
getLookAhead0Consumer().setKeyword$4$Delimiter(LookaheadTestLanguageDelimiters.keyword$15$Delimiter);
getLookAhead1Consumer().setKeyword$4$Delimiter(LookaheadTestLanguageDelimiters.keyword$15$Delimiter);
@@ -185,7 +188,6 @@ public class LookaheadTestLanguageParserConfiguration extends AbstractParserConf
return getXtextBuiltinConfiguration().getAnyOtherConsumer();
}
-
@Override
public ITerminalConsumer[] getInitialHiddenTerminals() {
return getXtextBuiltinConfiguration().getInitialHiddenTerminals();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/OptionalEmptyTestLanguageParserConfiguration.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/OptionalEmptyTestLanguageParserConfiguration.java
index ee450db..71124de 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/OptionalEmptyTestLanguageParserConfiguration.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/OptionalEmptyTestLanguageParserConfiguration.java
@@ -57,7 +57,7 @@ public class OptionalEmptyTestLanguageParserConfiguration extends AbstractParser
public void configureConsumers() {
if (grammarAccess == null)
- throw new NullPointerException("grammarAccess may not be null, you call configureConsumers");
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
getModelConsumer().setRule(grammarAccess.prModel());
getGreetingConsumer().setRule(grammarAccess.prGreeting());
getIdConsumer().setRule(grammarAccess.lrID());
@@ -118,7 +118,6 @@ public class OptionalEmptyTestLanguageParserConfiguration extends AbstractParser
return getXtextBuiltinConfiguration().getAnyOtherConsumer();
}
-
@Override
public ITerminalConsumer[] getInitialHiddenTerminals() {
return getXtextBuiltinConfiguration().getInitialHiddenTerminals();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/PartialParserTestLanguageParserConfiguration.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/PartialParserTestLanguageParserConfiguration.java
index dda3c87..3a00848 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/PartialParserTestLanguageParserConfiguration.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/PartialParserTestLanguageParserConfiguration.java
@@ -97,7 +97,7 @@ public class PartialParserTestLanguageParserConfiguration extends AbstractParser
public void configureConsumers() {
if (grammarAccess == null)
- throw new NullPointerException("grammarAccess may not be null, you call configureConsumers");
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
getContainerConsumer().setRule(grammarAccess.prContainer());
getNestedConsumer().setRule(grammarAccess.prNested());
getContentConsumer().setRule(grammarAccess.prContent());
@@ -248,7 +248,6 @@ public class PartialParserTestLanguageParserConfiguration extends AbstractParser
return getXtextBuiltinConfiguration().getAnyOtherConsumer();
}
-
@Override
public ITerminalConsumer[] getInitialHiddenTerminals() {
return getXtextBuiltinConfiguration().getInitialHiddenTerminals();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/ReferenceGrammarTestLanguageParserConfiguration.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/ReferenceGrammarTestLanguageParserConfiguration.java
index f7101fa..ee99b2f 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/ReferenceGrammarTestLanguageParserConfiguration.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/ReferenceGrammarTestLanguageParserConfiguration.java
@@ -82,7 +82,7 @@ public class ReferenceGrammarTestLanguageParserConfiguration extends AbstractPar
public void configureConsumers() {
if (grammarAccess == null)
- throw new NullPointerException("grammarAccess may not be null, you call configureConsumers");
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
getSpielplatzConsumer().setRule(grammarAccess.prSpielplatz());
getPersonConsumer().setRule(grammarAccess.prPerson());
getKindConsumer().setRule(grammarAccess.prKind());
@@ -118,6 +118,7 @@ public class ReferenceGrammarTestLanguageParserConfiguration extends AbstractPar
getSpielzeugConsumer().setFarbeConsumer(getFarbeConsumer());
getSpielzeugConsumer().setIdConsumer(getIdConsumer());
+
getFamilieConsumer().setIdConsumer(getIdConsumer());
getFamilieConsumer().setStringConsumer(getStringConsumer());
@@ -218,7 +219,6 @@ public class ReferenceGrammarTestLanguageParserConfiguration extends AbstractPar
return getXtextBuiltinConfiguration().getAnyOtherConsumer();
}
-
@Override
public ITerminalConsumer[] getInitialHiddenTerminals() {
return getXtextBuiltinConfiguration().getInitialHiddenTerminals();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/SimpleExpressionsTestLanguageParserConfiguration.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/SimpleExpressionsTestLanguageParserConfiguration.java
index c4950f4..5ccce3b 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/SimpleExpressionsTestLanguageParserConfiguration.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/SimpleExpressionsTestLanguageParserConfiguration.java
@@ -77,7 +77,7 @@ public class SimpleExpressionsTestLanguageParserConfiguration extends AbstractPa
public void configureConsumers() {
if (grammarAccess == null)
- throw new NullPointerException("grammarAccess may not be null, you call configureConsumers");
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
getSequenceConsumer().setRule(grammarAccess.prSequence());
getAdditionConsumer().setRule(grammarAccess.prAddition());
getMultiplicationConsumer().setRule(grammarAccess.prMultiplication());
@@ -172,7 +172,6 @@ public class SimpleExpressionsTestLanguageParserConfiguration extends AbstractPa
return getXtextBuiltinConfiguration().getAnyOtherConsumer();
}
-
@Override
public ITerminalConsumer[] getInitialHiddenTerminals() {
return getXtextBuiltinConfiguration().getInitialHiddenTerminals();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/TestLanguageParserConfiguration.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/TestLanguageParserConfiguration.java
index e08ae2e..0c2052c 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/TestLanguageParserConfiguration.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/TestLanguageParserConfiguration.java
@@ -72,7 +72,7 @@ public class TestLanguageParserConfiguration extends AbstractParserConfiguration
public void configureConsumers() {
if (grammarAccess == null)
- throw new NullPointerException("grammarAccess may not be null, you call configureConsumers");
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
getEntryRuleConsumer().setRule(grammarAccess.prEntryRule());
getAbstractRuleConsumer().setRule(grammarAccess.prAbstractRule());
getChoiceRuleConsumer().setRule(grammarAccess.prChoiceRule());
@@ -158,7 +158,6 @@ public class TestLanguageParserConfiguration extends AbstractParserConfiguration
return getXtextBuiltinConfiguration().getAnyOtherConsumer();
}
-
@Override
public ITerminalConsumer[] getInitialHiddenTerminals() {
return getXtextBuiltinConfiguration().getInitialHiddenTerminals();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/TreeTestLanguageParserConfiguration.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/TreeTestLanguageParserConfiguration.java
index 18cef35..4a2449f 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/TreeTestLanguageParserConfiguration.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/TreeTestLanguageParserConfiguration.java
@@ -57,7 +57,7 @@ public class TreeTestLanguageParserConfiguration extends AbstractParserConfigura
public void configureConsumers() {
if (grammarAccess == null)
- throw new NullPointerException("grammarAccess may not be null, you call configureConsumers");
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
getModelConsumer().setRule(grammarAccess.prModel());
getNodeConsumer().setRule(grammarAccess.prNode());
getIdConsumer().setRule(grammarAccess.lrID());
@@ -124,7 +124,6 @@ public class TreeTestLanguageParserConfiguration extends AbstractParserConfigura
return getXtextBuiltinConfiguration().getAnyOtherConsumer();
}
-
@Override
public ITerminalConsumer[] getInitialHiddenTerminals() {
return getXtextBuiltinConfiguration().getInitialHiddenTerminals();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/parser/packrat/Bug250313ParserConfiguration.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/parser/packrat/Bug250313ParserConfiguration.java
index d2672cb..791b930 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/parser/packrat/Bug250313ParserConfiguration.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/parser/packrat/Bug250313ParserConfiguration.java
@@ -77,7 +77,7 @@ public class Bug250313ParserConfiguration extends AbstractParserConfiguration {
public void configureConsumers() {
if (grammarAccess == null)
- throw new NullPointerException("grammarAccess may not be null, you call configureConsumers");
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
getModelConsumer().setRule(grammarAccess.prModel());
getDatatypeConsumer().setRule(grammarAccess.prDatatype());
getNestedDatatypeConsumer().setRule(grammarAccess.prNestedDatatype());
@@ -197,7 +197,6 @@ public class Bug250313ParserConfiguration extends AbstractParserConfiguration {
return getXtextBuiltinConfiguration().getAnyOtherConsumer();
}
-
@Override
public ITerminalConsumer[] getInitialHiddenTerminals() {
return getXtextBuiltinConfiguration().getInitialHiddenTerminals();
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 25374ee..744df7d 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
@@ -20,7 +20,9 @@ import org.eclipse.xtext.crossrefs.LangATestLanguage;
import org.eclipse.xtext.dummy.DummyTestLanguage;
import org.eclipse.xtext.generator.LowerCaseNamedTestLanguage;
import org.eclipse.xtext.grammarinheritance.AbstractTestLanguage;
+import org.eclipse.xtext.grammarinheritance.BaseInheritanceTestLanguage;
import org.eclipse.xtext.grammarinheritance.ConcreteTestLanguage;
+import org.eclipse.xtext.grammarinheritance.InheritanceTestLanguage;
import org.eclipse.xtext.metamodelreferencing.tests.MetamodelRefTestLanguage;
import org.eclipse.xtext.metamodelreferencing.tests.MultiGenMMTestLanguage;
import org.eclipse.xtext.parser.datatyperules.DatatypeRulesTestLanguage;
@@ -89,7 +91,9 @@ public class GenerateAllTestGrammars {
HiddenTerminalsTestLanguage.class,
EpatchTestLanguage.class,
KeywordsTestLanguage.class,
- LowerCaseNamedTestLanguage.class
+ LowerCaseNamedTestLanguage.class,
+ BaseInheritanceTestLanguage.class,
+ InheritanceTestLanguage.class
};
public static void main(String... args) throws Exception {
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/generator/lowerCaseNamedTestLanguage.xtext b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/generator/lowerCaseNamedTestLanguage.xtext
index d7fd3db..5dd5df8 100644
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/generator/lowerCaseNamedTestLanguage.xtext
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/generator/lowerCaseNamedTestLanguage.xtext
@@ -4,7 +4,6 @@
* 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.generator.lowerCaseNamedTestLanguage
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/generator/resource/ResourceTest.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/generator/resource/ResourceTest.java
index ded66c8..c3e983c 100644
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/generator/resource/ResourceTest.java
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/generator/resource/ResourceTest.java
@@ -12,7 +12,7 @@ import org.eclipse.xtext.tests.AbstractGeneratorTest;
public class ResourceTest extends AbstractGeneratorTest {
// FIXME: Make this test work again
-
+
// public void testResource() throws Exception {
// new Object(); // workaround for Java bug on MacOSX
// IServiceScope serviceScope = ServiceScopeFactory.get(ITestLanguage.ID);
@@ -24,25 +24,26 @@ public class ResourceTest extends AbstractGeneratorTest {
// String model = "reducible 'x' choice optional y choice z reducible 'x' 'y'";
// fileWriter.append(model);
// fileWriter.close();
-//
+//
// ResourceSet rs0 = new ResourceSetImpl();
// Resource resource = loadAsResource(modelFile, rs0);
// File savedFile = File.createTempFile("testfile_save", "." + resourceFactory.getModelFileExtensions()[0]);
// resource.setURI(URI.createURI(savedFile.toURL().toString()));
// resource.setModified(true);
// resource.save(null);
-//
+//
// ResourceSet rs1 = new ResourceSetImpl();
// Resource resource1 = loadAsResource(savedFile, rs1);
//
// EcoreModelComparator ecoreModelComparator = new EcoreModelComparator();
// assertFalse(ecoreModelComparator.modelsDiffer(resource, resource1));
// }
-
+
public void testDoNothing(){
// 'cause JUnit doesn't like test classes without test methods.
}
+ @SuppressWarnings("unused")
private Resource loadAsResource(File modelFile, ResourceSet rs0) throws MalformedURLException {
Resource resource = rs0.getResource(URI.createURI(modelFile.toURL().toString()), true);
assertNotNull(resource);
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/AbstractTestLanguage.xtext b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/AbstractTestLanguage.xtext
index cfb2987..2961064 100644
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/AbstractTestLanguage.xtext
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/AbstractTestLanguage.xtext
@@ -1,3 +1,10 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 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
+ *******************************************************************************/
abstract language org.eclipse.xtext.grammarinheritance.AbstractTestLanguage
import "classpath:/org/eclipse/xtext/grammarinheritance/ametamodel.ecore" as mm
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/BaseInheritanceTestChecks.chk b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/BaseInheritanceTestChecks.chk
new file mode 100644
index 0000000..2124ecd
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/BaseInheritanceTestChecks.chk
@@ -0,0 +1,7 @@
+import baseInheritanceTest;
+/*
+ * 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/grammarinheritance/BaseInheritanceTestLanguage.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/BaseInheritanceTestLanguage.java
new file mode 100644
index 0000000..8ffdc53
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/BaseInheritanceTestLanguage.java
@@ -0,0 +1,15 @@
+/*******************************************************************************
+ * Copyright (c) 2009 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.grammarinheritance;
+
+/**
+ * @author Sebastian Zarnekow - Initial contribution and API
+ */
+public class BaseInheritanceTestLanguage {
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/BaseInheritanceTestLanguage.xtext b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/BaseInheritanceTestLanguage.xtext
new file mode 100644
index 0000000..363ca25
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/BaseInheritanceTestLanguage.xtext
@@ -0,0 +1,12 @@
+/*******************************************************************************
+ * Copyright (c) 2009 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.grammarinheritance.BaseInheritanceTestLanguage
+
+ generate baseInheritanceTest "http://www.eclipse.org/2009/tmf/xtext/BaseInheritanceTestLanguage"
+
+ Model : "model" name=ID; \ No newline at end of file
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/BaseInheritanceTestLanguageRuntimeModule.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/BaseInheritanceTestLanguageRuntimeModule.java
new file mode 100644
index 0000000..f0d8f74
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/BaseInheritanceTestLanguageRuntimeModule.java
@@ -0,0 +1,18 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.grammarinheritance;
+
+import com.google.inject.Binder;
+
+/**
+ * Use this class to register components to be used within the IDE.
+ */
+public class BaseInheritanceTestLanguageRuntimeModule extends AbstractBaseInheritanceTestLanguageRuntimeModule {
+
+ @Override
+ public void configure(Binder binder) {
+ super.configure(binder);
+ }
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/ConcreteTestLanguage.xtext b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/ConcreteTestLanguage.xtext
index 54add21..8e624ce 100644
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/ConcreteTestLanguage.xtext
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/ConcreteTestLanguage.xtext
@@ -1,3 +1,10 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 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.grammarinheritance.ConcreteTestLanguage extends org.eclipse.xtext.grammarinheritance.AbstractTestLanguage
generate foo "http://holla"
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/Inheritance2Test.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/Inheritance2Test.java
new file mode 100644
index 0000000..9b5299a
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/Inheritance2Test.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2009 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.grammarinheritance;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.xtext.ParserRule;
+import org.eclipse.xtext.grammarinheritance.services.InheritanceTestLanguageGrammarAccess;
+import org.eclipse.xtext.junit.AbstractXtextTests;
+
+/**
+ * @author Sebastian Zarnekow - Initial contribution and API
+ */
+public class Inheritance2Test extends AbstractXtextTests {
+
+ private InheritanceTestLanguageGrammarAccess grammarAccess;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ with(InheritanceTestLanguageStandaloneSetup.class);
+ grammarAccess = get(InheritanceTestLanguageGrammarAccess.class);
+ }
+
+ public void testReturnTypes_01() {
+ ParserRule rule = grammarAccess.prModel().getRule();
+ EClassifier classifier = rule.getType().getType();
+ assertEquals("Model", classifier.getName());
+ EPackage pack = classifier.getEPackage();
+ assertNotNull(pack);
+ assertEquals(grammarAccess.getGrammar().getMetamodelDeclarations().get(0).getEPackage(), pack);
+ EClassifier superClassifier = ((EClass)classifier).getESuperTypes().get(0);
+ assertEquals("Model", superClassifier.getName());
+ EPackage superPack = superClassifier.getEPackage();
+ assertNotNull(superPack);
+ assertEquals(grammarAccess.getGrammar().getSuperGrammar().getMetamodelDeclarations().get(0).getEPackage(), superPack);
+ }
+
+ public void testReturnTypes_02() {
+ ParserRule rule = grammarAccess.prElement().getRule();
+ EClassifier classifier = rule.getType().getType();
+ assertEquals("Element", classifier.getName());
+ EPackage pack = classifier.getEPackage();
+ assertNotNull(pack);
+ assertEquals(grammarAccess.getGrammar().getMetamodelDeclarations().get(0).getEPackage(), pack);
+ }
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/InheritanceTestChecks.chk b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/InheritanceTestChecks.chk
new file mode 100644
index 0000000..bedfaa0
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/InheritanceTestChecks.chk
@@ -0,0 +1,7 @@
+import inheritanceTest;
+/*
+ * 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/grammarinheritance/InheritanceTestLanguage.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/InheritanceTestLanguage.java
new file mode 100644
index 0000000..d069134
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/InheritanceTestLanguage.java
@@ -0,0 +1,15 @@
+/*******************************************************************************
+ * Copyright (c) 2009 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.grammarinheritance;
+
+/**
+ * @author Sebastian Zarnekow - Initial contribution and API
+ */
+public class InheritanceTestLanguage {
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/InheritanceTestLanguage.xtext b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/InheritanceTestLanguage.xtext
new file mode 100644
index 0000000..7b62846
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/InheritanceTestLanguage.xtext
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2009 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.grammarinheritance.InheritanceTestLanguage
+ extends org.eclipse.xtext.grammarinheritance.BaseInheritanceTestLanguage
+
+generate inheritanceTest "http://www.eclipse.org/2009/tmf/xtext/InheritanceTestLanguage"
+
+Model :
+ "model" name=ID "{"
+ elements+=Element*
+ "}"
+;
+
+Element :
+ "element" name=ID
+; \ No newline at end of file
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/InheritanceTestLanguageRuntimeModule.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/InheritanceTestLanguageRuntimeModule.java
new file mode 100644
index 0000000..1cfb466
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/InheritanceTestLanguageRuntimeModule.java
@@ -0,0 +1,18 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.grammarinheritance;
+
+import com.google.inject.Binder;
+
+/**
+ * Use this class to register components to be used within the IDE.
+ */
+public class InheritanceTestLanguageRuntimeModule extends AbstractInheritanceTestLanguageRuntimeModule {
+
+ @Override
+ public void configure(Binder binder) {
+ super.configure(binder);
+ }
+
+}
diff --git a/tests/org.eclipse.xtext.ui.integration.tests/src-gen/org/eclipse/xtext/ui/integration/parser/packrat/TestLanguageParserConfiguration.java b/tests/org.eclipse.xtext.ui.integration.tests/src-gen/org/eclipse/xtext/ui/integration/parser/packrat/TestLanguageParserConfiguration.java
index e3024fa..db7e152 100644
--- a/tests/org.eclipse.xtext.ui.integration.tests/src-gen/org/eclipse/xtext/ui/integration/parser/packrat/TestLanguageParserConfiguration.java
+++ b/tests/org.eclipse.xtext.ui.integration.tests/src-gen/org/eclipse/xtext/ui/integration/parser/packrat/TestLanguageParserConfiguration.java
@@ -57,7 +57,7 @@ public class TestLanguageParserConfiguration extends AbstractParserConfiguration
public void configureConsumers() {
if (grammarAccess == null)
- throw new NullPointerException("grammarAccess may not be null, you call configureConsumers");
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
getFileConsumer().setRule(grammarAccess.prFile());
getStuffConsumer().setRule(grammarAccess.prStuff());
getIdConsumer().setRule(grammarAccess.lrID());
@@ -118,7 +118,6 @@ public class TestLanguageParserConfiguration extends AbstractParserConfiguration
return getXtextBuiltinConfiguration().getAnyOtherConsumer();
}
-
@Override
public ITerminalConsumer[] getInitialHiddenTerminals() {
return getXtextBuiltinConfiguration().getInitialHiddenTerminals();
diff --git a/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/GenXtextGrammarTestLanguageScopeProvider.ext b/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/GenXtextGrammarTestLanguageScopeProvider.ext
index 8d6fd84..58af005 100644
--- a/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/GenXtextGrammarTestLanguageScopeProvider.ext
+++ b/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/GenXtextGrammarTestLanguageScopeProvider.ext
@@ -17,16 +17,16 @@ extension org::eclipse::xtend::util::stdlib::io;
*/
-List[IScopedElement] scope_superGrammar(Grammar this):
- allElements().typeSelect(Grammar).collect(x | createScopedElement(x.referenceName(), x));
+List[IScopedElement] scope_rule(RuleCall this):
+ allElements().typeSelect(AbstractRule).collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_superGrammar(emf::EObject this) :
+List[IScopedElement] scope_rule(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_type(TypeRef this):
- allElements().typeSelect(ecore::EClassifier).collect(x | createScopedElement(x.referenceName(), x));
+List[IScopedElement] scope_hiddenTokens(ParserRule this):
+ allElements().typeSelect(AbstractRule).collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_type(emf::EObject this) :
+List[IScopedElement] scope_hiddenTokens(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
List[IScopedElement] scope_metamodel(TypeRef this):
@@ -35,25 +35,25 @@ List[IScopedElement] scope_metamodel(TypeRef this):
List[IScopedElement] scope_metamodel(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_hiddenTokens(Grammar this):
- allElements().typeSelect(AbstractRule).collect(x | createScopedElement(x.referenceName(), x));
-
-List[IScopedElement] scope_hiddenTokens(emf::EObject this) :
- allElements().collect(x | createScopedElement(x.referenceName(), x));
-
List[IScopedElement] scope_ePackage(AbstractMetamodelDeclaration this):
allElements().typeSelect(ecore::EPackage).collect(x | createScopedElement(x.referenceName(), x));
List[IScopedElement] scope_ePackage(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_rule(RuleCall this):
- allElements().typeSelect(AbstractRule).collect(x | createScopedElement(x.referenceName(), x));
+List[IScopedElement] scope_superGrammar(Grammar this):
+ allElements().typeSelect(Grammar).collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_rule(emf::EObject this) :
+List[IScopedElement] scope_superGrammar(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_hiddenTokens(ParserRule this):
+List[IScopedElement] scope_type(TypeRef this):
+ allElements().typeSelect(ecore::EClassifier).collect(x | createScopedElement(x.referenceName(), x));
+
+List[IScopedElement] scope_type(emf::EObject this) :
+ allElements().collect(x | createScopedElement(x.referenceName(), x));
+
+List[IScopedElement] scope_hiddenTokens(Grammar this):
allElements().typeSelect(AbstractRule).collect(x | createScopedElement(x.referenceName(), x));
List[IScopedElement] scope_hiddenTokens(emf::EObject this) :
diff --git a/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/parser/keywords/parser/packrat/KeywordsTestLanguageParserConfiguration.java b/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/parser/keywords/parser/packrat/KeywordsTestLanguageParserConfiguration.java
index 8b96a4a..c04cb5c 100644
--- a/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/parser/keywords/parser/packrat/KeywordsTestLanguageParserConfiguration.java
+++ b/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/parser/keywords/parser/packrat/KeywordsTestLanguageParserConfiguration.java
@@ -52,7 +52,7 @@ public class KeywordsTestLanguageParserConfiguration extends AbstractParserConfi
public void configureConsumers() {
if (grammarAccess == null)
- throw new NullPointerException("grammarAccess may not be null, you call configureConsumers");
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
getModelConsumer().setRule(grammarAccess.prModel());
getIdConsumer().setRule(grammarAccess.lrID());
getIntConsumer().setRule(grammarAccess.lrINT());
@@ -63,6 +63,7 @@ public class KeywordsTestLanguageParserConfiguration extends AbstractParserConfi
getAnyOtherConsumer().setRule(grammarAccess.lrANY_OTHER());
+
getModelConsumer().setKeyword$9$Delimiter(KeywordsTestLanguageDelimiters.keyword$11$Delimiter);
getModelConsumer().setKeyword$11$Delimiter(KeywordsTestLanguageDelimiters.keyword$11$Delimiter);
getModelConsumer().setKeyword$5$Delimiter(KeywordsTestLanguageDelimiters.keyword$7$Delimiter);
@@ -106,7 +107,6 @@ public class KeywordsTestLanguageParserConfiguration extends AbstractParserConfi
return getXtextBuiltinConfiguration().getAnyOtherConsumer();
}
-
@Override
public ITerminalConsumer[] getInitialHiddenTerminals() {
return getXtextBuiltinConfiguration().getInitialHiddenTerminals();
diff --git a/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/parser/packrat/XtextGrammarTestLanguageParserConfiguration.java b/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/parser/packrat/XtextGrammarTestLanguageParserConfiguration.java
index cf836c8..9e37c32 100644
--- a/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/parser/packrat/XtextGrammarTestLanguageParserConfiguration.java
+++ b/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/parser/packrat/XtextGrammarTestLanguageParserConfiguration.java
@@ -197,7 +197,7 @@ public class XtextGrammarTestLanguageParserConfiguration extends AbstractParserC
public void configureConsumers() {
if (grammarAccess == null)
- throw new NullPointerException("grammarAccess may not be null, you call configureConsumers");
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
getGrammarConsumer().setRule(grammarAccess.prGrammar());
getGrammarIdConsumer().setRule(grammarAccess.prGrammarID());
getAbstractRuleConsumer().setRule(grammarAccess.prAbstractRule());
@@ -309,6 +309,7 @@ public class XtextGrammarTestLanguageParserConfiguration extends AbstractParserC
getUpToTokenConsumer().setTerminalTokenElementConsumer(getTerminalTokenElementConsumer());
+
getCharacterRangeConsumer().setKeywordConsumer(getKeywordConsumer());
getCrossReferenceConsumer().setIdConsumer(getIdConsumer());
@@ -558,7 +559,6 @@ public class XtextGrammarTestLanguageParserConfiguration extends AbstractParserC
return getXtextBuiltinConfiguration().getAnyOtherConsumer();
}
-
@Override
public ITerminalConsumer[] getInitialHiddenTerminals() {
return getXtextBuiltinConfiguration().getInitialHiddenTerminals();
diff --git a/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/GenReferenceGrammarTestLanguageScopeProvider.ext b/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/GenReferenceGrammarTestLanguageScopeProvider.ext
index 9a38ee7..a2ae8fd 100644
--- a/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/GenReferenceGrammarTestLanguageScopeProvider.ext
+++ b/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/GenReferenceGrammarTestLanguageScopeProvider.ext
@@ -22,15 +22,15 @@ List[IScopedElement] scope_kinder(Familie this):
List[IScopedElement] scope_kinder(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_vater(Familie this):
+List[IScopedElement] scope_mutter(Familie this):
allElements().typeSelect(Erwachsener).collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_vater(emf::EObject this) :
+List[IScopedElement] scope_mutter(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_mutter(Familie this):
+List[IScopedElement] scope_vater(Familie this):
allElements().typeSelect(Erwachsener).collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_mutter(emf::EObject this) :
+List[IScopedElement] scope_vater(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
diff --git a/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/ContentAssistTestLanguageParserConfiguration.java b/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/ContentAssistTestLanguageParserConfiguration.java
index 65e6c21..cf026d3 100644
--- a/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/ContentAssistTestLanguageParserConfiguration.java
+++ b/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/ContentAssistTestLanguageParserConfiguration.java
@@ -72,7 +72,7 @@ public class ContentAssistTestLanguageParserConfiguration extends AbstractParser
public void configureConsumers() {
if (grammarAccess == null)
- throw new NullPointerException("grammarAccess may not be null, you call configureConsumers");
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
getStartConsumer().setRule(grammarAccess.prStart());
getAbstractRuleConsumer().setRule(grammarAccess.prAbstractRule());
getFirstAbstractRuleChildConsumer().setRule(grammarAccess.prFirstAbstractRuleChild());
@@ -166,7 +166,6 @@ public class ContentAssistTestLanguageParserConfiguration extends AbstractParser
return getXtextBuiltinConfiguration().getAnyOtherConsumer();
}
-
@Override
public ITerminalConsumer[] getInitialHiddenTerminals() {
return getXtextBuiltinConfiguration().getInitialHiddenTerminals();
diff --git a/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/ReferenceGrammarTestLanguageParserConfiguration.java b/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/ReferenceGrammarTestLanguageParserConfiguration.java
index f7101fa..ee99b2f 100644
--- a/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/ReferenceGrammarTestLanguageParserConfiguration.java
+++ b/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/ReferenceGrammarTestLanguageParserConfiguration.java
@@ -82,7 +82,7 @@ public class ReferenceGrammarTestLanguageParserConfiguration extends AbstractPar
public void configureConsumers() {
if (grammarAccess == null)
- throw new NullPointerException("grammarAccess may not be null, you call configureConsumers");
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
getSpielplatzConsumer().setRule(grammarAccess.prSpielplatz());
getPersonConsumer().setRule(grammarAccess.prPerson());
getKindConsumer().setRule(grammarAccess.prKind());
@@ -118,6 +118,7 @@ public class ReferenceGrammarTestLanguageParserConfiguration extends AbstractPar
getSpielzeugConsumer().setFarbeConsumer(getFarbeConsumer());
getSpielzeugConsumer().setIdConsumer(getIdConsumer());
+
getFamilieConsumer().setIdConsumer(getIdConsumer());
getFamilieConsumer().setStringConsumer(getStringConsumer());
@@ -218,7 +219,6 @@ public class ReferenceGrammarTestLanguageParserConfiguration extends AbstractPar
return getXtextBuiltinConfiguration().getAnyOtherConsumer();
}
-
@Override
public ITerminalConsumer[] getInitialHiddenTerminals() {
return getXtextBuiltinConfiguration().getInitialHiddenTerminals();
diff --git a/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/TreeTestLanguageParserConfiguration.java b/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/TreeTestLanguageParserConfiguration.java
index 18cef35..4a2449f 100644
--- a/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/TreeTestLanguageParserConfiguration.java
+++ b/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/TreeTestLanguageParserConfiguration.java
@@ -57,7 +57,7 @@ public class TreeTestLanguageParserConfiguration extends AbstractParserConfigura
public void configureConsumers() {
if (grammarAccess == null)
- throw new NullPointerException("grammarAccess may not be null, you call configureConsumers");
+ throw new NullPointerException("grammarAccess may not be null, if you call configureConsumers");
getModelConsumer().setRule(grammarAccess.prModel());
getNodeConsumer().setRule(grammarAccess.prNode());
getIdConsumer().setRule(grammarAccess.lrID());
@@ -124,7 +124,6 @@ public class TreeTestLanguageParserConfiguration extends AbstractParserConfigura
return getXtextBuiltinConfiguration().getAnyOtherConsumer();
}
-
@Override
public ITerminalConsumer[] getInitialHiddenTerminals() {
return getXtextBuiltinConfiguration().getInitialHiddenTerminals();