Newer
Older
// automatically generated by Xtext
grammar org.etsi.mts.tdl.TDLan2 with org.eclipse.xtext.common.Terminals
import "http://www.eclipse.org/emf/2002/Ecore" as ecore
import "http://www.etsi.org/spec/TDL/1.4.1" as tdl
Package returns tdl::Package:
{tdl::Package}
'Package'
name=Identifier
'{'
(^import+=ElementImport ( ^import+=ElementImport)* )?
(packagedElement+=PackageableElement ( packagedElement+=PackageableElement)* )?
(nestedPackage+=Package (nestedPackage+=Package)*)?
'}'
(
'with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
'}')?
;
Action returns tdl::Action:
Action_Impl | Function;
ActionReference returns tdl::ActionReference:
'perform' 'action'
action=[tdl::Action|Identifier]
('(' actualParameter+=ParameterBinding ( "," actualParameter+=ParameterBinding)* ')' )?
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
('on' componentInstance=[tdl::ComponentInstance|Identifier])?
(
'with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
('test' 'objectives' ':' testObjective+=[tdl::TestObjective|Identifier] ( "," testObjective+=[tdl::TestObjective|Identifier])* ';')?
('name' name=Identifier)?
('time' 'label' timeLabel=TimeLabel)?
('time' 'constraints' ':' timeConstraint+=TimeConstraint ( "," timeConstraint+=TimeConstraint)* ';' )?
'}')?
';'
;
Action_Impl returns tdl::Action:
{tdl::Action}
'Action'
name=Identifier
('(' formalParameter+=FormalParameter ( "," formalParameter+=FormalParameter)* ')' )?
(':' body=String0)?
('with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
'}')?
';';
AlternativeBehaviour returns tdl::AlternativeBehaviour:
'alternatively'
block+=Block ('or' block+=Block)*
(
'with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
('test' 'objectives' ':' testObjective+=[tdl::TestObjective|Identifier] ( "," testObjective+=[tdl::TestObjective|Identifier])* ';')?
('name' name=Identifier)?
(periodic+=PeriodicBehaviour ( periodic+=PeriodicBehaviour)* )?
(exceptional+=ExceptionalBehaviour ( exceptional+=ExceptionalBehaviour)*)?
'}'
)?
;
Annotation returns tdl::Annotation:
key=[tdl::AnnotationType|Identifier]
(':' value=String0)?
(
'with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
(name=Identifier)?
'}')?
';';
AnnotationType returns tdl::AnnotationType:
{tdl::AnnotationType}
'Annotation'
name=Identifier
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
('with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
'}')?
';';
AnyValueOrOmit returns tdl::AnyValueOrOmit:
{tdl::AnyValueOrOmit}
'*'
//('(' argument+=ParameterBinding ( "," argument+=ParameterBinding)* ')' )?
(
'with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
('name' name=Identifier)?
'}')?
;
AnyValue returns tdl::AnyValue:
{tdl::AnyValue}
name='?'
//TODO: remove dataTypeAssociation?
(':' dataType=[tdl::DataType|Identifier])?
//('(' argument+=ParameterBinding ( "," argument+=ParameterBinding)* ')' )?
(
'with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
//('name' name=Identifier)?
'}')?
;
ParameterBinding returns tdl::ParameterBinding:
parameter=[tdl::Parameter|Identifier]
'='
dataUse=DataUse
(
'with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
('name' name=Identifier)?
'}')?
;
Assertion returns tdl::Assertion:
{tdl::Assertion}
'assert'
condition=DataUse
('on' componentInstance=[tdl::ComponentInstance|Identifier])?
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
('otherwise' 'set' 'verdict' 'to' otherwise=DataUse)?
('with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
('test' 'objectives' ':' testObjective+=[tdl::TestObjective|Identifier] ( "," testObjective+=[tdl::TestObjective|Identifier])* ';')?
('name' name=Identifier)?
('time' 'label' timeLabel=TimeLabel)?
('time' 'constraints' ':' timeConstraint+=TimeConstraint ( "," timeConstraint+=TimeConstraint)* ';' )?
'}')?
';';
Assignment returns tdl::Assignment:
//TODO: shall be mandatory
(componentInstance=[tdl::ComponentInstance|Identifier] '->')?
variable=VariableUse
'='
expression=DataUse
('with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
('test' 'objectives' ':' testObjective+=[tdl::TestObjective|Identifier] ( "," testObjective+=[tdl::TestObjective|Identifier])* ';')?
('name' name=Identifier)?
('time' 'label' timeLabel=TimeLabel)?
('time' 'constraints' ':' timeConstraint+=TimeConstraint ( "," timeConstraint+=TimeConstraint)* ';' )?
'}')?
';';
Behaviour returns tdl::Behaviour:
TimerStart
| TimerStop
| TimeOut
| Wait
| Quiescence
| PeriodicBehaviour
| AlternativeBehaviour
| ParallelBehaviour
| BoundedLoopBehaviour
| UnboundedLoopBehaviour
| ConditionalBehaviour
| CompoundBehaviour
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
| DefaultBehaviour
| InterruptBehaviour
| VerdictAssignment
| Assertion
| Stop
| Break
| Assignment
| InlineAction
| ActionReference
| TestDescriptionReference
| Interaction
;
BehaviourDescription returns tdl::BehaviourDescription:
behaviour=Behaviour
(
'with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
('name' name=Identifier)?
'}'
)?
;
Block returns tdl::Block:
Philip Makedonski
committed
('[' guard+=LocalExpression (',' guard+=LocalExpression)* ']')?
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
('name' name=Identifier)?
behaviour+=Behaviour ( behaviour+=Behaviour)*
'}'
;
Philip Makedonski
committed
LocalExpression returns tdl::LocalExpression:
expression=DataUse ('on' scope=[tdl::ComponentInstance|Identifier])?
;
LocalLoopExpression returns tdl::LocalExpression:
expression=DataUse 'times' ('on' scope=[tdl::ComponentInstance|Identifier])?
;
MemberReference returns tdl::MemberReference:
member=[tdl::Member|Identifier] ('[' collectionIndex=DataUse ']')?
;
CollectionReference returns tdl::MemberReference:
'[' collectionIndex=DataUse ']'
;
Philip Makedonski
committed
Boolean returns ecore::EBoolean:
'true' | 'false'
;
BoundedLoopBehaviour returns tdl::BoundedLoopBehaviour:
'repeat'
Philip Makedonski
committed
numIteration+=LocalLoopExpression (',' numIteration+=LocalLoopExpression)*
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
block=Block
(
'with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
('test' 'objectives' ':' testObjective+=[tdl::TestObjective|Identifier] ( "," testObjective+=[tdl::TestObjective|Identifier])* ';')?
('name' name=Identifier)?
(periodic+=PeriodicBehaviour ( periodic+=PeriodicBehaviour)* )?
(exceptional+=ExceptionalBehaviour ( exceptional+=ExceptionalBehaviour)*)?
'}'
)?
;
Break returns tdl::Break:
{tdl::Break}
'break'
('with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
('test' 'objectives' ':' testObjective+=[tdl::TestObjective|Identifier] ( "," testObjective+=[tdl::TestObjective|Identifier])* ';')?
('name' name=Identifier)?
('time' 'label' timeLabel=TimeLabel)?
('time' 'constraints' ':' timeConstraint+=TimeConstraint ( "," timeConstraint+=TimeConstraint)* ';' )?
'}')?
';';
Comment returns tdl::Comment:
'Note'
(name=Identifier)?
':'
body=String0
(
'with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
'}')?
';';
ComponentInstance returns tdl::ComponentInstance:
'create'
role=ComponentInstanceRole
name=Identifier
'of' 'type' type=[tdl::ComponentType|Identifier]
('with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
'}'
)?
';'
;
ComponentInstanceBinding returns tdl::ComponentInstanceBinding:
'bind'
formalComponent=[tdl::ComponentInstance|Identifier]
'to' actualComponent=[tdl::ComponentInstance|Identifier]
('with' '{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
('name' name=Identifier)?
'}')?
;
enum ComponentInstanceRole returns tdl::ComponentInstanceRole:
SUT = 'SUT' | Tester = 'Tester';
enum GateTypeKind returns tdl::GateTypeKind:
Message = 'Message' | Procedure = 'Procedure';
ComponentType returns tdl::ComponentType:
{tdl::ComponentType}
'Component' 'Type'
name=Identifier
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
'having'
'{'
(timer+=Timer)*
(variable+=Variable)*
(gateInstance+=GateInstance)*
'}'
('with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
'}')?
;
CompoundBehaviour returns tdl::CompoundBehaviour:
block=Block
(
'with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
('test' 'objectives' ':' testObjective+=[tdl::TestObjective|Identifier] ( "," testObjective+=[tdl::TestObjective|Identifier])* ';')?
('name' name=Identifier)?
(periodic+=PeriodicBehaviour ( periodic+=PeriodicBehaviour)* )?
(exceptional+=ExceptionalBehaviour ( exceptional+=ExceptionalBehaviour)*)?
'}'
)?
;
ConditionalBehaviour returns tdl::ConditionalBehaviour:
'if'
block+=Block (=>('else' block+=Block) | (('else' 'if' block+=Block)* ('else' block+=Block)))?
(
'with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
('test' 'objectives' ':' testObjective+=[tdl::TestObjective|Identifier] ( "," testObjective+=[tdl::TestObjective|Identifier])* ';')?
('name' name=Identifier)?
(periodic+=PeriodicBehaviour ( periodic+=PeriodicBehaviour)* )?
(exceptional+=ExceptionalBehaviour ( exceptional+=ExceptionalBehaviour)*)?
'}'
)?
;
Connection returns tdl::Connection:
'connect'
endPoint+=GateReference "to" endPoint+=GateReference
//('end point' endPointX+=[tdl::GateReference|Identifier])*
(
'with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
('as' name=Identifier)?
'}')?
';';
DataElementMapping returns tdl::DataElementMapping:
'Map'
mappableDataElement=[tdl::MappableDataElement|Identifier]
('to' elementURI=String0)?
'in' dataResourceMapping=[tdl::DataResourceMapping|Identifier]
('as' name=Identifier)?
('with'
'{'
(parameterMapping+=ParameterMapping)*
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
'}')?
';';
DataInstance returns tdl::DataInstance:
// SimpleDataInstance_Impl | StructuredDataInstance | Verdict | TimeLabel;
SimpleDataInstance_Impl | StructuredDataInstance;
//DataInstanceUse returns tdl::DataInstanceUse:
// {tdl::DataInstanceUse}
// dataInstance=[tdl::DataInstance|Identifier]
// ('(' argument+=ParameterBinding ( "," argument+=ParameterBinding)* ')' )?
// ('.' reduction+=[tdl::Member|Identifier])*
// ('with'
// '{'
// ('name' name=Identifier)?
// (comment+=Comment (comment+=Comment)*)?
// (annotation+=Annotation (annotation+=Annotation)*)?
// '}')?
// ;
DataInstanceUse returns tdl::DataInstanceUse:
{tdl::DataInstanceUse}
(
//referenced DataInstance, arguments or reduction optional
(
(
( dataInstance=[tdl::DataInstance|NumberAsIdentifier] |
dataInstance=[tdl::DataInstance|Identifier]
(unassignedMember=UnassignedMemberTreatment)?
)
(
('(' argument+=ParameterBinding ( "," argument+=ParameterBinding)* ')' )
|
( (reduction+=CollectionReference)?
('.' reduction+=MemberReference)*
)
//anonymous with data type, arguments mandatory, only structured data types
'new' dataType=[tdl::StructuredDataType|Identifier]
(unassignedMember=UnassignedMemberTreatment)?
('(' argument+=ParameterBinding ( "," argument+=ParameterBinding)* ')' )
)
|
//anonymous with no data type, arguments mandatory, otherwise AnyValue, only structured data types
(
(unassignedMember=UnassignedMemberTreatment)?
('(' argument+=ParameterBinding ( "," argument+=ParameterBinding)* ')' )
)
//not standardised: inline collections, no type needed? (only when used in interaction?
|
(
('new' dataType=[tdl::CollectionDataType|Identifier] 'containing' )?
(unassignedMember=UnassignedMemberTreatment)?
'{'
(item+=StaticDataUse ("," item+=StaticDataUse)*)?
'}'
)
)
('with'
'{'
('name' name=Identifier)?
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
'}')?
;
DataResourceMapping returns tdl::DataResourceMapping:
{tdl::DataResourceMapping}
'Use'
(resourceURI=String0)?
('as' name=Identifier)?
('with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
'}')?
';';
DataType returns tdl::DataType:
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
SimpleDataType_Impl | StructuredDataType | Time | ProcedureSignature | CollectionDataType;
ProcedureSignature returns tdl::ProcedureSignature:
{tdl::ProcedureSignature}
//'Structured' 'Data' 'Type'
'Signature'
name=Identifier
('(' parameter+=ProcedureParameter ( "," parameter+=ProcedureParameter)* ')')?
(
'with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
'}')?
';';
ProcedureParameter returns tdl::ProcedureParameter:
kind=ParameterKind
name=Identifier
'of' 'type'
dataType=[tdl::DataType|Identifier]
(
'with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
'}')?;
enum ParameterKind returns tdl::ParameterKind:
In = 'In' | Out = 'Out' | Exception = 'Exception';
CollectionDataType returns tdl::CollectionDataType:
{tdl::CollectionDataType}
//'Structured' 'Data' 'Type'
'Collection'
name=Identifier
'of' 'type'
itemType=[tdl::DataType|Identifier]
(
'with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
'}')?
';';
CollectionDataInstance returns tdl::CollectionDataInstance:
{tdl::CollectionDataInstance}
dataType=[tdl::DataType|Identifier]
name=Identifier
'containing' '{'
(item+=StaticDataUse ("," item+=StaticDataUse)*)?
'}'
('with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
'}')?
';'
;
DataUse returns tdl::DataUse:
DataInstanceUse | FunctionCall | PredefinedFunctionCall | FormalParameterUse | TimeLabelUse | VariableUse | AnyValue | AnyValueOrOmit | OmitValue | LiteralValueUse;
DefaultBehaviour returns tdl::DefaultBehaviour:
'default'
('on' guardedComponent=[tdl::ComponentInstance|Identifier])?
block=Block
(
'with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
('test' 'objectives' ':' testObjective+=[tdl::TestObjective|Identifier] ( "," testObjective+=[tdl::TestObjective|Identifier])* ';')?
('name' name=Identifier)?
'}')?;
Identifier returns ecore::EString:
ID
;
QIdentifier returns ecore::EString:
ID ('.' ID)+
;
PredefinedIdentifierBinary returns ecore::EString:
'+' | '-' | '*' | '/' | 'mod'
| '>' | '<' | '>=' | '<=' | '>='
| '==' | '!=' | 'and' | 'or' | 'xor'
;
PredefinedIdentifierNot returns ecore::EString:
'not'
;
PredefinedIdentifierSize returns ecore::EString:
'size'
;
IdentifierDot returns ecore::EString:
ID '.' ID
;
ElementImport returns tdl::ElementImport:
{tdl::ElementImport}
'Import'
( 'all'
|
(importedElement+=[tdl::PackageableElement|Identifier] ( "," importedElement+=[tdl::PackageableElement|Identifier])*)
)
'from' (importedPackage=[tdl::Package|Identifier] | importedPackage=[tdl::Package|QIdentifier])
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
('with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
(name=Identifier)?
'}')?
';';
ExceptionalBehaviour returns tdl::ExceptionalBehaviour:
DefaultBehaviour | InterruptBehaviour;
Function returns tdl::Function:
'Function'
name=Identifier
'(' (formalParameter+=FormalParameter ( "," formalParameter+=FormalParameter)* )? ')'
'returns'
returnType=[tdl::DataType|Identifier]
(':' body=String0)?
('with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
'}')?
';';
FunctionCall returns tdl::FunctionCall:
'instance' 'returned' 'from'
function=[tdl::Function|Identifier]
'('
(argument+=ParameterBinding ( "," argument+=ParameterBinding)*)?
')'
(reduction+=CollectionReference)?
Philip Makedonski
committed
('.' reduction+=MemberReference)*
('with'
'{'
('name' name=Identifier)?
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
'}')?
;
PredefinedFunction returns tdl::PredefinedFunction:
'Predefined'
(name=PredefinedIdentifierBinary
| name=PredefinedIdentifierNot
| name=PredefinedIdentifierSize
)
';'
;
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
PredefinedFunctionCall returns tdl::PredefinedFunctionCall:
PredefinedFunctionCallSize | PredefinedFunctionCallNot | PredefinedFunctionCallBinary
;
PredefinedFunctionCallSize returns tdl::PredefinedFunctionCall:
function=[tdl::PredefinedFunction|PredefinedIdentifierSize]
'('
actualParameters+=DataUse
')'
;
PredefinedFunctionCallNot returns tdl::PredefinedFunctionCall:
function=[tdl::PredefinedFunction|PredefinedIdentifierNot]
'('
actualParameters+=DataUse
')'
;
PredefinedFunctionCallBinary returns tdl::PredefinedFunctionCall:
'('
actualParameters+=DataUse
function=[tdl::PredefinedFunction|PredefinedIdentifierBinary]
actualParameters+=DataUse
')'
;
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
GateInstance returns tdl::GateInstance:
{tdl::GateInstance}
'gate'
name=Identifier
'of' 'type' type=[tdl::GateType|Identifier]
('with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
'}')?
';';
GateReference returns tdl::GateReference:
component=[tdl::ComponentInstance|Identifier]
'.'
gate=[tdl::GateInstance|Identifier]
('with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
('name' name=IdentifierDot)?
'}')?
;
GateType returns tdl::GateType:
'Gate' 'Type'
name=Identifier
'accepts'
dataType+=[tdl::DataType|Identifier] ( "," dataType+=[tdl::DataType|Identifier])*
('with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
'}')?
';';
InlineAction returns tdl::InlineAction:
'perform' 'action' ':'
body=String0
('on' componentInstance=[tdl::ComponentInstance|Identifier])?
('with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
('test' 'objectives' ':' testObjective+=[tdl::TestObjective|Identifier] ( "," testObjective+=[tdl::TestObjective|Identifier])* ';')?
('name' name=Identifier)? //USE FOR STEPS?
('time' 'label' timeLabel=TimeLabel)?
('time' 'constraints' ':' timeConstraint+=TimeConstraint ( "," timeConstraint+=TimeConstraint)* ';' )?
'}')?
';';
Interaction returns tdl::Interaction:
Message | ProcedureCall | ProcedureCallResponse
;
Message returns tdl::Message:
sourceGate=[tdl::GateReference|IdentifierDot]
('sends' | (isTrigger?='triggers'))
Philip Makedonski
committed
argument=DataUse
target+=TargetMessage ( "," target+=TargetMessage)*
(
'with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
('test' 'objectives' ':' testObjective+=[tdl::TestObjective|Identifier] ( "," testObjective+=[tdl::TestObjective|Identifier])* ';')?
('name' name=Identifier)? //USE FOR STEPS?
('time' 'label' timeLabel=TimeLabel)?
('time' 'constraints' ':' timeConstraint+=TimeConstraint ( "," timeConstraint+=TimeConstraint)* ';' )?
'}')?
';'
;
ProcedureCall returns tdl::ProcedureCall:
sourceGate=[tdl::GateReference|IdentifierDot]
'calls'
signature=[tdl::ProcedureSignature|Identifier]
'('argument+=ParameterBinding ("," argument+=ParameterBinding)*')'
'on'
target+=TargetProcedure
//TODO: add support for responses
(
'with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
('test' 'objectives' ':' testObjective+=[tdl::TestObjective|Identifier] ( "," testObjective+=[tdl::TestObjective|Identifier])* ';')?
('name' name=Identifier)? //USE FOR STEPS?
('time' 'label' timeLabel=TimeLabel)?
('time' 'constraints' ':' timeConstraint+=TimeConstraint ( "," timeConstraint+=TimeConstraint)* ';' )?
'}')?
';'
;
ProcedureCallResponse returns tdl::ProcedureCall:
sourceGate=[tdl::GateReference|IdentifierDot]
'responds'
'with'
signature=[tdl::ProcedureSignature|Identifier]
'('argument+=ParameterBinding ("," argument+=ParameterBinding)*')'
'to'
target+=TargetProcedure
(
'with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
('test' 'objectives' ':' testObjective+=[tdl::TestObjective|Identifier] ( "," testObjective+=[tdl::TestObjective|Identifier])* ';')?
('name' name=Identifier)? //USE FOR STEPS?
('response' 'to' replyTo=[tdl::ProcedureCall|Identifier])?
('time' 'label' timeLabel=TimeLabel)?
('time' 'constraints' ':' timeConstraint+=TimeConstraint ( "," timeConstraint+=TimeConstraint)* ';' )?
'}')?
';'
;
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
Trigger returns ecore::EBooleanObject :
'triggers'
;
InterruptBehaviour returns tdl::InterruptBehaviour:
'interrupt'
('on' guardedComponent=[tdl::ComponentInstance|Identifier])?
block=Block
(
'with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
('test' 'objectives' ':' testObjective+=[tdl::TestObjective|Identifier] ( "," testObjective+=[tdl::TestObjective|Identifier])* ';')?
('name' name=Identifier)?
'}')?;
MappableDataElement returns tdl::MappableDataElement:
// SimpleDataType_Impl | SimpleDataInstance_Impl | StructuredDataType | StructuredDataInstance | Action_Impl | Function | Verdict | Time | TimeLabel;
SimpleDataType_Impl | SimpleDataInstance_Impl | StructuredDataType | StructuredDataInstance | Action_Impl | Function | Time;
Member returns tdl::Member:
(isOptional?='optional')?
name=Identifier
'of' 'type'
dataType=[tdl::DataType|Identifier]
(
'with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
'}')?;
Optional returns ecore::EBoolean :
'optional' | 'mandatory'
;
MemberAssignment returns tdl::MemberAssignment:
member=[tdl::Member|Identifier]
'='
memberSpec=StaticDataUse
(
'with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
('name' name=Identifier)?
'}')?;
ParameterMapping returns tdl::ParameterMapping:
parameter=[tdl::Parameter|Identifier]
('mapped' 'to' parameterURI=String0)?
('as' name=Identifier)?
(
'with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
'}')?
';';
OmitValue returns tdl::OmitValue:
{tdl::OmitValue}
'omit'
(
'with'
'{'
('argument' '{' argument+=ParameterBinding ( "," argument+=ParameterBinding)* '}' )?
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
('name' name=Identifier)?
'}')?;
OptionalBehaviour returns tdl::OptionalBehaviour:
'optionally'
block=Block
(
'with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
('test' 'objectives' ':' testObjective+=[tdl::TestObjective|Identifier] ( "," testObjective+=[tdl::TestObjective|Identifier])* ';')?
('name' name=Identifier)?
'}')?
(exceptional+=ExceptionalBehaviour ( exceptional+=ExceptionalBehaviour)*)?
(periodic+=PeriodicBehaviour ( periodic+=PeriodicBehaviour)* )?
';'
;
PackageableElement returns tdl::PackageableElement:
// AnnotationType | TestObjective | DataResourceMapping | DataElementMapping | SimpleDataType_Impl | SimpleDataInstance_Impl | StructuredDataType | StructuredDataInstance | Action_Impl | Function | Verdict | ComponentType | GateType | Time | TimeLabel | TestConfiguration | TestDescription;
AnnotationType | TestObjective | DataResourceMapping | DataElementMapping | SimpleDataType_Impl | SimpleDataInstance_Impl | StructuredDataType | StructuredDataInstance | Action_Impl | Function | ComponentType | GateType | Time | TestConfiguration | TestDescription | CollectionDataType | CollectionDataInstance | ProcedureSignature | PredefinedFunction;
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
ParallelBehaviour returns tdl::ParallelBehaviour:
'run' block+=Block ('in' 'parallel' 'to' block+=Block)*
(
'with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
('test' 'objectives' ':' testObjective+=[tdl::TestObjective|Identifier] ( "," testObjective+=[tdl::TestObjective|Identifier])* ';')?
('name' name=Identifier)?
(periodic+=PeriodicBehaviour ( periodic+=PeriodicBehaviour)* )?
(exceptional+=ExceptionalBehaviour ( exceptional+=ExceptionalBehaviour)*)?
'}'
)?
;
Parameter returns tdl::Parameter:
Member | FormalParameter;
FormalParameter returns tdl::FormalParameter:
name=Identifier
'of' 'type'
dataType=[tdl::DataType|Identifier]
(
'with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
'}')?;
TimeLabelUse returns tdl::TimeLabelUse:
'time' 'label' timeLabel=[tdl::TimeLabel|Identifier]
('.' kind=TimeLabelUseKind)?
//('(' argument+=ParameterBinding ( "," argument+=ParameterBinding)* ')' )?
//( "." reduction+=[tdl::Member|Identifier])*
(
'with'
'{'
('argument' '{' argument+=ParameterBinding ( "," argument+=ParameterBinding)* '}' )?
('name' name=Identifier)?
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
'}')?;
enum TimeLabelUseKind returns tdl::TimeLabelUseKind:
Last = 'last' | Previous = 'previous' | First = 'first';
FormalParameterUse returns tdl::FormalParameterUse:
'parameter'
parameter=[tdl::FormalParameter|Identifier]
('(' argument+=ParameterBinding ( "," argument+=ParameterBinding)* ')' )?
(reduction+=CollectionReference)?
Philip Makedonski
committed
( "." reduction+=MemberReference)*
(
'with'
'{'
('name' name=Identifier)?
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
'}')?;
PeriodicBehaviour returns tdl::PeriodicBehaviour:
'every'
Philip Makedonski
committed
(period+=LocalExpression (',' period+=LocalExpression)*)
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
block=Block
(
'with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
('test' 'objectives' ':' testObjective+=[tdl::TestObjective|Identifier] ( "," testObjective+=[tdl::TestObjective|Identifier])* ';')?
('name' name=Identifier)?
'}'
)?;
Quiescence returns tdl::Quiescence:
('component' componentInstance=[tdl::ComponentInstance|Identifier] | 'gate' gateReference=[tdl::GateReference|IdentifierDot])
'is' 'quiet' 'for'
period=DataUse
('with'
'{'
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
('test' 'objectives' ':' testObjective+=[tdl::TestObjective|Identifier] ( "," testObjective+=[tdl::TestObjective|Identifier])* ';')?
('name' name=Identifier)?
('time' 'label' timeLabel=TimeLabel)?
('time' 'constraints' ':' timeConstraint+=TimeConstraint ( "," timeConstraint+=TimeConstraint)* ';' )?
'}')?
';';
//Real returns Real:
// '-'? INT+'.'INT+