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:
//referenced DataInstance, arguments or reduction optional
(
(
dataInstance=[tdl::DataInstance|NumberAsIdentifier] |
( dataInstance=[tdl::DataInstance|Identifier]
(unassignedMember=UnassignedMemberTreatment)?
( dataInstance=[tdl::DataInstance|NumberAsIdentifier] |
dataInstance=[tdl::DataInstance|Identifier]
)
(unassignedMember=UnassignedMemberTreatment)?
)
(
('(' argument+=ParameterBinding ( "," argument+=ParameterBinding)* ')' )
......@@ -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)?
('(' 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)?
('(' 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'
'{'
......@@ -466,6 +475,7 @@ DataInstanceUse returns tdl::DataInstanceUse:
DataResourceMapping returns tdl::DataResourceMapping:
{tdl::DataResourceMapping}
'Use'
//TODO: why is this optional?
(resourceURI=String0)?
('as' name=Identifier)?
('with'
......@@ -531,7 +541,6 @@ CollectionDataInstance returns tdl::CollectionDataInstance:
name=Identifier
'containing' '{'
(item+=StaticDataUse ("," item+=StaticDataUse)*)?
'}'
('with'
'{'
......@@ -543,7 +552,7 @@ CollectionDataInstance returns tdl::CollectionDataInstance:
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:
'default'
......@@ -562,6 +571,11 @@ Identifier returns ecore::EString:
ID
;
QIdentifier returns ecore::EString:
ID ('.' ID)+
;
PredefinedIdentifierBinary returns ecore::EString:
'+' | '-' | '*' | '/' | 'mod'
| '>' | '<' | '>=' | '<=' | '>='
......@@ -589,7 +603,7 @@ ElementImport returns tdl::ElementImport:
|
(importedElement+=[tdl::PackageableElement|Identifier] ( "," importedElement+=[tdl::PackageableElement|Identifier])*)
)
'from' importedPackage=[tdl::Package|Identifier]
'from' (importedPackage=[tdl::Package|Identifier] | importedPackage=[tdl::Package|QIdentifier])
('with'
'{'
(comment+=Comment (comment+=Comment)*)?
......@@ -726,7 +740,7 @@ InlineAction returns tdl::InlineAction:
';';
Interaction returns tdl::Interaction:
Message | ProcedureCall
Message | ProcedureCall | ProcedureCallResponse
;
Message returns tdl::Message:
......@@ -756,6 +770,28 @@ ProcedureCall returns tdl::ProcedureCall:
'on'
target+=TargetProcedure
//TODO: add support for responses
(
'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)* ';' )?
'}')?
';'
;
ProcedureCallResponse returns tdl::ProcedureCall:
sourceGate=[tdl::GateReference|IdentifierDot]
'responds'
'with'
signature=[tdl::ProcedureSignature|Identifier]
'('argument+=ParameterBinding ("," argument+=ParameterBinding)*')'
'to'
target+=TargetProcedure
(
'with'
'{'
......@@ -763,12 +799,14 @@ ProcedureCall returns tdl::ProcedureCall:
(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 :
'triggers'
;
......@@ -1019,7 +1057,7 @@ enum UnassignedMemberTreatment returns tdl::UnassignedMemberTreatment:
StructuredDataInstance returns tdl::StructuredDataInstance:
{tdl::StructuredDataInstance}
dataType=[tdl::DataType|Identifier]
name=Identifier
(name=Identifier | name=NumberAsIdentifier)
(unassignedMember=UnassignedMemberTreatment)?
'('( memberAssignment+=MemberAssignment (',' memberAssignment+=MemberAssignment)* )?')'
('with'
......@@ -1036,7 +1074,7 @@ StructuredDataType returns tdl::StructuredDataType:
'Type'
name=Identifier
(extension=Extension)?
('(' member+=Member ( "," member+=Member)* ')')?
'(' ( member+=Member ( "," member+=Member)* )? ')'
(
'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