aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorszarnekow2009-02-23 03:37:38 (EST)
committersefftinge2009-02-23 03:37:38 (EST)
commitc6abcfbe77c8b07506e88c194407b457868efc75 (patch)
tree4b35389907a39649d8504d13bef2d6cdbffea89d
parent3ce005c8d059037fef5233e5bf6e576cbf2e7cb6 (diff)
downloadorg.eclipse.xtext-c6abcfbe77c8b07506e88c194407b457868efc75.zip
org.eclipse.xtext-c6abcfbe77c8b07506e88c194407b457868efc75.tar.gz
org.eclipse.xtext-c6abcfbe77c8b07506e88c194407b457868efc75.tar.bz2
Refactored generated packrat parser code to improve backtracking
-rw-r--r--devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/ReferenceGrammarDelimiters.java9
-rw-r--r--devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/ReferenceGrammarParserConfiguration.java4
-rw-r--r--devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarCustomTypeParserRuleConsumer.java134
-rw-r--r--devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarErwachsenerConsumer.java253
-rw-r--r--devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarFamilieConsumer.java558
-rw-r--r--devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarFarbeConsumer.java176
-rw-r--r--devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarKindConsumer.java253
-rw-r--r--devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarPersonConsumer.java111
-rw-r--r--devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarSpielplatzConsumer.java529
-rw-r--r--devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarSpielzeugConsumer.java250
-rw-r--r--examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/DomainmodelDelimiters.java9
-rw-r--r--examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/DomainmodelParserConfiguration.java4
-rw-r--r--examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelAttributeConsumer.java215
-rw-r--r--examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelDataTypeConsumer.java134
-rw-r--r--examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelEntityConsumer.java371
-rw-r--r--examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelFeatureConsumer.java111
-rw-r--r--examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelFileConsumer.java150
-rw-r--r--examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelImportConsumer.java134
-rw-r--r--examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelNamedElementConsumer.java111
-rw-r--r--examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelOperationConsumer.java487
-rw-r--r--examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelPackageConsumer.java249
-rw-r--r--examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelParameterConsumer.java149
-rw-r--r--examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelQualifiedNameConsumer.java185
-rw-r--r--examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelReferenceConsumer.java334
-rw-r--r--examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelStructuralFeatureConsumer.java111
-rw-r--r--examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelTypeConsumer.java111
-rw-r--r--examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelTypeRefConsumer.java71
-rw-r--r--examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelTypedElementConsumer.java111
-rw-r--r--examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/EcoreDslDelimiters.java9
-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.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslEAnnotationDeclConsumer.java418
-rw-r--r--examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslEAttributeDeclConsumer.java1075
-rw-r--r--examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslEClassDeclConsumer.java1121
-rw-r--r--examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslEClassifierDeclConsumer.java111
-rw-r--r--examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslEDataTypeDeclConsumer.java412
-rw-r--r--examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslEEnumDeclConsumer.java323
-rw-r--r--examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslEEnumLiteralDeclConsumer.java362
-rw-r--r--examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslEGenericTypeDeclConsumer.java825
-rw-r--r--examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslEGenericTypeReferenceDeclConsumer.java516
-rw-r--r--examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslEOperationDeclConsumer.java1209
-rw-r--r--examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslEPackageDeclConsumer.java606
-rw-r--r--examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslEParameterDeclConsumer.java198
-rw-r--r--examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslEReferenceDeclConsumer.java1152
-rw-r--r--examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslEStructuralFeatureDeclConsumer.java111
-rw-r--r--examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslETypeParameterDeclConsumer.java222
-rw-r--r--examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslEcoreDslConsumer.java148
-rw-r--r--examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslImportStatementDeclConsumer.java289
-rw-r--r--examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslMapEntryConsumer.java185
-rw-r--r--examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslMapEntrySuperConsumer.java50
-rw-r--r--examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslMultiplicityExprConsumer.java144
-rw-r--r--examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslQIDConsumer.java246
-rw-r--r--examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslSINTConsumer.java124
-rw-r--r--examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslSTRING_OR_QIDConsumer.java114
-rw-r--r--examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslSubEPackageDeclConsumer.java376
-rw-r--r--examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/packrat/FowlerDslDelimiters.java7
-rw-r--r--examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/packrat/FowlerDslParserConfiguration.java4
-rw-r--r--examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/FowlerDslCommandConsumer.java150
-rw-r--r--examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/FowlerDslEventConsumer.java204
-rw-r--r--examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/FowlerDslStateConsumer.java428
-rw-r--r--examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/FowlerDslStatemachineConsumer.java331
-rw-r--r--examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/FowlerDslTransitionConsumer.java183
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/ImportUriTestLanguageDelimiters.java7
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/ImportUriTestLanguageParserConfiguration.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/LangATestLanguageDelimiters.java7
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/LangATestLanguageParserConfiguration.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/consumers/ImportUriTestLanguageImportConsumer.java134
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/consumers/ImportUriTestLanguageMainConsumer.java150
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/consumers/ImportUriTestLanguageTypeConsumer.java217
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/consumers/LangATestLanguageImportConsumer.java134
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/consumers/LangATestLanguageMainConsumer.java150
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/consumers/LangATestLanguageTypeConsumer.java217
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/parser/packrat/DummyTestLanguageDelimiters.java9
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/parser/packrat/DummyTestLanguageParserConfiguration.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/parser/packrat/consumers/DummyTestLanguageElementConsumer.java280
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/parser/packrat/consumers/DummyTestLanguageModelConsumer.java71
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/packrat/consumers/LowerCaseNamedTestLanguageModelConsumer.java71
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/packrat/lowerCaseNamedTestLanguageDelimiters.java5
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/packrat/lowerCaseNamedTestLanguageParserConfiguration.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/AbstractTestLanguageDelimiters.java7
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/AbstractTestLanguageParserConfiguration.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/BaseInheritanceTestLanguageDelimiters.java5
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/BaseInheritanceTestLanguageParserConfiguration.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/ConcreteTestLanguageDelimiters.java9
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/ConcreteTestLanguageParserConfiguration.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/InheritanceTestLanguageDelimiters.java7
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/InheritanceTestLanguageParserConfiguration.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/AbstractTestLanguageAbstractCallExtendedParserRuleConsumer.java134
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/AbstractTestLanguageAbstractCallOverridenParserRuleConsumer.java134
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/AbstractTestLanguageExtendableParserRuleConsumer.java134
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/AbstractTestLanguageInheritedParserRuleConsumer.java134
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/AbstractTestLanguageOverridableParserRule2Consumer.java134
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/AbstractTestLanguageOverridableParserRuleConsumer.java134
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/BaseInheritanceTestLanguageModelConsumer.java134
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/ConcreteTestLanguageCallExtendedParserRuleConsumer.java69
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/ConcreteTestLanguageCallOverridenParserRuleConsumer.java69
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/ConcreteTestLanguageConcreteParserRuleConsumer.java217
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/ConcreteTestLanguageExtendableParserRuleConsumer.java140
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/ConcreteTestLanguageOverridableParserRule2Consumer.java218
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/ConcreteTestLanguageOverridableParserRuleConsumer.java134
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/ConcreteTestLanguageRootRuleConsumer.java167
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/ConcreteTestLanguageSubrule1Consumer.java183
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/ConcreteTestLanguageSubrule2Consumer.java185
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/ConcreteTestLanguageSubrule3Consumer.java185
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/InheritanceTestLanguageElementConsumer.java134
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/InheritanceTestLanguageModelConsumer.java252
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/packrat/MetamodelRefTestLanguageDelimiters.java5
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/packrat/MetamodelRefTestLanguageParserConfiguration.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/packrat/MultiGenMMTestLanguageDelimiters.java5
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/packrat/MultiGenMMTestLanguageParserConfiguration.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/packrat/consumers/MetamodelRefTestLanguageFooConsumer.java151
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/packrat/consumers/MetamodelRefTestLanguageMyRuleConsumer.java71
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/packrat/consumers/MetamodelRefTestLanguageNameRefConsumer.java71
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/packrat/consumers/MultiGenMMTestLanguageFooConsumer.java151
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/packrat/consumers/MultiGenMMTestLanguageNameRefConsumer.java71
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/packrat/DatatypeRulesTestLanguageDelimiters.java6
-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/datatyperules/parser/packrat/consumers/DatatypeRulesTestLanguageCompositeModelConsumer.java93
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/packrat/consumers/DatatypeRulesTestLanguageDotsConsumer.java178
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/packrat/consumers/DatatypeRulesTestLanguageFractionConsumer.java188
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/packrat/consumers/DatatypeRulesTestLanguageModelConsumer.java498
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/packrat/consumers/DatatypeRulesTestLanguageModelIdConsumer.java152
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/packrat/consumers/DatatypeRulesTestLanguageNestedModelIdConsumer.java146
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/packrat/consumers/DatatypeRulesTestLanguageVectorConsumer.java185
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/EpatchTestLanguageDelimiters.java9
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/EpatchTestLanguageParserConfiguration.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageAssignmentConsumer.java167
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageAssignmentValueConsumer.java637
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageBiListAssignmentConsumer.java667
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageBiSingleAssignmentConsumer.java295
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageCreatedObjectConsumer.java532
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageEPackageImportConsumer.java218
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageEPatchConsumer.java350
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageExecutableConsumer.java111
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageExpressionExecutableConsumer.java71
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageExtensionImportConsumer.java282
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageImportConsumer.java140
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageJavaExecutableConsumer.java202
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageJavaImportConsumer.java282
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageListAssignmentValueConsumer.java900
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageMigrationConsumer.java421
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageModelImportConsumer.java111
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageMonoListAssignmentConsumer.java430
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageMonoSingleAssignmentConsumer.java217
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageNamedObjectConsumer.java111
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageNamedResourceConsumer.java722
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageObjectCopyConsumer.java186
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageObjectNewConsumer.java186
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageObjectRefConsumer.java1098
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageResourceImportConsumer.java218
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageSingleAssignmentValueConsumer.java678
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/keywords/parser/packrat/KeywordsTestLanguageDelimiters.java7
-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/keywords/parser/packrat/consumers/KeywordsTestLanguageModelConsumer.java238
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/XtextGrammarTestLanguageDelimiters.java9
-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/packrat/consumers/XtextGrammarTestLanguageAbstractMetamodelDeclarationConsumer.java111
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAbstractNegatedTokenConsumer.java111
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAbstractRuleConsumer.java140
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAbstractTerminalConsumer.java167
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAbstractTokenConsumer.java301
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageActionConsumer.java495
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAlternativesConsumer.java219
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAssignmentConsumer.java303
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageCharacterRangeConsumer.java226
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageCrossReferenceConsumer.java287
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageGeneratedMetamodelConsumer.java304
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageGrammarConsumer.java816
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageGrammarIDConsumer.java185
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageGroupConsumer.java186
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageKeywordConsumer.java71
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageLexerRuleConsumer.java431
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageNegatedTokenConsumer.java132
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageParenthesizedElementConsumer.java150
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageParenthesizedTerminalElementConsumer.java150
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageParserRuleConsumer.java701
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageReferencedMetamodelConsumer.java259
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageRuleCallConsumer.java71
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTerminalAlternativesConsumer.java219
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTerminalGroupConsumer.java186
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTerminalRuleConsumer.java382
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTerminalTokenConsumer.java224
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTerminalTokenElementConsumer.java198
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTypeRefConsumer.java221
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageUpToTokenConsumer.java132
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageWildcardConsumer.java69
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/HiddenTerminalsTestLanguageDelimiters.java6
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/HiddenTerminalsTestLanguageParserConfiguration.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/TerminalRulesTestLanguageDelimiters.java5
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/TerminalRulesTestLanguageParserConfiguration.java3
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/XtextTerminalsTestLanguageDelimiters.java9
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/XtextTerminalsTestLanguageParserConfiguration.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageANY_OTHERConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageDatatypeHiddensConsumer.java132
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageDatatypeRuleConsumer.java117
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageHidingHiddensConsumer.java182
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageInheritingHiddensCallConsumer.java132
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageInheritingHiddensConsumer.java355
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageML_COMMENTConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageModelConsumer.java198
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageOverridingHiddensCallConsumer.java188
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageOverridingHiddensConsumer.java280
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageSL_COMMENTConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageWSConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageWithHiddensConsumer.java165
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageWithoutHiddensConsumer.java272
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/TerminalRulesTestLanguageANY_OTHERConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/TerminalRulesTestLanguageIDConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/TerminalRulesTestLanguageINTConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/TerminalRulesTestLanguageML_COMMENTConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/TerminalRulesTestLanguageModelConsumer.java393
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/TerminalRulesTestLanguageSL_COMMENTConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/TerminalRulesTestLanguageSTRINGConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/TerminalRulesTestLanguageWSConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageANY_OTHERConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageAbstractMetamodelDeclarationConsumer.java111
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageAbstractNegatedTokenConsumer.java111
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageAbstractRuleConsumer.java140
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageAbstractTerminalConsumer.java167
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageAbstractTokenConsumer.java301
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageActionConsumer.java495
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageAlternativesConsumer.java219
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageAssignmentConsumer.java303
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageCharacterRangeConsumer.java226
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageCrossReferenceConsumer.java287
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageGeneratedMetamodelConsumer.java304
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageGrammarConsumer.java816
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageGrammarIDConsumer.java185
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageGroupConsumer.java186
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageIDConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageINTConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageKeywordConsumer.java71
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageLexerRuleConsumer.java431
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageML_COMMENTConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageNegatedTokenConsumer.java132
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageParenthesizedElementConsumer.java150
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageParenthesizedTerminalElementConsumer.java150
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageParserRuleConsumer.java701
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageReferencedMetamodelConsumer.java259
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageRuleCallConsumer.java71
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageSL_COMMENTConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageSTRINGConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageTerminalAlternativesConsumer.java219
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageTerminalGroupConsumer.java186
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageTerminalRuleConsumer.java382
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageTerminalTokenConsumer.java224
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageTerminalTokenElementConsumer.java198
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageTypeRefConsumer.java221
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageUpToTokenConsumer.java132
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageWSConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageWildcardConsumer.java69
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/formatter/parser/packrat/FormatterTestLanguageDelimiters.java7
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/formatter/parser/packrat/FormatterTestLanguageParserConfiguration.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/formatter/parser/packrat/consumers/FormatterTestLanguageLineConsumer.java185
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/formatter/parser/packrat/consumers/FormatterTestLanguageRootConsumer.java176
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/formatter/parser/packrat/consumers/FormatterTestLanguageTestIndentationConsumer.java281
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/formatter/parser/packrat/consumers/FormatterTestLanguageTestLinewrapConsumer.java134
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/ComplexReconstrTestLanguageDelimiters.java9
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/ComplexReconstrTestLanguageParserConfiguration.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/SimpleReconstrTestLanguageDelimiters.java9
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/SimpleReconstrTestLanguageParserConfiguration.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageAtomConsumer.java71
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageOpConsumer.java380
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageParensConsumer.java203
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageRootConsumer.java111
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTermConsumer.java111
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyA1Consumer.java71
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyAConsumer.java433
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyBConsumer.java276
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyCConsumer.java416
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyDConsumer.java465
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyEConsumer.java433
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyFConsumer.java344
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyG1Consumer.java314
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyG2Consumer.java129
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyGConsumer.java132
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageAtomConsumer.java71
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageBooleanConsumer.java221
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageManyStringsConsumer.java185
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageOpConsumer.java186
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageParensConsumer.java203
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageRef2Consumer.java215
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageSpareConsumer.java249
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageTermConsumer.java279
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageTwoNumbersConsumer.java267
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageTypeConsumer.java217
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/transientvalues/parser/packrat/TransientValuesTestDelimiters.java8
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/transientvalues/parser/packrat/TransientValuesTestParserConfiguration.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/transientvalues/parser/packrat/consumers/TransientValuesTestRootConsumer.java205
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/transientvalues/parser/packrat/consumers/TransientValuesTestTestListConsumer.java136
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/transientvalues/parser/packrat/consumers/TransientValuesTestTestOptionalConsumer.java261
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/transientvalues/parser/packrat/consumers/TransientValuesTestTestRequiredConsumer.java183
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/resource/metamodel/parser/packrat/MultiValueFeatureTestLanguageDelimiters.java5
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/resource/metamodel/parser/packrat/MultiValueFeatureTestLanguageParserConfiguration.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/resource/metamodel/parser/packrat/consumers/MultiValueFeatureTestLanguageStartConsumer.java95
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/ActionTestLanguageDelimiters.java5
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/ActionTestLanguageParserConfiguration.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/ContentAssistTestLanguageDelimiters.java7
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/ContentAssistTestLanguageParserConfiguration.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/FowlerDslTestLanguageDelimiters.java7
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/FowlerDslTestLanguageParserConfiguration.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/LexerTestLanguageDelimiters.java5
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/LexerTestLanguageParserConfiguration.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/LookaheadTestLanguageDelimiters.java5
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/LookaheadTestLanguageParserConfiguration.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/OptionalEmptyTestLanguageDelimiters.java5
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/OptionalEmptyTestLanguageParserConfiguration.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/PartialParserTestLanguageDelimiters.java7
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/PartialParserTestLanguageParserConfiguration.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/ReferenceGrammarTestLanguageDelimiters.java9
-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/SimpleExpressionsTestLanguageDelimiters.java6
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/SimpleExpressionsTestLanguageParserConfiguration.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/TestLanguageDelimiters.java7
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/TestLanguageParserConfiguration.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/TreeTestLanguageDelimiters.java6
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/TreeTestLanguageParserConfiguration.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ActionTestLanguageElementConsumer.java153
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ActionTestLanguageItemConsumer.java128
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ActionTestLanguageModelConsumer.java71
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ContentAssistTestLanguageAbstractRuleCallConsumer.java71
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ContentAssistTestLanguageAbstractRuleConsumer.java111
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ContentAssistTestLanguageFirstAbstractRuleChildConsumer.java274
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ContentAssistTestLanguageSecondAbstractRuleChildConsumer.java250
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ContentAssistTestLanguageStartConsumer.java191
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/FowlerDslTestLanguageCommandConsumer.java150
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/FowlerDslTestLanguageEventConsumer.java204
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/FowlerDslTestLanguageStateConsumer.java428
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/FowlerDslTestLanguageStatemachineConsumer.java331
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/FowlerDslTestLanguageTransitionConsumer.java183
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LexerTestLanguageElementConsumer.java152
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LexerTestLanguageModelConsumer.java71
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LookaheadTestLanguageAltsConsumer.java140
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LookaheadTestLanguageEntryConsumer.java71
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LookaheadTestLanguageLookAhead0Consumer.java132
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LookaheadTestLanguageLookAhead1Consumer.java230
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LookaheadTestLanguageLookAhead2Consumer.java211
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LookaheadTestLanguageLookAhead3Consumer.java214
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LookaheadTestLanguageLookAhead4Consumer.java144
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/OptionalEmptyTestLanguageGreetingConsumer.java134
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/OptionalEmptyTestLanguageModelConsumer.java74
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageAbstractChildConsumer.java111
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageAbstractChildrenConsumer.java224
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageChildConsumer.java233
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageChildrenConsumer.java311
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageContentConsumer.java111
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageFirstConcreteConsumer.java289
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageNamedConsumer.java71
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageNestedConsumer.java224
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageSecondConcreteConsumer.java322
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageSomeContainerConsumer.java327
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageErwachsenerConsumer.java253
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageFamilieConsumer.java558
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageFarbeConsumer.java175
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageKindConsumer.java253
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguagePersonConsumer.java111
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageSpielplatzConsumer.java484
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageSpielzeugConsumer.java250
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/SimpleExpressionsTestLanguageAdditionConsumer.java324
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/SimpleExpressionsTestLanguageAtomConsumer.java71
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/SimpleExpressionsTestLanguageMultiplicationConsumer.java324
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/SimpleExpressionsTestLanguageParensConsumer.java150
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/SimpleExpressionsTestLanguageSequenceConsumer.java186
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/SimpleExpressionsTestLanguageTermConsumer.java111
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/TestLanguageAbstractRuleConsumer.java111
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/TestLanguageChoiceRuleConsumer.java188
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/TestLanguageEntryRuleConsumer.java71
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/TestLanguageReducibleRuleConsumer.java226
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/TestLanguageTerminalRuleConsumer.java71
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/TreeTestLanguageModelConsumer.java71
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/TreeTestLanguageNodeConsumer.java336
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/parser/packrat/Bug250313Delimiters.java9
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/parser/packrat/Bug250313ParserConfiguration.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/parser/packrat/consumers/Bug250313Child1Consumer.java71
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/parser/packrat/consumers/Bug250313Child2Consumer.java71
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/parser/packrat/consumers/Bug250313ChildConsumer.java111
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/parser/packrat/consumers/Bug250313DatatypeConsumer.java152
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/parser/packrat/consumers/Bug250313ModelConsumer.java1471
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/parser/packrat/consumers/Bug250313NestedDatatypeConsumer.java154
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/epatch/EpatchComparingTest.java5
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/GenXtextGrammarTestLanguageScopeProvider.ext34
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/AbstractTestLanguageDelimiters.java7
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/AbstractTestLanguageParserConfiguration.java4
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/AbstractTestLanguageAbstractCallExtendedParserRuleConsumer.java134
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/AbstractTestLanguageAbstractCallOverridenParserRuleConsumer.java134
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/AbstractTestLanguageExtendableParserRuleConsumer.java134
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/AbstractTestLanguageInheritedParserRuleConsumer.java134
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/AbstractTestLanguageOverridableParserRule2Consumer.java134
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/AbstractTestLanguageOverridableParserRuleConsumer.java134
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/parser/keywords/parser/packrat/KeywordsTestLanguageDelimiters.java7
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/parser/keywords/parser/packrat/KeywordsTestLanguageParserConfiguration.java4
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/parser/keywords/parser/packrat/consumers/KeywordsTestLanguageModelConsumer.java238
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/parser/packrat/XtextGrammarTestLanguageDelimiters.java9
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/parser/packrat/XtextGrammarTestLanguageParserConfiguration.java4
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAbstractMetamodelDeclarationConsumer.java111
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAbstractNegatedTokenConsumer.java111
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAbstractRuleConsumer.java140
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAbstractTerminalConsumer.java167
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAbstractTokenConsumer.java301
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageActionConsumer.java495
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAlternativesConsumer.java219
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAssignmentConsumer.java303
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageCharacterRangeConsumer.java226
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageCrossReferenceConsumer.java287
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageGeneratedMetamodelConsumer.java304
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageGrammarConsumer.java816
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageGrammarIDConsumer.java185
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageGroupConsumer.java186
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageKeywordConsumer.java71
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageLexerRuleConsumer.java431
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageNegatedTokenConsumer.java132
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageParenthesizedElementConsumer.java150
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageParenthesizedTerminalElementConsumer.java150
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageParserRuleConsumer.java701
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageReferencedMetamodelConsumer.java259
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageRuleCallConsumer.java71
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTerminalAlternativesConsumer.java219
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTerminalGroupConsumer.java186
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTerminalRuleConsumer.java382
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTerminalTokenConsumer.java224
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTerminalTokenElementConsumer.java198
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTypeRefConsumer.java221
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageUpToTokenConsumer.java132
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageWildcardConsumer.java69
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/testlanguages/GenReferenceGrammarTestLanguageScopeProvider.ext8
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/ContentAssistTestLanguageDelimiters.java7
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/ContentAssistTestLanguageParserConfiguration.java4
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/ReferenceGrammarTestLanguageDelimiters.java9
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/ReferenceGrammarTestLanguageParserConfiguration.java4
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/TreeTestLanguageDelimiters.java6
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/TreeTestLanguageParserConfiguration.java4
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ContentAssistTestLanguageAbstractRuleCallConsumer.java71
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ContentAssistTestLanguageAbstractRuleConsumer.java111
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ContentAssistTestLanguageFirstAbstractRuleChildConsumer.java274
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ContentAssistTestLanguageSecondAbstractRuleChildConsumer.java250
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ContentAssistTestLanguageStartConsumer.java191
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageErwachsenerConsumer.java253
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageFamilieConsumer.java558
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageFarbeConsumer.java175
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageKindConsumer.java253
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguagePersonConsumer.java111
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageSpielplatzConsumer.java484
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageSpielzeugConsumer.java250
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/TreeTestLanguageModelConsumer.java71
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/TreeTestLanguageNodeConsumer.java336
-rw-r--r--tests/org.eclipse.xtext.ui.integration.tests/src-gen/org/eclipse/xtext/ui/integration/parser/packrat/TestLanguageDelimiters.java5
-rw-r--r--tests/org.eclipse.xtext.ui.integration.tests/src-gen/org/eclipse/xtext/ui/integration/parser/packrat/TestLanguageParserConfiguration.java4
-rw-r--r--tests/org.eclipse.xtext.ui.integration.tests/src-gen/org/eclipse/xtext/ui/integration/parser/packrat/consumers/TestLanguageFileConsumer.java71
-rw-r--r--tests/org.eclipse.xtext.ui.integration.tests/src-gen/org/eclipse/xtext/ui/integration/parser/packrat/consumers/TestLanguageStuffConsumer.java134
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/GenXtextGrammarTestLanguageScopeProvider.ext42
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/parser/keywords/parser/packrat/KeywordsTestLanguageDelimiters.java7
-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/keywords/parser/packrat/consumers/KeywordsTestLanguageModelConsumer.java238
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/parser/packrat/XtextGrammarTestLanguageDelimiters.java9
-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/parser/packrat/consumers/XtextGrammarTestLanguageAbstractMetamodelDeclarationConsumer.java111
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAbstractNegatedTokenConsumer.java111
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAbstractRuleConsumer.java140
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAbstractTerminalConsumer.java167
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAbstractTokenConsumer.java301
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageActionConsumer.java495
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAlternativesConsumer.java219
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAssignmentConsumer.java303
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageCharacterRangeConsumer.java226
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageCrossReferenceConsumer.java287
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageGeneratedMetamodelConsumer.java304
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageGrammarConsumer.java816
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageGrammarIDConsumer.java185
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageGroupConsumer.java186
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageKeywordConsumer.java71
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageLexerRuleConsumer.java431
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageNegatedTokenConsumer.java132
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageParenthesizedElementConsumer.java150
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageParenthesizedTerminalElementConsumer.java150
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageParserRuleConsumer.java701
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageReferencedMetamodelConsumer.java259
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageRuleCallConsumer.java71
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTerminalAlternativesConsumer.java219
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTerminalGroupConsumer.java186
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTerminalRuleConsumer.java382
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTerminalTokenConsumer.java224
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTerminalTokenElementConsumer.java198
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTypeRefConsumer.java221
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageUpToTokenConsumer.java132
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageWildcardConsumer.java69
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/GenReferenceGrammarTestLanguageScopeProvider.ext12
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/ContentAssistTestLanguageDelimiters.java7
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/ContentAssistTestLanguageParserConfiguration.java4
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/ReferenceGrammarTestLanguageDelimiters.java9
-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/TreeTestLanguageDelimiters.java6
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/TreeTestLanguageParserConfiguration.java4
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ContentAssistTestLanguageAbstractRuleCallConsumer.java71
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ContentAssistTestLanguageAbstractRuleConsumer.java111
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ContentAssistTestLanguageFirstAbstractRuleChildConsumer.java274
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ContentAssistTestLanguageSecondAbstractRuleChildConsumer.java250
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ContentAssistTestLanguageStartConsumer.java191
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageErwachsenerConsumer.java253
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageFamilieConsumer.java558
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageFarbeConsumer.java175
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageKindConsumer.java253
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguagePersonConsumer.java111
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageSpielplatzConsumer.java484
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageSpielzeugConsumer.java250
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/TreeTestLanguageModelConsumer.java71
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/TreeTestLanguageNodeConsumer.java336
505 files changed, 46534 insertions, 47656 deletions
diff --git a/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/ReferenceGrammarDelimiters.java b/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/ReferenceGrammarDelimiters.java
index e0b00ff..bee6094 100644
--- a/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/ReferenceGrammarDelimiters.java
+++ b/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/ReferenceGrammarDelimiters.java
@@ -7,26 +7,25 @@ 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 ReferenceGrammarDelimiters {
private ReferenceGrammarDelimiters() {
throw new UnsupportedOperationException("Utility classes may not be initialized");
}
- public static ICharacterClass keyword$14$Delimiter = ICharacterClass.Factory.nullClass();
+ public static final ICharacterClass keyword$14$Delimiter = ICharacterClass.Factory.nullClass();
// TODO: remove hardcoded character class from template
- public static ICharacterClass keyword$9$Delimiter = ICharacterClass.Factory.join(
+ public static final ICharacterClass keyword$9$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$11$Delimiter = ISequenceMatcher.Factory.nullMatcher();
+ public static final ISequenceMatcher ruleCall$11$Delimiter = ISequenceMatcher.Factory.nullMatcher();
- public static ISequenceMatcher ruleCall$44$Delimiter = new SetBasedKeywordMatcher(
+ public static final ISequenceMatcher ruleCall$44$Delimiter = new SetBasedKeywordMatcher(
"spielplatz", "kind", "erwachsener", "spielzeug", "familie", "keyword", "ROT", "BLAU", "GELB", "GRÜN", "type");
}
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 b747cc4..609f995 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
@@ -5,7 +5,6 @@ package org.eclipse.xtext.reference.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.reference.services.ReferenceGrammarGrammarAccess;
@@ -27,10 +26,9 @@ import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinSL_COMMENT
import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinWSConsumer;
import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinANY_OTHERConsumer;
-@SuppressWarnings("unused")
public class ReferenceGrammarParserConfiguration extends AbstractParserConfiguration {
- private XtextBuiltinParserConfiguration xtextBuiltinConfiguration;
+ private final XtextBuiltinParserConfiguration xtextBuiltinConfiguration;
private ReferenceGrammarSpielplatzConsumer spielplatzConsumer;
private ReferenceGrammarPersonConsumer personConsumer;
diff --git a/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarCustomTypeParserRuleConsumer.java b/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarCustomTypeParserRuleConsumer.java
index da919f3..9a49205 100644
--- a/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarCustomTypeParserRuleConsumer.java
+++ b/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarCustomTypeParserRuleConsumer.java
@@ -4,103 +4,98 @@
package org.eclipse.xtext.reference.parser.packrat.consumers;
import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.AbstractRule;
+import org.eclipse.xtext.Assignment;
+import org.eclipse.xtext.Group;
+import org.eclipse.xtext.Keyword;
+import org.eclipse.xtext.RuleCall;
-import org.eclipse.xtext.parser.packrat.IMarkerFactory.IMarker;
+import org.eclipse.xtext.parser.packrat.consumers.IElementConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.INonTerminalConsumerConfiguration;
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.reference.services.ReferenceGrammarGrammarAccess.CustomTypeParserRuleElements;
-import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinIDConsumer;
-
-@SuppressWarnings("unused")
public final class ReferenceGrammarCustomTypeParserRuleConsumer extends NonTerminalConsumer {
- private CustomTypeParserRuleElements rule;
-
+ private CustomTypeParserRuleElements rule;
+
private ITerminalConsumer idConsumer;
+ private IElementConsumer group$1$Consumer;
+
+ private IElementConsumer keyword$2$Consumer;
+
+ private IElementConsumer assignment$3$Consumer;
+
+ private IElementConsumer ruleCall$4$Consumer;
+
private ICharacterClass keyword$2$Delimiter;
-
+
private ISequenceMatcher ruleCall$4$Delimiter;
-
- public ReferenceGrammarCustomTypeParserRuleConsumer(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 {
- int result = doConsumeGroup$1(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeGroup$1(nextEntryPoint());
+ protected class Group$1$Consumer extends GroupConsumer {
+
+ protected Group$1$Consumer(final Group group) {
+ super(group);
}
- return result;
- }
-
- protected int doConsumeGroup$1(int entryPoint) throws Exception {
- final GroupResult result = createGroupResult(getRule().eleGroup());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$2(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele0KeywordType());
- return result.getResult();
- }
- case 1:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$3(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele1AssignmentName());
- return result.getResult();
- }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(keyword$2$Consumer);
+ acceptor.accept(assignment$3$Consumer);
}
- return result.getResult();
}
- protected int consumeKeyword$2(int entryPoint) throws Exception {
- int result = doConsumeKeyword$2(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$2(nextEntryPoint());
+ protected class Keyword$2$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$2$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$2$Delimiter());
}
- return result;
}
- protected int doConsumeKeyword$2(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele0KeywordType(), null, false, false, getKeyword$2$Delimiter());
+ protected class Assignment$3$Consumer extends AssignmentConsumer {
+
+ protected Assignment$3$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$4$Consumer;
+ }
}
- protected int consumeAssignment$3(int entryPoint) throws Exception {
- int result = doConsumeAssignment$3(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$3(nextEntryPoint());
+ protected class RuleCall$4$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$4$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeTerminal(idConsumer, "name", false, false, getElement(), getRuleCall$4$Delimiter());
}
- return result;
}
- protected int doConsumeAssignment$3(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele1AssignmentName());
- return result.getResult(consumeRuleCall$4(entryPoint));
+ public ReferenceGrammarCustomTypeParserRuleConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
+ super(configuration, hiddenTokens);
+ keyword$2$Delimiter = ICharacterClass.Factory.nullClass();
+ ruleCall$4$Delimiter = ISequenceMatcher.Factory.nullMatcher();
}
-
- protected int consumeRuleCall$4(int entryPoint) throws Exception {
- return consumeTerminal(idConsumer, "name", false, false, getRule().ele10LexerRuleCallID(), getRuleCall$4$Delimiter());
+
+ @Override
+ protected int doConsume() throws Exception {
+ return group$1$Consumer.consume();
}
public CustomTypeParserRuleElements getRule() {
@@ -109,6 +104,11 @@ public final class ReferenceGrammarCustomTypeParserRuleConsumer extends NonTermi
public void setRule(CustomTypeParserRuleElements rule) {
this.rule = rule;
+
+ group$1$Consumer = new Group$1$Consumer(rule.eleGroup());
+ keyword$2$Consumer = new Keyword$2$Consumer(rule.ele0KeywordType());
+ assignment$3$Consumer = new Assignment$3$Consumer(rule.ele1AssignmentName());
+ ruleCall$4$Consumer = new RuleCall$4$Consumer(rule.ele10LexerRuleCallID());
}
@Override
diff --git a/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarErwachsenerConsumer.java b/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarErwachsenerConsumer.java
index 1cddab9..02c9ba4 100644
--- a/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarErwachsenerConsumer.java
+++ b/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarErwachsenerConsumer.java
@@ -4,176 +4,168 @@
package org.eclipse.xtext.reference.parser.packrat.consumers;
import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.AbstractRule;
+import org.eclipse.xtext.Assignment;
+import org.eclipse.xtext.Group;
+import org.eclipse.xtext.Keyword;
+import org.eclipse.xtext.RuleCall;
-import org.eclipse.xtext.parser.packrat.IMarkerFactory.IMarker;
+import org.eclipse.xtext.parser.packrat.consumers.IElementConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.INonTerminalConsumerConfiguration;
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.reference.services.ReferenceGrammarGrammarAccess.ErwachsenerElements;
-import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinIDConsumer;
-import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinINTConsumer;
-
-@SuppressWarnings("unused")
public final class ReferenceGrammarErwachsenerConsumer extends NonTerminalConsumer {
- private ErwachsenerElements rule;
-
+ private ErwachsenerElements rule;
+
private ITerminalConsumer idConsumer;
+
private ITerminalConsumer intConsumer;
+ private IElementConsumer group$1$Consumer;
+
+ private IElementConsumer keyword$5$Consumer;
+
+ private IElementConsumer keyword$6$Consumer;
+
+ private IElementConsumer assignment$7$Consumer;
+
+ private IElementConsumer ruleCall$8$Consumer;
+
+ private IElementConsumer assignment$9$Consumer;
+
+ private IElementConsumer ruleCall$10$Consumer;
+
+ private IElementConsumer keyword$11$Consumer;
+
private ICharacterClass keyword$5$Delimiter;
-
+
private ICharacterClass keyword$6$Delimiter;
-
+
private ICharacterClass keyword$11$Delimiter;
-
+
private ISequenceMatcher ruleCall$8$Delimiter;
-
+
private ISequenceMatcher ruleCall$10$Delimiter;
-
- public ReferenceGrammarErwachsenerConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
- super(configuration, hiddenTokens);
- keyword$5$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$6$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$11$Delimiter = ICharacterClass.Factory.nullClass();
- ruleCall$8$Delimiter = ISequenceMatcher.Factory.nullMatcher();
- ruleCall$10$Delimiter = ISequenceMatcher.Factory.nullMatcher();
- }
-
- @Override
- protected int doConsume(int entryPoint) throws Exception {
- return consumeGroup$1(entryPoint);
- }
- protected int consumeGroup$1(int entryPoint) throws Exception {
- int result = doConsumeGroup$1(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeGroup$1(nextEntryPoint());
+ protected class Group$1$Consumer extends GroupConsumer {
+
+ protected Group$1$Consumer(final Group group) {
+ super(group);
}
- return result;
- }
-
- protected int doConsumeGroup$1(int entryPoint) throws Exception {
- final GroupResult result = createGroupResult(getRule().eleGroup());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$5(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele0000KeywordErwachsener());
- return result.getResult();
- }
- case 1:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$6(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele0001KeywordLeftParenthesis());
- return result.getResult();
- }
- case 2:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$7(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele001AssignmentName());
- return result.getResult();
- }
- case 3:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$9(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele01AssignmentAge());
- return result.getResult();
- }
- case 4:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$11(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele1KeywordRightParenthesis());
- return result.getResult();
- }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(keyword$5$Consumer);
+ acceptor.accept(keyword$6$Consumer);
+ acceptor.accept(assignment$7$Consumer);
+ acceptor.accept(assignment$9$Consumer);
+ acceptor.accept(keyword$11$Consumer);
}
- return result.getResult();
}
- protected int consumeKeyword$5(int entryPoint) throws Exception {
- int result = doConsumeKeyword$5(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$5(nextEntryPoint());
+ protected class Keyword$5$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$5$Consumer(final Keyword keyword) {
+ super(keyword);
}
- return result;
- }
-
- protected int doConsumeKeyword$5(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele0000KeywordErwachsener(), null, false, false, getKeyword$5$Delimiter());
- }
-
- protected int consumeKeyword$6(int entryPoint) throws Exception {
- int result = doConsumeKeyword$6(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$6(nextEntryPoint());
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$5$Delimiter());
}
- return result;
}
- protected int doConsumeKeyword$6(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele0001KeywordLeftParenthesis(), null, false, false, getKeyword$6$Delimiter());
- }
-
- protected int consumeAssignment$7(int entryPoint) throws Exception {
- int result = doConsumeAssignment$7(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$7(nextEntryPoint());
+ protected class Keyword$6$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$6$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$6$Delimiter());
}
- return result;
- }
-
- protected int doConsumeAssignment$7(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele001AssignmentName());
- return result.getResult(consumeRuleCall$8(entryPoint));
}
- protected int consumeRuleCall$8(int entryPoint) throws Exception {
- return consumeTerminal(idConsumer, "name", false, false, getRule().ele0010LexerRuleCallID(), getRuleCall$8$Delimiter());
+ protected class Assignment$7$Consumer extends AssignmentConsumer {
+
+ protected Assignment$7$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$8$Consumer;
+ }
}
- protected int consumeAssignment$9(int entryPoint) throws Exception {
- int result = doConsumeAssignment$9(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$9(nextEntryPoint());
+ protected class RuleCall$8$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$8$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeTerminal(idConsumer, "name", false, false, getElement(), getRuleCall$8$Delimiter());
}
- return result;
}
- protected int doConsumeAssignment$9(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele01AssignmentAge());
- return result.getResult(consumeRuleCall$10(entryPoint));
+ protected class Assignment$9$Consumer extends AssignmentConsumer {
+
+ protected Assignment$9$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$10$Consumer;
+ }
}
- protected int consumeRuleCall$10(int entryPoint) throws Exception {
- return consumeTerminal(intConsumer, "age", false, false, getRule().ele010LexerRuleCallINT(), getRuleCall$10$Delimiter());
+ protected class RuleCall$10$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$10$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeTerminal(intConsumer, "age", false, false, getElement(), getRuleCall$10$Delimiter());
+ }
}
- protected int consumeKeyword$11(int entryPoint) throws Exception {
- int result = doConsumeKeyword$11(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$11(nextEntryPoint());
+ protected class Keyword$11$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$11$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$11$Delimiter());
}
- return result;
}
- protected int doConsumeKeyword$11(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele1KeywordRightParenthesis(), null, false, false, getKeyword$11$Delimiter());
+ public ReferenceGrammarErwachsenerConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
+ super(configuration, hiddenTokens);
+ keyword$5$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$6$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$11$Delimiter = ICharacterClass.Factory.nullClass();
+ ruleCall$8$Delimiter = ISequenceMatcher.Factory.nullMatcher();
+ ruleCall$10$Delimiter = ISequenceMatcher.Factory.nullMatcher();
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return group$1$Consumer.consume();
}
public ErwachsenerElements getRule() {
@@ -182,6 +174,15 @@ public final class ReferenceGrammarErwachsenerConsumer extends NonTerminalConsum
public void setRule(ErwachsenerElements rule) {
this.rule = rule;
+
+ group$1$Consumer = new Group$1$Consumer(rule.eleGroup());
+ keyword$5$Consumer = new Keyword$5$Consumer(rule.ele0000KeywordErwachsener());
+ keyword$6$Consumer = new Keyword$6$Consumer(rule.ele0001KeywordLeftParenthesis());
+ assignment$7$Consumer = new Assignment$7$Consumer(rule.ele001AssignmentName());
+ ruleCall$8$Consumer = new RuleCall$8$Consumer(rule.ele0010LexerRuleCallID());
+ assignment$9$Consumer = new Assignment$9$Consumer(rule.ele01AssignmentAge());
+ ruleCall$10$Consumer = new RuleCall$10$Consumer(rule.ele010LexerRuleCallINT());
+ keyword$11$Consumer = new Keyword$11$Consumer(rule.ele1KeywordRightParenthesis());
}
@Override
diff --git a/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarFamilieConsumer.java b/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarFamilieConsumer.java
index 048c195..b58daa2 100644
--- a/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarFamilieConsumer.java
+++ b/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarFamilieConsumer.java
@@ -4,343 +4,348 @@
package org.eclipse.xtext.reference.parser.packrat.consumers;
import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.AbstractRule;
-
-import org.eclipse.xtext.parser.packrat.IMarkerFactory.IMarker;
+import org.eclipse.xtext.Alternatives;
+import org.eclipse.xtext.Assignment;
+import org.eclipse.xtext.CrossReference;
+import org.eclipse.xtext.Group;
+import org.eclipse.xtext.Keyword;
+import org.eclipse.xtext.RuleCall;
+
+import org.eclipse.xtext.parser.packrat.consumers.IElementConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.INonTerminalConsumerConfiguration;
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.reference.services.ReferenceGrammarGrammarAccess.FamilieElements;
-import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinIDConsumer;
-import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinSTRINGConsumer;
-
-@SuppressWarnings("unused")
public final class ReferenceGrammarFamilieConsumer extends NonTerminalConsumer {
- private FamilieElements rule;
-
+ private FamilieElements rule;
+
private ITerminalConsumer idConsumer;
+
private ITerminalConsumer stringConsumer;
+ private IElementConsumer group$1$Consumer;
+
+ private IElementConsumer keyword$8$Consumer;
+
+ private IElementConsumer keyword$9$Consumer;
+
+ private IElementConsumer assignment$10$Consumer;
+
+ private IElementConsumer alternatives$11$Consumer;
+
+ private IElementConsumer keyword$13$Consumer;
+
+ private IElementConsumer ruleCall$14$Consumer;
+
+ private IElementConsumer ruleCall$15$Consumer;
+
+ private IElementConsumer assignment$16$Consumer;
+
+ private IElementConsumer crossReference$17$Consumer;
+
+ private IElementConsumer assignment$19$Consumer;
+
+ private IElementConsumer crossReference$20$Consumer;
+
+ private IElementConsumer assignment$22$Consumer;
+
+ private IElementConsumer crossReference$23$Consumer;
+
+ private IElementConsumer group$25$Consumer;
+
+ private IElementConsumer keyword$26$Consumer;
+
+ private IElementConsumer assignment$27$Consumer;
+
+ private IElementConsumer crossReference$28$Consumer;
+
+ private IElementConsumer keyword$30$Consumer;
+
private ISequenceMatcher crossReference$28$Delimiter;
-
+
private ISequenceMatcher crossReference$17$Delimiter;
-
+
private ISequenceMatcher crossReference$20$Delimiter;
-
+
private ISequenceMatcher crossReference$23$Delimiter;
-
+
private ICharacterClass keyword$26$Delimiter;
-
+
private ICharacterClass keyword$30$Delimiter;
-
+
private ICharacterClass keyword$8$Delimiter;
-
+
private ICharacterClass keyword$9$Delimiter;
-
+
private ICharacterClass keyword$13$Delimiter;
-
+
private ISequenceMatcher ruleCall$14$Delimiter;
-
- private ISequenceMatcher ruleCall$15$Delimiter;
-
- public ReferenceGrammarFamilieConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
- super(configuration, hiddenTokens);
- crossReference$28$Delimiter = ISequenceMatcher.Factory.nullMatcher();
- crossReference$17$Delimiter = ISequenceMatcher.Factory.nullMatcher();
- crossReference$20$Delimiter = ISequenceMatcher.Factory.nullMatcher();
- crossReference$23$Delimiter = ISequenceMatcher.Factory.nullMatcher();
- keyword$26$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$30$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$8$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$9$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$13$Delimiter = ICharacterClass.Factory.nullClass();
- ruleCall$14$Delimiter = ISequenceMatcher.Factory.nullMatcher();
- ruleCall$15$Delimiter = ISequenceMatcher.Factory.nullMatcher();
- }
-
- @Override
- protected int doConsume(int entryPoint) throws Exception {
- return consumeGroup$1(entryPoint);
- }
-
- protected int consumeGroup$1(int entryPoint) throws Exception {
- int result = doConsumeGroup$1(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeGroup$1(nextEntryPoint());
- }
- return result;
- }
-
- protected int doConsumeGroup$1(int entryPoint) throws Exception {
- final GroupResult result = createGroupResult(getRule().eleGroup());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$8(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele0000000KeywordFamilie());
- return result.getResult();
- }
- case 1:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$9(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele0000001KeywordLeftParenthesis());
- return result.getResult();
- }
- case 2:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$10(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele000001AssignmentName());
- return result.getResult();
- }
- case 3:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$16(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele00001AssignmentMutter());
- return result.getResult();
- }
- case 4:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$19(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele0001AssignmentVater());
- return result.getResult();
- }
- case 5:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$22(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele001AssignmentKinder());
- return result.getResult();
- }
- case 6:
- result.nextStep();
- if (result.didGroupFail(consumeGroup$25(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele01Group());
- return result.getResult();
- }
- case 7:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$30(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele1KeywordRightParenthesis());
- return result.getResult();
- }
- }
- return result.getResult();
- }
-
- protected int consumeKeyword$8(int entryPoint) throws Exception {
- int result = doConsumeKeyword$8(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$8(nextEntryPoint());
- }
- return result;
- }
-
- protected int doConsumeKeyword$8(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele0000000KeywordFamilie(), null, false, false, getKeyword$8$Delimiter());
- }
-
- protected int consumeKeyword$9(int entryPoint) throws Exception {
- int result = doConsumeKeyword$9(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$9(nextEntryPoint());
- }
- return result;
- }
-
- protected int doConsumeKeyword$9(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele0000001KeywordLeftParenthesis(), null, false, false, getKeyword$9$Delimiter());
- }
-
- protected int consumeAssignment$10(int entryPoint) throws Exception {
- int result = doConsumeAssignment$10(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$10(nextEntryPoint());
- }
- return result;
- }
-
- protected int doConsumeAssignment$10(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele000001AssignmentName());
- return result.getResult(consumeAlternatives$11(entryPoint));
- }
- protected int consumeAlternatives$11(int entryPoint) throws Exception {
- AlternativesResult result = createAlternativesResult();
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextAlternative();
- if (result.isAlternativeDone(consumeKeyword$13(nextEntryPoint()))) {
- return result.getResult();
- }
- case 1:
- result.nextAlternative();
- if (result.isAlternativeDone(consumeRuleCall$14(nextEntryPoint()))) {
- return result.getResult();
- }
- case 2:
- result.nextAlternative();
- if (result.isAlternativeDone(consumeRuleCall$15(nextEntryPoint()))) {
- return result.getResult();
- }
- }
- return result.getResult();
- }
-
- protected int consumeKeyword$13(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele000001000KeywordKeyword(), "name", false, false, getKeyword$13$Delimiter());
- }
+ private ISequenceMatcher ruleCall$15$Delimiter;
- protected int consumeRuleCall$14(int entryPoint) throws Exception {
- return consumeTerminal(stringConsumer, "name", false, false, getRule().ele000001001LexerRuleCallSTRING(), getRuleCall$14$Delimiter());
+ protected class Group$1$Consumer extends GroupConsumer {
+
+ protected Group$1$Consumer(final Group group) {
+ super(group);
+ }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(keyword$8$Consumer);
+ acceptor.accept(keyword$9$Consumer);
+ acceptor.accept(assignment$10$Consumer);
+ acceptor.accept(assignment$16$Consumer);
+ acceptor.accept(assignment$19$Consumer);
+ acceptor.accept(assignment$22$Consumer);
+ acceptor.accept(group$25$Consumer);
+ acceptor.accept(keyword$30$Consumer);
+ }
}
- protected int consumeRuleCall$15(int entryPoint) throws Exception {
- return consumeTerminal(idConsumer, "name", false, false, getRule().ele00000101LexerRuleCallID(), getRuleCall$15$Delimiter());
+ protected class Keyword$8$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$8$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$8$Delimiter());
+ }
}
- protected int consumeAssignment$16(int entryPoint) throws Exception {
- int result = doConsumeAssignment$16(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$16(nextEntryPoint());
+ protected class Keyword$9$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$9$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$9$Delimiter());
}
- return result;
}
- protected int doConsumeAssignment$16(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele00001AssignmentMutter());
- return result.getResult(consumeCrossReference$17(entryPoint));
+ protected class Assignment$10$Consumer extends AssignmentConsumer {
+
+ protected Assignment$10$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return alternatives$11$Consumer;
+ }
}
- protected int consumeCrossReference$17(int entryPoint) throws Exception {
- return consumeTerminal(idConsumer, "mutter", false, false, getRule().ele000010CrossReferenceEStringErwachsener(), getCrossReference$17$Delimiter());
+ protected class Alternatives$11$Consumer extends AlternativesConsumer {
+
+ protected Alternatives$11$Consumer(final Alternatives alternatives) {
+ super(alternatives);
+ }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(keyword$13$Consumer);
+ acceptor.accept(ruleCall$14$Consumer);
+ acceptor.accept(ruleCall$15$Consumer);
+ }
}
- protected int consumeAssignment$19(int entryPoint) throws Exception {
- int result = doConsumeAssignment$19(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$19(nextEntryPoint());
+ protected class Keyword$13$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$13$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), "name", false, false, getKeyword$13$Delimiter());
}
- return result;
}
- protected int doConsumeAssignment$19(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele0001AssignmentVater());
- return result.getResult(consumeCrossReference$20(entryPoint));
+ protected class RuleCall$14$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$14$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeTerminal(stringConsumer, "name", false, false, getElement(), getRuleCall$14$Delimiter());
+ }
}
- protected int consumeCrossReference$20(int entryPoint) throws Exception {
- return consumeTerminal(idConsumer, "vater", false, false, getRule().ele00010CrossReferenceEStringErwachsener(), getCrossReference$20$Delimiter());
+ protected class RuleCall$15$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$15$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeTerminal(idConsumer, "name", false, false, getElement(), getRuleCall$15$Delimiter());
+ }
}
- protected int consumeAssignment$22(int entryPoint) throws Exception {
- int result = doConsumeAssignment$22(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$22(nextEntryPoint());
+ protected class Assignment$16$Consumer extends AssignmentConsumer {
+
+ protected Assignment$16$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return crossReference$17$Consumer;
}
- return result;
}
- protected int doConsumeAssignment$22(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele001AssignmentKinder());
- return result.getResult(consumeCrossReference$23(entryPoint));
+ protected class CrossReference$17$Consumer extends ElementConsumer<CrossReference> {
+
+ protected CrossReference$17$Consumer(final CrossReference crossReference) {
+ super(crossReference);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeTerminal(idConsumer, "mutter", false, false, getElement(), getCrossReference$17$Delimiter());
+ }
}
- protected int consumeCrossReference$23(int entryPoint) throws Exception {
- return consumeTerminal(idConsumer, "kinder", true, false, getRule().ele0010CrossReferenceEStringKind(), getCrossReference$23$Delimiter());
+ protected class Assignment$19$Consumer extends AssignmentConsumer {
+
+ protected Assignment$19$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return crossReference$20$Consumer;
+ }
}
- protected int consumeGroup$25(int entryPoint) throws Exception {
- IMarker marker = mark();
- while(doConsumeGroup$25(entryPoint) == ConsumeResult.SUCCESS) {
- marker.flush();
+ protected class CrossReference$20$Consumer extends ElementConsumer<CrossReference> {
+
+ protected CrossReference$20$Consumer(final CrossReference crossReference) {
+ super(crossReference);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeTerminal(idConsumer, "vater", false, false, getElement(), getCrossReference$20$Delimiter());
}
- marker.rollback();
- skipped(getRule().ele01Group());
- return ConsumeResult.SUCCESS;
}
- protected int doConsumeGroup$25(int entryPoint) throws Exception {
- final GroupResult result = createGroupResult(getRule().ele01Group());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$26(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele010KeywordComma());
- return result.getResult();
- }
- case 1:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$27(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele011AssignmentKinder());
- return result.getResult();
- }
+ protected class Assignment$22$Consumer extends AssignmentConsumer {
+
+ protected Assignment$22$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return crossReference$23$Consumer;
}
- return result.getResult();
}
- protected int consumeKeyword$26(int entryPoint) throws Exception {
- int result = doConsumeKeyword$26(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$26(nextEntryPoint());
+ protected class CrossReference$23$Consumer extends ElementConsumer<CrossReference> {
+
+ protected CrossReference$23$Consumer(final CrossReference crossReference) {
+ super(crossReference);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeTerminal(idConsumer, "kinder", true, false, getElement(), getCrossReference$23$Delimiter());
}
- return result;
}
- protected int doConsumeKeyword$26(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele010KeywordComma(), null, false, false, getKeyword$26$Delimiter());
+ protected class Group$25$Consumer extends LoopGroupConsumer {
+
+ protected Group$25$Consumer(final Group group) {
+ super(group);
+ }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(keyword$26$Consumer);
+ acceptor.accept(assignment$27$Consumer);
+ }
}
- protected int consumeAssignment$27(int entryPoint) throws Exception {
- int result = doConsumeAssignment$27(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$27(nextEntryPoint());
+ protected class Keyword$26$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$26$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$26$Delimiter());
}
- return result;
}
- protected int doConsumeAssignment$27(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele011AssignmentKinder());
- return result.getResult(consumeCrossReference$28(entryPoint));
+ protected class Assignment$27$Consumer extends AssignmentConsumer {
+
+ protected Assignment$27$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return crossReference$28$Consumer;
+ }
}
- protected int consumeCrossReference$28(int entryPoint) throws Exception {
- return consumeTerminal(idConsumer, "kinder", true, false, getRule().ele0110CrossReferenceEStringKind(), getCrossReference$28$Delimiter());
+ protected class CrossReference$28$Consumer extends ElementConsumer<CrossReference> {
+
+ protected CrossReference$28$Consumer(final CrossReference crossReference) {
+ super(crossReference);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeTerminal(idConsumer, "kinder", true, false, getElement(), getCrossReference$28$Delimiter());
+ }
}
- protected int consumeKeyword$30(int entryPoint) throws Exception {
- int result = doConsumeKeyword$30(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$30(nextEntryPoint());
+ protected class Keyword$30$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$30$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$30$Delimiter());
}
- return result;
}
- protected int doConsumeKeyword$30(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele1KeywordRightParenthesis(), null, false, false, getKeyword$30$Delimiter());
+ public ReferenceGrammarFamilieConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
+ super(configuration, hiddenTokens);
+ crossReference$28$Delimiter = ISequenceMatcher.Factory.nullMatcher();
+ crossReference$17$Delimiter = ISequenceMatcher.Factory.nullMatcher();
+ crossReference$20$Delimiter = ISequenceMatcher.Factory.nullMatcher();
+ crossReference$23$Delimiter = ISequenceMatcher.Factory.nullMatcher();
+ keyword$26$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$30$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$8$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$9$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$13$Delimiter = ICharacterClass.Factory.nullClass();
+ ruleCall$14$Delimiter = ISequenceMatcher.Factory.nullMatcher();
+ ruleCall$15$Delimiter = ISequenceMatcher.Factory.nullMatcher();
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return group$1$Consumer.consume();
}
public FamilieElements getRule() {
@@ -349,6 +354,29 @@ public final class ReferenceGrammarFamilieConsumer extends NonTerminalConsumer {
public void setRule(FamilieElements rule) {
this.rule = rule;
+
+ group$1$Consumer = new Group$1$Consumer(rule.eleGroup());
+ keyword$8$Consumer = new Keyword$8$Consumer(rule.ele0000000KeywordFamilie());
+ keyword$9$Consumer = new Keyword$9$Consumer(rule.ele0000001KeywordLeftParenthesis());
+ assignment$10$Consumer = new Assignment$10$Consumer(rule.ele000001AssignmentName());
+ alternatives$11$Consumer = new Alternatives$11$Consumer(rule.ele0000010Alternatives());
+ keyword$13$Consumer = new Keyword$13$Consumer(rule.ele000001000KeywordKeyword());
+ ruleCall$14$Consumer = new RuleCall$14$Consumer(rule.ele000001001LexerRuleCallSTRING());
+ ruleCall$15$Consumer = new RuleCall$15$Consumer(rule.ele00000101LexerRuleCallID());
+ keyword$13$Consumer = new Keyword$13$Consumer(rule.ele000001000KeywordKeyword());
+ ruleCall$14$Consumer = new RuleCall$14$Consumer(rule.ele000001001LexerRuleCallSTRING());
+ ruleCall$15$Consumer = new RuleCall$15$Consumer(rule.ele00000101LexerRuleCallID());
+ assignment$16$Consumer = new Assignment$16$Consumer(rule.ele00001AssignmentMutter());
+ crossReference$17$Consumer = new CrossReference$17$Consumer(rule.ele000010CrossReferenceEStringErwachsener());
+ assignment$19$Consumer = new Assignment$19$Consumer(rule.ele0001AssignmentVater());
+ crossReference$20$Consumer = new CrossReference$20$Consumer(rule.ele00010CrossReferenceEStringErwachsener());
+ assignment$22$Consumer = new Assignment$22$Consumer(rule.ele001AssignmentKinder());
+ crossReference$23$Consumer = new CrossReference$23$Consumer(rule.ele0010CrossReferenceEStringKind());
+ group$25$Consumer = new Group$25$Consumer(rule.ele01Group());
+ keyword$26$Consumer = new Keyword$26$Consumer(rule.ele010KeywordComma());
+ assignment$27$Consumer = new Assignment$27$Consumer(rule.ele011AssignmentKinder());
+ crossReference$28$Consumer = new CrossReference$28$Consumer(rule.ele0110CrossReferenceEStringKind());
+ keyword$30$Consumer = new Keyword$30$Consumer(rule.ele1KeywordRightParenthesis());
}
@Override
diff --git a/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarFarbeConsumer.java b/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarFarbeConsumer.java
index c8fe424..e340079 100644
--- a/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarFarbeConsumer.java
+++ b/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarFarbeConsumer.java
@@ -4,105 +4,130 @@
package org.eclipse.xtext.reference.parser.packrat.consumers;
import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.AbstractRule;
+import org.eclipse.xtext.Alternatives;
+import org.eclipse.xtext.Assignment;
+import org.eclipse.xtext.Keyword;
-import org.eclipse.xtext.parser.packrat.IMarkerFactory.IMarker;
+import org.eclipse.xtext.parser.packrat.consumers.IElementConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.INonTerminalConsumerConfiguration;
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.reference.services.ReferenceGrammarGrammarAccess.FarbeElements;
-
-@SuppressWarnings("unused")
public final class ReferenceGrammarFarbeConsumer extends NonTerminalConsumer {
- private FarbeElements rule;
-
+ private FarbeElements rule;
+
+ private IElementConsumer assignment$1$Consumer;
+
+ private IElementConsumer alternatives$2$Consumer;
+
+ private IElementConsumer keyword$5$Consumer;
+
+ private IElementConsumer keyword$6$Consumer;
+
+ private IElementConsumer keyword$7$Consumer;
+
+ private IElementConsumer keyword$8$Consumer;
private ICharacterClass keyword$5$Delimiter;
-
+
private ICharacterClass keyword$6$Delimiter;
-
+
private ICharacterClass keyword$7$Delimiter;
-
+
private ICharacterClass keyword$8$Delimiter;
-
- public ReferenceGrammarFarbeConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
- super(configuration, hiddenTokens);
- keyword$5$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$6$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$7$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$8$Delimiter = ICharacterClass.Factory.nullClass();
+
+ protected class Assignment$1$Consumer extends AssignmentConsumer {
+
+ protected Assignment$1$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return alternatives$2$Consumer;
+ }
}
-
- @Override
- protected int doConsume(int entryPoint) throws Exception {
- return consumeAssignment$1(entryPoint);
+
+ protected class Alternatives$2$Consumer extends AlternativesConsumer {
+
+ protected Alternatives$2$Consumer(final Alternatives alternatives) {
+ super(alternatives);
+ }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(keyword$5$Consumer);
+ acceptor.accept(keyword$6$Consumer);
+ acceptor.accept(keyword$7$Consumer);
+ acceptor.accept(keyword$8$Consumer);
+ }
}
- protected int consumeAssignment$1(int entryPoint) throws Exception {
- int result = doConsumeAssignment$1(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$1(nextEntryPoint());
+ protected class Keyword$5$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$5$Consumer(final Keyword keyword) {
+ super(keyword);
}
- return result;
- }
-
- protected int doConsumeAssignment$1(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().eleAssignmentWert());
- return result.getResult(consumeAlternatives$2(entryPoint));
- }
- protected int consumeAlternatives$2(int entryPoint) throws Exception {
- AlternativesResult result = createAlternativesResult();
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextAlternative();
- if (result.isAlternativeDone(consumeKeyword$5(nextEntryPoint()))) {
- return result.getResult();
- }
- case 1:
- result.nextAlternative();
- if (result.isAlternativeDone(consumeKeyword$6(nextEntryPoint()))) {
- return result.getResult();
- }
- case 2:
- result.nextAlternative();
- if (result.isAlternativeDone(consumeKeyword$7(nextEntryPoint()))) {
- return result.getResult();
- }
- case 3:
- result.nextAlternative();
- if (result.isAlternativeDone(consumeKeyword$8(nextEntryPoint()))) {
- return result.getResult();
- }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), "wert", false, false, getKeyword$5$Delimiter());
}
- return result.getResult();
}
-
- protected int consumeKeyword$5(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele0000KeywordROT(), "wert", false, false, getKeyword$5$Delimiter());
+ protected class Keyword$6$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$6$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), "wert", false, false, getKeyword$6$Delimiter());
+ }
}
- protected int consumeKeyword$6(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele0001KeywordBLAU(), "wert", false, false, getKeyword$6$Delimiter());
+ protected class Keyword$7$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$7$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), "wert", false, false, getKeyword$7$Delimiter());
+ }
}
- protected int consumeKeyword$7(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele001KeywordGELB(), "wert", false, false, getKeyword$7$Delimiter());
+ protected class Keyword$8$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$8$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), "wert", false, false, getKeyword$8$Delimiter());
+ }
}
- protected int consumeKeyword$8(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele01KeywordGRÜN(), "wert", false, false, getKeyword$8$Delimiter());
+ public ReferenceGrammarFarbeConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
+ super(configuration, hiddenTokens);
+ keyword$5$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$6$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$7$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$8$Delimiter = ICharacterClass.Factory.nullClass();
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return assignment$1$Consumer.consume();
}
public FarbeElements getRule() {
@@ -111,6 +136,17 @@ public final class ReferenceGrammarFarbeConsumer extends NonTerminalConsumer {
public void setRule(FarbeElements rule) {
this.rule = rule;
+
+ assignment$1$Consumer = new Assignment$1$Consumer(rule.eleAssignmentWert());
+ alternatives$2$Consumer = new Alternatives$2$Consumer(rule.ele0Alternatives());
+ keyword$5$Consumer = new Keyword$5$Consumer(rule.ele0000KeywordROT());
+ keyword$6$Consumer = new Keyword$6$Consumer(rule.ele0001KeywordBLAU());
+ keyword$7$Consumer = new Keyword$7$Consumer(rule.ele001KeywordGELB());
+ keyword$8$Consumer = new Keyword$8$Consumer(rule.ele01KeywordGRÜN());
+ keyword$5$Consumer = new Keyword$5$Consumer(rule.ele0000KeywordROT());
+ keyword$6$Consumer = new Keyword$6$Consumer(rule.ele0001KeywordBLAU());
+ keyword$7$Consumer = new Keyword$7$Consumer(rule.ele001KeywordGELB());
+ keyword$8$Consumer = new Keyword$8$Consumer(rule.ele01KeywordGRÜN());
}
@Override
diff --git a/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarKindConsumer.java b/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarKindConsumer.java
index 1a89dc8..da11523 100644
--- a/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarKindConsumer.java
+++ b/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarKindConsumer.java
@@ -4,176 +4,168 @@
package org.eclipse.xtext.reference.parser.packrat.consumers;
import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.AbstractRule;
+import org.eclipse.xtext.Assignment;
+import org.eclipse.xtext.Group;
+import org.eclipse.xtext.Keyword;
+import org.eclipse.xtext.RuleCall;
-import org.eclipse.xtext.parser.packrat.IMarkerFactory.IMarker;
+import org.eclipse.xtext.parser.packrat.consumers.IElementConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.INonTerminalConsumerConfiguration;
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.reference.services.ReferenceGrammarGrammarAccess.KindElements;
-import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinIDConsumer;
-import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinINTConsumer;
-
-@SuppressWarnings("unused")
public final class ReferenceGrammarKindConsumer extends NonTerminalConsumer {
- private KindElements rule;
-
+ private KindElements rule;
+
private ITerminalConsumer idConsumer;
+
private ITerminalConsumer intConsumer;
+ private IElementConsumer group$1$Consumer;
+
+ private IElementConsumer keyword$5$Consumer;
+
+ private IElementConsumer keyword$6$Consumer;
+
+ private IElementConsumer assignment$7$Consumer;
+
+ private IElementConsumer ruleCall$8$Consumer;
+
+ private IElementConsumer assignment$9$Consumer;
+
+ private IElementConsumer ruleCall$10$Consumer;
+
+ private IElementConsumer keyword$11$Consumer;
+
private ICharacterClass keyword$5$Delimiter;
-
+
private ICharacterClass keyword$6$Delimiter;
-
+
private ICharacterClass keyword$11$Delimiter;
-
+
private ISequenceMatcher ruleCall$8$Delimiter;
-
+
private ISequenceMatcher ruleCall$10$Delimiter;
-
- public ReferenceGrammarKindConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
- super(configuration, hiddenTokens);
- keyword$5$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$6$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$11$Delimiter = ICharacterClass.Factory.nullClass();
- ruleCall$8$Delimiter = ISequenceMatcher.Factory.nullMatcher();
- ruleCall$10$Delimiter = ISequenceMatcher.Factory.nullMatcher();
- }
-
- @Override
- protected int doConsume(int entryPoint) throws Exception {
- return consumeGroup$1(entryPoint);
- }
- protected int consumeGroup$1(int entryPoint) throws Exception {
- int result = doConsumeGroup$1(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeGroup$1(nextEntryPoint());
+ protected class Group$1$Consumer extends GroupConsumer {
+
+ protected Group$1$Consumer(final Group group) {
+ super(group);
}
- return result;
- }
-
- protected int doConsumeGroup$1(int entryPoint) throws Exception {
- final GroupResult result = createGroupResult(getRule().eleGroup());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$5(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele0000KeywordKind());
- return result.getResult();
- }
- case 1:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$6(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele0001KeywordLeftParenthesis());
- return result.getResult();
- }
- case 2:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$7(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele001AssignmentName());
- return result.getResult();
- }
- case 3:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$9(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele01AssignmentAge());
- return result.getResult();
- }
- case 4:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$11(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele1KeywordRightParenthesis());
- return result.getResult();
- }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(keyword$5$Consumer);
+ acceptor.accept(keyword$6$Consumer);
+ acceptor.accept(assignment$7$Consumer);
+ acceptor.accept(assignment$9$Consumer);
+ acceptor.accept(keyword$11$Consumer);
}
- return result.getResult();
}
- protected int consumeKeyword$5(int entryPoint) throws Exception {
- int result = doConsumeKeyword$5(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$5(nextEntryPoint());
+ protected class Keyword$5$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$5$Consumer(final Keyword keyword) {
+ super(keyword);
}
- return result;
- }
-
- protected int doConsumeKeyword$5(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele0000KeywordKind(), null, false, false, getKeyword$5$Delimiter());
- }
-
- protected int consumeKeyword$6(int entryPoint) throws Exception {
- int result = doConsumeKeyword$6(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$6(nextEntryPoint());
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$5$Delimiter());
}
- return result;
}
- protected int doConsumeKeyword$6(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele0001KeywordLeftParenthesis(), null, false, false, getKeyword$6$Delimiter());
- }
-
- protected int consumeAssignment$7(int entryPoint) throws Exception {
- int result = doConsumeAssignment$7(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$7(nextEntryPoint());
+ protected class Keyword$6$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$6$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$6$Delimiter());
}
- return result;
- }
-
- protected int doConsumeAssignment$7(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele001AssignmentName());
- return result.getResult(consumeRuleCall$8(entryPoint));
}
- protected int consumeRuleCall$8(int entryPoint) throws Exception {
- return consumeTerminal(idConsumer, "name", false, false, getRule().ele0010LexerRuleCallID(), getRuleCall$8$Delimiter());
+ protected class Assignment$7$Consumer extends AssignmentConsumer {
+
+ protected Assignment$7$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$8$Consumer;
+ }
}
- protected int consumeAssignment$9(int entryPoint) throws Exception {
- int result = doConsumeAssignment$9(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$9(nextEntryPoint());
+ protected class RuleCall$8$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$8$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeTerminal(idConsumer, "name", false, false, getElement(), getRuleCall$8$Delimiter());
}
- return result;
}
- protected int doConsumeAssignment$9(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele01AssignmentAge());
- return result.getResult(consumeRuleCall$10(entryPoint));
+ protected class Assignment$9$Consumer extends AssignmentConsumer {
+
+ protected Assignment$9$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$10$Consumer;
+ }
}
- protected int consumeRuleCall$10(int entryPoint) throws Exception {
- return consumeTerminal(intConsumer, "age", false, false, getRule().ele010LexerRuleCallINT(), getRuleCall$10$Delimiter());
+ protected class RuleCall$10$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$10$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeTerminal(intConsumer, "age", false, false, getElement(), getRuleCall$10$Delimiter());
+ }
}
- protected int consumeKeyword$11(int entryPoint) throws Exception {
- int result = doConsumeKeyword$11(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$11(nextEntryPoint());
+ protected class Keyword$11$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$11$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$11$Delimiter());
}
- return result;
}
- protected int doConsumeKeyword$11(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele1KeywordRightParenthesis(), null, false, false, getKeyword$11$Delimiter());
+ public ReferenceGrammarKindConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
+ super(configuration, hiddenTokens);
+ keyword$5$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$6$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$11$Delimiter = ICharacterClass.Factory.nullClass();
+ ruleCall$8$Delimiter = ISequenceMatcher.Factory.nullMatcher();
+ ruleCall$10$Delimiter = ISequenceMatcher.Factory.nullMatcher();
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return group$1$Consumer.consume();
}
public KindElements getRule() {
@@ -182,6 +174,15 @@ public final class ReferenceGrammarKindConsumer extends NonTerminalConsumer {
public void setRule(KindElements rule) {
this.rule = rule;
+
+ group$1$Consumer = new Group$1$Consumer(rule.eleGroup());
+ keyword$5$Consumer = new Keyword$5$Consumer(rule.ele0000KeywordKind());
+ keyword$6$Consumer = new Keyword$6$Consumer(rule.ele0001KeywordLeftParenthesis());
+ assignment$7$Consumer = new Assignment$7$Consumer(rule.ele001AssignmentName());
+ ruleCall$8$Consumer = new RuleCall$8$Consumer(rule.ele0010LexerRuleCallID());
+ assignment$9$Consumer = new Assignment$9$Consumer(rule.ele01AssignmentAge());
+ ruleCall$10$Consumer = new RuleCall$10$Consumer(rule.ele010LexerRuleCallINT());
+ keyword$11$Consumer = new Keyword$11$Consumer(rule.ele1KeywordRightParenthesis());
}
@Override
diff --git a/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarPersonConsumer.java b/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarPersonConsumer.java
index 7627bba..63566a2 100644
--- a/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarPersonConsumer.java
+++ b/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarPersonConsumer.java
@@ -4,90 +4,77 @@
package org.eclipse.xtext.reference.parser.packrat.consumers;
import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.AbstractRule;
+import org.eclipse.xtext.Alternatives;
+import org.eclipse.xtext.RuleCall;
-import org.eclipse.xtext.parser.packrat.IMarkerFactory.IMarker;
-import org.eclipse.xtext.parser.packrat.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.IElementConsumer;
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.parser.packrat.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.NonTerminalConsumer;
import org.eclipse.xtext.reference.services.ReferenceGrammarGrammarAccess.PersonElements;
-import org.eclipse.xtext.reference.parser.packrat.consumers.ReferenceGrammarErwachsenerConsumer;
-import org.eclipse.xtext.reference.parser.packrat.consumers.ReferenceGrammarKindConsumer;
-
-@SuppressWarnings("unused")
public final class ReferenceGrammarPersonConsumer extends NonTerminalConsumer {
- private PersonElements rule;
-
+ private PersonElements rule;
+
private INonTerminalConsumer erwachsenerConsumer;
+
private INonTerminalConsumer kindConsumer;
- public ReferenceGrammarPersonConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
- super(configuration, hiddenTokens);
- }
-
- @Override
- protected int doConsume(int entryPoint) throws Exception {
- return consumeAlternatives$1(entryPoint);
- }
+ private IElementConsumer alternatives$1$Consumer;
- protected int consumeAlternatives$1(int entryPoint) throws Exception {
- int result = doConsumeAlternatives$1(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAlternatives$1(nextEntryPoint());
- }
- return result;
- }
+ private IElementConsumer ruleCall$2$Consumer;
- protected int doConsumeAlternatives$1(int entryPoint) throws Exception {
- final AlternativesResult result = createAlternativesResult(getRule().eleAlternatives());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextAlternative();
- if (result.isAlternativeDone(consumeRuleCall$2(nextEntryPoint()))) {
- return result.getResult();
- }
- case 1:
- result.nextAlternative();
- if (result.isAlternativeDone(consumeRuleCall$3(nextEntryPoint()))) {
- return result.getResult();
- }
- }
- return result.getResult();
- }
+ private IElementConsumer ruleCall$3$Consumer;
- protected int consumeRuleCall$2(int entryPoint) throws Exception {
- int result = doConsumeRuleCall$2(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeRuleCall$2(nextEntryPoint());
+ protected class Alternatives$1$Consumer extends AlternativesConsumer {
+
+ protected Alternatives$1$Consumer(final Alternatives alternatives) {
+ super(alternatives);
+ }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(ruleCall$2$Consumer);
+ acceptor.accept(ruleCall$3$Consumer);
}
- return result;
}
- protected int doConsumeRuleCall$2(int entryPoint) throws Exception {
- return consumeNonTerminal(kindConsumer, null, false, false, false, getRule().ele0ParserRuleCallKind());
+ protected class RuleCall$2$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$2$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(kindConsumer, null, false, false, false, getElement());
+ }
}
- protected int consumeRuleCall$3(int entryPoint) throws Exception {
- int result = doConsumeRuleCall$3(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeRuleCall$3(nextEntryPoint());
+ protected class RuleCall$3$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$3$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(erwachsenerConsumer, null, false, false, false, getElement());
}
- return result;
}
- protected int doConsumeRuleCall$3(int entryPoint) throws Exception {
- return consumeNonTerminal(erwachsenerConsumer, null, false, false, false, getRule().ele1ParserRuleCallErwachsener());
+ public ReferenceGrammarPersonConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
+ super(configuration, hiddenTokens);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return alternatives$1$Consumer.consume();
}
public PersonElements getRule() {
@@ -96,6 +83,10 @@ public final class ReferenceGrammarPersonConsumer extends NonTerminalConsumer {
public void setRule(PersonElements rule) {
this.rule = rule;
+
+ alternatives$1$Consumer = new Alternatives$1$Consumer(rule.eleAlternatives());
+ ruleCall$2$Consumer = new RuleCall$2$Consumer(rule.ele0ParserRuleCallKind());
+ ruleCall$3$Consumer = new RuleCall$3$Consumer(rule.ele1ParserRuleCallErwachsener());
}
@Override
diff --git a/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarSpielplatzConsumer.java b/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarSpielplatzConsumer.java
index 39a3771..1d6aea0 100644
--- a/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarSpielplatzConsumer.java
+++ b/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarSpielplatzConsumer.java
@@ -4,328 +4,339 @@
package org.eclipse.xtext.reference.parser.packrat.consumers;
import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.AbstractRule;
+import org.eclipse.xtext.Alternatives;
+import org.eclipse.xtext.Assignment;
+import org.eclipse.xtext.Group;
+import org.eclipse.xtext.Keyword;
+import org.eclipse.xtext.RuleCall;
-import org.eclipse.xtext.parser.packrat.IMarkerFactory.IMarker;
-import org.eclipse.xtext.parser.packrat.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.IElementConsumer;
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.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.NonTerminalConsumer;
import org.eclipse.xtext.parser.packrat.matching.ICharacterClass;
import org.eclipse.xtext.parser.packrat.matching.ISequenceMatcher;
import org.eclipse.xtext.reference.services.ReferenceGrammarGrammarAccess.SpielplatzElements;
-import org.eclipse.xtext.reference.parser.packrat.consumers.ReferenceGrammarCustomTypeParserRuleConsumer;
-import org.eclipse.xtext.reference.parser.packrat.consumers.ReferenceGrammarErwachsenerConsumer;
-import org.eclipse.xtext.reference.parser.packrat.consumers.ReferenceGrammarFamilieConsumer;
-import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinINTConsumer;
-import org.eclipse.xtext.reference.parser.packrat.consumers.ReferenceGrammarKindConsumer;
-import org.eclipse.xtext.reference.parser.packrat.consumers.ReferenceGrammarSpielzeugConsumer;
-import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinSTRINGConsumer;
-
-@SuppressWarnings("unused")
public final class ReferenceGrammarSpielplatzConsumer extends NonTerminalConsumer {
- private SpielplatzElements rule;
-
+ private SpielplatzElements rule;
+
private INonTerminalConsumer customTypeParserRuleConsumer;
+
private INonTerminalConsumer erwachsenerConsumer;
+
private INonTerminalConsumer familieConsumer;
+
private ITerminalConsumer intConsumer;
+
private INonTerminalConsumer kindConsumer;
+
private INonTerminalConsumer spielzeugConsumer;
+
private ITerminalConsumer stringConsumer;
+ private IElementConsumer group$1$Consumer;
+
+ private IElementConsumer keyword$6$Consumer;
+
+ private IElementConsumer assignment$7$Consumer;
+
+ private IElementConsumer ruleCall$8$Consumer;
+
+ private IElementConsumer assignment$9$Consumer;
+
+ private IElementConsumer ruleCall$10$Consumer;
+
+ private IElementConsumer keyword$11$Consumer;
+
+ private IElementConsumer alternatives$12$Consumer;
+
+ private IElementConsumer assignment$16$Consumer;
+
+ private IElementConsumer ruleCall$17$Consumer;
+
+ private IElementConsumer assignment$18$Consumer;
+
+ private IElementConsumer ruleCall$19$Consumer;
+
+ private IElementConsumer assignment$20$Consumer;
+
+ private IElementConsumer ruleCall$21$Consumer;
+
+ private IElementConsumer assignment$22$Consumer;
+
+ private IElementConsumer ruleCall$23$Consumer;
+
+ private IElementConsumer assignment$24$Consumer;
+
+ private IElementConsumer ruleCall$25$Consumer;
+
+ private IElementConsumer keyword$26$Consumer;
+
private ICharacterClass keyword$11$Delimiter;
-
+
private ICharacterClass keyword$26$Delimiter;
-
+
private ICharacterClass keyword$6$Delimiter;
-
+
private ISequenceMatcher ruleCall$8$Delimiter;
-
+
private ISequenceMatcher ruleCall$10$Delimiter;
-
- public ReferenceGrammarSpielplatzConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
- super(configuration, hiddenTokens);
- keyword$11$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$26$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$6$Delimiter = ICharacterClass.Factory.nullClass();
- ruleCall$8$Delimiter = ISequenceMatcher.Factory.nullMatcher();
- ruleCall$10$Delimiter = ISequenceMatcher.Factory.nullMatcher();
- }
-
- @Override
- protected int doConsume(int entryPoint) throws Exception {
- return consumeGroup$1(entryPoint);
- }
-
- protected int consumeGroup$1(int entryPoint) throws Exception {
- IMarker marker = mark();
- int result = doConsumeGroup$1(entryPoint);
- if (result != ConsumeResult.SUCCESS) {
- marker.rollback();
- skipped(getRule().eleGroup());
- } else
- marker.commit();
- return ConsumeResult.SUCCESS;
- }
-
- protected int doConsumeGroup$1(int entryPoint) throws Exception {
- final GroupResult result = createGroupResult(getRule().eleGroup());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$6(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele00000KeywordSpielplatz());
- return result.getResult();
- }
- case 1:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$7(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele00001AssignmentGroesse());
- return result.getResult();
- }
- case 2:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$9(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele0001AssignmentBeschreibung());
- return result.getResult();
- }
- case 3:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$11(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele001KeywordLeftCurlyBracket());
- return result.getResult();
- }
- case 4:
- result.nextStep();
- if (result.didGroupFail(consumeAlternatives$12(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele01Alternatives());
- return result.getResult();
- }
- case 5:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$26(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele1KeywordRightCurlyBracket());
- return result.getResult();
- }
- }
- return result.getResult();
- }
-
- protected int consumeKeyword$6(int entryPoint) throws Exception {
- int result = doConsumeKeyword$6(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$6(nextEntryPoint());
- }
- return result;
- }
-
- protected int doConsumeKeyword$6(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele00000KeywordSpielplatz(), null, false, false, getKeyword$6$Delimiter());
- }
-
- protected int consumeAssignment$7(int entryPoint) throws Exception {
- int result = doConsumeAssignment$7(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$7(nextEntryPoint());
- }
- return result;
- }
-
- protected int doConsumeAssignment$7(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele00001AssignmentGroesse());
- return result.getResult(consumeRuleCall$8(entryPoint));
- }
-
- protected int consumeRuleCall$8(int entryPoint) throws Exception {
- return consumeTerminal(intConsumer, "groesse", false, false, getRule().ele000010LexerRuleCallINT(), getRuleCall$8$Delimiter());
- }
-
- protected int consumeAssignment$9(int entryPoint) throws Exception {
- IMarker marker = mark();
- int result = doConsumeAssignment$9(entryPoint);
- if (result != ConsumeResult.SUCCESS) {
- marker.rollback();
- skipped(getRule().ele0001AssignmentBeschreibung());
- } else
- marker.commit();
- return ConsumeResult.SUCCESS;
- }
-
- protected int doConsumeAssignment$9(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele0001AssignmentBeschreibung());
- return result.getResult(consumeRuleCall$10(entryPoint));
- }
-
- protected int consumeRuleCall$10(int entryPoint) throws Exception {
- return consumeTerminal(stringConsumer, "beschreibung", false, false, getRule().ele00010LexerRuleCallSTRING(), getRuleCall$10$Delimiter());
- }
- protected int consumeKeyword$11(int entryPoint) throws Exception {
- int result = doConsumeKeyword$11(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$11(nextEntryPoint());
+ protected class Group$1$Consumer extends OptionalGroupConsumer {
+
+ protected Group$1$Consumer(final Group group) {
+ super(group);
+ }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(keyword$6$Consumer);
+ acceptor.accept(assignment$7$Consumer);
+ acceptor.accept(assignment$9$Consumer);
+ acceptor.accept(keyword$11$Consumer);
+ acceptor.accept(alternatives$12$Consumer);
+ acceptor.accept(keyword$26$Consumer);
}
- return result;
- }
-
- protected int doConsumeKeyword$11(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele001KeywordLeftCurlyBracket(), null, false, false, getKeyword$11$Delimiter());
}
- protected int consumeAlternatives$12(int entryPoint) throws Exception {
- IMarker marker = mark();
- while(doConsumeAlternatives$12(entryPoint) == ConsumeResult.SUCCESS) {
- marker.flush();
+ protected class Keyword$6$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$6$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$6$Delimiter());
}
- marker.rollback();
- skipped(getRule().ele01Alternatives());
- return ConsumeResult.SUCCESS;
}
- protected int doConsumeAlternatives$12(int entryPoint) throws Exception {
- final AlternativesResult result = createAlternativesResult(getRule().ele01Alternatives());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextAlternative();
- if (result.isAlternativeDone(consumeAssignment$16(nextEntryPoint()))) {
- return result.getResult();
- }
- case 1:
- result.nextAlternative();
- if (result.isAlternativeDone(consumeAssignment$18(nextEntryPoint()))) {
- return result.getResult();
- }
- case 2:
- result.nextAlternative();
- if (result.isAlternativeDone(consumeAssignment$20(nextEntryPoint()))) {
- return result.getResult();
- }
- case 3:
- result.nextAlternative();
- if (result.isAlternativeDone(consumeAssignment$22(nextEntryPoint()))) {
- return result.getResult();
- }
- case 4:
- result.nextAlternative();
- if (result.isAlternativeDone(consumeAssignment$24(nextEntryPoint()))) {
- return result.getResult();
- }
+ protected class Assignment$7$Consumer extends AssignmentConsumer {
+
+ protected Assignment$7$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$8$Consumer;
}
- return result.getResult();
}
- protected int consumeAssignment$16(int entryPoint) throws Exception {
- int result = doConsumeAssignment$16(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$16(nextEntryPoint());
+ protected class RuleCall$8$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$8$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeTerminal(intConsumer, "groesse", false, false, getElement(), getRuleCall$8$Delimiter());
}
- return result;
}
- protected int doConsumeAssignment$16(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele010000AssignmentKinder());
- return result.getResult(consumeRuleCall$17(entryPoint));
+ protected class Assignment$9$Consumer extends OptionalAssignmentConsumer {
+
+ protected Assignment$9$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$10$Consumer;
+ }
}
- protected int consumeRuleCall$17(int entryPoint) throws Exception {
- return consumeNonTerminal(kindConsumer, "kinder", true, false, false, getRule().ele0100000ParserRuleCallKind());
+ protected class RuleCall$10$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$10$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeTerminal(stringConsumer, "beschreibung", false, false, getElement(), getRuleCall$10$Delimiter());
+ }
}
- protected int consumeAssignment$18(int entryPoint) throws Exception {
- int result = doConsumeAssignment$18(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$18(nextEntryPoint());
+ protected class Keyword$11$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$11$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$11$Delimiter());
}
- return result;
}
- protected int doConsumeAssignment$18(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele010001AssignmentErzieher());
- return result.getResult(consumeRuleCall$19(entryPoint));
+ protected class Alternatives$12$Consumer extends LoopAlternativesConsumer {
+
+ protected Alternatives$12$Consumer(final Alternatives alternatives) {
+ super(alternatives);
+ }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(assignment$16$Consumer);
+ acceptor.accept(assignment$18$Consumer);
+ acceptor.accept(assignment$20$Consumer);
+ acceptor.accept(assignment$22$Consumer);
+ acceptor.accept(assignment$24$Consumer);
+ }
}
- protected int consumeRuleCall$19(int entryPoint) throws Exception {
- return consumeNonTerminal(erwachsenerConsumer, "erzieher", true, false, false, getRule().ele0100010ParserRuleCallErwachsener());
+ protected class Assignment$16$Consumer extends AssignmentConsumer {
+
+ protected Assignment$16$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$17$Consumer;
+ }
}
- protected int consumeAssignment$20(int entryPoint) throws Exception {
- int result = doConsumeAssignment$20(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$20(nextEntryPoint());
+ protected class RuleCall$17$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$17$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(kindConsumer, "kinder", true, false, false, getElement());
}
- return result;
}
- protected int doConsumeAssignment$20(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele01001AssignmentSpielzeuge());
- return result.getResult(consumeRuleCall$21(entryPoint));
+ protected class Assignment$18$Consumer extends AssignmentConsumer {
+
+ protected Assignment$18$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$19$Consumer;
+ }
}
- protected int consumeRuleCall$21(int entryPoint) throws Exception {
- return consumeNonTerminal(spielzeugConsumer, "spielzeuge", true, false, false, getRule().ele010010ParserRuleCallSpielzeug());
+ protected class RuleCall$19$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$19$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(erwachsenerConsumer, "erzieher", true, false, false, getElement());
+ }
}
- protected int consumeAssignment$22(int entryPoint) throws Exception {
- int result = doConsumeAssignment$22(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$22(nextEntryPoint());
+ protected class Assignment$20$Consumer extends AssignmentConsumer {
+
+ protected Assignment$20$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$21$Consumer;
}
- return result;
}
- protected int doConsumeAssignment$22(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele0101AssignmentFamilie());
- return result.getResult(consumeRuleCall$23(entryPoint));
+ protected class RuleCall$21$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$21$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(spielzeugConsumer, "spielzeuge", true, false, false, getElement());
+ }
}
- protected int consumeRuleCall$23(int entryPoint) throws Exception {
- return consumeNonTerminal(familieConsumer, "familie", true, false, false, getRule().ele01010ParserRuleCallFamilie());
+ protected class Assignment$22$Consumer extends AssignmentConsumer {
+
+ protected Assignment$22$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$23$Consumer;
+ }
}
- protected int consumeAssignment$24(int entryPoint) throws Exception {
- int result = doConsumeAssignment$24(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$24(nextEntryPoint());
+ protected class RuleCall$23$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$23$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(familieConsumer, "familie", true, false, false, getElement());
}
- return result;
}
- protected int doConsumeAssignment$24(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele011AssignmentTypes());
- return result.getResult(consumeRuleCall$25(entryPoint));
+ protected class Assignment$24$Consumer extends AssignmentConsumer {
+
+ protected Assignment$24$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$25$Consumer;
+ }
}
- protected int consumeRuleCall$25(int entryPoint) throws Exception {
- return consumeNonTerminal(customTypeParserRuleConsumer, "types", true, false, false, getRule().ele0110ParserRuleCallCustomTypeParserRule());
+ protected class RuleCall$25$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$25$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(customTypeParserRuleConsumer, "types", true, false, false, getElement());
+ }
}
- protected int consumeKeyword$26(int entryPoint) throws Exception {
- int result = doConsumeKeyword$26(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$26(nextEntryPoint());
+ protected class Keyword$26$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$26$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$26$Delimiter());
}
- return result;
}
- protected int doConsumeKeyword$26(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele1KeywordRightCurlyBracket(), null, false, false, getKeyword$26$Delimiter());
+ public ReferenceGrammarSpielplatzConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
+ super(configuration, hiddenTokens);
+ keyword$11$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$26$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$6$Delimiter = ICharacterClass.Factory.nullClass();
+ ruleCall$8$Delimiter = ISequenceMatcher.Factory.nullMatcher();
+ ruleCall$10$Delimiter = ISequenceMatcher.Factory.nullMatcher();
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return group$1$Consumer.consume();
}
public SpielplatzElements getRule() {
@@ -334,6 +345,26 @@ public final class ReferenceGrammarSpielplatzConsumer extends NonTerminalConsume
public void setRule(SpielplatzElements rule) {
this.rule = rule;
+
+ group$1$Consumer = new Group$1$Consumer(rule.eleGroup());
+ keyword$6$Consumer = new Keyword$6$Consumer(rule.ele00000KeywordSpielplatz());
+ assignment$7$Consumer = new Assignment$7$Consumer(rule.ele00001AssignmentGroesse());
+ ruleCall$8$Consumer = new RuleCall$8$Consumer(rule.ele000010LexerRuleCallINT());
+ assignment$9$Consumer = new Assignment$9$Consumer(rule.ele0001AssignmentBeschreibung());
+ ruleCall$10$Consumer = new RuleCall$10$Consumer(rule.ele00010LexerRuleCallSTRING());
+ keyword$11$Consumer = new Keyword$11$Consumer(rule.ele001KeywordLeftCurlyBracket());
+ alternatives$12$Consumer = new Alternatives$12$Consumer(rule.ele01Alternatives());
+ assignment$16$Consumer = new Assignment$16$Consumer(rule.ele010000AssignmentKinder());
+ ruleCall$17$Consumer = new RuleCall$17$Consumer(rule.ele0100000ParserRuleCallKind());
+ assignment$18$Consumer = new Assignment$18$Consumer(rule.ele010001AssignmentErzieher());
+ ruleCall$19$Consumer = new RuleCall$19$Consumer(rule.ele0100010ParserRuleCallErwachsener());
+ assignment$20$Consumer = new Assignment$20$Consumer(rule.ele01001AssignmentSpielzeuge());
+ ruleCall$21$Consumer = new RuleCall$21$Consumer(rule.ele010010ParserRuleCallSpielzeug());
+ assignment$22$Consumer = new Assignment$22$Consumer(rule.ele0101AssignmentFamilie());
+ ruleCall$23$Consumer = new RuleCall$23$Consumer(rule.ele01010ParserRuleCallFamilie());
+ assignment$24$Consumer = new Assignment$24$Consumer(rule.ele011AssignmentTypes());
+ ruleCall$25$Consumer = new RuleCall$25$Consumer(rule.ele0110ParserRuleCallCustomTypeParserRule());
+ keyword$26$Consumer = new Keyword$26$Consumer(rule.ele1KeywordRightCurlyBracket());
}
@Override
diff --git a/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarSpielzeugConsumer.java b/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarSpielzeugConsumer.java
index 6501434..a3b54d7 100644
--- a/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarSpielzeugConsumer.java
+++ b/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarSpielzeugConsumer.java
@@ -4,173 +4,166 @@
package org.eclipse.xtext.reference.parser.packrat.consumers;
import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.AbstractRule;
+import org.eclipse.xtext.Assignment;
+import org.eclipse.xtext.Group;
+import org.eclipse.xtext.Keyword;
+import org.eclipse.xtext.RuleCall;
-import org.eclipse.xtext.parser.packrat.IMarkerFactory.IMarker;
-import org.eclipse.xtext.parser.packrat.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.IElementConsumer;
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.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.NonTerminalConsumer;
import org.eclipse.xtext.parser.packrat.matching.ICharacterClass;
import org.eclipse.xtext.parser.packrat.matching.ISequenceMatcher;
import org.eclipse.xtext.reference.services.ReferenceGrammarGrammarAccess.SpielzeugElements;
-import org.eclipse.xtext.reference.parser.packrat.consumers.ReferenceGrammarFarbeConsumer;
-import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinIDConsumer;
-
-@SuppressWarnings("unused")
public final class ReferenceGrammarSpielzeugConsumer extends NonTerminalConsumer {
- private SpielzeugElements rule;
-
+ private SpielzeugElements rule;
+
private INonTerminalConsumer farbeConsumer;
+
private ITerminalConsumer idConsumer;
+ private IElementConsumer group$1$Consumer;
+
+ private IElementConsumer keyword$5$Consumer;
+
+ private IElementConsumer keyword$6$Consumer;
+
+ private IElementConsumer assignment$7$Consumer;
+
+ private IElementConsumer ruleCall$8$Consumer;
+
+ private IElementConsumer assignment$9$Consumer;
+
+ private IElementConsumer ruleCall$10$Consumer;
+
+ private IElementConsumer keyword$11$Consumer;
+
private ICharacterClass keyword$5$Delimiter;
-
+
private ICharacterClass keyword$6$Delimiter;
-
+
private ICharacterClass keyword$11$Delimiter;
-
+
private ISequenceMatcher ruleCall$8$Delimiter;
-
- public ReferenceGrammarSpielzeugConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
- super(configuration, hiddenTokens);
- keyword$5$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$6$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$11$Delimiter = ICharacterClass.Factory.nullClass();
- ruleCall$8$Delimiter = ISequenceMatcher.Factory.nullMatcher();
- }
-
- @Override
- protected int doConsume(int entryPoint) throws Exception {
- return consumeGroup$1(entryPoint);
- }
- protected int consumeGroup$1(int entryPoint) throws Exception {
- int result = doConsumeGroup$1(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeGroup$1(nextEntryPoint());
+ protected class Group$1$Consumer extends GroupConsumer {
+
+ protected Group$1$Consumer(final Group group) {
+ super(group);
}
- return result;
- }
-
- protected int doConsumeGroup$1(int entryPoint) throws Exception {
- final GroupResult result = createGroupResult(getRule().eleGroup());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$5(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele0000KeywordSpielzeug());
- return result.getResult();
- }
- case 1:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$6(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele0001KeywordLeftParenthesis());
- return result.getResult();
- }
- case 2:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$7(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele001AssignmentName());
- return result.getResult();
- }
- case 3:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$9(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele01AssignmentFarbe());
- return result.getResult();
- }
- case 4:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$11(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele1KeywordRightParenthesis());
- return result.getResult();
- }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(keyword$5$Consumer);
+ acceptor.accept(keyword$6$Consumer);
+ acceptor.accept(assignment$7$Consumer);
+ acceptor.accept(assignment$9$Consumer);
+ acceptor.accept(keyword$11$Consumer);
}
- return result.getResult();
}
- protected int consumeKeyword$5(int entryPoint) throws Exception {
- int result = doConsumeKeyword$5(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$5(nextEntryPoint());
+ protected class Keyword$5$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$5$Consumer(final Keyword keyword) {
+ super(keyword);
}
- return result;
- }
-
- protected int doConsumeKeyword$5(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele0000KeywordSpielzeug(), null, false, false, getKeyword$5$Delimiter());
- }
-
- protected int consumeKeyword$6(int entryPoint) throws Exception {
- int result = doConsumeKeyword$6(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$6(nextEntryPoint());
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$5$Delimiter());
}
- return result;
}
- protected int doConsumeKeyword$6(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele0001KeywordLeftParenthesis(), null, false, false, getKeyword$6$Delimiter());
- }
-
- protected int consumeAssignment$7(int entryPoint) throws Exception {
- int result = doConsumeAssignment$7(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$7(nextEntryPoint());
+ protected class Keyword$6$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$6$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$6$Delimiter());
}
- return result;
- }
-
- protected int doConsumeAssignment$7(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele001AssignmentName());
- return result.getResult(consumeRuleCall$8(entryPoint));
}
- protected int consumeRuleCall$8(int entryPoint) throws Exception {
- return consumeTerminal(idConsumer, "name", false, false, getRule().ele0010LexerRuleCallID(), getRuleCall$8$Delimiter());
+ protected class Assignment$7$Consumer extends AssignmentConsumer {
+
+ protected Assignment$7$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$8$Consumer;
+ }
}
- protected int consumeAssignment$9(int entryPoint) throws Exception {
- int result = doConsumeAssignment$9(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$9(nextEntryPoint());
+ protected class RuleCall$8$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$8$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeTerminal(idConsumer, "name", false, false, getElement(), getRuleCall$8$Delimiter());
}
- return result;
}
- protected int doConsumeAssignment$9(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele01AssignmentFarbe());
- return result.getResult(consumeRuleCall$10(entryPoint));
+ protected class Assignment$9$Consumer extends AssignmentConsumer {
+
+ protected Assignment$9$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$10$Consumer;
+ }
}
- protected int consumeRuleCall$10(int entryPoint) throws Exception {
- return consumeNonTerminal(farbeConsumer, "farbe", false, false, false, getRule().ele010ParserRuleCallFarbe());
+ protected class RuleCall$10$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$10$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(farbeConsumer, "farbe", false, false, false, getElement());
+ }
}
- protected int consumeKeyword$11(int entryPoint) throws Exception {
- int result = doConsumeKeyword$11(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$11(nextEntryPoint());
+ protected class Keyword$11$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$11$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$11$Delimiter());
}
- return result;
}
- protected int doConsumeKeyword$11(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele1KeywordRightParenthesis(), null, false, false, getKeyword$11$Delimiter());
+ public ReferenceGrammarSpielzeugConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
+ super(configuration, hiddenTokens);
+ keyword$5$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$6$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$11$Delimiter = ICharacterClass.Factory.nullClass();
+ ruleCall$8$Delimiter = ISequenceMatcher.Factory.nullMatcher();
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return group$1$Consumer.consume();
}
public SpielzeugElements getRule() {
@@ -179,6 +172,15 @@ public final class ReferenceGrammarSpielzeugConsumer extends NonTerminalConsumer
public void setRule(SpielzeugElements rule) {
this.rule = rule;
+
+ group$1$Consumer = new Group$1$Consumer(rule.eleGroup());
+ keyword$5$Consumer = new Keyword$5$Consumer(rule.ele0000KeywordSpielzeug());
+ keyword$6$Consumer = new Keyword$6$Consumer(rule.ele0001KeywordLeftParenthesis());
+ assignment$7$Consumer = new Assignment$7$Consumer(rule.ele001AssignmentName());
+ ruleCall$8$Consumer = new RuleCall$8$Consumer(rule.ele0010LexerRuleCallID());
+ assignment$9$Consumer = new Assignment$9$Consumer(rule.ele01AssignmentFarbe());
+ ruleCall$10$Consumer = new RuleCall$10$Consumer(rule.ele010ParserRuleCallFarbe());
+ keyword$11$Consumer = new Keyword$11$Consumer(rule.ele1KeywordRightParenthesis());
}
@Override
diff --git a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/DomainmodelDelimiters.java b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/DomainmodelDelimiters.java
index ed03d1a..d8c118e 100644
--- a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/DomainmodelDelimiters.java
+++ b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/DomainmodelDelimiters.java
@@ -7,7 +7,6 @@ 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 DomainmodelDelimiters {
private DomainmodelDelimiters() {
@@ -15,18 +14,18 @@ public final class DomainmodelDelimiters {
}
// TODO: remove hardcoded character class from template
- public static ICharacterClass keyword$12$Delimiter = ICharacterClass.Factory.join(
+ public static final ICharacterClass keyword$12$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$14$Delimiter = ISequenceMatcher.Factory.nullMatcher();
+ public static final ISequenceMatcher ruleCall$14$Delimiter = ISequenceMatcher.Factory.nullMatcher();
- public static ICharacterClass keyword$29$Delimiter = ICharacterClass.Factory.nullClass();
+ public static final ICharacterClass keyword$29$Delimiter = ICharacterClass.Factory.nullClass();
- public static ISequenceMatcher ruleCall$43$Delimiter = new SetBasedKeywordMatcher(
+ public static final ISequenceMatcher ruleCall$43$Delimiter = new SetBasedKeywordMatcher(
"import", "package", "datatype", "entity", "extends", "attr", "ref", "opposite", "op");
}
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 004042c..a345b00 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
@@ -5,7 +5,6 @@ package org.eclipse.xtext.example.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.example.services.DomainmodelGrammarAccess;
@@ -35,10 +34,9 @@ import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinSL_COMMENT
import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinWSConsumer;
import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinANY_OTHERConsumer;
-@SuppressWarnings("unused")
public class DomainmodelParserConfiguration extends AbstractParserConfiguration {
- private XtextBuiltinParserConfiguration xtextBuiltinConfiguration;
+ private final XtextBuiltinParserConfiguration xtextBuiltinConfiguration;
private DomainmodelFileConsumer fileConsumer;
private DomainmodelImportConsumer importConsumer;
diff --git a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelAttributeConsumer.java b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelAttributeConsumer.java
index 5e04b9a..0ca204e 100644
--- a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelAttributeConsumer.java
+++ b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelAttributeConsumer.java
@@ -4,151 +4,148 @@
package org.eclipse.xtext.example.parser.packrat.consumers;
import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.AbstractRule;
+import org.eclipse.xtext.Assignment;
+import org.eclipse.xtext.Group;
+import org.eclipse.xtext.Keyword;
+import org.eclipse.xtext.RuleCall;
-import org.eclipse.xtext.parser.packrat.IMarkerFactory.IMarker;
-import org.eclipse.xtext.parser.packrat.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.IElementConsumer;
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.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.NonTerminalConsumer;
import org.eclipse.xtext.parser.packrat.matching.ICharacterClass;
import org.eclipse.xtext.parser.packrat.matching.ISequenceMatcher;
import org.eclipse.xtext.example.services.DomainmodelGrammarAccess.AttributeElements;
-import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinIDConsumer;
-import org.eclipse.xtext.example.parser.packrat.consumers.DomainmodelTypeRefConsumer;
-
-@SuppressWarnings("unused")
public final class DomainmodelAttributeConsumer extends NonTerminalConsumer {
- private AttributeElements rule;
-
+ private AttributeElements rule;
+
private ITerminalConsumer idConsumer;
+
private INonTerminalConsumer typeRefConsumer;
+ private IElementConsumer group$1$Consumer;
+
+ private IElementConsumer keyword$4$Consumer;
+
+ private IElementConsumer assignment$5$Consumer;
+
+ private IElementConsumer ruleCall$6$Consumer;
+
+ private IElementConsumer keyword$7$Consumer;
+
+ private IElementConsumer assignment$8$Consumer;
+
+ private IElementConsumer ruleCall$9$Consumer;
+
private ICharacterClass keyword$4$Delimiter;
-
+
private ICharacterClass keyword$7$Delimiter;
-
+
private ISequenceMatcher ruleCall$6$Delimiter;
-
- public DomainmodelAttributeConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
- super(configuration, hiddenTokens);
- keyword$4$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$7$Delimiter = ICharacterClass.Factory.nullClass();
- ruleCall$6$Delimiter = ISequenceMatcher.Factory.nullMatcher();
- }
-
- @Override
- protected int doConsume(int entryPoint) throws Exception {
- return consumeGroup$1(entryPoint);
- }
- protected int consumeGroup$1(int entryPoint) throws Exception {
- int result = doConsumeGroup$1(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeGroup$1(nextEntryPoint());
+ protected class Group$1$Consumer extends GroupConsumer {
+
+ protected Group$1$Consumer(final Group group) {
+ super(group);
}
- return result;
- }
-
- protected int doConsumeGroup$1(int entryPoint) throws Exception {
- final GroupResult result = createGroupResult(getRule().eleGroup());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$4(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele000KeywordAttr());
- return result.getResult();
- }
- case 1:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$5(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele001AssignmentName());
- return result.getResult();
- }
- case 2:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$7(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele01KeywordColon());
- return result.getResult();
- }
- case 3:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$8(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele1AssignmentType());
- return result.getResult();
- }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(keyword$4$Consumer);
+ acceptor.accept(assignment$5$Consumer);
+ acceptor.accept(keyword$7$Consumer);
+ acceptor.accept(assignment$8$Consumer);
}
- return result.getResult();
}
- protected int consumeKeyword$4(int entryPoint) throws Exception {
- int result = doConsumeKeyword$4(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$4(nextEntryPoint());
+ protected class Keyword$4$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$4$Consumer(final Keyword keyword) {
+ super(keyword);
}
- return result;
- }
-
- protected int doConsumeKeyword$4(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele000KeywordAttr(), null, false, false, getKeyword$4$Delimiter());
- }
-
- protected int consumeAssignment$5(int entryPoint) throws Exception {
- int result = doConsumeAssignment$5(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$5(nextEntryPoint());
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$4$Delimiter());
}
- return result;
}
- protected int doConsumeAssignment$5(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele001AssignmentName());
- return result.getResult(consumeRuleCall$6(entryPoint));
+ protected class Assignment$5$Consumer extends AssignmentConsumer {
+
+ protected Assignment$5$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$6$Consumer;
+ }
}
- protected int consumeRuleCall$6(int entryPoint) throws Exception {
- return consumeTerminal(idConsumer, "name", false, false, getRule().ele0010LexerRuleCallID(), getRuleCall$6$Delimiter());
+ protected class RuleCall$6$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$6$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeTerminal(idConsumer, "name", false, false, getElement(), getRuleCall$6$Delimiter());
+ }
}
- protected int consumeKeyword$7(int entryPoint) throws Exception {
- int result = doConsumeKeyword$7(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$7(nextEntryPoint());
+ protected class Keyword$7$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$7$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$7$Delimiter());
}
- return result;
}
- protected int doConsumeKeyword$7(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele01KeywordColon(), null, false, false, getKeyword$7$Delimiter());
+ protected class Assignment$8$Consumer extends AssignmentConsumer {
+
+ protected Assignment$8$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$9$Consumer;
+ }
}
- protected int consumeAssignment$8(int entryPoint) throws Exception {
- int result = doConsumeAssignment$8(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$8(nextEntryPoint());
+ protected class RuleCall$9$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$9$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(typeRefConsumer, "type", false, false, false, getElement());
}
- return result;
}
- protected int doConsumeAssignment$8(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele1AssignmentType());
- return result.getResult(consumeRuleCall$9(entryPoint));
+ public DomainmodelAttributeConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
+ super(configuration, hiddenTokens);
+ keyword$4$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$7$Delimiter = ICharacterClass.Factory.nullClass();
+ ruleCall$6$Delimiter = ISequenceMatcher.Factory.nullMatcher();
}
-
- protected int consumeRuleCall$9(int entryPoint) throws Exception {
- return consumeNonTerminal(typeRefConsumer, "type", false, false, false, getRule().ele10ParserRuleCallTypeRef());
+
+ @Override
+ protected int doConsume() throws Exception {
+ return group$1$Consumer.consume();
}
public AttributeElements getRule() {
@@ -157,6 +154,14 @@ public final class DomainmodelAttributeConsumer extends NonTerminalConsumer {
public void setRule(AttributeElements rule) {
this.rule = rule;
+
+ group$1$Consumer = new Group$1$Consumer(rule.eleGroup());
+ keyword$4$Consumer = new Keyword$4$Consumer(rule.ele000KeywordAttr());
+ assignment$5$Consumer = new Assignment$5$Consumer(rule.ele001AssignmentName());
+ ruleCall$6$Consumer = new RuleCall$6$Consumer(rule.ele0010LexerRuleCallID());
+ keyword$7$Consumer = new Keyword$7$Consumer(rule.ele01KeywordColon());
+ assignment$8$Consumer = new Assignment$8$Consumer(rule.ele1AssignmentType());
+ ruleCall$9$Consumer = new RuleCall$9$Consumer(rule.ele10ParserRuleCallTypeRef());
}
@Override
diff --git a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelDataTypeConsumer.java b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelDataTypeConsumer.java
index 4000bac..308df58 100644
--- a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelDataTypeConsumer.java
+++ b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelDataTypeConsumer.java
@@ -4,103 +4,98 @@
package org.eclipse.xtext.example.parser.packrat.consumers;
import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.AbstractRule;
+import org.eclipse.xtext.Assignment;
+import org.eclipse.xtext.Group;
+import org.eclipse.xtext.Keyword;
+import org.eclipse.xtext.RuleCall;
-import org.eclipse.xtext.parser.packrat.IMarkerFactory.IMarker;
+import org.eclipse.xtext.parser.packrat.consumers.IElementConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.INonTerminalConsumerConfiguration;
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.example.services.DomainmodelGrammarAccess.DataTypeElements;
-import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinIDConsumer;
-
-@SuppressWarnings("unused")
public final class DomainmodelDataTypeConsumer extends NonTerminalConsumer {
- private DataTypeElements rule;
-
+ private DataTypeElements rule;
+
private ITerminalConsumer idConsumer;
+ private IElementConsumer group$1$Consumer;
+
+ private IElementConsumer keyword$2$Consumer;
+
+ private IElementConsumer assignment$3$Consumer;
+
+ private IElementConsumer ruleCall$4$Consumer;
+
private ICharacterClass keyword$2$Delimiter;
-
+
private ISequenceMatcher ruleCall$4$Delimiter;
-
- public DomainmodelDataTypeConsumer(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 {
- int result = doConsumeGroup$1(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeGroup$1(nextEntryPoint());
+ protected class Group$1$Consumer extends GroupConsumer {
+
+ protected Group$1$Consumer(final Group group) {
+ super(group);
}
- return result;
- }
-
- protected int doConsumeGroup$1(int entryPoint) throws Exception {
- final GroupResult result = createGroupResult(getRule().eleGroup());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$2(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele0KeywordDatatype());
- return result.getResult();
- }
- case 1:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$3(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele1AssignmentName());
- return result.getResult();
- }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(keyword$2$Consumer);
+ acceptor.accept(assignment$3$Consumer);
}
- return result.getResult();
}
- protected int consumeKeyword$2(int entryPoint) throws Exception {
- int result = doConsumeKeyword$2(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$2(nextEntryPoint());
+ protected class Keyword$2$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$2$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$2$Delimiter());
}
- return result;
}
- protected int doConsumeKeyword$2(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele0KeywordDatatype(), null, false, false, getKeyword$2$Delimiter());
+ protected class Assignment$3$Consumer extends AssignmentConsumer {
+
+ protected Assignment$3$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$4$Consumer;
+ }
}
- protected int consumeAssignment$3(int entryPoint) throws Exception {
- int result = doConsumeAssignment$3(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$3(nextEntryPoint());
+ protected class RuleCall$4$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$4$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeTerminal(idConsumer, "name", false, false, getElement(), getRuleCall$4$Delimiter());
}
- return result;
}
- protected int doConsumeAssignment$3(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele1AssignmentName());
- return result.getResult(consumeRuleCall$4(entryPoint));
+ public DomainmodelDataTypeConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
+ super(configuration, hiddenTokens);
+ keyword$2$Delimiter = ICharacterClass.Factory.nullClass();
+ ruleCall$4$Delimiter = ISequenceMatcher.Factory.nullMatcher();
}
-
- protected int consumeRuleCall$4(int entryPoint) throws Exception {
- return consumeTerminal(idConsumer, "name", false, false, getRule().ele10LexerRuleCallID(), getRuleCall$4$Delimiter());
+
+ @Override
+ protected int doConsume() throws Exception {
+ return group$1$Consumer.consume();
}
public DataTypeElements getRule() {
@@ -109,6 +104,11 @@ public final class DomainmodelDataTypeConsumer extends NonTerminalConsumer {
public void setRule(DataTypeElements rule) {
this.rule = rule;
+
+ group$1$Consumer = new Group$1$Consumer(rule.eleGroup());
+ keyword$2$Consumer = new Keyword$2$Consumer(rule.ele0KeywordDatatype());
+ assignment$3$Consumer = new Assignment$3$Consumer(rule.ele1AssignmentName());
+ ruleCall$4$Consumer = new RuleCall$4$Consumer(rule.ele10LexerRuleCallID());
}
@Override
diff --git a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelEntityConsumer.java b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelEntityConsumer.java
index fc5d2ae..0b95e1b 100644
--- a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelEntityConsumer.java
+++ b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelEntityConsumer.java
@@ -4,251 +4,231 @@
package org.eclipse.xtext.example.parser.packrat.consumers;
import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.AbstractRule;
+import org.eclipse.xtext.Assignment;
+import org.eclipse.xtext.CrossReference;
+import org.eclipse.xtext.Group;
+import org.eclipse.xtext.Keyword;
+import org.eclipse.xtext.RuleCall;
-import org.eclipse.xtext.parser.packrat.IMarkerFactory.IMarker;
-import org.eclipse.xtext.parser.packrat.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.IElementConsumer;
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.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.NonTerminalConsumer;
import org.eclipse.xtext.parser.packrat.matching.ICharacterClass;
import org.eclipse.xtext.parser.packrat.matching.ISequenceMatcher;
import org.eclipse.xtext.example.services.DomainmodelGrammarAccess.EntityElements;
-import org.eclipse.xtext.example.parser.packrat.consumers.DomainmodelFeatureConsumer;
-import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinIDConsumer;
-
-@SuppressWarnings("unused")
public final class DomainmodelEntityConsumer extends NonTerminalConsumer {
- private EntityElements rule;
-
+ private EntityElements rule;
+
private INonTerminalConsumer featureConsumer;
+
private ITerminalConsumer idConsumer;
+ private IElementConsumer group$1$Consumer;
+
+ private IElementConsumer keyword$6$Consumer;
+
+ private IElementConsumer assignment$7$Consumer;
+
+ private IElementConsumer ruleCall$8$Consumer;
+
+ private IElementConsumer group$9$Consumer;
+
+ private IElementConsumer keyword$10$Consumer;
+
+ private IElementConsumer assignment$11$Consumer;
+
+ private IElementConsumer crossReference$12$Consumer;
+
+ private IElementConsumer keyword$14$Consumer;
+
+ private IElementConsumer assignment$15$Consumer;
+
+ private IElementConsumer ruleCall$16$Consumer;
+
+ private IElementConsumer keyword$17$Consumer;
+
private ISequenceMatcher crossReference$12$Delimiter;
-
+
private ICharacterClass keyword$6$Delimiter;
-
+
private ICharacterClass keyword$10$Delimiter;
-
+
private ICharacterClass keyword$14$Delimiter;
-
+
private ICharacterClass keyword$17$Delimiter;
-
+
private ISequenceMatcher ruleCall$8$Delimiter;
-
- public DomainmodelEntityConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
- super(configuration, hiddenTokens);
- crossReference$12$Delimiter = ISequenceMatcher.Factory.nullMatcher();
- keyword$6$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$10$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$14$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$17$Delimiter = ICharacterClass.Factory.nullClass();
- ruleCall$8$Delimiter = ISequenceMatcher.Factory.nullMatcher();
- }
-
- @Override
- protected int doConsume(int entryPoint) throws Exception {
- return consumeGroup$1(entryPoint);
- }
- protected int consumeGroup$1(int entryPoint) throws Exception {
- int result = doConsumeGroup$1(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeGroup$1(nextEntryPoint());
+ protected class Group$1$Consumer extends GroupConsumer {
+
+ protected Group$1$Consumer(final Group group) {
+ super(group);
}
- return result;
- }
-
- protected int doConsumeGroup$1(int entryPoint) throws Exception {
- final GroupResult result = createGroupResult(getRule().eleGroup());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$6(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele00000KeywordEntity());
- return result.getResult();
- }
- case 1:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$7(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele00001AssignmentName());
- return result.getResult();
- }
- case 2:
- result.nextStep();
- if (result.didGroupFail(consumeGroup$9(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele0001Group());
- return result.getResult();
- }
- case 3:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$14(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele001KeywordLeftCurlyBracket());
- return result.getResult();
- }
- case 4:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$15(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele01AssignmentFeatures());
- return result.getResult();
- }
- case 5:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$17(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele1KeywordRightCurlyBracket());
- return result.getResult();
- }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(keyword$6$Consumer);
+ acceptor.accept(assignment$7$Consumer);
+ acceptor.accept(group$9$Consumer);
+ acceptor.accept(keyword$14$Consumer);
+ acceptor.accept(assignment$15$Consumer);
+ acceptor.accept(keyword$17$Consumer);
}
- return result.getResult();
}
- protected int consumeKeyword$6(int entryPoint) throws Exception {
- int result = doConsumeKeyword$6(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$6(nextEntryPoint());
+ protected class Keyword$6$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$6$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$6$Delimiter());
}
- return result;
- }
-
- protected int doConsumeKeyword$6(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele00000KeywordEntity(), null, false, false, getKeyword$6$Delimiter());
}
- protected int consumeAssignment$7(int entryPoint) throws Exception {
- int result = doConsumeAssignment$7(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$7(nextEntryPoint());
+ protected class Assignment$7$Consumer extends AssignmentConsumer {
+
+ protected Assignment$7$Consumer(final Assignment assignment) {
+ super(assignment);
}
- return result;
- }
-
- protected int doConsumeAssignment$7(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele00001AssignmentName());
- return result.getResult(consumeRuleCall$8(entryPoint));
- }
-
- protected int consumeRuleCall$8(int entryPoint) throws Exception {
- return consumeTerminal(idConsumer, "name", false, false, getRule().ele000010LexerRuleCallID(), getRuleCall$8$Delimiter());
- }
-
- protected int consumeGroup$9(int entryPoint) throws Exception {
- IMarker marker = mark();
- int result = doConsumeGroup$9(entryPoint);
- if (result != ConsumeResult.SUCCESS) {
- marker.rollback();
- skipped(getRule().ele0001Group());
- } else
- marker.commit();
- return ConsumeResult.SUCCESS;
- }
-
- protected int doConsumeGroup$9(int entryPoint) throws Exception {
- final GroupResult result = createGroupResult(getRule().ele0001Group());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$10(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele00010KeywordExtends());
- return result.getResult();
- }
- case 1:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$11(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele00011AssignmentSuperType());
- return result.getResult();
- }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$8$Consumer;
}
- return result.getResult();
}
- protected int consumeKeyword$10(int entryPoint) throws Exception {
- int result = doConsumeKeyword$10(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$10(nextEntryPoint());
+ protected class RuleCall$8$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$8$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
}
- return result;
- }
-
- protected int doConsumeKeyword$10(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele00010KeywordExtends(), null, false, false, getKeyword$10$Delimiter());
- }
-
- protected int consumeAssignment$11(int entryPoint) throws Exception {
- int result = doConsumeAssignment$11(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$11(nextEntryPoint());
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeTerminal(idConsumer, "name", false, false, getElement(), getRuleCall$8$Delimiter());
}
- return result;
}
- protected int doConsumeAssignment$11(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele00011AssignmentSuperType());
- return result.getResult(consumeCrossReference$12(entryPoint));
+ protected class Group$9$Consumer extends OptionalGroupConsumer {
+
+ protected Group$9$Consumer(final Group group) {
+ super(group);
+ }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(keyword$10$Consumer);
+ acceptor.accept(assignment$11$Consumer);
+ }
}
- protected int consumeCrossReference$12(int entryPoint) throws Exception {
- return consumeTerminal(idConsumer, "superType", false, false, getRule().ele000110CrossReferenceEStringEntity(), getCrossReference$12$Delimiter());
+ protected class Keyword$10$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$10$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$10$Delimiter());
+ }
}
- protected int consumeKeyword$14(int entryPoint) throws Exception {
- int result = doConsumeKeyword$14(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$14(nextEntryPoint());
+ protected class Assignment$11$Consumer extends AssignmentConsumer {
+
+ protected Assignment$11$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return crossReference$12$Consumer;
}
- return result;
}
- protected int doConsumeKeyword$14(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele001KeywordLeftCurlyBracket(), null, false, false, getKeyword$14$Delimiter());
+ protected class CrossReference$12$Consumer extends ElementConsumer<CrossReference> {
+
+ protected CrossReference$12$Consumer(final CrossReference crossReference) {
+ super(crossReference);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeTerminal(idConsumer, "superType", false, false, getElement(), getCrossReference$12$Delimiter());
+ }
}
- protected int consumeAssignment$15(int entryPoint) throws Exception {
- IMarker marker = mark();
- while(doConsumeAssignment$15(entryPoint) == ConsumeResult.SUCCESS) {
- marker.flush();
+ protected class Keyword$14$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$14$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$14$Delimiter());
}
- marker.rollback();
- skipped(getRule().ele01AssignmentFeatures());
- return ConsumeResult.SUCCESS;
}
- protected int doConsumeAssignment$15(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele01AssignmentFeatures());
- return result.getResult(consumeRuleCall$16(entryPoint));
+ protected class Assignment$15$Consumer extends LoopAssignmentConsumer {
+
+ protected Assignment$15$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$16$Consumer;
+ }
}
- protected int consumeRuleCall$16(int entryPoint) throws Exception {
- return consumeNonTerminal(featureConsumer, "features", true, false, false, getRule().ele010ParserRuleCallFeature());
+ protected class RuleCall$16$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$16$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(featureConsumer, "features", true, false, false, getElement());
+ }
}
- protected int consumeKeyword$17(int entryPoint) throws Exception {
- int result = doConsumeKeyword$17(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$17(nextEntryPoint());
+ protected class Keyword$17$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$17$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$17$Delimiter());
}
- return result;
}
- protected int doConsumeKeyword$17(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele1KeywordRightCurlyBracket(), null, false, false, getKeyword$17$Delimiter());
+ public DomainmodelEntityConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
+ super(configuration, hiddenTokens);
+ crossReference$12$Delimiter = ISequenceMatcher.Factory.nullMatcher();
+ keyword$6$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$10$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$14$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$17$Delimiter = ICharacterClass.Factory.nullClass();
+ ruleCall$8$Delimiter = ISequenceMatcher.Factory.nullMatcher();
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return group$1$Consumer.consume();
}
public EntityElements getRule() {
@@ -257,6 +237,19 @@ public final class DomainmodelEntityConsumer extends NonTerminalConsumer {
public void setRule(EntityElements rule) {
this.rule = rule;
+
+ group$1$Consumer = new Group$1$Consumer(rule.eleGroup());
+ keyword$6$Consumer = new Keyword$6$Consumer(rule.ele00000KeywordEntity());
+ assignment$7$Consumer = new Assignment$7$Consumer(rule.ele00001AssignmentName());
+ ruleCall$8$Consumer = new RuleCall$8$Consumer(rule.ele000010LexerRuleCallID());
+ group$9$Consumer = new Group$9$Consumer(rule.ele0001Group());
+ keyword$10$Consumer = new Keyword$10$Consumer(rule.ele00010KeywordExtends());
+ assignment$11$Consumer = new Assignment$11$Consumer(rule.ele00011AssignmentSuperType());
+ crossReference$12$Consumer = new CrossReference$12$Consumer(rule.ele000110CrossReferenceEStringEntity());
+ keyword$14$Consumer = new Keyword$14$Consumer(rule.ele001KeywordLeftCurlyBracket());
+ assignment$15$Consumer = new Assignment$15$Consumer(rule.ele01AssignmentFeatures());
+ ruleCall$16$Consumer = new RuleCall$16$Consumer(rule.ele010ParserRuleCallFeature());
+ keyword$17$Consumer = new Keyword$17$Consumer(rule.ele1KeywordRightCurlyBracket());
}
@Override
diff --git a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelFeatureConsumer.java b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelFeatureConsumer.java
index 6d8fc40..2e6507c 100644
--- a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelFeatureConsumer.java
+++ b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelFeatureConsumer.java
@@ -4,90 +4,77 @@
package org.eclipse.xtext.example.parser.packrat.consumers;
import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.AbstractRule;
+import org.eclipse.xtext.Alternatives;
+import org.eclipse.xtext.RuleCall;
-import org.eclipse.xtext.parser.packrat.IMarkerFactory.IMarker;
-import org.eclipse.xtext.parser.packrat.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.IElementConsumer;
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.parser.packrat.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.NonTerminalConsumer;
import org.eclipse.xtext.example.services.DomainmodelGrammarAccess.FeatureElements;
-import org.eclipse.xtext.example.parser.packrat.consumers.DomainmodelOperationConsumer;
-import org.eclipse.xtext.example.parser.packrat.consumers.DomainmodelStructuralFeatureConsumer;
-
-@SuppressWarnings("unused")
public final class DomainmodelFeatureConsumer extends NonTerminalConsumer {
- private FeatureElements rule;
-
+ private FeatureElements rule;
+
private INonTerminalConsumer operationConsumer;
+
private INonTerminalConsumer structuralFeatureConsumer;
- public DomainmodelFeatureConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
- super(configuration, hiddenTokens);
- }
-
- @Override
- protected int doConsume(int entryPoint) throws Exception {
- return consumeAlternatives$1(entryPoint);
- }
+ private IElementConsumer alternatives$1$Consumer;
- protected int consumeAlternatives$1(int entryPoint) throws Exception {
- int result = doConsumeAlternatives$1(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAlternatives$1(nextEntryPoint());
- }
- return result;
- }
+ private IElementConsumer ruleCall$2$Consumer;
- protected int doConsumeAlternatives$1(int entryPoint) throws Exception {
- final AlternativesResult result = createAlternativesResult(getRule().eleAlternatives());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextAlternative();
- if (result.isAlternativeDone(consumeRuleCall$2(nextEntryPoint()))) {
- return result.getResult();
- }
- case 1:
- result.nextAlternative();
- if (result.isAlternativeDone(consumeRuleCall$3(nextEntryPoint()))) {
- return result.getResult();
- }
- }
- return result.getResult();
- }
+ private IElementConsumer ruleCall$3$Consumer;
- protected int consumeRuleCall$2(int entryPoint) throws Exception {
- int result = doConsumeRuleCall$2(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeRuleCall$2(nextEntryPoint());
+ protected class Alternatives$1$Consumer extends AlternativesConsumer {
+
+ protected Alternatives$1$Consumer(final Alternatives alternatives) {
+ super(alternatives);
+ }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(ruleCall$2$Consumer);
+ acceptor.accept(ruleCall$3$Consumer);
}
- return result;
}
- protected int doConsumeRuleCall$2(int entryPoint) throws Exception {
- return consumeNonTerminal(structuralFeatureConsumer, null, false, false, false, getRule().ele0ParserRuleCallStructuralFeature());
+ protected class RuleCall$2$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$2$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(structuralFeatureConsumer, null, false, false, false, getElement());
+ }
}
- protected int consumeRuleCall$3(int entryPoint) throws Exception {
- int result = doConsumeRuleCall$3(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeRuleCall$3(nextEntryPoint());
+ protected class RuleCall$3$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$3$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(operationConsumer, null, false, false, false, getElement());
}
- return result;
}
- protected int doConsumeRuleCall$3(int entryPoint) throws Exception {
- return consumeNonTerminal(operationConsumer, null, false, false, false, getRule().ele1ParserRuleCallOperation());
+ public DomainmodelFeatureConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
+ super(configuration, hiddenTokens);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return alternatives$1$Consumer.consume();
}
public FeatureElements getRule() {
@@ -96,6 +83,10 @@ public final class DomainmodelFeatureConsumer extends NonTerminalConsumer {
public void setRule(FeatureElements rule) {
this.rule = rule;
+
+ alternatives$1$Consumer = new Alternatives$1$Consumer(rule.eleAlternatives());
+ ruleCall$2$Consumer = new RuleCall$2$Consumer(rule.ele0ParserRuleCallStructuralFeature());
+ ruleCall$3$Consumer = new RuleCall$3$Consumer(rule.ele1ParserRuleCallOperation());
}
@Override
diff --git a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelFileConsumer.java b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelFileConsumer.java
index 6636fa9..8129498 100644
--- a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelFileConsumer.java
+++ b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelFileConsumer.java
@@ -4,108 +4,106 @@
package org.eclipse.xtext.example.parser.packrat.consumers;
import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.AbstractRule;
+import org.eclipse.xtext.Assignment;
+import org.eclipse.xtext.Group;
+import org.eclipse.xtext.RuleCall;
-import org.eclipse.xtext.parser.packrat.IMarkerFactory.IMarker;
-import org.eclipse.xtext.parser.packrat.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.IElementConsumer;
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.parser.packrat.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.NonTerminalConsumer;
import org.eclipse.xtext.example.services.DomainmodelGrammarAccess.FileElements;
-import org.eclipse.xtext.example.parser.packrat.consumers.DomainmodelImportConsumer;
-import org.eclipse.xtext.example.parser.packrat.consumers.DomainmodelNamedElementConsumer;
-
-@SuppressWarnings("unused")
public final class DomainmodelFileConsumer extends NonTerminalConsumer {
- private FileElements rule;
-
+ private FileElements rule;
+
private INonTerminalConsumer importConsumer;
+
private INonTerminalConsumer namedElementConsumer;
- public DomainmodelFileConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
- super(configuration, hiddenTokens);
- }
-
- @Override
- protected int doConsume(int entryPoint) throws Exception {
- return consumeGroup$1(entryPoint);
- }
+ private IElementConsumer group$1$Consumer;
- protected int consumeGroup$1(int entryPoint) throws Exception {
- int result = doConsumeGroup$1(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeGroup$1(nextEntryPoint());
- }
- return result;
- }
+ private IElementConsumer assignment$2$Consumer;
- protected int doConsumeGroup$1(int entryPoint) throws Exception {
- final GroupResult result = createGroupResult(getRule().eleGroup());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$2(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele0AssignmentImports());
- return result.getResult();
- }
- case 1:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$4(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele1AssignmentNamedElements());
- return result.getResult();
- }
+ private IElementConsumer ruleCall$3$Consumer;
+
+ private IElementConsumer assignment$4$Consumer;
+
+ private IElementConsumer ruleCall$5$Consumer;
+
+ protected class Group$1$Consumer extends GroupConsumer {
+
+ protected Group$1$Consumer(final Group group) {
+ super(group);
+ }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(assignment$2$Consumer);
+ acceptor.accept(assignment$4$Consumer);
}
- return result.getResult();
}
- protected int consumeAssignment$2(int entryPoint) throws Exception {
- IMarker marker = mark();
- while(doConsumeAssignment$2(entryPoint) == ConsumeResult.SUCCESS) {
- marker.flush();
+ protected class Assignment$2$Consumer extends LoopAssignmentConsumer {
+
+ protected Assignment$2$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$3$Consumer;
}
- marker.rollback();
- skipped(getRule().ele0AssignmentImports());
- return ConsumeResult.SUCCESS;
}
- protected int doConsumeAssignment$2(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele0AssignmentImports());
- return result.getResult(consumeRuleCall$3(entryPoint));
+ protected class RuleCall$3$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$3$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(importConsumer, "imports", true, false, false, getElement());
+ }
}
- protected int consumeRuleCall$3(int entryPoint) throws Exception {
- return consumeNonTerminal(importConsumer, "imports", true, false, false, getRule().ele00ParserRuleCallImport());
+ protected class Assignment$4$Consumer extends LoopAssignmentConsumer {
+
+ protected Assignment$4$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$5$Consumer;
+ }
}
- protected int consumeAssignment$4(int entryPoint) throws Exception {
- IMarker marker = mark();
- while(doConsumeAssignment$4(entryPoint) == ConsumeResult.SUCCESS) {
- marker.flush();
+ protected class RuleCall$5$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$5$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(namedElementConsumer, "namedElements", true, false, false, getElement());
}
- marker.rollback();
- skipped(getRule().ele1AssignmentNamedElements());
- return ConsumeResult.SUCCESS;
}
- protected int doConsumeAssignment$4(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele1AssignmentNamedElements());
- return result.getResult(consumeRuleCall$5(entryPoint));
+ public DomainmodelFileConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
+ super(configuration, hiddenTokens);
}
-
- protected int consumeRuleCall$5(int entryPoint) throws Exception {
- return consumeNonTerminal(namedElementConsumer, "namedElements", true, false, false, getRule().ele10ParserRuleCallNamedElement());
+
+ @Override
+ protected int doConsume() throws Exception {
+ return group$1$Consumer.consume();
}
public FileElements getRule() {
@@ -114,6 +112,12 @@ public final class DomainmodelFileConsumer extends NonTerminalConsumer {
public void setRule(FileElements rule) {
this.rule = rule;
+
+ group$1$Consumer = new Group$1$Consumer(rule.eleGroup());
+ assignment$2$Consumer = new Assignment$2$Consumer(rule.ele0AssignmentImports());
+ ruleCall$3$Consumer = new RuleCall$3$Consumer(rule.ele00ParserRuleCallImport());
+ assignment$4$Consumer = new Assignment$4$Consumer(rule.ele1AssignmentNamedElements());
+ ruleCall$5$Consumer = new RuleCall$5$Consumer(rule.ele10ParserRuleCallNamedElement());
}
@Override
diff --git a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelImportConsumer.java b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelImportConsumer.java
index 0ab1f97..809adc9 100644
--- a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelImportConsumer.java
+++ b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelImportConsumer.java
@@ -4,103 +4,98 @@
package org.eclipse.xtext.example.parser.packrat.consumers;
import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.AbstractRule;
+import org.eclipse.xtext.Assignment;
+import org.eclipse.xtext.Group;
+import org.eclipse.xtext.Keyword;
+import org.eclipse.xtext.RuleCall;
-import org.eclipse.xtext.parser.packrat.IMarkerFactory.IMarker;
+import org.eclipse.xtext.parser.packrat.consumers.IElementConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.INonTerminalConsumerConfiguration;
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.example.services.DomainmodelGrammarAccess.ImportElements;
-import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinSTRINGConsumer;
-
-@SuppressWarnings("unused")
public final class DomainmodelImportConsumer extends NonTerminalConsumer {
- private ImportElements rule;
-
+ private ImportElements rule;
+
private ITerminalConsumer stringConsumer;
+ private IElementConsumer group$1$Consumer;
+
+ private IElementConsumer keyword$2$Consumer;
+
+ private IElementConsumer assignment$3$Consumer;
+
+ private IElementConsumer ruleCall$4$Consumer;
+
private ICharacterClass keyword$2$Delimiter;
-
+
private ISequenceMatcher ruleCall$4$Delimiter;
-
- public DomainmodelImportConsumer(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 {
- int result = doConsumeGroup$1(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeGroup$1(nextEntryPoint());
+ protected class Group$1$Consumer extends GroupConsumer {
+
+ protected Group$1$Consumer(final Group group) {
+ super(group);
}
- return result;
- }
-
- protected int doConsumeGroup$1(int entryPoint) throws Exception {
- final GroupResult result = createGroupResult(getRule().eleGroup());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$2(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele0KeywordImport());
- return result.getResult();
- }
- case 1:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$3(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele1AssignmentImportURI());
- return result.getResult();
- }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(keyword$2$Consumer);
+ acceptor.accept(assignment$3$Consumer);
}
- return result.getResult();
}
- protected int consumeKeyword$2(int entryPoint) throws Exception {
- int result = doConsumeKeyword$2(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$2(nextEntryPoint());
+ protected class Keyword$2$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$2$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$2$Delimiter());
}
- return result;
}
- protected int doConsumeKeyword$2(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele0KeywordImport(), null, false, false, getKeyword$2$Delimiter());
+ protected class Assignment$3$Consumer extends AssignmentConsumer {
+
+ protected Assignment$3$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$4$Consumer;
+ }
}
- protected int consumeAssignment$3(int entryPoint) throws Exception {
- int result = doConsumeAssignment$3(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$3(nextEntryPoint());
+ protected class RuleCall$4$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$4$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeTerminal(stringConsumer, "importURI", false, false, getElement(), getRuleCall$4$Delimiter());
}
- return result;
}
- protected int doConsumeAssignment$3(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele1AssignmentImportURI());
- return result.getResult(consumeRuleCall$4(entryPoint));
+ public DomainmodelImportConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
+ super(configuration, hiddenTokens);
+ keyword$2$Delimiter = ICharacterClass.Factory.nullClass();
+ ruleCall$4$Delimiter = ISequenceMatcher.Factory.nullMatcher();
}
-
- protected int consumeRuleCall$4(int entryPoint) throws Exception {
- return consumeTerminal(stringConsumer, "importURI", false, false, getRule().ele10LexerRuleCallSTRING(), getRuleCall$4$Delimiter());
+
+ @Override
+ protected int doConsume() throws Exception {
+ return group$1$Consumer.consume();
}
public ImportElements getRule() {
@@ -109,6 +104,11 @@ public final class DomainmodelImportConsumer extends NonTerminalConsumer {
public void setRule(ImportElements rule) {
this.rule = rule;
+
+ group$1$Consumer = new Group$1$Consumer(rule.eleGroup());
+ keyword$2$Consumer = new Keyword$2$Consumer(rule.ele0KeywordImport());
+ assignment$3$Consumer = new Assignment$3$Consumer(rule.ele1AssignmentImportURI());
+ ruleCall$4$Consumer = new RuleCall$4$Consumer(rule.ele10LexerRuleCallSTRING());
}
@Override
diff --git a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelNamedElementConsumer.java b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelNamedElementConsumer.java
index 5761350..4f866bc 100644
--- a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelNamedElementConsumer.java
+++ b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelNamedElementConsumer.java
@@ -4,90 +4,77 @@
package org.eclipse.xtext.example.parser.packrat.consumers;
import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.AbstractRule;
+import org.eclipse.xtext.Alternatives;
+import org.eclipse.xtext.RuleCall;
-import org.eclipse.xtext.parser.packrat.IMarkerFactory.IMarker;
-import org.eclipse.xtext.parser.packrat.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.IElementConsumer;
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.parser.packrat.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.NonTerminalConsumer;
import org.eclipse.xtext.example.services.DomainmodelGrammarAccess.NamedElementElements;
-import org.eclipse.xtext.example.parser.packrat.consumers.DomainmodelPackageConsumer;
-import org.eclipse.xtext.example.parser.packrat.consumers.DomainmodelTypeConsumer;
-
-@SuppressWarnings("unused")
public final class DomainmodelNamedElementConsumer extends NonTerminalConsumer {
- private NamedElementElements rule;
-
+ private NamedElementElements rule;
+
private INonTerminalConsumer packageConsumer;
+
private INonTerminalConsumer typeConsumer;
- public DomainmodelNamedElementConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
- super(configuration, hiddenTokens);
- }
-
- @Override
- protected int doConsume(int entryPoint) throws Exception {
- return consumeAlternatives$1(entryPoint);
- }
+ private IElementConsumer alternatives$1$Consumer;
- protected int consumeAlternatives$1(int entryPoint) throws Exception {
- int result = doConsumeAlternatives$1(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAlternatives$1(nextEntryPoint());
- }
- return result;
- }
+ private IElementConsumer ruleCall$2$Consumer;
- protected int doConsumeAlternatives$1(int entryPoint) throws Exception {
- final AlternativesResult result = createAlternativesResult(getRule().eleAlternatives());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextAlternative();
- if (result.isAlternativeDone(consumeRuleCall$2(nextEntryPoint()))) {
- return result.getResult();
- }
- case 1:
- result.nextAlternative();
- if (result.isAlternativeDone(consumeRuleCall$3(nextEntryPoint()))) {
- return result.getResult();
- }
- }
- return result.getResult();
- }
+ private IElementConsumer ruleCall$3$Consumer;
- protected int consumeRuleCall$2(int entryPoint) throws Exception {
- int result = doConsumeRuleCall$2(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeRuleCall$2(nextEntryPoint());
+ protected class Alternatives$1$Consumer extends AlternativesConsumer {
+
+ protected Alternatives$1$Consumer(final Alternatives alternatives) {
+ super(alternatives);
+ }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(ruleCall$2$Consumer);
+ acceptor.accept(ruleCall$3$Consumer);
}
- return result;
}
- protected int doConsumeRuleCall$2(int entryPoint) throws Exception {
- return consumeNonTerminal(packageConsumer, null, false, false, false, getRule().ele0ParserRuleCallPackage());
+ protected class RuleCall$2$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$2$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(packageConsumer, null, false, false, false, getElement());
+ }
}
- protected int consumeRuleCall$3(int entryPoint) throws Exception {
- int result = doConsumeRuleCall$3(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeRuleCall$3(nextEntryPoint());
+ protected class RuleCall$3$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$3$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(typeConsumer, null, false, false, false, getElement());
}
- return result;
}
- protected int doConsumeRuleCall$3(int entryPoint) throws Exception {
- return consumeNonTerminal(typeConsumer, null, false, false, false, getRule().ele1ParserRuleCallType());
+ public DomainmodelNamedElementConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
+ super(configuration, hiddenTokens);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return alternatives$1$Consumer.consume();
}
public NamedElementElements getRule() {
@@ -96,6 +83,10 @@ public final class DomainmodelNamedElementConsumer extends NonTerminalConsumer {
public void setRule(NamedElementElements rule) {
this.rule = rule;
+
+ alternatives$1$Consumer = new Alternatives$1$Consumer(rule.eleAlternatives());
+ ruleCall$2$Consumer = new RuleCall$2$Consumer(rule.ele0ParserRuleCallPackage());
+ ruleCall$3$Consumer = new RuleCall$3$Consumer(rule.ele1ParserRuleCallType());
}
@Override
diff --git a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelOperationConsumer.java b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelOperationConsumer.java
index fd09c8b..d5f9059 100644
--- a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelOperationConsumer.java
+++ b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelOperationConsumer.java
@@ -4,320 +4,290 @@
package org.eclipse.xtext.example.parser.packrat.consumers;
import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.AbstractRule;
+import org.eclipse.xtext.Assignment;
+import org.eclipse.xtext.Group;
+import org.eclipse.xtext.Keyword;
+import org.eclipse.xtext.RuleCall;
-import org.eclipse.xtext.parser.packrat.IMarkerFactory.IMarker;
-import org.eclipse.xtext.parser.packrat.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.IElementConsumer;
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.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.NonTerminalConsumer;
import org.eclipse.xtext.parser.packrat.matching.ICharacterClass;
import org.eclipse.xtext.parser.packrat.matching.ISequenceMatcher;
import org.eclipse.xtext.example.services.DomainmodelGrammarAccess.OperationElements;
-import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinIDConsumer;
-import org.eclipse.xtext.example.parser.packrat.consumers.DomainmodelParameterConsumer;
-import org.eclipse.xtext.example.parser.packrat.consumers.DomainmodelTypeRefConsumer;
-
-@SuppressWarnings("unused")
public final class DomainmodelOperationConsumer extends NonTerminalConsumer {
- private OperationElements rule;
-
+ private OperationElements rule;
+
private ITerminalConsumer idConsumer;
+
private INonTerminalConsumer parameterConsumer;
+
private INonTerminalConsumer typeRefConsumer;
+ private IElementConsumer group$1$Consumer;
+
+ private IElementConsumer keyword$7$Consumer;
+
+ private IElementConsumer assignment$8$Consumer;
+
+ private IElementConsumer ruleCall$9$Consumer;
+
+ private IElementConsumer keyword$10$Consumer;
+
+ private IElementConsumer group$11$Consumer;
+
+ private IElementConsumer assignment$12$Consumer;
+
+ private IElementConsumer ruleCall$13$Consumer;
+
+ private IElementConsumer group$14$Consumer;
+
+ private IElementConsumer keyword$15$Consumer;
+
+ private IElementConsumer assignment$16$Consumer;
+
+ private IElementConsumer ruleCall$17$Consumer;
+
+ private IElementConsumer keyword$18$Consumer;
+
+ private IElementConsumer keyword$19$Consumer;
+
+ private IElementConsumer assignment$20$Consumer;
+
+ private IElementConsumer ruleCall$21$Consumer;
+
private ICharacterClass keyword$7$Delimiter;
-
+
private ICharacterClass keyword$10$Delimiter;
-
+
private ICharacterClass keyword$15$Delimiter;
-
+
private ICharacterClass keyword$18$Delimiter;
-
+
private ICharacterClass keyword$19$Delimiter;
-
+
private ISequenceMatcher ruleCall$9$Delimiter;
-
- public DomainmodelOperationConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
- super(configuration, hiddenTokens);
- keyword$7$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$10$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$15$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$18$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$19$Delimiter = ICharacterClass.Factory.nullClass();
- ruleCall$9$Delimiter = ISequenceMatcher.Factory.nullMatcher();
- }
-
- @Override
- protected int doConsume(int entryPoint) throws Exception {
- return consumeGroup$1(entryPoint);
- }
-
- protected int consumeGroup$1(int entryPoint) throws Exception {
- int result = doConsumeGroup$1(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeGroup$1(nextEntryPoint());
- }
- return result;
- }
-
- protected int doConsumeGroup$1(int entryPoint) throws Exception {
- final GroupResult result = createGroupResult(getRule().eleGroup());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$7(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele000000KeywordOp());
- return result.getResult();
- }
- case 1:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$8(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele000001AssignmentName());
- return result.getResult();
- }
- case 2:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$10(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele00001KeywordLeftParenthesis());
- return result.getResult();
- }
- case 3:
- result.nextStep();
- if (result.didGroupFail(consumeGroup$11(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele0001Group());
- return result.getResult();
- }
- case 4:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$18(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele001KeywordRightParenthesis());
- return result.getResult();
- }
- case 5:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$19(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele01KeywordColon());
- return result.getResult();
- }
- case 6:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$20(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele1AssignmentType());
- return result.getResult();
- }
- }
- return result.getResult();
- }
-
- protected int consumeKeyword$7(int entryPoint) throws Exception {
- int result = doConsumeKeyword$7(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$7(nextEntryPoint());
- }
- return result;
- }
-
- protected int doConsumeKeyword$7(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele000000KeywordOp(), null, false, false, getKeyword$7$Delimiter());
- }
-
- protected int consumeAssignment$8(int entryPoint) throws Exception {
- int result = doConsumeAssignment$8(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$8(nextEntryPoint());
- }
- return result;
- }
-
- protected int doConsumeAssignment$8(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele000001AssignmentName());
- return result.getResult(consumeRuleCall$9(entryPoint));
- }
-
- protected int consumeRuleCall$9(int entryPoint) throws Exception {
- return consumeTerminal(idConsumer, "name", false, false, getRule().ele0000010LexerRuleCallID(), getRuleCall$9$Delimiter());
- }
-
- protected int consumeKeyword$10(int entryPoint) throws Exception {
- int result = doConsumeKeyword$10(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$10(nextEntryPoint());
- }
- return result;
- }
-
- protected int doConsumeKeyword$10(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele00001KeywordLeftParenthesis(), null, false, false, getKeyword$10$Delimiter());
- }
-
- protected int consumeGroup$11(int entryPoint) throws Exception {
- IMarker marker = mark();
- int result = doConsumeGroup$11(entryPoint);
- if (result != ConsumeResult.SUCCESS) {
- marker.rollback();
- skipped(getRule().ele0001Group());
- } else
- marker.commit();
- return ConsumeResult.SUCCESS;
- }
-
- protected int doConsumeGroup$11(int entryPoint) throws Exception {
- final GroupResult result = createGroupResult(getRule().ele0001Group());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$12(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele00010AssignmentParams());
- return result.getResult();
- }
- case 1:
- result.nextStep();
- if (result.didGroupFail(consumeGroup$14(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele00011Group());
- return result.getResult();
- }
+
+ protected class Group$1$Consumer extends GroupConsumer {
+
+ protected Group$1$Consumer(final Group group) {
+ super(group);
+ }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(keyword$7$Consumer);
+ acceptor.accept(assignment$8$Consumer);
+ acceptor.accept(keyword$10$Consumer);
+ acceptor.accept(group$11$Consumer);
+ acceptor.accept(keyword$18$Consumer);
+ acceptor.accept(keyword$19$Consumer);
+ acceptor.accept(assignment$20$Consumer);
}
- return result.getResult();
}
- protected int consumeAssignment$12(int entryPoint) throws Exception {
- int result = doConsumeAssignment$12(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$12(nextEntryPoint());
+ protected class Keyword$7$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$7$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$7$Delimiter());
}
- return result;
}
- protected int doConsumeAssignment$12(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele00010AssignmentParams());
- return result.getResult(consumeRuleCall$13(entryPoint));
+ protected class Assignment$8$Consumer extends AssignmentConsumer {
+
+ protected Assignment$8$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$9$Consumer;
+ }
}
- protected int consumeRuleCall$13(int entryPoint) throws Exception {
- return consumeNonTerminal(parameterConsumer, "params", true, false, false, getRule().ele000100ParserRuleCallParameter());
+ protected class RuleCall$9$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$9$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeTerminal(idConsumer, "name", false, false, getElement(), getRuleCall$9$Delimiter());
+ }
}
- protected int consumeGroup$14(int entryPoint) throws Exception {
- IMarker marker = mark();
- while(doConsumeGroup$14(entryPoint) == ConsumeResult.SUCCESS) {
- marker.flush();
+ protected class Keyword$10$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$10$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$10$Delimiter());
}
- marker.rollback();
- skipped(getRule().ele00011Group());
- return ConsumeResult.SUCCESS;
}
- protected int doConsumeGroup$14(int entryPoint) throws Exception {
- final GroupResult result = createGroupResult(getRule().ele00011Group());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$15(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele000110KeywordComma());
- return result.getResult();
- }
- case 1:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$16(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele000111AssignmentParams());
- return result.getResult();
- }
+ protected class Group$11$Consumer extends OptionalGroupConsumer {
+
+ protected Group$11$Consumer(final Group group) {
+ super(group);
+ }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(assignment$12$Consumer);
+ acceptor.accept(group$14$Consumer);
}
- return result.getResult();
}
- protected int consumeKeyword$15(int entryPoint) throws Exception {
- int result = doConsumeKeyword$15(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$15(nextEntryPoint());
+ protected class Assignment$12$Consumer extends AssignmentConsumer {
+
+ protected Assignment$12$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$13$Consumer;
}
- return result;
}
- protected int doConsumeKeyword$15(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele000110KeywordComma(), null, false, false, getKeyword$15$Delimiter());
+ protected class RuleCall$13$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$13$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(parameterConsumer, "params", true, false, false, getElement());
+ }
}
- protected int consumeAssignment$16(int entryPoint) throws Exception {
- int result = doConsumeAssignment$16(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$16(nextEntryPoint());
+ protected class Group$14$Consumer extends LoopGroupConsumer {
+
+ protected Group$14$Consumer(final Group group) {
+ super(group);
+ }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(keyword$15$Consumer);
+ acceptor.accept(assignment$16$Consumer);
}
- return result;
}
- protected int doConsumeAssignment$16(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele000111AssignmentParams());
- return result.getResult(consumeRuleCall$17(entryPoint));
+ protected class Keyword$15$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$15$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$15$Delimiter());
+ }
}
- protected int consumeRuleCall$17(int entryPoint) throws Exception {
- return consumeNonTerminal(parameterConsumer, "params", true, false, false, getRule().ele0001110ParserRuleCallParameter());
+ protected class Assignment$16$Consumer extends AssignmentConsumer {
+
+ protected Assignment$16$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$17$Consumer;
+ }
}
- protected int consumeKeyword$18(int entryPoint) throws Exception {
- int result = doConsumeKeyword$18(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$18(nextEntryPoint());
+ protected class RuleCall$17$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$17$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(parameterConsumer, "params", true, false, false, getElement());
}
- return result;
}
- protected int doConsumeKeyword$18(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele001KeywordRightParenthesis(), null, false, false, getKeyword$18$Delimiter());
+ protected class Keyword$18$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$18$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$18$Delimiter());
+ }
}
- protected int consumeKeyword$19(int entryPoint) throws Exception {
- int result = doConsumeKeyword$19(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$19(nextEntryPoint());
+ protected class Keyword$19$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$19$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$19$Delimiter());
}
- return result;
}
- protected int doConsumeKeyword$19(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele01KeywordColon(), null, false, false, getKeyword$19$Delimiter());
+ protected class Assignment$20$Consumer extends AssignmentConsumer {
+
+ protected Assignment$20$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$21$Consumer;
+ }
}
- protected int consumeAssignment$20(int entryPoint) throws Exception {
- int result = doConsumeAssignment$20(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$20(nextEntryPoint());
+ protected class RuleCall$21$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$21$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(typeRefConsumer, "type", false, false, false, getElement());
}
- return result;
}
- protected int doConsumeAssignment$20(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele1AssignmentType());
- return result.getResult(consumeRuleCall$21(entryPoint));
+ public DomainmodelOperationConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
+ super(configuration, hiddenTokens);
+ keyword$7$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$10$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$15$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$18$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$19$Delimiter = ICharacterClass.Factory.nullClass();
+ ruleCall$9$Delimiter = ISequenceMatcher.Factory.nullMatcher();
}
-
- protected int consumeRuleCall$21(int entryPoint) throws Exception {
- return consumeNonTerminal(typeRefConsumer, "type", false, false, false, getRule().ele10ParserRuleCallTypeRef());
+
+ @Override
+ protected int doConsume() throws Exception {
+ return group$1$Consumer.consume();
}
public OperationElements getRule() {
@@ -326,6 +296,23 @@ public final class DomainmodelOperationConsumer extends NonTerminalConsumer {
public void setRule(OperationElements rule) {
this.rule = rule;
+
+ group$1$Consumer = new Group$1$Consumer(rule.eleGroup());
+ keyword$7$Consumer = new Keyword$7$Consumer(rule.ele000000KeywordOp());
+ assignment$8$Consumer = new Assignment$8$Consumer(rule.ele000001AssignmentName());
+ ruleCall$9$Consumer = new RuleCall$9$Consumer(rule.ele0000010LexerRuleCallID());
+ keyword$10$Consumer = new Keyword$10$Consumer(rule.ele00001KeywordLeftParenthesis());
+ group$11$Consumer = new Group$11$Consumer(rule.ele0001Group());
+ assignment$12$Consumer = new Assignment$12$Consumer(rule.ele00010AssignmentParams());
+ ruleCall$13$Consumer = new RuleCall$13$Consumer(rule.ele000100ParserRuleCallParameter());
+ group$14$Consumer = new Group$14$Consumer(rule.ele00011Group());
+ keyword$15$Consumer = new Keyword$15$Consumer(rule.ele000110KeywordComma());
+ assignment$16$Consumer = new Assignment$16$Consumer(rule.ele000111AssignmentParams());
+ ruleCall$17$Consumer = new RuleCall$17$Consumer(rule.ele0001110ParserRuleCallParameter());
+ keyword$18$Consumer = new Keyword$18$Consumer(rule.ele001KeywordRightParenthesis());
+ keyword$19$Consumer = new Keyword$19$Consumer(rule.ele01KeywordColon());
+ assignment$20$Consumer = new Assignment$20$Consumer(rule.ele1AssignmentType());
+ ruleCall$21$Consumer = new RuleCall$21$Consumer(rule.ele10ParserRuleCallTypeRef());
}
@Override
diff --git a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelPackageConsumer.java b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelPackageConsumer.java
index 5df79af..97ffd56 100644
--- a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelPackageConsumer.java
+++ b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelPackageConsumer.java
@@ -4,172 +4,162 @@
package org.eclipse.xtext.example.parser.packrat.consumers;
import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.AbstractRule;
+import org.eclipse.xtext.Assignment;
+import org.eclipse.xtext.Group;
+import org.eclipse.xtext.Keyword;
+import org.eclipse.xtext.RuleCall;
-import org.eclipse.xtext.parser.packrat.IMarkerFactory.IMarker;
-import org.eclipse.xtext.parser.packrat.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.IElementConsumer;
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.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.NonTerminalConsumer;
import org.eclipse.xtext.parser.packrat.matching.ICharacterClass;
-import org.eclipse.xtext.parser.packrat.matching.ISequenceMatcher;
import org.eclipse.xtext.example.services.DomainmodelGrammarAccess.PackageElements;
-import org.eclipse.xtext.example.parser.packrat.consumers.DomainmodelNamedElementConsumer;
-import org.eclipse.xtext.example.parser.packrat.consumers.DomainmodelQualifiedNameConsumer;
-
-@SuppressWarnings("unused")
public final class DomainmodelPackageConsumer extends NonTerminalConsumer {
- private PackageElements rule;
-
+ private PackageElements rule;
+
private INonTerminalConsumer namedElementConsumer;
+
private INonTerminalConsumer qualifiedNameConsumer;
+ private IElementConsumer group$1$Consumer;
+
+ private IElementConsumer keyword$5$Consumer;
+
+ private IElementConsumer assignment$6$Consumer;
+
+ private IElementConsumer ruleCall$7$Consumer;
+
+ private IElementConsumer keyword$8$Consumer;
+
+ private IElementConsumer assignment$9$Consumer;
+
+ private IElementConsumer ruleCall$10$Consumer;
+
+ private IElementConsumer keyword$11$Consumer;
+
private ICharacterClass keyword$5$Delimiter;
-
+
private ICharacterClass keyword$8$Delimiter;
-
+
private ICharacterClass keyword$11$Delimiter;
-
- public DomainmodelPackageConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
- super(configuration, hiddenTokens);
- keyword$5$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$8$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$11$Delimiter = ICharacterClass.Factory.nullClass();
- }
-
- @Override
- protected int doConsume(int entryPoint) throws Exception {
- return consumeGroup$1(entryPoint);
- }
- protected int consumeGroup$1(int entryPoint) throws Exception {
- int result = doConsumeGroup$1(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeGroup$1(nextEntryPoint());
+ protected class Group$1$Consumer extends GroupConsumer {
+
+ protected Group$1$Consumer(final Group group) {
+ super(group);
}
- return result;
- }
-
- protected int doConsumeGroup$1(int entryPoint) throws Exception {
- final GroupResult result = createGroupResult(getRule().eleGroup());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$5(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele0000KeywordPackage());
- return result.getResult();
- }
- case 1:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$6(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele0001AssignmentName());
- return result.getResult();
- }
- case 2:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$8(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele001KeywordLeftCurlyBracket());
- return result.getResult();
- }
- case 3:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$9(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele01AssignmentNamedElements());
- return result.getResult();
- }
- case 4:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$11(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele1KeywordRightCurlyBracket());
- return result.getResult();
- }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(keyword$5$Consumer);
+ acceptor.accept(assignment$6$Consumer);
+ acceptor.accept(keyword$8$Consumer);
+ acceptor.accept(assignment$9$Consumer);
+ acceptor.accept(keyword$11$Consumer);
}
- return result.getResult();
}
- protected int consumeKeyword$5(int entryPoint) throws Exception {
- int result = doConsumeKeyword$5(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$5(nextEntryPoint());
+ protected class Keyword$5$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$5$Consumer(final Keyword keyword) {
+ super(keyword);
}
- return result;
- }
-
- protected int doConsumeKeyword$5(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele0000KeywordPackage(), null, false, false, getKeyword$5$Delimiter());
- }
-
- protected int consumeAssignment$6(int entryPoint) throws Exception {
- int result = doConsumeAssignment$6(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$6(nextEntryPoint());
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$5$Delimiter());
}
- return result;
}
- protected int doConsumeAssignment$6(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele0001AssignmentName());
- return result.getResult(consumeRuleCall$7(entryPoint));
- }
-
- protected int consumeRuleCall$7(int entryPoint) throws Exception {
- return consumeNonTerminal(qualifiedNameConsumer, "name", false, true, false, getRule().ele00010ParserRuleCallQualifiedName());
- }
-
- protected int consumeKeyword$8(int entryPoint) throws Exception {
- int result = doConsumeKeyword$8(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$8(nextEntryPoint());
+ protected class Assignment$6$Consumer extends AssignmentConsumer {
+
+ protected Assignment$6$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$7$Consumer;
}
- return result;
}
- protected int doConsumeKeyword$8(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele001KeywordLeftCurlyBracket(), null, false, false, getKeyword$8$Delimiter());
+ protected class RuleCall$7$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$7$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(qualifiedNameConsumer, "name", false, true, false, getElement());
+ }
}
- protected int consumeAssignment$9(int entryPoint) throws Exception {
- IMarker marker = mark();
- while(doConsumeAssignment$9(entryPoint) == ConsumeResult.SUCCESS) {
- marker.flush();
+ protected class Keyword$8$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$8$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$8$Delimiter());
}
- marker.rollback();
- skipped(getRule().ele01AssignmentNamedElements());
- return ConsumeResult.SUCCESS;
}
- protected int doConsumeAssignment$9(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele01AssignmentNamedElements());
- return result.getResult(consumeRuleCall$10(entryPoint));
+ protected class Assignment$9$Consumer extends LoopAssignmentConsumer {
+
+ protected Assignment$9$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$10$Consumer;
+ }
}
- protected int consumeRuleCall$10(int entryPoint) throws Exception {
- return consumeNonTerminal(namedElementConsumer, "namedElements", true, false, false, getRule().ele010ParserRuleCallNamedElement());
+ protected class RuleCall$10$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$10$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(namedElementConsumer, "namedElements", true, false, false, getElement());
+ }
}
- protected int consumeKeyword$11(int entryPoint) throws Exception {
- int result = doConsumeKeyword$11(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$11(nextEntryPoint());
+ protected class Keyword$11$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$11$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$11$Delimiter());
}
- return result;
}
- protected int doConsumeKeyword$11(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele1KeywordRightCurlyBracket(), null, false, false, getKeyword$11$Delimiter());
+ public DomainmodelPackageConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
+ super(configuration, hiddenTokens);
+ keyword$5$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$8$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$11$Delimiter = ICharacterClass.Factory.nullClass();
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return group$1$Consumer.consume();
}
public PackageElements getRule() {
@@ -178,6 +168,15 @@ public final class DomainmodelPackageConsumer extends NonTerminalConsumer {
public void setRule(PackageElements rule) {
this.rule = rule;
+
+ group$1$Consumer = new Group$1$Consumer(rule.eleGroup());
+ keyword$5$Consumer = new Keyword$5$Consumer(rule.ele0000KeywordPackage());
+ assignment$6$Consumer = new Assignment$6$Consumer(rule.ele0001AssignmentName());
+ ruleCall$7$Consumer = new RuleCall$7$Consumer(rule.ele00010ParserRuleCallQualifiedName());
+ keyword$8$Consumer = new Keyword$8$Consumer(rule.ele001KeywordLeftCurlyBracket());
+ assignment$9$Consumer = new Assignment$9$Consumer(rule.ele01AssignmentNamedElements());
+ ruleCall$10$Consumer = new RuleCall$10$Consumer(rule.ele010ParserRuleCallNamedElement());
+ keyword$11$Consumer = new Keyword$11$Consumer(rule.ele1KeywordRightCurlyBracket());
}
@Override
diff --git a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelParameterConsumer.java b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelParameterConsumer.java
index 7167c53..a1ada5a 100644
--- a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelParameterConsumer.java
+++ b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelParameterConsumer.java
@@ -4,107 +4,110 @@
package org.eclipse.xtext.example.parser.packrat.consumers;
import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.AbstractRule;
+import org.eclipse.xtext.Assignment;
+import org.eclipse.xtext.Group;
+import org.eclipse.xtext.RuleCall;
-import org.eclipse.xtext.parser.packrat.IMarkerFactory.IMarker;
-import org.eclipse.xtext.parser.packrat.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.IElementConsumer;
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.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.NonTerminalConsumer;
import org.eclipse.xtext.parser.packrat.matching.ISequenceMatcher;
import org.eclipse.xtext.example.services.DomainmodelGrammarAccess.ParameterElements;
-import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinIDConsumer;
-import org.eclipse.xtext.example.parser.packrat.consumers.DomainmodelTypeRefConsumer;
-
-@SuppressWarnings("unused")
public final class DomainmodelParameterConsumer extends NonTerminalConsumer {
- private ParameterElements rule;
-
+ private ParameterElements rule;
+
private ITerminalConsumer idConsumer;
+
private INonTerminalConsumer typeRefConsumer;
+ private IElementConsumer group$1$Consumer;
+
+ private IElementConsumer assignment$2$Consumer;
+
+ private IElementConsumer ruleCall$3$Consumer;
+
+ private IElementConsumer assignment$4$Consumer;
+
+ private IElementConsumer ruleCall$5$Consumer;
+
private ISequenceMatcher ruleCall$3$Delimiter;
-
- public DomainmodelParameterConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
- super(configuration, hiddenTokens);
- ruleCall$3$Delimiter = ISequenceMatcher.Factory.nullMatcher();
- }
-
- @Override
- protected int doConsume(int entryPoint) throws Exception {
- return consumeGroup$1(entryPoint);
- }
- protected int consumeGroup$1(int entryPoint) throws Exception {
- int result = doConsumeGroup$1(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeGroup$1(nextEntryPoint());
+ protected class Group$1$Consumer extends GroupConsumer {
+
+ protected Group$1$Consumer(final Group group) {
+ super(group);
}
- return result;
- }
-
- protected int doConsumeGroup$1(int entryPoint) throws Exception {
- final GroupResult result = createGroupResult(getRule().eleGroup());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$2(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele0AssignmentName());
- return result.getResult();
- }
- case 1:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$4(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele1AssignmentType());
- return result.getResult();
- }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(assignment$2$Consumer);
+ acceptor.accept(assignment$4$Consumer);
}
- return result.getResult();
}
- protected int consumeAssignment$2(int entryPoint) throws Exception {
- int result = doConsumeAssignment$2(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$2(nextEntryPoint());
+ protected class Assignment$2$Consumer extends AssignmentConsumer {
+
+ protected Assignment$2$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$3$Consumer;
}
- return result;
}
- protected int doConsumeAssignment$2(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele0AssignmentName());
- return result.getResult(consumeRuleCall$3(entryPoint));
+ protected class RuleCall$3$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$3$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeTerminal(idConsumer, "name", false, false, getElement(), getRuleCall$3$Delimiter());
+ }
}
- protected int consumeRuleCall$3(int entryPoint) throws Exception {
- return consumeTerminal(idConsumer, "name", false, false, getRule().ele00LexerRuleCallID(), getRuleCall$3$Delimiter());
+ protected class Assignment$4$Consumer extends AssignmentConsumer {
+
+ protected Assignment$4$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$5$Consumer;
+ }
}
- protected int consumeAssignment$4(int entryPoint) throws Exception {
- int result = doConsumeAssignment$4(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$4(nextEntryPoint());
+ protected class RuleCall$5$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$5$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(typeRefConsumer, "type", false, false, false, getElement());
}
- return result;
}
- protected int doConsumeAssignment$4(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele1AssignmentType());
- return result.getResult(consumeRuleCall$5(entryPoint));
+ public DomainmodelParameterConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
+ super(configuration, hiddenTokens);
+ ruleCall$3$Delimiter = ISequenceMatcher.Factory.nullMatcher();
}
-
- protected int consumeRuleCall$5(int entryPoint) throws Exception {
- return consumeNonTerminal(typeRefConsumer, "type", false, false, false, getRule().ele10ParserRuleCallTypeRef());
+
+ @Override
+ protected int doConsume() throws Exception {
+ return group$1$Consumer.consume();
}
public ParameterElements getRule() {
@@ -113,6 +116,12 @@ public final class DomainmodelParameterConsumer extends NonTerminalConsumer {
public void setRule(ParameterElements rule) {
this.rule = rule;
+
+ group$1$Consumer = new Group$1$Consumer(rule.eleGroup());
+ assignment$2$Consumer = new Assignment$2$Consumer(rule.ele0AssignmentName());
+ ruleCall$3$Consumer = new RuleCall$3$Consumer(rule.ele00LexerRuleCallID());
+ assignment$4$Consumer = new Assignment$4$Consumer(rule.ele1AssignmentType());
+ ruleCall$5$Consumer = new RuleCall$5$Consumer(rule.ele10ParserRuleCallTypeRef());
}
@Override
diff --git a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelQualifiedNameConsumer.java b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelQualifiedNameConsumer.java
index 3e8a7dc..eba4050 100644
--- a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelQualifiedNameConsumer.java
+++ b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelQualifiedNameConsumer.java
@@ -4,146 +4,115 @@
package org.eclipse.xtext.example.parser.packrat.consumers;
import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.AbstractRule;
+import org.eclipse.xtext.Group;
+import org.eclipse.xtext.Keyword;
+import org.eclipse.xtext.RuleCall;
-import org.eclipse.xtext.parser.packrat.IMarkerFactory.IMarker;
+import org.eclipse.xtext.parser.packrat.consumers.IElementConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.INonTerminalConsumerConfiguration;
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.example.services.DomainmodelGrammarAccess.QualifiedNameElements;
-import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinIDConsumer;
-
-@SuppressWarnings("unused")
public final class DomainmodelQualifiedNameConsumer extends NonTerminalConsumer {
- private QualifiedNameElements rule;
-
+ private QualifiedNameElements rule;
+
private ITerminalConsumer idConsumer;
+ private IElementConsumer group$1$Consumer;
+
+ private IElementConsumer ruleCall$2$Consumer;
+
+ private IElementConsumer group$3$Consumer;
+
+ private IElementConsumer keyword$4$Consumer;
+
+ private IElementConsumer ruleCall$5$Consumer;
+
private ICharacterClass keyword$4$Delimiter;
-
+
private ISequenceMatcher ruleCall$2$Delimiter;
-
+
private ISequenceMatcher ruleCall$5$Delimiter;
-
- public DomainmodelQualifiedNameConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
- super(configuration, hiddenTokens);
- keyword$4$Delimiter = ICharacterClass.Factory.nullClass();
- ruleCall$2$Delimiter = ISequenceMatcher.Factory.nullMatcher();
- ruleCall$5$Delimiter = ISequenceMatcher.Factory.nullMatcher();
- }
-
- @Override
- protected int doConsume(int entryPoint) throws Exception {
- return consumeGroup$1(entryPoint);
- }
- protected int consumeGroup$1(int entryPoint) throws Exception {
- int result = doConsumeGroup$1(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeGroup$1(nextEntryPoint());
+ protected class Group$1$Consumer extends GroupConsumer {
+
+ protected Group$1$Consumer(final Group group) {
+ super(group);
}
- return result;
- }
-
- protected int doConsumeGroup$1(int entryPoint) throws Exception {
- final GroupResult result = createGroupResult(getRule().eleGroup());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextStep();
- if (result.didGroupFail(consumeRuleCall$2(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele0LexerRuleCallID());
- return result.getResult();
- }
- case 1:
- result.nextStep();
- if (result.didGroupFail(consumeGroup$3(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele1Group());
- return result.getResult();
- }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(ruleCall$2$Consumer);
+ acceptor.accept(group$3$Consumer);
}
- return result.getResult();
}
- protected int consumeRuleCall$2(int entryPoint) throws Exception {
- int result = doConsumeRuleCall$2(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeRuleCall$2(nextEntryPoint());
+ protected class RuleCall$2$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$2$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeTerminal(idConsumer, null, false, false, getElement(), getRuleCall$2$Delimiter());
}
- return result;
- }
-
- protected int doConsumeRuleCall$2(int entryPoint) throws Exception {
- return consumeTerminal(idConsumer, null, false, false, getRule().ele0LexerRuleCallID(), getRuleCall$2$Delimiter());
}
- protected int consumeGroup$3(int entryPoint) throws Exception {
- IMarker marker = mark();
- while(doConsumeGroup$3(entryPoint) == ConsumeResult.SUCCESS) {
- marker.flush();
+ protected class Group$3$Consumer extends LoopGroupConsumer {
+
+ protected Group$3$Consumer(final Group group) {
+ super(group);
}
- marker.rollback();
- skipped(getRule().ele1Group());
- return ConsumeResult.SUCCESS;
- }
-
- protected int doConsumeGroup$3(int entryPoint) throws Exception {
- final GroupResult result = createGroupResult(getRule().ele1Group());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$4(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele10KeywordFullStop());
- return result.getResult();
- }
- case 1:
- result.nextStep();
- if (result.didGroupFail(consumeRuleCall$5(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele11LexerRuleCallID());
- return result.getResult();
- }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(keyword$4$Consumer);
+ acceptor.accept(ruleCall$5$Consumer);
}
- return result.getResult();
}
- protected int consumeKeyword$4(int entryPoint) throws Exception {
- int result = doConsumeKeyword$4(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$4(nextEntryPoint());
+ protected class Keyword$4$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$4$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$4$Delimiter());
}
- return result;
- }
-
- protected int doConsumeKeyword$4(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele10KeywordFullStop(), null, false, false, getKeyword$4$Delimiter());
}
- protected int consumeRuleCall$5(int entryPoint) throws Exception {
- int result = doConsumeRuleCall$5(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeRuleCall$5(nextEntryPoint());
+ protected class RuleCall$5$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$5$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeTerminal(idConsumer, null, false, false, getElement(), getRuleCall$5$Delimiter());
}
- return result;
}
- protected int doConsumeRuleCall$5(int entryPoint) throws Exception {
- return consumeTerminal(idConsumer, null, false, false, getRule().ele11LexerRuleCallID(), getRuleCall$5$Delimiter());
+ public DomainmodelQualifiedNameConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
+ super(configuration, hiddenTokens);
+ keyword$4$Delimiter = ICharacterClass.Factory.nullClass();
+ ruleCall$2$Delimiter = ISequenceMatcher.Factory.nullMatcher();
+ ruleCall$5$Delimiter = ISequenceMatcher.Factory.nullMatcher();
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return group$1$Consumer.consume();
}
public QualifiedNameElements getRule() {
@@ -152,6 +121,12 @@ public final class DomainmodelQualifiedNameConsumer extends NonTerminalConsumer
public void setRule(QualifiedNameElements rule) {
this.rule = rule;
+
+ group$1$Consumer = new Group$1$Consumer(rule.eleGroup());
+ ruleCall$2$Consumer = new RuleCall$2$Consumer(rule.ele0LexerRuleCallID());
+ group$3$Consumer = new Group$3$Consumer(rule.ele1Group());
+ keyword$4$Consumer = new Keyword$4$Consumer(rule.ele10KeywordFullStop());
+ ruleCall$5$Consumer = new RuleCall$5$Consumer(rule.ele11LexerRuleCallID());
}
@Override
diff --git a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelReferenceConsumer.java b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelReferenceConsumer.java
index e321f84..233bfcb 100644
--- a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelReferenceConsumer.java
+++ b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelReferenceConsumer.java
@@ -4,227 +4,213 @@
package org.eclipse.xtext.example.parser.packrat.consumers;
import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.AbstractRule;
+import org.eclipse.xtext.Assignment;
+import org.eclipse.xtext.CrossReference;
+import org.eclipse.xtext.Group;
+import org.eclipse.xtext.Keyword;
+import org.eclipse.xtext.RuleCall;
-import org.eclipse.xtext.parser.packrat.IMarkerFactory.IMarker;
-import org.eclipse.xtext.parser.packrat.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.IElementConsumer;
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.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.NonTerminalConsumer;
import org.eclipse.xtext.parser.packrat.matching.ICharacterClass;
import org.eclipse.xtext.parser.packrat.matching.ISequenceMatcher;
import org.eclipse.xtext.example.services.DomainmodelGrammarAccess.ReferenceElements;
-import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinIDConsumer;
-import org.eclipse.xtext.example.parser.packrat.consumers.DomainmodelTypeRefConsumer;
-
-@SuppressWarnings("unused")
public final class DomainmodelReferenceConsumer extends NonTerminalConsumer {
- private ReferenceElements rule;
-
+ private ReferenceElements rule;
+
private ITerminalConsumer idConsumer;
+
private INonTerminalConsumer typeRefConsumer;
+ private IElementConsumer group$1$Consumer;
+
+ private IElementConsumer keyword$5$Consumer;
+
+ private IElementConsumer assignment$6$Consumer;
+
+ private IElementConsumer ruleCall$7$Consumer;
+
+ private IElementConsumer keyword$8$Consumer;
+
+ private IElementConsumer assignment$9$Consumer;
+
+ private IElementConsumer ruleCall$10$Consumer;
+
+ private IElementConsumer group$11$Consumer;
+
+ private IElementConsumer keyword$12$Consumer;
+
+ private IElementConsumer assignment$13$Consumer;
+
+ private IElementConsumer crossReference$14$Consumer;
+
private ISequenceMatcher crossReference$14$Delimiter;
-
+
private ICharacterClass keyword$5$Delimiter;
-
+
private ICharacterClass keyword$8$Delimiter;
-
+
private ICharacterClass keyword$12$Delimiter;
-
+
private ISequenceMatcher ruleCall$7$Delimiter;
-
- public DomainmodelReferenceConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
- super(configuration, hiddenTokens);
- crossReference$14$Delimiter = ISequenceMatcher.Factory.nullMatcher();
- keyword$5$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$8$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$12$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 {
- int result = doConsumeGroup$1(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeGroup$1(nextEntryPoint());
+ protected class Group$1$Consumer extends GroupConsumer {
+
+ protected Group$1$Consumer(final Group group) {
+ super(group);
}
- return result;
- }
-
- protected int doConsumeGroup$1(int entryPoint) throws Exception {
- final GroupResult result = createGroupResult(getRule().eleGroup());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$5(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele0000KeywordRef());
- return result.getResult();
- }
- case 1:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$6(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele0001AssignmentName());
- return result.getResult();
- }
- case 2:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$8(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele001KeywordColon());
- return result.getResult();
- }
- case 3:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$9(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele01AssignmentType());
- return result.getResult();
- }
- case 4:
- result.nextStep();
- if (result.didGroupFail(consumeGroup$11(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele1Group());
- return result.getResult();
- }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(keyword$5$Consumer);
+ acceptor.accept(assignment$6$Consumer);
+ acceptor.accept(keyword$8$Consumer);
+ acceptor.accept(assignment$9$Consumer);
+ acceptor.accept(group$11$Consumer);
}
- return result.getResult();
}
- protected int consumeKeyword$5(int entryPoint) throws Exception {
- int result = doConsumeKeyword$5(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$5(nextEntryPoint());
+ protected class Keyword$5$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$5$Consumer(final Keyword keyword) {
+ super(keyword);
}
- return result;
- }
-
- protected int doConsumeKeyword$5(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele0000KeywordRef(), null, false, false, getKeyword$5$Delimiter());
- }
-
- protected int consumeAssignment$6(int entryPoint) throws Exception {
- int result = doConsumeAssignment$6(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$6(nextEntryPoint());
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$5$Delimiter());
}
- return result;
- }
-
- protected int doConsumeAssignment$6(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele0001AssignmentName());
- return result.getResult(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 {
- int result = doConsumeKeyword$8(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$8(nextEntryPoint());
+ protected class Assignment$6$Consumer extends AssignmentConsumer {
+
+ protected Assignment$6$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$7$Consumer;
}
- return result;
- }
-
- protected int doConsumeKeyword$8(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele001KeywordColon(), null, false, false, getKeyword$8$Delimiter());
}
- protected int consumeAssignment$9(int entryPoint) throws Exception {
- int result = doConsumeAssignment$9(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$9(nextEntryPoint());
+ protected class RuleCall$7$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$7$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeTerminal(idConsumer, "name", false, false, getElement(), getRuleCall$7$Delimiter());
}
- return result;
}
- protected int doConsumeAssignment$9(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele01AssignmentType());
- return result.getResult(consumeRuleCall$10(entryPoint));
+ protected class Keyword$8$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$8$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$8$Delimiter());
+ }
}
- protected int consumeRuleCall$10(int entryPoint) throws Exception {
- return consumeNonTerminal(typeRefConsumer, "type", false, false, false, getRule().ele010ParserRuleCallTypeRef());
+ protected class Assignment$9$Consumer extends AssignmentConsumer {
+
+ protected Assignment$9$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$10$Consumer;
+ }
}
- protected int consumeGroup$11(int entryPoint) throws Exception {
- IMarker marker = mark();
- int result = doConsumeGroup$11(entryPoint);
- if (result != ConsumeResult.SUCCESS) {
- marker.rollback();
- skipped(getRule().ele1Group());
- } else
- marker.commit();
- return ConsumeResult.SUCCESS;
+ protected class RuleCall$10$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$10$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(typeRefConsumer, "type", false, false, false, getElement());
+ }
}
- protected int doConsumeGroup$11(int entryPoint) throws Exception {
- final GroupResult result = createGroupResult(getRule().ele1Group());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$12(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele10KeywordOpposite());
- return result.getResult();
- }
- case 1:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$13(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele11AssignmentOpposite());
- return result.getResult();
- }
+ protected class Group$11$Consumer extends OptionalGroupConsumer {
+
+ protected Group$11$Consumer(final Group group) {
+ super(group);
+ }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(keyword$12$Consumer);
+ acceptor.accept(assignment$13$Consumer);
}
- return result.getResult();
}
- protected int consumeKeyword$12(int entryPoint) throws Exception {
- int result = doConsumeKeyword$12(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$12(nextEntryPoint());
+ protected class Keyword$12$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$12$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$12$Delimiter());
}
- return result;
}
- protected int doConsumeKeyword$12(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele10KeywordOpposite(), null, false, false, getKeyword$12$Delimiter());
+ protected class Assignment$13$Consumer extends AssignmentConsumer {
+
+ protected Assignment$13$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return crossReference$14$Consumer;
+ }
}
- protected int consumeAssignment$13(int entryPoint) throws Exception {
- int result = doConsumeAssignment$13(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$13(nextEntryPoint());
+ protected class CrossReference$14$Consumer extends ElementConsumer<CrossReference> {
+
+ protected CrossReference$14$Consumer(final CrossReference crossReference) {
+ super(crossReference);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeTerminal(idConsumer, "opposite", false, false, getElement(), getCrossReference$14$Delimiter());
}
- return result;
}
- protected int doConsumeAssignment$13(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele11AssignmentOpposite());
- return result.getResult(consumeCrossReference$14(entryPoint));
+ public DomainmodelReferenceConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
+ super(configuration, hiddenTokens);
+ crossReference$14$Delimiter = ISequenceMatcher.Factory.nullMatcher();
+ keyword$5$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$8$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$12$Delimiter = ICharacterClass.Factory.nullClass();
+ ruleCall$7$Delimiter = ISequenceMatcher.Factory.nullMatcher();
}
-
- protected int consumeCrossReference$14(int entryPoint) throws Exception {
- return consumeTerminal(idConsumer, "opposite", false, false, getRule().ele110CrossReferenceEStringReference(), getCrossReference$14$Delimiter());
+
+ @Override
+ protected int doConsume() throws Exception {
+ return group$1$Consumer.consume();
}
public ReferenceElements getRule() {
@@ -233,6 +219,18 @@ public final class DomainmodelReferenceConsumer extends NonTerminalConsumer {
public void setRule(ReferenceElements rule) {
this.rule = rule;
+
+ group$1$Consumer = new Group$1$Consumer(rule.eleGroup());
+ keyword$5$Consumer = new Keyword$5$Consumer(rule.ele0000KeywordRef());
+ assignment$6$Consumer = new Assignment$6$Consumer(rule.ele0001AssignmentName());
+ ruleCall$7$Consumer = new RuleCall$7$Consumer(rule.ele00010LexerRuleCallID());
+ keyword$8$Consumer = new Keyword$8$Consumer(rule.ele001KeywordColon());
+ assignment$9$Consumer = new Assignment$9$Consumer(rule.ele01AssignmentType());
+ ruleCall$10$Consumer = new RuleCall$10$Consumer(rule.ele010ParserRuleCallTypeRef());
+ group$11$Consumer = new Group$11$Consumer(rule.ele1Group());
+ keyword$12$Consumer = new Keyword$12$Consumer(rule.ele10KeywordOpposite());
+ assignment$13$Consumer = new Assignment$13$Consumer(rule.ele11AssignmentOpposite());
+ crossReference$14$Consumer = new CrossReference$14$Consumer(rule.ele110CrossReferenceEStringReference());
}
@Override
diff --git a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelStructuralFeatureConsumer.java b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelStructuralFeatureConsumer.java
index c7fc17b..4b44403 100644
--- a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelStructuralFeatureConsumer.java
+++ b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelStructuralFeatureConsumer.java
@@ -4,90 +4,77 @@
package org.eclipse.xtext.example.parser.packrat.consumers;
import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.AbstractRule;
+import org.eclipse.xtext.Alternatives;
+import org.eclipse.xtext.RuleCall;
-import org.eclipse.xtext.parser.packrat.IMarkerFactory.IMarker;
-import org.eclipse.xtext.parser.packrat.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.IElementConsumer;
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.parser.packrat.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.NonTerminalConsumer;
import org.eclipse.xtext.example.services.DomainmodelGrammarAccess.StructuralFeatureElements;
-import org.eclipse.xtext.example.parser.packrat.consumers.DomainmodelAttributeConsumer;
-import org.eclipse.xtext.example.parser.packrat.consumers.DomainmodelReferenceConsumer;
-
-@SuppressWarnings("unused")
public final class DomainmodelStructuralFeatureConsumer extends NonTerminalConsumer {
- private StructuralFeatureElements rule;
-
+ private StructuralFeatureElements rule;
+
private INonTerminalConsumer attributeConsumer;
+
private INonTerminalConsumer referenceConsumer;
- public DomainmodelStructuralFeatureConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
- super(configuration, hiddenTokens);
- }
-
- @Override
- protected int doConsume(int entryPoint) throws Exception {
- return consumeAlternatives$1(entryPoint);
- }
+ private IElementConsumer alternatives$1$Consumer;
- protected int consumeAlternatives$1(int entryPoint) throws Exception {
- int result = doConsumeAlternatives$1(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAlternatives$1(nextEntryPoint());
- }
- return result;
- }
+ private IElementConsumer ruleCall$2$Consumer;
- protected int doConsumeAlternatives$1(int entryPoint) throws Exception {
- final AlternativesResult result = createAlternativesResult(getRule().eleAlternatives());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextAlternative();
- if (result.isAlternativeDone(consumeRuleCall$2(nextEntryPoint()))) {
- return result.getResult();
- }
- case 1:
- result.nextAlternative();
- if (result.isAlternativeDone(consumeRuleCall$3(nextEntryPoint()))) {
- return result.getResult();
- }
- }
- return result.getResult();
- }
+ private IElementConsumer ruleCall$3$Consumer;
- protected int consumeRuleCall$2(int entryPoint) throws Exception {
- int result = doConsumeRuleCall$2(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeRuleCall$2(nextEntryPoint());
+ protected class Alternatives$1$Consumer extends AlternativesConsumer {
+
+ protected Alternatives$1$Consumer(final Alternatives alternatives) {
+ super(alternatives);
+ }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(ruleCall$2$Consumer);
+ acceptor.accept(ruleCall$3$Consumer);
}
- return result;
}
- protected int doConsumeRuleCall$2(int entryPoint) throws Exception {
- return consumeNonTerminal(attributeConsumer, null, false, false, false, getRule().ele0ParserRuleCallAttribute());
+ protected class RuleCall$2$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$2$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(attributeConsumer, null, false, false, false, getElement());
+ }
}
- protected int consumeRuleCall$3(int entryPoint) throws Exception {
- int result = doConsumeRuleCall$3(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeRuleCall$3(nextEntryPoint());
+ protected class RuleCall$3$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$3$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(referenceConsumer, null, false, false, false, getElement());
}
- return result;
}
- protected int doConsumeRuleCall$3(int entryPoint) throws Exception {
- return consumeNonTerminal(referenceConsumer, null, false, false, false, getRule().ele1ParserRuleCallReference());
+ public DomainmodelStructuralFeatureConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
+ super(configuration, hiddenTokens);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return alternatives$1$Consumer.consume();
}
public StructuralFeatureElements getRule() {
@@ -96,6 +83,10 @@ public final class DomainmodelStructuralFeatureConsumer extends NonTerminalConsu
public void setRule(StructuralFeatureElements rule) {
this.rule = rule;
+
+ alternatives$1$Consumer = new Alternatives$1$Consumer(rule.eleAlternatives());
+ ruleCall$2$Consumer = new RuleCall$2$Consumer(rule.ele0ParserRuleCallAttribute());
+ ruleCall$3$Consumer = new RuleCall$3$Consumer(rule.ele1ParserRuleCallReference());
}
@Override
diff --git a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelTypeConsumer.java b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelTypeConsumer.java
index 0d6ced3..00379d7 100644
--- a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelTypeConsumer.java
+++ b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelTypeConsumer.java
@@ -4,90 +4,77 @@
package org.eclipse.xtext.example.parser.packrat.consumers;
import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.AbstractRule;
+import org.eclipse.xtext.Alternatives;
+import org.eclipse.xtext.RuleCall;
-import org.eclipse.xtext.parser.packrat.IMarkerFactory.IMarker;
-import org.eclipse.xtext.parser.packrat.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.IElementConsumer;
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.parser.packrat.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.NonTerminalConsumer;
import org.eclipse.xtext.example.services.DomainmodelGrammarAccess.TypeElements;
-import org.eclipse.xtext.example.parser.packrat.consumers.DomainmodelDataTypeConsumer;
-import org.eclipse.xtext.example.parser.packrat.consumers.DomainmodelEntityConsumer;
-
-@SuppressWarnings("unused")
public final class DomainmodelTypeConsumer extends NonTerminalConsumer {
- private TypeElements rule;
-
+ private TypeElements rule;
+
private INonTerminalConsumer dataTypeConsumer;
+
private INonTerminalConsumer entityConsumer;
- public DomainmodelTypeConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
- super(configuration, hiddenTokens);
- }
-
- @Override
- protected int doConsume(int entryPoint) throws Exception {
- return consumeAlternatives$1(entryPoint);
- }
+ private IElementConsumer alternatives$1$Consumer;
- protected int consumeAlternatives$1(int entryPoint) throws Exception {
- int result = doConsumeAlternatives$1(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAlternatives$1(nextEntryPoint());
- }
- return result;
- }
+ private IElementConsumer ruleCall$2$Consumer;
- protected int doConsumeAlternatives$1(int entryPoint) throws Exception {
- final AlternativesResult result = createAlternativesResult(getRule().eleAlternatives());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextAlternative();
- if (result.isAlternativeDone(consumeRuleCall$2(nextEntryPoint()))) {
- return result.getResult();
- }
- case 1:
- result.nextAlternative();
- if (result.isAlternativeDone(consumeRuleCall$3(nextEntryPoint()))) {
- return result.getResult();
- }
- }
- return result.getResult();
- }
+ private IElementConsumer ruleCall$3$Consumer;
- protected int consumeRuleCall$2(int entryPoint) throws Exception {
- int result = doConsumeRuleCall$2(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeRuleCall$2(nextEntryPoint());
+ protected class Alternatives$1$Consumer extends AlternativesConsumer {
+
+ protected Alternatives$1$Consumer(final Alternatives alternatives) {
+ super(alternatives);
+ }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(ruleCall$2$Consumer);
+ acceptor.accept(ruleCall$3$Consumer);
}
- return result;
}
- protected int doConsumeRuleCall$2(int entryPoint) throws Exception {
- return consumeNonTerminal(entityConsumer, null, false, false, false, getRule().ele0ParserRuleCallEntity());
+ protected class RuleCall$2$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$2$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(entityConsumer, null, false, false, false, getElement());
+ }
}
- protected int consumeRuleCall$3(int entryPoint) throws Exception {
- int result = doConsumeRuleCall$3(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeRuleCall$3(nextEntryPoint());
+ protected class RuleCall$3$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$3$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(dataTypeConsumer, null, false, false, false, getElement());
}
- return result;
}
- protected int doConsumeRuleCall$3(int entryPoint) throws Exception {
- return consumeNonTerminal(dataTypeConsumer, null, false, false, false, getRule().ele1ParserRuleCallDataType());
+ public DomainmodelTypeConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
+ super(configuration, hiddenTokens);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return alternatives$1$Consumer.consume();
}
public TypeElements getRule() {
@@ -96,6 +83,10 @@ public final class DomainmodelTypeConsumer extends NonTerminalConsumer {
public void setRule(TypeElements rule) {
this.rule = rule;
+
+ alternatives$1$Consumer = new Alternatives$1$Consumer(rule.eleAlternatives());
+ ruleCall$2$Consumer = new RuleCall$2$Consumer(rule.ele0ParserRuleCallEntity());
+ ruleCall$3$Consumer = new RuleCall$3$Consumer(rule.ele1ParserRuleCallDataType());
}
@Override
diff --git a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelTypeRefConsumer.java b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelTypeRefConsumer.java
index 4815e83..6d31dbf 100644
--- a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelTypeRefConsumer.java
+++ b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelTypeRefConsumer.java
@@ -4,57 +4,63 @@
package org.eclipse.xtext.example.parser.packrat.consumers;
import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.AbstractRule;
+import org.eclipse.xtext.Assignment;
+import org.eclipse.xtext.CrossReference;
-import org.eclipse.xtext.parser.packrat.IMarkerFactory.IMarker;
+import org.eclipse.xtext.parser.packrat.consumers.IElementConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.INonTerminalConsumerConfiguration;
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.example.services.DomainmodelGrammarAccess.TypeRefElements;
-import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinIDConsumer;
-
-@SuppressWarnings("unused")
public final class DomainmodelTypeRefConsumer extends NonTerminalConsumer {
- private TypeRefElements rule;
-
+ private TypeRefElements rule;
+
private ITerminalConsumer idConsumer;
+ private IElementConsumer assignment$1$Consumer;
+
+ private IElementConsumer crossReference$2$Consumer;
+
private ISequenceMatcher crossReference$2$Delimiter;
-
- public DomainmodelTypeRefConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
- super(configuration, hiddenTokens);
- crossReference$2$Delimiter = ISequenceMatcher.Factory.nullMatcher();
- }
-
- @Override
- protected int doConsume(int entryPoint) throws Exception {
- return consumeAssignment$1(entryPoint);
- }
- protected int consumeAssignment$1(int entryPoint) throws Exception {
- int result = doConsumeAssignment$1(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$1(nextEntryPoint());
+ protected class Assignment$1$Consumer extends AssignmentConsumer {
+
+ protected Assignment$1$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return crossReference$2$Consumer;
}
- return result;
}
- protected int doConsumeAssignment$1(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().eleAssignmentReferenced());
- return result.getResult(consumeCrossReference$2(entryPoint));
+ protected class CrossReference$2$Consumer extends ElementConsumer<CrossReference> {
+
+ protected CrossReference$2$Consumer(final CrossReference crossReference) {
+ super(crossReference);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeTerminal(idConsumer, "referenced", false, false, getElement(), getCrossReference$2$Delimiter());
+ }
}
- protected int consumeCrossReference$2(int entryPoint) throws Exception {
- return consumeTerminal(idConsumer, "referenced", false, false, getRule().ele0CrossReferenceEStringType(), getCrossReference$2$Delimiter());
+ public DomainmodelTypeRefConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
+ super(configuration, hiddenTokens);
+ crossReference$2$Delimiter = ISequenceMatcher.Factory.nullMatcher();
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return assignment$1$Consumer.consume();
}
public TypeRefElements getRule() {
@@ -63,6 +69,9 @@ public final class DomainmodelTypeRefConsumer extends NonTerminalConsumer {
public void setRule(TypeRefElements rule) {
this.rule = rule;
+
+ assignment$1$Consumer = new Assignment$1$Consumer(rule.eleAssignmentReferenced());
+ crossReference$2$Consumer = new CrossReference$2$Consumer(rule.ele0CrossReferenceEStringType());
}
@Override
diff --git a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelTypedElementConsumer.java b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelTypedElementConsumer.java
index c9f2777..5f2f7a2 100644
--- a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelTypedElementConsumer.java
+++ b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelTypedElementConsumer.java
@@ -4,90 +4,77 @@
package org.eclipse.xtext.example.parser.packrat.consumers;
import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.AbstractRule;
+import org.eclipse.xtext.Alternatives;
+import org.eclipse.xtext.RuleCall;
-import org.eclipse.xtext.parser.packrat.IMarkerFactory.IMarker;
-import org.eclipse.xtext.parser.packrat.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.IElementConsumer;
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.parser.packrat.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.NonTerminalConsumer;
import org.eclipse.xtext.example.services.DomainmodelGrammarAccess.TypedElementElements;
-import org.eclipse.xtext.example.parser.packrat.consumers.DomainmodelFeatureConsumer;
-import org.eclipse.xtext.example.parser.packrat.consumers.DomainmodelParameterConsumer;
-
-@SuppressWarnings("unused")
public final class DomainmodelTypedElementConsumer extends NonTerminalConsumer {
- private TypedElementElements rule;
-
+ private TypedElementElements rule;
+
private INonTerminalConsumer featureConsumer;
+
private INonTerminalConsumer parameterConsumer;
- public DomainmodelTypedElementConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
- super(configuration, hiddenTokens);
- }
-
- @Override
- protected int doConsume(int entryPoint) throws Exception {
- return consumeAlternatives$1(entryPoint);
- }
+ private IElementConsumer alternatives$1$Consumer;
- protected int consumeAlternatives$1(int entryPoint) throws Exception {
- int result = doConsumeAlternatives$1(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAlternatives$1(nextEntryPoint());
- }
- return result;
- }
+ private IElementConsumer ruleCall$2$Consumer;
- protected int doConsumeAlternatives$1(int entryPoint) throws Exception {
- final AlternativesResult result = createAlternativesResult(getRule().eleAlternatives());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextAlternative();
- if (result.isAlternativeDone(consumeRuleCall$2(nextEntryPoint()))) {
- return result.getResult();
- }
- case 1:
- result.nextAlternative();
- if (result.isAlternativeDone(consumeRuleCall$3(nextEntryPoint()))) {
- return result.getResult();
- }
- }
- return result.getResult();
- }
+ private IElementConsumer ruleCall$3$Consumer;
- protected int consumeRuleCall$2(int entryPoint) throws Exception {
- int result = doConsumeRuleCall$2(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeRuleCall$2(nextEntryPoint());
+ protected class Alternatives$1$Consumer extends AlternativesConsumer {
+
+ protected Alternatives$1$Consumer(final Alternatives alternatives) {
+ super(alternatives);
+ }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(ruleCall$2$Consumer);
+ acceptor.accept(ruleCall$3$Consumer);
}
- return result;
}
- protected int doConsumeRuleCall$2(int entryPoint) throws Exception {
- return consumeNonTerminal(featureConsumer, null, false, false, false, getRule().ele0ParserRuleCallFeature());
+ protected class RuleCall$2$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$2$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(featureConsumer, null, false, false, false, getElement());
+ }
}
- protected int consumeRuleCall$3(int entryPoint) throws Exception {
- int result = doConsumeRuleCall$3(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeRuleCall$3(nextEntryPoint());
+ protected class RuleCall$3$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$3$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(parameterConsumer, null, false, false, false, getElement());
}
- return result;
}
- protected int doConsumeRuleCall$3(int entryPoint) throws Exception {
- return consumeNonTerminal(parameterConsumer, null, false, false, false, getRule().ele1ParserRuleCallParameter());
+ public DomainmodelTypedElementConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
+ super(configuration, hiddenTokens);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return alternatives$1$Consumer.consume();
}
public TypedElementElements getRule() {
@@ -96,6 +83,10 @@ public final class DomainmodelTypedElementConsumer extends NonTerminalConsumer {
public void setRule(TypedElementElements rule) {
this.rule = rule;
+
+ alternatives$1$Consumer = new Alternatives$1$Consumer(rule.eleAlternatives());
+ ruleCall$2$Consumer = new RuleCall$2$Consumer(rule.ele0ParserRuleCallFeature());
+ ruleCall$3$Consumer = new RuleCall$3$Consumer(rule.ele1ParserRuleCallParameter());
}
@Override
diff --git a/examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/EcoreDslDelimiters.java b/examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/EcoreDslDelimiters.java
index 5ae959b..68388cd 100644
--- a/examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/EcoreDslDelimiters.java
+++ b/examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/EcoreDslDelimiters.java
@@ -7,7 +7,6 @@ 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 EcoreDslDelimiters {
private EcoreDslDelimiters() {
@@ -15,18 +14,18 @@ public final class EcoreDslDelimiters {
}
// TODO: remove hardcoded character class from template
- public static ICharacterClass keyword$14$Delimiter = ICharacterClass.Factory.join(
+ public static final ICharacterClass keyword$14$Delimiter = ICharacterClass.Factory.join(
ICharacterClass.Factory.createRange('a', 'z'),
ICharacterClass.Factory.createRange('A', 'Z'),
ICharacterClass.Factory.create('_'),
ICharacterClass.Factory.createRange('0', '9')
);
- public static ICharacterClass keyword$18$Delimiter = ICharacterClass.Factory.nullClass();
+ public static final ICharacterClass keyword$18$Delimiter = ICharacterClass.Factory.nullClass();
- public static ISequenceMatcher ruleCall$17$Delimiter = new SetBasedKeywordMatcher(
+ public static final ISequenceMatcher ruleCall$17$Delimiter = new SetBasedKeywordMatcher(
"import", "package", "nsURI", "nsPrefix", "datatype", "abstract", "interface", "class", "extends", "ID", "bag", "random", "readonly", "volatile", "transient", "unsettable", "derived", "attr", "local", "val", "ref", "enum", "super", "op", "void", "throws");
- public static ISequenceMatcher ruleCall$20$Delimiter = ISequenceMatcher.Factory.nullMatcher();
+ public static final ISequenceMatcher ruleCall$20$Delimiter = ISequenceMatcher.Factory.nullMatcher();
}
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 caa6b0e..f688d32 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
@@ -5,7 +5,6 @@ package org.eclipse.xtext.example.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.example.services.EcoreDslGrammarAccess;
@@ -43,10 +42,9 @@ import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinSL_COMMENT
import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinWSConsumer;
import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinANY_OTHERConsumer;
-@SuppressWarnings("unused")
public class EcoreDslParserConfiguration extends AbstractParserConfiguration {
- private XtextBuiltinParserConfiguration xtextBuiltinConfiguration;
+ private final XtextBuiltinParserConfiguration xtextBuiltinConfiguration;
private EcoreDslEcoreDslConsumer ecoreDslConsumer;
private EcoreDslImportStatementDeclConsumer importStatementDeclConsumer;
diff --git a/examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslEAnnotationDeclConsumer.java b/examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslEAnnotationDeclConsumer.java
index dfe06f9..244f941 100644
--- a/examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslEAnnotationDeclConsumer.java
+++ b/examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslEAnnotationDeclConsumer.java
@@ -4,277 +4,262 @@
package org.eclipse.xtext.example.parser.packrat.consumers;
import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.AbstractRule;
+import org.eclipse.xtext.Assignment;
+import org.eclipse.xtext.CrossReference;
+import org.eclipse.xtext.Group;
+import org.eclipse.xtext.Keyword;
+import org.eclipse.xtext.RuleCall;
-import org.eclipse.xtext.parser.packrat.IMarkerFactory.IMarker;
-import org.eclipse.xtext.parser.packrat.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.IElementConsumer;
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.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.NonTerminalConsumer;
import org.eclipse.xtext.parser.packrat.matching.ICharacterClass;
import org.eclipse.xtext.parser.packrat.matching.ISequenceMatcher;
import org.eclipse.xtext.example.services.EcoreDslGrammarAccess.EAnnotationDeclElements;
-import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinIDConsumer;
-import org.eclipse.xtext.example.parser.packrat.consumers.EcoreDslMapEntrySuperConsumer;
-import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinSTRINGConsumer;
-
-@SuppressWarnings("unused")
public final class EcoreDslEAnnotationDeclConsumer extends NonTerminalConsumer {
- private EAnnotationDeclElements rule;
-
+ private EAnnotationDeclElements rule;
+
private ITerminalConsumer idConsumer;
+
private INonTerminalConsumer mapEntrySuperConsumer;
+
private ITerminalConsumer stringConsumer;
+ private IElementConsumer group$1$Consumer;
+
+ private IElementConsumer keyword$7$Consumer;
+
+ private IElementConsumer assignment$8$Consumer;
+
+ private IElementConsumer ruleCall$9$Consumer;
+
+ private IElementConsumer assignment$10$Consumer;
+
+ private IElementConsumer crossReference$11$Consumer;
+
+ private IElementConsumer keyword$13$Consumer;
+
+ private IElementConsumer assignment$14$Consumer;
+
+ private IElementConsumer ruleCall$15$Consumer;
+
+ private IElementConsumer group$16$Consumer;
+
+ private IElementConsumer keyword$17$Consumer;
+
+ private IElementConsumer assignment$18$Consumer;
+
+ private IElementConsumer ruleCall$19$Consumer;
+
+ private IElementConsumer keyword$20$Consumer;
+
private ISequenceMatcher crossReference$11$Delimiter;
-
+
private ICharacterClass keyword$7$Delimiter;
-
+
private ICharacterClass keyword$13$Delimiter;
-
+
private ICharacterClass keyword$17$Delimiter;
-
+
private ICharacterClass keyword$20$Delimiter;
-
+
private ISequenceMatcher ruleCall$9$Delimiter;
-
- public EcoreDslEAnnotationDeclConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
- super(configuration, hiddenTokens);
- crossReference$11$Delimiter = ISequenceMatcher.Factory.nullMatcher();
- keyword$7$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$13$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$17$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$20$Delimiter = ICharacterClass.Factory.nullClass();
- ruleCall$9$Delimiter = ISequenceMatcher.Factory.nullMatcher();
- }
-
- @Override
- protected int doConsume(int entryPoint) throws Exception {
- return consumeGroup$1(entryPoint);
- }
- protected int consumeGroup$1(int entryPoint) throws Exception {
- int result = doConsumeGroup$1(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeGroup$1(nextEntryPoint());
+ protected class Group$1$Consumer extends GroupConsumer {
+
+ protected Group$1$Consumer(final Group group) {
+ super(group);
}
- return result;
- }
-
- protected int doConsumeGroup$1(int entryPoint) throws Exception {
- final GroupResult result = createGroupResult(getRule().eleGroup());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$7(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele000000KeywordCommercialAt());
- return result.getResult();
- }
- case 1:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$8(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele000001AssignmentSource());
- return result.getResult();
- }
- case 2:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$10(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele00001AssignmentEModelElement());
- return result.getResult();
- }
- case 3:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$13(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele0001KeywordLeftParenthesis());
- return result.getResult();
- }
- case 4:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$14(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele001AssignmentContents());
- return result.getResult();
- }
- case 5:
- result.nextStep();
- if (result.didGroupFail(consumeGroup$16(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele01Group());
- return result.getResult();
- }
- case 6:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$20(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele1KeywordRightParenthesis());
- return result.getResult();
- }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(keyword$7$Consumer);
+ acceptor.accept(assignment$8$Consumer);
+ acceptor.accept(assignment$10$Consumer);
+ acceptor.accept(keyword$13$Consumer);
+ acceptor.accept(assignment$14$Consumer);
+ acceptor.accept(group$16$Consumer);
+ acceptor.accept(keyword$20$Consumer);
}
- return result.getResult();
}
- protected int consumeKeyword$7(int entryPoint) throws Exception {
- int result = doConsumeKeyword$7(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$7(nextEntryPoint());
+ protected class Keyword$7$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$7$Consumer(final Keyword keyword) {
+ super(keyword);
}
- return result;
- }
-
- protected int doConsumeKeyword$7(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele000000KeywordCommercialAt(), null, false, false, getKeyword$7$Delimiter());
- }
-
- protected int consumeAssignment$8(int entryPoint) throws Exception {
- int result = doConsumeAssignment$8(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$8(nextEntryPoint());
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$7$Delimiter());
}
- return result;
- }
-
- protected int doConsumeAssignment$8(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele000001AssignmentSource());
- return result.getResult(consumeRuleCall$9(entryPoint));
- }
-
- protected int consumeRuleCall$9(int entryPoint) throws Exception {
- return consumeTerminal(stringConsumer, "source", false, false, getRule().ele0000010LexerRuleCallSTRING(), getRuleCall$9$Delimiter());
- }
-
- protected int consumeAssignment$10(int entryPoint) throws Exception {
- IMarker marker = mark();
- int result = doConsumeAssignment$10(entryPoint);
- if (result != ConsumeResult.SUCCESS) {
- marker.rollback();
- skipped(getRule().ele00001AssignmentEModelElement());
- } else
- marker.commit();
- return ConsumeResult.SUCCESS;
- }
-
- protected int doConsumeAssignment$10(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele00001AssignmentEModelElement());
- return result.getResult(consumeCrossReference$11(entryPoint));
}
- protected int consumeCrossReference$11(int entryPoint) throws Exception {
- return consumeTerminal(idConsumer, "eModelElement", false, false, getRule().ele000010CrossReferenceEStringEModelElement(), getCrossReference$11$Delimiter());
- }
-
- protected int consumeKeyword$13(int entryPoint) throws Exception {
- int result = doConsumeKeyword$13(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$13(nextEntryPoint());
+ protected class Assignment$8$Consumer extends AssignmentConsumer {
+
+ protected Assignment$8$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$9$Consumer;
}
- return result;
}
- protected int doConsumeKeyword$13(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele0001KeywordLeftParenthesis(), null, false, false, getKeyword$13$Delimiter());
+ protected class RuleCall$9$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$9$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeTerminal(stringConsumer, "source", false, false, getElement(), getRuleCall$9$Delimiter());
+ }
}
- protected int consumeAssignment$14(int entryPoint) throws Exception {
- int result = doConsumeAssignment$14(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$14(nextEntryPoint());
+ protected class Assignment$10$Consumer extends OptionalAssignmentConsumer {
+
+ protected Assignment$10$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return crossReference$11$Consumer;
}
- return result;
}
- protected int doConsumeAssignment$14(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele001AssignmentContents());
- return result.getResult(consumeRuleCall$15(entryPoint));
+ protected class CrossReference$11$Consumer extends ElementConsumer<CrossReference> {
+
+ protected CrossReference$11$Consumer(final CrossReference crossReference) {
+ super(crossReference);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeTerminal(idConsumer, "eModelElement", false, false, getElement(), getCrossReference$11$Delimiter());
+ }
}
- protected int consumeRuleCall$15(int entryPoint) throws Exception {
- return consumeNonTerminal(mapEntrySuperConsumer, "contents", true, false, false, getRule().ele0010ParserRuleCallMapEntrySuper());
+ protected class Keyword$13$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$13$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$13$Delimiter());
+ }
}
- protected int consumeGroup$16(int entryPoint) throws Exception {
- IMarker marker = mark();
- while(doConsumeGroup$16(entryPoint) == ConsumeResult.SUCCESS) {
- marker.flush();
+ protected class Assignment$14$Consumer extends AssignmentConsumer {
+
+ protected Assignment$14$Consumer(final Assignment assignment) {
+ super(assignment);
}
- marker.rollback();
- skipped(getRule().ele01Group());
- return ConsumeResult.SUCCESS;
- }
-
- protected int doConsumeGroup$16(int entryPoint) throws Exception {
- final GroupResult result = createGroupResult(getRule().ele01Group());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$17(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele010KeywordComma());
- return result.getResult();
- }
- case 1:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$18(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele011AssignmentContents());
- return result.getResult();
- }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$15$Consumer;
}
- return result.getResult();
}
- protected int consumeKeyword$17(int entryPoint) throws Exception {
- int result = doConsumeKeyword$17(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$17(nextEntryPoint());
+ protected class RuleCall$15$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$15$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(mapEntrySuperConsumer, "contents", true, false, false, getElement());
}
- return result;
}
- protected int doConsumeKeyword$17(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele010KeywordComma(), null, false, false, getKeyword$17$Delimiter());
+ protected class Group$16$Consumer extends LoopGroupConsumer {
+
+ protected Group$16$Consumer(final Group group) {
+ super(group);
+ }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(keyword$17$Consumer);
+ acceptor.accept(assignment$18$Consumer);
+ }
}
- protected int consumeAssignment$18(int entryPoint) throws Exception {
- int result = doConsumeAssignment$18(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$18(nextEntryPoint());
+ protected class Keyword$17$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$17$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$17$Delimiter());
}
- return result;
}
- protected int doConsumeAssignment$18(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele011AssignmentContents());
- return result.getResult(consumeRuleCall$19(entryPoint));
+ protected class Assignment$18$Consumer extends AssignmentConsumer {
+
+ protected Assignment$18$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$19$Consumer;
+ }
}
- protected int consumeRuleCall$19(int entryPoint) throws Exception {
- return consumeNonTerminal(mapEntrySuperConsumer, "contents", true, false, false, getRule().ele0110ParserRuleCallMapEntrySuper());
+ protected class RuleCall$19$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$19$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(mapEntrySuperConsumer, "contents", true, false, false, getElement());
+ }
}
- protected int consumeKeyword$20(int entryPoint) throws Exception {
- int result = doConsumeKeyword$20(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$20(nextEntryPoint());
+ protected class Keyword$20$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$20$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$20$Delimiter());
}
- return result;
}
- protected int doConsumeKeyword$20(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele1KeywordRightParenthesis(), null, false, false, getKeyword$20$Delimiter());
+ public EcoreDslEAnnotationDeclConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
+ super(configuration, hiddenTokens);
+ crossReference$11$Delimiter = ISequenceMatcher.Factory.nullMatcher();
+ keyword$7$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$13$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$17$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$20$Delimiter = ICharacterClass.Factory.nullClass();
+ ruleCall$9$Delimiter = ISequenceMatcher.Factory.nullMatcher();
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return group$1$Consumer.consume();
}
public EAnnotationDeclElements getRule() {
@@ -283,6 +268,21 @@ public final class EcoreDslEAnnotationDeclConsumer extends NonTerminalConsumer {
public void setRule(EAnnotationDeclElements rule) {
this.rule = rule;
+
+ group$1$Consumer = new Group$1$Consumer(rule.eleGroup());
+ keyword$7$Consumer = new Keyword$7$Consumer(rule.ele000000KeywordCommercialAt());
+ assignment$8$Consumer = new Assignment$8$Consumer(rule.ele000001AssignmentSource());
+ ruleCall$9$Consumer = new RuleCall$9$Consumer(rule.ele0000010LexerRuleCallSTRING());
+ assignment$10$Consumer = new Assignment$10$Consumer(rule.ele00001AssignmentEModelElement());
+ crossReference$11$Consumer = new CrossReference$11$Consumer(rule.ele000010CrossReferenceEStringEModelElement());
+ keyword$13$Consumer = new Keyword$13$Consumer(rule.ele0001KeywordLeftParenthesis());
+ assignment$14$Consumer = new Assignment$14$Consumer(rule.ele001AssignmentContents());
+ ruleCall$15$Consumer = new RuleCall$15$Consumer(rule.ele0010ParserRuleCallMapEntrySuper());
+ group$16$Consumer = new Group$16$Consumer(rule.ele01Group());
+ keyword$17$Consumer = new Keyword$17$Consumer(rule.ele010KeywordComma());
+ assignment$18$Consumer = new Assignment$18$Consumer(rule.ele011AssignmentContents());
+ ruleCall$19$Consumer = new RuleCall$19$Consumer(rule.ele0110ParserRuleCallMapEntrySuper());
+ keyword$20$Consumer = new Keyword$20$Consumer(rule.ele1KeywordRightParenthesis());
}
@Override
diff --git a/examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslEAttributeDeclConsumer.java b/examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslEAttributeDeclConsumer.java
index 1c5f22e..870a35f 100644
--- a/examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslEAttributeDeclConsumer.java
+++ b/examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslEAttributeDeclConsumer.java
@@ -4,658 +4,663 @@
package org.eclipse.xtext.example.parser.packrat.consumers;
import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.AbstractRule;
+import org.eclipse.xtext.Alternatives;
+import org.eclipse.xtext.Assignment;
+import org.eclipse.xtext.Group;
+import org.eclipse.xtext.Keyword;
+import org.eclipse.xtext.RuleCall;
-import org.eclipse.xtext.parser.packrat.IMarkerFactory.IMarker;
-import org.eclipse.xtext.parser.packrat.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.IElementConsumer;
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.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.NonTerminalConsumer;
import org.eclipse.xtext.parser.packrat.matching.ICharacterClass;
import org.eclipse.xtext.parser.packrat.matching.ISequenceMatcher;
import org.eclipse.xtext.example.services.EcoreDslGrammarAccess.EAttributeDeclElements;
-import org.eclipse.xtext.example.parser.packrat.consumers.EcoreDslEAnnotationDeclConsumer;
-import org.eclipse.xtext.example.parser.packrat.consumers.EcoreDslEGenericTypeReferenceDeclConsumer;
-import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinIDConsumer;
-import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinINTConsumer;
-import org.eclipse.xtext.example.parser.packrat.consumers.EcoreDslSINTConsumer;
-import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinSTRINGConsumer;
-
-@SuppressWarnings("unused")
public final class EcoreDslEAttributeDeclConsumer extends NonTerminalConsumer {
- private EAttributeDeclElements rule;
-
+ private EAttributeDeclElements rule;
+
private INonTerminalConsumer eAnnotationDeclConsumer;
+
private INonTerminalConsumer eGenericTypeReferenceDeclConsumer;
+
private ITerminalConsumer idConsumer;
+
private ITerminalConsumer intConsumer;
+
private INonTerminalConsumer sintConsumer;
+
private ITerminalConsumer stringConsumer;
+ private IElementConsumer group$1$Consumer;
+
+ private IElementConsumer assignment$8$Consumer;
+
+ private IElementConsumer ruleCall$9$Consumer;
+
+ private IElementConsumer alternatives$10$Consumer;
+
+ private IElementConsumer assignment$17$Consumer;
+
+ private IElementConsumer keyword$18$Consumer;
+
+ private IElementConsumer assignment$19$Consumer;
+
+ private IElementConsumer keyword$20$Consumer;
+
+ private IElementConsumer assignment$21$Consumer;
+
+ private IElementConsumer keyword$22$Consumer;
+
+ private IElementConsumer assignment$23$Consumer;
+
+ private IElementConsumer keyword$24$Consumer;
+
+ private IElementConsumer assignment$25$Consumer;
+
+ private IElementConsumer keyword$26$Consumer;
+
+ private IElementConsumer assignment$27$Consumer;
+
+ private IElementConsumer keyword$28$Consumer;
+
+ private IElementConsumer assignment$29$Consumer;
+
+ private IElementConsumer keyword$30$Consumer;
+
+ private IElementConsumer assignment$31$Consumer;
+
+ private IElementConsumer keyword$32$Consumer;
+
+ private IElementConsumer keyword$33$Consumer;
+
+ private IElementConsumer assignment$34$Consumer;
+
+ private IElementConsumer ruleCall$35$Consumer;
+
+ private IElementConsumer group$36$Consumer;
+
+ private IElementConsumer keyword$39$Consumer;
+
+ private IElementConsumer assignment$40$Consumer;
+
+ private IElementConsumer ruleCall$41$Consumer;
+
+ private IElementConsumer group$42$Consumer;
+
+ private IElementConsumer keyword$43$Consumer;
+
+ private IElementConsumer assignment$44$Consumer;
+
+ private IElementConsumer ruleCall$45$Consumer;
+
+ private IElementConsumer keyword$46$Consumer;
+
+ private IElementConsumer assignment$47$Consumer;
+
+ private IElementConsumer ruleCall$48$Consumer;
+
+ private IElementConsumer group$49$Consumer;
+
+ private IElementConsumer keyword$50$Consumer;
+
+ private IElementConsumer assignment$51$Consumer;
+
+ private IElementConsumer ruleCall$52$Consumer;
+
+ private IElementConsumer keyword$53$Consumer;
+
private ICharacterClass keyword$18$Delimiter;
-
+
private ICharacterClass keyword$20$Delimiter;
-
+
private ICharacterClass keyword$22$Delimiter;
-
+
private ICharacterClass keyword$24$Delimiter;
-
+
private ICharacterClass keyword$26$Delimiter;
-
+
private ICharacterClass keyword$28$Delimiter;
-
+
private ICharacterClass keyword$30$Delimiter;
-
+
private ICharacterClass keyword$32$Delimiter;
-
+
private ICharacterClass keyword$33$Delimiter;
-
+
private ICharacterClass keyword$39$Delimiter;
-
+
private ICharacterClass keyword$43$Delimiter;
-
+
private ICharacterClass keyword$46$Delimiter;
-
+
private ICharacterClass keyword$50$Delimiter;
-
+
private ICharacterClass keyword$53$Delimiter;
-
+
private ISequenceMatcher ruleCall$41$Delimiter;
-
+
private ISequenceMatcher ruleCall$48$Delimiter;
-
+
private ISequenceMatcher ruleCall$52$Delimiter;
-
- public EcoreDslEAttributeDeclConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
- super(configuration, hiddenTokens);
- keyword$18$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$20$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$22$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$24$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$26$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$28$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$30$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$32$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$33$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$39$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$43$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$46$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$50$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$53$Delimiter = ICharacterClass.Factory.nullClass();
- ruleCall$41$Delimiter = ISequenceMatcher.Factory.nullMatcher();
- ruleCall$48$Delimiter = ISequenceMatcher.Factory.nullMatcher();
- ruleCall$52$Delimiter = ISequenceMatcher.Factory.nullMatcher();
- }
-
- @Override
- protected int doConsume(int entryPoint) throws Exception {
- return consumeGroup$1(entryPoint);
- }
-
- protected int consumeGroup$1(int entryPoint) throws Exception {
- int result = doConsumeGroup$1(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeGroup$1(nextEntryPoint());
- }
- return result;
- }
-
- protected int doConsumeGroup$1(int entryPoint) throws Exception {
- final GroupResult result = createGroupResult(getRule().eleGroup());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$8(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele0000000AssignmentEAnnotations());
- return result.getResult();
- }
- case 1:
- result.nextStep();
- if (result.didGroupFail(consumeAlternatives$10(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele0000001Alternatives());
- return result.getResult();
- }
- case 2:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$33(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele000001KeywordAttr());
- return result.getResult();
- }
- case 3:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$34(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele00001AssignmentEGenericType());
- return result.getResult();
- }
- case 4:
- result.nextStep();
- if (result.didGroupFail(consumeGroup$36(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele0001Group());
- return result.getResult();
- }
- case 5:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$47(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele001AssignmentName());
- return result.getResult();
- }
- case 6:
- result.nextStep();
- if (result.didGroupFail(consumeGroup$49(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele01Group());
- return result.getResult();
- }
- case 7:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$53(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele1KeywordSemicolon());
- return result.getResult();
- }
- }
- return result.getResult();
- }
-
- protected int consumeAssignment$8(int entryPoint) throws Exception {
- IMarker marker = mark();
- while(doConsumeAssignment$8(entryPoint) == ConsumeResult.SUCCESS) {
- marker.flush();
- }
- marker.rollback();
- skipped(getRule().ele0000000AssignmentEAnnotations());
- return ConsumeResult.SUCCESS;
- }
-
- protected int doConsumeAssignment$8(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele0000000AssignmentEAnnotations());
- return result.getResult(consumeRuleCall$9(entryPoint));
- }
-
- protected int consumeRuleCall$9(int entryPoint) throws Exception {
- return consumeNonTerminal(eAnnotationDeclConsumer, "eAnnotations", true, false, false, getRule().ele00000000ParserRuleCallEAnnotationDecl());
- }
-
- protected int consumeAlternatives$10(int entryPoint) throws Exception {
- IMarker marker = mark();
- while(doConsumeAlternatives$10(entryPoint) == ConsumeResult.SUCCESS) {
- marker.flush();
- }
- marker.rollback();
- skipped(getRule().ele0000001Alternatives());
- return ConsumeResult.SUCCESS;
- }
-
- protected int doConsumeAlternatives$10(int entryPoint) throws Exception {
- final AlternativesResult result = createAlternativesResult(getRule().ele0000001Alternatives());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextAlternative();
- if (result.isAlternativeDone(consumeAssignment$17(nextEntryPoint()))) {
- return result.getResult();
- }
- case 1:
- result.nextAlternative();
- if (result.isAlternativeDone(consumeAssignment$19(nextEntryPoint()))) {
- return result.getResult();
- }
- case 2:
- result.nextAlternative();
- if (result.isAlternativeDone(consumeAssignment$21(nextEntryPoint()))) {
- return result.getResult();
- }
- case 3:
- result.nextAlternative();
- if (result.isAlternativeDone(consumeAssignment$23(nextEntryPoint()))) {
- return result.getResult();
- }
- case 4:
- result.nextAlternative();
- if (result.isAlternativeDone(consumeAssignment$25(nextEntryPoint()))) {
- return result.getResult();
- }
- case 5:
- result.nextAlternative();
- if (result.isAlternativeDone(consumeAssignment$27(nextEntryPoint()))) {
- return result.getResult();
- }
- case 6:
- result.nextAlternative();
- if (result.isAlternativeDone(consumeAssignment$29(nextEntryPoint()))) {
- return result.getResult();
- }
- case 7:
- result.nextAlternative();
- if (result.isAlternativeDone(consumeAssignment$31(nextEntryPoint()))) {
- return result.getResult();
- }
- }
- return result.getResult();
- }
- protected int consumeAssignment$17(int entryPoint) throws Exception {
- int result = doConsumeAssignment$17(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$17(nextEntryPoint());
+ protected class Group$1$Consumer extends GroupConsumer {
+
+ protected Group$1$Consumer(final Group group) {
+ super(group);
}
- return result;
- }
-
- protected int doConsumeAssignment$17(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele00000010000000AssignmentID());
- return result.getResult(consumeKeyword$18(entryPoint));
- }
-
- protected int consumeKeyword$18(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele000000100000000KeywordID(), "iD", false, true, getKeyword$18$Delimiter());
- }
-
- protected int consumeAssignment$19(int entryPoint) throws Exception {
- int result = doConsumeAssignment$19(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$19(nextEntryPoint());
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(assignment$8$Consumer);
+ acceptor.accept(alternatives$10$Consumer);
+ acceptor.accept(keyword$33$Consumer);
+ acceptor.accept(assignment$34$Consumer);
+ acceptor.accept(group$36$Consumer);
+ acceptor.accept(assignment$47$Consumer);
+ acceptor.accept(group$49$Consumer);
+ acceptor.accept(keyword$53$Consumer);
}
- return result;
- }
-
- protected int doConsumeAssignment$19(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele00000010000001AssignmentUnique());
- return result.getResult(consumeKeyword$20(entryPoint));
- }
-
- protected int consumeKeyword$20(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele000000100000010KeywordBag(), "unique", false, true, getKeyword$20$Delimiter());
}
- protected int consumeAssignment$21(int entryPoint) throws Exception {
- int result = doConsumeAssignment$21(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$21(nextEntryPoint());
+ protected class Assignment$8$Consumer extends LoopAssignmentConsumer {
+
+ protected Assignment$8$Consumer(final Assignment assignment) {
+ super(assignment);
}
- return result;
- }
-
- protected int doConsumeAssignment$21(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele0000001000001AssignmentOrdered());
- return result.getResult(consumeKeyword$22(entryPoint));
- }
-
- protected int consumeKeyword$22(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele00000010000010KeywordRandom(), "ordered", false, true, getKeyword$22$Delimiter());
- }
-
- protected int consumeAssignment$23(int entryPoint) throws Exception {
- int result = doConsumeAssignment$23(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$23(nextEntryPoint());
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$9$Consumer;
}
- return result;
}
- protected int doConsumeAssignment$23(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele000000100001AssignmentChangeable());
- return result.getResult(consumeKeyword$24(entryPoint));
- }
-
- protected int consumeKeyword$24(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele0000001000010KeywordReadonly(), "changeable", false, true, getKeyword$24$Delimiter());
- }
-
- protected int consumeAssignment$25(int entryPoint) throws Exception {
- int result = doConsumeAssignment$25(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$25(nextEntryPoint());
+ protected class RuleCall$9$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$9$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
}
- return result;
- }
-
- protected int doConsumeAssignment$25(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele00000010001AssignmentVolatile());
- return result.getResult(consumeKeyword$26(entryPoint));
- }
-
- protected int consumeKeyword$26(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele000000100010KeywordVolatile(), "volatile", false, true, getKeyword$26$Delimiter());
- }
-
- protected int consumeAssignment$27(int entryPoint) throws Exception {
- int result = doConsumeAssignment$27(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$27(nextEntryPoint());
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(eAnnotationDeclConsumer, "eAnnotations", true, false, false, getElement());
}
- return result;
- }
-
- protected int doConsumeAssignment$27(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele0000001001AssignmentTransient());
- return result.getResult(consumeKeyword$28(entryPoint));
- }
-
- protected int consumeKeyword$28(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele00000010010KeywordTransient(), "transient", false, true, getKeyword$28$Delimiter());
}
- protected int consumeAssignment$29(int entryPoint) throws Exception {
- int result = doConsumeAssignment$29(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$29(nextEntryPoint());
+ protected class Alternatives$10$Consumer extends LoopAlternativesConsumer {
+
+ protected Alternatives$10$Consumer(final Alternatives alternatives) {
+ super(alternatives);
+ }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(assignment$17$Consumer);
+ acceptor.accept(assignment$19$Consumer);
+ acceptor.accept(assignment$21$Consumer);
+ acceptor.accept(assignment$23$Consumer);
+ acceptor.accept(assignment$25$Consumer);
+ acceptor.accept(assignment$27$Consumer);
+ acceptor.accept(assignment$29$Consumer);
+ acceptor.accept(assignment$31$Consumer);
}
- return result;
- }
-
- protected int doConsumeAssignment$29(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele000000101AssignmentUnsettable());
- return result.getResult(consumeKeyword$30(entryPoint));
- }
-
- protected int consumeKeyword$30(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele0000001010KeywordUnsettable(), "unsettable", false, true, getKeyword$30$Delimiter());
}
- protected int consumeAssignment$31(int entryPoint) throws Exception {
- int result = doConsumeAssignment$31(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$31(nextEntryPoint());
+ protected class Assignment$17$Consumer extends AssignmentConsumer {
+
+ protected Assignment$17$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return keyword$18$Consumer;
}
- return result;
}
- protected int doConsumeAssignment$31(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele00000011AssignmentDerived());
- return result.getResult(consumeKeyword$32(entryPoint));
+ protected class Keyword$18$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$18$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), "iD", false, true, getKeyword$18$Delimiter());
+ }
}
- protected int consumeKeyword$32(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele000000110KeywordDerived(), "derived", false, true, getKeyword$32$Delimiter());
+ protected class Assignment$19$Consumer extends AssignmentConsumer {
+
+ protected Assignment$19$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return keyword$20$Consumer;
+ }
}
- protected int consumeKeyword$33(int entryPoint) throws Exception {
- int result = doConsumeKeyword$33(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$33(nextEntryPoint());
+ protected class Keyword$20$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$20$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), "unique", false, true, getKeyword$20$Delimiter());
}
- return result;
}
- protected int doConsumeKeyword$33(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele000001KeywordAttr(), null, false, false, getKeyword$33$Delimiter());
+ protected class Assignment$21$Consumer extends AssignmentConsumer {
+
+ protected Assignment$21$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return keyword$22$Consumer;
+ }
}
- protected int consumeAssignment$34(int entryPoint) throws Exception {
- int result = doConsumeAssignment$34(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$34(nextEntryPoint());
+ protected class Keyword$22$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$22$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), "ordered", false, true, getKeyword$22$Delimiter());
}
- return result;
}
- protected int doConsumeAssignment$34(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele00001AssignmentEGenericType());
- return result.getResult(consumeRuleCall$35(entryPoint));
+ protected class Assignment$23$Consumer extends AssignmentConsumer {
+
+ protected Assignment$23$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return keyword$24$Consumer;
+ }
}
- protected int consumeRuleCall$35(int entryPoint) throws Exception {
- return consumeNonTerminal(eGenericTypeReferenceDeclConsumer, "eGenericType", false, false, false, getRule().ele000010ParserRuleCallEGenericTypeReferenceDecl());
+ protected class Keyword$24$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$24$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), "changeable", false, true, getKeyword$24$Delimiter());
+ }
}
- protected int consumeGroup$36(int entryPoint) throws Exception {
- IMarker marker = mark();
- int result = doConsumeGroup$36(entryPoint);
- if (result != ConsumeResult.SUCCESS) {
- marker.rollback();
- skipped(getRule().ele0001Group());
- } else
- marker.commit();
- return ConsumeResult.SUCCESS;
+ protected class Assignment$25$Consumer extends AssignmentConsumer {
+
+ protected Assignment$25$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return keyword$26$Consumer;
+ }
}
- protected int doConsumeGroup$36(int entryPoint) throws Exception {
- final GroupResult result = createGroupResult(getRule().ele0001Group());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$39(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele0001000KeywordLeftSquareBracket());
- return result.getResult();
- }
- case 1:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$40(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele0001001AssignmentLowerBound());
- return result.getResult();
- }
- case 2:
- result.nextStep();
- if (result.didGroupFail(consumeGroup$42(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele000101Group());
- return result.getResult();
- }
- case 3:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$46(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele00011KeywordRightSquareBracket());
- return result.getResult();
- }
+ protected class Keyword$26$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$26$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), "volatile", false, true, getKeyword$26$Delimiter());
}
- return result.getResult();
}
- protected int consumeKeyword$39(int entryPoint) throws Exception {
- int result = doConsumeKeyword$39(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$39(nextEntryPoint());
+ protected class Assignment$27$Consumer extends AssignmentConsumer {
+
+ protected Assignment$27$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return keyword$28$Consumer;
}
- return result;
}
- protected int doConsumeKeyword$39(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele0001000KeywordLeftSquareBracket(), null, false, false, getKeyword$39$Delimiter());
+ protected class Keyword$28$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$28$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), "transient", false, true, getKeyword$28$Delimiter());
+ }
}
- protected int consumeAssignment$40(int entryPoint) throws Exception {
- int result = doConsumeAssignment$40(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$40(nextEntryPoint());
+ protected class Assignment$29$Consumer extends AssignmentConsumer {
+
+ protected Assignment$29$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return keyword$30$Consumer;
}
- return result;
}
- protected int doConsumeAssignment$40(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele0001001AssignmentLowerBound());
- return result.getResult(consumeRuleCall$41(entryPoint));
+ protected class Keyword$30$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$30$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), "unsettable", false, true, getKeyword$30$Delimiter());
+ }
}
- protected int consumeRuleCall$41(int entryPoint) throws Exception {
- return consumeTerminal(intConsumer, "lowerBound", false, false, getRule().ele00010010LexerRuleCallINT(), getRuleCall$41$Delimiter());
+ protected class Assignment$31$Consumer extends AssignmentConsumer {
+
+ protected Assignment$31$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return keyword$32$Consumer;
+ }
}
- protected int consumeGroup$42(int entryPoint) throws Exception {
- IMarker marker = mark();
- int result = doConsumeGroup$42(entryPoint);
- if (result != ConsumeResult.SUCCESS) {
- marker.rollback();
- skipped(getRule().ele000101Group());
- } else
- marker.commit();
- return ConsumeResult.SUCCESS;
+ protected class Keyword$32$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$32$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), "derived", false, true, getKeyword$32$Delimiter());
+ }
}
- protected int doConsumeGroup$42(int entryPoint) throws Exception {
- final GroupResult result = createGroupResult(getRule().ele000101Group());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$43(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele0001010KeywordFullStopFullStop());
- return result.getResult();
- }
- case 1:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$44(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele0001011AssignmentUpperBound());
- return result.getResult();
- }
+ protected class Keyword$33$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$33$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$33$Delimiter());
}
- return result.getResult();
}
- protected int consumeKeyword$43(int entryPoint) throws Exception {
- int result = doConsumeKeyword$43(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$43(nextEntryPoint());
+ protected class Assignment$34$Consumer extends AssignmentConsumer {
+
+ protected Assignment$34$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$35$Consumer;
}
- return result;
}
- protected int doConsumeKeyword$43(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele0001010KeywordFullStopFullStop(), null, false, false, getKeyword$43$Delimiter());
+ protected class RuleCall$35$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$35$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(eGenericTypeReferenceDeclConsumer, "eGenericType", false, false, false, getElement());
+ }
}
- protected int consumeAssignment$44(int entryPoint) throws Exception {
- int result = doConsumeAssignment$44(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$44(nextEntryPoint());
+ protected class Group$36$Consumer extends OptionalGroupConsumer {
+
+ protected Group$36$Consumer(final Group group) {
+ super(group);
+ }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(keyword$39$Consumer);
+ acceptor.accept(assignment$40$Consumer);
+ acceptor.accept(group$42$Consumer);
+ acceptor.accept(keyword$46$Consumer);
}
- return result;
}
- protected int doConsumeAssignment$44(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele0001011AssignmentUpperBound());
- return result.getResult(consumeRuleCall$45(entryPoint));
+ protected class Keyword$39$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$39$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$39$Delimiter());
+ }
}
- protected int consumeRuleCall$45(int entryPoint) throws Exception {
- return consumeNonTerminal(sintConsumer, "upperBound", false, true, false, getRule().ele00010110ParserRuleCallSINT());
+ protected class Assignment$40$Consumer extends AssignmentConsumer {
+
+ protected Assignment$40$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$41$Consumer;
+ }
}
- protected int consumeKeyword$46(int entryPoint) throws Exception {
- int result = doConsumeKeyword$46(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$46(nextEntryPoint());
+ protected class RuleCall$41$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$41$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeTerminal(intConsumer, "lowerBound", false, false, getElement(), getRuleCall$41$Delimiter());
}
- return result;
}
- protected int doConsumeKeyword$46(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele00011KeywordRightSquareBracket(), null, false, false, getKeyword$46$Delimiter());
+ protected class Group$42$Consumer extends OptionalGroupConsumer {
+
+ protected Group$42$Consumer(final Group group) {
+ super(group);
+ }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(keyword$43$Consumer);
+ acceptor.accept(assignment$44$Consumer);
+ }
}
- protected int consumeAssignment$47(int entryPoint) throws Exception {
- int result = doConsumeAssignment$47(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$47(nextEntryPoint());
+ protected class Keyword$43$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$43$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$43$Delimiter());
}
- return result;
}
- protected int doConsumeAssignment$47(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele001AssignmentName());
- return result.getResult(consumeRuleCall$48(entryPoint));
+ protected class Assignment$44$Consumer extends AssignmentConsumer {
+
+ protected Assignment$44$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$45$Consumer;
+ }
}
- protected int consumeRuleCall$48(int entryPoint) throws Exception {
- return consumeTerminal(idConsumer, "name", false, false, getRule().ele0010LexerRuleCallID(), getRuleCall$48$Delimiter());
+ protected class RuleCall$45$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$45$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(sintConsumer, "upperBound", false, true, false, getElement());
+ }
}
- protected int consumeGroup$49(int entryPoint) throws Exception {
- IMarker marker = mark();
- int result = doConsumeGroup$49(entryPoint);
- if (result != ConsumeResult.SUCCESS) {
- marker.rollback();
- skipped(getRule().ele01Group());
- } else
- marker.commit();
- return ConsumeResult.SUCCESS;
+ protected class Keyword$46$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$46$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$46$Delimiter());
+ }
}
- protected int doConsumeGroup$49(int entryPoint) throws Exception {
- final GroupResult result = createGroupResult(getRule().ele01Group());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$50(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele010KeywordEqualsSign());
- return result.getResult();
- }
- case 1:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$51(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele011AssignmentDefaultValueLiteral());
- return result.getResult();
- }
+ protected class Assignment$47$Consumer extends AssignmentConsumer {
+
+ protected Assignment$47$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$48$Consumer;
}
- return result.getResult();
}
- protected int consumeKeyword$50(int entryPoint) throws Exception {
- int result = doConsumeKeyword$50(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$50(nextEntryPoint());
+ protected class RuleCall$48$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$48$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeTerminal(idConsumer, "name", false, false, getElement(), getRuleCall$48$Delimiter());
}
- return result;
}
- protected int doConsumeKeyword$50(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele010KeywordEqualsSign(), null, false, false, getKeyword$50$Delimiter());
+ protected class Group$49$Consumer extends OptionalGroupConsumer {
+
+ protected Group$49$Consumer(final Group group) {
+ super(group);
+ }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(keyword$50$Consumer);
+ acceptor.accept(assignment$51$Consumer);
+ }
}
- protected int consumeAssignment$51(int entryPoint) throws Exception {
- int result = doConsumeAssignment$51(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$51(nextEntryPoint());
+ protected class Keyword$50$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$50$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$50$Delimiter());
}
- return result;
}
- protected int doConsumeAssignment$51(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele011AssignmentDefaultValueLiteral());
- return result.getResult(consumeRuleCall$52(entryPoint));
+ protected class Assignment$51$Consumer extends AssignmentConsumer {
+
+ protected Assignment$51$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$52$Consumer;
+ }
}
- protected int consumeRuleCall$52(int entryPoint) throws Exception {
- return consumeTerminal(stringConsumer, "defaultValueLiteral", false, false, getRule().ele0110LexerRuleCallSTRING(), getRuleCall$52$Delimiter());
+ protected class RuleCall$52$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$52$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeTerminal(stringConsumer, "defaultValueLiteral", false, false, getElement(), getRuleCall$52$Delimiter());
+ }
}
- protected int consumeKeyword$53(int entryPoint) throws Exception {
- int result = doConsumeKeyword$53(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$53(nextEntryPoint());
+ protected class Keyword$53$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$53$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$53$Delimiter());
}
- return result;
}
- protected int doConsumeKeyword$53(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele1KeywordSemicolon(), null, false, false, getKeyword$53$Delimiter());
+ public EcoreDslEAttributeDeclConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
+ super(configuration, hiddenTokens);
+ keyword$18$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$20$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$22$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$24$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$26$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$28$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$30$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$32$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$33$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$39$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$43$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$46$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$50$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$53$Delimiter = ICharacterClass.Factory.nullClass();
+ ruleCall$41$Delimiter = ISequenceMatcher.Factory.nullMatcher();
+ ruleCall$48$Delimiter = ISequenceMatcher.Factory.nullMatcher();
+ ruleCall$52$Delimiter = ISequenceMatcher.Factory.nullMatcher();
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return group$1$Consumer.consume();
}
public EAttributeDeclElements getRule() {
@@ -664,6 +669,46 @@ public final class EcoreDslEAttributeDeclConsumer extends NonTerminalConsumer {
public void setRule(EAttributeDeclElements rule) {
this.rule = rule;
+
+ group$1$Consumer = new Group$1$Consumer(rule.eleGroup());
+ assignment$8$Consumer = new Assignment$8$Consumer(rule.ele0000000AssignmentEAnnotations());
+ ruleCall$9$Consumer = new RuleCall$9$Consumer(rule.ele00000000ParserRuleCallEAnnotationDecl());
+ alternatives$10$Consumer = new Alternatives$10$Consumer(rule.ele0000001Alternatives());
+ assignment$17$Consumer = new Assignment$17$Consumer(rule.ele00000010000000AssignmentID());
+ keyword$18$Consumer = new Keyword$18$Consumer(rule.ele000000100000000KeywordID());
+ assignment$19$Consumer = new Assignment$19$Consumer(rule.ele00000010000001AssignmentUnique());
+ keyword$20$Consumer = new Keyword$20$Consumer(rule.ele000000100000010KeywordBag());
+ assignment$21$Consumer = new Assignment$21$Consumer(rule.ele0000001000001AssignmentOrdered());
+ keyword$22$Consumer = new Keyword$22$Consumer(rule.ele00000010000010KeywordRandom());
+ assignment$23$Consumer = new Assignment$23$Consumer(rule.ele000000100001AssignmentChangeable());
+ keyword$24$Consumer = new Keyword$24$Consumer(rule.ele0000001000010KeywordReadonly());
+ assignment$25$Consumer = new Assignment$25$Consumer(rule.ele00000010001AssignmentVolatile());
+ keyword$26$Consumer = new Keyword$26$Consumer(rule.ele000000100010KeywordVolatile());
+ assignment$27$Consumer = new Assignment$27$Consumer(rule.ele0000001001AssignmentTransient());
+ keyword$28$Consumer = new Keyword$28$Consumer(rule.ele00000010010KeywordTransient());
+ assignment$29$Consumer = new Assignment$29$Consumer(rule.ele000000101AssignmentUnsettable());
+ keyword$30$Consumer = new Keyword$30$Consumer(rule.ele0000001010KeywordUnsettable());
+ assignment$31$Consumer = new Assignment$31$Consumer(rule.ele00000011AssignmentDerived());
+ keyword$32$Consumer = new Keyword$32$Consumer(rule.ele000000110KeywordDerived());
+ keyword$33$Consumer = new Keyword$33$Consumer(rule.ele000001KeywordAttr());
+ assignment$34$Consumer = new Assignment$34$Consumer(rule.ele00001AssignmentEGenericType());
+ ruleCall$35$Consumer = new RuleCall$35$Consumer(rule.ele000010ParserRuleCallEGenericTypeReferenceDecl());
+ group$36$Consumer = new Group$36$Consumer(rule.ele0001Group());
+ keyword$39$Consumer = new Keyword$39$Consumer(rule.ele0001000KeywordLeftSquareBracket());
+ assignment$40$Consumer = new Assignment$40$Consumer(rule.ele0001001AssignmentLowerBound());
+ ruleCall$41$Consumer = new RuleCall$41$Consumer(rule.ele00010010LexerRuleCallINT());
+ group$42$Consumer = new Group$42$Consumer(rule.ele000101Group());
+ keyword$43$Consumer = new Keyword$43$Consumer(rule.ele0001010KeywordFullStopFullStop());
+ assignment$44$Consumer = new Assignment$44$Consumer(rule.ele0001011AssignmentUpperBound());
+ ruleCall$45$Consumer = new RuleCall$45$Consumer(rule.ele00010110ParserRuleCallSINT());
+ keyword$46$Consumer = new Keyword$46$Consumer(rule.ele00011KeywordRightSquareBracket());
+ assignment$47$Consumer = new Assignment$47$Consumer(rule.ele001AssignmentName());
+ ruleCall$48$Consumer = new RuleCall$48$Consumer(rule.ele0010LexerRuleCallID());
+ group$49$Consumer = new Group$49$Consumer(rule.ele01Group());
+ keyword$50$Consumer = new Keyword$50$Consumer(rule.ele010KeywordEqualsSign());
+ assignment$51$Consumer = new Assignment$51$Consumer(rule.ele011AssignmentDefaultValueLiteral());
+ ruleCall$52$Consumer = new RuleCall$52$Consumer(rule.ele0110LexerRuleCallSTRING());
+ keyword$53$Consumer = new Keyword$53$Consumer(rule.ele1KeywordSemicolon());
}
@Override
diff --git a/examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslEClassDeclConsumer.java b/examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslEClassDeclConsumer.java
index 3b45d8f..e3729df 100644
--- a/examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslEClassDeclConsumer.java
+++ b/examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslEClassDeclConsumer.java
@@ -4,717 +4,650 @@
package org.eclipse.xtext.example.parser.packrat.consumers;
import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.AbstractRule;
+import org.eclipse.xtext.Alternatives;
+import org.eclipse.xtext.Assignment;
+import org.eclipse.xtext.Group;
+import org.eclipse.xtext.Keyword;
+import org.eclipse.xtext.RuleCall;
-import org.eclipse.xtext.parser.packrat.IMarkerFactory.IMarker;
-import org.eclipse.xtext.parser.packrat.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.IElementConsumer;
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.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.NonTerminalConsumer;
import org.eclipse.xtext.parser.packrat.matching.ICharacterClass;
import org.eclipse.xtext.parser.packrat.matching.ISequenceMatcher;
import org.eclipse.xtext.example.services.EcoreDslGrammarAccess.EClassDeclElements;
-import org.eclipse.xtext.example.parser.packrat.consumers.EcoreDslEAnnotationDeclConsumer;
-import org.eclipse.xtext.example.parser.packrat.consumers.EcoreDslEGenericTypeReferenceDeclConsumer;
-import org.eclipse.xtext.example.parser.packrat.consumers.EcoreDslEOperationDeclConsumer;
-import org.eclipse.xtext.example.parser.packrat.consumers.EcoreDslEStructuralFeatureDeclConsumer;
-import org.eclipse.xtext.example.parser.packrat.consumers.EcoreDslETypeParameterDeclConsumer;
-import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinIDConsumer;
-import org.eclipse.xtext.example.parser.packrat.consumers.EcoreDslSTRING_OR_QIDConsumer;
-
-@SuppressWarnings("unused")
public final class EcoreDslEClassDeclConsumer extends NonTerminalConsumer {
- private EClassDeclElements rule;
-
+ private EClassDeclElements rule;
+
private INonTerminalConsumer eAnnotationDeclConsumer;
+
private INonTerminalConsumer eGenericTypeReferenceDeclConsumer;
+
private INonTerminalConsumer eOperationDeclConsumer;
+
private INonTerminalConsumer eStructuralFeatureDeclConsumer;
+
private INonTerminalConsumer eTypeParameterDeclConsumer;
+
private ITerminalConsumer idConsumer;
+
private INonTerminalConsumer stringOrQidConsumer;
+ private IElementConsumer group$1$Consumer;
+
+ private IElementConsumer assignment$10$Consumer;
+
+ private IElementConsumer ruleCall$11$Consumer;
+
+ private IElementConsumer assignment$12$Consumer;
+
+ private IElementConsumer keyword$13$Consumer;
+
+ private IElementConsumer alternatives$14$Consumer;
+
+ private IElementConsumer assignment$15$Consumer;
+
+ private IElementConsumer keyword$16$Consumer;
+
+ private IElementConsumer keyword$17$Consumer;
+
+ private IElementConsumer assignment$18$Consumer;
+
+ private IElementConsumer ruleCall$19$Consumer;
+
+ private IElementConsumer group$20$Consumer;
+
+ private IElementConsumer keyword$23$Consumer;
+
+ private IElementConsumer assignment$24$Consumer;
+
+ private IElementConsumer ruleCall$25$Consumer;
+
+ private IElementConsumer group$26$Consumer;
+
+ private IElementConsumer keyword$27$Consumer;
+
+ private IElementConsumer assignment$28$Consumer;
+
+ private IElementConsumer ruleCall$29$Consumer;
+
+ private IElementConsumer keyword$30$Consumer;
+
+ private IElementConsumer group$31$Consumer;
+
+ private IElementConsumer keyword$33$Consumer;
+
+ private IElementConsumer assignment$34$Consumer;
+
+ private IElementConsumer ruleCall$35$Consumer;
+
+ private IElementConsumer group$36$Consumer;
+
+ private IElementConsumer keyword$37$Consumer;
+
+ private IElementConsumer assignment$38$Consumer;
+
+ private IElementConsumer ruleCall$39$Consumer;
+
+ private IElementConsumer group$40$Consumer;
+
+ private IElementConsumer keyword$41$Consumer;
+
+ private IElementConsumer assignment$42$Consumer;
+
+ private IElementConsumer ruleCall$43$Consumer;
+
+ private IElementConsumer keyword$44$Consumer;
+
+ private IElementConsumer alternatives$45$Consumer;
+
+ private IElementConsumer assignment$46$Consumer;
+
+ private IElementConsumer ruleCall$47$Consumer;
+
+ private IElementConsumer assignment$48$Consumer;
+
+ private IElementConsumer ruleCall$49$Consumer;
+
+ private IElementConsumer keyword$50$Consumer;
+
private ICharacterClass keyword$13$Delimiter;
-
+
private ICharacterClass keyword$16$Delimiter;
-
+
private ICharacterClass keyword$17$Delimiter;
-
+
private ICharacterClass keyword$23$Delimiter;
-
+
private ICharacterClass keyword$27$Delimiter;
-
+
private ICharacterClass keyword$30$Delimiter;
-
+
private ICharacterClass keyword$33$Delimiter;
-
+
private ICharacterClass keyword$37$Delimiter;
-
+
private ICharacterClass keyword$41$Delimiter;
-
+
private ICharacterClass keyword$44$Delimiter;
-
- private ICharacterClass keyword$50$Delimiter;
-
- private ISequenceMatcher ruleCall$19$Delimiter;
-
- public EcoreDslEClassDeclConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
- super(configuration, hiddenTokens);
- keyword$13$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$16$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$17$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$23$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$27$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$30$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$33$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$37$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$41$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$44$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$50$Delimiter = ICharacterClass.Factory.nullClass();
- ruleCall$19$Delimiter = ISequenceMatcher.Factory.nullMatcher();
- }
-
- @Override
- protected int doConsume(int entryPoint) throws Exception {
- return consumeGroup$1(entryPoint);
- }
-
- protected int consumeGroup$1(int entryPoint) throws Exception {
- int result = doConsumeGroup$1(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeGroup$1(nextEntryPoint());
- }
- return result;
- }
-
- protected int doConsumeGroup$1(int entryPoint) throws Exception {
- final GroupResult result = createGroupResult(getRule().eleGroup());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$10(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele000000000AssignmentEAnnotations());
- return result.getResult();
- }
- case 1:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$12(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele000000001AssignmentAbstract());
- return result.getResult();
- }
- case 2:
- result.nextStep();
- if (result.didGroupFail(consumeAlternatives$14(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele00000001Alternatives());
- return result.getResult();
- }
- case 3:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$18(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele0000001AssignmentName());
- return result.getResult();
- }
- case 4:
- result.nextStep();
- if (result.didGroupFail(consumeGroup$20(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele000001Group());
- return result.getResult();
- }
- case 5:
- result.nextStep();
- if (result.didGroupFail(consumeGroup$31(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele00001Group());
- return result.getResult();
- }
- case 6:
- result.nextStep();
- if (result.didGroupFail(consumeGroup$40(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele0001Group());
- return result.getResult();
- }
- case 7:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$44(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele001KeywordLeftCurlyBracket());
- return result.getResult();
- }
- case 8:
- result.nextStep();
- if (result.didGroupFail(consumeAlternatives$45(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele01Alternatives());
- return result.getResult();
- }
- case 9:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$50(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele1KeywordRightCurlyBracket());
- return result.getResult();
- }
- }
- return result.getResult();
- }
-
- protected int consumeAssignment$10(int entryPoint) throws Exception {
- IMarker marker = mark();
- while(doConsumeAssignment$10(entryPoint) == ConsumeResult.SUCCESS) {
- marker.flush();
- }
- marker.rollback();
- skipped(getRule().ele000000000AssignmentEAnnotations());
- return ConsumeResult.SUCCESS;
- }
-
- protected int doConsumeAssignment$10(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele000000000AssignmentEAnnotations());
- return result.getResult(consumeRuleCall$11(entryPoint));
- }
-
- protected int consumeRuleCall$11(int entryPoint) throws Exception {
- return consumeNonTerminal(eAnnotationDeclConsumer, "eAnnotations", true, false, false, getRule().ele0000000000ParserRuleCallEAnnotationDecl());
- }
-
- protected int consumeAssignment$12(int entryPoint) throws Exception {
- IMarker marker = mark();
- int result = doConsumeAssignment$12(entryPoint);
- if (result != ConsumeResult.SUCCESS) {
- marker.rollback();
- skipped(getRule().ele000000001AssignmentAbstract());
- } else
- marker.commit();
- return ConsumeResult.SUCCESS;
- }
-
- protected int doConsumeAssignment$12(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele000000001AssignmentAbstract());
- return result.getResult(consumeKeyword$13(entryPoint));
- }
-
- protected int consumeKeyword$13(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele0000000010KeywordAbstract(), "abstract", false, true, getKeyword$13$Delimiter());
- }
-
- protected int consumeAlternatives$14(int entryPoint) throws Exception {
- int result = doConsumeAlternatives$14(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAlternatives$14(nextEntryPoint());
- }
- return result;
- }
-
- protected int doConsumeAlternatives$14(int entryPoint) throws Exception {
- final AlternativesResult result = createAlternativesResult(getRule().ele00000001Alternatives());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextAlternative();
- if (result.isAlternativeDone(consumeAssignment$15(nextEntryPoint()))) {
- return result.getResult();
- }
- case 1:
- result.nextAlternative();
- if (result.isAlternativeDone(consumeKeyword$17(nextEntryPoint()))) {
- return result.getResult();
- }
- }
- return result.getResult();
- }
-
- protected int consumeAssignment$15(int entryPoint) throws Exception {
- int result = doConsumeAssignment$15(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$15(nextEntryPoint());
- }
- return result;
- }
- protected int doConsumeAssignment$15(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele000000010AssignmentInterface());
- return result.getResult(consumeKeyword$16(entryPoint));
- }
+ private ICharacterClass keyword$50$Delimiter;
- protected int consumeKeyword$16(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele0000000100KeywordInterface(), "interface", false, true, getKeyword$16$Delimiter());
- }
+ private ISequenceMatcher ruleCall$19$Delimiter;
- protected int consumeKeyword$17(int entryPoint) throws Exception {
- int result = doConsumeKeyword$17(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$17(nextEntryPoint());
+ protected class Group$1$Consumer extends GroupConsumer {
+
+ protected Group$1$Consumer(final Group group) {
+ super(group);
}
- return result;
- }
-
- protected int doConsumeKeyword$17(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele000000011KeywordClass(), null, false, false, getKeyword$17$Delimiter());
- }
-
- protected int consumeAssignment$18(int entryPoint) throws Exception {
- int result = doConsumeAssignment$18(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$18(nextEntryPoint());
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(assignment$10$Consumer);
+ acceptor.accept(assignment$12$Consumer);
+ acceptor.accept(alternatives$14$Consumer);
+ acceptor.accept(assignment$18$Consumer);
+ acceptor.accept(group$20$Consumer);
+ acceptor.accept(group$31$Consumer);
+ acceptor.accept(group$40$Consumer);
+ acceptor.accept(keyword$44$Consumer);
+ acceptor.accept(alternatives$45$Consumer);
+ acceptor.accept(keyword$50$Consumer);
}
- return result;
- }
-
- protected int doConsumeAssignment$18(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele0000001AssignmentName());
- return result.getResult(consumeRuleCall$19(entryPoint));
- }
-
- protected int consumeRuleCall$19(int entryPoint) throws Exception {
- return consumeTerminal(idConsumer, "name", false, false, getRule().ele00000010LexerRuleCallID(), getRuleCall$19$Delimiter());
}
- protected int consumeGroup$20(int entryPoint) throws Exception {
- IMarker marker = mark();
- int result = doConsumeGroup$20(entryPoint);
- if (result != ConsumeResult.SUCCESS) {
- marker.rollback();
- skipped(getRule().ele000001Group());
- } else
- marker.commit();
- return ConsumeResult.SUCCESS;
- }
-
- protected int doConsumeGroup$20(int entryPoint) throws Exception {
- final GroupResult result = createGroupResult(getRule().ele000001Group());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$23(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele000001000KeywordLessThanSign());
- return result.getResult();
- }
- case 1:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$24(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele000001001AssignmentETypeParameters());
- return result.getResult();
- }
- case 2:
- result.nextStep();
- if (result.didGroupFail(consumeGroup$26(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele00000101Group());
- return result.getResult();
- }
- case 3:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$30(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele0000011KeywordGreaterThanSign());
- return result.getResult();
- }
+ protected class Assignment$10$Consumer extends LoopAssignmentConsumer {
+
+ protected Assignment$10$Consumer(final Assignment assignment) {
+ super(assignment);
}
- return result.getResult();
- }
-
- protected int consumeKeyword$23(int entryPoint) throws Exception {
- int result = doConsumeKeyword$23(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$23(nextEntryPoint());
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$11$Consumer;
}
- return result;
- }
-
- protected int doConsumeKeyword$23(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele000001000KeywordLessThanSign(), null, false, false, getKeyword$23$Delimiter());
}
- protected int consumeAssignment$24(int entryPoint) throws Exception {
- int result = doConsumeAssignment$24(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$24(nextEntryPoint());
+ protected class RuleCall$11$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$11$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(eAnnotationDeclConsumer, "eAnnotations", true, false, false, getElement());
}
- return result;
- }
-
- protected int doConsumeAssignment$24(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele000001001AssignmentETypeParameters());
- return result.getResult(consumeRuleCall$25(entryPoint));
- }
-
- protected int consumeRuleCall$25(int entryPoint) throws Exception {
- return consumeNonTerminal(eTypeParameterDeclConsumer, "eTypeParameters", true, false, false, getRule().ele0000010010ParserRuleCallETypeParameterDecl());
}
- protected int consumeGroup$26(int entryPoint) throws Exception {
- IMarker marker = mark();
- while(doConsumeGroup$26(entryPoint) == ConsumeResult.SUCCESS) {
- marker.flush();
+ protected class Assignment$12$Consumer extends OptionalAssignmentConsumer {
+
+ protected Assignment$12$Consumer(final Assignment assignment) {
+ super(assignment);
}
- marker.rollback();
- skipped(getRule().ele00000101Group());
- return ConsumeResult.SUCCESS;
- }
-
- protected int doConsumeGroup$26(int entryPoint) throws Exception {
- final GroupResult result = createGroupResult(getRule().ele00000101Group());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$27(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele000001010KeywordComma());
- return result.getResult();
- }
- case 1:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$28(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele000001011AssignmentETypeParameters());
- return result.getResult();
- }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return keyword$13$Consumer;
}
- return result.getResult();
}
- protected int consumeKeyword$27(int entryPoint) throws Exception {
- int result = doConsumeKeyword$27(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$27(nextEntryPoint());
+ protected class Keyword$13$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$13$Consumer(final Keyword keyword) {
+ super(keyword);
}
- return result;
- }
-
- protected int doConsumeKeyword$27(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele000001010KeywordComma(), null, false, false, getKeyword$27$Delimiter());
- }
-
- protected int consumeAssignment$28(int entryPoint) throws Exception {
- int result = doConsumeAssignment$28(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$28(nextEntryPoint());
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), "abstract", false, true, getKeyword$13$Delimiter());
}
- return result;
}
- protected int doConsumeAssignment$28(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele000001011AssignmentETypeParameters());
- return result.getResult(consumeRuleCall$29(entryPoint));
- }
-
- protected int consumeRuleCall$29(int entryPoint) throws Exception {
- return consumeNonTerminal(eTypeParameterDeclConsumer, "eTypeParameters", true, false, false, getRule().ele0000010110ParserRuleCallETypeParameterDecl());
- }
-
- protected int consumeKeyword$30(int entryPoint) throws Exception {
- int result = doConsumeKeyword$30(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$30(nextEntryPoint());
+ protected class Alternatives$14$Consumer extends AlternativesConsumer {
+
+ protected Alternatives$14$Consumer(final Alternatives alternatives) {
+ super(alternatives);
+ }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(assignment$15$Consumer);
+ acceptor.accept(keyword$17$Consumer);
}
- return result;
}
- protected int doConsumeKeyword$30(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele0000011KeywordGreaterThanSign(), null, false, false, getKeyword$30$Delimiter());
+ protected class Assignment$15$Consumer extends AssignmentConsumer {
+
+ protected Assignment$15$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return keyword$16$Consumer;
+ }
}
- protected int consumeGroup$31(int entryPoint) throws Exception {
- IMarker marker = mark();
- int result = doConsumeGroup$31(entryPoint);
- if (result != ConsumeResult.SUCCESS) {
- marker.rollback();
- skipped(getRule().ele00001Group());
- } else
- marker.commit();
- return ConsumeResult.SUCCESS;
+ protected class Keyword$16$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$16$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), "interface", false, true, getKeyword$16$Delimiter());
+ }
}
- protected int doConsumeGroup$31(int entryPoint) throws Exception {
- final GroupResult result = createGroupResult(getRule().ele00001Group());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$33(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele0000100KeywordExtends());
- return result.getResult();
- }
- case 1:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$34(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele0000101AssignmentEGenericSuperTypes());
- return result.getResult();
- }
- case 2:
- result.nextStep();
- if (result.didGroupFail(consumeGroup$36(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele000011Group());
- return result.getResult();
- }
+ protected class Keyword$17$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$17$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$17$Delimiter());
}
- return result.getResult();
}
- protected int consumeKeyword$33(int entryPoint) throws Exception {
- int result = doConsumeKeyword$33(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$33(nextEntryPoint());
+ protected class Assignment$18$Consumer extends AssignmentConsumer {
+
+ protected Assignment$18$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$19$Consumer;
}
- return result;
}
- protected int doConsumeKeyword$33(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele0000100KeywordExtends(), null, false, false, getKeyword$33$Delimiter());
+ protected class RuleCall$19$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$19$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeTerminal(idConsumer, "name", false, false, getElement(), getRuleCall$19$Delimiter());
+ }
}
- protected int consumeAssignment$34(int entryPoint) throws Exception {
- int result = doConsumeAssignment$34(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$34(nextEntryPoint());
+ protected class Group$20$Consumer extends OptionalGroupConsumer {
+
+ protected Group$20$Consumer(final Group group) {
+ super(group);
+ }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(keyword$23$Consumer);
+ acceptor.accept(assignment$24$Consumer);
+ acceptor.accept(group$26$Consumer);
+ acceptor.accept(keyword$30$Consumer);
}
- return result;
}
- protected int doConsumeAssignment$34(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele0000101AssignmentEGenericSuperTypes());
- return result.getResult(consumeRuleCall$35(entryPoint));
+ protected class Keyword$23$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$23$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$23$Delimiter());
+ }
}
- protected int consumeRuleCall$35(int entryPoint) throws Exception {
- return consumeNonTerminal(eGenericTypeReferenceDeclConsumer, "eGenericSuperTypes", true, false, false, getRule().ele00001010ParserRuleCallEGenericTypeReferenceDecl());
+ protected class Assignment$24$Consumer extends AssignmentConsumer {
+
+ protected Assignment$24$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$25$Consumer;
+ }
}
- protected int consumeGroup$36(int entryPoint) throws Exception {
- IMarker marker = mark();
- while(doConsumeGroup$36(entryPoint) == ConsumeResult.SUCCESS) {
- marker.flush();
+ protected class RuleCall$25$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$25$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(eTypeParameterDeclConsumer, "eTypeParameters", true, false, false, getElement());
}
- marker.rollback();
- skipped(getRule().ele000011Group());
- return ConsumeResult.SUCCESS;
}
- protected int doConsumeGroup$36(int entryPoint) throws Exception {
- final GroupResult result = createGroupResult(getRule().ele000011Group());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$37(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele0000110KeywordComma());
- return result.getResult();
- }
- case 1:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$38(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele0000111AssignmentEGenericSuperTypes());
- return result.getResult();
- }
+ protected class Group$26$Consumer extends LoopGroupConsumer {
+
+ protected Group$26$Consumer(final Group group) {
+ super(group);
+ }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(keyword$27$Consumer);
+ acceptor.accept(assignment$28$Consumer);
}
- return result.getResult();
}
- protected int consumeKeyword$37(int entryPoint) throws Exception {
- int result = doConsumeKeyword$37(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$37(nextEntryPoint());
+ protected class Keyword$27$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$27$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$27$Delimiter());
}
- return result;
}
- protected int doConsumeKeyword$37(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele0000110KeywordComma(), null, false, false, getKeyword$37$Delimiter());
+ protected class Assignment$28$Consumer extends AssignmentConsumer {
+
+ protected Assignment$28$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$29$Consumer;
+ }
}
- protected int consumeAssignment$38(int entryPoint) throws Exception {
- int result = doConsumeAssignment$38(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$38(nextEntryPoint());
+ protected class RuleCall$29$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$29$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(eTypeParameterDeclConsumer, "eTypeParameters", true, false, false, getElement());
}
- return result;
}
- protected int doConsumeAssignment$38(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele0000111AssignmentEGenericSuperTypes());
- return result.getResult(consumeRuleCall$39(entryPoint));
+ protected class Keyword$30$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$30$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$30$Delimiter());
+ }
}
- protected int consumeRuleCall$39(int entryPoint) throws Exception {
- return consumeNonTerminal(eGenericTypeReferenceDeclConsumer, "eGenericSuperTypes", true, false, false, getRule().ele00001110ParserRuleCallEGenericTypeReferenceDecl());
+ protected class Group$31$Consumer extends OptionalGroupConsumer {
+
+ protected Group$31$Consumer(final Group group) {
+ super(group);
+ }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(keyword$33$Consumer);
+ acceptor.accept(assignment$34$Consumer);
+ acceptor.accept(group$36$Consumer);
+ }
}
- protected int consumeGroup$40(int entryPoint) throws Exception {
- IMarker marker = mark();
- int result = doConsumeGroup$40(entryPoint);
- if (result != ConsumeResult.SUCCESS) {
- marker.rollback();
- skipped(getRule().ele0001Group());
- } else
- marker.commit();
- return ConsumeResult.SUCCESS;
+ protected class Keyword$33$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$33$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$33$Delimiter());
+ }
}
- protected int doConsumeGroup$40(int entryPoint) throws Exception {
- final GroupResult result = createGroupResult(getRule().ele0001Group());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$41(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele00010KeywordColon());
- return result.getResult();
- }
- case 1:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$42(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele00011AssignmentInstanceClassName());
- return result.getResult();
- }
+ protected class Assignment$34$Consumer extends AssignmentConsumer {
+
+ protected Assignment$34$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$35$Consumer;
}
- return result.getResult();
}
- protected int consumeKeyword$41(int entryPoint) throws Exception {
- int result = doConsumeKeyword$41(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$41(nextEntryPoint());
+ protected class RuleCall$35$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$35$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(eGenericTypeReferenceDeclConsumer, "eGenericSuperTypes", true, false, false, getElement());
}
- return result;
}
- protected int doConsumeKeyword$41(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele00010KeywordColon(), null, false, false, getKeyword$41$Delimiter());
+ protected class Group$36$Consumer extends LoopGroupConsumer {
+
+ protected Group$36$Consumer(final Group group) {
+ super(group);
+ }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(keyword$37$Consumer);
+ acceptor.accept(assignment$38$Consumer);
+ }
}
- protected int consumeAssignment$42(int entryPoint) throws Exception {
- int result = doConsumeAssignment$42(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$42(nextEntryPoint());
+ protected class Keyword$37$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$37$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$37$Delimiter());
}
- return result;
}
- protected int doConsumeAssignment$42(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele00011AssignmentInstanceClassName());
- return result.getResult(consumeRuleCall$43(entryPoint));
+ protected class Assignment$38$Consumer extends AssignmentConsumer {
+
+ protected Assignment$38$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$39$Consumer;
+ }
}
- protected int consumeRuleCall$43(int entryPoint) throws Exception {
- return consumeNonTerminal(stringOrQidConsumer, "instanceClassName", false, true, false, getRule().ele000110ParserRuleCallSTRING_OR_QID());
+ protected class RuleCall$39$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$39$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(eGenericTypeReferenceDeclConsumer, "eGenericSuperTypes", true, false, false, getElement());
+ }
}
- protected int consumeKeyword$44(int entryPoint) throws Exception {
- int result = doConsumeKeyword$44(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$44(nextEntryPoint());
+ protected class Group$40$Consumer extends OptionalGroupConsumer {
+
+ protected Group$40$Consumer(final Group group) {
+ super(group);
+ }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(keyword$41$Consumer);
+ acceptor.accept(assignment$42$Consumer);
}
- return result;
}
- protected int doConsumeKeyword$44(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele001KeywordLeftCurlyBracket(), null, false, false, getKeyword$44$Delimiter());
+ protected class Keyword$41$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$41$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$41$Delimiter());
+ }
}
- protected int consumeAlternatives$45(int entryPoint) throws Exception {
- IMarker marker = mark();
- while(doConsumeAlternatives$45(entryPoint) == ConsumeResult.SUCCESS) {
- marker.flush();
+ protected class Assignment$42$Consumer extends AssignmentConsumer {
+
+ protected Assignment$42$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$43$Consumer;
}
- marker.rollback();
- skipped(getRule().ele01Alternatives());
- return ConsumeResult.SUCCESS;
}
- protected int doConsumeAlternatives$45(int entryPoint) throws Exception {
- final AlternativesResult result = createAlternativesResult(getRule().ele01Alternatives());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextAlternative();
- if (result.isAlternativeDone(consumeAssignment$46(nextEntryPoint()))) {
- return result.getResult();
- }
- case 1:
- result.nextAlternative();
- if (result.isAlternativeDone(consumeAssignment$48(nextEntryPoint()))) {
- return result.getResult();
- }
+ protected class RuleCall$43$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$43$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(stringOrQidConsumer, "instanceClassName", false, true, false, getElement());
}
- return result.getResult();
}
- protected int consumeAssignment$46(int entryPoint) throws Exception {
- int result = doConsumeAssignment$46(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$46(nextEntryPoint());
+ protected class Keyword$44$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$44$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$44$Delimiter());
}
- return result;
}
- protected int doConsumeAssignment$46(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele010AssignmentEStructuralFeatures());
- return result.getResult(consumeRuleCall$47(entryPoint));
+ protected class Alternatives$45$Consumer extends LoopAlternativesConsumer {
+
+ protected Alternatives$45$Consumer(final Alternatives alternatives) {
+ super(alternatives);
+ }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(assignment$46$Consumer);
+ acceptor.accept(assignment$48$Consumer);
+ }
}
- protected int consumeRuleCall$47(int entryPoint) throws Exception {
- return consumeNonTerminal(eStructuralFeatureDeclConsumer, "eStructuralFeatures", true, false, false, getRule().ele0100ParserRuleCallEStructuralFeatureDecl());
+ protected class Assignment$46$Consumer extends AssignmentConsumer {
+
+ protected Assignment$46$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$47$Consumer;
+ }
}
- protected int consumeAssignment$48(int entryPoint) throws Exception {
- int result = doConsumeAssignment$48(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$48(nextEntryPoint());
+ protected class RuleCall$47$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$47$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(eStructuralFeatureDeclConsumer, "eStructuralFeatures", true, false, false, getElement());
}
- return result;
}
- protected int doConsumeAssignment$48(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele011AssignmentEOperations());
- return result.getResult(consumeRuleCall$49(entryPoint));
+ protected class Assignment$48$Consumer extends AssignmentConsumer {
+
+ protected Assignment$48$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$49$Consumer;
+ }
}
- protected int consumeRuleCall$49(int entryPoint) throws Exception {
- return consumeNonTerminal(eOperationDeclConsumer, "eOperations", true, false, false, getRule().ele0110ParserRuleCallEOperationDecl());
+ protected class RuleCall$49$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$49$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(eOperationDeclConsumer, "eOperations", true, false, false, getElement());
+ }
}
- protected int consumeKeyword$50(int entryPoint) throws Exception {
- int result = doConsumeKeyword$50(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$50(nextEntryPoint());
+ protected class Keyword$50$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$50$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$50$Delimiter());
}
- return result;
}
- protected int doConsumeKeyword$50(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele1KeywordRightCurlyBracket(), null, false, false, getKeyword$50$Delimiter());
+ public EcoreDslEClassDeclConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
+ super(configuration, hiddenTokens);
+ keyword$13$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$16$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$17$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$23$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$27$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$30$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$33$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$37$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$41$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$44$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$50$Delimiter = ICharacterClass.Factory.nullClass();
+ ruleCall$19$Delimiter = ISequenceMatcher.Factory.nullMatcher();
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return group$1$Consumer.consume();
}
public EClassDeclElements getRule() {
@@ -723,6 +656,46 @@ public final class EcoreDslEClassDeclConsumer extends NonTerminalConsumer {
public void setRule(EClassDeclElements rule) {
this.rule = rule;
+
+ group$1$Consumer = new Group$1$Consumer(rule.eleGroup());
+ assignment$10$Consumer = new Assignment$10$Consumer(rule.ele000000000AssignmentEAnnotations());
+ ruleCall$11$Consumer = new RuleCall$11$Consumer(rule.ele0000000000ParserRuleCallEAnnotationDecl());
+ assignment$12$Consumer = new Assignment$12$Consumer(rule.ele000000001AssignmentAbstract());
+ keyword$13$Consumer = new Keyword$13$Consumer(rule.ele0000000010KeywordAbstract());
+ alternatives$14$Consumer = new Alternatives$14$Consumer(rule.ele00000001Alternatives());
+ assignment$15$Consumer = new Assignment$15$Consumer(rule.ele000000010AssignmentInterface());
+ keyword$16$Consumer = new Keyword$16$Consumer(rule.ele0000000100KeywordInterface());
+ keyword$17$Consumer = new Keyword$17$Consumer(rule.ele000000011KeywordClass());
+ assignment$18$Consumer = new Assignment$18$Consumer(rule.ele0000001AssignmentName());
+ ruleCall$19$Consumer = new RuleCall$19$Consumer(rule.ele00000010LexerRuleCallID());
+ group$20$Consumer = new Group$20$Consumer(rule.ele000001Group());
+ keyword$23$Consumer = new Keyword$23$Consumer(rule.ele000001000KeywordLessThanSign());
+ assignment$24$Consumer = new Assignment$24$Consumer(rule.ele000001001AssignmentETypeParameters());
+ ruleCall$25$Consumer = new RuleCall$25$Consumer(rule.ele0000010010ParserRuleCallETypeParameterDecl());
+ group$26$Consumer = new Group$26$Consumer(rule.ele00000101Group());
+ keyword$27$Consumer = new Keyword$27$Consumer(rule.ele000001010KeywordComma());
+ assignment$28$Consumer = new Assignment$28$Consumer(rule.ele000001011AssignmentETypeParameters());
+ ruleCall$29$Consumer = new RuleCall$29$Consumer(rule.ele0000010110ParserRuleCallETypeParameterDecl());
+ keyword$30$Consumer = new Keyword$30$Consumer(rule.ele0000011KeywordGreaterThanSign());
+ group$31$Consumer = new Group$31$Consumer(rule.ele00001Group());
+ keyword$33$Consumer = new Keyword$33$Consumer(rule.ele0000100KeywordExtends());
+ assignment$34$Consumer = new Assignment$34$Consumer(rule.ele0000101AssignmentEGenericSuperTypes());
+ ruleCall$35$Consumer = new RuleCall$35$Consumer(rule.ele00001010ParserRuleCallEGenericTypeReferenceDecl());
+ group$36$Consumer = new Group$36$Consumer(rule.ele000011Group());
+ keyword$37$Consumer = new Keyword$37$Consumer(rule.ele0000110KeywordComma());
+ assignment$38$Consumer = new Assignment$38$Consumer(rule.ele0000111AssignmentEGenericSuperTypes());
+ ruleCall$39$Consumer = new RuleCall$39$Consumer(rule.ele00001110ParserRuleCallEGenericTypeReferenceDecl());
+ group$40$Consumer = new Group$40$Consumer(rule.ele0001Group());
+ keyword$41$Consumer = new Keyword$41$Consumer(rule.ele00010KeywordColon());
+ assignment$42$Consumer = new Assignment$42$Consumer(rule.ele00011AssignmentInstanceClassName());
+ ruleCall$43$Consumer = new RuleCall$43$Consumer(rule.ele000110ParserRuleCallSTRING_OR_QID());
+ keyword$44$Consumer = new Keyword$44$Consumer(rule.ele001KeywordLeftCurlyBracket());
+ alternatives$45$Consumer = new Alternatives$45$Consumer(rule.ele01Alternatives());
+ assignment$46$Consumer = new Assignment$46$Consumer(rule.ele010AssignmentEStructuralFeatures());
+ ruleCall$47$Consumer = new RuleCall$47$Consumer(rule.ele0100ParserRuleCallEStructuralFeatureDecl());
+ assignment$48$Consumer = new Assignment$48$Consumer(rule.ele011AssignmentEOperations());
+ ruleCall$49$Consumer = new RuleCall$49$Consumer(rule.ele0110ParserRuleCallEOperationDecl());
+ keyword$50$Consumer = new Keyword$50$Consumer(rule.ele1KeywordRightCurlyBracket());
}
@Override
diff --git a/examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslEClassifierDeclConsumer.java b/examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslEClassifierDeclConsumer.java
index 9952014..eea85be 100644
--- a/examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslEClassifierDeclConsumer.java
+++ b/examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslEClassifierDeclConsumer.java
@@ -4,90 +4,77 @@
package org.eclipse.xtext.example.parser.packrat.consumers;
import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.AbstractRule;
+import org.eclipse.xtext.Alternatives;
+import org.eclipse.xtext.RuleCall;
-import org.eclipse.xtext.parser.packrat.IMarkerFactory.IMarker;
-import org.eclipse.xtext.parser.packrat.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.IElementConsumer;
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.parser.packrat.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.NonTerminalConsumer;
import org.eclipse.xtext.example.services.EcoreDslGrammarAccess.EClassifierDeclElements;
-import org.eclipse.xtext.example.parser.packrat.consumers.EcoreDslEClassDeclConsumer;
-import org.eclipse.xtext.example.parser.packrat.consumers.EcoreDslEDataTypeDeclConsumer;
-
-@SuppressWarnings("unused")
public final class EcoreDslEClassifierDeclConsumer extends NonTerminalConsumer {
- private EClassifierDeclElements rule;
-
+ private EClassifierDeclElements rule;
+
private INonTerminalConsumer eClassDeclConsumer;
+
private INonTerminalConsumer eDataTypeDeclConsumer;
- public EcoreDslEClassifierDeclConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
- super(configuration, hiddenTokens);
- }
-
- @Override
- protected int doConsume(int entryPoint) throws Exception {
- return consumeAlternatives$1(entryPoint);
- }
+ private IElementConsumer alternatives$1$Consumer;
- protected int consumeAlternatives$1(int entryPoint) throws Exception {
- int result = doConsumeAlternatives$1(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAlternatives$1(nextEntryPoint());
- }
- return result;
- }
+ private IElementConsumer ruleCall$2$Consumer;
- protected int doConsumeAlternatives$1(int entryPoint) throws Exception {
- final AlternativesResult result = createAlternativesResult(getRule().eleAlternatives());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextAlternative();
- if (result.isAlternativeDone(consumeRuleCall$2(nextEntryPoint()))) {
- return result.getResult();
- }
- case 1:
- result.nextAlternative();
- if (result.isAlternativeDone(consumeRuleCall$3(nextEntryPoint()))) {
- return result.getResult();
- }
- }
- return result.getResult();
- }
+ private IElementConsumer ruleCall$3$Consumer;
- protected int consumeRuleCall$2(int entryPoint) throws Exception {
- int result = doConsumeRuleCall$2(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeRuleCall$2(nextEntryPoint());
+ protected class Alternatives$1$Consumer extends AlternativesConsumer {
+
+ protected Alternatives$1$Consumer(final Alternatives alternatives) {
+ super(alternatives);
+ }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(ruleCall$2$Consumer);
+ acceptor.accept(ruleCall$3$Consumer);
}
- return result;
}
- protected int doConsumeRuleCall$2(int entryPoint) throws Exception {
- return consumeNonTerminal(eClassDeclConsumer, null, false, false, false, getRule().ele0ParserRuleCallEClassDecl());
+ protected class RuleCall$2$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$2$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(eClassDeclConsumer, null, false, false, false, getElement());
+ }
}
- protected int consumeRuleCall$3(int entryPoint) throws Exception {
- int result = doConsumeRuleCall$3(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeRuleCall$3(nextEntryPoint());
+ protected class RuleCall$3$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$3$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(eDataTypeDeclConsumer, null, false, false, false, getElement());
}
- return result;
}
- protected int doConsumeRuleCall$3(int entryPoint) throws Exception {
- return consumeNonTerminal(eDataTypeDeclConsumer, null, false, false, false, getRule().ele1ParserRuleCallEDataTypeDecl());
+ public EcoreDslEClassifierDeclConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
+ super(configuration, hiddenTokens);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return alternatives$1$Consumer.consume();
}
public EClassifierDeclElements getRule() {
@@ -96,6 +83,10 @@ public final class EcoreDslEClassifierDeclConsumer extends NonTerminalConsumer {
public void setRule(EClassifierDeclElements rule) {
this.rule = rule;
+
+ alternatives$1$Consumer = new Alternatives$1$Consumer(rule.eleAlternatives());
+ ruleCall$2$Consumer = new RuleCall$2$Consumer(rule.ele0ParserRuleCallEClassDecl());
+ ruleCall$3$Consumer = new RuleCall$3$Consumer(rule.ele1ParserRuleCallEDataTypeDecl());
}
@Override
diff --git a/examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslEDataTypeDeclConsumer.java b/examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslEDataTypeDeclConsumer.java
index e6c9c98..3087e80 100644
--- a/examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslEDataTypeDeclConsumer.java
+++ b/examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslEDataTypeDeclConsumer.java
@@ -4,272 +4,261 @@
package org.eclipse.xtext.example.parser.packrat.consumers;
import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.AbstractRule;
+import org.eclipse.xtext.Alternatives;
+import org.eclipse.xtext.Assignment;
+import org.eclipse.xtext.Group;
+import org.eclipse.xtext.Keyword;
+import org.eclipse.xtext.RuleCall;
-import org.eclipse.xtext.parser.packrat.IMarkerFactory.IMarker;
-import org.eclipse.xtext.parser.packrat.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.IElementConsumer;
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.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.NonTerminalConsumer;
import org.eclipse.xtext.parser.packrat.matching.ICharacterClass;
import org.eclipse.xtext.parser.packrat.matching.ISequenceMatcher;
import org.eclipse.xtext.example.services.EcoreDslGrammarAccess.EDataTypeDeclElements;
-import org.eclipse.xtext.example.parser.packrat.consumers.EcoreDslEAnnotationDeclConsumer;
-import org.eclipse.xtext.example.parser.packrat.consumers.EcoreDslEEnumDeclConsumer;
-import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinIDConsumer;
-import org.eclipse.xtext.example.parser.packrat.consumers.EcoreDslSTRING_OR_QIDConsumer;
-
-@SuppressWarnings("unused")
public final class EcoreDslEDataTypeDeclConsumer extends NonTerminalConsumer {
- private EDataTypeDeclElements rule;
-
+ private EDataTypeDeclElements rule;
+
private INonTerminalConsumer eAnnotationDeclConsumer;
+
private INonTerminalConsumer eEnumDeclConsumer;
+
private ITerminalConsumer idConsumer;
+
private INonTerminalConsumer stringOrQidConsumer;
+ private IElementConsumer alternatives$1$Consumer;
+
+ private IElementConsumer group$2$Consumer;
+
+ private IElementConsumer assignment$4$Consumer;
+
+ private IElementConsumer ruleCall$5$Consumer;
+
+ private IElementConsumer assignment$6$Consumer;
+
+ private IElementConsumer keyword$7$Consumer;
+
+ private IElementConsumer keyword$12$Consumer;
+
+ private IElementConsumer assignment$13$Consumer;
+
+ private IElementConsumer ruleCall$14$Consumer;
+
+ private IElementConsumer keyword$15$Consumer;
+
+ private IElementConsumer assignment$16$Consumer;
+
+ private IElementConsumer ruleCall$17$Consumer;
+
+ private IElementConsumer keyword$18$Consumer;
+
+ private IElementConsumer ruleCall$19$Consumer;
+
private ICharacterClass keyword$7$Delimiter;
-
+
private ICharacterClass keyword$12$Delimiter;
-
+
private ICharacterClass keyword$15$Delimiter;
-
+
private ICharacterClass keyword$18$Delimiter;
-
+
private ISequenceMatcher ruleCall$14$Delimiter;
-
- public EcoreDslEDataTypeDeclConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
- super(configuration, hiddenTokens);
- keyword$7$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$12$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$15$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$18$Delimiter = ICharacterClass.Factory.nullClass();
- ruleCall$14$Delimiter = ISequenceMatcher.Factory.nullMatcher();
- }
-
- @Override
- protected int doConsume(int entryPoint) throws Exception {
- return consumeAlternatives$1(entryPoint);
- }
- protected int consumeAlternatives$1(int entryPoint) throws Exception {
- int result = doConsumeAlternatives$1(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAlternatives$1(nextEntryPoint());
+ protected class Alternatives$1$Consumer extends AlternativesConsumer {
+
+ protected Alternatives$1$Consumer(final Alternatives alternatives) {
+ super(alternatives);
}
- return result;
- }
-
- protected int doConsumeAlternatives$1(int entryPoint) throws Exception {
- final AlternativesResult result = createAlternativesResult(getRule().eleAlternatives());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextAlternative();
- if (result.isAlternativeDone(consumeGroup$2(nextEntryPoint()))) {
- return result.getResult();
- }
- case 1:
- result.nextAlternative();
- if (result.isAlternativeDone(consumeRuleCall$19(nextEntryPoint()))) {
- return result.getResult();
- }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(group$2$Consumer);
+ acceptor.accept(ruleCall$19$Consumer);
}
- return result.getResult();
}
- protected int consumeGroup$2(int entryPoint) throws Exception {
- int result = doConsumeGroup$2(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeGroup$2(nextEntryPoint());
+ protected class Group$2$Consumer extends GroupConsumer {
+
+ protected Group$2$Consumer(final Group group) {
+ super(group);
}
- return result;
- }
-
- protected int doConsumeGroup$2(int entryPoint) throws Exception {
- final GroupResult result = createGroupResult(getRule().ele0Group());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$4(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele000AssignmentEAnnotations());
- return result.getResult();
- }
- case 1:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$6(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele001AssignmentSerializable());
- return result.getResult();
- }
- case 2:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$12(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele010000KeywordDatatype());
- return result.getResult();
- }
- case 3:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$13(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele010001AssignmentName());
- return result.getResult();
- }
- case 4:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$15(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele01001KeywordColon());
- return result.getResult();
- }
- case 5:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$16(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele0101AssignmentInstanceClassName());
- return result.getResult();
- }
- case 6:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$18(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele011KeywordSemicolon());
- return result.getResult();
- }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(assignment$4$Consumer);
+ acceptor.accept(assignment$6$Consumer);
+ acceptor.accept(keyword$12$Consumer);
+ acceptor.accept(assignment$13$Consumer);
+ acceptor.accept(keyword$15$Consumer);
+ acceptor.accept(assignment$16$Consumer);
+ acceptor.accept(keyword$18$Consumer);
}
- return result.getResult();
}
- protected int consumeAssignment$4(int entryPoint) throws Exception {
- IMarker marker = mark();
- while(doConsumeAssignment$4(entryPoint) == ConsumeResult.SUCCESS) {
- marker.flush();
+ protected class Assignment$4$Consumer extends LoopAssignmentConsumer {
+
+ protected Assignment$4$Consumer(final Assignment assignment) {
+ super(assignment);
}
- marker.rollback();
- skipped(getRule().ele000AssignmentEAnnotations());
- return ConsumeResult.SUCCESS;
- }
-
- protected int doConsumeAssignment$4(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele000AssignmentEAnnotations());
- return result.getResult(consumeRuleCall$5(entryPoint));
- }
-
- protected int consumeRuleCall$5(int entryPoint) throws Exception {
- return consumeNonTerminal(eAnnotationDeclConsumer, "eAnnotations", true, false, false, getRule().ele0000ParserRuleCallEAnnotationDecl());
- }
-
- protected int consumeAssignment$6(int entryPoint) throws Exception {
- IMarker marker = mark();
- int result = doConsumeAssignment$6(entryPoint);
- if (result != ConsumeResult.SUCCESS) {
- marker.rollback();
- skipped(getRule().ele001AssignmentSerializable());
- } else
- marker.commit();
- return ConsumeResult.SUCCESS;
- }
-
- protected int doConsumeAssignment$6(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele001AssignmentSerializable());
- return result.getResult(consumeKeyword$7(entryPoint));
- }
-
- protected int consumeKeyword$7(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele0010KeywordSerializable(), "serializable", false, true, getKeyword$7$Delimiter());
- }
-
- protected int consumeKeyword$12(int entryPoint) throws Exception {
- int result = doConsumeKeyword$12(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$12(nextEntryPoint());
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$5$Consumer;
}
- return result;
}
- protected int doConsumeKeyword$12(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele010000KeywordDatatype(), null, false, false, getKeyword$12$Delimiter());
- }
-
- protected int consumeAssignment$13(int entryPoint) throws Exception {
- int result = doConsumeAssignment$13(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$13(nextEntryPoint());
+ protected class RuleCall$5$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$5$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(eAnnotationDeclConsumer, "eAnnotations", true, false, false, getElement());
}
- return result;
}
- protected int doConsumeAssignment$13(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele010001AssignmentName());
- return result.getResult(consumeRuleCall$14(entryPoint));
+ protected class Assignment$6$Consumer extends OptionalAssignmentConsumer {
+
+ protected Assignment$6$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return keyword$7$Consumer;
+ }
}
- protected int consumeRuleCall$14(int entryPoint) throws Exception {
- return consumeTerminal(idConsumer, "name", false, false, getRule().ele0100010LexerRuleCallID(), getRuleCall$14$Delimiter());
+ protected class Keyword$7$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$7$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), "serializable", false, true, getKeyword$7$Delimiter());
+ }
}
- protected int consumeKeyword$15(int entryPoint) throws Exception {
- int result = doConsumeKeyword$15(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$15(nextEntryPoint());
+ protected class Keyword$12$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$12$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$12$Delimiter());
}
- return result;
}
- protected int doConsumeKeyword$15(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele01001KeywordColon(), null, false, false, getKeyword$15$Delimiter());
+ protected class Assignment$13$Consumer extends AssignmentConsumer {
+
+ protected Assignment$13$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$14$Consumer;
+ }
}
- protected int consumeAssignment$16(int entryPoint) throws Exception {
- int result = doConsumeAssignment$16(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$16(nextEntryPoint());
+ protected class RuleCall$14$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$14$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeTerminal(idConsumer, "name", false, false, getElement(), getRuleCall$14$Delimiter());
}
- return result;
}
- protected int doConsumeAssignment$16(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele0101AssignmentInstanceClassName());
- return result.getResult(consumeRuleCall$17(entryPoint));
+ protected class Keyword$15$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$15$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$15$Delimiter());
+ }
}
- protected int consumeRuleCall$17(int entryPoint) throws Exception {
- return consumeNonTerminal(stringOrQidConsumer, "instanceClassName", false, true, false, getRule().ele01010ParserRuleCallSTRING_OR_QID());
+ protected class Assignment$16$Consumer extends AssignmentConsumer {
+
+ protected Assignment$16$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$17$Consumer;
+ }
}
- protected int consumeKeyword$18(int entryPoint) throws Exception {
- int result = doConsumeKeyword$18(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$18(nextEntryPoint());
+ protected class RuleCall$17$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$17$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(stringOrQidConsumer, "instanceClassName", false, true, false, getElement());
}
- return result;
}
- protected int doConsumeKeyword$18(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele011KeywordSemicolon(), null, false, false, getKeyword$18$Delimiter());
+ protected class Keyword$18$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$18$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$18$Delimiter());
+ }
}
- protected int consumeRuleCall$19(int entryPoint) throws Exception {
- int result = doConsumeRuleCall$19(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeRuleCall$19(nextEntryPoint());
+ protected class RuleCall$19$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$19$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(eEnumDeclConsumer, null, false, false, false, getElement());
}
- return result;
}
- protected int doConsumeRuleCall$19(int entryPoint) throws Exception {
- return consumeNonTerminal(eEnumDeclConsumer, null, false, false, false, getRule().ele1ParserRuleCallEEnumDecl());
+ public EcoreDslEDataTypeDeclConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
+ super(configuration, hiddenTokens);
+ keyword$7$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$12$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$15$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$18$Delimiter = ICharacterClass.Factory.nullClass();
+ ruleCall$14$Delimiter = ISequenceMatcher.Factory.nullMatcher();
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return alternatives$1$Consumer.consume();
}
public EDataTypeDeclElements getRule() {
@@ -278,6 +267,21 @@ public final class EcoreDslEDataTypeDeclConsumer extends NonTerminalConsumer {
public void setRule(EDataTypeDeclElements rule) {
this.rule = rule;
+
+ alternatives$1$Consumer = new Alternatives$1$Consumer(rule.eleAlternatives());
+ group$2$Consumer = new Group$2$Consumer(rule.ele0Group());
+ assignment$4$Consumer = new Assignment$4$Consumer(rule.ele000AssignmentEAnnotations());
+ ruleCall$5$Consumer = new RuleCall$5$Consumer(rule.ele0000ParserRuleCallEAnnotationDecl());
+ assignment$6$Consumer = new Assignment$6$Consumer(rule.ele001AssignmentSerializable());
+ keyword$7$Consumer = new Keyword$7$Consumer(rule.ele0010KeywordSerializable());
+ keyword$12$Consumer = new Keyword$12$Consumer(rule.ele010000KeywordDatatype());
+ assignment$13$Consumer = new Assignment$13$Consumer(rule.ele010001AssignmentName());
+ ruleCall$14$Consumer = new RuleCall$14$Consumer(rule.ele0100010LexerRuleCallID());
+ keyword$15$Consumer = new Keyword$15$Consumer(rule.ele01001KeywordColon());
+ assignment$16$Consumer = new Assignment$16$Consumer(rule.ele0101AssignmentInstanceClassName());
+ ruleCall$17$Consumer = new RuleCall$17$Consumer(rule.ele01010ParserRuleCallSTRING_OR_QID());
+ keyword$18$Consumer = new Keyword$18$Consumer(rule.ele011KeywordSemicolon());
+ ruleCall$19$Consumer = new RuleCall$19$Consumer(rule.ele1ParserRuleCallEEnumDecl());
}
@Override
diff --git a/examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslEEnumDeclConsumer.java b/examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslEEnumDeclConsumer.java
index 99981ca..944ddaf 100644
--- a/examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslEEnumDeclConsumer.java
+++ b/examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslEEnumDeclConsumer.java
@@ -4,225 +4,197 @@
package org.eclipse.xtext.example.parser.packrat.consumers;
import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.AbstractRule;
+import org.eclipse.xtext.Assignment;
+import org.eclipse.xtext.Group;
+import org.eclipse.xtext.Keyword;
+import org.eclipse.xtext.RuleCall;
-import org.eclipse.xtext.parser.packrat.IMarkerFactory.IMarker;
-import org.eclipse.xtext.parser.packrat.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.IElementConsumer;
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.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.NonTerminalConsumer;
import org.eclipse.xtext.parser.packrat.matching.ICharacterClass;
import org.eclipse.xtext.parser.packrat.matching.ISequenceMatcher;
import org.eclipse.xtext.example.services.EcoreDslGrammarAccess.EEnumDeclElements;
-import org.eclipse.xtext.example.parser.packrat.consumers.EcoreDslEAnnotationDeclConsumer;
-import org.eclipse.xtext.example.parser.packrat.consumers.EcoreDslEEnumLiteralDeclConsumer;
-import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinIDConsumer;
-
-@SuppressWarnings("unused")
public final class EcoreDslEEnumDeclConsumer extends NonTerminalConsumer {
- private EEnumDeclElements rule;
-
+ private EEnumDeclElements rule;
+
private INonTerminalConsumer eAnnotationDeclConsumer;
+
private INonTerminalConsumer eEnumLiteralDeclConsumer;
+
private ITerminalConsumer idConsumer;
+ private IElementConsumer group$1$Consumer;
+
+ private IElementConsumer assignment$6$Consumer;
+
+ private IElementConsumer ruleCall$7$Consumer;
+
+ private IElementConsumer keyword$8$Consumer;
+
+ private IElementConsumer assignment$9$Consumer;
+
+ private IElementConsumer ruleCall$10$Consumer;
+
+ private IElementConsumer keyword$11$Consumer;
+
+ private IElementConsumer assignment$12$Consumer;
+
+ private IElementConsumer ruleCall$13$Consumer;
+
+ private IElementConsumer keyword$14$Consumer;
+
private ICharacterClass keyword$8$Delimiter;
-
+
private ICharacterClass keyword$11$Delimiter;
-
+
private ICharacterClass keyword$14$Delimiter;
-
+
private ISequenceMatcher ruleCall$10$Delimiter;
-
- public EcoreDslEEnumDeclConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
- super(configuration, hiddenTokens);
- keyword$8$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$11$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$14$Delimiter = ICharacterClass.Factory.nullClass();
- ruleCall$10$Delimiter = ISequenceMatcher.Factory.nullMatcher();
- }
-
- @Override
- protected int doConsume(int entryPoint) throws Exception {
- return consumeGroup$1(entryPoint);
- }
- protected int consumeGroup$1(int entryPoint) throws Exception {
- int result = doConsumeGroup$1(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeGroup$1(nextEntryPoint());
+ protected class Group$1$Consumer extends GroupConsumer {
+
+ protected Group$1$Consumer(final Group group) {
+ super(group);
}
- return result;
- }
-
- protected int doConsumeGroup$1(int entryPoint) throws Exception {
- final GroupResult result = createGroupResult(getRule().eleGroup());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$6(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele00000AssignmentEAnnotations());
- return result.getResult();
- }
- case 1:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$8(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele00001KeywordEnum());
- return result.getResult();
- }
- case 2:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$9(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele0001AssignmentName());
- return result.getResult();
- }
- case 3:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$11(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele001KeywordLeftCurlyBracket());
- return result.getResult();
- }
- case 4:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$12(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele01AssignmentELiterals());
- return result.getResult();
- }
- case 5:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$14(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele1KeywordRightCurlyBracket());
- return result.getResult();
- }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(assignment$6$Consumer);
+ acceptor.accept(keyword$8$Consumer);
+ acceptor.accept(assignment$9$Consumer);
+ acceptor.accept(keyword$11$Consumer);
+ acceptor.accept(assignment$12$Consumer);
+ acceptor.accept(keyword$14$Consumer);
}
- return result.getResult();
}
- protected int consumeAssignment$6(int entryPoint) throws Exception {
- IMarker marker = mark();
- while(doConsumeAssignment$6(entryPoint) == ConsumeResult.SUCCESS) {
- marker.flush();
+ protected class Assignment$6$Consumer extends LoopAssignmentConsumer {
+
+ protected Assignment$6$Consumer(final Assignment assignment) {
+ super(assignment);
}
- marker.rollback();
- skipped(getRule().ele00000AssignmentEAnnotations());
- return ConsumeResult.SUCCESS;
- }
-
- protected int doConsumeAssignment$6(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele00000AssignmentEAnnotations());
- return result.getResult(consumeRuleCall$7(entryPoint));
- }
-
- protected int consumeRuleCall$7(int entryPoint) throws Exception {
- return consumeNonTerminal(eAnnotationDeclConsumer, "eAnnotations", true, false, false, getRule().ele000000ParserRuleCallEAnnotationDecl());
- }
-
- protected int consumeKeyword$8(int entryPoint) throws Exception {
- int result = doConsumeKeyword$8(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$8(nextEntryPoint());
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$7$Consumer;
}
- return result;
}
- protected int doConsumeKeyword$8(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele00001KeywordEnum(), null, false, false, getKeyword$8$Delimiter());
- }
-
- protected int consumeAssignment$9(int entryPoint) throws Exception {
- int result = doConsumeAssignment$9(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$9(nextEntryPoint());
+ protected class RuleCall$7$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$7$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(eAnnotationDeclConsumer, "eAnnotations", true, false, false, getElement());
}
- return result;
- }
-
- protected int doConsumeAssignment$9(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele0001AssignmentName());
- return result.getResult(consumeRuleCall$10(entryPoint));
}
- protected int consumeRuleCall$10(int entryPoint) throws Exception {
- return consumeTerminal(idConsumer, "name", false, false, getRule().ele00010LexerRuleCallID(), getRuleCall$10$Delimiter());
+ protected class Keyword$8$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$8$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$8$Delimiter());
+ }
}
- protected int consumeKeyword$11(int entryPoint) throws Exception {
- int result = doConsumeKeyword$11(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$11(nextEntryPoint());
+ protected class Assignment$9$Consumer extends AssignmentConsumer {
+
+ protected Assignment$9$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$10$Consumer;
}
- return result;
}
- protected int doConsumeKeyword$11(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele001KeywordLeftCurlyBracket(), null, false, false, getKeyword$11$Delimiter());
+ protected class RuleCall$10$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$10$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeTerminal(idConsumer, "name", false, false, getElement(), getRuleCall$10$Delimiter());
+ }
}
- protected int consumeAssignment$12(int entryPoint) throws Exception {
- IMarker marker = mark();
- int result = ConsumeResult.SUCCESS;
- announceNextLevel();
- switch(entryPoint) {
- case -1:
- result = ConsumeResult.EMPTY_MATCH;
- case 0:
- announceNextStep();
- result = doConsumeAssignment$12(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$12(nextEntryPoint());
- }
- case 1:
- if (result == ConsumeResult.SUCCESS) {
- marker.flush();
- announceNextStep();
- while(doConsumeAssignment$12(nextEntryPoint())==ConsumeResult.SUCCESS) {
- marker.flush();
- }
- marker.rollback();
- skipped(getRule().ele01AssignmentELiterals());
- announceLevelFinished();
- return ConsumeResult.SUCCESS;
- }
- error("Could not find token.", getRule().ele01AssignmentELiterals());
+ protected class Keyword$11$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$11$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$11$Delimiter());
}
- announceLevelFinished();
- marker.commit();
- return result;
}
- protected int doConsumeAssignment$12(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele01AssignmentELiterals());
- return result.getResult(consumeRuleCall$13(entryPoint));
+ protected class Assignment$12$Consumer extends MandatoryLoopAssignmentConsumer {
+
+ protected Assignment$12$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$13$Consumer;
+ }
}
- protected int consumeRuleCall$13(int entryPoint) throws Exception {
- return consumeNonTerminal(eEnumLiteralDeclConsumer, "eLiterals", true, false, false, getRule().ele010ParserRuleCallEEnumLiteralDecl());
+ protected class RuleCall$13$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$13$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(eEnumLiteralDeclConsumer, "eLiterals", true, false, false, getElement());
+ }
}
- protected int consumeKeyword$14(int entryPoint) throws Exception {
- int result = doConsumeKeyword$14(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$14(nextEntryPoint());
+ protected class Keyword$14$Consumer extends ElementConsumer<Keyword> {
+
+ protected Keyword$14$Consumer(final Keyword keyword) {
+ super(keyword);
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$14$Delimiter());
}
- return result;
}
- protected int doConsumeKeyword$14(int entryPoint) throws Exception {
- return consumeKeyword(getRule().ele1KeywordRightCurlyBracket(), null, false, false, getKeyword$14$Delimiter());
+ public EcoreDslEEnumDeclConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
+ super(configuration, hiddenTokens);
+ keyword$8$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$11$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$14$Delimiter = ICharacterClass.Factory.nullClass();
+ ruleCall$10$Delimiter = ISequenceMatcher.Factory.nullMatcher();
+ }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return group$1$Consumer.consume();
}
public EEnumDeclElements getRule() {
@@ -231,6 +203,17 @@ public final class EcoreDslEEnumDeclConsumer extends NonTerminalConsumer {
public void setRule(EEnumDeclElements rule) {
this.rule = rule;
+
+ group$1$Consumer = new Group$1$Consumer(rule.eleGroup());
+ assignment$6$Consumer = new Assignment$6$Consumer(rule.ele00000AssignmentEAnnotations());
+ ruleCall$7$Consumer = new RuleCall$7$Consumer(rule.ele000000ParserRuleCallEAnnotationDecl());
+ keyword$8$Consumer = new Keyword$8$Consumer(rule.ele00001KeywordEnum());
+ assignment$9$Consumer = new Assignment$9$Consumer(rule.ele0001AssignmentName());
+ ruleCall$10$Consumer = new RuleCall$10$Consumer(rule.ele00010LexerRuleCallID());
+ keyword$11$Consumer = new Keyword$11$Consumer(rule.ele001KeywordLeftCurlyBracket());
+ assignment$12$Consumer = new Assignment$12$Consumer(rule.ele01AssignmentELiterals());
+ ruleCall$13$Consumer = new RuleCall$13$Consumer(rule.ele010ParserRuleCallEEnumLiteralDecl());
+ keyword$14$Consumer = new Keyword$14$Consumer(rule.ele1KeywordRightCurlyBracket());
}
@Override
diff --git a/examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslEEnumLiteralDeclConsumer.java b/examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslEEnumLiteralDeclConsumer.java
index b74cdaa..052a655 100644
--- a/examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslEEnumLiteralDeclConsumer.java
+++ b/examples/org.eclipse.xtext.example.ecoredsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/EcoreDslEEnumLiteralDeclConsumer.java
@@ -4,241 +4,230 @@
package org.eclipse.xtext.example.parser.packrat.consumers;
import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.AbstractRule;
+import org.eclipse.xtext.Assignment;
+import org.eclipse.xtext.Group;
+import org.eclipse.xtext.Keyword;
+import org.eclipse.xtext.RuleCall;
-import org.eclipse.xtext.parser.packrat.IMarkerFactory.IMarker;
-import org.eclipse.xtext.parser.packrat.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.IElementConsumer;
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.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.NonTerminalConsumer;
import org.eclipse.xtext.parser.packrat.matching.ICharacterClass;
import org.eclipse.xtext.parser.packrat.matching.ISequenceMatcher;
import org.eclipse.xtext.example.services.EcoreDslGrammarAccess.EEnumLiteralDeclElements;
-import org.eclipse.xtext.example.parser.packrat.consumers.EcoreDslEAnnotationDeclConsumer;
-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;
-
-@SuppressWarnings("unused")
public final class EcoreDslEEnumLiteralDeclConsumer extends NonTerminalConsumer {
- private EEnumLiteralDeclElements rule;
-
+ private EEnumLiteralDeclElements rule;
+
private INonTerminalConsumer eAnnotationDeclConsumer;
+
private ITerminalConsumer idConsumer;
+
private ITerminalConsumer intConsumer;
+
private ITerminalConsumer stringConsumer;
+ private IElementConsumer group$1$Consumer;
+
+ private IElementConsumer assignment$5$Consumer;
+
+ private IElementConsumer ruleCall$6$Consumer;
+
+ private IElementConsumer assignment$7$Consumer;
+
+ private IElementConsumer ruleCall$8$Consumer;
+
+ private IElementConsumer group$9$Consumer;
+
+ private IElementConsumer keyword$10$Consumer;
+
+ private IElementConsumer assignment$11$Consumer;
+
+ private IElementConsumer ruleCall$12$Consumer;
+
+ private IElementConsumer assignment$13$Consumer;
+
+ private IElementConsumer ruleCall$14$Consumer;
+
+ private IElementConsumer keyword$15$Consumer;
+
private ICharacterClass keyword$10$Delimiter;
-
+
private ICharacterClass keyword$15$Delimiter;
-
+
private ISequenceMatcher ruleCall$8$Delimiter;
-
+
private ISequenceMatcher ruleCall$12$Delimiter;
-
+
private ISequenceMatcher ruleCall$14$Delimiter;
-
- public EcoreDslEEnumLiteralDeclConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
- super(configuration, hiddenTokens);
- keyword$10$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$15$Delimiter = ICharacterClass.Factory.nullClass();
- ruleCall$8$Delimiter = ISequenceMatcher.Factory.nullMatcher();
- ruleCall$12$Delimiter = ISequenceMatcher.Factory.nullMatcher();
- ruleCall$14$Delimiter = ISequenceMatcher.Factory.nullMatcher();
- }
-
- @Override
- protected int doConsume(int entryPoint) throws Exception {
- return consumeGroup$1(entryPoint);
- }
- protected int consumeGroup$1(int entryPoint) throws Exception {
- int result = doConsumeGroup$1(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeGroup$1(nextEntryPoint());
+ protected class Group$1$Consumer extends GroupConsumer {
+
+ protected Group$1$Consumer(final Group group) {
+ super(group);
}
- return result;
- }
-
- protected int doConsumeGroup$1(int entryPoint) throws Exception {
- final GroupResult result = createGroupResult(getRule().eleGroup());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$5(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele0000AssignmentEAnnotations());
- return result.getResult();
- }
- case 1:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$7(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele0001AssignmentName());
- return result.getResult();
- }
- case 2:
- result.nextStep();
- if (result.didGroupFail(consumeGroup$9(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele001Group());
- return result.getResult();
- }
- case 3:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$13(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele01AssignmentLiteral());
- return result.getResult();
- }
- case 4:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$15(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele1KeywordSemicolon());
- return result.getResult();
- }
+
+ @Override
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(assignment$5$Consumer);
+ acceptor.accept(assignment$7$Consumer);
+ acceptor.accept(group$9$Consumer);
+ acceptor.accept(assignment$13$Consumer);
+ acceptor.accept(keyword$15$Consumer);
}
- return result.getResult();
}
- protected int consumeAssignment$5(int entryPoint) throws Exception {
- IMarker marker = mark();
- while(doConsumeAssignment$5(entryPoint) == ConsumeResult.SUCCESS) {
- marker.flush();
+ protected class Assignment$5$Consumer extends LoopAssignmentConsumer {
+
+ protected Assignment$5$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$6$Consumer;
}
- marker.rollback();
- skipped(getRule().ele0000AssignmentEAnnotations());
- return ConsumeResult.SUCCESS;
- }
-
- protected int doConsumeAssignment$5(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele0000AssignmentEAnnotations());
- return result.getResult(consumeRuleCall$6(entryPoint));
- }
-
- protected int consumeRuleCall$6(int entryPoint) throws Exception {
- return consumeNonTerminal(eAnnotationDeclConsumer, "eAnnotations", true, false, false, getRule().ele00000ParserRuleCallEAnnotationDecl());
}
- protected int consumeAssignment$7(int entryPoint) throws Exception {
- int result = doConsumeAssignment$7(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeAssignment$7(nextEntryPoint());
+ protected class RuleCall$6$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$6$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
}
- return result;
- }
-
- protected int doConsumeAssignment$7(int entryPoint) throws Exception {
- final AssignmentResult result = createAssignmentResult(getRule().ele0001AssignmentName());
- return result.getResult(consumeRuleCall$8(entryPoint));
- }
-
- protected int consumeRuleCall$8(int entryPoint) throws Exception {
- return consumeTerminal(idConsumer, "name", false, false, getRule().ele00010LexerRuleCallID(), getRuleCall$8$Delimiter());
- }
-
- protected int consumeGroup$9(int entryPoint) throws Exception {
- IMarker marker = mark();
- int result = doConsumeGroup$9(entryPoint);
- if (result != ConsumeResult.SUCCESS) {
- marker.rollback();
- skipped(getRule().ele001Group());
- } else
- marker.commit();
- return ConsumeResult.SUCCESS;
- }
-
- protected int doConsumeGroup$9(int entryPoint) throws Exception {
- final GroupResult result = createGroupResult(getRule().ele001Group());
- switch(entryPoint) {
- case -1: // use fall through semantics of switch case
- result.reset();
- case 0:
- result.nextStep();
- if (result.didGroupFail(consumeKeyword$10(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele0010KeywordEqualsSign());
- return result.getResult();
- }
- case 1:
- result.nextStep();
- if (result.didGroupFail(consumeAssignment$11(nextEntryPoint()))) {
- // TODO improve error message
- error("Another token expected.", getRule().ele0011AssignmentValue());
- return result.getResult();
- }
+
+ @Override
+ protected int doConsume() throws Exception {
+ return consumeNonTerminal(eAnnotationDeclConsumer, "eAnnotations", true, false, false, getElement());
}
- return result.getResult();
}
- protected int consumeKeyword$10(int entryPoint) throws Exception {
- int result = doConsumeKeyword$10(nextEntryPoint());
- while(result != ConsumeResult.SUCCESS && skipPreviousToken()) {
- result = doConsumeKeyword$10(nextEntryPoint());
+ protected class Assignment$7$Consumer extends AssignmentConsumer {
+
+ protected Assignment$7$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$8$Consumer;
}
- return result;
}
- protected int doConsumeKeyword$10(i