use of org.eclipse.xtext.testlanguages.xtextgrammar.xtextGrammarTest.Grammar in project xtext-core by eclipse.
the class XtextGrammarTestLanguageSemanticSequencer method sequence.
@Override
public void sequence(ISerializationContext context, EObject semanticObject) {
EPackage epackage = semanticObject.eClass().getEPackage();
ParserRule rule = context.getParserRule();
Action action = context.getAssignedAction();
Set<Parameter> parameters = context.getEnabledBooleanParameters();
if (epackage == XtextGrammarTestPackage.eINSTANCE)
switch(semanticObject.eClass().getClassifierID()) {
case XtextGrammarTestPackage.ACTION:
if (rule == grammarAccess.getAlternativesRule() || action == grammarAccess.getAlternativesAccess().getAlternativesGroupsAction_1_0() || rule == grammarAccess.getGroupRule() || action == grammarAccess.getGroupAccess().getGroupTokensAction_1_0() || rule == grammarAccess.getAbstractTokenRule() || rule == grammarAccess.getAbstractTokenWithCardinalityRule() || rule == grammarAccess.getAbstractTerminalRule() || rule == grammarAccess.getParenthesizedElementRule()) {
sequence_AbstractTokenWithCardinality_Action(context, (org.eclipse.xtext.testlanguages.xtextgrammar.xtextGrammarTest.Action) semanticObject);
return;
} else if (rule == grammarAccess.getActionRule()) {
sequence_Action(context, (org.eclipse.xtext.testlanguages.xtextgrammar.xtextGrammarTest.Action) semanticObject);
return;
} else
break;
case XtextGrammarTestPackage.ALTERNATIVES:
if (rule == grammarAccess.getAlternativesRule() || action == grammarAccess.getAlternativesAccess().getAlternativesGroupsAction_1_0() || rule == grammarAccess.getGroupRule() || action == grammarAccess.getGroupAccess().getGroupTokensAction_1_0() || rule == grammarAccess.getAbstractTokenRule() || rule == grammarAccess.getAbstractTokenWithCardinalityRule() || rule == grammarAccess.getAbstractTerminalRule() || rule == grammarAccess.getParenthesizedElementRule()) {
sequence_AbstractTokenWithCardinality_Alternatives(context, (Alternatives) semanticObject);
return;
} else if (rule == grammarAccess.getAssignableTerminalRule() || rule == grammarAccess.getParenthesizedAssignableElementRule() || rule == grammarAccess.getAssignableAlternativesRule() || action == grammarAccess.getAssignableAlternativesAccess().getAlternativesGroupsAction_1_0()) {
sequence_AssignableAlternatives(context, (Alternatives) semanticObject);
return;
} else if (rule == grammarAccess.getCrossReferenceableTerminalRule() || rule == grammarAccess.getParenthesizedCrossReferenceableElementRule() || rule == grammarAccess.getCrossReferenceableAlternativesRule() || action == grammarAccess.getCrossReferenceableAlternativesAccess().getAlternativesGroupsAction_1_0()) {
sequence_CrossReferenceableAlternatives(context, (Alternatives) semanticObject);
return;
} else if (rule == grammarAccess.getEnumLiteralsRule()) {
sequence_EnumLiterals(context, (Alternatives) semanticObject);
return;
} else if (rule == grammarAccess.getTerminalAlternativesRule() || action == grammarAccess.getTerminalAlternativesAccess().getAlternativesGroupsAction_1_0() || rule == grammarAccess.getTerminalGroupRule() || action == grammarAccess.getTerminalGroupAccess().getGroupTokensAction_1_0() || rule == grammarAccess.getTerminalTokenRule() || rule == grammarAccess.getTerminalTokenElementRule() || rule == grammarAccess.getParenthesizedTerminalElementRule()) {
sequence_TerminalAlternatives_TerminalToken(context, (Alternatives) semanticObject);
return;
} else
break;
case XtextGrammarTestPackage.ASSIGNMENT:
if (rule == grammarAccess.getAlternativesRule() || action == grammarAccess.getAlternativesAccess().getAlternativesGroupsAction_1_0() || rule == grammarAccess.getGroupRule() || action == grammarAccess.getGroupAccess().getGroupTokensAction_1_0() || rule == grammarAccess.getAbstractTokenRule() || rule == grammarAccess.getAbstractTokenWithCardinalityRule() || rule == grammarAccess.getAbstractTerminalRule() || rule == grammarAccess.getParenthesizedElementRule()) {
sequence_AbstractTokenWithCardinality_Assignment(context, (Assignment) semanticObject);
return;
} else if (rule == grammarAccess.getAssignmentRule()) {
sequence_Assignment(context, (Assignment) semanticObject);
return;
} else
break;
case XtextGrammarTestPackage.CHARACTER_RANGE:
if (rule == grammarAccess.getCharacterRangeRule()) {
sequence_CharacterRange(context, (CharacterRange) semanticObject);
return;
} else if (rule == grammarAccess.getTerminalAlternativesRule() || action == grammarAccess.getTerminalAlternativesAccess().getAlternativesGroupsAction_1_0() || rule == grammarAccess.getTerminalGroupRule() || action == grammarAccess.getTerminalGroupAccess().getGroupTokensAction_1_0() || rule == grammarAccess.getTerminalTokenRule() || rule == grammarAccess.getTerminalTokenElementRule() || rule == grammarAccess.getParenthesizedTerminalElementRule()) {
sequence_CharacterRange_TerminalToken(context, (CharacterRange) semanticObject);
return;
} else
break;
case XtextGrammarTestPackage.CROSS_REFERENCE:
sequence_CrossReference(context, (CrossReference) semanticObject);
return;
case XtextGrammarTestPackage.ENUM_LITERAL_DECLARATION:
sequence_EnumLiteralDeclaration(context, (EnumLiteralDeclaration) semanticObject);
return;
case XtextGrammarTestPackage.ENUM_RULE:
sequence_EnumRule(context, (EnumRule) semanticObject);
return;
case XtextGrammarTestPackage.GENERATED_METAMODEL:
sequence_GeneratedMetamodel(context, (GeneratedMetamodel) semanticObject);
return;
case XtextGrammarTestPackage.GRAMMAR:
sequence_Grammar(context, (Grammar) semanticObject);
return;
case XtextGrammarTestPackage.GROUP:
if (rule == grammarAccess.getAlternativesRule() || action == grammarAccess.getAlternativesAccess().getAlternativesGroupsAction_1_0() || rule == grammarAccess.getGroupRule() || action == grammarAccess.getGroupAccess().getGroupTokensAction_1_0() || rule == grammarAccess.getAbstractTokenRule() || rule == grammarAccess.getAbstractTokenWithCardinalityRule() || rule == grammarAccess.getAbstractTerminalRule() || rule == grammarAccess.getParenthesizedElementRule()) {
sequence_AbstractTokenWithCardinality_Group(context, (Group) semanticObject);
return;
} else if (rule == grammarAccess.getTerminalAlternativesRule() || action == grammarAccess.getTerminalAlternativesAccess().getAlternativesGroupsAction_1_0() || rule == grammarAccess.getTerminalGroupRule() || action == grammarAccess.getTerminalGroupAccess().getGroupTokensAction_1_0() || rule == grammarAccess.getTerminalTokenRule() || rule == grammarAccess.getTerminalTokenElementRule() || rule == grammarAccess.getParenthesizedTerminalElementRule()) {
sequence_TerminalGroup_TerminalToken(context, (Group) semanticObject);
return;
} else
break;
case XtextGrammarTestPackage.KEYWORD:
if (rule == grammarAccess.getAlternativesRule() || action == grammarAccess.getAlternativesAccess().getAlternativesGroupsAction_1_0() || rule == grammarAccess.getGroupRule() || action == grammarAccess.getGroupAccess().getGroupTokensAction_1_0() || rule == grammarAccess.getAbstractTokenRule() || rule == grammarAccess.getAbstractTokenWithCardinalityRule() || rule == grammarAccess.getAbstractTerminalRule() || rule == grammarAccess.getParenthesizedElementRule()) {
sequence_AbstractTokenWithCardinality_Keyword(context, (Keyword) semanticObject);
return;
} else if (rule == grammarAccess.getKeywordRule() || rule == grammarAccess.getAssignableTerminalRule() || rule == grammarAccess.getParenthesizedAssignableElementRule() || rule == grammarAccess.getAssignableAlternativesRule() || action == grammarAccess.getAssignableAlternativesAccess().getAlternativesGroupsAction_1_0() || rule == grammarAccess.getCrossReferenceableTerminalRule() || rule == grammarAccess.getParenthesizedCrossReferenceableElementRule() || rule == grammarAccess.getCrossReferenceableAlternativesRule() || action == grammarAccess.getCrossReferenceableAlternativesAccess().getAlternativesGroupsAction_1_0() || rule == grammarAccess.getCharacterRangeRule() || action == grammarAccess.getCharacterRangeAccess().getCharacterRangeLeftAction_1_0()) {
sequence_Keyword(context, (Keyword) semanticObject);
return;
} else if (rule == grammarAccess.getTerminalAlternativesRule() || action == grammarAccess.getTerminalAlternativesAccess().getAlternativesGroupsAction_1_0() || rule == grammarAccess.getTerminalGroupRule() || action == grammarAccess.getTerminalGroupAccess().getGroupTokensAction_1_0() || rule == grammarAccess.getTerminalTokenRule() || rule == grammarAccess.getTerminalTokenElementRule() || rule == grammarAccess.getParenthesizedTerminalElementRule()) {
sequence_Keyword_TerminalToken(context, (Keyword) semanticObject);
return;
} else
break;
case XtextGrammarTestPackage.NEGATED_TOKEN:
if (rule == grammarAccess.getAbstractNegatedTokenRule() || rule == grammarAccess.getNegatedTokenRule()) {
sequence_NegatedToken(context, (NegatedToken) semanticObject);
return;
} else if (rule == grammarAccess.getTerminalAlternativesRule() || action == grammarAccess.getTerminalAlternativesAccess().getAlternativesGroupsAction_1_0() || rule == grammarAccess.getTerminalGroupRule() || action == grammarAccess.getTerminalGroupAccess().getGroupTokensAction_1_0() || rule == grammarAccess.getTerminalTokenRule() || rule == grammarAccess.getTerminalTokenElementRule() || rule == grammarAccess.getParenthesizedTerminalElementRule()) {
sequence_NegatedToken_TerminalToken(context, (NegatedToken) semanticObject);
return;
} else
break;
case XtextGrammarTestPackage.PARSER_RULE:
sequence_ParserRule(context, (org.eclipse.xtext.testlanguages.xtextgrammar.xtextGrammarTest.ParserRule) semanticObject);
return;
case XtextGrammarTestPackage.REFERENCED_METAMODEL:
sequence_ReferencedMetamodel(context, (ReferencedMetamodel) semanticObject);
return;
case XtextGrammarTestPackage.RULE_CALL:
if (rule == grammarAccess.getAlternativesRule() || action == grammarAccess.getAlternativesAccess().getAlternativesGroupsAction_1_0() || rule == grammarAccess.getGroupRule() || action == grammarAccess.getGroupAccess().getGroupTokensAction_1_0() || rule == grammarAccess.getAbstractTokenRule() || rule == grammarAccess.getAbstractTokenWithCardinalityRule() || rule == grammarAccess.getAbstractTerminalRule() || rule == grammarAccess.getParenthesizedElementRule()) {
sequence_AbstractTokenWithCardinality_RuleCall(context, (RuleCall) semanticObject);
return;
} else if (rule == grammarAccess.getRuleCallRule() || rule == grammarAccess.getAssignableTerminalRule() || rule == grammarAccess.getParenthesizedAssignableElementRule() || rule == grammarAccess.getAssignableAlternativesRule() || action == grammarAccess.getAssignableAlternativesAccess().getAlternativesGroupsAction_1_0() || rule == grammarAccess.getCrossReferenceableTerminalRule() || rule == grammarAccess.getParenthesizedCrossReferenceableElementRule() || rule == grammarAccess.getCrossReferenceableAlternativesRule() || action == grammarAccess.getCrossReferenceableAlternativesAccess().getAlternativesGroupsAction_1_0()) {
sequence_RuleCall(context, (RuleCall) semanticObject);
return;
} else if (rule == grammarAccess.getTerminalAlternativesRule() || action == grammarAccess.getTerminalAlternativesAccess().getAlternativesGroupsAction_1_0() || rule == grammarAccess.getTerminalGroupRule() || action == grammarAccess.getTerminalGroupAccess().getGroupTokensAction_1_0() || rule == grammarAccess.getTerminalTokenRule() || rule == grammarAccess.getTerminalTokenElementRule() || rule == grammarAccess.getParenthesizedTerminalElementRule()) {
sequence_RuleCall_TerminalToken(context, (RuleCall) semanticObject);
return;
} else
break;
case XtextGrammarTestPackage.TERMINAL_RULE:
sequence_TerminalRule(context, (TerminalRule) semanticObject);
return;
case XtextGrammarTestPackage.TYPE_REF:
sequence_TypeRef(context, (TypeRef) semanticObject);
return;
case XtextGrammarTestPackage.UNTIL_TOKEN:
if (rule == grammarAccess.getTerminalAlternativesRule() || action == grammarAccess.getTerminalAlternativesAccess().getAlternativesGroupsAction_1_0() || rule == grammarAccess.getTerminalGroupRule() || action == grammarAccess.getTerminalGroupAccess().getGroupTokensAction_1_0() || rule == grammarAccess.getTerminalTokenRule() || rule == grammarAccess.getTerminalTokenElementRule() || rule == grammarAccess.getParenthesizedTerminalElementRule()) {
sequence_TerminalToken_UntilToken(context, (UntilToken) semanticObject);
return;
} else if (rule == grammarAccess.getAbstractNegatedTokenRule() || rule == grammarAccess.getUntilTokenRule()) {
sequence_UntilToken(context, (UntilToken) semanticObject);
return;
} else
break;
case XtextGrammarTestPackage.WILDCARD:
if (rule == grammarAccess.getTerminalAlternativesRule() || action == grammarAccess.getTerminalAlternativesAccess().getAlternativesGroupsAction_1_0() || rule == grammarAccess.getTerminalGroupRule() || action == grammarAccess.getTerminalGroupAccess().getGroupTokensAction_1_0() || rule == grammarAccess.getTerminalTokenRule() || rule == grammarAccess.getTerminalTokenElementRule() || rule == grammarAccess.getParenthesizedTerminalElementRule()) {
sequence_TerminalToken_Wildcard(context, (Wildcard) semanticObject);
return;
} else if (rule == grammarAccess.getWildcardRule()) {
sequence_Wildcard(context, (Wildcard) semanticObject);
return;
} else
break;
}
if (errorAcceptor != null)
errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Aggregations