Search in sources :

Example 41 with SequenceFeeder

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

the class MultiRuleEnumTestLanguageSemanticSequencer method sequence_Model.

/**
 * Contexts:
 *     Model returns Model
 *
 * Constraint:
 *     (a=EnumRuleA b=EnumRuleB c=EnumRuleC)
 */
protected void sequence_Model(ISerializationContext context, Model semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, MultiRuleenumsPackage.Literals.MODEL__A) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MultiRuleenumsPackage.Literals.MODEL__A));
        if (transientValues.isValueTransient(semanticObject, MultiRuleenumsPackage.Literals.MODEL__B) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MultiRuleenumsPackage.Literals.MODEL__B));
        if (transientValues.isValueTransient(semanticObject, MultiRuleenumsPackage.Literals.MODEL__C) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MultiRuleenumsPackage.Literals.MODEL__C));
    }
    SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
    feeder.accept(grammarAccess.getModelAccess().getAEnumRuleAEnumRuleCall_1_0(), semanticObject.getA());
    feeder.accept(grammarAccess.getModelAccess().getBEnumRuleBEnumRuleCall_2_0(), semanticObject.getB());
    feeder.accept(grammarAccess.getModelAccess().getCEnumRuleCEnumRuleCall_3_0(), semanticObject.getC());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder)

Example 42 with SequenceFeeder

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

the class RegionAccessTestLanguageSemanticSequencer method sequence_Expression.

/**
 * Contexts:
 *     Root returns Add
 *     Expression returns Add
 *     Expression.Add_1_0 returns Add
 *     Primary returns Add
 *     Parenthesized returns Add
 *
 * Constraint:
 *     (left=Expression_Add_1_0 right=Primary)
 */
protected void sequence_Expression(ISerializationContext context, Add semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, RegionaccesstestlanguagePackage.Literals.ADD__LEFT) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, RegionaccesstestlanguagePackage.Literals.ADD__LEFT));
        if (transientValues.isValueTransient(semanticObject, RegionaccesstestlanguagePackage.Literals.ADD__RIGHT) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, RegionaccesstestlanguagePackage.Literals.ADD__RIGHT));
    }
    SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
    feeder.accept(grammarAccess.getExpressionAccess().getAddLeftAction_1_0(), semanticObject.getLeft());
    feeder.accept(grammarAccess.getExpressionAccess().getRightPrimaryParserRuleCall_1_2_0(), semanticObject.getRight());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder)

Example 43 with SequenceFeeder

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

the class RegionAccessTestLanguageSemanticSequencer method sequence_Delegate.

/**
 * Contexts:
 *     Root returns Delegate
 *     Unassigned returns Delegate
 *     PrefixedDelegate returns Delegate
 *     Delegate returns Delegate
 *
 * Constraint:
 *     name=ID
 */
protected void sequence_Delegate(ISerializationContext context, Delegate semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, RegionaccesstestlanguagePackage.Literals.DELEGATE__NAME) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, RegionaccesstestlanguagePackage.Literals.DELEGATE__NAME));
    }
    SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
    feeder.accept(grammarAccess.getDelegateAccess().getNameIDTerminalRuleCall_0(), semanticObject.getName());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder)

Example 44 with SequenceFeeder

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

the class RegionAccessTestLanguageSemanticSequencer method sequence_Delegation.

/**
 * Contexts:
 *     Root returns Delegation
 *     Delegation returns Delegation
 *
 * Constraint:
 *     delegate=Delegate
 */
protected void sequence_Delegation(ISerializationContext context, Delegation semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, RegionaccesstestlanguagePackage.Literals.DELEGATION__DELEGATE) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, RegionaccesstestlanguagePackage.Literals.DELEGATION__DELEGATE));
    }
    SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
    feeder.accept(grammarAccess.getDelegationAccess().getDelegateDelegateParserRuleCall_1_0(), semanticObject.getDelegate());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder)

Example 45 with SequenceFeeder

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

the class RegionAccessTestLanguageSemanticSequencer method sequence_PrefixedUnassigned.

/**
 * Contexts:
 *     Root returns PrefixedUnassigned
 *     PrefixedUnassigned returns PrefixedUnassigned
 *
 * Constraint:
 *     delegate=PrefixedDelegate
 */
protected void sequence_PrefixedUnassigned(ISerializationContext context, PrefixedUnassigned semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, RegionaccesstestlanguagePackage.Literals.PREFIXED_UNASSIGNED__DELEGATE) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, RegionaccesstestlanguagePackage.Literals.PREFIXED_UNASSIGNED__DELEGATE));
    }
    SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
    feeder.accept(grammarAccess.getPrefixedUnassignedAccess().getDelegatePrefixedDelegateParserRuleCall_1_0(), semanticObject.getDelegate());
    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