Search in sources :

Example 51 with SequenceFeeder

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

the class Bug311337TestLanguageSemanticSequencer method sequence_Reference.

/**
 * Contexts:
 *     Reference returns NestedRef
 *     Reference.NestedRef_2_1 returns NestedRef
 *
 * Constraint:
 *     (left=Reference_NestedRef_2_1 refChild=[Child|ID])
 */
protected void sequence_Reference(ISerializationContext context, NestedRef semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, Bug311337Package.Literals.NESTED_REF__LEFT) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, Bug311337Package.Literals.NESTED_REF__LEFT));
        if (transientValues.isValueTransient(semanticObject, Bug311337Package.Literals.REFERENCE__REF_CHILD) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, Bug311337Package.Literals.REFERENCE__REF_CHILD));
    }
    SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
    feeder.accept(grammarAccess.getReferenceAccess().getNestedRefLeftAction_2_1(), semanticObject.getLeft());
    feeder.accept(grammarAccess.getReferenceAccess().getRefChildChildIDTerminalRuleCall_2_2_0_1(), semanticObject.eGet(Bug311337Package.Literals.REFERENCE__REF_CHILD, false));
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder)

Example 52 with SequenceFeeder

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

the class Bug311337TestLanguageSemanticSequencer method sequence_Reference.

/**
 * Contexts:
 *     Reference returns Reference
 *     Reference.NestedRef_2_1 returns Reference
 *
 * Constraint:
 *     refChild=[Child|ID]
 */
protected void sequence_Reference(ISerializationContext context, Reference semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, Bug311337Package.Literals.REFERENCE__REF_CHILD) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, Bug311337Package.Literals.REFERENCE__REF_CHILD));
    }
    SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
    feeder.accept(grammarAccess.getReferenceAccess().getRefChildChildIDTerminalRuleCall_1_0_1(), semanticObject.eGet(Bug311337Package.Literals.REFERENCE__REF_CHILD, false));
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder)

Example 53 with SequenceFeeder

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

the class SubTestLanguageSemanticSequencer method sequence_AnotherSuperMain.

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

Example 54 with SequenceFeeder

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

the class AbstractAbstractTestLanguageSemanticSequencer method sequence_InheritedParserRule.

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

Example 55 with SequenceFeeder

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

the class AbstractAbstractTestLanguageSemanticSequencer method sequence_OverridableParserRule.

/**
 * Contexts:
 *     OverridableParserRule returns AType
 *
 * Constraint:
 *     name=ID
 */
protected void sequence_OverridableParserRule(ISerializationContext context, AType semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, AmetamodelPackage.Literals.ATYPE__NAME) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, AmetamodelPackage.Literals.ATYPE__NAME));
    }
    SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
    feeder.accept(grammarAccess.getOverridableParserRuleAccess().getNameIDTerminalRuleCall_1_0(), semanticObject.getName());
    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