Search in sources :

Example 1 with Wildcard

use of org.eclipse.xtext.parser.terminalrules.xtextTerminalsTestLanguage.Wildcard in project xtext-core by eclipse.

the class XtextTerminalsTestLanguageSemanticSequencer 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 == XtextTerminalsTestLanguagePackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case XtextTerminalsTestLanguagePackage.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.parser.terminalrules.xtextTerminalsTestLanguage.Action) semanticObject);
                    return;
                } else if (rule == grammarAccess.getActionRule()) {
                    sequence_Action(context, (org.eclipse.xtext.parser.terminalrules.xtextTerminalsTestLanguage.Action) semanticObject);
                    return;
                } else
                    break;
            case XtextTerminalsTestLanguagePackage.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.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 XtextTerminalsTestLanguagePackage.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 XtextTerminalsTestLanguagePackage.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 XtextTerminalsTestLanguagePackage.CROSS_REFERENCE:
                sequence_CrossReference(context, (CrossReference) semanticObject);
                return;
            case XtextTerminalsTestLanguagePackage.ENUM_LITERAL_DECLARATION:
                sequence_EnumLiteralDeclaration(context, (EnumLiteralDeclaration) semanticObject);
                return;
            case XtextTerminalsTestLanguagePackage.ENUM_RULE:
                sequence_EnumRule(context, (EnumRule) semanticObject);
                return;
            case XtextTerminalsTestLanguagePackage.GENERATED_METAMODEL:
                sequence_GeneratedMetamodel(context, (GeneratedMetamodel) semanticObject);
                return;
            case XtextTerminalsTestLanguagePackage.GRAMMAR:
                sequence_Grammar(context, (Grammar) semanticObject);
                return;
            case XtextTerminalsTestLanguagePackage.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 XtextTerminalsTestLanguagePackage.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.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 XtextTerminalsTestLanguagePackage.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 XtextTerminalsTestLanguagePackage.PARSER_RULE:
                sequence_ParserRule(context, (org.eclipse.xtext.parser.terminalrules.xtextTerminalsTestLanguage.ParserRule) semanticObject);
                return;
            case XtextTerminalsTestLanguagePackage.REFERENCED_METAMODEL:
                sequence_ReferencedMetamodel(context, (ReferencedMetamodel) semanticObject);
                return;
            case XtextTerminalsTestLanguagePackage.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()) {
                    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 XtextTerminalsTestLanguagePackage.TERMINAL_RULE:
                sequence_TerminalRule(context, (TerminalRule) semanticObject);
                return;
            case XtextTerminalsTestLanguagePackage.TYPE_REF:
                sequence_TypeRef(context, (TypeRef) semanticObject);
                return;
            case XtextTerminalsTestLanguagePackage.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 XtextTerminalsTestLanguagePackage.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));
}
Also used : ParserRule(org.eclipse.xtext.ParserRule) Group(org.eclipse.xtext.parser.terminalrules.xtextTerminalsTestLanguage.Group) Action(org.eclipse.xtext.Action) EnumLiteralDeclaration(org.eclipse.xtext.parser.terminalrules.xtextTerminalsTestLanguage.EnumLiteralDeclaration) TypeRef(org.eclipse.xtext.parser.terminalrules.xtextTerminalsTestLanguage.TypeRef) RuleCall(org.eclipse.xtext.parser.terminalrules.xtextTerminalsTestLanguage.RuleCall) EPackage(org.eclipse.emf.ecore.EPackage) Assignment(org.eclipse.xtext.parser.terminalrules.xtextTerminalsTestLanguage.Assignment) EnumRule(org.eclipse.xtext.parser.terminalrules.xtextTerminalsTestLanguage.EnumRule) GeneratedMetamodel(org.eclipse.xtext.parser.terminalrules.xtextTerminalsTestLanguage.GeneratedMetamodel) Wildcard(org.eclipse.xtext.parser.terminalrules.xtextTerminalsTestLanguage.Wildcard) ReferencedMetamodel(org.eclipse.xtext.parser.terminalrules.xtextTerminalsTestLanguage.ReferencedMetamodel) Keyword(org.eclipse.xtext.parser.terminalrules.xtextTerminalsTestLanguage.Keyword) Grammar(org.eclipse.xtext.parser.terminalrules.xtextTerminalsTestLanguage.Grammar) Alternatives(org.eclipse.xtext.parser.terminalrules.xtextTerminalsTestLanguage.Alternatives) Parameter(org.eclipse.xtext.Parameter) CrossReference(org.eclipse.xtext.parser.terminalrules.xtextTerminalsTestLanguage.CrossReference) CharacterRange(org.eclipse.xtext.parser.terminalrules.xtextTerminalsTestLanguage.CharacterRange) UntilToken(org.eclipse.xtext.parser.terminalrules.xtextTerminalsTestLanguage.UntilToken) NegatedToken(org.eclipse.xtext.parser.terminalrules.xtextTerminalsTestLanguage.NegatedToken) TerminalRule(org.eclipse.xtext.parser.terminalrules.xtextTerminalsTestLanguage.TerminalRule)

Aggregations

EPackage (org.eclipse.emf.ecore.EPackage)1 Action (org.eclipse.xtext.Action)1 Parameter (org.eclipse.xtext.Parameter)1 ParserRule (org.eclipse.xtext.ParserRule)1 Alternatives (org.eclipse.xtext.parser.terminalrules.xtextTerminalsTestLanguage.Alternatives)1 Assignment (org.eclipse.xtext.parser.terminalrules.xtextTerminalsTestLanguage.Assignment)1 CharacterRange (org.eclipse.xtext.parser.terminalrules.xtextTerminalsTestLanguage.CharacterRange)1 CrossReference (org.eclipse.xtext.parser.terminalrules.xtextTerminalsTestLanguage.CrossReference)1 EnumLiteralDeclaration (org.eclipse.xtext.parser.terminalrules.xtextTerminalsTestLanguage.EnumLiteralDeclaration)1 EnumRule (org.eclipse.xtext.parser.terminalrules.xtextTerminalsTestLanguage.EnumRule)1 GeneratedMetamodel (org.eclipse.xtext.parser.terminalrules.xtextTerminalsTestLanguage.GeneratedMetamodel)1 Grammar (org.eclipse.xtext.parser.terminalrules.xtextTerminalsTestLanguage.Grammar)1 Group (org.eclipse.xtext.parser.terminalrules.xtextTerminalsTestLanguage.Group)1 Keyword (org.eclipse.xtext.parser.terminalrules.xtextTerminalsTestLanguage.Keyword)1 NegatedToken (org.eclipse.xtext.parser.terminalrules.xtextTerminalsTestLanguage.NegatedToken)1 ReferencedMetamodel (org.eclipse.xtext.parser.terminalrules.xtextTerminalsTestLanguage.ReferencedMetamodel)1 RuleCall (org.eclipse.xtext.parser.terminalrules.xtextTerminalsTestLanguage.RuleCall)1 TerminalRule (org.eclipse.xtext.parser.terminalrules.xtextTerminalsTestLanguage.TerminalRule)1 TypeRef (org.eclipse.xtext.parser.terminalrules.xtextTerminalsTestLanguage.TypeRef)1 UntilToken (org.eclipse.xtext.parser.terminalrules.xtextTerminalsTestLanguage.UntilToken)1