Search in sources :

Example 91 with SequenceFeeder

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

the class HiddenTerminalsTestLanguageSemanticSequencer method sequence_DatatypeHiddens.

/**
 * Contexts:
 *     Model returns DatatypeHiddens
 *     DatatypeHiddens returns DatatypeHiddens
 *
 * Constraint:
 *     valid?=DatatypeRule
 */
protected void sequence_DatatypeHiddens(ISerializationContext context, DatatypeHiddens semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, HiddenTerminalsTestLanguagePackage.Literals.MODEL__VALID) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, HiddenTerminalsTestLanguagePackage.Literals.MODEL__VALID));
    }
    SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
    feeder.accept(grammarAccess.getDatatypeHiddensAccess().getValidDatatypeRuleParserRuleCall_1_0(), semanticObject.isValid());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder)

Example 92 with SequenceFeeder

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

the class HiddenTerminalsTestLanguageSemanticSequencer method sequence_HidingHiddens.

/**
 * Contexts:
 *     HidingHiddens returns HidingHiddens
 *
 * Constraint:
 *     (space=WS called=InheritingHiddensCall)
 */
protected void sequence_HidingHiddens(ISerializationContext context, HidingHiddens semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, HiddenTerminalsTestLanguagePackage.Literals.HIDING_HIDDENS__SPACE) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, HiddenTerminalsTestLanguagePackage.Literals.HIDING_HIDDENS__SPACE));
        if (transientValues.isValueTransient(semanticObject, HiddenTerminalsTestLanguagePackage.Literals.HIDING_HIDDENS__CALLED) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, HiddenTerminalsTestLanguagePackage.Literals.HIDING_HIDDENS__CALLED));
    }
    SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
    feeder.accept(grammarAccess.getHidingHiddensAccess().getSpaceWSTerminalRuleCall_1_0(), semanticObject.getSpace());
    feeder.accept(grammarAccess.getHidingHiddensAccess().getCalledInheritingHiddensCallParserRuleCall_2_0(), semanticObject.getCalled());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder)

Example 93 with SequenceFeeder

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

the class HiddenTerminalsTestLanguageSemanticSequencer method sequence_InheritingHiddensCall.

/**
 * Contexts:
 *     InheritingHiddensCall returns InheritingHiddensCall
 *
 * Constraint:
 *     valid?=';'
 */
protected void sequence_InheritingHiddensCall(ISerializationContext context, InheritingHiddensCall semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, HiddenTerminalsTestLanguagePackage.Literals.INHERITING_HIDDENS_CALL__VALID) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, HiddenTerminalsTestLanguagePackage.Literals.INHERITING_HIDDENS_CALL__VALID));
    }
    SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
    feeder.accept(grammarAccess.getInheritingHiddensCallAccess().getValidSemicolonKeyword_1_0(), semanticObject.isValid());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder)

Example 94 with SequenceFeeder

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

the class UnicodeTestLanguageSemanticSequencer method sequence_QuotedString.

/**
 * Contexts:
 *     AbstractString returns QuotedString
 *     QuotedString returns QuotedString
 *
 * Constraint:
 *     name=STRING
 */
protected void sequence_QuotedString(ISerializationContext context, QuotedString semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, UnicodePackage.Literals.ABSTRACT_STRING__NAME) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, UnicodePackage.Literals.ABSTRACT_STRING__NAME));
    }
    SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
    feeder.accept(grammarAccess.getQuotedStringAccess().getNameSTRINGTerminalRuleCall_0(), semanticObject.getName());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder)

Example 95 with SequenceFeeder

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

the class XtextTerminalsTestLanguageSemanticSequencer method sequence_CharacterRange.

/**
 * Contexts:
 *     CharacterRange returns CharacterRange
 *
 * Constraint:
 *     (left=CharacterRange_CharacterRange_1_0 right=Keyword)
 */
protected void sequence_CharacterRange(ISerializationContext context, CharacterRange semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, XtextTerminalsTestLanguagePackage.Literals.CHARACTER_RANGE__LEFT) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, XtextTerminalsTestLanguagePackage.Literals.CHARACTER_RANGE__LEFT));
        if (transientValues.isValueTransient(semanticObject, XtextTerminalsTestLanguagePackage.Literals.CHARACTER_RANGE__RIGHT) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, XtextTerminalsTestLanguagePackage.Literals.CHARACTER_RANGE__RIGHT));
    }
    SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
    feeder.accept(grammarAccess.getCharacterRangeAccess().getCharacterRangeLeftAction_1_0(), semanticObject.getLeft());
    feeder.accept(grammarAccess.getCharacterRangeAccess().getRightKeywordParserRuleCall_1_2_0(), semanticObject.getRight());
    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