Loading plugins/org.etsi.mts.tdl.tx/src/org/etsi/mts/tdl/TDLtx.xtext +43 −18 Original line number Diff line number Diff line Loading @@ -59,7 +59,7 @@ fragment AnnotationCommentFragment returns tdl::Element: ; fragment NameFragment returns tdl::Element: 'Name:' name=Identifier 'Name' ':' name=Identifier ; fragment WithCommentFragment returns tdl::Element: Loading Loading @@ -109,8 +109,8 @@ TestObjective returns tdl::TestObjective: AnnotationCommentFragment 'Objective' name=Identifier (BEGIN ('Description:' description=EString)? ('References:' objectiveURI+=EString (',' objectiveURI+=EString)*)? ('Description' ':' description=EString)? ('References' ':' objectiveURI+=EString (',' objectiveURI+=EString)*)? END)? ; Loading Loading @@ -667,7 +667,7 @@ fragment TDPrefixFragment returns tdl::TestDescription: ; fragment TDObjectiveFragment returns tdl::TestDescription: 'Objective:' testObjective+=[tdl::TestObjective|Identifier] 'Objective' ':' testObjective+=[tdl::TestObjective|Identifier] ( ',' testObjective+=[tdl::TestObjective|Identifier])* ; Loading Loading @@ -696,13 +696,17 @@ fragment WithBehaviourFragment returns tdl::Behaviour: ; fragment ObjectiveFragment returns tdl::Behaviour: 'Objective:' testObjective+=[tdl::TestObjective|Identifier] ( ',' testObjective+=[tdl::TestObjective|Identifier])* 'Objective' ':' testObjective+=[tdl::TestObjective|Identifier] ( ',' testObjective+=[tdl::TestObjective|Identifier])* ; Block returns tdl::Block: //NOTE: No annotations or comments ('[' guard+=LocalExpression ( ',' guard+=LocalExpression)* ']' )? ('[' // ('@' annotation+=PICSAnnotation)? //TODO: Exception for PICS? seems not enough AnnotationFragment guard+=LocalExpression ( ',' guard+=LocalExpression)* ']')? BEGIN behaviour+=Behaviour+ END Loading Loading @@ -1047,6 +1051,7 @@ AIdentifier: | TestPurposeDescriptionName | When | Then | PICSName ; GRIdentifier: Loading Loading @@ -1128,9 +1133,17 @@ Event returns to::Event: PICS returns to::PICS: AnnotationCommentFragment 'PICS' name=Identifier PICSName name=Identifier ; //PICS as data instance //PICS returns tdl::SimpleDataInstance: // AnnotationCommentFragment // dataType=[tdl::DataType|PICSName] // name=Identifier //; //# Comments as Qualifiers //DONE: Group by context? -> no Loading Loading @@ -1253,6 +1266,10 @@ ThenAnnotation returns tdl::Annotation: key=[tdl::AnnotationType|Then] ; PICSAnnotation returns tdl::Annotation: key=[tdl::AnnotationType|PICSName] ; //## Element: Abstract fragment InitialConditionsFragment returns tdl::Element: Loading Loading @@ -1288,10 +1305,11 @@ fragment ElementAndOrPrefix returns tdl::Element: StructuredTestObjective returns to::StructuredTestObjective: 'Test' 'Purpose' name=Identifier BEGIN ('Objective:' description=EString)? ('Reference:' objectiveURI+=EString (',' objectiveURI+=EString )*)? ('Configuration:' configuration=[tdl::TestConfiguration|Identifier])? ('PICS:' picsReference+=FirstPICSReference (picsReference+=PICSReference)*)? ('Objective' ':' description=EString)? ('Reference' ':' objectiveURI+=EString (',' objectiveURI+=EString )*)? ('Configuration' ':' configuration=[tdl::TestConfiguration|Identifier])? ('PICS' ':' picsReference+=FirstPICSReference (picsReference+=PICSReference)*)? //('Guard:' guard+=DataUse)? //Substitute for PICS eventually? (initialConditions=InitialConditions)? (expectedBehaviour=ExpectedBehaviour)? (finalConditions=FinalConditions)? Loading Loading @@ -1661,9 +1679,10 @@ EntityBinding returns to::EntityBinding: Variant returns to::TestObjectiveVariant: 'Variant' name=Identifier BEGIN ('Objective:' description=EString)? ('Reference:' objectiveURI+=EString (',' objectiveURI+=EString)*)? ('PICS:' picsReference+=FirstPICSReference (picsReference+=PICSReference)*)? ('Objective' ':' description=EString)? ('Reference' ':' objectiveURI+=EString (',' objectiveURI+=EString)*)? ('PICS' ':' picsReference+=FirstPICSReference (picsReference+=PICSReference)*)? //('Guard:' guard+=DataUse)? //Substitute for PICS eventually? ('Bindings' BEGIN bindings+=VariantBinding (',' bindings+=VariantBinding)* Loading Loading @@ -1715,7 +1734,7 @@ TestPurposeDescription returns tdl::TestDescription: //TODO: Reference, PICS?, Objective reference vs Objective inline (all annotations?) or simply defer to objective BEGIN TDObjectiveFragment? 'Configuration:' testConfiguration=[tdl::TestConfiguration|Identifier] 'Configuration' ':' testConfiguration=[tdl::TestConfiguration|Identifier] (behaviourDescription=TPDBehaviourDescription) END ; Loading @@ -1725,6 +1744,7 @@ TPDBehaviourDescription returns tdl::BehaviourDescription: ; TPDCompoundBehaviour returns tdl::CompoundBehaviour: //(annotation+=PICSAnnotation ':')? block=TPDBlock ; Loading Loading @@ -1764,7 +1784,8 @@ ThenBehaviour returns tdl::CompoundBehaviour: TPDBlock returns tdl::Block: //NOTE: No guard -> guard is PICS ('PICS:' guard+=LocalExpression)? //TODO: annotation has to be pulled up? or pushed down? (annotation+=PICSAnnotation ':' guard+=LocalExpression)? (behaviour+=InitialConditionsBehaviour)? (behaviour+=ExpectedBehaviourBehaviour)? (behaviour+=FinalConditionsBehaviour)? Loading Loading @@ -1888,6 +1909,10 @@ TestPurposeDescriptionName: 'Test' 'Purpose' 'Description' ; PICSName: 'PICS' ; When: 'when' ; Loading Loading
plugins/org.etsi.mts.tdl.tx/src/org/etsi/mts/tdl/TDLtx.xtext +43 −18 Original line number Diff line number Diff line Loading @@ -59,7 +59,7 @@ fragment AnnotationCommentFragment returns tdl::Element: ; fragment NameFragment returns tdl::Element: 'Name:' name=Identifier 'Name' ':' name=Identifier ; fragment WithCommentFragment returns tdl::Element: Loading Loading @@ -109,8 +109,8 @@ TestObjective returns tdl::TestObjective: AnnotationCommentFragment 'Objective' name=Identifier (BEGIN ('Description:' description=EString)? ('References:' objectiveURI+=EString (',' objectiveURI+=EString)*)? ('Description' ':' description=EString)? ('References' ':' objectiveURI+=EString (',' objectiveURI+=EString)*)? END)? ; Loading Loading @@ -667,7 +667,7 @@ fragment TDPrefixFragment returns tdl::TestDescription: ; fragment TDObjectiveFragment returns tdl::TestDescription: 'Objective:' testObjective+=[tdl::TestObjective|Identifier] 'Objective' ':' testObjective+=[tdl::TestObjective|Identifier] ( ',' testObjective+=[tdl::TestObjective|Identifier])* ; Loading Loading @@ -696,13 +696,17 @@ fragment WithBehaviourFragment returns tdl::Behaviour: ; fragment ObjectiveFragment returns tdl::Behaviour: 'Objective:' testObjective+=[tdl::TestObjective|Identifier] ( ',' testObjective+=[tdl::TestObjective|Identifier])* 'Objective' ':' testObjective+=[tdl::TestObjective|Identifier] ( ',' testObjective+=[tdl::TestObjective|Identifier])* ; Block returns tdl::Block: //NOTE: No annotations or comments ('[' guard+=LocalExpression ( ',' guard+=LocalExpression)* ']' )? ('[' // ('@' annotation+=PICSAnnotation)? //TODO: Exception for PICS? seems not enough AnnotationFragment guard+=LocalExpression ( ',' guard+=LocalExpression)* ']')? BEGIN behaviour+=Behaviour+ END Loading Loading @@ -1047,6 +1051,7 @@ AIdentifier: | TestPurposeDescriptionName | When | Then | PICSName ; GRIdentifier: Loading Loading @@ -1128,9 +1133,17 @@ Event returns to::Event: PICS returns to::PICS: AnnotationCommentFragment 'PICS' name=Identifier PICSName name=Identifier ; //PICS as data instance //PICS returns tdl::SimpleDataInstance: // AnnotationCommentFragment // dataType=[tdl::DataType|PICSName] // name=Identifier //; //# Comments as Qualifiers //DONE: Group by context? -> no Loading Loading @@ -1253,6 +1266,10 @@ ThenAnnotation returns tdl::Annotation: key=[tdl::AnnotationType|Then] ; PICSAnnotation returns tdl::Annotation: key=[tdl::AnnotationType|PICSName] ; //## Element: Abstract fragment InitialConditionsFragment returns tdl::Element: Loading Loading @@ -1288,10 +1305,11 @@ fragment ElementAndOrPrefix returns tdl::Element: StructuredTestObjective returns to::StructuredTestObjective: 'Test' 'Purpose' name=Identifier BEGIN ('Objective:' description=EString)? ('Reference:' objectiveURI+=EString (',' objectiveURI+=EString )*)? ('Configuration:' configuration=[tdl::TestConfiguration|Identifier])? ('PICS:' picsReference+=FirstPICSReference (picsReference+=PICSReference)*)? ('Objective' ':' description=EString)? ('Reference' ':' objectiveURI+=EString (',' objectiveURI+=EString )*)? ('Configuration' ':' configuration=[tdl::TestConfiguration|Identifier])? ('PICS' ':' picsReference+=FirstPICSReference (picsReference+=PICSReference)*)? //('Guard:' guard+=DataUse)? //Substitute for PICS eventually? (initialConditions=InitialConditions)? (expectedBehaviour=ExpectedBehaviour)? (finalConditions=FinalConditions)? Loading Loading @@ -1661,9 +1679,10 @@ EntityBinding returns to::EntityBinding: Variant returns to::TestObjectiveVariant: 'Variant' name=Identifier BEGIN ('Objective:' description=EString)? ('Reference:' objectiveURI+=EString (',' objectiveURI+=EString)*)? ('PICS:' picsReference+=FirstPICSReference (picsReference+=PICSReference)*)? ('Objective' ':' description=EString)? ('Reference' ':' objectiveURI+=EString (',' objectiveURI+=EString)*)? ('PICS' ':' picsReference+=FirstPICSReference (picsReference+=PICSReference)*)? //('Guard:' guard+=DataUse)? //Substitute for PICS eventually? ('Bindings' BEGIN bindings+=VariantBinding (',' bindings+=VariantBinding)* Loading Loading @@ -1715,7 +1734,7 @@ TestPurposeDescription returns tdl::TestDescription: //TODO: Reference, PICS?, Objective reference vs Objective inline (all annotations?) or simply defer to objective BEGIN TDObjectiveFragment? 'Configuration:' testConfiguration=[tdl::TestConfiguration|Identifier] 'Configuration' ':' testConfiguration=[tdl::TestConfiguration|Identifier] (behaviourDescription=TPDBehaviourDescription) END ; Loading @@ -1725,6 +1744,7 @@ TPDBehaviourDescription returns tdl::BehaviourDescription: ; TPDCompoundBehaviour returns tdl::CompoundBehaviour: //(annotation+=PICSAnnotation ':')? block=TPDBlock ; Loading Loading @@ -1764,7 +1784,8 @@ ThenBehaviour returns tdl::CompoundBehaviour: TPDBlock returns tdl::Block: //NOTE: No guard -> guard is PICS ('PICS:' guard+=LocalExpression)? //TODO: annotation has to be pulled up? or pushed down? (annotation+=PICSAnnotation ':' guard+=LocalExpression)? (behaviour+=InitialConditionsBehaviour)? (behaviour+=ExpectedBehaviourBehaviour)? (behaviour+=FinalConditionsBehaviour)? Loading Loading @@ -1888,6 +1909,10 @@ TestPurposeDescriptionName: 'Test' 'Purpose' 'Description' ; PICSName: 'PICS' ; When: 'when' ; Loading