Search in sources :

Example 81 with SequenceFeeder

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

the class Bug378967TestLanguageSemanticSequencer method sequence_SObj.

/**
 * Contexts:
 *     SObj returns SObj
 *
 * Constraint:
 *     value='s'
 */
protected void sequence_SObj(ISerializationContext context, SObj semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, Bug378967TestPackage.Literals.SOBJ__VALUE) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, Bug378967TestPackage.Literals.SOBJ__VALUE));
    }
    SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
    feeder.accept(grammarAccess.getSObjAccess().getValueSKeyword_0(), semanticObject.getValue());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder)

Example 82 with SequenceFeeder

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

the class Bug406914TestLanguageSemanticSequencer method sequence_Model.

/**
 * Contexts:
 *     Model returns Model
 *
 * Constraint:
 *     name=ID
 */
protected void sequence_Model(ISerializationContext context, Model semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, Bug406914TestPackage.Literals.MODEL__NAME) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, Bug406914TestPackage.Literals.MODEL__NAME));
    }
    SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
    feeder.accept(grammarAccess.getModelAccess().getNameIDTerminalRuleCall_0_0(), semanticObject.getName());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder)

Example 83 with SequenceFeeder

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

the class Bug443221TestLanguageSemanticSequencer method sequence_Model.

/**
 * Contexts:
 *     Model returns Model
 *
 * Constraint:
 *     name=ID
 */
protected void sequence_Model(ISerializationContext context, Model semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, Bug443221TestPackage.Literals.MODEL__NAME) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, Bug443221TestPackage.Literals.MODEL__NAME));
    }
    SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
    feeder.accept(grammarAccess.getModelAccess().getNameIDTerminalRuleCall_2_0(), semanticObject.getName());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder)

Example 84 with SequenceFeeder

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

the class EpatchTestLanguageSemanticSequencer method sequence_ObjectNew.

/**
 * Contexts:
 *     ObjectNew returns ObjectNew
 *
 * Constraint:
 *     (import=[Import|ID] impFrag=FRAGMENT)
 */
protected void sequence_ObjectNew(ISerializationContext context, ObjectNew semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, EpatchTestLanguagePackage.Literals.OBJECT_NEW__IMPORT) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, EpatchTestLanguagePackage.Literals.OBJECT_NEW__IMPORT));
        if (transientValues.isValueTransient(semanticObject, EpatchTestLanguagePackage.Literals.OBJECT_NEW__IMP_FRAG) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, EpatchTestLanguagePackage.Literals.OBJECT_NEW__IMP_FRAG));
    }
    SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
    feeder.accept(grammarAccess.getObjectNewAccess().getImportImportIDTerminalRuleCall_1_0_1(), semanticObject.eGet(EpatchTestLanguagePackage.Literals.OBJECT_NEW__IMPORT, false));
    feeder.accept(grammarAccess.getObjectNewAccess().getImpFragFRAGMENTTerminalRuleCall_2_0(), semanticObject.getImpFrag());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder)

Example 85 with SequenceFeeder

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

the class EpatchTestLanguageSemanticSequencer method sequence_ExpressionExecutable.

/**
 * Contexts:
 *     Executable returns ExpressionExecutable
 *     ExpressionExecutable returns ExpressionExecutable
 *
 * Constraint:
 *     exprstr=STRING
 */
protected void sequence_ExpressionExecutable(ISerializationContext context, ExpressionExecutable semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, EpatchTestLanguagePackage.Literals.EXPRESSION_EXECUTABLE__EXPRSTR) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, EpatchTestLanguagePackage.Literals.EXPRESSION_EXECUTABLE__EXPRSTR));
    }
    SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
    feeder.accept(grammarAccess.getExpressionExecutableAccess().getExprstrSTRINGTerminalRuleCall_0(), semanticObject.getExprstr());
    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