Search in sources :

Example 61 with SequenceFeeder

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

the class EcoreReferenceTestLanguageSemanticSequencer method sequence_Unused_01.

/**
 * Contexts:
 *     Unused_01 returns MyNamedElement_01
 *
 * Constraint:
 *     name=ValidID
 */
protected void sequence_Unused_01(ISerializationContext context, MyNamedElement_01 semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, EcorePerNsURIPackage.Literals.EXTENDS_NS_URIE_OBJECT__NAME) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, EcorePerNsURIPackage.Literals.EXTENDS_NS_URIE_OBJECT__NAME));
    }
    SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
    feeder.accept(grammarAccess.getUnused_01Access().getNameValidIDParserRuleCall_1_0(), semanticObject.getName());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder)

Example 62 with SequenceFeeder

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

the class EcoreReferenceTestLanguageSemanticSequencer method sequence_Unused_02.

/**
 * Contexts:
 *     Unused_02 returns MyNamedElement_02
 *
 * Constraint:
 *     name=ValidID
 */
protected void sequence_Unused_02(ISerializationContext context, MyNamedElement_02 semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, EcorePerPlatformResourcePackage.Literals.EXTENDS_RESOURCE_EOBJECT__NAME) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, EcorePerPlatformResourcePackage.Literals.EXTENDS_RESOURCE_EOBJECT__NAME));
    }
    SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
    feeder.accept(grammarAccess.getUnused_02Access().getNameValidIDParserRuleCall_1_0(), semanticObject.getName());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder)

Example 63 with SequenceFeeder

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

the class NoParametersTestLanguageSemanticSequencer method sequence_Scenario1_True.

/**
 * Contexts:
 *     Scenario1_True returns Scenario
 *
 * Constraint:
 *     first=ID
 */
protected void sequence_Scenario1_True(ISerializationContext context, Scenario semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, ParametersTestLanguagePackage.Literals.SCENARIO__FIRST) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, ParametersTestLanguagePackage.Literals.SCENARIO__FIRST));
    }
    SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
    feeder.accept(grammarAccess.getScenario1_TrueAccess().getFirstIDTerminalRuleCall_0(), semanticObject.getFirst());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder)

Example 64 with SequenceFeeder

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

the class NoParametersTestLanguageSemanticSequencer method sequence_Scenario2_True.

/**
 * Contexts:
 *     Scenario2_True returns Scenario
 *
 * Constraint:
 *     first=IdOrKeyword_True
 */
protected void sequence_Scenario2_True(ISerializationContext context, Scenario semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, ParametersTestLanguagePackage.Literals.SCENARIO__FIRST) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, ParametersTestLanguagePackage.Literals.SCENARIO__FIRST));
    }
    SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
    feeder.accept(grammarAccess.getScenario2_TrueAccess().getFirstIdOrKeyword_TrueParserRuleCall_0(), semanticObject.getFirst());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder)

Example 65 with SequenceFeeder

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

the class NoParametersTestLanguageSemanticSequencer method sequence_Scenario2_False.

/**
 * Contexts:
 *     Scenario2_False returns Scenario
 *
 * Constraint:
 *     first=IdOrKeyword_False
 */
protected void sequence_Scenario2_False(ISerializationContext context, Scenario semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, ParametersTestLanguagePackage.Literals.SCENARIO__FIRST) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, ParametersTestLanguagePackage.Literals.SCENARIO__FIRST));
    }
    SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
    feeder.accept(grammarAccess.getScenario2_FalseAccess().getFirstIdOrKeyword_FalseParserRuleCall_0(), semanticObject.getFirst());
    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