Search in sources :

Example 31 with INodesForEObjectProvider

use of org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider.INodesForEObjectProvider in project mechanoid by robotoworks.

the class NetModelSemanticSequencer method sequence_UserType.

/**
	 * Constraint:
	 *     declaration=[UserTypeDeclaration|ID]
	 */
protected void sequence_UserType(EObject context, UserType semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, NetModelPackage.Literals.USER_TYPE__DECLARATION) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, NetModelPackage.Literals.USER_TYPE__DECLARATION));
    }
    INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
    SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
    feeder.accept(grammarAccess.getUserTypeAccess().getDeclarationUserTypeDeclarationIDTerminalRuleCall_0_1(), semanticObject.getDeclaration());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder) INodesForEObjectProvider(org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider.INodesForEObjectProvider)

Example 32 with INodesForEObjectProvider

use of org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider.INodesForEObjectProvider in project mechanoid by robotoworks.

the class NetModelSemanticSequencer method sequence_Literal.

/**
	 * Constraint:
	 *     literal=BooleanValue
	 */
protected void sequence_Literal(EObject context, BooleanLiteral semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, NetModelPackage.Literals.BOOLEAN_LITERAL__LITERAL) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, NetModelPackage.Literals.BOOLEAN_LITERAL__LITERAL));
    }
    INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
    SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
    feeder.accept(grammarAccess.getLiteralAccess().getLiteralBooleanValueEnumRuleCall_0_1_0(), semanticObject.getLiteral());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder) INodesForEObjectProvider(org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider.INodesForEObjectProvider)

Example 33 with INodesForEObjectProvider

use of org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider.INodesForEObjectProvider in project mechanoid by robotoworks.

the class NetModelSemanticSequencer method sequence_Literal.

/**
	 * Constraint:
	 *     literal=SignedNumber
	 */
protected void sequence_Literal(EObject context, NumericLiteral semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, NetModelPackage.Literals.NUMERIC_LITERAL__LITERAL) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, NetModelPackage.Literals.NUMERIC_LITERAL__LITERAL));
    }
    INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
    SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
    feeder.accept(grammarAccess.getLiteralAccess().getLiteralSignedNumberParserRuleCall_2_1_0(), semanticObject.getLiteral());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder) INodesForEObjectProvider(org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider.INodesForEObjectProvider)

Example 34 with INodesForEObjectProvider

use of org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider.INodesForEObjectProvider in project mechanoid by robotoworks.

the class NetModelSemanticSequencer method sequence_BooleanType.

/**
	 * Constraint:
	 *     id='boolean'
	 */
protected void sequence_BooleanType(EObject context, BooleanType semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, NetModelPackage.Literals.INTRINSIC_TYPE__ID) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, NetModelPackage.Literals.INTRINSIC_TYPE__ID));
    }
    INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
    SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
    feeder.accept(grammarAccess.getBooleanTypeAccess().getIdBooleanKeyword_0(), semanticObject.getId());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder) INodesForEObjectProvider(org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider.INodesForEObjectProvider)

Example 35 with INodesForEObjectProvider

use of org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider.INodesForEObjectProvider in project mechanoid by robotoworks.

the class NetModelSemanticSequencer method sequence_Header.

/**
	 * Constraint:
	 *     (name=STRING value=STRING)
	 */
protected void sequence_Header(EObject context, Header semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, NetModelPackage.Literals.HEADER__NAME) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, NetModelPackage.Literals.HEADER__NAME));
        if (transientValues.isValueTransient(semanticObject, NetModelPackage.Literals.HEADER__VALUE) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, NetModelPackage.Literals.HEADER__VALUE));
    }
    INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
    SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
    feeder.accept(grammarAccess.getHeaderAccess().getNameSTRINGTerminalRuleCall_0_0(), semanticObject.getName());
    feeder.accept(grammarAccess.getHeaderAccess().getValueSTRINGTerminalRuleCall_2_0(), semanticObject.getValue());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder) INodesForEObjectProvider(org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider.INodesForEObjectProvider)

Aggregations

INodesForEObjectProvider (org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider.INodesForEObjectProvider)65 SequenceFeeder (org.eclipse.xtext.serializer.acceptor.SequenceFeeder)64 List (java.util.List)2 AbstractElement (org.eclipse.xtext.AbstractElement)2 IConstraint (org.eclipse.xtext.serializer.analysis.IGrammarConstraintProvider.IConstraint)2 EObject (org.eclipse.emf.ecore.EObject)1 InternalEList (org.eclipse.emf.ecore.util.InternalEList)1 INode (org.eclipse.xtext.nodemodel.INode)1 ISemState (org.eclipse.xtext.serializer.analysis.ISemanticSequencerNfaProvider.ISemState)1 NfaUtil (org.eclipse.xtext.util.formallang.NfaUtil)1