Search in sources :

Example 76 with SequenceFeeder

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

the class TwoParametersTestLanguageSemanticSequencer method sequence_Scenario6.

/**
 * Contexts:
 *     Scenario6<A,B> returns Scenario
 *     Scenario6<A> returns Scenario
 *     Scenario6<B> returns Scenario
 *     Scenario6 returns Scenario
 *
 * Constraint:
 *     first=IdOrKeyword2
 */
protected void sequence_Scenario6(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.getScenario6Access().getFirstIdOrKeyword2ParserRuleCall_0(), semanticObject.getFirst());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder)

Example 77 with SequenceFeeder

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

the class Bug289524ExTestLanguageSemanticSequencer method sequence_Contained.

/**
 * Contexts:
 *     Contained returns Contained
 *
 * Constraint:
 *     name=ID
 */
protected void sequence_Contained(ISerializationContext context, Contained semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, Bug289524ExTestPackage.Literals.CONTAINED__NAME) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, Bug289524ExTestPackage.Literals.CONTAINED__NAME));
    }
    SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
    feeder.accept(grammarAccess.getContainedAccess().getNameIDTerminalRuleCall_1_0(), semanticObject.getName());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder)

Example 78 with SequenceFeeder

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

the class Bug296889ExTestLanguageSemanticSequencer method sequence_Variable.

/**
 * Contexts:
 *     Expression returns Variable
 *     Postop returns Variable
 *     Postop.Postop_1_0 returns Variable
 *     Variable returns Variable
 *
 * Constraint:
 *     name=ID
 */
protected void sequence_Variable(ISerializationContext context, Variable semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, Bug296889ExTestPackage.Literals.VARIABLE__NAME) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, Bug296889ExTestPackage.Literals.VARIABLE__NAME));
    }
    SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
    feeder.accept(grammarAccess.getVariableAccess().getNameIDTerminalRuleCall_1_0(), semanticObject.getName());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder)

Example 79 with SequenceFeeder

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

the class Bug378967TestLanguageSemanticSequencer method sequence_Rule1.

/**
 * Contexts:
 *     Rule1 returns Rule1
 *
 * Constraint:
 *     (type=FirstEnum value=INT unit=SecondEnum)
 */
protected void sequence_Rule1(ISerializationContext context, Rule1 semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, Bug378967TestPackage.Literals.RULE1__TYPE) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, Bug378967TestPackage.Literals.RULE1__TYPE));
        if (transientValues.isValueTransient(semanticObject, Bug378967TestPackage.Literals.RULE1__VALUE) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, Bug378967TestPackage.Literals.RULE1__VALUE));
        if (transientValues.isValueTransient(semanticObject, Bug378967TestPackage.Literals.RULE1__UNIT) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, Bug378967TestPackage.Literals.RULE1__UNIT));
    }
    SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
    feeder.accept(grammarAccess.getRule1Access().getTypeFirstEnumEnumRuleCall_0_0(), semanticObject.getType());
    feeder.accept(grammarAccess.getRule1Access().getValueINTTerminalRuleCall_1_0(), semanticObject.getValue());
    feeder.accept(grammarAccess.getRule1Access().getUnitSecondEnumEnumRuleCall_2_0(), semanticObject.getUnit());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder)

Example 80 with SequenceFeeder

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

the class Bug378967TestLanguageSemanticSequencer method sequence_Rule4.

/**
 * Contexts:
 *     Rule4 returns Rule4
 *
 * Constraint:
 *     (after=AfterObj value=INT s=SObj)
 */
protected void sequence_Rule4(ISerializationContext context, Rule4 semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, Bug378967TestPackage.Literals.RULE4__AFTER) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, Bug378967TestPackage.Literals.RULE4__AFTER));
        if (transientValues.isValueTransient(semanticObject, Bug378967TestPackage.Literals.RULE4__VALUE) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, Bug378967TestPackage.Literals.RULE4__VALUE));
        if (transientValues.isValueTransient(semanticObject, Bug378967TestPackage.Literals.RULE4__S) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, Bug378967TestPackage.Literals.RULE4__S));
    }
    SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
    feeder.accept(grammarAccess.getRule4Access().getAfterAfterObjParserRuleCall_0_0(), semanticObject.getAfter());
    feeder.accept(grammarAccess.getRule4Access().getValueINTTerminalRuleCall_1_0(), semanticObject.getValue());
    feeder.accept(grammarAccess.getRule4Access().getSSObjParserRuleCall_2_0(), semanticObject.getS());
    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