Search in sources :

Example 66 with SequenceFeeder

use of org.eclipse.xtext.serializer.acceptor.SequenceFeeder in project xtext-core by eclipse.

the class NoParametersTestLanguageSemanticSequencer method sequence_Scenario1_False.

/**
 * Contexts:
 *     Scenario1_False returns Scenario
 *
 * Constraint:
 *     second=ID
 */
protected void sequence_Scenario1_False(ISerializationContext context, Scenario semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, ParametersTestLanguagePackage.Literals.SCENARIO__SECOND) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, ParametersTestLanguagePackage.Literals.SCENARIO__SECOND));
    }
    SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
    feeder.accept(grammarAccess.getScenario1_FalseAccess().getSecondIDTerminalRuleCall_0(), semanticObject.getSecond());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder)

Example 67 with SequenceFeeder

use of org.eclipse.xtext.serializer.acceptor.SequenceFeeder in project xtext-core by eclipse.

the class NoParametersTestLanguageSemanticSequencer method sequence_Scenario4_True.

/**
 * Contexts:
 *     Scenario4_True returns Scenario
 *
 * Constraint:
 *     second=IdOrKeyword_True
 */
protected void sequence_Scenario4_True(ISerializationContext context, Scenario semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, ParametersTestLanguagePackage.Literals.SCENARIO__SECOND) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, ParametersTestLanguagePackage.Literals.SCENARIO__SECOND));
    }
    SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
    feeder.accept(grammarAccess.getScenario4_TrueAccess().getSecondIdOrKeyword_TrueParserRuleCall_0_0(), semanticObject.getSecond());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder)

Example 68 with SequenceFeeder

use of org.eclipse.xtext.serializer.acceptor.SequenceFeeder in project xtext-core by eclipse.

the class Bug288432TestLanguageSemanticSequencer method sequence_ParameterRef.

/**
 * Contexts:
 *     ParameterObject returns ParameterRef
 *     ParameterRef returns ParameterRef
 *
 * Constraint:
 *     parameter=[Parameter|ID]
 */
protected void sequence_ParameterRef(ISerializationContext context, ParameterRef semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, Bug288432TestPackage.Literals.PARAMETER_REF__PARAMETER) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, Bug288432TestPackage.Literals.PARAMETER_REF__PARAMETER));
    }
    SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
    feeder.accept(grammarAccess.getParameterRefAccess().getParameterParameterIDTerminalRuleCall_0_1(), semanticObject.eGet(Bug288432TestPackage.Literals.PARAMETER_REF__PARAMETER, false));
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder)

Example 69 with SequenceFeeder

use of org.eclipse.xtext.serializer.acceptor.SequenceFeeder in project xtext-core by eclipse.

the class Bug288432TestLanguageSemanticSequencer method sequence_MyInt.

/**
 * Contexts:
 *     ParameterObject returns MyInt
 *     MyInt returns MyInt
 *
 * Constraint:
 *     int=INT
 */
protected void sequence_MyInt(ISerializationContext context, MyInt semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, Bug288432TestPackage.Literals.MY_INT__INT) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, Bug288432TestPackage.Literals.MY_INT__INT));
    }
    SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
    feeder.accept(grammarAccess.getMyIntAccess().getIntINTTerminalRuleCall_0(), semanticObject.getInt());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder)

Example 70 with SequenceFeeder

use of org.eclipse.xtext.serializer.acceptor.SequenceFeeder in project xtext-core by eclipse.

the class Bug288432TestLanguageSemanticSequencer method sequence_Foo.

/**
 * Contexts:
 *     Foo returns Foo
 *
 * Constraint:
 *     fooValue=STRING
 */
protected void sequence_Foo(ISerializationContext context, Foo semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, Bug288432TestPackage.Literals.FOO__FOO_VALUE) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, Bug288432TestPackage.Literals.FOO__FOO_VALUE));
    }
    SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
    feeder.accept(grammarAccess.getFooAccess().getFooValueSTRINGTerminalRuleCall_0(), semanticObject.getFooValue());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder)

Aggregations

SequenceFeeder (org.eclipse.xtext.serializer.acceptor.SequenceFeeder)350 INodesForEObjectProvider (org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider.INodesForEObjectProvider)64 List (java.util.List)1 InternalEList (org.eclipse.emf.ecore.util.InternalEList)1 AbstractElement (org.eclipse.xtext.AbstractElement)1 IConstraint (org.eclipse.xtext.serializer.analysis.IGrammarConstraintProvider.IConstraint)1 ISemState (org.eclipse.xtext.serializer.analysis.ISemanticSequencerNfaProvider.ISemState)1 NfaUtil (org.eclipse.xtext.util.formallang.NfaUtil)1