Commit f135c4aa authored by Philip Makedonski's avatar Philip Makedonski
Browse files

+ maintenance and enhancements

+ inline collection items
+ improved distinction of structured and simple data types and instances
+ literal value use
+ QIdentifier (for packages only so far)
+ basic procedure call response (postprocessing needs to link it to the call)
+ numeric identifiers for structured data
parent 23f5be33
...@@ -427,10 +427,10 @@ DataInstanceUse returns tdl::DataInstanceUse: ...@@ -427,10 +427,10 @@ DataInstanceUse returns tdl::DataInstanceUse:
//referenced DataInstance, arguments or reduction optional //referenced DataInstance, arguments or reduction optional
( (
( (
dataInstance=[tdl::DataInstance|NumberAsIdentifier] | ( dataInstance=[tdl::DataInstance|NumberAsIdentifier] |
( dataInstance=[tdl::DataInstance|Identifier] dataInstance=[tdl::DataInstance|Identifier]
(unassignedMember=UnassignedMemberTreatment)?
) )
(unassignedMember=UnassignedMemberTreatment)?
) )
( (
('(' argument+=ParameterBinding ( "," argument+=ParameterBinding)* ')' ) ('(' argument+=ParameterBinding ( "," argument+=ParameterBinding)* ')' )
...@@ -441,18 +441,27 @@ DataInstanceUse returns tdl::DataInstanceUse: ...@@ -441,18 +441,27 @@ DataInstanceUse returns tdl::DataInstanceUse:
)? )?
) )
| |
//anonymous with data type, arguments mandatory //anonymous with data type, arguments mandatory, only structured data types
( (
'new' dataType=[tdl::DataType|Identifier] 'new' dataType=[tdl::StructuredDataType|Identifier]
(unassignedMember=UnassignedMemberTreatment)? (unassignedMember=UnassignedMemberTreatment)?
('(' argument+=ParameterBinding ( "," argument+=ParameterBinding)* ')' ) ('(' argument+=ParameterBinding ( "," argument+=ParameterBinding)* ')' )
) )
| |
//anonymous with no data type, arguments mandatory, otherwise AnyValue //anonymous with no data type, arguments mandatory, otherwise AnyValue, only structured data types
( (
(unassignedMember=UnassignedMemberTreatment)? (unassignedMember=UnassignedMemberTreatment)?
('(' argument+=ParameterBinding ( "," argument+=ParameterBinding)* ')' ) ('(' 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' ('with'
'{' '{'
...@@ -466,6 +475,7 @@ DataInstanceUse returns tdl::DataInstanceUse: ...@@ -466,6 +475,7 @@ DataInstanceUse returns tdl::DataInstanceUse:
DataResourceMapping returns tdl::DataResourceMapping: DataResourceMapping returns tdl::DataResourceMapping:
{tdl::DataResourceMapping} {tdl::DataResourceMapping}
'Use' 'Use'
//TODO: why is this optional?
(resourceURI=String0)? (resourceURI=String0)?
('as' name=Identifier)? ('as' name=Identifier)?
('with' ('with'
...@@ -531,7 +541,6 @@ CollectionDataInstance returns tdl::CollectionDataInstance: ...@@ -531,7 +541,6 @@ CollectionDataInstance returns tdl::CollectionDataInstance:
name=Identifier name=Identifier
'containing' '{' 'containing' '{'
(item+=StaticDataUse ("," item+=StaticDataUse)*)? (item+=StaticDataUse ("," item+=StaticDataUse)*)?
'}' '}'
('with' ('with'
'{' '{'
...@@ -543,7 +552,7 @@ CollectionDataInstance returns tdl::CollectionDataInstance: ...@@ -543,7 +552,7 @@ CollectionDataInstance returns tdl::CollectionDataInstance:
DataUse returns tdl::DataUse: DataUse returns tdl::DataUse:
DataInstanceUse | FunctionCall | PredefinedFunctionCall | FormalParameterUse | TimeLabelUse | VariableUse | AnyValue | AnyValueOrOmit | OmitValue; DataInstanceUse | FunctionCall | PredefinedFunctionCall | FormalParameterUse | TimeLabelUse | VariableUse | AnyValue | AnyValueOrOmit | OmitValue | LiteralValueUse;
DefaultBehaviour returns tdl::DefaultBehaviour: DefaultBehaviour returns tdl::DefaultBehaviour:
'default' 'default'
...@@ -562,6 +571,11 @@ Identifier returns ecore::EString: ...@@ -562,6 +571,11 @@ Identifier returns ecore::EString:
ID ID
; ;
QIdentifier returns ecore::EString:
ID ('.' ID)+
;
PredefinedIdentifierBinary returns ecore::EString: PredefinedIdentifierBinary returns ecore::EString:
'+' | '-' | '*' | '/' | 'mod' '+' | '-' | '*' | '/' | 'mod'
| '>' | '<' | '>=' | '<=' | '>=' | '>' | '<' | '>=' | '<=' | '>='
...@@ -589,7 +603,7 @@ ElementImport returns tdl::ElementImport: ...@@ -589,7 +603,7 @@ ElementImport returns tdl::ElementImport:
| |
(importedElement+=[tdl::PackageableElement|Identifier] ( "," importedElement+=[tdl::PackageableElement|Identifier])*) (importedElement+=[tdl::PackageableElement|Identifier] ( "," importedElement+=[tdl::PackageableElement|Identifier])*)
) )
'from' importedPackage=[tdl::Package|Identifier] 'from' (importedPackage=[tdl::Package|Identifier] | importedPackage=[tdl::Package|QIdentifier])
('with' ('with'
'{' '{'
(comment+=Comment (comment+=Comment)*)? (comment+=Comment (comment+=Comment)*)?
...@@ -726,7 +740,7 @@ InlineAction returns tdl::InlineAction: ...@@ -726,7 +740,7 @@ InlineAction returns tdl::InlineAction:
';'; ';';
Interaction returns tdl::Interaction: Interaction returns tdl::Interaction:
Message | ProcedureCall Message | ProcedureCall | ProcedureCallResponse
; ;
Message returns tdl::Message: Message returns tdl::Message:
...@@ -756,6 +770,7 @@ ProcedureCall returns tdl::ProcedureCall: ...@@ -756,6 +770,7 @@ ProcedureCall returns tdl::ProcedureCall:
'on' 'on'
target+=TargetProcedure target+=TargetProcedure
//TODO: add support for responses //TODO: add support for responses
( (
'with' 'with'
'{' '{'
...@@ -769,6 +784,29 @@ ProcedureCall returns tdl::ProcedureCall: ...@@ -769,6 +784,29 @@ ProcedureCall returns tdl::ProcedureCall:
';' ';'
; ;
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)* ';' )?
'}')?
';'
;
Trigger returns ecore::EBooleanObject : Trigger returns ecore::EBooleanObject :
'triggers' 'triggers'
; ;
...@@ -1019,7 +1057,7 @@ enum UnassignedMemberTreatment returns tdl::UnassignedMemberTreatment: ...@@ -1019,7 +1057,7 @@ enum UnassignedMemberTreatment returns tdl::UnassignedMemberTreatment:
StructuredDataInstance returns tdl::StructuredDataInstance: StructuredDataInstance returns tdl::StructuredDataInstance:
{tdl::StructuredDataInstance} {tdl::StructuredDataInstance}
dataType=[tdl::DataType|Identifier] dataType=[tdl::DataType|Identifier]
name=Identifier (name=Identifier | name=NumberAsIdentifier)
(unassignedMember=UnassignedMemberTreatment)? (unassignedMember=UnassignedMemberTreatment)?
'('( memberAssignment+=MemberAssignment (',' memberAssignment+=MemberAssignment)* )?')' '('( memberAssignment+=MemberAssignment (',' memberAssignment+=MemberAssignment)* )?')'
('with' ('with'
...@@ -1036,7 +1074,7 @@ StructuredDataType returns tdl::StructuredDataType: ...@@ -1036,7 +1074,7 @@ StructuredDataType returns tdl::StructuredDataType:
'Type' 'Type'
name=Identifier name=Identifier
(extension=Extension)? (extension=Extension)?
('(' member+=Member ( "," member+=Member)* ')')? '(' ( member+=Member ( "," member+=Member)* )? ')'
( (
'with' 'with'
'{' '{'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment