summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorszarnekow2009-02-02 10:37:41 (EST)
committer sefftinge2009-02-02 10:37:41 (EST)
commit6ee0df093da723cc48948d642c75ef3eb7fa6cb6 (patch)
treecd017ba541c7bb5740276b8b63e7b7ee68e8723a
parentbd6fe81070e33ff2e18553f7cb32cd04ffe56e0b (diff)
downloadorg.eclipse.xtext-6ee0df093da723cc48948d642c75ef3eb7fa6cb6.zip
org.eclipse.xtext-6ee0df093da723cc48948d642c75ef3eb7fa6cb6.tar.gz
org.eclipse.xtext-6ee0df093da723cc48948d642c75ef3eb7fa6cb6.tar.bz2
Mino Refactoring in Packrat Code
-rw-r--r--devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarCustomTypeParserRuleConsumer.java2
-rw-r--r--devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarErwachsenerConsumer.java2
-rw-r--r--devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarFamilieConsumer.java4
-rw-r--r--devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarKindConsumer.java2
-rw-r--r--devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarPersonConsumer.java50
-rw-r--r--devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarSpielplatzConsumer.java106
-rw-r--r--devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/packrat/consumers/ReferenceGrammarSpielzeugConsumer.java2
-rw-r--r--examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/domainmodel.ecore2
-rw-r--r--examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelAttributeConsumer.java2
-rw-r--r--examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelDataTypeConsumer.java2
-rw-r--r--examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelEntityConsumer.java4
-rw-r--r--examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelFeatureConsumer.java50
-rw-r--r--examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelFileConsumer.java2
-rw-r--r--examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelImportConsumer.java2
-rw-r--r--examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelNamedElementConsumer.java50
-rw-r--r--examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelOperationConsumer.java6
-rw-r--r--examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelPackageConsumer.java2
-rw-r--r--examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelParameterConsumer.java2
-rw-r--r--examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelQualifiedNameConsumer.java4
-rw-r--r--examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelReferenceConsumer.java4
-rw-r--r--examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelStructuralFeatureConsumer.java50
-rw-r--r--examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelTypeConsumer.java50
-rw-r--r--examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/DomainmodelTypedElementConsumer.java50
-rw-r--r--examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/FowlerDslCommandConsumer.java2
-rw-r--r--examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/FowlerDslEventConsumer.java2
-rw-r--r--examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/FowlerDslStateConsumer.java4
-rw-r--r--examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/FowlerDslStatemachineConsumer.java2
-rw-r--r--examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/FowlerDslTransitionConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/XtextTest.ecore8
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/consumers/ImportUriTestLanguageImportConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/consumers/ImportUriTestLanguageMainConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/consumers/ImportUriTestLanguageTypeConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/consumers/LangATestLanguageImportConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/consumers/LangATestLanguageMainConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/consumers/LangATestLanguageTypeConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/parser/packrat/consumers/DummyTestLanguageElementConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/AbstractTestLanguageInheritedParserRuleConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/ConcreteTestLanguageConcreteParserRuleConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/packrat/consumers/MetamodelRefTestLanguageFooConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/packrat/consumers/MultiGenMMTestLanguageFooConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/packrat/consumers/DatatypeRulesTestLanguageDotsConsumer.java52
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/packrat/consumers/DatatypeRulesTestLanguageFractionConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/packrat/consumers/DatatypeRulesTestLanguageModelConsumer.java8
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/packrat/consumers/DatatypeRulesTestLanguageModelIdConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/packrat/consumers/DatatypeRulesTestLanguageNestedModelIdConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/packrat/consumers/DatatypeRulesTestLanguageVectorConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageAssignmentConsumer.java86
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageAssignmentValueConsumer.java94
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageBiListAssignmentConsumer.java10
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageBiSingleAssignmentConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageCreatedObjectConsumer.java104
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageEPackageImportConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageEPatchConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageExecutableConsumer.java50
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageExtensionImportConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageImportConsumer.java68
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageJavaExecutableConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageJavaImportConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageListAssignmentValueConsumer.java116
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageMigrationConsumer.java56
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageModelImportConsumer.java50
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageMonoListAssignmentConsumer.java6
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageMonoSingleAssignmentConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageNamedObjectConsumer.java50
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageNamedResourceConsumer.java106
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageObjectCopyConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageObjectNewConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageObjectRefConsumer.java112
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageResourceImportConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageSingleAssignmentValueConsumer.java112
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAbstractMetamodelDeclarationConsumer.java50
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAbstractNegatedTokenConsumer.java50
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAbstractRuleConsumer.java68
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAbstractTerminalConsumer.java86
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAbstractTokenConsumer.java70
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageActionConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAlternativesConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAssignmentConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageCharacterRangeConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageCrossReferenceConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageGeneratedMetamodelConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageGrammarConsumer.java58
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageGroupConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageLexerRuleConsumer.java54
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageNegatedTokenConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageParenthesizedElementConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageParenthesizedTerminalElementConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageParserRuleConsumer.java6
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageReferencedMetamodelConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTerminalAlternativesConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTerminalGroupConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTerminalRuleConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTerminalTokenConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTerminalTokenElementConsumer.java104
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTypeRefConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageUpToTokenConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageHidingHiddensConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageInheritingHiddensCallConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageInheritingHiddensConsumer.java52
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageModelConsumer.java86
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageOverridingHiddensCallConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageOverridingHiddensConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageWithHiddensConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageWithoutHiddensConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/TerminalRulesTestLanguageModelConsumer.java140
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageAbstractMetamodelDeclarationConsumer.java50
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageAbstractNegatedTokenConsumer.java50
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageAbstractRuleConsumer.java68
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageAbstractTerminalConsumer.java86
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageAbstractTokenConsumer.java70
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageActionConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageAlternativesConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageAssignmentConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageCharacterRangeConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageCrossReferenceConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageGeneratedMetamodelConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageGrammarConsumer.java58
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageGroupConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageLexerRuleConsumer.java54
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageNegatedTokenConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageParenthesizedElementConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageParenthesizedTerminalElementConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageParserRuleConsumer.java10
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageReferencedMetamodelConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageTerminalAlternativesConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageTerminalGroupConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageTerminalRuleConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageTerminalTokenConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageTerminalTokenElementConsumer.java104
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageTypeRefConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageUpToTokenConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/formatter/parser/packrat/consumers/FormatterTestLanguageLineConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/formatter/parser/packrat/consumers/FormatterTestLanguageRootConsumer.java52
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/formatter/parser/packrat/consumers/FormatterTestLanguageTestIndentationConsumer.java52
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/formatter/parser/packrat/consumers/FormatterTestLanguageTestLinewrapConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageOpConsumer.java56
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageParensConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageRootConsumer.java50
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTermConsumer.java50
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyAConsumer.java56
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyBConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyCConsumer.java8
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyDConsumer.java6
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyEConsumer.java6
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyFConsumer.java54
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyG1Consumer.java6
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyG2Consumer.java50
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyGConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageBooleanConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageManyStringsConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageOpConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageParensConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageRef2Consumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageSpareConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageTermConsumer.java158
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageTwoNumbersConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageTypeConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/transientvalues/parser/packrat/consumers/TransientValuesTestRootConsumer.java70
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/transientvalues/parser/packrat/consumers/TransientValuesTestTestListConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/transientvalues/parser/packrat/consumers/TransientValuesTestTestOptionalConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/transientvalues/parser/packrat/consumers/TransientValuesTestTestRequiredConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ReferenceGrammar.ecore6
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ActionTestLanguageElementConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ActionTestLanguageItemConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ContentAssistTestLanguageAbstractRuleConsumer.java50
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ContentAssistTestLanguageFirstAbstractRuleChildConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ContentAssistTestLanguageSecondAbstractRuleChildConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ContentAssistTestLanguageStartConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/FowlerDslTestLanguageCommandConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/FowlerDslTestLanguageEventConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/FowlerDslTestLanguageStateConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/FowlerDslTestLanguageStatemachineConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/FowlerDslTestLanguageTransitionConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LexerTestLanguageElementConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LookaheadTestLanguageAltsConsumer.java68
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LookaheadTestLanguageLookAhead0Consumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LookaheadTestLanguageLookAhead1Consumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LookaheadTestLanguageLookAhead2Consumer.java52
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LookaheadTestLanguageLookAhead3Consumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LookaheadTestLanguageLookAhead4Consumer.java50
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/OptionalEmptyTestLanguageGreetingConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageAbstractChildConsumer.java50
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageAbstractChildrenConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageChildConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageChildrenConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageContainerConsumer.java52
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageContentConsumer.java50
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageFirstConcreteConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageNestedConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageSecondConcreteConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageErwachsenerConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageFamilieConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageFarbeConsumer.java86
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageKindConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguagePersonConsumer.java50
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageSpielplatzConsumer.java88
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageSpielzeugConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/SimpleExpressionsTestLanguageAdditionConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/SimpleExpressionsTestLanguageMultiplicationConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/SimpleExpressionsTestLanguageParensConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/SimpleExpressionsTestLanguageSequenceConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/SimpleExpressionsTestLanguageTermConsumer.java50
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/TestLanguageAbstractRuleConsumer.java50
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/TestLanguageChoiceRuleConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/TestLanguageReducibleRuleConsumer.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/TreeTestLanguageNodeConsumer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/parser/packrat/consumers/Bug250313Ref2Consumer.java2
-rw-r--r--tests/org.eclipse.xtext.ui.integration.tests/src-gen/org/eclipse/xtext/ui/integration/parser/packrat/consumers/TestLanguageStuffConsumer.java2
208 files changed, 1060 insertions, 3544 deletions
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 f37dd60..b2cf66e 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
@@ -41,7 +41,7 @@ public final class ReferenceGrammarCustomTypeParserRuleConsumer extends NonTermi
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
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 fe6a8e0..3c13d75 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
@@ -52,7 +52,7 @@ public final class ReferenceGrammarErwachsenerConsumer extends NonTerminalConsum
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
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 95e6e6e..c6029df 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
@@ -70,7 +70,7 @@ public final class ReferenceGrammarFamilieConsumer extends NonTerminalConsumer {
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -250,7 +250,7 @@ public final class ReferenceGrammarFamilieConsumer extends NonTerminalConsumer {
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
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 4ddb0cb..024d1bc 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
@@ -52,7 +52,7 @@ public final class ReferenceGrammarKindConsumer extends NonTerminalConsumer {
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
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 8bda1c7..76d9025 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
@@ -33,52 +33,22 @@ public final class ReferenceGrammarPersonConsumer extends NonTerminalConsumer {
}
protected int consumeAlternatives$1(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$2(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$2(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$3(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$3(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeRuleCall$2(int entryPoint) throws Exception {
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 c96792c..7c3b7d0 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
@@ -72,7 +72,7 @@ public final class ReferenceGrammarSpielplatzConsumer extends NonTerminalConsume
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -190,103 +190,37 @@ public final class ReferenceGrammarSpielplatzConsumer extends NonTerminalConsume
}
protected int doConsumeAlternatives$12(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$16(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$16(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$18(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$18(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 2:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$20(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$20(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 3:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$22(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$22(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 4:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$24(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$24(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeAssignment$16(int entryPoint) throws Exception {
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 8f72c01..7638c61 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
@@ -49,7 +49,7 @@ public final class ReferenceGrammarSpielzeugConsumer extends NonTerminalConsumer
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/domainmodel.ecore b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/domainmodel.ecore
index 9f2974c..6d74b1d 100644
--- a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/domainmodel.ecore
+++ b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/domainmodel.ecore
@@ -34,10 +34,10 @@
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Parameter" eSuperTypes="//TypedElement"/>
<eClassifiers xsi:type="ecore:EClass" name="TypedElement">
- <eStructuralFeatures xsi:type="ecore:EReference" name="type" eType="//TypeRef" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name">
<eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="type" eType="//TypeRef" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="TypeRef">
<eStructuralFeatures xsi:type="ecore:EReference" name="referenced" eType="//Type"/>
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 2ad377a..38f88e9 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
@@ -46,7 +46,7 @@ public final class DomainmodelAttributeConsumer extends NonTerminalConsumer {
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
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 3b82d7b..c03595a 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
@@ -41,7 +41,7 @@ public final class DomainmodelDataTypeConsumer extends NonTerminalConsumer {
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
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 9e5d0c5..51f40c0 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
@@ -55,7 +55,7 @@ public final class DomainmodelEntityConsumer extends NonTerminalConsumer {
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -150,7 +150,7 @@ public final class DomainmodelEntityConsumer extends NonTerminalConsumer {
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
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 3947924..f0d144a 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
@@ -33,52 +33,22 @@ public final class DomainmodelFeatureConsumer extends NonTerminalConsumer {
}
protected int consumeAlternatives$1(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$2(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$2(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$3(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$3(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeRuleCall$2(int entryPoint) throws Exception {
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 9c7fd44..6631666 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
@@ -37,7 +37,7 @@ public final class DomainmodelFileConsumer extends NonTerminalConsumer {
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
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 ae13cd3..28a7174 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
@@ -41,7 +41,7 @@ public final class DomainmodelImportConsumer extends NonTerminalConsumer {
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
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 caefe39..63f13bf 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
@@ -33,52 +33,22 @@ public final class DomainmodelNamedElementConsumer extends NonTerminalConsumer {
}
protected int consumeAlternatives$1(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$2(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$2(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$3(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$3(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeRuleCall$2(int entryPoint) throws Exception {
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 bbb3b98..63b0af0 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
@@ -57,7 +57,7 @@ public final class DomainmodelOperationConsumer extends NonTerminalConsumer {
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -165,7 +165,7 @@ public final class DomainmodelOperationConsumer extends NonTerminalConsumer {
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -219,7 +219,7 @@ public final class DomainmodelOperationConsumer extends NonTerminalConsumer {
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
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 829939a..f38e3ed 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
@@ -46,7 +46,7 @@ public final class DomainmodelPackageConsumer extends NonTerminalConsumer {
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
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 b762fc2..7d50db8 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
@@ -40,7 +40,7 @@ public final class DomainmodelParameterConsumer extends NonTerminalConsumer {
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
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 f195512..bc14a5b 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
@@ -44,7 +44,7 @@ public final class DomainmodelQualifiedNameConsumer extends NonTerminalConsumer
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -88,7 +88,7 @@ public final class DomainmodelQualifiedNameConsumer extends NonTerminalConsumer
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
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 39e2ce4..361a492 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
@@ -52,7 +52,7 @@ public final class DomainmodelReferenceConsumer extends NonTerminalConsumer {
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -156,7 +156,7 @@ public final class DomainmodelReferenceConsumer extends NonTerminalConsumer {
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
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 0bb6fb0..241dcb0 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
@@ -33,52 +33,22 @@ public final class DomainmodelStructuralFeatureConsumer extends NonTerminalConsu
}
protected int consumeAlternatives$1(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$2(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$2(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$3(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$3(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeRuleCall$2(int entryPoint) throws Exception {
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 91eb8dc..fb631cc 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
@@ -33,52 +33,22 @@ public final class DomainmodelTypeConsumer extends NonTerminalConsumer {
}
protected int consumeAlternatives$1(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$2(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$2(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$3(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$3(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeRuleCall$2(int entryPoint) throws Exception {
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 f3ce332..2de8e84 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
@@ -33,52 +33,22 @@ public final class DomainmodelTypedElementConsumer extends NonTerminalConsumer {
}
protected int consumeAlternatives$1(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$2(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$2(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$3(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$3(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeRuleCall$2(int entryPoint) throws Exception {
diff --git a/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/FowlerDslCommandConsumer.java b/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/FowlerDslCommandConsumer.java
index 5704bba..bd0e59d 100644
--- a/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/FowlerDslCommandConsumer.java
+++ b/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/FowlerDslCommandConsumer.java
@@ -41,7 +41,7 @@ public final class FowlerDslCommandConsumer extends NonTerminalConsumer {
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/FowlerDslEventConsumer.java b/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/FowlerDslEventConsumer.java
index edc32d8..5e73603 100644
--- a/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/FowlerDslEventConsumer.java
+++ b/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/FowlerDslEventConsumer.java
@@ -44,7 +44,7 @@ public final class FowlerDslEventConsumer extends NonTerminalConsumer {
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/FowlerDslStateConsumer.java b/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/FowlerDslStateConsumer.java
index 76aaccf..bfc1fd4 100644
--- a/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/FowlerDslStateConsumer.java
+++ b/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/FowlerDslStateConsumer.java
@@ -58,7 +58,7 @@ public final class FowlerDslStateConsumer extends NonTerminalConsumer {
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -144,7 +144,7 @@ public final class FowlerDslStateConsumer extends NonTerminalConsumer {
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/FowlerDslStatemachineConsumer.java b/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/FowlerDslStatemachineConsumer.java
index 65af040..1e21971 100644
--- a/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/FowlerDslStatemachineConsumer.java
+++ b/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/FowlerDslStatemachineConsumer.java
@@ -51,7 +51,7 @@ public final class FowlerDslStatemachineConsumer extends NonTerminalConsumer {
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/FowlerDslTransitionConsumer.java b/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/FowlerDslTransitionConsumer.java
index 361b99a..e376f73 100644
--- a/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/FowlerDslTransitionConsumer.java
+++ b/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/packrat/consumers/FowlerDslTransitionConsumer.java
@@ -44,7 +44,7 @@ public final class FowlerDslTransitionConsumer extends NonTerminalConsumer {
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/XtextTest.ecore b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/XtextTest.ecore
index 6edbed4..8d076d0 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/XtextTest.ecore
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/XtextTest.ecore
@@ -14,18 +14,18 @@
<eStructuralFeatures xsi:type="ecore:EReference" name="rules" unique="false" upperBound="-1" eType="//AbstractRule" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="AbstractRule">
- <eStructuralFeatures xsi:type="ecore:EReference" name="type" eType="//TypeRef" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name">
<eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="type" eType="//TypeRef" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="AbstractMetamodelDeclaration">
- <eStructuralFeatures xsi:type="ecore:EReference" name="ePackage">
- <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EPackage"/>
- </eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="alias">
<eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="ePackage">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EPackage"/>
+ </eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="GeneratedMetamodel" eSuperTypes="//AbstractMetamodelDeclaration">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name">
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/consumers/ImportUriTestLanguageImportConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/consumers/ImportUriTestLanguageImportConsumer.java
index 6300b60..94d2936 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/consumers/ImportUriTestLanguageImportConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/consumers/ImportUriTestLanguageImportConsumer.java
@@ -41,7 +41,7 @@ public final class ImportUriTestLanguageImportConsumer extends NonTerminalConsum
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/consumers/ImportUriTestLanguageMainConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/consumers/ImportUriTestLanguageMainConsumer.java
index a8821e4..c623896 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/consumers/ImportUriTestLanguageMainConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/consumers/ImportUriTestLanguageMainConsumer.java
@@ -37,7 +37,7 @@ public final class ImportUriTestLanguageMainConsumer extends NonTerminalConsumer
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/consumers/ImportUriTestLanguageTypeConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/consumers/ImportUriTestLanguageTypeConsumer.java
index 063a51a..a41e4ac 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/consumers/ImportUriTestLanguageTypeConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/consumers/ImportUriTestLanguageTypeConsumer.java
@@ -47,7 +47,7 @@ public final class ImportUriTestLanguageTypeConsumer extends NonTerminalConsumer
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/consumers/LangATestLanguageImportConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/consumers/LangATestLanguageImportConsumer.java
index c647d0b..30afb4b 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/consumers/LangATestLanguageImportConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/consumers/LangATestLanguageImportConsumer.java
@@ -41,7 +41,7 @@ public final class LangATestLanguageImportConsumer extends NonTerminalConsumer {
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/consumers/LangATestLanguageMainConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/consumers/LangATestLanguageMainConsumer.java
index e8c4bf4..36b0fb0 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/consumers/LangATestLanguageMainConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/consumers/LangATestLanguageMainConsumer.java
@@ -37,7 +37,7 @@ public final class LangATestLanguageMainConsumer extends NonTerminalConsumer {
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/consumers/LangATestLanguageTypeConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/consumers/LangATestLanguageTypeConsumer.java
index 857872a..71e4819 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/consumers/LangATestLanguageTypeConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/packrat/consumers/LangATestLanguageTypeConsumer.java
@@ -47,7 +47,7 @@ public final class LangATestLanguageTypeConsumer extends NonTerminalConsumer {
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/parser/packrat/consumers/DummyTestLanguageElementConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/parser/packrat/consumers/DummyTestLanguageElementConsumer.java
index e33fb41..5f88c2e 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/parser/packrat/consumers/DummyTestLanguageElementConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/parser/packrat/consumers/DummyTestLanguageElementConsumer.java
@@ -52,7 +52,7 @@ public final class DummyTestLanguageElementConsumer extends NonTerminalConsumer
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/AbstractTestLanguageInheritedParserRuleConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/AbstractTestLanguageInheritedParserRuleConsumer.java
index e4e1cba..50286cc 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/AbstractTestLanguageInheritedParserRuleConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/AbstractTestLanguageInheritedParserRuleConsumer.java
@@ -41,7 +41,7 @@ public final class AbstractTestLanguageInheritedParserRuleConsumer extends NonTe
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/ConcreteTestLanguageConcreteParserRuleConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/ConcreteTestLanguageConcreteParserRuleConsumer.java
index d3be586..f45ada9 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/ConcreteTestLanguageConcreteParserRuleConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/packrat/consumers/ConcreteTestLanguageConcreteParserRuleConsumer.java
@@ -46,7 +46,7 @@ public final class ConcreteTestLanguageConcreteParserRuleConsumer extends NonTer
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/packrat/consumers/MetamodelRefTestLanguageFooConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/packrat/consumers/MetamodelRefTestLanguageFooConsumer.java
index 959d5cd..2919371 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/packrat/consumers/MetamodelRefTestLanguageFooConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/packrat/consumers/MetamodelRefTestLanguageFooConsumer.java
@@ -40,7 +40,7 @@ public final class MetamodelRefTestLanguageFooConsumer extends NonTerminalConsum
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/packrat/consumers/MultiGenMMTestLanguageFooConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/packrat/consumers/MultiGenMMTestLanguageFooConsumer.java
index 6b8f0c0..840b04d 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/packrat/consumers/MultiGenMMTestLanguageFooConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/packrat/consumers/MultiGenMMTestLanguageFooConsumer.java
@@ -40,7 +40,7 @@ public final class MultiGenMMTestLanguageFooConsumer extends NonTerminalConsumer
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/packrat/consumers/DatatypeRulesTestLanguageDotsConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/packrat/consumers/DatatypeRulesTestLanguageDotsConsumer.java
index aecc9ed..ee4fddd 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/packrat/consumers/DatatypeRulesTestLanguageDotsConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/packrat/consumers/DatatypeRulesTestLanguageDotsConsumer.java
@@ -38,52 +38,22 @@ public final class DatatypeRulesTestLanguageDotsConsumer extends NonTerminalCons
}
protected int consumeAlternatives$1(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeGroup$2(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeGroup$2(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeKeyword$5(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeKeyword$5(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeGroup$2(int entryPoint) throws Exception {
@@ -91,7 +61,7 @@ public final class DatatypeRulesTestLanguageDotsConsumer extends NonTerminalCons
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/packrat/consumers/DatatypeRulesTestLanguageFractionConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/packrat/consumers/DatatypeRulesTestLanguageFractionConsumer.java
index 21e9ee9..f7266e7 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/packrat/consumers/DatatypeRulesTestLanguageFractionConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/packrat/consumers/DatatypeRulesTestLanguageFractionConsumer.java
@@ -44,7 +44,7 @@ public final class DatatypeRulesTestLanguageFractionConsumer extends NonTerminal
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -89,7 +89,7 @@ public final class DatatypeRulesTestLanguageFractionConsumer extends NonTerminal
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/packrat/consumers/DatatypeRulesTestLanguageModelConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/packrat/consumers/DatatypeRulesTestLanguageModelConsumer.java
index f05ef89..f74113e 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/packrat/consumers/DatatypeRulesTestLanguageModelConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/packrat/consumers/DatatypeRulesTestLanguageModelConsumer.java
@@ -53,7 +53,7 @@ public final class DatatypeRulesTestLanguageModelConsumer extends NonTerminalCon
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -135,7 +135,7 @@ public final class DatatypeRulesTestLanguageModelConsumer extends NonTerminalCon
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -194,7 +194,7 @@ public final class DatatypeRulesTestLanguageModelConsumer extends NonTerminalCon
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -253,7 +253,7 @@ public final class DatatypeRulesTestLanguageModelConsumer extends NonTerminalCon
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/packrat/consumers/DatatypeRulesTestLanguageModelIdConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/packrat/consumers/DatatypeRulesTestLanguageModelIdConsumer.java
index 159fe80..9edabe4 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/packrat/consumers/DatatypeRulesTestLanguageModelIdConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/packrat/consumers/DatatypeRulesTestLanguageModelIdConsumer.java
@@ -44,7 +44,7 @@ public final class DatatypeRulesTestLanguageModelIdConsumer extends NonTerminalC
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/packrat/consumers/DatatypeRulesTestLanguageNestedModelIdConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/packrat/consumers/DatatypeRulesTestLanguageNestedModelIdConsumer.java
index 41c1ca4..e5462b3 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/packrat/consumers/DatatypeRulesTestLanguageNestedModelIdConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/packrat/consumers/DatatypeRulesTestLanguageNestedModelIdConsumer.java
@@ -38,7 +38,7 @@ public final class DatatypeRulesTestLanguageNestedModelIdConsumer extends NonTer
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/packrat/consumers/DatatypeRulesTestLanguageVectorConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/packrat/consumers/DatatypeRulesTestLanguageVectorConsumer.java
index e8054af..74aa002 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/packrat/consumers/DatatypeRulesTestLanguageVectorConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/packrat/consumers/DatatypeRulesTestLanguageVectorConsumer.java
@@ -47,7 +47,7 @@ public final class DatatypeRulesTestLanguageVectorConsumer extends NonTerminalCo
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageAssignmentConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageAssignmentConsumer.java
index 3b22497..8347e45 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageAssignmentConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageAssignmentConsumer.java
@@ -37,86 +37,32 @@ public final class EpatchTestLanguageAssignmentConsumer extends NonTerminalConsu
}
protected int consumeAlternatives$1(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$4(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$4(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$5(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$5(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 2:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$6(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$6(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 3:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$7(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$7(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeRuleCall$4(int entryPoint) throws Exception {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageAssignmentValueConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageAssignmentValueConsumer.java
index 013ed56..68beb7d 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageAssignmentValueConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageAssignmentValueConsumer.java
@@ -66,86 +66,32 @@ public final class EpatchTestLanguageAssignmentValueConsumer extends NonTerminal
}
protected int consumeAlternatives$1(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$4(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$4(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeGroup$6(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeGroup$6(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 2:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$21(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$21(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 3:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeGroup$23(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeGroup$23(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeAssignment$4(int entryPoint) throws Exception {
@@ -167,7 +113,7 @@ public final class EpatchTestLanguageAssignmentValueConsumer extends NonTerminal
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -222,7 +168,7 @@ public final class EpatchTestLanguageAssignmentValueConsumer extends NonTerminal
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -290,7 +236,7 @@ public final class EpatchTestLanguageAssignmentValueConsumer extends NonTerminal
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -366,7 +312,7 @@ public final class EpatchTestLanguageAssignmentValueConsumer extends NonTerminal
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageBiListAssignmentConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageBiListAssignmentConsumer.java
index 079fb55..3f0d198 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageBiListAssignmentConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageBiListAssignmentConsumer.java
@@ -61,7 +61,7 @@ public final class EpatchTestLanguageBiListAssignmentConsumer extends NonTermina
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -178,7 +178,7 @@ public final class EpatchTestLanguageBiListAssignmentConsumer extends NonTermina
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -232,7 +232,7 @@ public final class EpatchTestLanguageBiListAssignmentConsumer extends NonTermina
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -295,7 +295,7 @@ public final class EpatchTestLanguageBiListAssignmentConsumer extends NonTermina
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -349,7 +349,7 @@ public final class EpatchTestLanguageBiListAssignmentConsumer extends NonTermina
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageBiSingleAssignmentConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageBiSingleAssignmentConsumer.java
index 9269d67..9aeefb7 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageBiSingleAssignmentConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageBiSingleAssignmentConsumer.java
@@ -49,7 +49,7 @@ public final class EpatchTestLanguageBiSingleAssignmentConsumer extends NonTermi
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageCreatedObjectConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageCreatedObjectConsumer.java
index 2eacaee..70d3b7b 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageCreatedObjectConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageCreatedObjectConsumer.java
@@ -54,7 +54,7 @@ public final class EpatchTestLanguageCreatedObjectConsumer extends NonTerminalCo
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -90,52 +90,22 @@ public final class EpatchTestLanguageCreatedObjectConsumer extends NonTerminalCo
}
protected int consumeAlternatives$3(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$4(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$4(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$5(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$5(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeRuleCall$4(int entryPoint) throws Exception {
@@ -185,7 +155,7 @@ public final class EpatchTestLanguageCreatedObjectConsumer extends NonTerminalCo
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -263,52 +233,22 @@ public final class EpatchTestLanguageCreatedObjectConsumer extends NonTerminalCo
}
protected int doConsumeAlternatives$12(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$13(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$13(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$15(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$15(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeAssignment$13(int entryPoint) throws Exception {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageEPackageImportConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageEPackageImportConsumer.java
index 6cb405d..a31f16a 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageEPackageImportConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageEPackageImportConsumer.java
@@ -49,7 +49,7 @@ public final class EpatchTestLanguageEPackageImportConsumer extends NonTerminalC
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageEPatchConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageEPatchConsumer.java
index 94c25aa..2d61522 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageEPatchConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageEPatchConsumer.java
@@ -53,7 +53,7 @@ public final class EpatchTestLanguageEPatchConsumer extends NonTerminalConsumer
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageExecutableConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageExecutableConsumer.java
index d009e9d..fa500b3 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageExecutableConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageExecutableConsumer.java
@@ -33,52 +33,22 @@ public final class EpatchTestLanguageExecutableConsumer extends NonTerminalConsu
}
protected int consumeAlternatives$1(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$2(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$2(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$3(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$3(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeRuleCall$2(int entryPoint) throws Exception {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageExtensionImportConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageExtensionImportConsumer.java
index 7aebb4a..6c13815 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageExtensionImportConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageExtensionImportConsumer.java
@@ -50,7 +50,7 @@ public final class EpatchTestLanguageExtensionImportConsumer extends NonTerminal
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -130,7 +130,7 @@ public final class EpatchTestLanguageExtensionImportConsumer extends NonTerminal
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageImportConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageImportConsumer.java
index 8a20943..071afc8 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageImportConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageImportConsumer.java
@@ -35,69 +35,27 @@ public final class EpatchTestLanguageImportConsumer extends NonTerminalConsumer
}
protected int consumeAlternatives$1(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$3(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$3(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$4(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$4(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 2:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$5(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$5(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeRuleCall$3(int entryPoint) throws Exception {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageJavaExecutableConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageJavaExecutableConsumer.java
index 7a53b30..b498cab 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageJavaExecutableConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageJavaExecutableConsumer.java
@@ -47,7 +47,7 @@ public final class EpatchTestLanguageJavaExecutableConsumer extends NonTerminalC
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageJavaImportConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageJavaImportConsumer.java
index a499836..dec0c64 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageJavaImportConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageJavaImportConsumer.java
@@ -50,7 +50,7 @@ public final class EpatchTestLanguageJavaImportConsumer extends NonTerminalConsu
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -130,7 +130,7 @@ public final class EpatchTestLanguageJavaImportConsumer extends NonTerminalConsu
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageListAssignmentValueConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageListAssignmentValueConsumer.java
index 085ed34..7eb223c 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageListAssignmentValueConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageListAssignmentValueConsumer.java
@@ -85,7 +85,7 @@ public final class EpatchTestLanguageListAssignmentValueConsumer extends NonTerm
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -139,103 +139,37 @@ public final class EpatchTestLanguageListAssignmentValueConsumer extends NonTerm
}
protected int consumeAlternatives$6(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeGroup$10(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeGroup$10(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$16(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$16(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 2:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeGroup$18(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeGroup$18(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 3:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$33(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$33(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 4:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeGroup$35(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeGroup$35(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeGroup$10(int entryPoint) throws Exception {
@@ -243,7 +177,7 @@ public final class EpatchTestLanguageListAssignmentValueConsumer extends NonTerm
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -319,7 +253,7 @@ public final class EpatchTestLanguageListAssignmentValueConsumer extends NonTerm
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -374,7 +308,7 @@ public final class EpatchTestLanguageListAssignmentValueConsumer extends NonTerm
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -442,7 +376,7 @@ public final class EpatchTestLanguageListAssignmentValueConsumer extends NonTerm
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -518,7 +452,7 @@ public final class EpatchTestLanguageListAssignmentValueConsumer extends NonTerm
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageMigrationConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageMigrationConsumer.java
index 4584a73..e9f9d1d 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageMigrationConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageMigrationConsumer.java
@@ -47,7 +47,7 @@ public final class EpatchTestLanguageMigrationConsumer extends NonTerminalConsum
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -130,52 +130,22 @@ public final class EpatchTestLanguageMigrationConsumer extends NonTerminalConsum
}
protected int doConsumeAlternatives$7(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeGroup$8(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeGroup$8(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeGroup$12(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeGroup$12(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeGroup$8(int entryPoint) throws Exception {
@@ -183,7 +153,7 @@ public final class EpatchTestLanguageMigrationConsumer extends NonTerminalConsum
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -232,7 +202,7 @@ public final class EpatchTestLanguageMigrationConsumer extends NonTerminalConsum
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageModelImportConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageModelImportConsumer.java
index 580c85e..1a237b1 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageModelImportConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageModelImportConsumer.java
@@ -33,52 +33,22 @@ public final class EpatchTestLanguageModelImportConsumer extends NonTerminalCons
}
protected int consumeAlternatives$1(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$2(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$2(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$3(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$3(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeRuleCall$2(int entryPoint) throws Exception {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageMonoListAssignmentConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageMonoListAssignmentConsumer.java
index b622296..c2f7286 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageMonoListAssignmentConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageMonoListAssignmentConsumer.java
@@ -55,7 +55,7 @@ public final class EpatchTestLanguageMonoListAssignmentConsumer extends NonTermi
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -154,7 +154,7 @@ public final class EpatchTestLanguageMonoListAssignmentConsumer extends NonTermi
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -208,7 +208,7 @@ public final class EpatchTestLanguageMonoListAssignmentConsumer extends NonTermi
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageMonoSingleAssignmentConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageMonoSingleAssignmentConsumer.java
index 45c45da..f9c7691 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageMonoSingleAssignmentConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageMonoSingleAssignmentConsumer.java
@@ -46,7 +46,7 @@ public final class EpatchTestLanguageMonoSingleAssignmentConsumer extends NonTer
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageNamedObjectConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageNamedObjectConsumer.java
index 9087dbe..86db1fd 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageNamedObjectConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageNamedObjectConsumer.java
@@ -33,52 +33,22 @@ public final class EpatchTestLanguageNamedObjectConsumer extends NonTerminalCons
}
protected int consumeAlternatives$1(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$2(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$2(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$3(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$3(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeRuleCall$2(int entryPoint) throws Exception {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageNamedResourceConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageNamedResourceConsumer.java
index a45c3a2..d9593e4 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageNamedResourceConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageNamedResourceConsumer.java
@@ -75,7 +75,7 @@ public final class EpatchTestLanguageNamedResourceConsumer extends NonTerminalCo
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -200,52 +200,22 @@ public final class EpatchTestLanguageNamedResourceConsumer extends NonTerminalCo
}
protected int consumeAlternatives$15(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeGroup$16(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeGroup$16(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$20(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$20(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeGroup$16(int entryPoint) throws Exception {
@@ -253,7 +223,7 @@ public final class EpatchTestLanguageNamedResourceConsumer extends NonTerminalCo
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -320,52 +290,22 @@ public final class EpatchTestLanguageNamedResourceConsumer extends NonTerminalCo
}
protected int consumeAlternatives$24(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeGroup$25(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeGroup$25(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$29(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$29(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeGroup$25(int entryPoint) throws Exception {
@@ -373,7 +313,7 @@ public final class EpatchTestLanguageNamedResourceConsumer extends NonTerminalCo
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageObjectCopyConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageObjectCopyConsumer.java
index bc4de88..12c6370 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageObjectCopyConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageObjectCopyConsumer.java
@@ -46,7 +46,7 @@ public final class EpatchTestLanguageObjectCopyConsumer extends NonTerminalConsu
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageObjectNewConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageObjectNewConsumer.java
index 6e24908..b045f9b 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageObjectNewConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageObjectNewConsumer.java
@@ -46,7 +46,7 @@ public final class EpatchTestLanguageObjectNewConsumer extends NonTerminalConsum
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageObjectRefConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageObjectRefConsumer.java
index 05f9f06..2d7e2ca 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageObjectRefConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageObjectRefConsumer.java
@@ -85,7 +85,7 @@ public final class EpatchTestLanguageObjectRefConsumer extends NonTerminalConsum
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -158,52 +158,22 @@ public final class EpatchTestLanguageObjectRefConsumer extends NonTerminalConsum
}
protected int consumeAlternatives$7(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeGroup$8(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeGroup$8(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeGroup$14(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeGroup$14(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeGroup$8(int entryPoint) throws Exception {
@@ -211,7 +181,7 @@ public final class EpatchTestLanguageObjectRefConsumer extends NonTerminalConsum
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -270,7 +240,7 @@ public final class EpatchTestLanguageObjectRefConsumer extends NonTerminalConsum
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -411,7 +381,7 @@ public final class EpatchTestLanguageObjectRefConsumer extends NonTerminalConsum
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -498,52 +468,22 @@ public final class EpatchTestLanguageObjectRefConsumer extends NonTerminalConsum
}
protected int doConsumeAlternatives$36(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$37(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$37(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$39(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$39(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeAssignment$37(int entryPoint) throws Exception {
@@ -589,7 +529,7 @@ public final class EpatchTestLanguageObjectRefConsumer extends NonTerminalConsum
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -648,7 +588,7 @@ public final class EpatchTestLanguageObjectRefConsumer extends NonTerminalConsum
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageResourceImportConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageResourceImportConsumer.java
index 0d8d69c..7a8d009 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageResourceImportConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageResourceImportConsumer.java
@@ -49,7 +49,7 @@ public final class EpatchTestLanguageResourceImportConsumer extends NonTerminalC
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageSingleAssignmentValueConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageSingleAssignmentValueConsumer.java
index edf104a..8a55303 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageSingleAssignmentValueConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageSingleAssignmentValueConsumer.java
@@ -69,103 +69,37 @@ public final class EpatchTestLanguageSingleAssignmentValueConsumer extends NonTe
}
protected int consumeAlternatives$1(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$5(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$5(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$7(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$7(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 2:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeGroup$9(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeGroup$9(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 3:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$24(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$24(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 4:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeGroup$26(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeGroup$26(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeAssignment$5(int entryPoint) throws Exception {
@@ -201,7 +135,7 @@ public final class EpatchTestLanguageSingleAssignmentValueConsumer extends NonTe
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -256,7 +190,7 @@ public final class EpatchTestLanguageSingleAssignmentValueConsumer extends NonTe
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -324,7 +258,7 @@ public final class EpatchTestLanguageSingleAssignmentValueConsumer extends NonTe
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -400,7 +334,7 @@ public final class EpatchTestLanguageSingleAssignmentValueConsumer extends NonTe
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAbstractMetamodelDeclarationConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAbstractMetamodelDeclarationConsumer.java
index f89972e..4d2bb54 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAbstractMetamodelDeclarationConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAbstractMetamodelDeclarationConsumer.java
@@ -33,52 +33,22 @@ public final class XtextGrammarTestLanguageAbstractMetamodelDeclarationConsumer
}
protected int consumeAlternatives$1(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$2(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$2(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$3(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$3(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeRuleCall$2(int entryPoint) throws Exception {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAbstractNegatedTokenConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAbstractNegatedTokenConsumer.java
index a8b3db0..4a65874 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAbstractNegatedTokenConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAbstractNegatedTokenConsumer.java
@@ -33,52 +33,22 @@ public final class XtextGrammarTestLanguageAbstractNegatedTokenConsumer extends
}
protected int consumeAlternatives$1(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$2(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$2(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$3(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$3(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeRuleCall$2(int entryPoint) throws Exception {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAbstractRuleConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAbstractRuleConsumer.java
index 4dc6386..7ad7be1 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAbstractRuleConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAbstractRuleConsumer.java
@@ -35,69 +35,27 @@ public final class XtextGrammarTestLanguageAbstractRuleConsumer extends NonTermi
}
protected int consumeAlternatives$1(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$3(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$3(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$4(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$4(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 2:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$5(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$5(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeRuleCall$3(int entryPoint) throws Exception {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAbstractTerminalConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAbstractTerminalConsumer.java
index 3e71b4d..4067fa4 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAbstractTerminalConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAbstractTerminalConsumer.java
@@ -37,86 +37,32 @@ public final class XtextGrammarTestLanguageAbstractTerminalConsumer extends NonT
}
protected int consumeAlternatives$1(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$4(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$4(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$5(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$5(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 2:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$6(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$6(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 3:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$7(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$7(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeRuleCall$4(int entryPoint) throws Exception {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAbstractTokenConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAbstractTokenConsumer.java
index b67e453..efb0c27 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAbstractTokenConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAbstractTokenConsumer.java
@@ -48,7 +48,7 @@ public final class XtextGrammarTestLanguageAbstractTokenConsumer extends NonTerm
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -75,69 +75,27 @@ public final class XtextGrammarTestLanguageAbstractTokenConsumer extends NonTerm
}
protected int consumeAlternatives$2(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$4(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$4(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$5(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$5(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 2:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$6(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$6(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeRuleCall$4(int entryPoint) throws Exception {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageActionConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageActionConsumer.java
index f0459fa..e938def 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageActionConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageActionConsumer.java
@@ -64,7 +64,7 @@ public final class XtextGrammarTestLanguageActionConsumer extends NonTerminalCon
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -163,7 +163,7 @@ public final class XtextGrammarTestLanguageActionConsumer extends NonTerminalCon
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAlternativesConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAlternativesConsumer.java
index d038dcf..ac1f91f 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAlternativesConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAlternativesConsumer.java
@@ -38,7 +38,7 @@ public final class XtextGrammarTestLanguageAlternativesConsumer extends NonTermi
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -82,7 +82,7 @@ public final class XtextGrammarTestLanguageAlternativesConsumer extends NonTermi
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAssignmentConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAssignmentConsumer.java
index 9ca55ae..a202847 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAssignmentConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageAssignmentConsumer.java
@@ -49,7 +49,7 @@ public final class XtextGrammarTestLanguageAssignmentConsumer extends NonTermina
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageCharacterRangeConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageCharacterRangeConsumer.java
index 143ee76..cc2ba52 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageCharacterRangeConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageCharacterRangeConsumer.java
@@ -38,7 +38,7 @@ public final class XtextGrammarTestLanguageCharacterRangeConsumer extends NonTer
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -83,7 +83,7 @@ public final class XtextGrammarTestLanguageCharacterRangeConsumer extends NonTer
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageCrossReferenceConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageCrossReferenceConsumer.java
index 1568d19..15a4e73 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageCrossReferenceConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageCrossReferenceConsumer.java
@@ -49,7 +49,7 @@ public final class XtextGrammarTestLanguageCrossReferenceConsumer extends NonTer
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -126,7 +126,7 @@ public final class XtextGrammarTestLanguageCrossReferenceConsumer extends NonTer
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageGeneratedMetamodelConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageGeneratedMetamodelConsumer.java
index b7c03ad..1c824b1 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageGeneratedMetamodelConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageGeneratedMetamodelConsumer.java
@@ -52,7 +52,7 @@ public final class XtextGrammarTestLanguageGeneratedMetamodelConsumer extends No
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -143,7 +143,7 @@ public final class XtextGrammarTestLanguageGeneratedMetamodelConsumer extends No
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageGrammarConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageGrammarConsumer.java
index 6d21a27..7098fab 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageGrammarConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageGrammarConsumer.java
@@ -66,7 +66,7 @@ public final class XtextGrammarTestLanguageGrammarConsumer extends NonTerminalCo
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -129,52 +129,22 @@ public final class XtextGrammarTestLanguageGrammarConsumer extends NonTerminalCo
}
protected int consumeAlternatives$6(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$7(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$7(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeKeyword$9(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeKeyword$9(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeAssignment$7(int entryPoint) throws Exception {
@@ -223,7 +193,7 @@ public final class XtextGrammarTestLanguageGrammarConsumer extends NonTerminalCo
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -282,7 +252,7 @@ public final class XtextGrammarTestLanguageGrammarConsumer extends NonTerminalCo
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -349,7 +319,7 @@ public final class XtextGrammarTestLanguageGrammarConsumer extends NonTerminalCo
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageGroupConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageGroupConsumer.java
index e7e8d30..1d5cbd3 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageGroupConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageGroupConsumer.java
@@ -35,7 +35,7 @@ public final class XtextGrammarTestLanguageGroupConsumer extends NonTerminalCons
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -79,7 +79,7 @@ public final class XtextGrammarTestLanguageGroupConsumer extends NonTerminalCons
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageLexerRuleConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageLexerRuleConsumer.java
index 106a707..991fbf9 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageLexerRuleConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageLexerRuleConsumer.java
@@ -60,7 +60,7 @@ public final class XtextGrammarTestLanguageLexerRuleConsumer extends NonTerminal
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -123,52 +123,22 @@ public final class XtextGrammarTestLanguageLexerRuleConsumer extends NonTerminal
}
protected int consumeAlternatives$6(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeKeyword$7(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeKeyword$7(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeKeyword$8(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeKeyword$8(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeKeyword$7(int entryPoint) throws Exception {
@@ -208,7 +178,7 @@ public final class XtextGrammarTestLanguageLexerRuleConsumer extends NonTerminal
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageNegatedTokenConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageNegatedTokenConsumer.java
index fc3abd8..b7bf287 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageNegatedTokenConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageNegatedTokenConsumer.java
@@ -38,7 +38,7 @@ public final class XtextGrammarTestLanguageNegatedTokenConsumer extends NonTermi
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageParenthesizedElementConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageParenthesizedElementConsumer.java
index 843f977..563749b 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageParenthesizedElementConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageParenthesizedElementConsumer.java
@@ -41,7 +41,7 @@ public final class XtextGrammarTestLanguageParenthesizedElementConsumer extends
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageParenthesizedTerminalElementConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageParenthesizedTerminalElementConsumer.java
index 5984cd9..0278a28 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageParenthesizedTerminalElementConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageParenthesizedTerminalElementConsumer.java
@@ -41,7 +41,7 @@ public final class XtextGrammarTestLanguageParenthesizedTerminalElementConsumer
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageParserRuleConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageParserRuleConsumer.java
index b3ac4ca..3db16ca 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageParserRuleConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageParserRuleConsumer.java
@@ -69,7 +69,7 @@ public final class XtextGrammarTestLanguageParserRuleConsumer extends NonTermina
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -160,7 +160,7 @@ public final class XtextGrammarTestLanguageParserRuleConsumer extends NonTermina
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -219,7 +219,7 @@ public final class XtextGrammarTestLanguageParserRuleConsumer extends NonTermina
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageReferencedMetamodelConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageReferencedMetamodelConsumer.java
index df5702b..7e629af 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageReferencedMetamodelConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageReferencedMetamodelConsumer.java
@@ -49,7 +49,7 @@ public final class XtextGrammarTestLanguageReferencedMetamodelConsumer extends N
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -117,7 +117,7 @@ public final class XtextGrammarTestLanguageReferencedMetamodelConsumer extends N
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTerminalAlternativesConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTerminalAlternativesConsumer.java
index 1822094..8cb1b48 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTerminalAlternativesConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTerminalAlternativesConsumer.java
@@ -38,7 +38,7 @@ public final class XtextGrammarTestLanguageTerminalAlternativesConsumer extends
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -82,7 +82,7 @@ public final class XtextGrammarTestLanguageTerminalAlternativesConsumer extends
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTerminalGroupConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTerminalGroupConsumer.java
index 69d15d6..7a54aa6 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTerminalGroupConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTerminalGroupConsumer.java
@@ -35,7 +35,7 @@ public final class XtextGrammarTestLanguageTerminalGroupConsumer extends NonTerm
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -79,7 +79,7 @@ public final class XtextGrammarTestLanguageTerminalGroupConsumer extends NonTerm
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTerminalRuleConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTerminalRuleConsumer.java
index 2b9fe4f..ebc35d3 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTerminalRuleConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTerminalRuleConsumer.java
@@ -54,7 +54,7 @@ public final class XtextGrammarTestLanguageTerminalRuleConsumer extends NonTermi
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -159,7 +159,7 @@ public final class XtextGrammarTestLanguageTerminalRuleConsumer extends NonTermi
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTerminalTokenConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTerminalTokenConsumer.java
index 47d30bf..dfdd9e3 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTerminalTokenConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTerminalTokenConsumer.java
@@ -44,7 +44,7 @@ public final class XtextGrammarTestLanguageTerminalTokenConsumer extends NonTerm
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTerminalTokenElementConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTerminalTokenElementConsumer.java
index 67b8d25..dba1b33 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTerminalTokenElementConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTerminalTokenElementConsumer.java
@@ -39,103 +39,37 @@ public final class XtextGrammarTestLanguageTerminalTokenElementConsumer extends
}
protected int consumeAlternatives$1(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$5(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$5(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$6(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$6(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 2:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$7(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$7(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 3:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$8(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$8(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 4:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$9(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$9(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeRuleCall$5(int entryPoint) throws Exception {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTypeRefConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTypeRefConsumer.java
index f55fde2..7f9261d 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTypeRefConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageTypeRefConsumer.java
@@ -44,7 +44,7 @@ public final class XtextGrammarTestLanguageTypeRefConsumer extends NonTerminalCo
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -85,7 +85,7 @@ public final class XtextGrammarTestLanguageTypeRefConsumer extends NonTerminalCo
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageUpToTokenConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageUpToTokenConsumer.java
index 390b5a6..033f5e6 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageUpToTokenConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/packrat/consumers/XtextGrammarTestLanguageUpToTokenConsumer.java
@@ -38,7 +38,7 @@ public final class XtextGrammarTestLanguageUpToTokenConsumer extends NonTerminal
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageHidingHiddensConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageHidingHiddensConsumer.java
index b65f4b8..a2f44b4 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageHidingHiddensConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageHidingHiddensConsumer.java
@@ -43,7 +43,7 @@ public final class HiddenTerminalsTestLanguageHidingHiddensConsumer extends NonT
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageInheritingHiddensCallConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageInheritingHiddensCallConsumer.java
index 6395435..2313a54 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageInheritingHiddensCallConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageInheritingHiddensCallConsumer.java
@@ -39,7 +39,7 @@ public final class HiddenTerminalsTestLanguageInheritingHiddensCallConsumer exte
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageInheritingHiddensConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageInheritingHiddensConsumer.java
index bfcc541..d6e21a1 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageInheritingHiddensConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageInheritingHiddensConsumer.java
@@ -52,7 +52,7 @@ public final class HiddenTerminalsTestLanguageInheritingHiddensConsumer extends
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -127,52 +127,22 @@ public final class HiddenTerminalsTestLanguageInheritingHiddensConsumer extends
}
protected int consumeAlternatives$9(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$10(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$10(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$12(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$12(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeAssignment$10(int entryPoint) throws Exception {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageModelConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageModelConsumer.java
index b6ac8a9..f5c282d 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageModelConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageModelConsumer.java
@@ -37,86 +37,32 @@ public final class HiddenTerminalsTestLanguageModelConsumer extends NonTerminalC
}
protected int consumeAlternatives$1(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$4(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$4(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$5(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$5(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 2:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$6(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$6(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 3:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$7(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$7(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeRuleCall$4(int entryPoint) throws Exception {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageOverridingHiddensCallConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageOverridingHiddensCallConsumer.java
index ef802b7..4c6265b 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageOverridingHiddensCallConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageOverridingHiddensCallConsumer.java
@@ -44,7 +44,7 @@ public final class HiddenTerminalsTestLanguageOverridingHiddensCallConsumer exte
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageOverridingHiddensConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageOverridingHiddensConsumer.java
index ca0a08f..a07a0f6 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageOverridingHiddensConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageOverridingHiddensConsumer.java
@@ -50,7 +50,7 @@ public final class HiddenTerminalsTestLanguageOverridingHiddensConsumer extends
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageWithHiddensConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageWithHiddensConsumer.java
index 507d211..de36deb 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageWithHiddensConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageWithHiddensConsumer.java
@@ -42,7 +42,7 @@ public final class HiddenTerminalsTestLanguageWithHiddensConsumer extends NonTer
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageWithoutHiddensConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageWithoutHiddensConsumer.java
index b7659aa..30f7a30 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageWithoutHiddensConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/HiddenTerminalsTestLanguageWithoutHiddensConsumer.java
@@ -50,7 +50,7 @@ public final class HiddenTerminalsTestLanguageWithoutHiddensConsumer extends Non
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/TerminalRulesTestLanguageModelConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/TerminalRulesTestLanguageModelConsumer.java
index ad55c8a..6638d7d 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/TerminalRulesTestLanguageModelConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/TerminalRulesTestLanguageModelConsumer.java
@@ -64,137 +64,47 @@ public final class TerminalRulesTestLanguageModelConsumer extends NonTerminalCon
}
protected int consumeAlternatives$1(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$7(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$7(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$9(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$9(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 2:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$11(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$11(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 3:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$13(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$13(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 4:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$15(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$15(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 5:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$17(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$17(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 6:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$19(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$19(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeAssignment$7(int entryPoint) throws Exception {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageAbstractMetamodelDeclarationConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageAbstractMetamodelDeclarationConsumer.java
index 57e20ea..1e35391 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageAbstractMetamodelDeclarationConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageAbstractMetamodelDeclarationConsumer.java
@@ -33,52 +33,22 @@ public final class XtextTerminalsTestLanguageAbstractMetamodelDeclarationConsume
}
protected int consumeAlternatives$1(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$2(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$2(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$3(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$3(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeRuleCall$2(int entryPoint) throws Exception {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageAbstractNegatedTokenConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageAbstractNegatedTokenConsumer.java
index 5a64ef4..4f124b8 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageAbstractNegatedTokenConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageAbstractNegatedTokenConsumer.java
@@ -33,52 +33,22 @@ public final class XtextTerminalsTestLanguageAbstractNegatedTokenConsumer extend
}
protected int consumeAlternatives$1(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$2(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$2(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$3(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$3(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeRuleCall$2(int entryPoint) throws Exception {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageAbstractRuleConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageAbstractRuleConsumer.java
index dc17044..af2e7b3 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageAbstractRuleConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageAbstractRuleConsumer.java
@@ -35,69 +35,27 @@ public final class XtextTerminalsTestLanguageAbstractRuleConsumer extends NonTer
}
protected int consumeAlternatives$1(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$3(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$3(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$4(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$4(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 2:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$5(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$5(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeRuleCall$3(int entryPoint) throws Exception {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageAbstractTerminalConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageAbstractTerminalConsumer.java
index ccb5379..68d5268 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageAbstractTerminalConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageAbstractTerminalConsumer.java
@@ -37,86 +37,32 @@ public final class XtextTerminalsTestLanguageAbstractTerminalConsumer extends No
}
protected int consumeAlternatives$1(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$4(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$4(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$5(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$5(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 2:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$6(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$6(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 3:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$7(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$7(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeRuleCall$4(int entryPoint) throws Exception {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageAbstractTokenConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageAbstractTokenConsumer.java
index 367bcfa..471e605 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageAbstractTokenConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageAbstractTokenConsumer.java
@@ -48,7 +48,7 @@ public final class XtextTerminalsTestLanguageAbstractTokenConsumer extends NonTe
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -75,69 +75,27 @@ public final class XtextTerminalsTestLanguageAbstractTokenConsumer extends NonTe
}
protected int consumeAlternatives$2(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$4(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$4(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$5(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$5(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 2:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$6(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$6(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeRuleCall$4(int entryPoint) throws Exception {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageActionConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageActionConsumer.java
index 3e663b5..3509532 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageActionConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageActionConsumer.java
@@ -64,7 +64,7 @@ public final class XtextTerminalsTestLanguageActionConsumer extends NonTerminalC
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -163,7 +163,7 @@ public final class XtextTerminalsTestLanguageActionConsumer extends NonTerminalC
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageAlternativesConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageAlternativesConsumer.java
index ecafd3c..70667c9 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageAlternativesConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageAlternativesConsumer.java
@@ -38,7 +38,7 @@ public final class XtextTerminalsTestLanguageAlternativesConsumer extends NonTer
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -82,7 +82,7 @@ public final class XtextTerminalsTestLanguageAlternativesConsumer extends NonTer
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageAssignmentConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageAssignmentConsumer.java
index c97d055..6a594f3 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageAssignmentConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageAssignmentConsumer.java
@@ -49,7 +49,7 @@ public final class XtextTerminalsTestLanguageAssignmentConsumer extends NonTermi
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageCharacterRangeConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageCharacterRangeConsumer.java
index 4889674..c8aee84 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageCharacterRangeConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageCharacterRangeConsumer.java
@@ -38,7 +38,7 @@ public final class XtextTerminalsTestLanguageCharacterRangeConsumer extends NonT
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -83,7 +83,7 @@ public final class XtextTerminalsTestLanguageCharacterRangeConsumer extends NonT
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageCrossReferenceConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageCrossReferenceConsumer.java
index e2928d0..0f86a65 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageCrossReferenceConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageCrossReferenceConsumer.java
@@ -49,7 +49,7 @@ public final class XtextTerminalsTestLanguageCrossReferenceConsumer extends NonT
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -126,7 +126,7 @@ public final class XtextTerminalsTestLanguageCrossReferenceConsumer extends NonT
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageGeneratedMetamodelConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageGeneratedMetamodelConsumer.java
index b892936..b4976c6 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageGeneratedMetamodelConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageGeneratedMetamodelConsumer.java
@@ -52,7 +52,7 @@ public final class XtextTerminalsTestLanguageGeneratedMetamodelConsumer extends
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -143,7 +143,7 @@ public final class XtextTerminalsTestLanguageGeneratedMetamodelConsumer extends
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageGrammarConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageGrammarConsumer.java
index 79f47fb..acbcc97 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageGrammarConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageGrammarConsumer.java
@@ -66,7 +66,7 @@ public final class XtextTerminalsTestLanguageGrammarConsumer extends NonTerminal
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -129,52 +129,22 @@ public final class XtextTerminalsTestLanguageGrammarConsumer extends NonTerminal
}
protected int consumeAlternatives$6(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$7(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$7(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeKeyword$9(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeKeyword$9(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeAssignment$7(int entryPoint) throws Exception {
@@ -223,7 +193,7 @@ public final class XtextTerminalsTestLanguageGrammarConsumer extends NonTerminal
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -282,7 +252,7 @@ public final class XtextTerminalsTestLanguageGrammarConsumer extends NonTerminal
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -349,7 +319,7 @@ public final class XtextTerminalsTestLanguageGrammarConsumer extends NonTerminal
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageGroupConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageGroupConsumer.java
index 33e995d..89ab606 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageGroupConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageGroupConsumer.java
@@ -35,7 +35,7 @@ public final class XtextTerminalsTestLanguageGroupConsumer extends NonTerminalCo
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -79,7 +79,7 @@ public final class XtextTerminalsTestLanguageGroupConsumer extends NonTerminalCo
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageLexerRuleConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageLexerRuleConsumer.java
index bb2bc61..46dd6b6 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageLexerRuleConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageLexerRuleConsumer.java
@@ -60,7 +60,7 @@ public final class XtextTerminalsTestLanguageLexerRuleConsumer extends NonTermin
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -123,52 +123,22 @@ public final class XtextTerminalsTestLanguageLexerRuleConsumer extends NonTermin
}
protected int consumeAlternatives$6(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeKeyword$7(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeKeyword$7(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeKeyword$8(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeKeyword$8(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeKeyword$7(int entryPoint) throws Exception {
@@ -208,7 +178,7 @@ public final class XtextTerminalsTestLanguageLexerRuleConsumer extends NonTermin
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageNegatedTokenConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageNegatedTokenConsumer.java
index b6e21c7..f623a3b 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageNegatedTokenConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageNegatedTokenConsumer.java
@@ -38,7 +38,7 @@ public final class XtextTerminalsTestLanguageNegatedTokenConsumer extends NonTer
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageParenthesizedElementConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageParenthesizedElementConsumer.java
index 32d764a..de6f112 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageParenthesizedElementConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageParenthesizedElementConsumer.java
@@ -41,7 +41,7 @@ public final class XtextTerminalsTestLanguageParenthesizedElementConsumer extend
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageParenthesizedTerminalElementConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageParenthesizedTerminalElementConsumer.java
index 070dd0e..acb0b22 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageParenthesizedTerminalElementConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageParenthesizedTerminalElementConsumer.java
@@ -41,7 +41,7 @@ public final class XtextTerminalsTestLanguageParenthesizedTerminalElementConsume
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageParserRuleConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageParserRuleConsumer.java
index c4714b6..f886f4d 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageParserRuleConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageParserRuleConsumer.java
@@ -69,7 +69,7 @@ public final class XtextTerminalsTestLanguageParserRuleConsumer extends NonTermi
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -160,7 +160,7 @@ public final class XtextTerminalsTestLanguageParserRuleConsumer extends NonTermi
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -219,7 +219,7 @@ public final class XtextTerminalsTestLanguageParserRuleConsumer extends NonTermi
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -296,7 +296,7 @@ public final class XtextTerminalsTestLanguageParserRuleConsumer extends NonTermi
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -350,7 +350,7 @@ public final class XtextTerminalsTestLanguageParserRuleConsumer extends NonTermi
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageReferencedMetamodelConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageReferencedMetamodelConsumer.java
index c8738fb..c7d1f21 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageReferencedMetamodelConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageReferencedMetamodelConsumer.java
@@ -49,7 +49,7 @@ public final class XtextTerminalsTestLanguageReferencedMetamodelConsumer extends
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -117,7 +117,7 @@ public final class XtextTerminalsTestLanguageReferencedMetamodelConsumer extends
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageTerminalAlternativesConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageTerminalAlternativesConsumer.java
index 1dc5f10..9a56c3f 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageTerminalAlternativesConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageTerminalAlternativesConsumer.java
@@ -38,7 +38,7 @@ public final class XtextTerminalsTestLanguageTerminalAlternativesConsumer extend
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -82,7 +82,7 @@ public final class XtextTerminalsTestLanguageTerminalAlternativesConsumer extend
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageTerminalGroupConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageTerminalGroupConsumer.java
index 0e253d5..b9cebf8 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageTerminalGroupConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageTerminalGroupConsumer.java
@@ -35,7 +35,7 @@ public final class XtextTerminalsTestLanguageTerminalGroupConsumer extends NonTe
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -79,7 +79,7 @@ public final class XtextTerminalsTestLanguageTerminalGroupConsumer extends NonTe
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageTerminalRuleConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageTerminalRuleConsumer.java
index aa5b147..2b6ca88 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageTerminalRuleConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageTerminalRuleConsumer.java
@@ -54,7 +54,7 @@ public final class XtextTerminalsTestLanguageTerminalRuleConsumer extends NonTer
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -159,7 +159,7 @@ public final class XtextTerminalsTestLanguageTerminalRuleConsumer extends NonTer
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageTerminalTokenConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageTerminalTokenConsumer.java
index 40ec9b3..8bf542f 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageTerminalTokenConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageTerminalTokenConsumer.java
@@ -44,7 +44,7 @@ public final class XtextTerminalsTestLanguageTerminalTokenConsumer extends NonTe
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageTerminalTokenElementConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageTerminalTokenElementConsumer.java
index 3f39bb9..62d6ec2 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageTerminalTokenElementConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageTerminalTokenElementConsumer.java
@@ -39,103 +39,37 @@ public final class XtextTerminalsTestLanguageTerminalTokenElementConsumer extend
}
protected int consumeAlternatives$1(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$5(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$5(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$6(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$6(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 2:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$7(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$7(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 3:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$8(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$8(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 4:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$9(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$9(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeRuleCall$5(int entryPoint) throws Exception {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageTypeRefConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageTypeRefConsumer.java
index 27d5112..96cf790 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageTypeRefConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageTypeRefConsumer.java
@@ -44,7 +44,7 @@ public final class XtextTerminalsTestLanguageTypeRefConsumer extends NonTerminal
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -85,7 +85,7 @@ public final class XtextTerminalsTestLanguageTypeRefConsumer extends NonTerminal
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageUpToTokenConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageUpToTokenConsumer.java
index 36f953f..d4124da 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageUpToTokenConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/packrat/consumers/XtextTerminalsTestLanguageUpToTokenConsumer.java
@@ -38,7 +38,7 @@ public final class XtextTerminalsTestLanguageUpToTokenConsumer extends NonTermin
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/formatter/parser/packrat/consumers/FormatterTestLanguageLineConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/formatter/parser/packrat/consumers/FormatterTestLanguageLineConsumer.java
index 3897b8d..767a31c 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/formatter/parser/packrat/consumers/FormatterTestLanguageLineConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/formatter/parser/packrat/consumers/FormatterTestLanguageLineConsumer.java
@@ -44,7 +44,7 @@ public final class FormatterTestLanguageLineConsumer extends NonTerminalConsumer
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/formatter/parser/packrat/consumers/FormatterTestLanguageRootConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/formatter/parser/packrat/consumers/FormatterTestLanguageRootConsumer.java
index dad7bd5..ed98998 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/formatter/parser/packrat/consumers/FormatterTestLanguageRootConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/formatter/parser/packrat/consumers/FormatterTestLanguageRootConsumer.java
@@ -40,7 +40,7 @@ public final class FormatterTestLanguageRootConsumer extends NonTerminalConsumer
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -71,52 +71,22 @@ public final class FormatterTestLanguageRootConsumer extends NonTerminalConsumer
}
protected int consumeAlternatives$3(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$4(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$4(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$5(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$5(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeRuleCall$4(int entryPoint) throws Exception {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/formatter/parser/packrat/consumers/FormatterTestLanguageTestIndentationConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/formatter/parser/packrat/consumers/FormatterTestLanguageTestIndentationConsumer.java
index 5483a49..da656b1 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/formatter/parser/packrat/consumers/FormatterTestLanguageTestIndentationConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/formatter/parser/packrat/consumers/FormatterTestLanguageTestIndentationConsumer.java
@@ -46,7 +46,7 @@ public final class FormatterTestLanguageTestIndentationConsumer extends NonTermi
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -108,52 +108,22 @@ public final class FormatterTestLanguageTestIndentationConsumer extends NonTermi
}
protected int doConsumeAlternatives$6(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$7(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$7(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$9(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$9(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeAssignment$7(int entryPoint) throws Exception {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/formatter/parser/packrat/consumers/FormatterTestLanguageTestLinewrapConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/formatter/parser/packrat/consumers/FormatterTestLanguageTestLinewrapConsumer.java
index 5f59b62..86e5648 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/formatter/parser/packrat/consumers/FormatterTestLanguageTestLinewrapConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/formatter/parser/packrat/consumers/FormatterTestLanguageTestLinewrapConsumer.java
@@ -38,7 +38,7 @@ public final class FormatterTestLanguageTestLinewrapConsumer extends NonTerminal
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageOpConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageOpConsumer.java
index 0d77899..9ea1471 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageOpConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageOpConsumer.java
@@ -41,7 +41,7 @@ public final class ComplexReconstrTestLanguageOpConsumer extends NonTerminalCons
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -81,52 +81,22 @@ public final class ComplexReconstrTestLanguageOpConsumer extends NonTerminalCons
}
protected int doConsumeAlternatives$3(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeGroup$4(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeGroup$4(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeGroup$11(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeGroup$11(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeGroup$4(int entryPoint) throws Exception {
@@ -134,7 +104,7 @@ public final class ComplexReconstrTestLanguageOpConsumer extends NonTerminalCons
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -196,7 +166,7 @@ public final class ComplexReconstrTestLanguageOpConsumer extends NonTerminalCons
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageParensConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageParensConsumer.java
index 626032e..6898dd6 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageParensConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageParensConsumer.java
@@ -44,7 +44,7 @@ public final class ComplexReconstrTestLanguageParensConsumer extends NonTerminal
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageRootConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageRootConsumer.java
index 76c3590..32da742 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageRootConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageRootConsumer.java
@@ -33,52 +33,22 @@ public final class ComplexReconstrTestLanguageRootConsumer extends NonTerminalCo
}
protected int consumeAlternatives$1(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$2(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$2(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$3(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$3(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeRuleCall$2(int entryPoint) throws Exception {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTermConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTermConsumer.java
index 1260bca..6efdd79 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTermConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTermConsumer.java
@@ -33,52 +33,22 @@ public final class ComplexReconstrTestLanguageTermConsumer extends NonTerminalCo
}
protected int consumeAlternatives$1(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$2(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$2(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$3(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$3(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeRuleCall$2(int entryPoint) throws Exception {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyAConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyAConsumer.java
index 8aa76ce..2ec95b2 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyAConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyAConsumer.java
@@ -54,7 +54,7 @@ public final class ComplexReconstrTestLanguageTrickyAConsumer extends NonTermina
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -149,52 +149,22 @@ public final class ComplexReconstrTestLanguageTrickyAConsumer extends NonTermina
}
protected int doConsumeAlternatives$9(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeGroup$10(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeGroup$10(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeGroup$14(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeGroup$14(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeGroup$10(int entryPoint) throws Exception {
@@ -202,7 +172,7 @@ public final class ComplexReconstrTestLanguageTrickyAConsumer extends NonTermina
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -241,7 +211,7 @@ public final class ComplexReconstrTestLanguageTrickyAConsumer extends NonTermina
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyBConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyBConsumer.java
index 4a1a37f..6a9f824 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyBConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyBConsumer.java
@@ -49,7 +49,7 @@ public final class ComplexReconstrTestLanguageTrickyBConsumer extends NonTermina
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -103,7 +103,7 @@ public final class ComplexReconstrTestLanguageTrickyBConsumer extends NonTermina
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyCConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyCConsumer.java
index 3c8cb65..ddd0db9 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyCConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyCConsumer.java
@@ -50,7 +50,7 @@ public final class ComplexReconstrTestLanguageTrickyCConsumer extends NonTermina
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -136,7 +136,7 @@ public final class ComplexReconstrTestLanguageTrickyCConsumer extends NonTermina
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -185,7 +185,7 @@ public final class ComplexReconstrTestLanguageTrickyCConsumer extends NonTermina
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -234,7 +234,7 @@ public final class ComplexReconstrTestLanguageTrickyCConsumer extends NonTermina
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyDConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyDConsumer.java
index 958f4e0..ca8f1e6 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyDConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyDConsumer.java
@@ -60,7 +60,7 @@ public final class ComplexReconstrTestLanguageTrickyDConsumer extends NonTermina
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -123,7 +123,7 @@ public final class ComplexReconstrTestLanguageTrickyDConsumer extends NonTermina
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -215,7 +215,7 @@ public final class ComplexReconstrTestLanguageTrickyDConsumer extends NonTermina
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyEConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyEConsumer.java
index ef16002..5ca25c1 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyEConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyEConsumer.java
@@ -60,7 +60,7 @@ public final class ComplexReconstrTestLanguageTrickyEConsumer extends NonTermina
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -122,7 +122,7 @@ public final class ComplexReconstrTestLanguageTrickyEConsumer extends NonTermina
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -217,7 +217,7 @@ public final class ComplexReconstrTestLanguageTrickyEConsumer extends NonTermina
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyFConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyFConsumer.java
index 1861785..b720a63 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyFConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyFConsumer.java
@@ -52,7 +52,7 @@ public final class ComplexReconstrTestLanguageTrickyFConsumer extends NonTermina
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -105,7 +105,7 @@ public final class ComplexReconstrTestLanguageTrickyFConsumer extends NonTermina
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -160,52 +160,22 @@ public final class ComplexReconstrTestLanguageTrickyFConsumer extends NonTermina
}
protected int consumeAlternatives$9(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$10(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$10(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$12(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$12(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeAssignment$10(int entryPoint) throws Exception {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyG1Consumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyG1Consumer.java
index 93d380c..3f36d1b 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyG1Consumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyG1Consumer.java
@@ -44,7 +44,7 @@ public final class ComplexReconstrTestLanguageTrickyG1Consumer extends NonTermin
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -98,7 +98,7 @@ public final class ComplexReconstrTestLanguageTrickyG1Consumer extends NonTermin
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -152,7 +152,7 @@ public final class ComplexReconstrTestLanguageTrickyG1Consumer extends NonTermin
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyG2Consumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyG2Consumer.java
index 64f3723..de442b1 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyG2Consumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyG2Consumer.java
@@ -36,52 +36,22 @@ public final class ComplexReconstrTestLanguageTrickyG2Consumer extends NonTermin
}
protected int consumeAlternatives$1(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$2(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$2(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$3(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$3(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeRuleCall$2(int entryPoint) throws Exception {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyGConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyGConsumer.java
index 6f8cfc0..2088d6a 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyGConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/ComplexReconstrTestLanguageTrickyGConsumer.java
@@ -38,7 +38,7 @@ public final class ComplexReconstrTestLanguageTrickyGConsumer extends NonTermina
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageBooleanConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageBooleanConsumer.java
index 1562221..1d47832 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageBooleanConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageBooleanConsumer.java
@@ -47,7 +47,7 @@ public final class SimpleReconstrTestLanguageBooleanConsumer extends NonTerminal
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageManyStringsConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageManyStringsConsumer.java
index e09800c..45c4d53 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageManyStringsConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageManyStringsConsumer.java
@@ -44,7 +44,7 @@ public final class SimpleReconstrTestLanguageManyStringsConsumer extends NonTerm
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageOpConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageOpConsumer.java
index 71b8fe9..625255a 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageOpConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageOpConsumer.java
@@ -35,7 +35,7 @@ public final class SimpleReconstrTestLanguageOpConsumer extends NonTerminalConsu
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -79,7 +79,7 @@ public final class SimpleReconstrTestLanguageOpConsumer extends NonTerminalConsu
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageParensConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageParensConsumer.java
index 7997752..fbdeda1 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageParensConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageParensConsumer.java
@@ -44,7 +44,7 @@ public final class SimpleReconstrTestLanguageParensConsumer extends NonTerminalC
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageRef2Consumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageRef2Consumer.java
index e08706c..fe76552 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageRef2Consumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageRef2Consumer.java
@@ -47,7 +47,7 @@ public final class SimpleReconstrTestLanguageRef2Consumer extends NonTerminalCon
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageSpareConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageSpareConsumer.java
index ab6e142..038e3cb 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageSpareConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageSpareConsumer.java
@@ -47,7 +47,7 @@ public final class SimpleReconstrTestLanguageSpareConsumer extends NonTerminalCo
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -114,7 +114,7 @@ public final class SimpleReconstrTestLanguageSpareConsumer extends NonTerminalCo
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageTermConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageTermConsumer.java
index 857b2ab..d9709d6 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageTermConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageTermConsumer.java
@@ -45,154 +45,52 @@ public final class SimpleReconstrTestLanguageTermConsumer extends NonTerminalCon
}
protected int consumeAlternatives$1(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$8(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$8(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$9(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$9(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 2:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$10(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$10(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 3:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$11(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$11(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 4:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$12(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$12(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 5:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$13(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$13(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 6:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$14(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$14(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 7:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$15(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$15(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeRuleCall$8(int entryPoint) throws Exception {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageTwoNumbersConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageTwoNumbersConsumer.java
index a8b9dfa..16242bb 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageTwoNumbersConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageTwoNumbersConsumer.java
@@ -47,7 +47,7 @@ public final class SimpleReconstrTestLanguageTwoNumbersConsumer extends NonTermi
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -124,7 +124,7 @@ public final class SimpleReconstrTestLanguageTwoNumbersConsumer extends NonTermi
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageTypeConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageTypeConsumer.java
index 3dc20c3..d54777f 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageTypeConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/packrat/consumers/SimpleReconstrTestLanguageTypeConsumer.java
@@ -47,7 +47,7 @@ public final class SimpleReconstrTestLanguageTypeConsumer extends NonTerminalCon
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/transientvalues/parser/packrat/consumers/TransientValuesTestRootConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/transientvalues/parser/packrat/consumers/TransientValuesTestRootConsumer.java
index 38b1baf..e1eee93 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/transientvalues/parser/packrat/consumers/TransientValuesTestRootConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/transientvalues/parser/packrat/consumers/TransientValuesTestRootConsumer.java
@@ -42,7 +42,7 @@ public final class TransientValuesTestRootConsumer extends NonTerminalConsumer {
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -73,69 +73,27 @@ public final class TransientValuesTestRootConsumer extends NonTerminalConsumer {
}
protected int consumeAlternatives$3(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$5(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$5(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$6(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$6(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 2:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$7(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$7(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeRuleCall$5(int entryPoint) throws Exception {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/transientvalues/parser/packrat/consumers/TransientValuesTestTestListConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/transientvalues/parser/packrat/consumers/TransientValuesTestTestListConsumer.java
index c5c3d95..a2eb2c3 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/transientvalues/parser/packrat/consumers/TransientValuesTestTestListConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/transientvalues/parser/packrat/consumers/TransientValuesTestTestListConsumer.java
@@ -41,7 +41,7 @@ public final class TransientValuesTestTestListConsumer extends NonTerminalConsum
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/transientvalues/parser/packrat/consumers/TransientValuesTestTestOptionalConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/transientvalues/parser/packrat/consumers/TransientValuesTestTestOptionalConsumer.java
index 0a72ea9..219690f 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/transientvalues/parser/packrat/consumers/TransientValuesTestTestOptionalConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/transientvalues/parser/packrat/consumers/TransientValuesTestTestOptionalConsumer.java
@@ -47,7 +47,7 @@ public final class TransientValuesTestTestOptionalConsumer extends NonTerminalCo
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -125,7 +125,7 @@ public final class TransientValuesTestTestOptionalConsumer extends NonTerminalCo
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/transientvalues/parser/packrat/consumers/TransientValuesTestTestRequiredConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/transientvalues/parser/packrat/consumers/TransientValuesTestTestRequiredConsumer.java
index 6b1abad..49fc5f6 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/transientvalues/parser/packrat/consumers/TransientValuesTestTestRequiredConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/transientvalues/parser/packrat/consumers/TransientValuesTestTestRequiredConsumer.java
@@ -44,7 +44,7 @@ public final class TransientValuesTestTestRequiredConsumer extends NonTerminalCo
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ReferenceGrammar.ecore b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ReferenceGrammar.ecore
index d0d0a55..8d02c8e 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ReferenceGrammar.ecore
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ReferenceGrammar.ecore
@@ -13,12 +13,12 @@
<eStructuralFeatures xsi:type="ecore:EReference" name="familie" unique="false" upperBound="-1" eType="//Familie" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Person">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="age">
- <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
- </eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name">
<eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="age">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ </eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Kind" eSuperTypes="//Person"/>
<eClassifiers xsi:type="ecore:EClass" name="Erwachsener" eSuperTypes="//Person"/>
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ActionTestLanguageElementConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ActionTestLanguageElementConsumer.java
index 2239658..12e046c 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ActionTestLanguageElementConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ActionTestLanguageElementConsumer.java
@@ -35,7 +35,7 @@ public final class ActionTestLanguageElementConsumer extends NonTerminalConsumer
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ActionTestLanguageItemConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ActionTestLanguageItemConsumer.java
index 96ae468..b970476 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ActionTestLanguageItemConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ActionTestLanguageItemConsumer.java
@@ -38,7 +38,7 @@ public final class ActionTestLanguageItemConsumer extends NonTerminalConsumer {
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ContentAssistTestLanguageAbstractRuleConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ContentAssistTestLanguageAbstractRuleConsumer.java
index 36c3c79..f7f2f44 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ContentAssistTestLanguageAbstractRuleConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ContentAssistTestLanguageAbstractRuleConsumer.java
@@ -33,52 +33,22 @@ public final class ContentAssistTestLanguageAbstractRuleConsumer extends NonTerm
}
protected int consumeAlternatives$1(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$2(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$2(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$3(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$3(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeRuleCall$2(int entryPoint) throws Exception {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ContentAssistTestLanguageFirstAbstractRuleChildConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ContentAssistTestLanguageFirstAbstractRuleChildConsumer.java
index 2a21ba7..e413a62 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ContentAssistTestLanguageFirstAbstractRuleChildConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ContentAssistTestLanguageFirstAbstractRuleChildConsumer.java
@@ -49,7 +49,7 @@ public final class ContentAssistTestLanguageFirstAbstractRuleChildConsumer exten
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ContentAssistTestLanguageSecondAbstractRuleChildConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ContentAssistTestLanguageSecondAbstractRuleChildConsumer.java
index 30ec723..641e3d1 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ContentAssistTestLanguageSecondAbstractRuleChildConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ContentAssistTestLanguageSecondAbstractRuleChildConsumer.java
@@ -49,7 +49,7 @@ public final class ContentAssistTestLanguageSecondAbstractRuleChildConsumer exte
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ContentAssistTestLanguageStartConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ContentAssistTestLanguageStartConsumer.java
index a1f47d5..06b3269 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ContentAssistTestLanguageStartConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ContentAssistTestLanguageStartConsumer.java
@@ -41,7 +41,7 @@ public final class ContentAssistTestLanguageStartConsumer extends NonTerminalCon
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/FowlerDslTestLanguageCommandConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/FowlerDslTestLanguageCommandConsumer.java
index d02ea7d..f26fa66 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/FowlerDslTestLanguageCommandConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/FowlerDslTestLanguageCommandConsumer.java
@@ -41,7 +41,7 @@ public final class FowlerDslTestLanguageCommandConsumer extends NonTerminalConsu
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/FowlerDslTestLanguageEventConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/FowlerDslTestLanguageEventConsumer.java
index 4238b85..5bd3dbf 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/FowlerDslTestLanguageEventConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/FowlerDslTestLanguageEventConsumer.java
@@ -44,7 +44,7 @@ public final class FowlerDslTestLanguageEventConsumer extends NonTerminalConsume
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/FowlerDslTestLanguageStateConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/FowlerDslTestLanguageStateConsumer.java
index 7249ae7..2bab59b 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/FowlerDslTestLanguageStateConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/FowlerDslTestLanguageStateConsumer.java
@@ -58,7 +58,7 @@ public final class FowlerDslTestLanguageStateConsumer extends NonTerminalConsume
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -144,7 +144,7 @@ public final class FowlerDslTestLanguageStateConsumer extends NonTerminalConsume
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/FowlerDslTestLanguageStatemachineConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/FowlerDslTestLanguageStatemachineConsumer.java
index b42c7c8..97c678d 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/FowlerDslTestLanguageStatemachineConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/FowlerDslTestLanguageStatemachineConsumer.java
@@ -51,7 +51,7 @@ public final class FowlerDslTestLanguageStatemachineConsumer extends NonTerminal
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/FowlerDslTestLanguageTransitionConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/FowlerDslTestLanguageTransitionConsumer.java
index 8eb54ea..2fe09c5 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/FowlerDslTestLanguageTransitionConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/FowlerDslTestLanguageTransitionConsumer.java
@@ -44,7 +44,7 @@ public final class FowlerDslTestLanguageTransitionConsumer extends NonTerminalCo
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LexerTestLanguageElementConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LexerTestLanguageElementConsumer.java
index ada8313..238d016 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LexerTestLanguageElementConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LexerTestLanguageElementConsumer.java
@@ -43,7 +43,7 @@ public final class LexerTestLanguageElementConsumer extends NonTerminalConsumer
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LookaheadTestLanguageAltsConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LookaheadTestLanguageAltsConsumer.java
index 32b0667..f9587dd 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LookaheadTestLanguageAltsConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LookaheadTestLanguageAltsConsumer.java
@@ -35,69 +35,27 @@ public final class LookaheadTestLanguageAltsConsumer extends NonTerminalConsumer
}
protected int consumeAlternatives$1(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$3(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$3(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$4(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$4(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 2:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$5(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$5(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeRuleCall$3(int entryPoint) throws Exception {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LookaheadTestLanguageLookAhead0Consumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LookaheadTestLanguageLookAhead0Consumer.java
index d51e8d3..cb22efe 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LookaheadTestLanguageLookAhead0Consumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LookaheadTestLanguageLookAhead0Consumer.java
@@ -39,7 +39,7 @@ public final class LookaheadTestLanguageLookAhead0Consumer extends NonTerminalCo
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LookaheadTestLanguageLookAhead1Consumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LookaheadTestLanguageLookAhead1Consumer.java
index 634790b..2da0efe 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LookaheadTestLanguageLookAhead1Consumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LookaheadTestLanguageLookAhead1Consumer.java
@@ -44,7 +44,7 @@ public final class LookaheadTestLanguageLookAhead1Consumer extends NonTerminalCo
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LookaheadTestLanguageLookAhead2Consumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LookaheadTestLanguageLookAhead2Consumer.java
index b7e6f27..04b009e 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LookaheadTestLanguageLookAhead2Consumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LookaheadTestLanguageLookAhead2Consumer.java
@@ -42,7 +42,7 @@ public final class LookaheadTestLanguageLookAhead2Consumer extends NonTerminalCo
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -69,52 +69,22 @@ public final class LookaheadTestLanguageLookAhead2Consumer extends NonTerminalCo
}
protected int consumeAlternatives$2(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$3(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$3(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$5(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$5(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeAssignment$3(int entryPoint) throws Exception {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LookaheadTestLanguageLookAhead3Consumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LookaheadTestLanguageLookAhead3Consumer.java
index 3204fc8..ccd84e0 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LookaheadTestLanguageLookAhead3Consumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LookaheadTestLanguageLookAhead3Consumer.java
@@ -44,7 +44,7 @@ public final class LookaheadTestLanguageLookAhead3Consumer extends NonTerminalCo
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LookaheadTestLanguageLookAhead4Consumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LookaheadTestLanguageLookAhead4Consumer.java
index eae6476..322549b 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LookaheadTestLanguageLookAhead4Consumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/LookaheadTestLanguageLookAhead4Consumer.java
@@ -35,52 +35,22 @@ public final class LookaheadTestLanguageLookAhead4Consumer extends NonTerminalCo
}
protected int consumeAlternatives$1(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$2(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$2(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$4(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$4(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeAssignment$2(int entryPoint) throws Exception {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/OptionalEmptyTestLanguageGreetingConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/OptionalEmptyTestLanguageGreetingConsumer.java
index 88369bb..c496c4a 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/OptionalEmptyTestLanguageGreetingConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/OptionalEmptyTestLanguageGreetingConsumer.java
@@ -41,7 +41,7 @@ public final class OptionalEmptyTestLanguageGreetingConsumer extends NonTerminal
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageAbstractChildConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageAbstractChildConsumer.java
index e1ff9c4..1e0fe37 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageAbstractChildConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageAbstractChildConsumer.java
@@ -33,52 +33,22 @@ public final class PartialParserTestLanguageAbstractChildConsumer extends NonTer
}
protected int consumeAlternatives$1(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$2(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$2(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$3(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$3(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeRuleCall$2(int entryPoint) throws Exception {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageAbstractChildrenConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageAbstractChildrenConsumer.java
index 59f065e..631cd89 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageAbstractChildrenConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageAbstractChildrenConsumer.java
@@ -44,7 +44,7 @@ public final class PartialParserTestLanguageAbstractChildrenConsumer extends Non
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageChildConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageChildConsumer.java
index b0568ed..7240de6 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageChildConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageChildConsumer.java
@@ -47,7 +47,7 @@ public final class PartialParserTestLanguageChildConsumer extends NonTerminalCon
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageChildrenConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageChildrenConsumer.java
index 674bcf7..9f30dee 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageChildrenConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageChildrenConsumer.java
@@ -47,7 +47,7 @@ public final class PartialParserTestLanguageChildrenConsumer extends NonTerminal
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -136,7 +136,7 @@ public final class PartialParserTestLanguageChildrenConsumer extends NonTerminal
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageContainerConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageContainerConsumer.java
index 5868069..a4f8b23 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageContainerConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageContainerConsumer.java
@@ -51,7 +51,7 @@ public final class PartialParserTestLanguageContainerConsumer extends NonTermina
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -136,52 +136,22 @@ public final class PartialParserTestLanguageContainerConsumer extends NonTermina
}
protected int doConsumeAlternatives$9(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$10(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$10(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$12(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$12(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeAssignment$10(int entryPoint) throws Exception {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageContentConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageContentConsumer.java
index fb2d7ad..1b0a558 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageContentConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageContentConsumer.java
@@ -33,52 +33,22 @@ public final class PartialParserTestLanguageContentConsumer extends NonTerminalC
}
protected int consumeAlternatives$1(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$2(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$2(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$3(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$3(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeRuleCall$2(int entryPoint) throws Exception {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageFirstConcreteConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageFirstConcreteConsumer.java
index d09b459..f64e5bd 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageFirstConcreteConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageFirstConcreteConsumer.java
@@ -52,7 +52,7 @@ public final class PartialParserTestLanguageFirstConcreteConsumer extends NonTer
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageNestedConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageNestedConsumer.java
index f44c575..6783c18 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageNestedConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageNestedConsumer.java
@@ -44,7 +44,7 @@ public final class PartialParserTestLanguageNestedConsumer extends NonTerminalCo
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageSecondConcreteConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageSecondConcreteConsumer.java
index 020bd8f..347c508 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageSecondConcreteConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/PartialParserTestLanguageSecondConcreteConsumer.java
@@ -55,7 +55,7 @@ public final class PartialParserTestLanguageSecondConcreteConsumer extends NonTe
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageErwachsenerConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageErwachsenerConsumer.java
index c6e4666..4e28b18 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageErwachsenerConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageErwachsenerConsumer.java
@@ -52,7 +52,7 @@ public final class ReferenceGrammarTestLanguageErwachsenerConsumer extends NonTe
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageFamilieConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageFamilieConsumer.java
index c93fc6c..e0a65f1 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageFamilieConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageFamilieConsumer.java
@@ -70,7 +70,7 @@ public final class ReferenceGrammarTestLanguageFamilieConsumer extends NonTermin
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -250,7 +250,7 @@ public final class ReferenceGrammarTestLanguageFamilieConsumer extends NonTermin
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageFarbeConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageFarbeConsumer.java
index b6adbb9..4cce205 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageFarbeConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageFarbeConsumer.java
@@ -41,86 +41,32 @@ public final class ReferenceGrammarTestLanguageFarbeConsumer extends NonTerminal
}
protected int consumeAlternatives$1(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeKeyword$4(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeKeyword$4(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeKeyword$5(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeKeyword$5(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 2:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeKeyword$6(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeKeyword$6(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 3:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeKeyword$7(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeKeyword$7(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeKeyword$4(int entryPoint) throws Exception {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageKindConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageKindConsumer.java
index 8ee59ad..6b26bea 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageKindConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageKindConsumer.java
@@ -52,7 +52,7 @@ public final class ReferenceGrammarTestLanguageKindConsumer extends NonTerminalC
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguagePersonConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguagePersonConsumer.java
index 3be5358..8310c7f 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguagePersonConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguagePersonConsumer.java
@@ -33,52 +33,22 @@ public final class ReferenceGrammarTestLanguagePersonConsumer extends NonTermina
}
protected int consumeAlternatives$1(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$2(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$2(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$3(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$3(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeRuleCall$2(int entryPoint) throws Exception {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageSpielplatzConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageSpielplatzConsumer.java
index 9db1f53..a4f118c 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageSpielplatzConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageSpielplatzConsumer.java
@@ -70,7 +70,7 @@ public final class ReferenceGrammarTestLanguageSpielplatzConsumer extends NonTer
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -188,86 +188,32 @@ public final class ReferenceGrammarTestLanguageSpielplatzConsumer extends NonTer
}
protected int doConsumeAlternatives$12(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$15(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$15(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$17(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$17(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 2:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$19(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$19(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 3:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeAssignment$21(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeAssignment$21(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeAssignment$15(int entryPoint) throws Exception {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageSpielzeugConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageSpielzeugConsumer.java
index 0c3b273..51b2ce6 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageSpielzeugConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/ReferenceGrammarTestLanguageSpielzeugConsumer.java
@@ -49,7 +49,7 @@ public final class ReferenceGrammarTestLanguageSpielzeugConsumer extends NonTerm
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/SimpleExpressionsTestLanguageAdditionConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/SimpleExpressionsTestLanguageAdditionConsumer.java
index c2dd4b3..8f49714 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/SimpleExpressionsTestLanguageAdditionConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/SimpleExpressionsTestLanguageAdditionConsumer.java
@@ -41,7 +41,7 @@ public final class SimpleExpressionsTestLanguageAdditionConsumer extends NonTerm
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -85,7 +85,7 @@ public final class SimpleExpressionsTestLanguageAdditionConsumer extends NonTerm
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/SimpleExpressionsTestLanguageMultiplicationConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/SimpleExpressionsTestLanguageMultiplicationConsumer.java
index 4ad81e4..415e2fc 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/SimpleExpressionsTestLanguageMultiplicationConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/SimpleExpressionsTestLanguageMultiplicationConsumer.java
@@ -41,7 +41,7 @@ public final class SimpleExpressionsTestLanguageMultiplicationConsumer extends N
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -85,7 +85,7 @@ public final class SimpleExpressionsTestLanguageMultiplicationConsumer extends N
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/SimpleExpressionsTestLanguageParensConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/SimpleExpressionsTestLanguageParensConsumer.java
index 546ee07..87d77d2 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/SimpleExpressionsTestLanguageParensConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/SimpleExpressionsTestLanguageParensConsumer.java
@@ -41,7 +41,7 @@ public final class SimpleExpressionsTestLanguageParensConsumer extends NonTermin
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/SimpleExpressionsTestLanguageSequenceConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/SimpleExpressionsTestLanguageSequenceConsumer.java
index 671a5b5..5ba4f85 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/SimpleExpressionsTestLanguageSequenceConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/SimpleExpressionsTestLanguageSequenceConsumer.java
@@ -35,7 +35,7 @@ public final class SimpleExpressionsTestLanguageSequenceConsumer extends NonTerm
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -79,7 +79,7 @@ public final class SimpleExpressionsTestLanguageSequenceConsumer extends NonTerm
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/SimpleExpressionsTestLanguageTermConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/SimpleExpressionsTestLanguageTermConsumer.java
index 3ec9c19..9fdf8d9 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/SimpleExpressionsTestLanguageTermConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/SimpleExpressionsTestLanguageTermConsumer.java
@@ -33,52 +33,22 @@ public final class SimpleExpressionsTestLanguageTermConsumer extends NonTerminal
}
protected int consumeAlternatives$1(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$2(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$2(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$3(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$3(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeRuleCall$2(int entryPoint) throws Exception {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/TestLanguageAbstractRuleConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/TestLanguageAbstractRuleConsumer.java
index dbc6b80..f617fda 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/TestLanguageAbstractRuleConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/TestLanguageAbstractRuleConsumer.java
@@ -33,52 +33,22 @@ public final class TestLanguageAbstractRuleConsumer extends NonTerminalConsumer
}
protected int consumeAlternatives$1(int entryPoint) throws Exception {
- announceNextLevel();
- int result = ConsumeResult.SUCCESS;
- IMarker bestMarker = mark();
- IMarker currentMarker;
- int tempResult;
+ AlternativesResult result = createAlternativesResult();
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
- result = ConsumeResult.EMPTY_MATCH;
+ case -1: // use fall through semantics of switch case
+ result.reset();
case 0:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$2(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$2(nextEntryPoint()))) {
+ return result.getResult();
}
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
- }
- currentMarker = null;
case 1:
- announceNextPath();
- currentMarker = bestMarker.fork();
- tempResult = consumeRuleCall$3(nextEntryPoint());
- if (tempResult == ConsumeResult.SUCCESS) {
- bestMarker = currentMarker.join(bestMarker);
- bestMarker.commit();
- announceLevelFinished();
- return tempResult;
- }
- if (tempResult > result) {
- bestMarker = currentMarker.join(bestMarker);
- result = tempResult;
- } else {
- bestMarker = bestMarker.join(currentMarker);
+ result.nextAlternative();
+ if (result.isAlternativeDone(consumeRuleCall$3(nextEntryPoint()))) {
+ return result.getResult();
}
- currentMarker = null;
}
- bestMarker.commit();
- announceLevelFinished();
- return result;
+ return result.getResult();
}
protected int consumeRuleCall$2(int entryPoint) throws Exception {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/TestLanguageChoiceRuleConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/TestLanguageChoiceRuleConsumer.java
index 7975223..c5bb3c2 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/TestLanguageChoiceRuleConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/TestLanguageChoiceRuleConsumer.java
@@ -44,7 +44,7 @@ public final class TestLanguageChoiceRuleConsumer extends NonTerminalConsumer {
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/TestLanguageReducibleRuleConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/TestLanguageReducibleRuleConsumer.java
index b9fe78b..71e9556 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/TestLanguageReducibleRuleConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/TestLanguageReducibleRuleConsumer.java
@@ -38,7 +38,7 @@ public final class TestLanguageReducibleRuleConsumer extends NonTerminalConsumer
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
@@ -96,7 +96,7 @@ public final class TestLanguageReducibleRuleConsumer extends NonTerminalConsumer
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/TreeTestLanguageNodeConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/TreeTestLanguageNodeConsumer.java
index 6039de7..e9faa32 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/TreeTestLanguageNodeConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/packrat/consumers/TreeTestLanguageNodeConsumer.java
@@ -57,7 +57,7 @@ public final class TreeTestLanguageNodeConsumer extends NonTerminalConsumer {
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/parser/packrat/consumers/Bug250313Ref2Consumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/parser/packrat/consumers/Bug250313Ref2Consumer.java
index c661d74..72e08c3 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/parser/packrat/consumers/Bug250313Ref2Consumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/parser/packrat/consumers/Bug250313Ref2Consumer.java
@@ -49,7 +49,7 @@ public final class Bug250313Ref2Consumer extends NonTerminalConsumer {
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();
diff --git a/tests/org.eclipse.xtext.ui.integration.tests/src-gen/org/eclipse/xtext/ui/integration/parser/packrat/consumers/TestLanguageStuffConsumer.java b/tests/org.eclipse.xtext.ui.integration.tests/src-gen/org/eclipse/xtext/ui/integration/parser/packrat/consumers/TestLanguageStuffConsumer.java
index 49a32fb..059f701 100644
--- a/tests/org.eclipse.xtext.ui.integration.tests/src-gen/org/eclipse/xtext/ui/integration/parser/packrat/consumers/TestLanguageStuffConsumer.java
+++ b/tests/org.eclipse.xtext.ui.integration.tests/src-gen/org/eclipse/xtext/ui/integration/parser/packrat/consumers/TestLanguageStuffConsumer.java
@@ -41,7 +41,7 @@ public final class TestLanguageStuffConsumer extends NonTerminalConsumer {
final IMarker marker = mark();
int result = ConsumeResult.SUCCESS;
switch(entryPoint) {
- case -1: // use fallthrough semantics of switch case
+ case -1: // use fall through semantics of switch case
result = ConsumeResult.EMPTY_MATCH;
case 0:
announceNextStep();