Search in sources :

Example 6 with INodesForEObjectProvider

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

the class NetModelSemanticSequencer method sequence_BodyBlock.

/**
	 * Constraint:
	 *     type=BlockType
	 */
protected void sequence_BodyBlock(EObject context, BodyBlock semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, NetModelPackage.Literals.BODY_BLOCK__TYPE) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, NetModelPackage.Literals.BODY_BLOCK__TYPE));
    }
    INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
    SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
    feeder.accept(grammarAccess.getBodyBlockAccess().getTypeBlockTypeParserRuleCall_1_0(), semanticObject.getType());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder) INodesForEObjectProvider(org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider.INodesForEObjectProvider)

Example 7 with INodesForEObjectProvider

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

the class NetModelSemanticSequencer method sequence_Literal.

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

Example 8 with INodesForEObjectProvider

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

the class NetModelSemanticSequencer method sequence_StringType.

/**
	 * Constraint:
	 *     id='String'
	 */
protected void sequence_StringType(EObject context, StringType 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.getStringTypeAccess().getIdStringKeyword_0(), semanticObject.getId());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder) INodesForEObjectProvider(org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider.INodesForEObjectProvider)

Example 9 with INodesForEObjectProvider

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

the class NetModelSemanticSequencer method sequence_IntegerType.

/**
	 * Constraint:
	 *     id='int'
	 */
protected void sequence_IntegerType(EObject context, IntegerType 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.getIntegerTypeAccess().getIdIntKeyword_0(), semanticObject.getId());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder) INodesForEObjectProvider(org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider.INodesForEObjectProvider)

Example 10 with INodesForEObjectProvider

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

the class SqliteModelSemanticSequencer method sequence_Model.

/**
	 * Constraint:
	 *     (packageName=QualifiedName database=DatabaseBlock)
	 */
protected void sequence_Model(EObject context, Model semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, SqliteModelPackage.Literals.MODEL__PACKAGE_NAME) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SqliteModelPackage.Literals.MODEL__PACKAGE_NAME));
        if (transientValues.isValueTransient(semanticObject, SqliteModelPackage.Literals.MODEL__DATABASE) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SqliteModelPackage.Literals.MODEL__DATABASE));
    }
    INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
    SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
    feeder.accept(grammarAccess.getModelAccess().getPackageNameQualifiedNameParserRuleCall_1_0(), semanticObject.getPackageName());
    feeder.accept(grammarAccess.getModelAccess().getDatabaseDatabaseBlockParserRuleCall_2_0(), semanticObject.getDatabase());
    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