Search in sources :

Example 71 with SequenceFeeder

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

the class Bug419429SemanticSequencer method sequence_EReference.

/**
 * Contexts:
 *     EReference returns EReference
 *
 * Constraint:
 *     eType=[EClassifier|ID]
 */
protected void sequence_EReference(ISerializationContext context, EReference semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, EcorePackage.Literals.ETYPED_ELEMENT__ETYPE) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, EcorePackage.Literals.ETYPED_ELEMENT__ETYPE));
    }
    SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
    feeder.accept(grammarAccess.getEReferenceAccess().getETypeEClassifierIDTerminalRuleCall_0_1(), semanticObject.eGet(EcorePackage.Literals.ETYPED_ELEMENT__ETYPE, false));
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder)

Example 72 with SequenceFeeder

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

the class ParametersTestLanguageSemanticSequencer method sequence_Scenario4.

/**
 * Contexts:
 *     Scenario4<AllowKeyword> returns Scenario
 *     Scenario4 returns Scenario
 *
 * Constraint:
 *     second=IdOrKeyword
 */
protected void sequence_Scenario4(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.getScenario4Access().getSecondIdOrKeywordParserRuleCall_0_0(), semanticObject.getSecond());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder)

Example 73 with SequenceFeeder

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

the class ParametersTestLanguageSemanticSequencer method sequence_Scenario1$Param$false$.

/**
 * Contexts:
 *     Scenario1 returns Scenario
 *
 * Constraint:
 *     second=ID
 */
protected void sequence_Scenario1$Param$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.getScenario1Access().getSecondIDTerminalRuleCall_1_0_0(), semanticObject.getSecond());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder)

Example 74 with SequenceFeeder

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

the class TwoParametersTestLanguageSemanticSequencer method sequence_Scenario5.

/**
 * Contexts:
 *     Scenario5<A> returns Scenario
 *     Scenario5<B> returns Scenario
 *     Scenario5 returns Scenario
 *
 * Constraint:
 *     second=ID
 */
protected void sequence_Scenario5(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.getScenario5Access().getSecondIDTerminalRuleCall_1_0_0(), semanticObject.getSecond());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder)

Example 75 with SequenceFeeder

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

the class TwoParametersTestLanguageSemanticSequencer method sequence_Scenario8.

/**
 * Contexts:
 *     Scenario8<A,B> returns Scenario
 *     Scenario8<A> returns Scenario
 *     Scenario8<B> returns Scenario
 *     Scenario8 returns Scenario
 *
 * Constraint:
 *     second=IdOrKeyword2
 */
protected void sequence_Scenario8(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.getScenario8Access().getSecondIdOrKeyword2ParserRuleCall_0_0(), semanticObject.getSecond());
    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