Skip to content
Snippets Groups Projects
Commit 8467a55d authored by Philip Makedonski's avatar Philip Makedonski
Browse files

+ aligned with latest updates

+ added literal value use
+ added extension / inheritance
* restored optional behaviour
parent 0cd1ae9f
No related branches found
No related tags found
No related merge requests found
...@@ -87,6 +87,7 @@ AnnotationType returns tdl::AnnotationType: ...@@ -87,6 +87,7 @@ AnnotationType returns tdl::AnnotationType:
{tdl::AnnotationType} {tdl::AnnotationType}
'Annotation' 'Annotation'
name=Identifier name=Identifier
(extension=Extension)?
('with' ('with'
'{' '{'
(comment+=Comment (comment+=Comment)*)? (comment+=Comment (comment+=Comment)*)?
...@@ -183,7 +184,7 @@ Behaviour returns tdl::Behaviour: ...@@ -183,7 +184,7 @@ Behaviour returns tdl::Behaviour:
| UnboundedLoopBehaviour | UnboundedLoopBehaviour
| ConditionalBehaviour | ConditionalBehaviour
| CompoundBehaviour | CompoundBehaviour
//| OptionalBehaviour | OptionalBehaviour
| DefaultBehaviour | DefaultBehaviour
| InterruptBehaviour | InterruptBehaviour
| VerdictAssignment | VerdictAssignment
...@@ -328,6 +329,7 @@ ComponentType returns tdl::ComponentType: ...@@ -328,6 +329,7 @@ ComponentType returns tdl::ComponentType:
{tdl::ComponentType} {tdl::ComponentType}
'Component' 'Type' 'Component' 'Type'
name=Identifier name=Identifier
(extension=Extension)?
'having' 'having'
'{' '{'
(timer+=Timer)* (timer+=Timer)*
...@@ -698,6 +700,7 @@ GateType returns tdl::GateType: ...@@ -698,6 +700,7 @@ GateType returns tdl::GateType:
(kind=GateTypeKind)? (kind=GateTypeKind)?
'Gate' 'Type' 'Gate' 'Type'
name=Identifier name=Identifier
(extension=Extension)?
'accepts' 'accepts'
dataType+=[tdl::DataType|Identifier] ( "," dataType+=[tdl::DataType|Identifier])* dataType+=[tdl::DataType|Identifier] ( "," dataType+=[tdl::DataType|Identifier])*
('with' ('with'
...@@ -841,21 +844,21 @@ OmitValue returns tdl::OmitValue: ...@@ -841,21 +844,21 @@ OmitValue returns tdl::OmitValue:
'}')?; '}')?;
//OptionalBehaviour returns tdl::OptionalBehaviour: OptionalBehaviour returns tdl::OptionalBehaviour:
// 'optionally' 'optionally'
// block=Block block=Block
// ( (
// 'with' 'with'
// '{' '{'
// (comment+=Comment (comment+=Comment)*)? (comment+=Comment (comment+=Comment)*)?
// (annotation+=Annotation (annotation+=Annotation)*)? (annotation+=Annotation (annotation+=Annotation)*)?
// ('test' 'objectives' ':' testObjective+=[tdl::TestObjective|Identifier] ( "," testObjective+=[tdl::TestObjective|Identifier])* ';')? ('test' 'objectives' ':' testObjective+=[tdl::TestObjective|Identifier] ( "," testObjective+=[tdl::TestObjective|Identifier])* ';')?
// ('name' name=Identifier)? ('name' name=Identifier)?
// '}')? '}')?
// (exceptional+=ExceptionalBehaviour ( exceptional+=ExceptionalBehaviour)*)? (exceptional+=ExceptionalBehaviour ( exceptional+=ExceptionalBehaviour)*)?
// (periodic+=PeriodicBehaviour ( periodic+=PeriodicBehaviour)* )? (periodic+=PeriodicBehaviour ( periodic+=PeriodicBehaviour)* )?
// ';' ';'
// ; ;
...@@ -987,7 +990,7 @@ SimpleDataType_Impl returns tdl::SimpleDataType: ...@@ -987,7 +990,7 @@ SimpleDataType_Impl returns tdl::SimpleDataType:
; ;
StaticDataUse returns tdl::StaticDataUse: StaticDataUse returns tdl::StaticDataUse:
DataInstanceUse | AnyValue | AnyValueOrOmit | OmitValue; DataInstanceUse | AnyValue | AnyValueOrOmit | OmitValue | LiteralValueUse;
Stop returns tdl::Stop: Stop returns tdl::Stop:
{tdl::Stop} {tdl::Stop}
...@@ -1032,6 +1035,7 @@ StructuredDataType returns tdl::StructuredDataType: ...@@ -1032,6 +1035,7 @@ StructuredDataType returns tdl::StructuredDataType:
//'Structured' 'Data' 'Type' //'Structured' 'Data' 'Type'
'Type' 'Type'
name=Identifier name=Identifier
(extension=Extension)?
('(' member+=Member ( "," member+=Member)* ')')? ('(' member+=Member ( "," member+=Member)* ')')?
( (
'with' 'with'
...@@ -1349,4 +1353,25 @@ Wait returns tdl::Wait: ...@@ -1349,4 +1353,25 @@ Wait returns tdl::Wait:
NumberAsIdentifier returns ecore::EString: NumberAsIdentifier returns ecore::EString:
'-'? INT ('.' INT)?; '-'? INT ('.' INT)?;
\ No newline at end of file Extension returns tdl::Extension:
'extends' extending=[tdl::PackageableElement|Identifier]
;
LiteralValueUse returns tdl::LiteralValueUse:
{tdl::LiteralValueUse}
value=String0
(
'of' 'type' dataType=[tdl::DataType|Identifier]
)?
('with'
'{'
('name' name=Identifier)?
(comment+=Comment (comment+=Comment)*)?
(annotation+=Annotation (annotation+=Annotation)*)?
'}')?
;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment