Commit 3148f108 authored by Philip Makedonski's avatar Philip Makedonski Committed by Philip Makedonski
Browse files

+ reodering, refinement

parent cdecf96f
Loading
Loading
Loading
Loading
+57 −44
Original line number Diff line number Diff line
@@ -59,46 +59,6 @@ PackageableElement returns tdl::PackageableElement:
    | TestPurposeDescription
;

//TODO: this will need to be pulled to TX..
//TODO: quite a bit contrived.. -> may be restricted to TO... (separate editor?)
@Override
AnnotationType returns tdl::AnnotationType:
	'Annotation' name = (
		Identifier 
		| InitialBlockName 
		| ExpectedBlockName 
		| FinalBlockName 
		| TestPurposeDescriptionName
		| 'when'
		| 'then'
	)
;

InitialConditionsAnnotation returns tdl::Annotation:
	key=[tdl::AnnotationType|InitialBlockName]
;

ExpectedBehaviourAnnotation returns tdl::Annotation:
	key=[tdl::AnnotationType|ExpectedBlockName]
;

FinalConditionsAnnotation returns tdl::Annotation:
	key=[tdl::AnnotationType|FinalBlockName]
;

TestPurposeDescriptionAnnotation returns tdl::Annotation:
	key=[tdl::AnnotationType|TestPurposeDescriptionName]
;

//TODO: extract as data rule
WhenAnnotation returns tdl::Annotation:
    key=[tdl::AnnotationType|'when']
;

ThenAnnotation returns tdl::Annotation:
    key=[tdl::AnnotationType|'then']
;

Entity returns to::Entity:
    AnnotationCommentFragment
    'Entity' name=Identifier
@@ -128,7 +88,7 @@ PICS returns to::PICS:
//TODO: Add predefined annotations for Blocks and Behaviours?

Qualifier returns tdl::Comment:
    body=Identifier //TODO: Numbers as well? Strings as well??
    body=(Identifier | NIdentifier) //TODO: Numbers as well? Strings as well??
;

NotQualifier returns tdl::Comment:
@@ -202,6 +162,47 @@ TimeConstraintKeyword returns ecore::EString:
    'before' | 'after' | 'during' | 'within'
;


//TODO: this will need to be pulled to TX..
//TODO: quite a bit contrived.. -> may be restricted to TO... (separate editor?)
@Override
AnnotationType returns tdl::AnnotationType:
	'Annotation' name = (
		Identifier 
		| InitialBlockName 
		| ExpectedBlockName 
		| FinalBlockName 
		| TestPurposeDescriptionName
		| When
		| Then
	)
;

InitialConditionsAnnotation returns tdl::Annotation:
	key=[tdl::AnnotationType|InitialBlockName]
;

ExpectedBehaviourAnnotation returns tdl::Annotation:
	key=[tdl::AnnotationType|ExpectedBlockName]
;

FinalConditionsAnnotation returns tdl::Annotation:
	key=[tdl::AnnotationType|FinalBlockName]
;

TestPurposeDescriptionAnnotation returns tdl::Annotation:
	key=[tdl::AnnotationType|TestPurposeDescriptionName]
;

WhenAnnotation returns tdl::Annotation:
    key=[tdl::AnnotationType|When]
;

ThenAnnotation returns tdl::Annotation:
    key=[tdl::AnnotationType|Then]
;


//# Test Objective

StructuredTestObjective returns to::StructuredTestObjective:
@@ -241,8 +242,8 @@ ExpectedBehaviour returns to::ExpectedBehaviour:
    'ensure' 'that'
    (
		(BEGIN
			'when' whenClause=EventSequence
			'then' thenClause=EventSequence
			When whenClause=EventSequence
			Then thenClause=EventSequence
		END)
		| 
		(thenClause=EventSequence)
@@ -722,7 +723,6 @@ References returns ecore::EString:
    | 'associated' 'with'
;


InitialBlockName returns ecore::EString:
    'Initial' 'conditions'
;
@@ -738,3 +738,16 @@ FinalBlockName returns ecore::EString:
TestPurposeDescriptionName returns ecore::EString:
    'Test' 'Purpose' 'Description'
;

When returns ecore::EString:
    'when'
;

Then returns ecore::EString:
    'then'
;

MIdentifier returns ecore::EString:
    ID (ID)*
;