Loading plugins/org.etsi.mts.tdl.graphical.labels.data/src/org/etsi/mts/tdl/graphical/labels/Data.xtext +18 −8 Original line number Original line Diff line number Diff line Loading @@ -48,18 +48,22 @@ EString returns ecore::EString: DataInstanceUse returns DataInstanceUse: DataInstanceUse returns DataInstanceUse: dataInstance=[DataInstance|EString] dataInstance=[DataInstance|EString] ('(' argument+=ParameterBinding ( "," argument+=ParameterBinding)* ')' )? ('(' argument+=ParameterBinding ( "," argument+=ParameterBinding)* ')' )? ('.' reduction+=[Member|EString])* ('.' reduction+=MemberReference)* //TODO: if for some reason the data instance use does have a name //TODO: if for some reason the data instance use does have a name //it will cause problems... same applies for other scenarios //it will cause problems... same applies for other scenarios //TODO: create a more elegant way to handle that gracefully) //TODO: create a more elegant way to handle that gracefully) //(name=EString)? //(name=EString)? ; ; MemberReference returns MemberReference: member=[Member|EString] ; FormalParameterUse returns FormalParameterUse: FormalParameterUse returns FormalParameterUse: parameter=[FormalParameter|EString] parameter=[FormalParameter|EString] ('(' argument+=ParameterBinding ( "," argument+=ParameterBinding)* ')' )? ('(' argument+=ParameterBinding ( "," argument+=ParameterBinding)* ')' )? ( "." reduction+=[Member|EString])* ( "." reduction+=MemberReference)* ; ; FunctionCall returns FunctionCall: FunctionCall returns FunctionCall: Loading @@ -67,7 +71,7 @@ FunctionCall returns FunctionCall: '(' '(' (argument+=ParameterBinding ( "," argument+=ParameterBinding)*)? (argument+=ParameterBinding ( "," argument+=ParameterBinding)*)? ')' ')' ('.' reduction+=[Member|EString])* ('.' reduction+=MemberReference)* ; ; VariableUse returns VariableUse: VariableUse returns VariableUse: Loading @@ -75,7 +79,7 @@ VariableUse returns VariableUse: '->' '->' variable=[Variable|EString] variable=[Variable|EString] ('(' argument+=ParameterBinding ( "," argument+=ParameterBinding)* ')' )? ('(' argument+=ParameterBinding ( "," argument+=ParameterBinding)* ')' )? ("." reduction+=[Member|EString])* ("." reduction+=MemberReference)* ; ; TimeLabelUse returns TimeLabelUse: TimeLabelUse returns TimeLabelUse: Loading Loading @@ -518,7 +522,7 @@ Variable returns Variable: Interaction returns Message: Interaction returns Message: sourceGate=[GateReference|EStringDot] sourceGate=[GateReference|EStringDot] ('sends' | isTrigger=Trigger) ('sends' | isTrigger=Trigger) argument+=DataUse argument=DataUse 'to' 'to' target+=Target ( "," target+=Target)* target+=Target ( "," target+=Target)* ( ( Loading @@ -540,7 +544,7 @@ Trigger returns ecore::EBoolean : Target returns Target: Target returns Target: targetGate=[GateReference|EStringDot] targetGate=[GateReference|EStringDot] ('where it is' 'assigned' 'to' variable+=[Variable|EString])? ('where it is' 'assigned' 'to' variable=[Variable|EString])? ( ( 'with' 'with' '{' '{' Loading Loading @@ -600,11 +604,17 @@ Behaviour returns Behaviour: ; ; Block returns Block: Block returns Block: ('[' guard=DataUse ']')? ('[' guard+=LocalExpression ']')? '{' '{' behaviour+=Behaviour ( behaviour+=Behaviour)* behaviour+=Behaviour ( behaviour+=Behaviour)* '}' '}' ; ; LocalExpression returns LocalExpression: expression=DataUse ; CompoundBehaviour returns CompoundBehaviour: CompoundBehaviour returns CompoundBehaviour: block=Block block=Block ; ; Loading Loading @@ -634,7 +644,7 @@ TimerStart returns TimerStart: BoundedLoopBehaviour returns BoundedLoopBehaviour: BoundedLoopBehaviour returns BoundedLoopBehaviour: 'repeat' 'repeat' numIteration=DataUse numIteration+=LocalExpression 'times' 'times' // 'from' startValue=DataInstanceSpecification // 'from' startValue=DataInstanceSpecification // 'to' endValue=DataInstanceSpecification // 'to' endValue=DataInstanceSpecification Loading Loading
plugins/org.etsi.mts.tdl.graphical.labels.data/src/org/etsi/mts/tdl/graphical/labels/Data.xtext +18 −8 Original line number Original line Diff line number Diff line Loading @@ -48,18 +48,22 @@ EString returns ecore::EString: DataInstanceUse returns DataInstanceUse: DataInstanceUse returns DataInstanceUse: dataInstance=[DataInstance|EString] dataInstance=[DataInstance|EString] ('(' argument+=ParameterBinding ( "," argument+=ParameterBinding)* ')' )? ('(' argument+=ParameterBinding ( "," argument+=ParameterBinding)* ')' )? ('.' reduction+=[Member|EString])* ('.' reduction+=MemberReference)* //TODO: if for some reason the data instance use does have a name //TODO: if for some reason the data instance use does have a name //it will cause problems... same applies for other scenarios //it will cause problems... same applies for other scenarios //TODO: create a more elegant way to handle that gracefully) //TODO: create a more elegant way to handle that gracefully) //(name=EString)? //(name=EString)? ; ; MemberReference returns MemberReference: member=[Member|EString] ; FormalParameterUse returns FormalParameterUse: FormalParameterUse returns FormalParameterUse: parameter=[FormalParameter|EString] parameter=[FormalParameter|EString] ('(' argument+=ParameterBinding ( "," argument+=ParameterBinding)* ')' )? ('(' argument+=ParameterBinding ( "," argument+=ParameterBinding)* ')' )? ( "." reduction+=[Member|EString])* ( "." reduction+=MemberReference)* ; ; FunctionCall returns FunctionCall: FunctionCall returns FunctionCall: Loading @@ -67,7 +71,7 @@ FunctionCall returns FunctionCall: '(' '(' (argument+=ParameterBinding ( "," argument+=ParameterBinding)*)? (argument+=ParameterBinding ( "," argument+=ParameterBinding)*)? ')' ')' ('.' reduction+=[Member|EString])* ('.' reduction+=MemberReference)* ; ; VariableUse returns VariableUse: VariableUse returns VariableUse: Loading @@ -75,7 +79,7 @@ VariableUse returns VariableUse: '->' '->' variable=[Variable|EString] variable=[Variable|EString] ('(' argument+=ParameterBinding ( "," argument+=ParameterBinding)* ')' )? ('(' argument+=ParameterBinding ( "," argument+=ParameterBinding)* ')' )? ("." reduction+=[Member|EString])* ("." reduction+=MemberReference)* ; ; TimeLabelUse returns TimeLabelUse: TimeLabelUse returns TimeLabelUse: Loading Loading @@ -518,7 +522,7 @@ Variable returns Variable: Interaction returns Message: Interaction returns Message: sourceGate=[GateReference|EStringDot] sourceGate=[GateReference|EStringDot] ('sends' | isTrigger=Trigger) ('sends' | isTrigger=Trigger) argument+=DataUse argument=DataUse 'to' 'to' target+=Target ( "," target+=Target)* target+=Target ( "," target+=Target)* ( ( Loading @@ -540,7 +544,7 @@ Trigger returns ecore::EBoolean : Target returns Target: Target returns Target: targetGate=[GateReference|EStringDot] targetGate=[GateReference|EStringDot] ('where it is' 'assigned' 'to' variable+=[Variable|EString])? ('where it is' 'assigned' 'to' variable=[Variable|EString])? ( ( 'with' 'with' '{' '{' Loading Loading @@ -600,11 +604,17 @@ Behaviour returns Behaviour: ; ; Block returns Block: Block returns Block: ('[' guard=DataUse ']')? ('[' guard+=LocalExpression ']')? '{' '{' behaviour+=Behaviour ( behaviour+=Behaviour)* behaviour+=Behaviour ( behaviour+=Behaviour)* '}' '}' ; ; LocalExpression returns LocalExpression: expression=DataUse ; CompoundBehaviour returns CompoundBehaviour: CompoundBehaviour returns CompoundBehaviour: block=Block block=Block ; ; Loading Loading @@ -634,7 +644,7 @@ TimerStart returns TimerStart: BoundedLoopBehaviour returns BoundedLoopBehaviour: BoundedLoopBehaviour returns BoundedLoopBehaviour: 'repeat' 'repeat' numIteration=DataUse numIteration+=LocalExpression 'times' 'times' // 'from' startValue=DataInstanceSpecification // 'from' startValue=DataInstanceSpecification // 'to' endValue=DataInstanceSpecification // 'to' endValue=DataInstanceSpecification Loading