Search in sources :

Example 96 with SequenceFeeder

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

the class XtextTerminalsTestLanguageSemanticSequencer method sequence_RuleCall.

/**
 * Contexts:
 *     RuleCall returns RuleCall
 *     AssignableTerminal returns RuleCall
 *     ParenthesizedAssignableElement returns RuleCall
 *     AssignableAlternatives returns RuleCall
 *     AssignableAlternatives.Alternatives_1_0 returns RuleCall
 *     CrossReferenceableTerminal returns RuleCall
 *
 * Constraint:
 *     rule=[AbstractRule|ID]
 */
protected void sequence_RuleCall(ISerializationContext context, RuleCall semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, XtextTerminalsTestLanguagePackage.Literals.RULE_CALL__RULE) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, XtextTerminalsTestLanguagePackage.Literals.RULE_CALL__RULE));
    }
    SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
    feeder.accept(grammarAccess.getRuleCallAccess().getRuleAbstractRuleIDTerminalRuleCall_0_1(), semanticObject.eGet(XtextTerminalsTestLanguagePackage.Literals.RULE_CALL__RULE, false));
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder)

Example 97 with SequenceFeeder

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

the class XtextTerminalsTestLanguageSemanticSequencer method sequence_NegatedToken.

/**
 * Contexts:
 *     AbstractNegatedToken returns NegatedToken
 *     NegatedToken returns NegatedToken
 *
 * Constraint:
 *     terminal=TerminalTokenElement
 */
protected void sequence_NegatedToken(ISerializationContext context, NegatedToken semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, XtextTerminalsTestLanguagePackage.Literals.ABSTRACT_NEGATED_TOKEN__TERMINAL) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, XtextTerminalsTestLanguagePackage.Literals.ABSTRACT_NEGATED_TOKEN__TERMINAL));
    }
    SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
    feeder.accept(grammarAccess.getNegatedTokenAccess().getTerminalTerminalTokenElementParserRuleCall_1_0(), semanticObject.getTerminal());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder)

Example 98 with SequenceFeeder

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

the class FormatterTestLanguageSemanticSequencer method sequence_Space.

/**
 * Contexts:
 *     Line returns Space
 *     Space returns Space
 *
 * Constraint:
 *     val=ID
 */
protected void sequence_Space(ISerializationContext context, Space semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, FormattertestlanguagePackage.Literals.SPACE__VAL) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, FormattertestlanguagePackage.Literals.SPACE__VAL));
    }
    SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
    feeder.accept(grammarAccess.getSpaceAccess().getValIDTerminalRuleCall_1_0(), semanticObject.getVal());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder)

Example 99 with SequenceFeeder

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

the class FormatterTestLanguageSemanticSequencer method sequence_FqnObj.

/**
 * Contexts:
 *     Line returns FqnObj
 *     FqnObj returns FqnObj
 *
 * Constraint:
 *     name=FQN
 */
protected void sequence_FqnObj(ISerializationContext context, FqnObj semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, FormattertestlanguagePackage.Literals.FQN_OBJ__NAME) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, FormattertestlanguagePackage.Literals.FQN_OBJ__NAME));
    }
    SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
    feeder.accept(grammarAccess.getFqnObjAccess().getNameFQNParserRuleCall_1_0(), semanticObject.getName());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder)

Example 100 with SequenceFeeder

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

the class FormatterTestLanguageSemanticSequencer method sequence_WrappingDataTypeTest.

/**
 * Contexts:
 *     Root returns WrappingDataTypeTest
 *     WrappingDataTypeTest returns WrappingDataTypeTest
 *
 * Constraint:
 *     datatype=WrappingDataType
 */
protected void sequence_WrappingDataTypeTest(ISerializationContext context, WrappingDataTypeTest semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, FormattertestlanguagePackage.Literals.WRAPPING_DATA_TYPE_TEST__DATATYPE) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, FormattertestlanguagePackage.Literals.WRAPPING_DATA_TYPE_TEST__DATATYPE));
    }
    SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
    feeder.accept(grammarAccess.getWrappingDataTypeTestAccess().getDatatypeWrappingDataTypeParserRuleCall_1_0(), semanticObject.getDatatype());
    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