Commit ddb92399 authored by Philip Makedonski's avatar Philip Makedonski
Browse files

+ added support for latest additions to the meta-model

parent 30f0b912
Loading
Loading
Loading
Loading
+68 −13
Original line number Diff line number Diff line
@@ -106,7 +106,7 @@ AtomicBehaviour returns tdl::AtomicBehaviour:
    | ActionBehaviour 
    | Assignment) 
    WithAtomicBehaviour
    ';'?
    ';'
;

TimeOperation returns tdl::TimeOperation: 
@@ -173,11 +173,6 @@ CollectionReference returns tdl::MemberReference:
	'[' collectionIndex=DataUse ']' 
	;


Boolean returns ecore::EBoolean:
	'true' | 'false'
;

BoundedLoopBehaviour returns tdl::BoundedLoopBehaviour:
	'repeat'
	numIteration+=LocalLoopExpression (',' numIteration+=LocalLoopExpression)*
@@ -336,12 +331,18 @@ DataResourceMapping returns tdl::DataResourceMapping:
    ;
    
DataType returns tdl::DataType:
	SimpleDataType_Impl | StructuredDataType | Time | ProcedureSignature | CollectionDataType;
	(SimpleDataType_Impl 
     | StructuredDataType 
     | Time 
     | ProcedureSignature 
     | CollectionDataType
	)
	;


ProcedureSignature returns tdl::ProcedureSignature:
    {tdl::ProcedureSignature}
    //'Structured' 'Data' 'Type'
    ConstraintFragment
    'Signature'
    name=Identifier
    ('(' parameter+=ProcedureParameter ( "," parameter+=ProcedureParameter)* ')')?
@@ -361,7 +362,7 @@ enum ParameterKind returns tdl::ParameterKind:

CollectionDataType returns tdl::CollectionDataType:
    {tdl::CollectionDataType}
    //'Structured' 'Data' 'Type'
    ConstraintFragment
    'Collection'
    name=Identifier
    'of' 'type'
@@ -576,6 +577,7 @@ Member returns tdl::Member:
	name=Identifier
	'of' 'type'
	dataType=[tdl::DataType|Identifier]
    MemberConstraintFragment
    CommentAnnotationFragment
	;

@@ -633,9 +635,11 @@ PackageableElement returns tdl::PackageableElement:
	| CollectionDataInstance 
	| ProcedureSignature 
	| PredefinedFunction
	| ConstraintType
	| EnumDataType
	)
	CommentAnnotationFragment
	';'?
	';' //TODO: make all semicolons optional?
	;

ParallelBehaviour returns tdl::ParallelBehaviour:
@@ -701,6 +705,7 @@ SimpleDataInstance_Impl returns tdl::SimpleDataInstance:
SimpleDataType_Impl returns tdl::SimpleDataType:
	{tdl::SimpleDataType}
	//'Simple' 'Data' 'Type'
    ConstraintFragment
	'Type'
	name=Identifier
	;		
@@ -733,6 +738,7 @@ StructuredDataInstance returns tdl::StructuredDataInstance:
StructuredDataType returns tdl::StructuredDataType:
	{tdl::StructuredDataType}
	//'Structured' 'Data' 'Type'
    ConstraintFragment
	'Type'
	name=Identifier
	(extension=Extension)?
@@ -808,6 +814,7 @@ TestObjective returns tdl::TestObjective:

Time returns tdl::Time:
	{tdl::Time}
    ConstraintFragment
	'Time'
	name=Identifier
    ;
@@ -916,16 +923,37 @@ Extension returns tdl::Extension:
	;



LiteralValueUse returns tdl::LiteralValueUse:
	{tdl::LiteralValueUse}
	value=String0
    (value=STRING | intValue=BIGINTEGER | boolValue=BOOLEAN)
	(
 		'of' 'type' dataType=[tdl::DataType|Identifier]
	)?
    CommentAnnotationNameFragment
	;

ConstraintType returns tdl::ConstraintType: 
    'Constraint' name=Identifier
    CommentAnnotationFragment
;

	
Constraint returns tdl::Constraint: 
    type=[tdl::ConstraintType|Identifier]
    (':' quantifier+=LiteralValueUse (',' quantifier+=LiteralValueUse)+ )?
    CommentAnnotationNameFragment
;

EnumDataType returns tdl::EnumDataType: 
    ConstraintFragment
    'Enumerated' name=Identifier
    '{'
        //TODO: without type specification? separator?
        (value+=SimpleDataInstance_Impl)+
    '}'
;
	

fragment CommentAnnotationNameFragment returns tdl::Element:
    ('with'
    '{'
@@ -987,3 +1015,30 @@ fragment WithPeriodicBehaviour returns tdl::PeriodicBehaviour:
        ('name' name=Identifier)?
    '}')?
    ;

fragment ConstraintFragment returns tdl::DataType:
    //TODO: put braces into constraint?
    ('{' constraint+=Constraint '}')* 
;

fragment MemberConstraintFragment returns tdl::Member:
    //TODO: put braces into constraint?
    ('{' constraint+=Constraint '}')* 
;


BIGINTEGER returns ecore::EBigInteger:
    INT
;

//## Terminals

terminal BOOLEAN returns ecore::EBoolean:
    'true' | 'false'
;

//Boolean returns ecore::EBoolean:
//    'true' | 'false'
//;

    
 No newline at end of file