Search in sources :

Example 31 with SequenceFeeder

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

the class XtextGrammarTestLanguageSemanticSequencer 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
 *     ParenthesizedCrossReferenceableElement returns RuleCall
 *     CrossReferenceableAlternatives returns RuleCall
 *     CrossReferenceableAlternatives.Alternatives_1_0 returns RuleCall
 *
 * Constraint:
 *     rule=[AbstractRule|ID]
 */
protected void sequence_RuleCall(ISerializationContext context, RuleCall semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, XtextGrammarTestPackage.Literals.RULE_CALL__RULE) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, XtextGrammarTestPackage.Literals.RULE_CALL__RULE));
    }
    SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
    feeder.accept(grammarAccess.getRuleCallAccess().getRuleAbstractRuleIDTerminalRuleCall_0_1(), semanticObject.eGet(XtextGrammarTestPackage.Literals.RULE_CALL__RULE, false));
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder)

Example 32 with SequenceFeeder

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

the class XtextGrammarTestLanguageSemanticSequencer 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, XtextGrammarTestPackage.Literals.ABSTRACT_NEGATED_TOKEN__TERMINAL) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, XtextGrammarTestPackage.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 33 with SequenceFeeder

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

the class XtextGrammarTestLanguageSemanticSequencer method sequence_UntilToken.

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

Example 34 with SequenceFeeder

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

the class Bug287988TestLanguageSemanticSequencer method sequence_CallMe2.

/**
 * Contexts:
 *     CallMe2 returns Attribute
 *
 * Constraint:
 *     name=ID
 */
protected void sequence_CallMe2(ISerializationContext context, Attribute semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, Bug287988TestPackage.Literals.BASE_ATTRIBUTE__NAME) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, Bug287988TestPackage.Literals.BASE_ATTRIBUTE__NAME));
    }
    SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
    feeder.accept(grammarAccess.getCallMe2Access().getNameIDTerminalRuleCall_0(), semanticObject.getName());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder)

Example 35 with SequenceFeeder

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

the class Bug287988TestLanguageSemanticSequencer method sequence_CallMe4.

/**
 * Contexts:
 *     CallMe3 returns Attribute
 *     CallMe4 returns Attribute
 *
 * Constraint:
 *     name=ID
 */
protected void sequence_CallMe4(ISerializationContext context, Attribute semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, Bug287988TestPackage.Literals.BASE_ATTRIBUTE__NAME) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, Bug287988TestPackage.Literals.BASE_ATTRIBUTE__NAME));
    }
    SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
    feeder.accept(grammarAccess.getCallMe4Access().getNameIDTerminalRuleCall_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