diff --git a/plugins/org.etsi.mts.tdl.TDLan2.feature/.project b/plugins/org.etsi.mts.tdl.TDLan2.feature/.project new file mode 100644 index 0000000000000000000000000000000000000000..4f4da423063ccf183bd0b934d33cd4adbcd624a3 --- /dev/null +++ b/plugins/org.etsi.mts.tdl.TDLan2.feature/.project @@ -0,0 +1,17 @@ + + + org.etsi.mts.tdl.TDLan2.feature + + + + + + org.eclipse.pde.FeatureBuilder + + + + + + org.eclipse.pde.FeatureNature + + diff --git a/plugins/org.etsi.mts.tdl.TDLan2.feature/.settings/org.eclipse.core.resources.prefs b/plugins/org.etsi.mts.tdl.TDLan2.feature/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000000000000000000000000000000000000..99f26c0203a7844de00dbfc56e6a35d8ed3c022c --- /dev/null +++ b/plugins/org.etsi.mts.tdl.TDLan2.feature/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/plugins/org.etsi.mts.tdl.TDLan2.feature/build.properties b/plugins/org.etsi.mts.tdl.TDLan2.feature/build.properties new file mode 100644 index 0000000000000000000000000000000000000000..64f93a9f0b7328eb563aa5ad6cec7f828020e124 --- /dev/null +++ b/plugins/org.etsi.mts.tdl.TDLan2.feature/build.properties @@ -0,0 +1 @@ +bin.includes = feature.xml diff --git a/plugins/org.etsi.mts.tdl.TDLan2.feature/feature.xml b/plugins/org.etsi.mts.tdl.TDLan2.feature/feature.xml new file mode 100644 index 0000000000000000000000000000000000000000..b393b8dc1dde02b75a69f4ad3ba3a7f73a999981 --- /dev/null +++ b/plugins/org.etsi.mts.tdl.TDLan2.feature/feature.xml @@ -0,0 +1,23 @@ + + + + + + diff --git a/plugins/org.etsi.mts.tdl.TDLan2.ide/.classpath b/plugins/org.etsi.mts.tdl.TDLan2.ide/.classpath new file mode 100644 index 0000000000000000000000000000000000000000..9081d4f7036ea9d3101e3d6e348ec381461872fd --- /dev/null +++ b/plugins/org.etsi.mts.tdl.TDLan2.ide/.classpath @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/plugins/org.etsi.mts.tdl.TDLan2.ide/.project b/plugins/org.etsi.mts.tdl.TDLan2.ide/.project new file mode 100644 index 0000000000000000000000000000000000000000..2101ff912ab6f5b9606e66e476ff611aa0f135c6 --- /dev/null +++ b/plugins/org.etsi.mts.tdl.TDLan2.ide/.project @@ -0,0 +1,34 @@ + + + org.etsi.mts.tdl.TDLan2.ide + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.xtext.ui.shared.xtextNature + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + diff --git a/plugins/org.etsi.mts.tdl.TDLan2.ide/.settings/org.eclipse.core.resources.prefs b/plugins/org.etsi.mts.tdl.TDLan2.ide/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000000000000000000000000000000000000..99f26c0203a7844de00dbfc56e6a35d8ed3c022c --- /dev/null +++ b/plugins/org.etsi.mts.tdl.TDLan2.ide/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/plugins/org.etsi.mts.tdl.TDLan2.ide/.settings/org.eclipse.jdt.core.prefs b/plugins/org.etsi.mts.tdl.TDLan2.ide/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000000000000000000000000000000000..0c68a61dca867ceb49e79d2402935261ec3e3809 --- /dev/null +++ b/plugins/org.etsi.mts.tdl.TDLan2.ide/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/plugins/org.etsi.mts.tdl.TDLan2.ide/META-INF/MANIFEST.MF b/plugins/org.etsi.mts.tdl.TDLan2.ide/META-INF/MANIFEST.MF new file mode 100644 index 0000000000000000000000000000000000000000..e02c6dafa19307d1d969f4693c5452508faae4ea --- /dev/null +++ b/plugins/org.etsi.mts.tdl.TDLan2.ide/META-INF/MANIFEST.MF @@ -0,0 +1,12 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: org.etsi.mts.tdl.TDLan2.ide +Bundle-Vendor: My Company +Bundle-Version: 1.0.0.qualifier +Bundle-SymbolicName: org.etsi.mts.tdl.TDLan2.ide; singleton:=true +Bundle-ActivationPolicy: lazy +Require-Bundle: org.etsi.mts.tdl.TDLan2, + org.etsi.mts.tdl.model, + org.eclipse.xtext.ide, + org.eclipse.xtext.xbase.ide +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 diff --git a/plugins/org.etsi.mts.tdl.TDLan2.ide/build.properties b/plugins/org.etsi.mts.tdl.TDLan2.ide/build.properties new file mode 100644 index 0000000000000000000000000000000000000000..5c6bbf99f082bb19d8aa4ec89f7902c3e8936171 --- /dev/null +++ b/plugins/org.etsi.mts.tdl.TDLan2.ide/build.properties @@ -0,0 +1,6 @@ +source.. = src/,\ + src-gen/,\ + xtend-gen/ +bin.includes = .,\ + META-INF/ +bin.excludes = **/*.xtend diff --git a/plugins/org.etsi.mts.tdl.TDLan2.repository/.project b/plugins/org.etsi.mts.tdl.TDLan2.repository/.project new file mode 100644 index 0000000000000000000000000000000000000000..5a2d876c9ae53a074b2b609d18be7228e20221af --- /dev/null +++ b/plugins/org.etsi.mts.tdl.TDLan2.repository/.project @@ -0,0 +1,11 @@ + + + org.etsi.mts.tdl.TDLan2.repository + + + + + + + + diff --git a/plugins/org.etsi.mts.tdl.TDLan2.repository/.settings/org.eclipse.core.resources.prefs b/plugins/org.etsi.mts.tdl.TDLan2.repository/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000000000000000000000000000000000000..99f26c0203a7844de00dbfc56e6a35d8ed3c022c --- /dev/null +++ b/plugins/org.etsi.mts.tdl.TDLan2.repository/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/plugins/org.etsi.mts.tdl.TDLan2.repository/category.xml b/plugins/org.etsi.mts.tdl.TDLan2.repository/category.xml new file mode 100644 index 0000000000000000000000000000000000000000..7966a5ff4e8c45413e34a4992327519846588aaa --- /dev/null +++ b/plugins/org.etsi.mts.tdl.TDLan2.repository/category.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/plugins/org.etsi.mts.tdl.TDLan2.ui/.classpath b/plugins/org.etsi.mts.tdl.TDLan2.ui/.classpath new file mode 100644 index 0000000000000000000000000000000000000000..9081d4f7036ea9d3101e3d6e348ec381461872fd --- /dev/null +++ b/plugins/org.etsi.mts.tdl.TDLan2.ui/.classpath @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/plugins/org.etsi.mts.tdl.TDLan2.ui/.project b/plugins/org.etsi.mts.tdl.TDLan2.ui/.project new file mode 100644 index 0000000000000000000000000000000000000000..b9d18cc16416e0413a0eb6f4ec53e7f477ed1e86 --- /dev/null +++ b/plugins/org.etsi.mts.tdl.TDLan2.ui/.project @@ -0,0 +1,34 @@ + + + org.etsi.mts.tdl.TDLan2.ui + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.xtext.ui.shared.xtextNature + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + diff --git a/plugins/org.etsi.mts.tdl.TDLan2.ui/.settings/org.eclipse.core.resources.prefs b/plugins/org.etsi.mts.tdl.TDLan2.ui/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000000000000000000000000000000000000..99f26c0203a7844de00dbfc56e6a35d8ed3c022c --- /dev/null +++ b/plugins/org.etsi.mts.tdl.TDLan2.ui/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/plugins/org.etsi.mts.tdl.TDLan2.ui/.settings/org.eclipse.jdt.core.prefs b/plugins/org.etsi.mts.tdl.TDLan2.ui/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000000000000000000000000000000000..0c68a61dca867ceb49e79d2402935261ec3e3809 --- /dev/null +++ b/plugins/org.etsi.mts.tdl.TDLan2.ui/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/plugins/org.etsi.mts.tdl.TDLan2.ui/META-INF/MANIFEST.MF b/plugins/org.etsi.mts.tdl.TDLan2.ui/META-INF/MANIFEST.MF new file mode 100644 index 0000000000000000000000000000000000000000..92ff3c85cd0a09e89fe459937e45a7166dad4be9 --- /dev/null +++ b/plugins/org.etsi.mts.tdl.TDLan2.ui/META-INF/MANIFEST.MF @@ -0,0 +1,17 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: org.etsi.mts.tdl.TDLan2.ui +Bundle-Vendor: My Company +Bundle-Version: 1.0.0.qualifier +Bundle-SymbolicName: org.etsi.mts.tdl.TDLan2.ui; singleton:=true +Bundle-ActivationPolicy: lazy +Require-Bundle: org.etsi.mts.tdl.TDLan2, + org.etsi.mts.tdl.TDLan2.ide, + org.etsi.mts.tdl.model, + org.eclipse.xtext.ui, + org.eclipse.xtext.ui.shared, + org.eclipse.xtext.ui.codetemplates.ui, + org.eclipse.ui.editors;bundle-version="3.5.0", + org.eclipse.ui.ide;bundle-version="3.5.0" +Import-Package: org.apache.log4j +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 diff --git a/plugins/org.etsi.mts.tdl.TDLan2.ui/build.properties b/plugins/org.etsi.mts.tdl.TDLan2.ui/build.properties new file mode 100644 index 0000000000000000000000000000000000000000..323f56c513d04a1e0ba18fe2dad51f354dcb3201 --- /dev/null +++ b/plugins/org.etsi.mts.tdl.TDLan2.ui/build.properties @@ -0,0 +1,7 @@ +source.. = src/,\ + src-gen/,\ + xtend-gen/ +bin.includes = .,\ + META-INF/,\ + plugin.xml +bin.excludes = **/*.xtend diff --git a/plugins/org.etsi.mts.tdl.TDLan2/.classpath b/plugins/org.etsi.mts.tdl.TDLan2/.classpath new file mode 100644 index 0000000000000000000000000000000000000000..9081d4f7036ea9d3101e3d6e348ec381461872fd --- /dev/null +++ b/plugins/org.etsi.mts.tdl.TDLan2/.classpath @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/plugins/org.etsi.mts.tdl.TDLan2/.launch/Generate TDLan2 (tdlan2) Language Infrastructure.launch b/plugins/org.etsi.mts.tdl.TDLan2/.launch/Generate TDLan2 (tdlan2) Language Infrastructure.launch new file mode 100644 index 0000000000000000000000000000000000000000..817aee8b9773f97d712fd164ff504c3c5104d144 --- /dev/null +++ b/plugins/org.etsi.mts.tdl.TDLan2/.launch/Generate TDLan2 (tdlan2) Language Infrastructure.launch @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/plugins/org.etsi.mts.tdl.TDLan2/.launch/Launch Runtime Eclipse.launch b/plugins/org.etsi.mts.tdl.TDLan2/.launch/Launch Runtime Eclipse.launch new file mode 100644 index 0000000000000000000000000000000000000000..80cf0d7aaf13320890fab0bd8489605fb042e6a0 --- /dev/null +++ b/plugins/org.etsi.mts.tdl.TDLan2/.launch/Launch Runtime Eclipse.launch @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/org.etsi.mts.tdl.TDLan2/.project b/plugins/org.etsi.mts.tdl.TDLan2/.project new file mode 100644 index 0000000000000000000000000000000000000000..e432f8e7ef878331bd07913180e4003c312f2439 --- /dev/null +++ b/plugins/org.etsi.mts.tdl.TDLan2/.project @@ -0,0 +1,34 @@ + + + org.etsi.mts.tdl.TDLan2 + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.xtext.ui.shared.xtextNature + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + diff --git a/plugins/org.etsi.mts.tdl.TDLan2/.settings/org.eclipse.core.resources.prefs b/plugins/org.etsi.mts.tdl.TDLan2/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000000000000000000000000000000000000..99f26c0203a7844de00dbfc56e6a35d8ed3c022c --- /dev/null +++ b/plugins/org.etsi.mts.tdl.TDLan2/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/plugins/org.etsi.mts.tdl.TDLan2/.settings/org.eclipse.jdt.core.prefs b/plugins/org.etsi.mts.tdl.TDLan2/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000000000000000000000000000000000..0c68a61dca867ceb49e79d2402935261ec3e3809 --- /dev/null +++ b/plugins/org.etsi.mts.tdl.TDLan2/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/plugins/org.etsi.mts.tdl.TDLan2/META-INF/MANIFEST.MF b/plugins/org.etsi.mts.tdl.TDLan2/META-INF/MANIFEST.MF new file mode 100644 index 0000000000000000000000000000000000000000..771212c847bf8f66997f6c3ab439a952ebb392cf --- /dev/null +++ b/plugins/org.etsi.mts.tdl.TDLan2/META-INF/MANIFEST.MF @@ -0,0 +1,12 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: org.etsi.mts.tdl.TDLan2 +Bundle-Vendor: My Company +Bundle-Version: 1.0.0.qualifier +Bundle-SymbolicName: org.etsi.mts.tdl.TDLan2; singleton:=true +Bundle-ActivationPolicy: lazy +Require-Bundle: org.etsi.mts.tdl.model, + org.eclipse.xtext, + org.eclipse.xtext.xbase, + org.eclipse.equinox.common;bundle-version="3.5.0" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 diff --git a/plugins/org.etsi.mts.tdl.TDLan2/build.properties b/plugins/org.etsi.mts.tdl.TDLan2/build.properties new file mode 100644 index 0000000000000000000000000000000000000000..388d55f0f68d2339d868d792ad593bd785dd48c0 --- /dev/null +++ b/plugins/org.etsi.mts.tdl.TDLan2/build.properties @@ -0,0 +1,19 @@ +source.. = src/,\ + src-gen/,\ + xtend-gen/ +bin.includes = .,\ + META-INF/ +bin.excludes = **/*.mwe2,\ + **/*.xtend +additional.bundles = org.eclipse.xtext.xbase,\ + org.eclipse.xtext.common.types,\ + org.eclipse.xtext.xtext.generator,\ + org.eclipse.emf.codegen.ecore,\ + org.eclipse.emf.mwe.utils,\ + org.eclipse.emf.mwe2.launch,\ + org.eclipse.emf.mwe2.lib,\ + org.objectweb.asm,\ + org.apache.commons.logging,\ + org.apache.log4j,\ + com.ibm.icu,\ + org.eclipse.xtext.generator diff --git a/plugins/org.etsi.mts.tdl.TDLan2/src/org/etsi/mts/tdl/GenerateTDLan2.mwe2 b/plugins/org.etsi.mts.tdl.TDLan2/src/org/etsi/mts/tdl/GenerateTDLan2.mwe2 new file mode 100644 index 0000000000000000000000000000000000000000..0b189313c07fa8f7a66ebacd29f19b5b0a7a418d --- /dev/null +++ b/plugins/org.etsi.mts.tdl.TDLan2/src/org/etsi/mts/tdl/GenerateTDLan2.mwe2 @@ -0,0 +1,55 @@ +module org.etsi.mts.tdl.GenerateTDLan2 + +import org.eclipse.xtext.xtext.generator.* +import org.eclipse.xtext.xtext.generator.model.project.* + +var rootPath = ".." + +Workflow { + + component = XtextGenerator { + configuration = { + project = StandardProjectConfig { + baseName = "org.etsi.mts.tdl.TDLan2" + rootPath = rootPath + eclipsePlugin = { + enabled = true + } + createEclipseMetaData = true + } + code = { + encoding = "UTF-8" + lineDelimiter = "\n" + fileHeader = "/*\n * generated by Xtext \${version}\n */" + } + } + language = StandardLanguage { + name = "org.etsi.mts.tdl.TDLan2" + fileExtensions = "tdlan2" + referencedResource = "platform:/resource/org.etsi.mts.tdl.model/model/tdl.genmodel" + + fragment = ecore2xtext.Ecore2XtextValueConverterServiceFragment2 auto-inject {} + + parserGenerator = { + options = { + + classSplitting = true + backtrack = true + memoize = true + //kAsString = "8" + } + } + + formatter = { + generateStub = true + } + + serializer = { + generateStub = false + } + validator = { + // composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator" + } + } + } +} diff --git a/plugins/org.etsi.mts.tdl.TDLan2/src/org/etsi/mts/tdl/TDLan2.xtext b/plugins/org.etsi.mts.tdl.TDLan2/src/org/etsi/mts/tdl/TDLan2.xtext new file mode 100644 index 0000000000000000000000000000000000000000..5a9d77775124ce25b7ecf04d56e766e7cbf009bd --- /dev/null +++ b/plugins/org.etsi.mts.tdl.TDLan2/src/org/etsi/mts/tdl/TDLan2.xtext @@ -0,0 +1,1228 @@ +// automatically generated by Xtext +grammar org.etsi.mts.tdl.TDLan2 with org.eclipse.xtext.common.Terminals + +import "http://www.eclipse.org/emf/2002/Ecore" as ecore +import "http://www.etsi.org/spec/TDL/1.4.0" as tdl + +Package returns tdl::Package: + {tdl::Package} + 'Package' + name=Identifier + '{' + (^import+=ElementImport ( ^import+=ElementImport)* )? + (packagedElement+=PackageableElement ( packagedElement+=PackageableElement)* )? + (nestedPackage+=Package (nestedPackage+=Package)*)? + '}' + ( + 'with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + '}')? + ; + +Action returns tdl::Action: + Action_Impl | Function; + +ActionReference returns tdl::ActionReference: + 'perform' 'action' + action=[tdl::Action|Identifier] + ('(' actualParameter+=DataUse ( "," actualParameter+=DataUse)* ')' )? + ('on' componentInstance=[tdl::ComponentInstance|Identifier])? + ( + 'with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + ('test' 'objectives' ':' testObjective+=[tdl::TestObjective|Identifier] ( "," testObjective+=[tdl::TestObjective|Identifier])* ';')? + ('name' name=Identifier)? + ('time' 'label' timeLabel=TimeLabel)? + ('time' 'constraints' ':' timeConstraint+=TimeConstraint ( "," timeConstraint+=TimeConstraint)* ';' )? + '}')? + ';' + ; + +Action_Impl returns tdl::Action: + {tdl::Action} + 'Action' + name=Identifier + ('(' formalParameter+=FormalParameter ( "," formalParameter+=FormalParameter)* ')' )? + (':' body=String0)? + ('with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + '}')? + ';'; + +AlternativeBehaviour returns tdl::AlternativeBehaviour: + 'alternatively' + block+=Block ('or' block+=Block)* + ( + 'with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + ('test' 'objectives' ':' testObjective+=[tdl::TestObjective|Identifier] ( "," testObjective+=[tdl::TestObjective|Identifier])* ';')? + ('name' name=Identifier)? + (periodic+=PeriodicBehaviour ( periodic+=PeriodicBehaviour)* )? + (exceptional+=ExceptionalBehaviour ( exceptional+=ExceptionalBehaviour)*)? + '}' + )? + ('on' scope=[tdl::ComponentInstance|Identifier])? + ; + +Annotation returns tdl::Annotation: + key=[tdl::AnnotationType|Identifier] + (':' value=String0)? + ( + 'with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + (name=Identifier)? + '}')? + ';'; + +AnnotationType returns tdl::AnnotationType: + {tdl::AnnotationType} + 'Annotation' + name=Identifier + ('with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + '}')? + ';'; + +AnyValueOrOmit returns tdl::AnyValueOrOmit: + {tdl::AnyValueOrOmit} + '*' + //('(' argument+=ParameterBinding ( "," argument+=ParameterBinding)* ')' )? + ( + 'with' + '{' + ('reduction' '(' reduction+=[tdl::Member|Identifier] ( "," reduction+=[tdl::Member|Identifier])* ')' )? + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + ('name' name=Identifier)? + '}')? + ; + +AnyValue returns tdl::AnyValue: + {tdl::AnyValue} + name='?' + //TODO: remove dataTypeAssociation? + (':' dataType=[tdl::DataType|Identifier])? + //('(' argument+=ParameterBinding ( "," argument+=ParameterBinding)* ')' )? + ( + 'with' + '{' + ('reduction' '(' reduction+=[tdl::Member|Identifier] ( "," reduction+=[tdl::Member|Identifier])* ')' )? + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + //('name' name=Identifier)? + '}')? + ; + +ParameterBinding returns tdl::ParameterBinding: + parameter=[tdl::Parameter|Identifier] + '=' + dataUse=DataUse + ( + 'with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + ('name' name=Identifier)? + '}')? + ; + +Assertion returns tdl::Assertion: + {tdl::Assertion} + 'assert' + condition=DataUse + ('otherwise' 'set' 'verdict' 'to' otherwise=DataUse)? + ('with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + ('test' 'objectives' ':' testObjective+=[tdl::TestObjective|Identifier] ( "," testObjective+=[tdl::TestObjective|Identifier])* ';')? + ('name' name=Identifier)? + ('time' 'label' timeLabel=TimeLabel)? + ('time' 'constraints' ':' timeConstraint+=TimeConstraint ( "," timeConstraint+=TimeConstraint)* ';' )? + '}')? + ';'; + +Assignment returns tdl::Assignment: + //TODO: shall be mandatory + (componentInstance=[tdl::ComponentInstance|Identifier] '->')? + variable=VariableUse + '=' + expression=DataUse + ('with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + ('test' 'objectives' ':' testObjective+=[tdl::TestObjective|Identifier] ( "," testObjective+=[tdl::TestObjective|Identifier])* ';')? + ('name' name=Identifier)? + ('time' 'label' timeLabel=TimeLabel)? + ('time' 'constraints' ':' timeConstraint+=TimeConstraint ( "," timeConstraint+=TimeConstraint)* ';' )? + '}')? + ';'; + + +Behaviour returns tdl::Behaviour: + TimerStart +| TimerStop +| TimeOut +| Wait +| Quiescence +| PeriodicBehaviour +| AlternativeBehaviour +| ParallelBehaviour +| BoundedLoopBehaviour +| UnboundedLoopBehaviour +| ConditionalBehaviour +| CompoundBehaviour +//| OptionalBehaviour +| DefaultBehaviour +| InterruptBehaviour +| VerdictAssignment +| Assertion +| Stop +| Break +| Assignment +| InlineAction +| ActionReference +| TestDescriptionReference +| Interaction +; + + +BehaviourDescription returns tdl::BehaviourDescription: + behaviour=Behaviour + ( + 'with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + ('name' name=Identifier)? + '}' + )? + + ; + + +Block returns tdl::Block: + ('[' guard=DataUse ']')? + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + ('name' name=Identifier)? + behaviour+=Behaviour ( behaviour+=Behaviour)* + '}' + ; + +Boolean returns ecore::EBoolean: + 'true' | 'false' +; + +BoundedLoopBehaviour returns tdl::BoundedLoopBehaviour: + 'repeat' + numIteration=DataUse + 'times' +// 'from' startValue=DataInstanceSpecification +// 'to' endValue=DataInstanceSpecification +// ('with step' stepValue=DataInstanceSpecification)? + block=Block + ( + 'with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + ('test' 'objectives' ':' testObjective+=[tdl::TestObjective|Identifier] ( "," testObjective+=[tdl::TestObjective|Identifier])* ';')? + ('name' name=Identifier)? + (periodic+=PeriodicBehaviour ( periodic+=PeriodicBehaviour)* )? + (exceptional+=ExceptionalBehaviour ( exceptional+=ExceptionalBehaviour)*)? + '}' + )? + ('on' scope=[tdl::ComponentInstance|Identifier])? + ; + +Break returns tdl::Break: + {tdl::Break} + 'break' + ('with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + ('test' 'objectives' ':' testObjective+=[tdl::TestObjective|Identifier] ( "," testObjective+=[tdl::TestObjective|Identifier])* ';')? + ('name' name=Identifier)? + ('time' 'label' timeLabel=TimeLabel)? + ('time' 'constraints' ':' timeConstraint+=TimeConstraint ( "," timeConstraint+=TimeConstraint)* ';' )? + '}')? + ';'; + + + +Comment returns tdl::Comment: + 'Note' + (name=Identifier)? + ':' + body=String0 + + ( + 'with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + '}')? + ';'; + + +ComponentInstance returns tdl::ComponentInstance: + 'create' + role=ComponentInstanceRole + name=Identifier + 'of' 'type' type=[tdl::ComponentType|Identifier] + ('with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + '}' + )? + ';' + ; + +ComponentInstanceBinding returns tdl::ComponentInstanceBinding: + 'bind' + formalComponent=[tdl::ComponentInstance|Identifier] + 'to' actualComponent=[tdl::ComponentInstance|Identifier] + ('with' '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + ('name' name=Identifier)? + '}')? + ; + +enum ComponentInstanceRole returns tdl::ComponentInstanceRole: + SUT = 'SUT' | Tester = 'Tester'; + +ComponentType returns tdl::ComponentType: + {tdl::ComponentType} + 'Component' 'Type' + name=Identifier + 'having' + '{' + (timer+=Timer)* + (variable+=Variable)* + (gateInstance+=GateInstance)* + '}' + ('with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + '}')? + ; + +CompoundBehaviour returns tdl::CompoundBehaviour: + block=Block + ( + 'with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + ('test' 'objectives' ':' testObjective+=[tdl::TestObjective|Identifier] ( "," testObjective+=[tdl::TestObjective|Identifier])* ';')? + ('name' name=Identifier)? + (periodic+=PeriodicBehaviour ( periodic+=PeriodicBehaviour)* )? + (exceptional+=ExceptionalBehaviour ( exceptional+=ExceptionalBehaviour)*)? + '}' + )? + ('on' scope=[tdl::ComponentInstance|Identifier])? + ; + +ConditionalBehaviour returns tdl::ConditionalBehaviour: + 'if' + block+=Block (=>('else' block+=Block) | (('else' 'if' block+=Block)* ('else' block+=Block)))? + ( + 'with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + ('test' 'objectives' ':' testObjective+=[tdl::TestObjective|Identifier] ( "," testObjective+=[tdl::TestObjective|Identifier])* ';')? + ('name' name=Identifier)? + (periodic+=PeriodicBehaviour ( periodic+=PeriodicBehaviour)* )? + (exceptional+=ExceptionalBehaviour ( exceptional+=ExceptionalBehaviour)*)? + '}' + )? + ('on' scope=[tdl::ComponentInstance|Identifier])? + ; + +Connection returns tdl::Connection: + 'connect' + endPoint+=GateReference "to" endPoint+=GateReference + //('end point' endPointX+=[tdl::GateReference|Identifier])* + ( + 'with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + ('as' name=Identifier)? + '}')? + ';'; + +DataElementMapping returns tdl::DataElementMapping: + 'Map' + mappableDataElement=[tdl::MappableDataElement|Identifier] + ('to' elementURI=String0)? + 'in' dataResourceMapping=[tdl::DataResourceMapping|Identifier] + ('as' name=Identifier)? + + ('with' + '{' + (parameterMapping+=ParameterMapping)* + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + '}')? + ';'; + +DataInstance returns tdl::DataInstance: +// SimpleDataInstance_Impl | StructuredDataInstance | Verdict | TimeLabel; + SimpleDataInstance_Impl | StructuredDataInstance; + + +//DataInstanceUse returns tdl::DataInstanceUse: +// {tdl::DataInstanceUse} +// dataInstance=[tdl::DataInstance|Identifier] +// ('(' argument+=ParameterBinding ( "," argument+=ParameterBinding)* ')' )? +// ('.' reduction+=[tdl::Member|Identifier])* +// ('with' +// '{' +// ('name' name=Identifier)? +// (comment+=Comment (comment+=Comment)*)? +// (annotation+=Annotation (annotation+=Annotation)*)? +// '}')? +// ; + + +DataInstanceUse returns tdl::DataInstanceUse: + {tdl::DataInstanceUse} + ( + //referenced DataInstance, arguments or reduction optional + ( + ( + dataInstance=[tdl::DataInstance|NumberAsIdentifier] | + ( dataInstance=[tdl::DataInstance|Identifier] + (unassignedMember=UnassignedMemberTreatment)? + ) + ) + ( + ('(' argument+=ParameterBinding ( "," argument+=ParameterBinding)* ')' ) + | + ('.' reduction+=[tdl::Member|Identifier])* + )? + ) + | + //anonymous with data type, arguments mandatory + ( + 'new' dataType=[tdl::DataType|Identifier] + (unassignedMember=UnassignedMemberTreatment)? + ('(' argument+=ParameterBinding ( "," argument+=ParameterBinding)* ')' ) + ) + | + //anonymous with no data type, arguments mandatory, otherwise AnyValue + ( + (unassignedMember=UnassignedMemberTreatment)? + ('(' argument+=ParameterBinding ( "," argument+=ParameterBinding)* ')' ) + ) + ) + ('with' + '{' + ('name' name=Identifier)? + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + '}')? + ; + + +DataResourceMapping returns tdl::DataResourceMapping: + {tdl::DataResourceMapping} + 'Use' + (resourceURI=String0)? + ('as' name=Identifier)? + ('with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + '}')? + ';'; + +DataType returns tdl::DataType: + SimpleDataType_Impl | StructuredDataType | Time | Procedure; + +DataUse returns tdl::DataUse: + DataInstanceUse | FunctionCall | FormalParameterUse | TimeLabelUse | VariableUse | AnyValue | AnyValueOrOmit | OmitValue; + +DefaultBehaviour returns tdl::DefaultBehaviour: + 'default' + ('on' guardedComponent=[tdl::ComponentInstance|Identifier])? + block=Block + ( + 'with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + ('test' 'objectives' ':' testObjective+=[tdl::TestObjective|Identifier] ( "," testObjective+=[tdl::TestObjective|Identifier])* ';')? + ('name' name=Identifier)? + '}')?; + +Identifier returns ecore::EString: + ID +; + +IdentifierDot returns ecore::EString: + ID '.' ID +; + + +ElementImport returns tdl::ElementImport: + {tdl::ElementImport} + 'Import' + ( 'all' + | + (importedElement+=[tdl::PackageableElement|Identifier] ( "," importedElement+=[tdl::PackageableElement|Identifier])*) + ) + 'from' importedPackage=[tdl::Package|Identifier] + ('with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + (name=Identifier)? + '}')? + ';'; + + +ExceptionalBehaviour returns tdl::ExceptionalBehaviour: + DefaultBehaviour | InterruptBehaviour; + +Function returns tdl::Function: + 'Function' + name=Identifier + '(' (formalParameter+=FormalParameter ( "," formalParameter+=FormalParameter)* )? ')' + 'returns' + returnType=[tdl::DataType|Identifier] + (':' body=String0)? + ('with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + '}')? + ';'; + +FunctionCall returns tdl::FunctionCall: + 'instance' 'returned' 'from' + function=[tdl::Function|Identifier] + '(' + (argument+=ParameterBinding ( "," argument+=ParameterBinding)*)? + ')' + ('.' reduction+=[tdl::Member|Identifier])* + ('with' + '{' + ('name' name=Identifier)? + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + '}')? + ; + + +GateInstance returns tdl::GateInstance: + {tdl::GateInstance} + 'gate' + name=Identifier + 'of' 'type' type=[tdl::GateType|Identifier] + ('with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + '}')? + ';'; + +GateReference returns tdl::GateReference: + component=[tdl::ComponentInstance|Identifier] + '.' + gate=[tdl::GateInstance|Identifier] + ('with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + ('name' name=IdentifierDot)? + '}')? + ; + + +GateType returns tdl::GateType: + 'Gate' 'Type' + name=Identifier + 'accepts' + dataType+=[tdl::DataType|Identifier] ( "," dataType+=[tdl::DataType|Identifier])* + ('with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + '}')? + ';'; + +InlineAction returns tdl::InlineAction: + 'perform' 'action' ':' + body=String0 + ('on' componentInstance=[tdl::ComponentInstance|Identifier])? + ('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)* ';' )? + '}')? + ';'; + +Interaction returns tdl::Interaction: + Message | ProcedureCall + ; + +Message returns tdl::Message: + sourceGate=[tdl::GateReference|IdentifierDot] + ('sends' | (isTrigger?='triggers')) + argument+=DataUse + 'to' + target+=Target ( "," target+=Target)* + ( + '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)* ';' )? + '}')? + ';' + ; + +ProcedureCall returns tdl::ProcedureCall: + source=Target + 'calls' + procedure=[tdl::Procedure|Identifier] + //TODO: double check what the exact syntax shall be + //and what is return value and such + '(' argument+=DataUse (',' argument+=DataUse)* ')' + + 'on' + target+=Target ( "," target+=Target)* + ( + '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)* ';' )? + '}')? + ';' + ; + +Trigger returns ecore::EBooleanObject : + 'triggers' +; + + +InterruptBehaviour returns tdl::InterruptBehaviour: + 'interrupt' + ('on' guardedComponent=[tdl::ComponentInstance|Identifier])? + block=Block + ( + 'with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + ('test' 'objectives' ':' testObjective+=[tdl::TestObjective|Identifier] ( "," testObjective+=[tdl::TestObjective|Identifier])* ';')? + ('name' name=Identifier)? + '}')?; + +MappableDataElement returns tdl::MappableDataElement: +// SimpleDataType_Impl | SimpleDataInstance_Impl | StructuredDataType | StructuredDataInstance | Action_Impl | Function | Verdict | Time | TimeLabel; + SimpleDataType_Impl | SimpleDataInstance_Impl | StructuredDataType | StructuredDataInstance | Action_Impl | Function | Time; + +Member returns tdl::Member: + (isOptional?='optional')? + name=Identifier + 'of' 'type' + dataType=[tdl::DataType|Identifier] + ( + 'with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + '}')?; + +Optional returns ecore::EBoolean : + 'optional' | 'mandatory' +; + +MemberAssignment returns tdl::MemberAssignment: + member=[tdl::Member|Identifier] + '=' + memberSpec=StaticDataUse + ( + 'with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + ('name' name=Identifier)? + '}')?; + +ParameterMapping returns tdl::ParameterMapping: + parameter=[tdl::Parameter|Identifier] + ('mapped' 'to' parameterURI=String0)? + ('as' name=Identifier)? + ( + 'with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + '}')? + ';'; + +OmitValue returns tdl::OmitValue: + {tdl::OmitValue} + 'omit' + ( + 'with' + '{' + ('argument' '{' argument+=ParameterBinding ( "," argument+=ParameterBinding)* '}' )? + ('reduction' '(' reduction+=[tdl::Member|Identifier] ( "," reduction+=[tdl::Member|Identifier])* ')' )? + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + ('name' name=Identifier)? + '}')?; + + +//OptionalBehaviour returns tdl::OptionalBehaviour: +// 'optionally' +// block=Block +// ( +// 'with' +// '{' +// (comment+=Comment (comment+=Comment)*)? +// (annotation+=Annotation (annotation+=Annotation)*)? +// ('test' 'objectives' ':' testObjective+=[tdl::TestObjective|Identifier] ( "," testObjective+=[tdl::TestObjective|Identifier])* ';')? +// ('name' name=Identifier)? +// '}')? +// (exceptional+=ExceptionalBehaviour ( exceptional+=ExceptionalBehaviour)*)? +// (periodic+=PeriodicBehaviour ( periodic+=PeriodicBehaviour)* )? +// ';' +// ; + + + +PackageableElement returns tdl::PackageableElement: +// AnnotationType | TestObjective | DataResourceMapping | DataElementMapping | SimpleDataType_Impl | SimpleDataInstance_Impl | StructuredDataType | StructuredDataInstance | Action_Impl | Function | Verdict | ComponentType | GateType | Time | TimeLabel | TestConfiguration | TestDescription; + AnnotationType | TestObjective | DataResourceMapping | DataElementMapping | SimpleDataType_Impl | SimpleDataInstance_Impl | StructuredDataType | Procedure | StructuredDataInstance | Action_Impl | Function | ComponentType | GateType | Time | TestConfiguration | TestDescription; + +ParallelBehaviour returns tdl::ParallelBehaviour: + 'run' block+=Block ('in' 'parallel' 'to' block+=Block)* + ( + 'with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + ('test' 'objectives' ':' testObjective+=[tdl::TestObjective|Identifier] ( "," testObjective+=[tdl::TestObjective|Identifier])* ';')? + ('name' name=Identifier)? + (periodic+=PeriodicBehaviour ( periodic+=PeriodicBehaviour)* )? + (exceptional+=ExceptionalBehaviour ( exceptional+=ExceptionalBehaviour)*)? + '}' + )? + ; + +Parameter returns tdl::Parameter: + Member | FormalParameter; + +FormalParameter returns tdl::FormalParameter: + name=Identifier + 'of' 'type' + dataType=[tdl::DataType|Identifier] + ( + 'with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + '}')?; + +TimeLabelUse returns tdl::TimeLabelUse: + 'time' 'label' timeLabel=[tdl::TimeLabel|Identifier] + //('(' argument+=ParameterBinding ( "," argument+=ParameterBinding)* ')' )? + //( "." reduction+=[tdl::Member|Identifier])* + ( + 'with' + '{' + ('argument' '{' argument+=ParameterBinding ( "," argument+=ParameterBinding)* '}' )? + ('reduction' '(' reduction+=[tdl::Member|Identifier] ( "," reduction+=[tdl::Member|Identifier])* ')' )? + ('name' name=Identifier)? + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + '}')?; + + +FormalParameterUse returns tdl::FormalParameterUse: + 'parameter' + parameter=[tdl::FormalParameter|Identifier] + ('(' argument+=ParameterBinding ( "," argument+=ParameterBinding)* ')' )? + ( "." reduction+=[tdl::Member|Identifier])* + ( + 'with' + '{' + ('name' name=Identifier)? + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + '}')?; + + +PeriodicBehaviour returns tdl::PeriodicBehaviour: + 'every' + period=DataUse + block=Block + ( + 'with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + ('test' 'objectives' ':' testObjective+=[tdl::TestObjective|Identifier] ( "," testObjective+=[tdl::TestObjective|Identifier])* ';')? + ('name' name=Identifier)? + '}' + )?; + +Quiescence returns tdl::Quiescence: + ('component' componentInstance=[tdl::ComponentInstance|Identifier] | 'gate' gateReference=[tdl::GateReference|IdentifierDot]) + 'is' 'quiet' 'for' + period=DataUse + ('with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + ('test' 'objectives' ':' testObjective+=[tdl::TestObjective|Identifier] ( "," testObjective+=[tdl::TestObjective|Identifier])* ';')? + ('name' name=Identifier)? + ('time' 'label' timeLabel=TimeLabel)? + ('time' 'constraints' ':' timeConstraint+=TimeConstraint ( "," timeConstraint+=TimeConstraint)* ';' )? + '}')? + ';'; + +//Real returns Real: +// '-'? INT+'.'INT+ +//; +// + + +SimpleDataInstance_Impl returns tdl::SimpleDataInstance: + dataType=[tdl::DataType|Identifier] + (name=Identifier | name=NumberAsIdentifier) + ('with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + '}')? + ';' + ; + +SimpleDataType_Impl returns tdl::SimpleDataType: + {tdl::SimpleDataType} + //'Simple' 'Data' 'Type' + 'Type' + name=Identifier + ( + 'with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + '}')? + ';' + ; + +Procedure returns tdl::Procedure: + {tdl::Procedure} + //'Simple' 'Data' 'Type' + 'Procedure' + name=Identifier + ('(' parameter+=ProcedureParameter ( "," parameter+=ProcedureParameter)* ')')? + ( + 'with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + '}')? + ';' + ; + +ProcedureParameter returns tdl::ProcedureParameter: + {tdl::ProcedureParameter} + kind=ParameterKind + name=Identifier + 'of' 'type' + dataType=[tdl::DataType|Identifier] + ( + 'with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + '}')? + ; + + +enum ParameterKind returns tdl::ParameterKind: + IN = 'in' | OUT = 'out' | EXCEPTION = 'exception'; + + +StaticDataUse returns tdl::StaticDataUse: + DataInstanceUse | AnyValue | AnyValueOrOmit | OmitValue; + +Stop returns tdl::Stop: + {tdl::Stop} + 'terminate' + ('with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + ('test' 'objectives' ':' testObjective+=[tdl::TestObjective|Identifier] ( "," testObjective+=[tdl::TestObjective|Identifier])* ';')? + + ('name' name=Identifier)? + ('time' 'label' timeLabel=TimeLabel)? + ('time' 'constraints' ':' timeConstraint+=TimeConstraint ( "," timeConstraint+=TimeConstraint)* ';' )? + '}')? + ';'; + +String0 returns ecore::EString: + STRING +; + + +enum UnassignedMemberTreatment returns tdl::UnassignedMemberTreatment: + AnyValue = '?' | AnyValueOrOmit = '*'; + + +StructuredDataInstance returns tdl::StructuredDataInstance: + {tdl::StructuredDataInstance} + dataType=[tdl::DataType|Identifier] + name=Identifier + (unassignedMember=UnassignedMemberTreatment)? + '('( memberAssignment+=MemberAssignment (',' memberAssignment+=MemberAssignment)* )?')' + ('with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + '}')? + ';' + ; + +CollectionDataInstance returns tdl::CollectionDataInstance: + {tdl::CollectionDataInstance} + 'Collection' + name=Identifier + 'of' 'type' + dataType=[tdl::DataType|Identifier] + ('containing' '{' member+=StaticDataUse (',' member+=StaticDataUse)* '}')? + ('with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + '}')? + ';' + ; + + +StructuredDataType returns tdl::StructuredDataType: + {tdl::StructuredDataType} + //'Structured' 'Data' 'Type' + 'Type' + name=Identifier + ('(' member+=Member ( "," member+=Member)* ')')? + ( + 'with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + '}')? + ';'; + +Target returns tdl::Target: + targetGate=[tdl::GateReference|IdentifierDot] + //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)? + '}')? + ; + + +TestConfiguration returns tdl::TestConfiguration: + 'Test' 'Configuration' + name=Identifier + '{' + componentInstance+=ComponentInstance (componentInstance+=ComponentInstance)* + connection+=Connection (connection+=Connection)* + '}' + ('with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + '}')? + ; + +TestDescription returns tdl::TestDescription: + 'Test' 'Description' + (isLocallyOrdered?='Implementation')? + + name=Identifier + ('(' formalParameter+=FormalParameter ( "," formalParameter+=FormalParameter)* ')')? + 'uses' 'configuration' testConfiguration=[tdl::TestConfiguration|Identifier] + (behaviourDescription=BehaviourDescription | ';') + ('with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + ('test' 'objectives' ':' testObjective+=[tdl::TestObjective|Identifier] ( "," testObjective+=[tdl::TestObjective|Identifier])* ';')? + '}')? + ; + +TestDescriptionReference returns tdl::TestDescriptionReference: + 'execute' + testDescription=[tdl::TestDescription|Identifier] + ('(' actualParameter+=DataUse ( "," actualParameter+=DataUse)* ')' )? + ('with' + '{' + ('bindings' '{' componentInstanceBinding+=ComponentInstanceBinding ( "," componentInstanceBinding+=ComponentInstanceBinding)* '}' )? + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + ('test' 'objectives' ':' testObjective+=[tdl::TestObjective|Identifier] ( "," testObjective+=[tdl::TestObjective|Identifier])* ';')? + + ('name' name=Identifier)? + ('time' 'label' timeLabel=TimeLabel)? + ('time' 'constraints' ':' timeConstraint+=TimeConstraint ( "," timeConstraint+=TimeConstraint)* ';' )? + '}')? + ';'; + +TestObjective returns tdl::TestObjective: + {tdl::TestObjective} + 'Test' 'Objective' + (name=Identifier)? + '{' + ('from' ':' objectiveURI+=String0 ';' ( 'from' ':' objectiveURI+=String0 ';')* )? + ('description' ':' description=String0 ';')? + '}' + ('with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + '}')? + ; + + +Time returns tdl::Time: + {tdl::Time} + 'Time' + name=Identifier + ('with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + '}')? + ';'; + +TimeConstraint returns tdl::TimeConstraint: + (name=Identifier)? + timeConstraintExpression=DataUse + ('with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + '}')? + ; + +TimeLabel returns tdl::TimeLabel: + name=Identifier +// 'in' +// dataType=[tdl::DataType|Identifier] + ('with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + '}')? + ';'; + +TimeOut returns tdl::TimeOut: + componentInstance=[tdl::ComponentInstance|Identifier] + '.' + timer=[tdl::Timer|Identifier] + 'times' 'out' + ('with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + ('test' 'objectives' ':' testObjective+=[tdl::TestObjective|Identifier] ( "," testObjective+=[tdl::TestObjective|Identifier])* ';')? + ('name' name=Identifier)? + ('time' 'label' timeLabel=TimeLabel)? + ('time' 'constraints' ':' timeConstraint+=TimeConstraint ( "," timeConstraint+=TimeConstraint)* ';' )? + '}')? + ';' + ; + +Timer returns tdl::Timer: + {tdl::Timer} + 'timer' + name=Identifier + ('with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + '}')? + ';'; + + +TimerStart returns tdl::TimerStart: + 'start' + componentInstance=[tdl::ComponentInstance|Identifier] + '.' + timer=[tdl::Timer|Identifier] + 'for' + period=DataUse + ('with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + ('test' 'objectives' ':' testObjective+=[tdl::TestObjective|Identifier] ( "," testObjective+=[tdl::TestObjective|Identifier])* ';')? + ('time' 'label' timeLabel=TimeLabel)? + ('time' 'constraints' ':' timeConstraint+=TimeConstraint ( "," timeConstraint+=TimeConstraint)* ';' )? + ('name' name=Identifier)? + '}')? + ';' + ; + +TimerStop returns tdl::TimerStop: + 'stop' + componentInstance=[tdl::ComponentInstance|Identifier] + '.' + timer=[tdl::Timer|Identifier] + ('with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + ('test' 'objectives' ':' testObjective+=[tdl::TestObjective|Identifier] ( "," testObjective+=[tdl::TestObjective|Identifier])* ';')? + ('name' name=Identifier)? + ('time' 'label' timeLabel=TimeLabel)? + ('time' 'constraints' ':' timeConstraint+=TimeConstraint ( "," timeConstraint+=TimeConstraint)* ';' )? + '}')? + ';' + ; + + +UnboundedLoopBehaviour returns tdl::UnboundedLoopBehaviour: + 'repeat' + block=Block + ( + 'with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + ('test' 'objectives' ':' testObjective+=[tdl::TestObjective|Identifier] ( "," testObjective+=[tdl::TestObjective|Identifier])* ';')? + ('name' name=Identifier)? + (periodic+=PeriodicBehaviour ( periodic+=PeriodicBehaviour)* )? + (exceptional+=ExceptionalBehaviour ( exceptional+=ExceptionalBehaviour)*)? + '}' + )? + ('on' scope=[tdl::ComponentInstance|Identifier])? + ; + +Variable returns tdl::Variable: + 'variable' + name=Identifier + 'of' 'type' + dataType=[tdl::DataType|Identifier] + ('with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + '}')? + ';'; + +VariableUse returns tdl::VariableUse: + //TODO: try to adjust syntax so that -> is not necessary + componentInstance=[tdl::ComponentInstance|Identifier] + '->' + variable=[tdl::Variable|Identifier] + ('(' argument+=ParameterBinding ( "," argument+=ParameterBinding)* ')' )? + ("." reduction+=[tdl::Member|Identifier])* + ('with' + '{' + ('name' name=Identifier)? + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + '}')? + ; + + +//Verdict returns tdl::Verdict: +// //'verdict' +// ( (dataType=[tdl::DataType|PredefinedVerdict] name=Identifier) +// | +// ('Verdict' name=Identifier 'of type' dataType=[tdl::DataType|Identifier]) +// ) +// ('with' +// '{' +// (comment+=Comment (comment+=Comment)*)? +// (annotation+=Annotation (annotation+=Annotation)*)? +// '}')? +// ';' +// ; + +PredefinedVerdict returns ecore::EString: 'Verdict'; + +VerdictAssignment returns tdl::VerdictAssignment: + 'set' 'verdict' 'to' + verdict=DataUse + ( + 'with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + ('test' 'objectives' ':' testObjective+=[tdl::TestObjective|Identifier] ( "," testObjective+=[tdl::TestObjective|Identifier])* ';')? + ('name' name=Identifier)? + ('time' 'label' timeLabel=TimeLabel)? + ('time' 'constraints' ':' timeConstraint+=TimeConstraint ( "," timeConstraint+=TimeConstraint)* ';' )? + '}')? + ';' + ; + +Wait returns tdl::Wait: + ( 'component' componentInstance=[tdl::ComponentInstance|Identifier]) + 'waits' 'for' + period=DataUse + ('with' + '{' + (comment+=Comment (comment+=Comment)*)? + (annotation+=Annotation (annotation+=Annotation)*)? + ('test' 'objectives' ':' testObjective+=[tdl::TestObjective|Identifier] ( "," testObjective+=[tdl::TestObjective|Identifier])* ';')? + ('name' name=Identifier)? + ('time' 'label' timeLabel=TimeLabel)? + ('time' 'constraints' ':' timeConstraint+=TimeConstraint ( "," timeConstraint+=TimeConstraint)* ';' )? + + '}')? + ';'; + +NumberAsIdentifier returns ecore::EString: + '-'? INT ('.' INT)?; + \ No newline at end of file