Commit 59bcad38 authored by Philip Makedonski's avatar Philip Makedonski
Browse files

+ further leftovers in ATOlan grammar

parent f802bfdd
Loading
Loading
Loading
Loading
+51 −0
Original line number Diff line number Diff line
@@ -165,3 +165,54 @@ ExpectedBehaviourAnnotation returns tdl::Annotation:
    //try without prefix
    key=[tdl::AnnotationType|Identifier]
;

Message returns tdl::Message:
    //add qualifier?
    comment+=AndOrQualifier?
    //only one qualifier?
    comment+=ArticleQualifier?
    sourceGate=[tdl::GateReference|IdentifierDot]
    ('sends' | (isTrigger?='triggers')) 
    //TODO: use TDLan notation?
    //TODO: expand to more data uses?
    argument=StaticDataUse
    'to' 
    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)* ';' )?
    '}')?
//  ';'
    ;

TargetMessage returns tdl::Target:
    targetGate=[tdl::GateReference|IdentifierDot]
    //TODO: check what the correct syntax shall be
    (valueAssignment+=ValueAssignmentMessage)?
    (
    'with'
    '{'
        (comment+=Comment (comment+=Comment)*)?
        (annotation+=Annotation (annotation+=Annotation)*)?
        ('name' name=Identifier)?
    '}')?
    ;

ValueAssignmentMessage returns tdl::ValueAssignment:
    //TODO: check what the correct syntax shall be
    'where' 'it' 'is' 'assigned' 'to' variable=[tdl::Variable|Identifier]
    (
    'with'
    '{'
        (comment+=Comment (comment+=Comment)*)?
        (annotation+=Annotation (annotation+=Annotation)*)?
        ('name' name=Identifier)?
    '}')?
    ;