Search in sources :

Example 6 with BooleanLiteral

use of edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.BooleanLiteral in project AGREE by loonwerks.

the class InputConstraintSemanticSequencer 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 == InputConstraintPackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case InputConstraintPackage.BINARY_EXPRESSION:
                sequence_AddSub_MultDiv(context, (BinaryExpression) semanticObject);
                return;
            case InputConstraintPackage.BOOLEAN_LITERAL:
                sequence_BooleanLiteral(context, (BooleanLiteral) semanticObject);
                return;
            case InputConstraintPackage.CONST_REF_EXPRESSION:
                sequence_ConstRef(context, (ConstRefExpression) semanticObject);
                return;
            case InputConstraintPackage.ELEMENT_REF_EXPRESSION:
                sequence_ElementRef(context, (ElementRefExpression) semanticObject);
                return;
            case InputConstraintPackage.INTEGER_LITERAL:
                sequence_IntegerLiteral(context, (IntegerLiteral) semanticObject);
                return;
            case InputConstraintPackage.INTERVAL_EXPRESSION:
                sequence_Interval(context, (IntervalExpression) semanticObject);
                return;
            case InputConstraintPackage.NEGATIVE_EXPRESSION:
                sequence_Negative(context, (NegativeExpression) semanticObject);
                return;
            case InputConstraintPackage.PRE_EXPRESSION:
                sequence_Pre(context, (PreExpression) semanticObject);
                return;
            case InputConstraintPackage.RANDOM_ELEMENT_EXPRESSION:
                sequence_RandomElement(context, (RandomElementExpression) semanticObject);
                return;
            case InputConstraintPackage.RANDOM_INTEGER_EXPRESSION:
                sequence_RandomInteger(context, (RandomIntegerExpression) semanticObject);
                return;
            case InputConstraintPackage.RANDOM_REAL_EXPRESSION:
                sequence_RandomReal(context, (RandomRealExpression) semanticObject);
                return;
            case InputConstraintPackage.REAL_LITERAL:
                sequence_RealLiteral(context, (RealLiteral) semanticObject);
                return;
            case InputConstraintPackage.SET_EXPRESSION:
                sequence_Set(context, (SetExpression) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : ParserRule(org.eclipse.xtext.ParserRule) Action(org.eclipse.xtext.Action) ConstRefExpression(edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.ConstRefExpression) SetExpression(edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.SetExpression) BooleanLiteral(edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.BooleanLiteral) RandomIntegerExpression(edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.RandomIntegerExpression) PreExpression(edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.PreExpression) EPackage(org.eclipse.emf.ecore.EPackage) RealLiteral(edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.RealLiteral) BinaryExpression(edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.BinaryExpression) RandomElementExpression(edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.RandomElementExpression) RandomRealExpression(edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.RandomRealExpression) Parameter(org.eclipse.xtext.Parameter) IntervalExpression(edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.IntervalExpression) IntegerLiteral(edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.IntegerLiteral) ElementRefExpression(edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.ElementRefExpression) NegativeExpression(edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.NegativeExpression)

Aggregations

BooleanLiteral (edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.BooleanLiteral)6 BinaryExpression (edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.BinaryExpression)4 IntegerLiteral (edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.IntegerLiteral)4 NegativeExpression (edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.NegativeExpression)3 ConstRefExpression (edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.ConstRefExpression)2 ElementRefExpression (edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.ElementRefExpression)2 IntervalExpression (edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.IntervalExpression)2 PreExpression (edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.PreExpression)2 RandomElementExpression (edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.RandomElementExpression)2 RandomIntegerExpression (edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.RandomIntegerExpression)2 RandomRealExpression (edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.RandomRealExpression)2 RealLiteral (edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.RealLiteral)2 SetExpression (edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.SetExpression)2 MenuItem (org.eclipse.swt.widgets.MenuItem)2 NotificationHandler (edu.uah.rsesc.aadlsimulator.NotificationHandler)1 Rational (edu.uah.rsesc.aadlsimulator.Rational)1 SimulationEngine (edu.uah.rsesc.aadlsimulator.SimulationEngine)1 SimulationEngineNotification (edu.uah.rsesc.aadlsimulator.SimulationEngineNotification)1 SimulationEngineState (edu.uah.rsesc.aadlsimulator.SimulationEngineState)1 ChartElement (edu.uah.rsesc.aadlsimulator.ui.dialogs.ChartHelper.ChartElement)1