Search in sources :

Example 1 with TrickyF

use of org.eclipse.xtext.parsetree.reconstr.complexrewritetest.TrickyF in project xtext-core by eclipse.

the class ComplexReconstrTestLanguageSemanticSequencer 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 == ComplexrewritetestPackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case ComplexrewritetestPackage.ADD:
                sequence_Op_Parens(context, (Add) semanticObject);
                return;
            case ComplexrewritetestPackage.ATOM:
                if (rule == grammarAccess.getAtomRule()) {
                    sequence_Atom(context, (Atom) semanticObject);
                    return;
                } else if (rule == grammarAccess.getRootRule() || rule == grammarAccess.getOpRule() || action == grammarAccess.getOpAccess().getAddAddOperandsAction_1_0_0() || action == grammarAccess.getOpAccess().getMinusMinusOperandsAction_1_1_0() || rule == grammarAccess.getTermRule() || rule == grammarAccess.getParensRule()) {
                    sequence_Atom_Parens(context, (Atom) semanticObject);
                    return;
                } else
                    break;
            case ComplexrewritetestPackage.C1:
                sequence_TrickyC(context, (C1) semanticObject);
                return;
            case ComplexrewritetestPackage.C2:
                sequence_TrickyC(context, (C2) semanticObject);
                return;
            case ComplexrewritetestPackage.C3:
                sequence_TrickyC(context, (C3) semanticObject);
                return;
            case ComplexrewritetestPackage.MINUS:
                sequence_Op_Parens(context, (Minus) semanticObject);
                return;
            case ComplexrewritetestPackage.TRICKY_B:
                sequence_TrickyB(context, (TrickyB) semanticObject);
                return;
            case ComplexrewritetestPackage.TRICKY_C:
                sequence_TrickyC(context, (TrickyC) semanticObject);
                return;
            case ComplexrewritetestPackage.TRICKY_D:
                sequence_TrickyD(context, (TrickyD) semanticObject);
                return;
            case ComplexrewritetestPackage.TRICKY_E:
                sequence_TrickyE(context, (TrickyE) semanticObject);
                return;
            case ComplexrewritetestPackage.TRICKY_F:
                sequence_TrickyF(context, (TrickyF) semanticObject);
                return;
            case ComplexrewritetestPackage.TRICKY_G:
                sequence_TrickyG(context, (TrickyG) semanticObject);
                return;
            case ComplexrewritetestPackage.TRICKY_G1:
                sequence_TrickyG1(context, (TrickyG1) semanticObject);
                return;
            case ComplexrewritetestPackage.TRICKY_G2:
                sequence_TrickyG2(context, (TrickyG2) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : Add(org.eclipse.xtext.parsetree.reconstr.complexrewritetest.Add) ParserRule(org.eclipse.xtext.ParserRule) Action(org.eclipse.xtext.Action) TrickyF(org.eclipse.xtext.parsetree.reconstr.complexrewritetest.TrickyF) TrickyG2(org.eclipse.xtext.parsetree.reconstr.complexrewritetest.TrickyG2) TrickyG(org.eclipse.xtext.parsetree.reconstr.complexrewritetest.TrickyG) TrickyG1(org.eclipse.xtext.parsetree.reconstr.complexrewritetest.TrickyG1) Atom(org.eclipse.xtext.parsetree.reconstr.complexrewritetest.Atom) C1(org.eclipse.xtext.parsetree.reconstr.complexrewritetest.C1) EPackage(org.eclipse.emf.ecore.EPackage) C2(org.eclipse.xtext.parsetree.reconstr.complexrewritetest.C2) C3(org.eclipse.xtext.parsetree.reconstr.complexrewritetest.C3) TrickyD(org.eclipse.xtext.parsetree.reconstr.complexrewritetest.TrickyD) TrickyE(org.eclipse.xtext.parsetree.reconstr.complexrewritetest.TrickyE) TrickyB(org.eclipse.xtext.parsetree.reconstr.complexrewritetest.TrickyB) TrickyC(org.eclipse.xtext.parsetree.reconstr.complexrewritetest.TrickyC) Parameter(org.eclipse.xtext.Parameter) Minus(org.eclipse.xtext.parsetree.reconstr.complexrewritetest.Minus)

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 Add (org.eclipse.xtext.parsetree.reconstr.complexrewritetest.Add)1 Atom (org.eclipse.xtext.parsetree.reconstr.complexrewritetest.Atom)1 C1 (org.eclipse.xtext.parsetree.reconstr.complexrewritetest.C1)1 C2 (org.eclipse.xtext.parsetree.reconstr.complexrewritetest.C2)1 C3 (org.eclipse.xtext.parsetree.reconstr.complexrewritetest.C3)1 Minus (org.eclipse.xtext.parsetree.reconstr.complexrewritetest.Minus)1 TrickyB (org.eclipse.xtext.parsetree.reconstr.complexrewritetest.TrickyB)1 TrickyC (org.eclipse.xtext.parsetree.reconstr.complexrewritetest.TrickyC)1 TrickyD (org.eclipse.xtext.parsetree.reconstr.complexrewritetest.TrickyD)1 TrickyE (org.eclipse.xtext.parsetree.reconstr.complexrewritetest.TrickyE)1 TrickyF (org.eclipse.xtext.parsetree.reconstr.complexrewritetest.TrickyF)1 TrickyG (org.eclipse.xtext.parsetree.reconstr.complexrewritetest.TrickyG)1 TrickyG1 (org.eclipse.xtext.parsetree.reconstr.complexrewritetest.TrickyG1)1 TrickyG2 (org.eclipse.xtext.parsetree.reconstr.complexrewritetest.TrickyG2)1