Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfjouault2013-12-18 12:23:55 -0500
committerfjouault2013-12-18 12:23:55 -0500
commit65b0671d4f5d0907029e1974c39e5dad4ffad691 (patch)
tree0de5dbf66d69f19c467de658fbb468031a3e5ec3
downloadorg.eclipse.atl.tcs-65b0671d4f5d0907029e1974c39e5dad4ffad691.tar.gz
org.eclipse.atl.tcs-65b0671d4f5d0907029e1974c39e5dad4ffad691.tar.xz
org.eclipse.atl.tcs-65b0671d4f5d0907029e1974c39e5dad4ffad691.zip
initial commit of approved contribution (see bug 417707)
This version needs refactoring (notably package names) as well as porting to current version of ATL
-rw-r--r--dsls/ANTLR/.externalToolBuilders/ANTLR TCS Builder.launch22
-rw-r--r--dsls/ANTLR/.project27
-rw-r--r--dsls/ANTLR/Metamodel/ANTLR.ann27
-rw-r--r--dsls/ANTLR/Metamodel/ANTLR.km3176
-rw-r--r--dsls/ANTLR/Syntax/ANTLRv2.tcs263
-rw-r--r--dsls/ANTLR/Syntax/ANTLRv3.tcs313
-rw-r--r--dsls/ANTLR/build.properties6
-rw-r--r--dsls/Editor/.externalToolBuilders/Editor DSL Builder.launch31
-rw-r--r--dsls/Editor/.project27
-rw-r--r--dsls/Editor/Compiler/.gitignore1
-rw-r--r--dsls/Editor/Compiler/TCS2Editor.atl152
-rw-r--r--dsls/Editor/Metamodel/Editor.ann19
-rw-r--r--dsls/Editor/Metamodel/Editor.km366
-rw-r--r--dsls/Editor/Syntax/Editor.tcs213
-rw-r--r--dsls/Editor/build.properties2
-rw-r--r--dsls/Outline/.externalToolBuilders/Outline DSL Builder.launch31
-rw-r--r--dsls/Outline/.project27
-rw-r--r--dsls/Outline/Compiler/.gitignore1
-rw-r--r--dsls/Outline/Compiler/KM32Outline.atl74
-rw-r--r--dsls/Outline/Metamodel/Outline.ann19
-rw-r--r--dsls/Outline/Metamodel/Outline.km340
-rw-r--r--dsls/Outline/build.properties3
-rw-r--r--dsls/TCS/.project22
-rw-r--r--dsls/TCS/Compiler/.gitignore3
-rw-r--r--dsls/TCS/Compiler/TCS2ANTLR.atl1992
-rw-r--r--dsls/TCS/Compiler/TCS2ANTLRv2Actions.atl91
-rw-r--r--dsls/TCS/Compiler/TCS2ANTLRv3Actions.atl86
-rw-r--r--dsls/TCS/Helpers/.gitignore1
-rw-r--r--dsls/TCS/Helpers/TCSHelpers.atl16
-rw-r--r--dsls/TCS/Metamodel/TCS.ann61
-rw-r--r--dsls/TCS/Metamodel/TCS.km3449
-rw-r--r--dsls/TCS/Syntax/TCS.tcs601
-rw-r--r--dsls/TCS/WFR/.gitignore1
-rw-r--r--dsls/TCS/WFR/TCS2Problem.atl293
-rw-r--r--dsls/TCS/build.properties2
-rw-r--r--plugins/org.eclipse.gmt.tcs-feature/.project17
-rw-r--r--plugins/org.eclipse.gmt.tcs-feature/about.html28
-rw-r--r--plugins/org.eclipse.gmt.tcs-feature/build.properties16
-rw-r--r--plugins/org.eclipse.gmt.tcs-feature/epl-v10.html304
-rw-r--r--plugins/org.eclipse.gmt.tcs-feature/feature.properties145
-rw-r--r--plugins/org.eclipse.gmt.tcs-feature/feature.xml315
-rw-r--r--plugins/org.eclipse.gmt.tcs-feature/license.html319
-rw-r--r--plugins/org.eclipse.gmt.tcs-feature/license.txt87
-rw-r--r--plugins/org.eclipse.gmt.tcs-feature/modeling32.pngbin0 -> 2414 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs-feature/rootfiles/epl-v10.html304
-rw-r--r--plugins/org.eclipse.gmt.tcs-feature/rootfiles/notice.html79
-rw-r--r--plugins/org.eclipse.gmt.tcs-feature/tcs32.pngbin0 -> 808 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.actions/.classpath7
-rw-r--r--plugins/org.eclipse.gmt.tcs.actions/.project28
-rw-r--r--plugins/org.eclipse.gmt.tcs.actions/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--plugins/org.eclipse.gmt.tcs.actions/META-INF/MANIFEST.MF15
-rw-r--r--plugins/org.eclipse.gmt.tcs.actions/about.html28
-rw-r--r--plugins/org.eclipse.gmt.tcs.actions/bin/org/eclipse/gmt/tcs/actions/Activator.classbin0 -> 914 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.actions/bin/org/eclipse/gmt/tcs/actions/ExtractAction.classbin0 -> 2096 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.actions/bin/org/eclipse/gmt/tcs/actions/InjectAction.classbin0 -> 1710 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.actions/bin/org/eclipse/gmt/tcs/actions/StartUp.classbin0 -> 405 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.actions/build.properties12
-rw-r--r--plugins/org.eclipse.gmt.tcs.actions/plugin.properties3
-rw-r--r--plugins/org.eclipse.gmt.tcs.actions/plugin.xml31
-rw-r--r--plugins/org.eclipse.gmt.tcs.actions/src/org/eclipse/gmt/tcs/actions/Activator.java63
-rw-r--r--plugins/org.eclipse.gmt.tcs.actions/src/org/eclipse/gmt/tcs/actions/ExtractAction.java114
-rw-r--r--plugins/org.eclipse.gmt.tcs.actions/src/org/eclipse/gmt/tcs/actions/InjectAction.java78
-rw-r--r--plugins/org.eclipse.gmt.tcs.actions/src/org/eclipse/gmt/tcs/actions/StartUp.java31
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/.classpath7
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/.project28
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/.settings/org.eclipse.jdt.core.prefs12
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/META-INF/MANIFEST.MF23
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/about.html28
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/build.properties14
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/plugin.properties3
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/plugin.xml14
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/resources/templates/MANIFEST.MF6
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/resources/templates/annotations.ann21
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/resources/templates/build.properties5
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/resources/templates/extractor.xml56
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/resources/templates/injector.xml38
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/resources/templates/metamodel.km332
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/resources/templates/plugin.xml17
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/resources/templates/syntax.tcs209
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/schema/parserGenerator.exsd109
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/Activator.java64
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ParserGenerator.java23
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ParserGeneratorErrorListener.java27
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ProblemReporter.java26
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/TCSBuilder.java556
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/TCSBuilderCT.java306
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/CompositeTransformation.java46
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/Metamodel.java74
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/Origin.java26
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/ResourceLocator.java28
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/ACGTransformation.java131
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/ATLRefinedTargetDefinition.java32
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/ATLSourceDefinition.java41
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/ATLTargetDefinition.java41
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/ATLTransformation.java120
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/CompositeTransformationSourceDefinition.java41
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/CompositeTransformationTargetDefinition.java42
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/ModelSourceDefinition.java35
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/ModelTargetDefinition.java34
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/SourceDefinition.java28
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/TCSExtraction.java74
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/TCSInjection.java114
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/TargetDefinition.java28
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/Transformation.java47
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/usage/Source.java36
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/usage/Target.java47
-rw-r--r--plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/usage/TransformationUsage.java35
-rw-r--r--plugins/org.eclipse.gmt.tcs.dsls/.classpath10
-rw-r--r--plugins/org.eclipse.gmt.tcs.dsls/.project28
-rw-r--r--plugins/org.eclipse.gmt.tcs.dsls/META-INF/MANIFEST.MF19
-rw-r--r--plugins/org.eclipse.gmt.tcs.dsls/about.html28
-rw-r--r--plugins/org.eclipse.gmt.tcs.dsls/build.properties18
-rw-r--r--plugins/org.eclipse.gmt.tcs.dsls/copy.binaries.from_ammacore.xml27
-rw-r--r--plugins/org.eclipse.gmt.tcs.dsls/org.eclipse.gmt.tcs.dsls copy.binaries.from_ammacore.xml.launch17
-rw-r--r--plugins/org.eclipse.gmt.tcs.dsls/plugin.properties3
-rw-r--r--plugins/org.eclipse.gmt.tcs.dsls/plugin.xml30
-rw-r--r--plugins/org.eclipse.gmt.tcs.dsls/resources/ANTLR/Metamodel/ANTLR.ecore116
-rw-r--r--plugins/org.eclipse.gmt.tcs.dsls/resources/ANTLR/Syntax/ANTLR-TCS.xmi638
-rw-r--r--plugins/org.eclipse.gmt.tcs.dsls/resources/Annotation/Compiler/ApplyAnnotations2Ecore.asm1411
-rw-r--r--plugins/org.eclipse.gmt.tcs.dsls/resources/Annotation/Metamodel/Annotation.ecore61
-rw-r--r--plugins/org.eclipse.gmt.tcs.dsls/resources/Editor/Compiler/TCS2Editor.asm1585
-rw-r--r--plugins/org.eclipse.gmt.tcs.dsls/resources/Editor/Metamodel/Editor.ecore59
-rw-r--r--plugins/org.eclipse.gmt.tcs.dsls/resources/KM3-2005/Compiler/KM32Ecore.asm1866
-rw-r--r--plugins/org.eclipse.gmt.tcs.dsls/resources/KM3-2005/Editor/KM3-Editor.xmi94
-rw-r--r--plugins/org.eclipse.gmt.tcs.dsls/resources/KM3-2005/Helpers/KM3Helpers.asm214
-rw-r--r--plugins/org.eclipse.gmt.tcs.dsls/resources/KM3-2005/Metamodel/KM3.ecore64
-rw-r--r--plugins/org.eclipse.gmt.tcs.dsls/resources/KM3-2005/Outline/KM3-Outline.xmi70
-rw-r--r--plugins/org.eclipse.gmt.tcs.dsls/resources/KM3-2005/Syntax/KM3-TCS.xmi345
-rw-r--r--plugins/org.eclipse.gmt.tcs.dsls/resources/KM3-2005/WFR/KM32Problem.asm3930
-rw-r--r--plugins/org.eclipse.gmt.tcs.dsls/resources/Outline/Compiler/KM32Outline.asm975
-rw-r--r--plugins/org.eclipse.gmt.tcs.dsls/resources/Outline/Metamodel/Outline.ecore36
-rw-r--r--plugins/org.eclipse.gmt.tcs.dsls/resources/Problem/Metamodel/Problem.ecore18
-rw-r--r--plugins/org.eclipse.gmt.tcs.dsls/resources/TCS/Compiler/TCS2ANTLR.asm22984
-rw-r--r--plugins/org.eclipse.gmt.tcs.dsls/resources/TCS/Compiler/TCS2ANTLRv3Actions.asm335
-rw-r--r--plugins/org.eclipse.gmt.tcs.dsls/resources/TCS/Editor/TCS-Editor.xmi140
-rw-r--r--plugins/org.eclipse.gmt.tcs.dsls/resources/TCS/Metamodel/TCS.ecore300
-rw-r--r--plugins/org.eclipse.gmt.tcs.dsls/resources/TCS/Outline/TCS-Outline.xmi336
-rw-r--r--plugins/org.eclipse.gmt.tcs.dsls/resources/TCS/Syntax/TCS-TCS.xmi1376
-rw-r--r--plugins/org.eclipse.gmt.tcs.dsls/resources/TCS/WFR/TCS2Problem.asm3155
-rw-r--r--plugins/org.eclipse.gmt.tcs.dsls/resources/contents.list34
-rw-r--r--plugins/org.eclipse.gmt.tcs.dsls/resources/libs/strings.asm2403
-rw-r--r--plugins/org.eclipse.gmt.tcs.dsls/src/org/eclipse/gmt/tcs/dsls/Activator.java64
-rw-r--r--plugins/org.eclipse.gmt.tcs.dsls/src/org/eclipse/gmt/tcs/dsls/DSLResourceProvider.java33
-rw-r--r--plugins/org.eclipse.gmt.tcs.emfresource/.classpath7
-rw-r--r--plugins/org.eclipse.gmt.tcs.emfresource/.project28
-rw-r--r--plugins/org.eclipse.gmt.tcs.emfresource/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--plugins/org.eclipse.gmt.tcs.emfresource/META-INF/MANIFEST.MF15
-rw-r--r--plugins/org.eclipse.gmt.tcs.emfresource/about.html28
-rw-r--r--plugins/org.eclipse.gmt.tcs.emfresource/bin/org/eclipse/gmt/tcs/emfresource/Activator.classbin0 -> 923 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.emfresource/bin/org/eclipse/gmt/tcs/emfresource/LanguageRegistryListener.classbin0 -> 1522 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.emfresource/bin/org/eclipse/gmt/tcs/emfresource/TCSResource.classbin0 -> 2277 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.emfresource/bin/org/eclipse/gmt/tcs/emfresource/TCSResourceFactoryImpl.classbin0 -> 967 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.emfresource/build.properties7
-rw-r--r--plugins/org.eclipse.gmt.tcs.emfresource/plugin.properties3
-rw-r--r--plugins/org.eclipse.gmt.tcs.emfresource/plugin.xml10
-rw-r--r--plugins/org.eclipse.gmt.tcs.emfresource/src/org/eclipse/gmt/tcs/emfresource/Activator.java65
-rw-r--r--plugins/org.eclipse.gmt.tcs.emfresource/src/org/eclipse/gmt/tcs/emfresource/LanguageRegistryListener.java34
-rw-r--r--plugins/org.eclipse.gmt.tcs.emfresource/src/org/eclipse/gmt/tcs/emfresource/TCSResource.java131
-rw-r--r--plugins/org.eclipse.gmt.tcs.emfresource/src/org/eclipse/gmt/tcs/emfresource/TCSResourceFactoryImpl.java34
-rw-r--r--plugins/org.eclipse.gmt.tcs.extractor/.classpath7
-rw-r--r--plugins/org.eclipse.gmt.tcs.extractor/.project28
-rw-r--r--plugins/org.eclipse.gmt.tcs.extractor/.settings/org.eclipse.jdt.core.prefs12
-rw-r--r--plugins/org.eclipse.gmt.tcs.extractor/META-INF/MANIFEST.MF10
-rw-r--r--plugins/org.eclipse.gmt.tcs.extractor/about.html28
-rw-r--r--plugins/org.eclipse.gmt.tcs.extractor/bin/org/eclipse/gmt/tcs/extractor/ASMModelAdapter.classbin0 -> 5095 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.extractor/bin/org/eclipse/gmt/tcs/extractor/ModelAdapter.classbin0 -> 1011 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.extractor/bin/org/eclipse/gmt/tcs/extractor/PrettyPrinter.classbin0 -> 24303 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.extractor/bin/org/eclipse/gmt/tcs/extractor/TCSExtractionException.classbin0 -> 549 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.extractor/bin/org/eclipse/gmt/tcs/extractor/TCSExtractor.classbin0 -> 2299 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.extractor/bin/org/eclipse/gmt/tcs/extractor/TCSExtractorPrintStream.classbin0 -> 2087 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.extractor/bin/org/eclipse/gmt/tcs/extractor/TCSExtractorStream.classbin0 -> 566 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.extractor/build.properties13
-rw-r--r--plugins/org.eclipse.gmt.tcs.extractor/plugin.properties3
-rw-r--r--plugins/org.eclipse.gmt.tcs.extractor/src/org/eclipse/gmt/tcs/extractor/ASMModelAdapter.java133
-rw-r--r--plugins/org.eclipse.gmt.tcs.extractor/src/org/eclipse/gmt/tcs/extractor/ModelAdapter.java53
-rw-r--r--plugins/org.eclipse.gmt.tcs.extractor/src/org/eclipse/gmt/tcs/extractor/PrettyPrinter.java962
-rw-r--r--plugins/org.eclipse.gmt.tcs.extractor/src/org/eclipse/gmt/tcs/extractor/TCSExtractionException.java27
-rw-r--r--plugins/org.eclipse.gmt.tcs.extractor/src/org/eclipse/gmt/tcs/extractor/TCSExtractor.java63
-rw-r--r--plugins/org.eclipse.gmt.tcs.extractor/src/org/eclipse/gmt/tcs/extractor/TCSExtractorPrintStream.java83
-rw-r--r--plugins/org.eclipse.gmt.tcs.extractor/src/org/eclipse/gmt/tcs/extractor/TCSExtractorStream.java46
-rw-r--r--plugins/org.eclipse.gmt.tcs.injector/.classpath7
-rw-r--r--plugins/org.eclipse.gmt.tcs.injector/.project28
-rw-r--r--plugins/org.eclipse.gmt.tcs.injector/.settings/org.eclipse.jdt.core.prefs12
-rw-r--r--plugins/org.eclipse.gmt.tcs.injector/META-INF/MANIFEST.MF13
-rw-r--r--plugins/org.eclipse.gmt.tcs.injector/about.html28
-rw-r--r--plugins/org.eclipse.gmt.tcs.injector/bin/org/eclipse/gmt/tcs/injector/ASMModelAdapter.classbin0 -> 7640 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.injector/bin/org/eclipse/gmt/tcs/injector/CompletionInformation.classbin0 -> 309 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.injector/bin/org/eclipse/gmt/tcs/injector/ElementTrace.classbin0 -> 1588 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.injector/bin/org/eclipse/gmt/tcs/injector/ModelAdapter.classbin0 -> 734 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.injector/bin/org/eclipse/gmt/tcs/injector/ParserLauncher$1.classbin0 -> 1010 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.injector/bin/org/eclipse/gmt/tcs/injector/ParserLauncher.classbin0 -> 4352 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.injector/bin/org/eclipse/gmt/tcs/injector/ReferenceLocation.classbin0 -> 678 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.injector/bin/org/eclipse/gmt/tcs/injector/TCSClassLoader.classbin0 -> 815 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.injector/bin/org/eclipse/gmt/tcs/injector/TCSInjector.classbin0 -> 2221 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.injector/bin/org/eclipse/gmt/tcs/injector/TCSRuntime$Context.classbin0 -> 4360 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.injector/bin/org/eclipse/gmt/tcs/injector/TCSRuntime$RefSetting.classbin0 -> 7512 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.injector/bin/org/eclipse/gmt/tcs/injector/TCSRuntime.classbin0 -> 9747 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.injector/bin/org/eclipse/gmt/tcs/injector/wrappers/ParserWrapper.classbin0 -> 1268 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.injector/bin/org/eclipse/gmt/tcs/injector/wrappers/antlr3/ANTLR3LocationToken.classbin0 -> 1022 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.injector/bin/org/eclipse/gmt/tcs/injector/wrappers/antlr3/ParserWrapper.classbin0 -> 9648 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.injector/build.properties13
-rw-r--r--plugins/org.eclipse.gmt.tcs.injector/plugin.properties3
-rw-r--r--plugins/org.eclipse.gmt.tcs.injector/src/org/eclipse/gmt/tcs/injector/ASMModelAdapter.java146
-rw-r--r--plugins/org.eclipse.gmt.tcs.injector/src/org/eclipse/gmt/tcs/injector/CompletionInformation.java28
-rw-r--r--plugins/org.eclipse.gmt.tcs.injector/src/org/eclipse/gmt/tcs/injector/ElementTrace.java66
-rw-r--r--plugins/org.eclipse.gmt.tcs.injector/src/org/eclipse/gmt/tcs/injector/ModelAdapter.java41
-rw-r--r--plugins/org.eclipse.gmt.tcs.injector/src/org/eclipse/gmt/tcs/injector/ParserLauncher.java114
-rw-r--r--plugins/org.eclipse.gmt.tcs.injector/src/org/eclipse/gmt/tcs/injector/ReferenceLocation.java40
-rw-r--r--plugins/org.eclipse.gmt.tcs.injector/src/org/eclipse/gmt/tcs/injector/TCSClassLoader.java37
-rw-r--r--plugins/org.eclipse.gmt.tcs.injector/src/org/eclipse/gmt/tcs/injector/TCSInjector.java78
-rw-r--r--plugins/org.eclipse.gmt.tcs.injector/src/org/eclipse/gmt/tcs/injector/TCSRuntime.java710
-rw-r--r--plugins/org.eclipse.gmt.tcs.injector/src/org/eclipse/gmt/tcs/injector/wrappers/ParserWrapper.java51
-rw-r--r--plugins/org.eclipse.gmt.tcs.injector/src/org/eclipse/gmt/tcs/injector/wrappers/antlr3/ANTLR3LocationToken.java49
-rw-r--r--plugins/org.eclipse.gmt.tcs.injector/src/org/eclipse/gmt/tcs/injector/wrappers/antlr3/ParserWrapper.java252
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/.classpath7
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/.project28
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/META-INF/MANIFEST.MF18
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/about.html28
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/bin/org/eclipse/gmt/tcs/metadata/ASMModelFactory.classbin0 -> 2654 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/bin/org/eclipse/gmt/tcs/metadata/Activator.classbin0 -> 911 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/bin/org/eclipse/gmt/tcs/metadata/Language.classbin0 -> 1070 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/bin/org/eclipse/gmt/tcs/metadata/LanguageRegistry.classbin0 -> 807 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/bin/org/eclipse/gmt/tcs/metadata/LanguageRegistryListener.classbin0 -> 224 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/bin/org/eclipse/gmt/tcs/metadata/LanguageSource.classbin0 -> 558 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/bin/org/eclipse/gmt/tcs/metadata/ModelFactory.classbin0 -> 396 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/bin/org/eclipse/gmt/tcs/metadata/RegularVMLauncher.classbin0 -> 790 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/bin/org/eclipse/gmt/tcs/metadata/Utils$1.classbin0 -> 1596 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/bin/org/eclipse/gmt/tcs/metadata/Utils.classbin0 -> 3073 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/bin/org/eclipse/gmt/tcs/metadata/VMLauncher.classbin0 -> 218 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/bin/org/eclipse/gmt/tcs/metadata/adhoc/AdHocLanguageRegistry.classbin0 -> 7651 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/bin/org/eclipse/gmt/tcs/metadata/adhoc/ModelCache.classbin0 -> 1396 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/bin/org/eclipse/gmt/tcs/metadata/adhoc/PluginLanguage$ModelCacheFromURL.classbin0 -> 1323 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/bin/org/eclipse/gmt/tcs/metadata/adhoc/PluginLanguage.classbin0 -> 2771 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/bin/org/eclipse/gmt/tcs/metadata/adhoc/Startup.classbin0 -> 657 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/bin/org/eclipse/gmt/tcs/metadata/adhoc/TCSInjection.classbin0 -> 988 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/bin/org/eclipse/gmt/tcs/metadata/adhoc/WorkspaceLanguage$ModelCacheFromIFile.classbin0 -> 2044 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/bin/org/eclipse/gmt/tcs/metadata/adhoc/WorkspaceLanguage.classbin0 -> 5020 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/build.properties14
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/plugin.properties3
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/plugin.xml12
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/schema/language.exsd151
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/schema/registryListener.exsd97
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/src/org/eclipse/gmt/tcs/metadata/ASMModelFactory.java59
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/src/org/eclipse/gmt/tcs/metadata/Activator.java63
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/src/org/eclipse/gmt/tcs/metadata/Language.java62
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/src/org/eclipse/gmt/tcs/metadata/LanguageRegistry.java48
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/src/org/eclipse/gmt/tcs/metadata/LanguageRegistryListener.java22
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/src/org/eclipse/gmt/tcs/metadata/LanguageSource.java46
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/src/org/eclipse/gmt/tcs/metadata/ModelFactory.java36
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/src/org/eclipse/gmt/tcs/metadata/RegularVMLauncher.java39
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/src/org/eclipse/gmt/tcs/metadata/Utils.java95
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/src/org/eclipse/gmt/tcs/metadata/VMLauncher.java24
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/src/org/eclipse/gmt/tcs/metadata/adhoc/AdHocLanguageRegistry.java174
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/src/org/eclipse/gmt/tcs/metadata/adhoc/ModelCache.java61
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/src/org/eclipse/gmt/tcs/metadata/adhoc/PluginLanguage.java129
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/src/org/eclipse/gmt/tcs/metadata/adhoc/Startup.java34
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/src/org/eclipse/gmt/tcs/metadata/adhoc/TCSInjection.java60
-rw-r--r--plugins/org.eclipse.gmt.tcs.metadata/src/org/eclipse/gmt/tcs/metadata/adhoc/WorkspaceLanguage.java330
-rw-r--r--plugins/org.eclipse.gmt.tcs.wizard/.classpath7
-rw-r--r--plugins/org.eclipse.gmt.tcs.wizard/.project28
-rw-r--r--plugins/org.eclipse.gmt.tcs.wizard/.settings/org.eclipse.jdt.core.prefs12
-rw-r--r--plugins/org.eclipse.gmt.tcs.wizard/META-INF/MANIFEST.MF15
-rw-r--r--plugins/org.eclipse.gmt.tcs.wizard/about.html28
-rw-r--r--plugins/org.eclipse.gmt.tcs.wizard/build.properties8
-rw-r--r--plugins/org.eclipse.gmt.tcs.wizard/plugin.properties2
-rw-r--r--plugins/org.eclipse.gmt.tcs.wizard/plugin.xml22
-rw-r--r--plugins/org.eclipse.gmt.tcs.wizard/resources/tcsicon.pngbin0 -> 808 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs.wizard/src/org/eclipse/gmt/tcs/wizard/Activator.java64
-rw-r--r--plugins/org.eclipse.gmt.tcs.wizard/src/org/eclipse/gmt/tcs/wizard/TCSProjectWizard.java188
-rw-r--r--plugins/org.eclipse.gmt.tcs.wizard/src/org/eclipse/gmt/tcs/wizard/TCSProjectWizardPage.java121
-rw-r--r--plugins/org.eclipse.gmt.tcs/.project22
-rw-r--r--plugins/org.eclipse.gmt.tcs/META-INF/MANIFEST.MF7
-rw-r--r--plugins/org.eclipse.gmt.tcs/about.html28
-rw-r--r--plugins/org.eclipse.gmt.tcs/about.ini17
-rw-r--r--plugins/org.eclipse.gmt.tcs/about.mappings6
-rw-r--r--plugins/org.eclipse.gmt.tcs/about.properties22
-rw-r--r--plugins/org.eclipse.gmt.tcs/build.properties8
-rw-r--r--plugins/org.eclipse.gmt.tcs/modeling32.pngbin0 -> 2414 bytes
-rw-r--r--plugins/org.eclipse.gmt.tcs/plugin.properties3
-rw-r--r--plugins/org.eclipse.gmt.tcs/tcs32.pngbin0 -> 808 bytes
-rw-r--r--syntaxes/FIACRE/.externalToolBuilders/FIACRE DSL Builder.launch30
-rw-r--r--syntaxes/FIACRE/Compiler/FIACRE2LOTOS.atl920
-rw-r--r--syntaxes/FIACRE/Compiler/FIACRE2LOTOS.xml79
-rw-r--r--syntaxes/FIACRE/Compiler/FIACRE2LOTOS.xml.launch16
-rw-r--r--syntaxes/FIACRE/Metamodel/FIACRE.ann2
-rw-r--r--syntaxes/FIACRE/Metamodel/FIACRE.km3331
-rw-r--r--syntaxes/FIACRE/Samples/Simple_array.fcr1
-rw-r--r--syntaxes/FIACRE/Samples/Simple_enum.fcr1
-rw-r--r--syntaxes/FIACRE/Samples/Simple_interval.fcr1
-rw-r--r--syntaxes/FIACRE/Samples/Simple_record.fcr1
-rw-r--r--syntaxes/FIACRE/Syntax/FIACRE.tcs542
-rw-r--r--syntaxes/FIACRE/build.properties2
-rw-r--r--syntaxes/FPath/.project22
-rw-r--r--syntaxes/FPath/Metamodel/FPath.km394
-rw-r--r--syntaxes/FPath/Samples/README.txt1
-rw-r--r--syntaxes/FPath/Samples/Test1.fp1
-rw-r--r--syntaxes/FPath/Samples/Test2.fp1
-rw-r--r--syntaxes/FPath/Samples/Test3.fp1
-rw-r--r--syntaxes/FPath/Samples/Test4.fp1
-rw-r--r--syntaxes/FPath/Samples/Test5.fp1
-rw-r--r--syntaxes/FPath/Syntax/FPath.tcs304
-rw-r--r--syntaxes/FPath/build.properties2
-rw-r--r--syntaxes/FScript/.project22
-rw-r--r--syntaxes/FScript/Metamodel/FScript.km3150
-rw-r--r--syntaxes/FScript/Samples/README.txt1
-rw-r--r--syntaxes/FScript/Samples/Test1.fs13
-rw-r--r--syntaxes/FScript/Syntax/FScript.tcs349
-rw-r--r--syntaxes/FScript/build.properties2
-rw-r--r--syntaxes/Kmelia/.project22
-rw-r--r--syntaxes/Kmelia/Metamodel/Kmelia.km397
-rw-r--r--syntaxes/Kmelia/Syntax/Kmelia.tcs292
-rw-r--r--syntaxes/Kmelia/build.properties2
-rw-r--r--syntaxes/LOTOS/.project22
-rw-r--r--syntaxes/LOTOS/Metamodel/LOTOS.ann2
-rw-r--r--syntaxes/LOTOS/Metamodel/LOTOS.km3224
-rw-r--r--syntaxes/LOTOS/Samples/README.txt2
-rw-r--r--syntaxes/LOTOS/Syntax/LOTOS.tcs425
-rw-r--r--syntaxes/LOTOS/build.properties2
-rw-r--r--syntaxes/MSRT/.project22
-rw-r--r--syntaxes/MSRT/Metamodel/MSRT.km340
-rw-r--r--syntaxes/MSRT/Sample/sample.msrt11
-rw-r--r--syntaxes/MSRT/Syntax/MSRT.tcs239
-rw-r--r--syntaxes/MSRT/build.properties2
-rw-r--r--syntaxes/Program/.project22
-rw-r--r--syntaxes/Program/Metamodel/Program.ann2
-rw-r--r--syntaxes/Program/Metamodel/Program.km3134
-rw-r--r--syntaxes/Program/Samples/AlarmClock/AlarmClock.pgrm25
-rw-r--r--syntaxes/Program/Samples/IOStream/IOStream.pgrm28
-rw-r--r--syntaxes/Program/Samples/ReadersAndWriters/ReadersAndWriters.pgrm41
-rw-r--r--syntaxes/Program/Samples/SingleResource/SingleResource.pgrm20
-rw-r--r--syntaxes/Program/Syntax/Program.tcs320
-rw-r--r--syntaxes/Program/build.properties2
-rw-r--r--syntaxes/SPL/.project22
-rw-r--r--syntaxes/SPL/Metamodel/SPL.ann2
-rw-r--r--syntaxes/SPL/Metamodel/SPL.km3534
-rw-r--r--syntaxes/SPL/Samples/SimpleForward.spl11
-rw-r--r--syntaxes/SPL/Syntax/SPL.tcs704
-rw-r--r--syntaxes/SPL/build.properties2
-rw-r--r--syntaxes/SQLDDL/.externalToolBuilders/SQLDDL Language Builder.launch32
-rw-r--r--syntaxes/SQLDDL/.project27
-rw-r--r--syntaxes/SQLDDL/Metamodel/SQLDDL.ann2
-rw-r--r--syntaxes/SQLDDL/Metamodel/SQLDDL.km3101
-rw-r--r--syntaxes/SQLDDL/Samples/SPL.sql622
-rw-r--r--syntaxes/SQLDDL/Syntax/SQLDDL.tcs235
-rw-r--r--syntaxes/SQLDDL/build.properties2
-rw-r--r--syntaxes/Scatter/.project22
-rw-r--r--syntaxes/Scatter/Metamodel/Scatter.ann2
-rw-r--r--syntaxes/Scatter/Metamodel/Scatter.km398
-rw-r--r--syntaxes/Scatter/Samples/Car.refresh23
-rw-r--r--syntaxes/Scatter/Syntax/Scatter.tcs275
-rw-r--r--syntaxes/Scatter/build.properties2
-rw-r--r--syntaxes/XML2/.externalToolBuilders/XML2 Language Builder.launch32
-rw-r--r--syntaxes/XML2/.project27
-rw-r--r--syntaxes/XML2/Metamodel/XML2.ann2
-rw-r--r--syntaxes/XML2/Metamodel/XML2.km344
-rw-r--r--syntaxes/XML2/Samples/Test.xml29
-rw-r--r--syntaxes/XML2/Samples/XML2.xml233
-rw-r--r--syntaxes/XML2/Syntax/XML2.tcs204
-rw-r--r--syntaxes/XML2/build.properties2
-rw-r--r--syntaxes/XPath/.externalToolBuilders/XPath Language Builder.launch32
-rw-r--r--syntaxes/XPath/.project27
-rw-r--r--syntaxes/XPath/Interpreter/XPathEvaluator.atl177
-rw-r--r--syntaxes/XPath/Metamodel/XPath.ann2
-rw-r--r--syntaxes/XPath/Metamodel/XPath.km3177
-rw-r--r--syntaxes/XPath/Samples/README.txt3
-rw-r--r--syntaxes/XPath/Samples/Test1.xpath1
-rw-r--r--syntaxes/XPath/Samples/Test2.xpath2
-rw-r--r--syntaxes/XPath/Samples/Test22.xpath2
-rw-r--r--syntaxes/XPath/Samples/Test23.xpath2
-rw-r--r--syntaxes/XPath/Samples/Test24.xpath2
-rw-r--r--syntaxes/XPath/Samples/Test3.xpath1
-rw-r--r--syntaxes/XPath/Samples/Test32.xpath1
-rw-r--r--syntaxes/XPath/Samples/Test4.xpath1
-rw-r--r--syntaxes/XPath/Samples/Test5.xpath1
-rw-r--r--syntaxes/XPath/Samples/Test6.xpath1
-rw-r--r--syntaxes/XPath/Samples/Test7.xpath1
-rw-r--r--syntaxes/XPath/Samples/Test8.xpath1
-rw-r--r--syntaxes/XPath/Samples/Test9.xpath1
-rw-r--r--syntaxes/XPath/Syntax/XPath.tcs364
-rw-r--r--syntaxes/XPath/build.properties2
381 files changed, 67304 insertions, 0 deletions
diff --git a/dsls/ANTLR/.externalToolBuilders/ANTLR TCS Builder.launch b/dsls/ANTLR/.externalToolBuilders/ANTLR TCS Builder.launch
new file mode 100644
index 0000000..2a4a2ed
--- /dev/null
+++ b/dsls/ANTLR/.externalToolBuilders/ANTLR TCS Builder.launch
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
+<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_CLEAN_TARGETS" value="clean,"/>
+<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
+<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
+<booleanAttribute key="org.eclipse.ant.uiSET_INPUTHANDLER" value="false"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/AMMAScripts/build.dsl.xml"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
+<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="AMMAScripts"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/AMMAScripts/build.dsl.xml}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,clean"/>
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/ANTLR}"/>
+</launchConfiguration>
diff --git a/dsls/ANTLR/.project b/dsls/ANTLR/.project
new file mode 100644
index 0000000..65aa53d
--- /dev/null
+++ b/dsls/ANTLR/.project
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>ANTLR</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
+ <triggers>clean,full,incremental,</triggers>
+ <arguments>
+ <dictionary>
+ <key>LaunchConfigHandle</key>
+ <value>&lt;project&gt;/.externalToolBuilders/ANTLR TCS Builder.launch</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2m.atl.adt.builder.atlBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.m2m.atl.adt.builder.atlNature</nature>
+ </natures>
+</projectDescription>
diff --git a/dsls/ANTLR/Metamodel/ANTLR.ann b/dsls/ANTLR/Metamodel/ANTLR.ann
new file mode 100644
index 0000000..a7552dc
--- /dev/null
+++ b/dsls/ANTLR/Metamodel/ANTLR.ann
@@ -0,0 +1,27 @@
+annotate ANTLR {
+ annotate Core with
+ nsURI='http://www.eclipse.org/gmt/tcs/2007/ANTLR-Core',
+ nsPrefix='antlrcore';
+
+ annotate ANTLR with
+ nsURI='http://www.eclipse.org/gmt/tcs/2007/ANTLR',
+ nsPrefix='antlr';
+
+ annotate Actions with
+ nsURI='http://www.eclipse.org/gmt/tcs/2007/ANTLR-Actions',
+ nsPrefix='antlractions';
+
+ annotate PrimitiveTypes with
+ nsURI='http://www.eclipse.org/gmt/tcs/2007/ANTLR-PrimitiveTypes',
+ nsPrefix='pt';
+
+ annotate "PrimitiveTypes::Boolean" with
+ instanceClassName='boolean';
+
+ annotate "PrimitiveTypes::Integer" with
+ instanceClassName='int';
+
+ annotate "PrimitiveTypes::String" with
+ instanceClassName='java.lang.String';
+
+} \ No newline at end of file
diff --git a/dsls/ANTLR/Metamodel/ANTLR.km3 b/dsls/ANTLR/Metamodel/ANTLR.km3
new file mode 100644
index 0000000..33ceeef
--- /dev/null
+++ b/dsls/ANTLR/Metamodel/ANTLR.km3
@@ -0,0 +1,176 @@
+-- @name ANTLR
+-- @version 1.0
+-- @domains MDE, Grammarware
+-- @authors Frédéric Jouault
+-- @date 2007/09/19
+-- @description This ANTLR metamodel is used for both ANTLRv2 and ANTLRv3. Two distinct TCS models (ANTLRv2.tcs, and ANTLRv3.tcs) are used. Only few changes where required to make this metamodel compatible with ANTLRv3: 1) separating labelDeclarations and declarations, 2) ProductionRule.needReturnDeclaration : Boolean.
+-- @see http://www.antlr.org
+package Core {
+
+ abstract class LocatedElement {
+ attribute location : String;
+ attribute id : String;
+ }
+
+ abstract class NamedElement extends LocatedElement {
+ attribute name : String;
+ }
+}
+
+package ANTLR {
+
+ class Grammar extends NamedElement {
+ attribute "package" ordered : String;
+ reference actions[*] ordered container : SemanticAction;
+ reference rules[*] ordered container : ProductionRule oppositeOf grammar;
+ attribute options ordered : String;
+ attribute lexer ordered : String;
+ reference lexerRules[*] ordered container : ProductionRule oppositeOf grammarAsLexer;
+ }
+
+ class ProductionRule extends NamedElement {
+ reference grammar[0-1] : Grammar oppositeOf rules;
+ reference grammarAsLexer[0-1] : Grammar oppositeOf lexerRules;
+
+ reference actions[*] ordered container : SemanticAction;
+ reference returns[0-1] container : VariableDeclaration;
+ reference declarations[*] ordered container : VariableDeclaration;
+
+ -- necessary for ANTLRv3 because we do not need an Object ret = null; definition
+ -- thanks to the automatic label declaration
+ attribute needReturnDeclaration : Boolean;
+
+ -- only necessary for ANTLR v2, because there are automatically created with ANTLR v3
+ reference labelDeclarations[*] ordered container : VariableDeclaration;
+ reference parameters[*] ordered container : Parameter;
+ reference expression container : Expression oppositeOf rule;
+ attribute options[*] ordered : String;
+ }
+
+
+-- @begin Expressions
+ abstract class Expression extends LocatedElement {
+ reference sequence[0-1] : Sequence_ oppositeOf expression;
+ reference rule[0-1] : ProductionRule oppositeOf expression;
+ reference prevAction[0-1] container : SemanticAction;
+ reference action[0-1] container : SemanticAction oppositeOf expression;
+ reference storeTo[0-1] container : Variable;
+ reference concatenation[0-1] : Concatenation oppositeOf expressions;
+ reference alternative[0-1] : Alternative oppositeOf expressions;
+ attribute syntacticPredicate[0-1] : String;
+ attribute options[*] ordered : String;
+ }
+
+ -- @begin Complex Expressions
+ class Sequence_ extends Expression {
+ reference expression container : Expression oppositeOf sequence;
+ attribute lower : Integer;
+ attribute upper : Integer;
+ }
+
+ class Concatenation extends Expression {
+ reference expressions[1-*] ordered container : Expression oppositeOf concatenation;
+ }
+
+ class Alternative extends Expression {
+ reference expressions[1-*] ordered container : Expression oppositeOf alternative;
+ }
+ -- @end Complex Expressions
+
+ -- @begin Calls
+ class RuleCall extends Expression {
+ reference calledRule : ProductionRule;
+ reference arguments[*] container : ActionExpression;
+ }
+
+ class TokenCall extends Expression {
+ attribute name ordered : String;
+ attribute storeASTTo[0-1] ordered : String;
+ }
+ -- @end Calls
+
+ -- @begin Keywords
+ class Terminal extends Expression {
+ attribute value : String;
+ }
+
+-- @begin ForLexer
+ class CharTerminal extends Expression {
+ attribute value : String;
+ }
+
+ class Negation extends Expression {
+ reference expression container : Expression;
+ }
+
+ class Drop extends Expression {
+ reference expression container : Expression;
+ }
+
+ class Interval extends Expression {
+ reference start container : CharTerminal;
+ reference end container : CharTerminal;
+ }
+-- @end ForLexer
+
+ -- unused
+ class LiteralExpression extends Expression {
+ attribute value : String;
+ }
+-- @end Expressions
+}
+
+package Actions {
+
+ class Type extends NamedElement {
+ }
+
+
+-- @begin Variables
+ class VariableDeclaration extends NamedElement {
+ reference variable[*] : Variable oppositeOf declaration;
+ attribute type : String;
+ attribute initialValue : String;
+ }
+
+ class Parameter extends VariableDeclaration {
+ }
+
+ class Variable extends ActionExpression {
+ reference declaration : VariableDeclaration oppositeOf variable;
+ }
+-- @end Variables
+
+
+-- @begin SemanticActions
+ abstract class SemanticAction extends LocatedElement {
+ reference block[0-1] : SemanticActionBlock oppositeOf actions;
+ reference expression : Expression oppositeOf action;
+ }
+
+ class SimpleSemanticAction extends SemanticAction {
+ attribute value : String;
+ }
+
+ class SemanticActionBlock extends SemanticAction {
+ reference actions[*] container : SemanticAction oppositeOf block;
+ }
+-- @end SemanticActions
+
+
+-- @begin Expressions
+ abstract class ActionExpression extends LocatedElement {
+ attribute type : String;
+ }
+
+ class TextualExpression extends ActionExpression {
+ attribute value : String;
+ }
+-- @end Expressions
+}
+
+package PrimitiveTypes {
+ datatype Boolean;
+ datatype Integer;
+ datatype String;
+}
diff --git a/dsls/ANTLR/Syntax/ANTLRv2.tcs b/dsls/ANTLR/Syntax/ANTLRv2.tcs
new file mode 100644
index 0000000..244b5fd
--- /dev/null
+++ b/dsls/ANTLR/Syntax/ANTLRv2.tcs
@@ -0,0 +1,263 @@
+-- @authors Frédéric Jouault
+-- @date 2007/09/19
+-- @description This TCS model defines the syntax of the ANTLRv2 language.
+
+-- REMARK: this model can only be used for serialization so far.
+-- NOT TO BE USED as a typical example of TCS model.
+syntax ANTLR {
+
+ primitiveTemplate identifier for String default using NAME:
+ value = "%token%";
+
+ primitiveTemplate stringSymbol for String using STRING:
+ value = "%token%",
+ serializer="'\'' + %value%.toCString() + '\''";
+
+ primitiveTemplate integerSymbol for Integer default using INT:
+ value = "Integer.valueOf(%token%)";
+
+ primitiveTemplate floatSymbol for Double default using FLOAT:
+ value = "Double.valueOf(%token%)";
+
+ primitiveTemplate booleanSymbol for Boolean default using BOOLEAN:
+ value = "Boolean.valueOf(%token%)";
+
+ template Grammar main
+ : (isDefined(package) ?
+ "header" "{"
+ "package" package ";"
+ "}"
+ )
+ "class" name <no_space> "Parser" "extends" "Parser" ";"
+ "options" "{" [
+ options
+ ] "}"
+ (isDefined(actions) ?
+ "{" [
+ actions
+ ] "}"
+ )
+ [
+ rules
+ ] {indentIncr = 0, nbNL = 2}
+ (isDefined('lexer') ?
+ 'lexer'
+ [ lexerRules ] {indentIncr = 0, nbNL = 2}
+ )
+ ;
+
+ template ProductionRule
+ : name
+ (isDefined(parameters) ?
+ "[" parameters{separator = ","} "]"
+ )
+ (isDefined(returns) ?
+ "returns" "[" returns "]"
+ )
+ (isDefined(options) ?
+ "options" "{" options "}"
+ )
+ -- OR not possible in TCS yet
+ --(isDefined(declarations) or isDefined(labelDeclarations) ?
+ "{"
+ (isDefined(declarations) ?
+ declarations
+ )
+ (isDefined(labelDeclarations) ?
+ labelDeclarations
+ )
+ "}"
+ --)
+ <newline> <tab> ":"
+ (isDefined(expression) ?
+ <tab> expression
+ )
+ (isDefined(actions) ?
+ [ "{" [
+ actions
+ ] "}" ] {indentIncr = 2}
+ )
+ <newline> <tab> ";"
+ ;
+
+ template VariableDeclaration
+ : type name
+ (isDefined(initialValue) ?
+ "=" initialValue
+ )
+ ";"
+ ;
+
+ template Parameter
+ : type name
+ ;
+
+ template Variable
+ : declaration{refersTo = name}
+ ;
+
+ template Expression abstract;
+
+ template Alternative
+ : (isDefined(options) ?
+ "options" "{"
+ options
+ "}" ":"
+ )
+ (one(expressions) ?
+ expressions
+ :
+ "("
+ expressions{separator = "|"}
+ ")"
+ )
+ ;
+
+ template Concatenation
+ : (isDefined(syntacticPredicate) ?
+ "(" syntacticPredicate ")" "=>"
+ )
+ (isDefined(options) ? -- was after "(", same for Alternative
+ "options" "{"
+ options
+ "}" ":"
+ )
+ (one(expressions) ?
+ expressions
+ :
+ "("
+ expressions
+ ")"
+ )
+ (isDefined(action) ?
+ "{" action "}"
+ )
+ ;
+
+ template Terminal
+ : "\"" <no_space> 'value' <no_space> "\""
+ (isDefined(action) ?
+ "{" action "}"
+ )
+ ;
+
+-- @begin ForLexer
+ template CharTerminal
+ : "\'" <no_space> 'value' <no_space> "\'"
+ (isDefined(action) ?
+ "{" action "}"
+ )
+ ;
+
+ template Negation
+ : "~" expression
+ ;
+
+ template Drop
+ : expression "!"
+ ;
+
+ template Interval
+ : start ".." end
+ ;
+-- @end ForLexer
+
+ template RuleCall
+ : (isDefined(syntacticPredicate) ?
+ "(" syntacticPredicate ")" "=>"
+ )
+ (isDefined(storeTo) ?
+ storeTo "="
+ )
+ calledRule{refersTo = name}
+ (isDefined(arguments) ?
+ "[" arguments{separator = ","} "]"
+ )
+ (isDefined(action) ?
+ "{" action "}"
+ )
+ ;
+
+ template TokenCall
+ : (isDefined(storeASTTo) ?
+ storeASTTo ":"
+ )
+ name
+ (isDefined(action) ?
+ "{" action "}"
+ )
+ ;
+
+ template SemanticAction abstract;
+
+ template SimpleSemanticAction
+ : 'value'
+ ;
+
+ template SemanticActionBlock
+ : actions
+ ;
+
+ template ActionExpression abstract;
+
+ template TextualExpression
+ : 'value'
+ ;
+
+ template LiteralExpression
+ : 'value'
+ ;
+
+ template Sequence_
+ : "("
+ (isDefined(options) ?
+ "options" "{" options "}" ":"
+ )
+ expression
+ ")"
+ (lower = 0 ?
+ (upper = 1 ? "?")
+ (upper = -1 ? "*")
+ )
+ (lower = 1 ?
+ (upper = -1 ? "+")
+ )
+ ;
+
+ symbols {
+ lsquare = "[";
+ rsquare = "]" : rightSpace;
+ excl = "!";
+ coma = ",";
+ lparen = "(";
+ rparen = ")";
+ lcurly = "{" : leftSpace;
+ rcurly = "}";
+ semi = ";";
+ colon = ":" : leftSpace, rightSpace;
+ colons = "::";
+ pipe = "|";
+ sharp = "#";
+ qmark = "?";
+
+ -- operator symbols
+ point = ".";
+ rarrow = "->";
+ minus = "-";
+ star = "*";
+ slash = "/";
+ plus = "+";
+ eq = "=";
+ gt = ">";
+ lt = "<";
+ ge = ">=";
+ le = "<=";
+ ne = "<>";
+ larrow = "<-";
+ }
+
+ lexer = "
+ // no need for lexer for a serialization-only TCS model
+ ";
+
+}
diff --git a/dsls/ANTLR/Syntax/ANTLRv3.tcs b/dsls/ANTLR/Syntax/ANTLRv3.tcs
new file mode 100644
index 0000000..3f6ed89
--- /dev/null
+++ b/dsls/ANTLR/Syntax/ANTLRv3.tcs
@@ -0,0 +1,313 @@
+-- @authors Frédéric Jouault
+-- @date 2007/09/19
+-- @description This TCS model defines the syntax of the ANTLRv3 language.
+
+-- REMARK: this model can only be used for serialization so far.
+-- NOT TO BE USED as a typical example of TCS model.
+syntax ANTLR {
+
+ primitiveTemplate identifier for String default using NAME:
+ value = "%token%";
+
+ primitiveTemplate stringSymbol for String using STRING:
+ value = "%token%",
+ serializer="'\'' + %value%.toCString() + '\''";
+
+ primitiveTemplate integerSymbol for Integer default using INT:
+ value = "Integer.valueOf(%token%)";
+
+ primitiveTemplate booleanSymbol for Boolean default using BOOLEAN:
+ value = "Boolean.valueOf(%token%)";
+
+ template Grammar main
+ :
+ "grammar" name <no_space> "_ANTLR3" ";"
+ (isDefined(options) ?
+ "options" "{" [
+ options
+ ] "}"
+ )
+ (isDefined(package) ?
+ "@header" "{"
+ "package" package ";"
+ "}"
+ "@lexer::header" "{"
+ "package" package ";"
+ "}"
+"@lexer::members {
+
+ private void newline() {}
+
+ public org.eclipse.gmt.tcs.injector.TCSRuntime ei = null;
+
+ public void displayRecognitionError(String[] tokenNames, RecognitionException e) {
+ ei.reportError((Exception)e);
+ }
+
+ public Token emit() {
+ org.eclipse.gmt.tcs.injector.wrappers.antlr3.ANTLR3LocationToken ret = null;
+
+ ret = new org.eclipse.gmt.tcs.injector.wrappers.antlr3.ANTLR3LocationToken(input, type, channel, tokenStartCharIndex, getCharIndex()-1);
+ ret.setLine(tokenStartLine);
+ ret.setText(text);
+ ret.setCharPositionInLine(tokenStartCharPositionInLine);
+ ret.setEndLine(getLine());
+ ret.setEndColumn(getCharPositionInLine());
+ emit(ret);
+
+ return ret;
+ }
+
+}"
+ )
+ (isDefined(actions) ?
+ "@members" "{" [
+ actions
+ "public static void main(String[] args) throws Exception {
+ CharStream input = new ANTLRFileStream(args[0]);"
+ name <no_space> "_ANTLR3Lexer lex = new " name <no_space> "_ANTLR3Lexer(input);
+ CommonTokenStream tokens = new CommonTokenStream(lex);
+ tokens.discardTokenType(WS);
+ tokens.discardTokenType(COMMENT);
+ tokens.discardTokenType(NL);
+ "
+ name <no_space> "_ANTLR3Parser parser = new " name <no_space> "_ANTLR3Parser(tokens);
+ parser.main();
+ }"
+ ] "}"
+ )
+ [
+ rules
+ ] {indentIncr = 0, nbNL = 2}
+ (isDefined('lexer') ?
+ 'lexer'
+ [ lexerRules ] {indentIncr = 0, nbNL = 2}
+ )
+ ;
+
+ template ProductionRule
+ : name
+ (isDefined(parameters) ?
+ "[" parameters{separator = ","} "]"
+ )
+ (isDefined(returns) ?
+ "returns" "["
+ "Object" "ret2"
+ "]"
+ )
+ "@init" "{"
+ -- if not needReturnDeclaration, then it is a label, which is automatically created by ANTLRv3, or it is not needed for some other reason
+ (isDefined(returns) and needReturnDeclaration ?
+ returns
+ )
+ (isDefined(declarations) ?
+ declarations
+ )
+ "}"
+ <newline> <tab> ":"
+ (isDefined(expression) ?
+ <tab> expression
+ )
+ [ "{" [
+ (isDefined(actions) ?
+ actions
+ )
+ (isDefined(returns) ?
+ "ret2" "=" "ret" ";"
+ )
+ ] "}" ] {indentIncr = 2}
+ <newline> <tab> ";"
+ ;
+
+ template VariableDeclaration
+ : type name
+ (isDefined(initialValue) ?
+ "=" initialValue
+ )
+ ";"
+ ;
+
+ template Parameter
+ : type name
+ ;
+
+ template Variable
+ : declaration{refersTo = name}
+ ;
+
+ template Expression abstract;
+
+ template Alternative
+ : (isDefined(prevAction) ?
+ "{" prevAction "}"
+ )
+ (one(expressions) ?
+ expressions
+ :
+ "("
+ (isDefined(options) ?
+ "options" "{"
+ options
+ "}" ":"
+ )
+ expressions{separator = "|"}
+ ")"
+ )
+ ;
+
+ template Concatenation
+ : (isDefined(syntacticPredicate) ?
+ "(" syntacticPredicate ")" "=>"
+ )
+ "("
+ (isDefined(options) ?
+ "options" "{"
+ options
+ "}" ":"
+ )
+ expressions
+ ")"
+ (isDefined(action) ?
+ "{" action "}"
+ )
+ ;
+
+ template Terminal
+ : "\'" <no_space> 'value' <no_space> "\'"
+ (isDefined(action) ?
+ "{" action "}"
+ )
+ ;
+
+-- @begin ForLexer
+ template CharTerminal
+ : "\'" <no_space> value <no_space> "\'"
+ ;
+
+ template Negation
+ : "~" expression
+ ;
+
+ template Drop
+ : expression "!"
+ ;
+
+ template Interval
+ : start ".." end
+ ;
+-- @end ForLexer
+
+ template RuleCall
+ : (isDefined(prevAction) ?
+ "{" prevAction "}"
+ )
+ (isDefined(syntacticPredicate) ?
+-- "(" syntacticPredicate ")" "=>"
+ )
+ (isDefined(storeTo) ?
+ storeTo "="
+ )
+ calledRule{refersTo = name}
+ (isDefined(arguments) ?
+ "[" arguments{separator = ","} "]"
+ )
+ (isDefined(action) ?
+ "{" action "}"
+ )
+ ;
+
+ template TokenCall
+ : (isDefined(prevAction) ?
+ "{" prevAction "}"
+ )
+ (isDefined(storeASTTo) ?
+ storeASTTo "="
+ )
+ name
+ (isDefined(action) ?
+ "{" action "}"
+ )
+ ;
+
+ template SemanticAction abstract;
+
+ template SimpleSemanticAction
+ : 'value'
+ ;
+
+ template SemanticActionBlock
+ : actions
+ ;
+
+ template ActionExpression abstract;
+
+ template TextualExpression
+ : 'value'
+ ;
+
+ template LiteralExpression
+ : 'value'
+ ;
+
+ template Sequence_
+ : (isDefined(prevAction) ?
+ "{" prevAction "}"
+ )
+ "("
+ (isDefined(options) ?
+ "options" "{"
+ options
+ "}" ":"
+ )
+ expression
+ ")"
+ (lower = 0 ?
+ (upper = 1 ? "?")
+ (upper = -1 ? "*")
+ )
+ (lower = 1 ?
+ (upper = -1 ? "+")
+ )
+ (isDefined(action) ?
+ "{" action "}"
+ )
+
+ ;
+
+ symbols {
+ lsquare = "[";
+ rsquare = "]" : rightSpace;
+ excl = "!";
+ coma = ",";
+ lparen = "(";
+ rparen = ")";
+ lcurly = "{" : leftSpace;
+ rcurly = "}";
+ semi = ";";
+ colon = ":" : leftSpace, rightSpace;
+ colons = "::";
+ pipe = "|";
+ sharp = "#";
+ qmark = "?";
+
+ -- operator symbols
+ point = ".";
+ rarrow = "->";
+ minus = "-";
+ star = "*";
+ slash = "/";
+ plus = "+";
+ eq = "=";
+ gt = ">";
+ lt = "<";
+ ge = ">=";
+ le = "<=";
+ ne = "<>";
+ larrow = "<-";
+ }
+
+ lexer = "
+ // no need for lexer for a serialization-only TCS model
+ ";
+
+}
diff --git a/dsls/ANTLR/build.properties b/dsls/ANTLR/build.properties
new file mode 100644
index 0000000..b4f8540
--- /dev/null
+++ b/dsls/ANTLR/build.properties
@@ -0,0 +1,6 @@
+dsl.name=ANTLR
+dsl.ext=g
+
+syntax.parser.build=false
+syntax.tcs.filename=${dsl.name}v3.tcs
+syntax.tcs.compileIt=true \ No newline at end of file
diff --git a/dsls/Editor/.externalToolBuilders/Editor DSL Builder.launch b/dsls/Editor/.externalToolBuilders/Editor DSL Builder.launch
new file mode 100644
index 0000000..99d87d7
--- /dev/null
+++ b/dsls/Editor/.externalToolBuilders/Editor DSL Builder.launch
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
+<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_CLEAN_TARGETS" value="clean,"/>
+<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
+<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
+<booleanAttribute key="org.eclipse.ant.uiSET_INPUTHANDLER" value="false"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/AMMAScripts/build.dsl.xml"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
+<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
+<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry containerPath=&quot;org.eclipse.jdt.launching.JRE_CONTAINER&quot; path=&quot;1&quot; type=&quot;4&quot;/&gt;&#13;&#10;"/>
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry id=&quot;org.eclipse.ant.ui.classpathentry.antHome&quot;&gt;&#13;&#10;&lt;memento default=&quot;true&quot;/&gt;&#13;&#10;&lt;/runtimeClasspathEntry&gt;&#13;&#10;"/>
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry id=&quot;org.eclipse.ant.ui.classpathentry.extraClasspathEntries&quot;&gt;&#13;&#10;&lt;memento/&gt;&#13;&#10;&lt;/runtimeClasspathEntry&gt;&#13;&#10;"/>
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/AMMAScripts/libs/antlr.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/AMMAScripts/libs/antlr-3.0.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/AMMAScripts/libs/antlr3-ant.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/AMMAScripts/libs/stringtemplate-3.0.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="AMMAScripts"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/AMMAScripts/build.dsl.xml}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,clean"/>
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/Editor}"/>
+</launchConfiguration>
diff --git a/dsls/Editor/.project b/dsls/Editor/.project
new file mode 100644
index 0000000..2ddf854
--- /dev/null
+++ b/dsls/Editor/.project
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>Editor</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
+ <triggers>clean,full,incremental,</triggers>
+ <arguments>
+ <dictionary>
+ <key>LaunchConfigHandle</key>
+ <value>&lt;project&gt;/.externalToolBuilders/Editor DSL Builder.launch</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2m.atl.adt.builder.atlBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.m2m.atl.adt.builder.atlNature</nature>
+ </natures>
+</projectDescription>
diff --git a/dsls/Editor/Compiler/.gitignore b/dsls/Editor/Compiler/.gitignore
new file mode 100644
index 0000000..273da4d
--- /dev/null
+++ b/dsls/Editor/Compiler/.gitignore
@@ -0,0 +1 @@
+/TCS2Editor.asm
diff --git a/dsls/Editor/Compiler/TCS2Editor.atl b/dsls/Editor/Compiler/TCS2Editor.atl
new file mode 100644
index 0000000..1f7f450
--- /dev/null
+++ b/dsls/Editor/Compiler/TCS2Editor.atl
@@ -0,0 +1,152 @@
+module TCS2Editor;
+create OUT : Editor from IN : TCS;
+
+helper context TCS!ConcreteSyntax def: getToken(name : String) : TCS!Token =
+ self.tokens->any(e | e.name = name);
+
+rule TCS2Editor {
+ from
+ s : TCS!ConcreteSyntax
+ to
+ t : Editor!Editor(
+ extension <- 'mgm', -- not necessary
+ group <- Set {keywords, symbols, types},
+ block <- let ct : TCS!Token = s.getToken('COMMENT') in
+ if ct.oclIsUndefined() then
+ Sequence {}
+ else
+ ct.pattern.simplePatterns->collect(e | thisModule.createCommentBlock(e.rule))
+ endif->including(
+ let st : TCS!Token = s.getToken('STRING') in
+ if st.oclIsUndefined() then
+ thisModule.createStringBlock('\"', '\"', '\\')
+ else
+ let r : TCS!Rule = st.pattern.simplePatterns->first().rule in
+ thisModule.createStringBlock(
+ r.start.name,
+ r.end.name,
+ if r.esc.oclIsUndefined() then
+ OclUndefined
+ else
+ r.esc.name
+ endif
+ )
+ endif
+ )
+ ),
+ keywords : Editor!GroupElement(
+ type <- 'keywords',
+ format <- thisModule.createFormat('times', true, false, 127, 0, 85),
+ element <- TCS!Keyword.allInstances()
+ ),
+ symbols : Editor!GroupElement(
+ type <- 'symbols',
+ format <- thisModule.createFormat('times', true, false, 127, 0, 85),
+ element <- TCS!Symbol.allInstances()
+ ),
+ types : Editor!GroupElement(
+ type <- 'types',
+ format <- thisModule.createFormat('times', true, false, 42, 0, 255),
+ element <- s.templates
+ )
+}
+
+-- Create a block for comment syntax
+rule createCommentBlock(r : TCS!RulePattern) {
+ to
+ t : Editor!Block(
+ type <- 'CommentsLine',
+ format <- thisModule.createFormat('times', false, true, 0, 130, 0)
+ )
+ do {
+ t.blockbegin <- r.start.name;
+ t.blockend <- if r.oclIsKindOf(TCS!MultiLineRule) then r.end.name else '' endif;
+ t;
+ }
+}
+
+-- Create a block for string syntax
+rule createStringBlock(start : String, end : String, esc : String) {
+ to
+ t : Editor!Block(
+ type <- 'string',
+ blockbegin <- start,
+ blockend <- end,
+ esc <- esc,
+ format <- thisModule.createFormat('times', false, false, 0, 0, 255)
+ )
+ do {
+ t;
+ }
+}
+
+rule createFormat(f : String, bold : Boolean, i : Boolean, r : Integer, g : Integer, b : Integer) {
+ to
+ t : Editor!Format(
+ color <- thisModule.createColor(r, g, b),
+ font <- thisModule.createFont(f, bold, i)
+ )
+ do {
+ t;
+ }
+}
+
+rule createFont(f : String, b : Boolean, i : Boolean) {
+ to
+ t : Editor!Font(
+ font <- f,
+ bold <- b,
+ italic <- i
+ )
+ do {
+ t;
+ }
+}
+
+rule createColor(r : Integer, g : Integer, b : Integer) {
+ to
+ t : Editor!Color(
+ red <- r,
+ green <- g,
+ blue <- b
+ )
+ do {
+ t;
+ }
+}
+
+rule keyword {
+ from
+ s : TCS!Keyword
+ to
+ t : Editor!Element(
+ element <- s.value
+ )
+}
+
+rule symbol {
+ from
+ s : TCS!Symbol
+ to
+ t : Editor!Element(
+ element <- s.value
+ )
+}
+
+rule type {
+ from
+ s : TCS!PrimitiveTemplate
+ to
+ t : Editor!Element(
+ element <- s.typeName
+ )
+}
+
+-- groupElement 'constants'{
+-- indent '0';
+-- format {
+-- color 24, 159, 71;
+-- font 'times', false, false;
+-- }
+-- element 'true';
+-- }
diff --git a/dsls/Editor/Metamodel/Editor.ann b/dsls/Editor/Metamodel/Editor.ann
new file mode 100644
index 0000000..f413d24
--- /dev/null
+++ b/dsls/Editor/Metamodel/Editor.ann
@@ -0,0 +1,19 @@
+annotate Editor {
+ annotate Editor with
+ nsURI='http://www.eclipse.org/gmt/tcs/2007/Editor',
+ nsPrefix='edt';
+
+ annotate PrimitiveTypes with
+ nsURI='http://www.eclipse.org/gmt/tcs/2007/Editor-PrimitiveTypes',
+ nsPrefix='ptypes';
+
+ annotate "PrimitiveTypes::String" with
+ instanceClassName='java.lang.String';
+
+ annotate "PrimitiveTypes::Integer" with
+ instanceClassName='int';
+
+ annotate "PrimitiveTypes::Boolean" with
+ instanceClassName='boolean';
+
+} \ No newline at end of file
diff --git a/dsls/Editor/Metamodel/Editor.km3 b/dsls/Editor/Metamodel/Editor.km3
new file mode 100644
index 0000000..13d2d97
--- /dev/null
+++ b/dsls/Editor/Metamodel/Editor.km3
@@ -0,0 +1,66 @@
+package Editor {
+ abstract class LocatedElement {
+ attribute location : String;
+ }
+
+ class Editor extends LocatedElement {
+ attribute extension : String;
+ reference block[*] container : Block oppositeOf editor;
+ reference group[*] container : GroupElement oppositeOf editor;
+ }
+
+ class Block extends LocatedElement {
+ attribute type : String;
+ attribute blockbegin : String;
+ attribute blockend : String;
+ attribute esc[0-1] : String;
+ reference editor : Editor oppositeOf block;
+ reference format[0-1] container : Format oppositeOf blockFormat;
+ }
+
+ class GroupElement extends LocatedElement {
+ attribute type : String;
+ reference editor : Editor oppositeOf group;
+ reference indent[0-1] container : Indent oppositeOf groupElementIndent;
+ reference format[0-1] container : Format oppositeOf groupElementFormat;
+ reference element[*] container : Element oppositeOf groupElement;
+ }
+
+ class Element extends LocatedElement {
+ attribute element : String;
+ reference groupElement : GroupElement oppositeOf element;
+ }
+
+ class Format extends LocatedElement {
+ reference color[0-1] container : Color oppositeOf format;
+ reference font[0-1] container : Font oppositeOf format;
+ reference groupElementFormat : GroupElement oppositeOf format;
+ reference blockFormat : Block oppositeOf format;
+ }
+
+ class Color extends LocatedElement {
+ attribute red : Integer;
+ attribute green : Integer;
+ attribute blue : Integer;
+ reference format : Format oppositeOf color;
+ }
+
+ class Font extends LocatedElement {
+ attribute font : String;
+ attribute bold : Boolean;
+ attribute italic : Boolean;
+ reference format : Format oppositeOf font;
+ }
+
+ class Indent extends LocatedElement {
+ attribute retrait : String;
+ reference groupElementIndent : GroupElement oppositeOf indent;
+ }
+
+}
+
+package PrimitiveTypes {
+ datatype String;
+ datatype Integer;
+ datatype Boolean;
+}
diff --git a/dsls/Editor/Syntax/Editor.tcs b/dsls/Editor/Syntax/Editor.tcs
new file mode 100644
index 0000000..0c4c373
--- /dev/null
+++ b/dsls/Editor/Syntax/Editor.tcs
@@ -0,0 +1,213 @@
+syntax Editor {
+
+ primitiveTemplate identifier for String default using NAME:
+ value = "%token%";
+
+ primitiveTemplate stringSymbol for String using STRING:
+ value = "%token%",
+ serializer="'\'' + %value%.toCString() + '\''";
+
+ primitiveTemplate integerSymbol for Integer default using INT:
+ value = "Integer.valueOf(%token%)";
+
+ template Editor main
+ : "editor" extension {as = stringSymbol} "{"
+ block
+ group
+ "}"
+ ;
+
+ template Block
+ : "block" type {as = stringSymbol} "," blockbegin {as = stringSymbol} "," blockend {as = stringSymbol} "{"
+ format
+ "}"
+ ;
+
+ template Format
+ : "format" "{"
+ color
+ font
+ "}"
+ ;
+
+ template Color
+ : "color" red "," green "," blue ";"
+ ;
+
+ template Font
+ : "font" font {as = stringSymbol} "," (bold ? "true" : "false") "," (italic ? "true" : "false" ) ";"
+ ;
+
+ template GroupElement
+ : "groupElement" type {as = stringSymbol} "{"
+ indent
+ format
+ element
+ "}"
+ ;
+
+ template Element
+ : "element" element {as = stringSymbol} ";"
+ ;
+
+ template Indent
+ : "indent" retrait {as = stringSymbol} ";"
+ ;
+
+ symbols {
+ lsquare = "[";
+ rsquare = "]";
+ excl = "!";
+ coma = ",";
+ lparen = "(";
+ rparen = ")";
+ lcurly = "{";
+ rcurly = "}";
+ semi = ";";
+ colon = ":";
+ colons = "::";
+ pipe = "|";
+ sharp = "#";
+ qmark = "?";
+
+ -- operator symbols
+ point = ".";
+ rarrow = "->";
+ minus = "-";
+ star = "*";
+ slash = "/";
+ plus = "+";
+ eq = "=";
+ gt = ">";
+ lt = "<";
+ ge = ">=";
+ le = "<=";
+ ne = "<>";
+ larrow = "<-";
+ }
+
+ token COMMENT : endOfLine(start = "--");
+
+ lexer = "
+%options testLiterals = false;
+
+NL
+ : ( '\\r' '\\n'
+ | '\\n' '\\r' //Improbable
+ | '\\r'
+ | '\\n'
+ )
+ {newline();}
+ ;
+
+WS
+ : ( ' '
+ | '\\t'
+ )
+ ;
+
+%protected
+DIGIT
+ : '0'..'9'
+ ;
+
+%protected
+ALPHA
+ : 'a'..'z'
+ | 'A'..'Z'
+ | '_'
+ //For Unicode compatibility (from 0000 to 00ff)
+ | '\\u00C0' .. '\\u00D6'
+ | '\\u00D8' .. '\\u00F6'
+ | '\\u00F8' .. '\\u00FF'
+ ;
+
+%protected
+SNAME
+%v2 options {
+%v2 testLiterals = true;
+%v2 }
+ : (ALPHA) (ALPHA | DIGIT)*
+;
+
+NAME
+ : (
+%v3 SNAME
+%v2 s:SNAME {if(s.getType() != SNAME) $setType(s.getType());}
+ | '\"'!
+ ( ESC
+ | '\\n' {newline();}
+ | ~('\\\\'|'\\\"'|'\\n')
+ )*
+ '\"'!
+%v3 {setText(ei.unescapeString(getText(), 1));}
+ )
+ ;
+
+INT
+ : (DIGIT)+
+%v2 (('.' DIGIT)=> '.' (DIGIT)+ {$setType(FLOAT);})?
+ ;
+
+%v3 FLOAT : DIGIT+ '.' DIGIT* ;
+
+%protected
+ESC
+ : '\\\\'!
+ ( 'n' {%setText(\"\\n\");}
+ | 'r' {%setText(\"\\r\");}
+ | 't' {%setText(\"\\t\");}
+ | 'b' {%setText(\"\\b\");}
+ | 'f' {%setText(\"\\f\");}
+ | '\"' {%setText(\"\\\"\");}
+ | '\\'' {%setText(\"\\'\");}
+ | '\\\\' {%setText(\"\\\\\");}
+ | (
+ ('0'..'3')
+ (
+%v2 options {
+%v2 warnWhenFollowAmbig = false;
+%v2 }
+ : ('0'..'7')
+ (
+%v2 options {
+%v2 warnWhenFollowAmbig = false;
+%v2 }
+ : '0'..'7'
+ )?
+ )?
+ | ('4'..'7')
+ (
+%v2 options {
+%v2 warnWhenFollowAmbig = false;
+%v2 }
+ : ('0'..'7')
+ )?
+ )
+ {
+ String s = %getText;
+ int i;
+ int ret = 0;
+ String ans;
+ for (i=0; i<s.length(); ++i)
+ ret = ret*8 + s.charAt(i) - '0';
+ ans = String.valueOf((char) ret);
+ %setText(ans);
+ }
+ )
+ ;
+
+STRING
+ : '\\''!
+ ( ESC
+ | '\\n' {newline();}
+ | ~('\\\\'|'\\''|'\\n')
+ )*
+ '\\''!
+%v3 {setText(ei.unescapeString(getText(), 1));}
+ ;
+
+ ";
+
+}
+
diff --git a/dsls/Editor/build.properties b/dsls/Editor/build.properties
new file mode 100644
index 0000000..21bcd8a
--- /dev/null
+++ b/dsls/Editor/build.properties
@@ -0,0 +1,2 @@
+dsl.name=Editor
+dsl.ext=edt \ No newline at end of file
diff --git a/dsls/Outline/.externalToolBuilders/Outline DSL Builder.launch b/dsls/Outline/.externalToolBuilders/Outline DSL Builder.launch
new file mode 100644
index 0000000..5458240
--- /dev/null
+++ b/dsls/Outline/.externalToolBuilders/Outline DSL Builder.launch
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
+<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_CLEAN_TARGETS" value="clean,"/>
+<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
+<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
+<booleanAttribute key="org.eclipse.ant.uiSET_INPUTHANDLER" value="false"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/AMMAScripts/build.dsl.xml"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
+<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
+<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry containerPath=&quot;org.eclipse.jdt.launching.JRE_CONTAINER&quot; path=&quot;1&quot; type=&quot;4&quot;/&gt;&#13;&#10;"/>
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry id=&quot;org.eclipse.ant.ui.classpathentry.antHome&quot;&gt;&#13;&#10;&lt;memento default=&quot;true&quot;/&gt;&#13;&#10;&lt;/runtimeClasspathEntry&gt;&#13;&#10;"/>
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry id=&quot;org.eclipse.ant.ui.classpathentry.extraClasspathEntries&quot;&gt;&#13;&#10;&lt;memento/&gt;&#13;&#10;&lt;/runtimeClasspathEntry&gt;&#13;&#10;"/>
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/AMMAScripts/libs/antlr.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/AMMAScripts/libs/antlr-3.0.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/AMMAScripts/libs/antlr3-ant.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/AMMAScripts/libs/stringtemplate-3.0.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="AMMAScripts"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/AMMAScripts/build.dsl.xml}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,clean"/>
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/Outline}"/>
+</launchConfiguration>
diff --git a/dsls/Outline/.project b/dsls/Outline/.project
new file mode 100644
index 0000000..53a70b5
--- /dev/null
+++ b/dsls/Outline/.project
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>Outline</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.m2m.atl.adt.builder.atlBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
+ <triggers>clean,full,incremental,</triggers>
+ <arguments>
+ <dictionary>
+ <key>LaunchConfigHandle</key>
+ <value>&lt;project&gt;/.externalToolBuilders/Outline DSL Builder.launch</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.m2m.atl.adt.builder.atlNature</nature>
+ </natures>
+</projectDescription>
diff --git a/dsls/Outline/Compiler/.gitignore b/dsls/Outline/Compiler/.gitignore
new file mode 100644
index 0000000..f04c759
--- /dev/null
+++ b/dsls/Outline/Compiler/.gitignore
@@ -0,0 +1 @@
+/KM32Outline.asm
diff --git a/dsls/Outline/Compiler/KM32Outline.atl b/dsls/Outline/Compiler/KM32Outline.atl
new file mode 100644
index 0000000..d3de7da
--- /dev/null
+++ b/dsls/Outline/Compiler/KM32Outline.atl
@@ -0,0 +1,74 @@
+module KM32Outline;
+create OUT : Outline from IN : KM3;
+
+uses KM3Helpers;
+
+helper context KM3!Package def: allClasses : Sequence(KM3!Class) =
+ self.contents->iterate(e; acc : Sequence(KM3!Class) = Sequence {} |
+ if e.oclIsKindOf(KM3!Class) then
+ acc->including(e)
+ else if e.oclIsKindOf(KM3!Package) then
+ acc->union(e.allClasses)
+ else
+ acc
+ endif endif
+ );
+
+rule Metamodel2Outline {
+ from
+ s : KM3!Metamodel
+ to
+ t : Outline!Outline (
+ nodes <- s.contents->collect(e | e.allClasses)->flatten()
+ )
+}
+
+helper context KM3!Class def: hasName : Boolean =
+ self.allStructuralFeatures->exists(e | e.name = 'name');
+
+rule UnnamedClass2Node {
+ from
+ s : KM3!Class (
+ not s.hasName
+ )
+ to
+ t : Outline!Node (
+ name <- s.name,
+ label <- label,
+ icon <- 'dummy',
+ mapping <- map
+ ),
+ label : Outline!Label (
+ label <- s.name
+ ),
+ map : Outline!"Map" (
+ mapString <- s.name
+ )
+}
+
+rule NamedClass2Node {
+ from
+ s : KM3!Class (
+ s.hasName
+ )
+ to
+ t : Outline!Node (
+ name <- s.name,
+ label <- label,
+ icon <- 'dummy',
+ mapping <- map
+ ),
+ label : Outline!Label (
+ label <- s.name,
+ labelSuite <- Sequence {colon, name}
+ ),
+ map : Outline!"Map" (
+ mapString <- s.name
+ ),
+ colon : Outline!LabelSuite (
+ label <- ' : '
+ ),
+ name : Outline!LabelSuite (
+ methodCall <- 'name'
+ )
+}
diff --git a/dsls/Outline/Metamodel/Outline.ann b/dsls/Outline/Metamodel/Outline.ann
new file mode 100644
index 0000000..2cbe379
--- /dev/null
+++ b/dsls/Outline/Metamodel/Outline.ann
@@ -0,0 +1,19 @@
+annotate Outline {
+ annotate Outline with
+ nsURI='http://www.eclipse.org/gmt/tcs/2007/Outline',
+ nsPrefix='otl';
+
+ annotate PrimitiveTypes with
+ nsURI='http://www.eclipse.org/gmt/tcs/2007/Outline-PrimitiveTypes',
+ nsPrefix='ptypes';
+
+ annotate "PrimitiveTypes::Boolean" with
+ instanceClassName='boolean';
+
+ annotate "PrimitiveTypes::Integer" with
+ instanceClassName='int';
+
+ annotate "PrimitiveTypes::String" with
+ instanceClassName='java.lang.String';
+
+} \ No newline at end of file
diff --git a/dsls/Outline/Metamodel/Outline.km3 b/dsls/Outline/Metamodel/Outline.km3
new file mode 100644
index 0000000..670f8b9
--- /dev/null
+++ b/dsls/Outline/Metamodel/Outline.km3
@@ -0,0 +1,40 @@
+package Outline {
+
+ abstract class LocatedElement {
+ attribute location : String;
+ }
+
+ class Outline extends LocatedElement {
+ attribute extension : String;
+ reference nodes[*] ordered container : Node oppositeOf outline;
+ }
+
+ class Node extends LocatedElement {
+ attribute name : String;
+ reference label container : Label;
+ attribute icon : String;
+ reference outline[0-1] : Outline oppositeOf nodes;
+ reference mapping[*] container : Map;
+ }
+
+ class Label extends LocatedElement {
+ attribute label : String;
+ attribute methodCall : String;
+ reference labelSuite[*] container : LabelSuite;
+ }
+
+ class LabelSuite extends LocatedElement {
+ attribute label : String;
+ attribute methodCall : String;
+ }
+
+ class Map extends LocatedElement {
+ attribute mapString : String;
+ }
+}
+
+package PrimitiveTypes {
+ datatype Boolean;
+ datatype Integer;
+ datatype String;
+}
diff --git a/dsls/Outline/build.properties b/dsls/Outline/build.properties
new file mode 100644
index 0000000..7595394
--- /dev/null
+++ b/dsls/Outline/build.properties
@@ -0,0 +1,3 @@
+dsl.name=Outline
+
+syntax.parser.build=false \ No newline at end of file
diff --git a/dsls/TCS/.project b/dsls/TCS/.project
new file mode 100644
index 0000000..c1bc8fe
--- /dev/null
+++ b/dsls/TCS/.project
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>TCS</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.gmt.tcs.builder.Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2m.atl.adt.builder.atlBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.m2m.atl.adt.builder.atlNature</nature>
+ </natures>
+</projectDescription>
diff --git a/dsls/TCS/Compiler/.gitignore b/dsls/TCS/Compiler/.gitignore
new file mode 100644
index 0000000..9889644
--- /dev/null
+++ b/dsls/TCS/Compiler/.gitignore
@@ -0,0 +1,3 @@
+/TCS2ANTLRv2Actions.asm
+/TCS2ANTLRv3Actions.asm
+/TCS2ANTLR.asm
diff --git a/dsls/TCS/Compiler/TCS2ANTLR.atl b/dsls/TCS/Compiler/TCS2ANTLR.atl
new file mode 100644
index 0000000..a1937fb
--- /dev/null
+++ b/dsls/TCS/Compiler/TCS2ANTLR.atl
@@ -0,0 +1,1992 @@
+-- @atlcompiler atl2006
+module TCS2ANTLR;
+create OUT : ANTLR from IN : TCS, MM : KM3;
+
+uses KM3Helpers;
+uses strings;
+uses TCS2ANTLRActions;
+
+
+-- Used to navigate over TCS model.
+--helper context MOF!Classifier def: getInstanceBy(propName : String, value : String) : String =
+-- self.allInstances()->select(e | e.refGetValue(propName) = value)->asSequence()->first();
+helper context MOF!EClassifier def: getInstancesBy(propName : String, value : String) : Sequence(OclAny) =
+ self.allInstancesFrom('IN')->select(e |
+ e.refGetValue(propName) = value
+ )->asSequence(); -- without From('IN'), elements from ANTLR TCS are also returned
+
+helper context MOF!EClassifier def: getInstanceBy(propName : String, value : String) : String =
+ self.getInstancesBy(propName, value)->first();
+
+-- without From('IN'), elements from ANTLR TCS are also returned
+helper context String def: toPRName() : String =
+ let ret : String = self.firstToLower() in
+ if thisModule.reserved->includes(ret) then
+ ret + '_'
+ else
+ ret
+ endif;
+
+helper context TCS!SequenceElement def: getTemplate : TCS!Template =
+ let sequence : TCS!"Sequence" = self.elementSequence in
+ if not sequence.templateContainer.oclIsUndefined() then
+ sequence.templateContainer
+ else if not sequence.prefixContainer.oclIsUndefined() then
+ sequence.prefixContainer
+ else if not sequence.otContainer.oclIsUndefined() then
+ sequence.otContainer
+ else if not sequence.blockContainer.oclIsUndefined() then
+ sequence.blockContainer.getTemplate
+ else if not sequence.thenContainer.oclIsUndefined() then
+ sequence.thenContainer.getTemplate
+ else if not sequence.elseContainer.oclIsUndefined() then
+ sequence.elseContainer.getTemplate
+ else if not sequence.alternativeContainer.oclIsUndefined() then
+ sequence.alternativeContainer.getTemplate
+ else if not sequence.functionContainer.oclIsUndefined() then
+ sequence.functionContainer
+ else -- if not sequence.separatorContainer.oclIsUndefined() then
+ sequence.separatorContainer.property.getTemplate
+ endif endif endif endif endif endif endif endif;
+
+-- gets positive conditions
+helper context TCS!SequenceElement def: getConditions : Sequence(TCS!AtomExp) =
+ let sequence : TCS!"Sequence" = self.elementSequence in
+ if not sequence.templateContainer.oclIsUndefined() then
+ Sequence {}
+ else if not sequence.otContainer.oclIsUndefined() then
+ Sequence {}
+ else if not sequence.blockContainer.oclIsUndefined() then
+ sequence.blockContainer.getConditions
+ else if not sequence.thenContainer.oclIsUndefined() then
+ sequence.thenContainer.getAllConditions
+ else if not sequence.elseContainer.oclIsUndefined() then
+ sequence.elseContainer.getConditions -- we don't want the negative conditions
+ else if not sequence.alternativeContainer.oclIsUndefined() then
+ sequence.alternativeContainer.getConditions
+ else if not sequence.functionContainer.oclIsUndefined() then
+ Sequence {}
+ else -- if not sequence.separatorContainer.oclIsUndefined() then
+ sequence.separatorContainer.property.getConditions
+ endif endif endif endif endif endif endif;
+
+helper context TCS!ConditionalElement def: getAllConditions : Sequence(TCS!AtomExp) =
+ self.condition.expressions->union(self.getConditions);
+
+helper context TCS!Template def: class : KM3!Class =
+ let name : String = if self.oclIsKindOf(TCS!FunctionTemplate) then
+ self.className
+ else
+ self.name
+ endif in
+ KM3!Class.allInstancesFrom('MM')->asSequence()->select(e |
+ e.name = name
+ )->first();
+--OR KM3!Class.getInstanceFromBy('MM', 'name', name);
+--OR name.class;
+-- AND
+-- helper context String def: class : KM3!Class oppositeOf name;
+-- How to specify the metamodel in which to look for?
+-- helper context String def: class : KM3!Class in MM oppositeOf name;
+
+
+helper context TCS!Template def: subtypes : Set(KM3!Class) =
+ KM3!Class.allInstancesFrom('MM')->select(e |
+ e.supertypes->includes(self.class)
+ );
+
+helper context TCS!Template def: subnames : Set(KM3!Class) =
+ self.subtypes->collect(e |
+ e.name
+ );
+
+helper context TCS!Template def: allSubtypes : Set(KM3!Class) =
+ KM3!Class.allInstancesFrom('MM')->select(e |
+ e.allSupertypes->includes(self.class)
+ );
+
+helper context TCS!Template def: allConcreteSubnames : Set(KM3!Class) =
+ self.allSubtypes->reject(e | e.isAbstract)->collect(e |
+ e.name
+ );
+
+-- Returns a Sequence that will be iterated upon in distinct foreach.
+helper context TCS!ClassTemplate def: subtemplates : Sequence(TCS!Template) =
+ let subnames : Sequence(String) = if self.isDeep then
+ self.allConcreteSubnames
+ else
+ self.subnames
+ endif in
+ thisModule.sortTemplates(TCS!Template.allInstancesFrom('IN')->select(e |
+ subnames->includes(e.name) and
+ if e.oclIsKindOf(TCS!ClassTemplate) then
+ self.mode = e.mode
+ else
+ true
+ endif
+ ));
+
+helper context TCS!SequenceElement def: getContext : KM3!Class =
+ self.getTemplate.class;
+
+helper context TCS!SequenceElement def: getContextProperty(name : String) : KM3!StructuralFeature =
+ self.getContext.lookupElementExtended(name);
+
+helper context String def: asLiteral : String =
+ thisModule.literalDelim + self + thisModule.literalDelim;
+
+--helper context TCS!Symbol def: toANTLR : String =
+-- self.name.toUpper() + '\n\t:\t' + self.value.asLiteral + '\n\t;\n';
+
+rule Symbol2LexerRule {
+ from
+ s : TCS!Symbol
+ to
+ t : ANTLR!ProductionRule (
+ name <- s.name.toUpper(),
+ needReturnDeclaration <- false,
+ expression <- e
+ ),
+ e : ANTLR!Terminal (
+ value <- s.value
+ )
+}
+
+-- @begin Token.toANTLR
+--helper context TCS!Token def: toANTLR : String =
+-- self.name + '\n\t:\t' + self.pattern.toANTLR + '\n\t;\n';
+
+rule Token2LexerRule {
+ from
+ s : TCS!Token
+ to
+ t : ANTLR!ProductionRule (
+ name <- s.name,
+ needReturnDeclaration <- false,
+ expression <- s.pattern
+ )
+}
+
+--helper context TCS!OrPattern def: toANTLR : String =
+-- let s : String = self.simplePatterns->iterate(e; acc : String = '' |
+-- if acc = '' then
+-- ''
+-- else
+-- acc + ' | '
+-- endif + e.toANTLR
+-- ) in
+-- if self.simplePatterns->size() > 1 then
+-- '(' + s + ')'
+-- else
+-- s
+-- endif;
+
+rule OrPattern2Alternative {
+ from
+ s : TCS!OrPattern
+ to
+ t : ANTLR!Alternative (
+ expressions <- s.simplePatterns
+ )
+}
+
+--helper context TCS!RulePattern def: getArgument(name : String) : String =
+-- let ret : TCS!Argument = self.arguments->select(e |
+-- e.name = name
+-- )->first() in
+-- if ret.oclIsUndefined() then
+-- OclUndefined
+-- else
+-- ret.value.toANTLR
+-- endif;
+
+-- MODIFIED
+--helper context TCS!RulePattern def: toANTLR : String =
+-- '(' + self.rule.toANTLR + ')';
+
+rule RulePattern2Concatenation {
+ from
+ s : TCS!RulePattern
+ to
+ t : ANTLR!Concatenation ( -- placeholder
+ expressions <- s.rule
+ )
+}
+
+--helper context TCS!WordRule def: toANTLR : String =
+-- self.start.toANTLR + ' ' + self.part.toANTLR + '*' +
+-- if self.end.oclIsUndefined() then
+-- ''
+-- else
+-- ' ' + self.end.toANTLR
+-- endif +
+-- if self.words->size() > 0 then
+-- '{' + self.words->iterate(e; acc : String = '' |
+-- acc + 'if($getText.equals(\"' + e.name.toCString() + '\")) $setType(' + e.token + ');'
+-- ) + '}'
+-- else
+-- ''
+-- endif;
+
+rule WordRule2Concatenation {
+ from
+ s : TCS!WordRule
+ to
+ t : ANTLR!Concatenation (
+ expressions <- Sequence {s.start, part}->union(
+ if s.end.oclIsUndefined() then
+ Sequence {}
+ else
+ Sequence {s.end}
+ endif)
+ ),
+ part : ANTLR!Sequence_ (
+ expression <- s.part,
+ lower <- 0,
+ upper <- 0-1
+ )
+}
+
+--helper context TCS!EndOfLineRule def: toANTLR : String =
+-- self.start.toANTLR + ' (~(\'\\r\'|\'\\n\'))*';
+
+rule EndOfLineRule2Concatenation {
+ from
+ s : TCS!EndOfLineRule
+ to
+ t : ANTLR!Concatenation (
+ expressions <- Sequence {s.start, seq}
+ ),
+ seq : ANTLR!Sequence_ (
+ expression <- neg,
+ lower <- 0,
+ upper <- 0-1
+ ),
+ neg : ANTLR!Negation (
+ expression <- alt
+ ),
+ alt : ANTLR!Alternative (
+ expressions <- Sequence {cr, lf}
+ ),
+ cr : ANTLR!CharTerminal (
+ value <- '\\r'
+ ),
+ lf : ANTLR!CharTerminal (
+ value <- '\\n'
+ )
+}
+
+--helper context TCS!MultiLineRule def: toANTLR : String =
+-- self.start.toANTLR + '!' + '(' +
+-- if self.esc.oclIsUndefined() then
+-- ''
+-- else
+-- '(' + self.esc.toANTLR + '! ~(\'\\n\')) | '
+-- endif +
+-- '\'\\n\' {newline();} | ' +
+-- '~(' +
+-- if self.esc.oclIsUndefined() then
+-- ''
+-- else
+-- self.esc.toANTLR + ' | '
+-- endif + self.end.toANTLR + ' | \'\\n\' )' +
+-- ')*' + self.end.toANTLR + '!';
+
+rule MultiLineRuleWithoutEsc2Concatenation {
+ from
+ s : TCS!MultiLineRule (
+ s.esc.oclIsUndefined()
+ )
+ to
+ t : ANTLR!Concatenation (
+ expressions <- Sequence {
+ if s.dropStart then
+ thisModule.MultiLineRuleDropStart(s)
+ else
+ s.start
+ endif,
+ seq,
+ if s.dropEnd then
+ thisModule.MultiLineRuleDropEnd(s)
+ else
+ s.end
+ endif
+ }
+ ),
+ seq : ANTLR!Sequence_ (
+ options <- Sequence {'greedy = false;'},
+ expression <- alt,
+ lower <- 0,
+ upper <- 0-1
+ ),
+ alt : ANTLR!Alternative (
+ expressions <- Sequence {nl, neg}
+ ),
+ nl : ANTLR!CharTerminal (
+ value <- '\\n',
+ action <- sa
+ ),
+ sa : ANTLR!SimpleSemanticAction (
+ value <- 'newline();'
+ ),
+ neg : ANTLR!Negation (
+ expression <- onl --neggedAlt
+ ),
+-- neggedAlt : ANTLR!Alternative (
+-- expressions <- Sequence {s.end, onl}
+-- ),
+ onl : ANTLR!CharTerminal (
+ value <- '\\n'
+ )
+}
+
+lazy rule MultiLineRuleDropStart {
+ from
+ s : TCS!MultiLineRule
+ to
+ start : ANTLR!Drop (
+ expression <- s.start
+ )
+}
+
+lazy rule MultiLineRuleDropEnd {
+ from
+ s : TCS!MultiLineRule
+ to
+ end : ANTLR!Drop (
+ expression <- s.end
+ )
+}
+
+rule MultiLineRuleWithEsc2Concatenation {
+ from
+ s : TCS!MultiLineRule (
+ not s.esc.oclIsUndefined()
+ )
+ to
+ t : ANTLR!Concatenation (
+ expressions <- Sequence {
+ if s.dropStart then
+ thisModule.MultiLineRuleDropStart(s)
+ else
+ s.start
+ endif,
+ seq,
+ if s.dropEnd then
+ thisModule.MultiLineRuleDropEnd(s)
+ else
+ s.end
+ endif
+ }
+ ),
+ seq : ANTLR!Sequence_ (
+ options <- Sequence {'greedy = false;'},
+ expression <- alt,
+ lower <- 0,
+ upper <- 0-1
+ ),
+ alt : ANTLR!Alternative (
+ expressions <- Sequence {escC, nl, neg}
+ ),
+ escC : ANTLR!Concatenation (
+ expressions <- Sequence {esc, negNl}
+ ),
+ esc : ANTLR!Drop (
+ expression <- thisModule.LazyStringPattern2Terminal(s.esc)
+ ),
+ negNl : ANTLR!Negation (
+ expression <- neggedNl
+ ),
+ neggedNl : ANTLR!CharTerminal (
+ value <- '\\n'
+ ),
+ nl : ANTLR!CharTerminal (
+ value <- '\\n',
+ action <- sa
+ ),
+ sa : ANTLR!SimpleSemanticAction (
+ value <- 'newline();'
+ ),
+ neg : ANTLR!Negation (
+ expression <- neggedAlt
+ ),
+ neggedAlt : ANTLR!Alternative (
+-- expressions <- Sequence {s.esc, s.end, onl}
+ expressions <- Sequence {s.esc, onl}
+ ),
+ onl : ANTLR!CharTerminal (
+ value <- '\\n'
+ )
+}
+
+--helper context TCS!StringPattern def: toANTLR : String =
+-- let d : String =
+-- if self.name.size() = 1 then
+-- '\''
+-- else
+-- thisModule.literalDelim
+-- endif in
+-- d + self.name.toCString() + d;
+
+rule StringPattern2Terminal {
+ from
+ s : TCS!StringPattern
+ to
+ t : ANTLR!Terminal (
+ value <- s.name.toCString()
+ )
+}
+
+lazy rule LazyStringPattern2Terminal {
+ from
+ s : TCS!StringPattern
+ to
+ t : ANTLR!Terminal (
+ value <- s.name.toCString()
+ )
+}
+
+--helper context TCS!ClassPattern def: toANTLR : String =
+-- let alpha : String = '\'a\'..\'z\' | \'A\'..\'Z\'' in
+-- '(' + if self.name = 'alpha' then
+-- alpha
+-- else
+-- if self.name = 'alnum' then
+-- alpha + ' | \'0\'..\'9\''
+-- else
+-- ('unknown class ' + self.name).debug('error')
+-- endif
+-- endif + ')'; -- @end Token.toANTLR
+
+rule AlphaClassPattern2Alternative {
+ from
+ s : TCS!ClassPattern (
+ s.name = 'alpha'
+ )
+ to
+ t : ANTLR!Alternative (
+ expressions <- Sequence {up, low}
+ ),
+ up : ANTLR!Interval (
+ start <- upA,
+ end <- upZ
+ ),
+ low : ANTLR!Interval (
+ start <- lowA,
+ end <- lowZ
+ ),
+ upA : ANTLR!CharTerminal (
+ value <- 'A'
+ ),
+ upZ : ANTLR!CharTerminal (
+ value <- 'Z'
+ ),
+ lowA : ANTLR!CharTerminal (
+ value <- 'a'
+ ),
+ lowZ : ANTLR!CharTerminal (
+ value <- 'z'
+ )
+}
+
+rule AlnumClassPattern2Alternative {
+ from
+ s : TCS!ClassPattern (
+ s.name = 'alnum'
+ )
+ to
+ t : ANTLR!Alternative (
+ expressions <- Sequence {up, low, digit}
+ ),
+ up : ANTLR!Interval (
+ start <- upA,
+ end <- upZ
+ ),
+ low : ANTLR!Interval (
+ start <- lowA,
+ end <- lowZ
+ ),
+ digit : ANTLR!Interval (
+ start <- zero,
+ end <- nine
+ ),
+ upA : ANTLR!CharTerminal (
+ value <- 'A'
+ ),
+ upZ : ANTLR!CharTerminal (
+ value <- 'Z'
+ ),
+ lowA : ANTLR!CharTerminal (
+ value <- 'a'
+ ),
+ lowZ : ANTLR!CharTerminal (
+ value <- 'z'
+ ),
+ zero : ANTLR!CharTerminal (
+ value <- '0'
+ ),
+ nine : ANTLR!CharTerminal (
+ value <- '9'
+ )
+}
+
+helper context TCS!ConcreteSyntax def: mainTemplates : Sequence(TCS!ClassTemplate) =
+ self.templates->select(e |
+ e.oclIsKindOf(TCS!ClassTemplate)
+ )->select(e |
+ e.isMain
+ );
+
+abstract rule ConcreteSyntax2Grammar {
+ from
+ cs : TCS!ConcreteSyntax
+ to
+ g : ANTLR!Grammar (
+ id <- cs.location,
+ name <- cs.name,
+ actions <- Sequence {saei, saErrors},
+ rules <- Sequence {main}->union(cs.templates)->union(cs.operatorLists->collect(e | e.priorities)->flatten()),
+ options <- thisModule.getGrammarOptions(cs.k),
+ package <- 'org.eclipse.gmt.tcs.injector',
+ lexer <-
+ let optionsOrLexer : String = cs.lexer.regexReplaceAll('(?s)%options ([^\\n]*).*$', '$1') in
+ let options : String = if optionsOrLexer = cs.lexer then '' else optionsOrLexer endif in
+ thisModule.lexerHeader
+ .regexReplaceAll('%name%', cs.name)
+ .regexReplaceAll('%optionsPlaceHolder', options)
+ +
+ cs.lexer
+ .regexReplaceAll('%protected', thisModule.lexerFragmentKeyword)
+ .regexReplaceAll('%setText', thisModule.lexerActionSetText)
+ .regexReplaceAll('%getText', thisModule.lexerActionGetText)
+ .regexReplaceAll('%v2', thisModule.lexerV2Replacement)
+ .regexReplaceAll('%v3', thisModule.lexerV3Replacement)
+ .regexReplaceAll('%options', '//')
+-- + cs.symbols->iterate(e; acc : String = '\n' |
+-- acc + '\n' + e.toANTLR
+-- )
+-- + cs.tokens->iterate(e; acc : String = '\n' |
+-- acc + '\n' + e.toANTLR
+-- )
+ ,
+ lexerRules <- cs.symbols->union(cs.tokens)
+ ),
+ saei : ANTLR!SimpleSemanticAction (
+ value <- 'public org.eclipse.gmt.tcs.injector.TCSRuntime ei = null;'
+ ),
+ saErrors : ANTLR!SimpleSemanticAction (
+ value <- thisModule.errorReportingAction
+ ),
+ main : ANTLR!ProductionRule (
+ id <- cs.location,
+ needReturnDeclaration <- false,
+ name <- 'main',
+ returns <- ret
+ ),
+ ret : ANTLR!VariableDeclaration (
+ id <- cs.location,
+ name <- 'ret',
+ initialValue <- 'null',
+ type <- thisModule.typeModelElement
+ )
+}
+
+rule SingleMainTemplateCS2Grammar extends ConcreteSyntax2Grammar {
+ from
+ cs : TCS!ConcreteSyntax (
+ cs.mainTemplates->size() = 1
+ )
+ using {
+ mainTemplate : TCS!ClassTemplate = cs.mainTemplates->first();
+ }
+ to
+ g : ANTLR!Grammar, -- TODO: really necessary to repeat this?
+ c : ANTLR!Concatenation (
+ rule <- main,
+ expressions <- Sequence {s, eof}
+ ),
+ s : ANTLR!Sequence_ (
+ lower <- 1,
+ upper <- if mainTemplate.isMulti then
+ 0 - 1
+ else
+ 1
+ endif,
+ expression <- rc
+ ),
+ rc : ANTLR!RuleCall (
+ id <- cs.location,
+ calledRule <- mainTemplate,
+ storeTo <- vret
+ ),
+ eof : ANTLR!TokenCall (
+ name <- 'EOF'
+ ),
+ vret : ANTLR!Variable (
+ id <- cs.location,
+ declaration <- ret
+ )
+}
+
+rule MultipleMainTemplateCS2Grammar extends ConcreteSyntax2Grammar {
+ from
+ cs : TCS!ConcreteSyntax (
+ cs.mainTemplates->size() > 1
+ )
+ to
+ g : ANTLR!Grammar, -- TODO: really necessary to repeat this?
+ c : ANTLR!Concatenation (
+ rule <- main,
+ expressions <- Sequence {s, eof}
+ ),
+ s : ANTLR!Sequence_ (
+ lower <- 1,
+ upper <- -1,
+ expression <- a
+ ),
+ a : ANTLR!Alternative (
+ id <- cs.location
+ ),
+ vret : distinct ANTLR!Variable foreach(mainTemplate in cs.mainTemplates) (
+ id <- cs.location,
+
+ declaration <- ret
+ ),
+ rc : distinct ANTLR!RuleCall foreach(mainTemplate in cs.mainTemplates) (
+ id <- cs.location,
+
+ calledRule <- mainTemplate,
+ alternative <- a,
+ storeTo <- vret
+ ),
+ eof : ANTLR!TokenCall (
+ name <- 'EOF'
+ )
+}
+
+rule FunctionTemplate2ProductionRule {
+ from
+ t : TCS!FunctionTemplate
+ to
+ pr : ANTLR!ProductionRule (
+ id <- t.location,
+ name <- t.name.toPRName(),
+ needReturnDeclaration <- false,
+ expression <- t.functionSequence,
+ parameters <- ret,
+ -- called ret while it's a parameter
+ -- because it's a ret for the calling classTemplate
+ labelDeclarations <- Sequence {temp}
+ ),
+ temp : ANTLR!VariableDeclaration (
+ id <- t.location,
+ name <- 'temp',
+ initialValue <- 'null',
+ type <- 'java.lang.Object'
+ ),
+ ret : ANTLR!Parameter (
+ id <- t.location,
+ name <- 'ret',
+ type <- thisModule.typeModelElement
+ )
+}
+
+abstract rule ClassTemplate2ProductionRule {
+ from
+ t : TCS!ClassTemplate
+ to
+ pr : ANTLR!ProductionRule (
+ id <- t.location,
+ name <- t.name.toPRName() +
+ if t.mode.oclIsUndefined() then
+ ''
+ else
+ '_' + t.mode
+ endif,
+ returns <- ret
+ ),
+ ret : ANTLR!VariableDeclaration (
+ id <- t.location,
+ name <- 'ret',
+ type <- thisModule.typeModelElement
+ ),
+ saContext : ANTLR!SimpleSemanticAction
+}
+
+rule ConcreteClassTemplate2ProductionRule extends ClassTemplate2ProductionRule {
+ from
+ t : TCS!ClassTemplate (
+ not t.isAbstract
+ )
+ to
+ pr : ANTLR!ProductionRule (
+ expression <- t.templateSequence,
+ declarations <- Sequence {firstToken},
+ labelDeclarations <- Sequence {temp},
+ needReturnDeclaration <- true,
+ actions <- Sequence {saContext, saLocation}
+ ),
+ ret : ANTLR!VariableDeclaration (
+ initialValue <- thisModule.createAction(t.name, t.isContext, t.isAddToContext)
+ ),
+ saContext : ANTLR!SimpleSemanticAction (
+ value <- 'ei.leaveContext(' + t.isContext.toString() + ');'
+ ),
+ temp : ANTLR!VariableDeclaration (
+ id <- t.location,
+ name <- 'temp',
+ initialValue <- 'null',
+ type <- 'java.lang.Object'
+ ),
+ firstToken : ANTLR!VariableDeclaration (
+ id <- t.location,
+ name <- 'firstToken',
+ initialValue <- thisModule.nextTokenValue,
+ type <- thisModule.tokenType
+ ),
+ saLocation : ANTLR!SimpleSemanticAction (
+ value <- thisModule.postActions
+ )
+}
+
+helper context TCS!ClassTemplate def: nonOperatorSubtemplates : Sequence(TCS!Template) =
+ self.subtemplates->select(e |
+ not e.oclIsKindOf(TCS!OperatorTemplate)
+ );
+
+abstract rule AbstractClassTemplate2ProductionRule extends ClassTemplate2ProductionRule {
+ from
+ t : TCS!ClassTemplate (
+ t.isAbstract and not t.isOperatored
+ )
+ to
+ pr : ANTLR!ProductionRule (
+ actions <- Sequence {saContext},
+ needReturnDeclaration <- false,
+ expression <- c
+ ),
+ c : ANTLR!Concatenation (
+ expressions <- if t.prefixSequence.oclIsUndefined() then
+ Sequence {a}
+ else
+ Sequence {t.prefixSequence, a}
+ endif
+ ),
+ a : ANTLR!Alternative (
+ id <- t.location,
+ expressions <- t.nonOperatorSubtemplates->collect(e |
+ thisModule.Templates2RuleCall(t, e)
+ )
+ ),
+ ret : ANTLR!VariableDeclaration (
+ initialValue <- 'null'
+ ),
+ saContext : ANTLR!SimpleSemanticAction (
+ value <- 'ei.addToContext(ret, ' + t.isAddToContext.toString() + ');'
+ )
+-- ,
+-- v : distinct ANTLR!Variable foreach(subtemplate in t.nonOperatorSubtemplates) (
+-- declaration <- ret
+-- ),
+-- rc : distinct ANTLR!RuleCall foreach(subtemplate in t.nonOperatorSubtemplates) (
+-- calledRule <- subtemplate,
+-- syntacticPredicate <- subtemplate.disambiguate,
+-- alternative <- a,
+-- storeTo <- v
+-- )
+}
+
+lazy rule Templates2RuleCall {
+ from
+ caller : TCS!ClassTemplate,
+ callee : TCS!Template
+ to
+ rc : ANTLR!RuleCall (
+ calledRule <- callee,
+ syntacticPredicate <- callee.disambiguate,
+ storeTo <- v
+ ),
+ v : ANTLR!Variable (
+ declaration <- thisModule.resolveTemp(caller, 'ret')
+ )
+}
+
+rule EmptyAbstractClassTemplate2ProductionRule extends AbstractClassTemplate2ProductionRule {
+ from
+ t : TCS!ClassTemplate (
+ t.templateSequence.oclIsUndefined()
+ )
+ to
+ pr : ANTLR!ProductionRule -- a target pattern cannot be empty
+}
+
+rule NonEmptyAbstractClassTemplate2ProductionRule extends AbstractClassTemplate2ProductionRule {
+ from
+ t : TCS!ClassTemplate (
+ not t.templateSequence.oclIsUndefined()
+ )
+ to
+ pr : ANTLR!ProductionRule, -- must keep the default element
+ pr2 : ANTLR!ProductionRule (
+ id <- t.location,
+ grammar <- t.concreteSyntax,
+ name <- t.name.toPRName() + '_abstractContents',
+ returns <- ret2,
+ needReturnDeclaration <- true,
+ expression <- t.templateSequence,
+ declarations <- Sequence {firstToken2},
+ labelDeclarations <- Sequence {temp},
+ actions <- saContext2,
+ actions <- saLocation2
+ ),
+ a : ANTLR!Alternative (
+ expressions <-
+ let rcs : Sequence(ANTLR!RuleCall) = t.nonOperatorSubtemplates->collect(e |
+ thisModule.Templates2RuleCall(t, e)
+ ) in
+ if t.disambiguate.oclIsUndefined() then
+ rcs->append(rc2)
+ else
+ rcs->prepend(rc2)
+ endif
+ ),
+ v2 : ANTLR!Variable (
+ declaration <- ret
+ ),
+ rc2 : ANTLR!RuleCall (
+ calledRule <- pr2,
+-- alternative <- a,
+ storeTo <- v2
+ ),
+ ret2 : ANTLR!VariableDeclaration (
+ id <- t.location,
+ name <- 'ret',
+ initialValue <- thisModule.createAction(t.name, t.isContext.toString(), t.isAddToContext),
+ type <- thisModule.typeModelElement
+ ),
+ saContext2 : ANTLR!SimpleSemanticAction (
+ value <- 'ei.leaveContext(' + t.isContext.toString() + ');'
+ ),
+ temp : ANTLR!VariableDeclaration ( -- cannot be called temp2 because it is referenced elsewhere with a resolveTemp
+ id <- t.location,
+ name <- 'temp',
+ initialValue <- 'null',
+ type <- 'java.lang.Object'
+ ),
+ firstToken2 : ANTLR!VariableDeclaration (
+ id <- t.location,
+ name <- 'firstToken',
+ initialValue <- thisModule.nextTokenValue,
+ type <- thisModule.tokenType
+ ),
+ saLocation2 : ANTLR!SimpleSemanticAction (
+ value <- thisModule.postActions
+ )
+}
+
+rule OperatoredAbstractClassTemplate2ProductionRule {
+ from
+ t : TCS!ClassTemplate
+ (
+ t.isAbstract and t.isOperatored
+ )
+ using
+ {
+ subtemplates : Sequence(TCS!Template) = t.subtemplates->select(e |
+ not e.oclIsKindOf(TCS!OperatorTemplate)
+ );
+ primarySubtemplates : Sequence(TCS!Template) = thisModule.sortTemplates(subtemplates->select(e |
+ not e.isNonPrimary
+ ));
+ nonPrimarySubtemplates : Sequence(TCS!Template) = thisModule.sortTemplates(subtemplates->select(e |
+ e.isNonPrimary
+ ));
+ }
+ to
+ pr : ANTLR!ProductionRule (
+ name <- t.name.toPRName(),
+ returns <- ret,
+ needReturnDeclaration <- false,
+ expression <- a
+ ),
+ ret : ANTLR!VariableDeclaration (
+ id <- t.location,
+ name <- 'ret',
+ initialValue <- 'null',
+ type <- thisModule.typeModelElement
+ ),
+ a : ANTLR!Alternative (
+ expressions <- rc
+ ),
+ v : ANTLR!Variable (
+ declaration <- ret
+ ),
+ rc : ANTLR!RuleCall (
+ calledRule <- TCS!Priority.allInstancesFrom('IN')->select(e |
+ e.isOfList(t.operatorList)
+ )->iterate(e; acc : TCS!Priority = Sequence {}->first() |
+ if acc.oclIsUndefined() then
+ e
+ else
+ if e.value > acc.value then
+ e
+ else
+ acc
+ endif
+ endif
+ ),
+ storeTo <- v
+ ),
+ nonPrimaryV : distinct ANTLR!Variable foreach(ps in nonPrimarySubtemplates) (
+ declaration <- ret
+ ),
+ nonPrimaryRc : distinct ANTLR!RuleCall foreach(ps in nonPrimarySubtemplates) (
+ calledRule <- ps,
+ syntacticPredicate <- ps.disambiguate,
+ alternative <- a,
+ storeTo <- nonPrimaryV
+ ),
+ primaryPr : ANTLR!ProductionRule (
+ name <- 'primary_' + t.name.toPRName(),
+ grammar <- t.concreteSyntax,
+ needReturnDeclaration <- false,
+ returns <- primaryRet,
+ expression <- primaryA
+ ),
+ primaryRet : ANTLR!VariableDeclaration (
+ id <- t.location,
+ name <- 'ret',
+ initialValue <- 'null',
+ type <- thisModule.typeModelElement
+ ),
+ primaryA : ANTLR!Alternative,
+ primaryV : distinct ANTLR!Variable foreach(ps in primarySubtemplates) (
+ declaration <- primaryRet
+ ),
+ primaryRc : distinct ANTLR!RuleCall foreach(ps in primarySubtemplates) (
+ calledRule <- ps,
+ syntacticPredicate <- ps.disambiguate,
+ alternative <- primaryA,
+ storeTo <- primaryV
+ )
+}
+
+
+-- TODO: implement parentheses.{left,right}
+rule OperatoredAbstractClassTemplate2ProductionRuleWithParentheses extends OperatoredAbstractClassTemplate2ProductionRule {
+ from
+ t : TCS!ClassTemplate (
+ if t.parentheses.oclIsUndefined() then
+ true -- defaults to "(", ")"
+ else
+ not t.parentheses.isOff
+ endif
+ )
+ to
+ pr : ANTLR!ProductionRule,
+ primaryC : ANTLR!Concatenation (
+ alternative <- primaryA,
+ expressions <- Sequence {primaryTkL, primaryRc2, primaryTkR}
+ ),
+ primaryTkL : ANTLR!TokenCall (
+ name <- 'LPAREN'
+ ),
+ primaryV2 : ANTLR!Variable (
+ declaration <- primaryRet
+ ),
+ primaryRc2 : ANTLR!RuleCall (
+ calledRule <- pr,
+ storeTo <- primaryV2
+ ),
+ primaryTkR : ANTLR!TokenCall (
+ name <- 'RPAREN'
+ )
+}
+
+helper context TCS!Priority def: isOfList(list : TCS!OperatorList) : Boolean =
+ if self.list.name.oclIsUndefined() then
+ list.oclIsUndefined()
+ else
+ self.list = list
+ endif;
+
+helper context TCS!Priority def: getCalledRule(isRight : Boolean) : ANTLR!ProductionRule =
+ if self.value = 0 then
+ if isRight and self.associativity = #right then
+ self
+ else
+ thisModule.resolveTemp(TCS!ClassTemplate.allInstancesFrom('IN')->select(e |
+ e.isOperatored and
+ self.isOfList(e.operatorList)
+ )->first(), 'primaryPr')
+ endif
+ else
+ thisModule.resolveTemp(TCS!Priority.allInstancesFrom('IN')->select(e |
+ e.list = self.list
+ )->select(e |
+ e.value = if isRight then
+ if self.associativity = #left then
+ self.value - 1
+ else
+ self.value
+ endif
+ else
+ self.value - 1
+ endif
+ )->first(), 'pr')
+ endif;
+
+-- binary or postfix
+helper context TCS!Priority def: binaryOps : Sequence(TCS!Operator) =
+ self.operators->select(e |
+ e.arity = 2 or e.isPostfix
+ );
+
+helper context TCS!Priority def: prefix : String =
+ if self.list.name.oclIsUndefined() then
+ ''
+ else
+ self.list.name.firstToLower() + '_'
+ endif;
+
+rule Priority2ProductionRule {
+ from
+ p : TCS!Priority
+ to
+ pr : ANTLR!ProductionRule (
+ name <- p.prefix + 'priority_' + p.value.toString(),
+ returns <- ret,
+ needReturnDeclaration <- false,
+ expression <- a,
+ declarations <- Sequence {opName, firstToken},
+ labelDeclarations <- Sequence {right}
+ ),
+ ret : ANTLR!VariableDeclaration (
+ id <- p.location,
+ name <- 'ret',
+ initialValue <- 'null',
+ type <- thisModule.typeModelElement
+ ),
+ opName : ANTLR!VariableDeclaration (
+ name <- 'opName',
+ type <- 'java.lang.String',
+ initialValue <- 'null'
+ ),
+ right : ANTLR!VariableDeclaration (
+ name <- 'right',
+ type <- thisModule.typeModelElement,
+ initialValue <- 'null'
+ ),
+ firstToken : ANTLR!VariableDeclaration (
+ id <- p.location,
+ name <- 'firstToken',
+ initialValue <- thisModule.nextTokenValue,
+ type <- thisModule.tokenType
+ ),
+ a : ANTLR!Alternative (
+ expressions <- p.operators->select(e |
+ e.arity = 1 and not e.isPostfix
+ )->including(c)
+ ),
+ c : ANTLR!Concatenation (
+ expressions <- Sequence {rc, binaryS}
+ ),
+ v : ANTLR!Variable (
+ declaration <- ret
+ ),
+ rc : ANTLR!RuleCall (
+ calledRule <- p.getCalledRule(false),
+ storeTo <- v
+ ),
+ binaryS : distinct ANTLR!Sequence_ foreach(b in if p.binaryOps->size() > 0 then
+ Sequence {true}
+ else
+ Sequence {}
+ endif) (
+ lower <- 0,
+ upper <- if p.associativity = #left then
+ 0 - 1
+ else
+ 1
+ endif,
+ expression <- binaryA
+ ),
+ binaryA : ANTLR!Alternative (
+ -- TODO: why do we need resolveTemp now that we have inheritance?
+ --expressions <- p.binaryOps->collect(e | thisModule.resolveTemp(e, 'c'))
+ expressions <- p.binaryOps
+ )
+}
+
+-- looking at storeRightTo was not good because of unary operators
+helper context TCS!OperatorTemplate def: isSpecific : Boolean =
+-- not self.otSequence.oclIsUndefined();
+---- self.storeRightTo.oclIsUndefined();
+-- 20070724: if storeRightTo is specified then otSequence may be defined as a complex operator
+ (self.storeRightTo.oclIsUndefined() and self.operators->forAll(e | e.arity > 1)) and
+ not self.otSequence.oclIsUndefined();
+
+
+helper context TCS!Operator def: specificTemplates : Sequence(TCS!Template) =
+ thisModule.sortTemplates(self.templates->select(e |
+ e.isSpecific
+ ));
+
+helper context TCS!Operator def: nonSpecificTemplates : Sequence(TCS!Template) =
+ thisModule.sortTemplates(self.templates->select(e |
+ not e.isSpecific
+ ));
+
+helper context TCS!Operator def: isPrefix : Boolean =
+ self.arity = 1 and not self.isPostfix;
+
+helper context TCS!Operator def: placeRCFirst : Boolean =
+ self.arity = 1 and
+ if self.templates->size() = 1 then
+ self.templates->first().storeOpTo.oclIsUndefined()
+ else
+ false
+ endif;
+
+abstract rule Operator2Concatenation {
+ from
+ o : TCS!Operator (
+ (not o.literal.oclIsUndefined()) and
+ not o.isPostfix
+ )
+ to
+ c : ANTLR!Concatenation (
+ expressions <- if o.placeRCFirst then -- warning only works if one template!
+ rcOpNonSpec
+ else
+ Sequence {}
+ endif->union(Sequence {t, a})
+ ),
+ t : ANTLR!Expression (
+ action <- sa
+ ),
+ sa : ANTLR!SimpleSemanticAction (
+ value <- 'opName = \"' + o.literal.value + '\";'
+ ),
+ a : ANTLR!Alternative,
+ vOpSpec : distinct ANTLR!Variable foreach(t in o.specificTemplates) (
+ declaration <- thisModule.resolveTemp(o.priority, 'ret')
+ ),
+ rcOpSpec : distinct ANTLR!RuleCall foreach(t in o.specificTemplates) (
+ calledRule <- t,
+ alternative <- a,
+ arguments <- teOpSpec,
+ syntacticPredicate <- t.disambiguate,
+ storeTo <- vOpSpec
+ ),
+ teOpSpec : distinct ANTLR!TextualExpression foreach(t in o.specificTemplates) (
+ value <- 'opName, ret, firstToken'
+ ),
+ cNonSpec : distinct ANTLR!Concatenation foreach(t in o.nonSpecificTemplates) (
+ alternative <- a
+ ),
+ vRightNonSpec : distinct ANTLR!Variable foreach(t in o.nonSpecificTemplates) (
+ declaration <- thisModule.resolveTemp(o.priority, 'right')
+ ),
+ vOpNonSpec : distinct ANTLR!Variable foreach(t in o.nonSpecificTemplates) (
+ declaration <- thisModule.resolveTemp(o.priority, 'ret')
+ ),
+ rcOpNonSpec : distinct ANTLR!RuleCall foreach(t in o.nonSpecificTemplates) (
+ calledRule <- t,
+ arguments <- teOpNonSpec,
+ syntacticPredicate <- t.disambiguate,
+ storeTo <- vOpNonSpec,
+ concatenation <- if o.placeRCFirst then
+ c -- warning: already set for order
+ else
+ cNonSpec
+ endif
+ ),
+
+ -- 20070724: placed after rcOpNonSpec to invert rule calls so that complex operators may be specified
+ rcRightNonSpec : distinct ANTLR!RuleCall foreach(t in o.nonSpecificTemplates) (
+ calledRule <- o.priority.getCalledRule(true),
+ storeTo <- vRightNonSpec,
+ concatenation <- cNonSpec,
+ action <- saRight
+ ),
+ saRight : distinct ANTLR!SimpleSemanticAction foreach(t in o.nonSpecificTemplates) (
+ value <- if o.arity = 1 then
+ -- for unary exp... TODO: do not even pass "right == null" as argument to the template (see below)
+ 'ei.set(ret, \"' + t.source + '\", right);'
+ else
+ 'ei.set(ret, \"' + t.storeRightTo + '\", right);'
+ endif + thisModule.postActions -- TODO: remove setLocation in called rule when necessary... DONE?
+ ),
+ teOpNonSpec : distinct ANTLR!TextualExpression foreach(t in o.nonSpecificTemplates) (
+ value <- if o.arity = 2 then
+-- 'opName, ret, right, firstToken'
+ 'opName, ret, firstToken'
+ else
+-- 'opName, right, null, firstToken'
+ 'opName, right, firstToken'
+ endif
+ )
+}
+
+rule KeywordOperator2Concatenation extends Operator2Concatenation {
+ from
+ o : TCS!Operator (
+ o.literal.oclIsKindOf(TCS!Keyword)
+ )
+ to
+ c : ANTLR!Concatenation,
+ t : ANTLR!Terminal (
+ value <- o.literal.value
+ )
+}
+
+helper def: sortTemplates(s : Sequence(TCS!Template)) : Sequence(TCS!Template) =
+ s->iterate(e; acc : Sequence(TCS!Template) = Sequence {} |
+ if e.disambiguate.oclIsUndefined() then
+ acc->including(e)
+ else
+ Sequence {e}->union(acc)
+ endif
+ );
+
+rule SymbolOperator2Concatenation extends Operator2Concatenation {
+ from
+ o : TCS!Operator (
+ o.literal.oclIsKindOf(TCS!Symbol)
+ )
+ to
+ c : ANTLR!Concatenation,
+ t : ANTLR!TokenCall (
+ name <- o.literal.name.toUpper()
+ )
+}
+
+-- TODO: the same for keyword
+rule PostfixSymbolOperator2Concatenation {
+ from
+ o : TCS!Operator
+ (
+ o.literal.oclIsKindOf(TCS!Symbol)
+ and o.isPostfix
+ )
+ to
+ c : ANTLR!Concatenation (
+ expressions <- Sequence {t, a}
+ ),
+ t : ANTLR!TokenCall (
+ action <- sa,
+ name <- o.literal.name.toUpper()
+ ),
+ sa : ANTLR!SimpleSemanticAction (
+ value <- 'opName = \"' + o.literal.value + '\";'
+ ),
+ a : ANTLR!Alternative,
+ cNonSpec : distinct ANTLR!Concatenation foreach(t in o.templates) (--o.nonSpecificTemplates) (
+ alternative <- a
+ ),
+ vOpNonSpec : distinct ANTLR!Variable foreach(t in o.templates) (--o.nonSpecificTemplates) (
+ declaration <- thisModule.resolveTemp(o.priority, 'ret')
+ ),
+ rcOpNonSpec : distinct ANTLR!RuleCall foreach(t in o.templates) (--o.nonSpecificTemplates) (
+ calledRule <- t,
+ arguments <- teOpNonSpec,
+ syntacticPredicate <- t.disambiguate,
+ storeTo <- vOpNonSpec,
+ concatenation <- cNonSpec
+ ),
+ teOpNonSpec : distinct ANTLR!TextualExpression foreach(t in o.templates) (--o.nonSpecificTemplates) (
+ value <-
+ if t.isSpecific then
+ 'opName, ret, firstToken'
+ else
+ 'opName, ret, firstToken'
+ endif
+ )
+}
+
+rule EmptyOperator2Concatenation {
+ from
+ o : TCS!Operator
+ (
+ o.literal.oclIsUndefined()
+ )
+ to
+ c : ANTLR!Concatenation (
+ expressions <- Sequence {a}
+ ),
+ a : ANTLR!Alternative,
+ vOpSpec : distinct ANTLR!Variable foreach(t in o.specificTemplates) (
+ declaration <- thisModule.resolveTemp(o.priority, 'ret')
+ ),
+ rcOpSpec : distinct ANTLR!RuleCall foreach(t in o.specificTemplates) (
+ calledRule <- t,
+ alternative <- a,
+ arguments <- teOpSpec,
+ syntacticPredicate <- t.disambiguate,
+ storeTo <- vOpSpec
+ ),
+ teOpSpec : distinct ANTLR!TextualExpression foreach(t in o.specificTemplates) (
+ value <- 'opName, ret, firstToken'
+ ),
+ cNonSpec : distinct ANTLR!Concatenation foreach(t in o.nonSpecificTemplates) (
+ alternative <- a
+ ),
+ vRightNonSpec : distinct ANTLR!Variable foreach(t in o.nonSpecificTemplates) (
+ declaration <- thisModule.resolveTemp(o.priority, 'right')
+ ),
+ vOpNonSpec : distinct ANTLR!Variable foreach(t in o.nonSpecificTemplates) (
+ declaration <- thisModule.resolveTemp(o.priority, 'ret')
+ ),
+ rcOpNonSpec : distinct ANTLR!RuleCall foreach(t in o.nonSpecificTemplates) (
+ calledRule <- t,
+ arguments <- teOpNonSpec,
+ syntacticPredicate <- t.disambiguate,
+ storeTo <- vOpNonSpec,
+ concatenation <- cNonSpec
+ ),
+ rcRightNonSpec : distinct ANTLR!RuleCall foreach(t in o.nonSpecificTemplates) (
+ calledRule <- o.priority.getCalledRule(true),
+ storeTo <- vRightNonSpec,
+ concatenation <- cNonSpec,
+ action <- saRight
+ ),
+ saRight : distinct ANTLR!SimpleSemanticAction foreach(t in o.nonSpecificTemplates) (
+ value <- if o.arity = 1 then
+ -- for unary exp... TODO: do not even pass "right == null" as argument to the template (see below)
+ 'ei.set(ret, \"' + t.source + '\", right);'
+ else
+ 'ei.set(ret, \"' + t.storeRightTo + '\", right);'
+ endif + thisModule.postActions -- TODO: remove setLocation in called rule when necessary... DONE?
+ ),
+ teOpNonSpec : distinct ANTLR!TextualExpression foreach(t in o.nonSpecificTemplates) (
+ value <- if o.arity = 2 then
+ 'opName, ret, firstToken'
+ else
+ 'opName, right, firstToken'
+ endif
+ )
+}
+
+abstract rule OperatorTemplate2ProductionRule {
+ from
+ t : TCS!OperatorTemplate
+ to
+ pr : ANTLR!ProductionRule (
+ name <- t.name.toPRName(),
+ needReturnDeclaration <- true,
+ returns <- ret
+ ),
+ pOpName : ANTLR!Parameter (
+ name <- 'opName',
+ type <- 'java.lang.String'
+ ),
+ pLeft : ANTLR!Parameter (
+ name <- 'left',
+ type <- thisModule.typeModelElement
+ ),
+ pFirstToken : ANTLR!Parameter (
+ name <- 'firstToken',
+ type <- thisModule.tokenType
+ ),
+ ret : ANTLR!VariableDeclaration (
+ name <- 'ret',
+ initialValue <- thisModule.createAction(t.name, t.isContext, false),
+ type <- thisModule.typeModelElement
+ ),
+ saContext : ANTLR!SimpleSemanticAction (
+ value <- 'ei.leaveContext(' + t.isContext.toString() + ');'
+ ),
+ saOperator : ANTLR!SimpleSemanticAction (
+ value <- if t.storeOpTo.oclIsUndefined() then
+ '// discard operator name'
+ else
+ 'ei.set(ret, \"' + t.storeOpTo + '\", opName);'
+ endif
+ ),
+ saLeft : ANTLR!SimpleSemanticAction (
+ value <- 'ei.set(ret, \"' + t.source + '\", left);'
+ ),
+ saLocation : ANTLR!SimpleSemanticAction (
+ value <- if t.isSpecific or t.operators->forAll(e | e.isPostfix) then
+ thisModule.postActions
+ else
+ '// post actions performed in calling rule (i.e., priority_<n>)'
+ endif
+ )
+}
+
+helper context TCS!OperatorTemplate def: isPrefix : Boolean =
+ self.operators->forAll(e | e.isPrefix);
+
+rule SpecificRightArgumentOperatorTemplate2ProductionRule extends OperatorTemplate2ProductionRule {
+ from
+ t : TCS!OperatorTemplate
+ (
+-- t.isSpecific
+-- 20070724: for complex operators
+ not t.otSequence.oclIsUndefined()
+ )
+ to
+ pr : ANTLR!ProductionRule (
+ expression <- t.otSequence,
+ actions <- Sequence {saOperator, saLeft, saLocation, saContext},
+ labelDeclarations <- temp,
+ parameters <- Sequence {pOpName, pLeft, pFirstToken}
+ ),
+ temp : ANTLR!VariableDeclaration (
+ id <- t.location,
+ name <- 'temp',
+ initialValue <- 'null',
+ type <- 'java.lang.Object'
+ )
+}
+
+-- TODO: remove saRight in this case because now the setRight is done in the calling template (i.e., priority_<n>)
+rule NonSpecificRightArgumentOperatorTemplate2ProductionRule extends OperatorTemplate2ProductionRule {
+ from
+ t : TCS!OperatorTemplate
+ (
+-- not t.isSpecific
+-- --t.isPrefix or not t.isSpecific
+-- 20070724: for complex operators
+ t.otSequence.oclIsUndefined()
+ )
+ to
+ pr : ANTLR!ProductionRule (
+ options <- 'defaultErrorHandler = false;', -- this is an empty rule
+-- actions <- Sequence {saOperator, saLeft, saRight, saLocation, saContext},
+-- parameters <- Sequence {pOpName, pLeft, pRight, pFirstToken}
+ actions <- Sequence {saOperator, saLeft, saLocation, saContext},
+ parameters <- Sequence {pOpName, pLeft, pFirstToken}
+ )
+-- pRight : ANTLR!Parameter (
+-- name <- 'right',
+-- type <- thisModule.typeModelElement
+-- ),
+-- saRight : ANTLR!SimpleSemanticAction (
+-- value <-
+-- -- TODO: use rule inheritance to simply to put saRight instead of making it empty
+-- if t.storeRightTo.oclIsUndefined() then -- for unary operators
+-- ''
+-- else
+-- 'ei.set(ret, \"' + t.storeRightTo + '\", right);'
+-- endif
+-- )
+}
+-- @end Non-RPN
+
+rule PrimitiveTemplate2ProductionRule {
+ from
+ pt : TCS!PrimitiveTemplate
+ to
+ pr : ANTLR!ProductionRule (
+ name <- pt.name.toPRName(),
+ needReturnDeclaration <- true,
+ returns <- ret,
+ expression <- a
+ ),
+ a : ANTLR!Alternative (
+ expressions <- Sequence {tc}->union(if pt.orKeyword then
+ TCS!Keyword.allInstancesFrom('IN')->collect(e |
+ thisModule.Keyword2Terminal(e)
+ )->union(
+ let hasBooleanPt : Boolean = pt.concreteSyntax.templates->select(e |
+ e.oclIsKindOf(TCS!PrimitiveTemplate)
+ )->exists(e |
+ e.tokenName = 'BOOLEAN'
+ ) in
+ if hasBooleanPt then
+ Sequence {thisModule.BooleanIdentifier(pt)}
+ else
+ Sequence {}
+ endif
+ )
+ else
+ Sequence {}
+ endif)
+ ),
+ ret : ANTLR!VariableDeclaration (
+ name <- 'ret',
+ initialValue <- 'null',
+ type <- 'java.lang.Object'
+ ),
+ sa : ANTLR!SimpleSemanticAction (
+ value <- 'ret = ' + pt.value.regexReplaceAll('%token%', 'ast.getText()') + '; ei.setToken((Object)ast);'
+ ),
+ tc : ANTLR!TokenCall (
+ name <- pt.tokenName,
+ storeASTTo <- 'ast',
+ action <- sa
+ )
+}
+
+unique lazy rule Keyword2Terminal {
+ from
+ s : TCS!Keyword
+ to
+ t : ANTLR!Terminal (
+ value <- s.value,
+ action <- sa
+ ),
+ sa : ANTLR!SimpleSemanticAction (
+ value <- 'ret = \"' + s.value + '\";'
+ )
+}
+
+unique lazy rule BooleanIdentifier {
+ from
+ pt : TCS!PrimitiveTemplate
+ to
+ tc : ANTLR!TokenCall (
+ name <- 'BOOLEAN',
+ storeASTTo <- 'astb',
+ action <- sa
+ ),
+ sa : ANTLR!SimpleSemanticAction (
+ value <- 'ret = astb.getText();'
+ )
+}
+
+rule EnumerationTemplate2ProductionRule {
+ from
+ et : TCS!EnumerationTemplate
+ to
+ pr : ANTLR!ProductionRule (
+ name <- et.name.toPRName(),
+ needReturnDeclaration <- true,
+ returns <- ret,
+ expression <- a
+ ),
+ ret : ANTLR!VariableDeclaration (
+ name <- 'ret',
+ initialValue <- 'null',
+ type <- 'java.lang.Object'
+ ),
+ a : ANTLR!Alternative (
+ expressions <- et.mappings
+ )
+}
+
+rule EnumLiteralMapping2Concatenation {
+ from
+ elm : TCS!EnumLiteralMapping
+ to
+ c : ANTLR!Concatenation (
+ expressions <- elm.element,
+ action <- sa
+ ),
+ sa : ANTLR!SimpleSemanticAction (
+ value <- 'ret = ei.createEnumLiteral(\"' + elm.literal.name + '\");'
+ )
+}
+
+rule Sequence2Concatenation {
+ from
+ s : TCS!"Sequence" --(s.keyContainer.oclIsUndefined()) -- not for keys
+
+ --(s.keyContainer.oclIsUndefined()) -- not for keys
+ to
+ c : ANTLR!Concatenation (
+ id <- s.location,
+ expressions <- s.elements->reject(e |
+ e.oclIsKindOf(TCS!CustomSeparator)
+ )
+ )
+}
+
+-- @begin SequenceElements
+rule SymbolRef2TokenCall {
+ from
+ lr : TCS!LiteralRef
+ (
+ lr.referredLiteral.oclIsKindOf(TCS!Symbol)
+ )
+ to
+ tk : ANTLR!TokenCall (
+ id <- lr.location,
+ name <- lr.referredLiteral.name.toUpper()
+ )
+}
+
+rule KeywordRef2Terminal {
+ from
+ lr : TCS!LiteralRef
+ (
+ lr.referredLiteral.oclIsKindOf(TCS!Keyword)
+ )
+ to
+ t : ANTLR!Terminal (
+ id <- lr.location,
+ value <- lr.referredLiteral.value
+ )
+}
+
+helper context KM3!StructuralFeature def: getPrimitiveRule(name : String) : TCS!PrimitiveTemplate =
+ let tn : String = self.type.name in
+ let pts : Sequence(TCS!PrimitiveTemplate) = TCS!PrimitiveTemplate.allInstancesFrom('IN')->asSequence()->select(e |
+ e.typeName = tn
+ ) in
+ if name.size() = 0 then
+ pts->select(e |
+ e.isDefault = true
+ )->first()
+ else
+ pts->select(e |
+ e.name = name
+ )->first()
+ endif;
+
+helper context TCS!Property def: prop : KM3!StructuralFeature =
+ self.getContextProperty(self.name);
+
+helper context TCS!Property def: upper : Integer =
+ let actualUpper : Integer = self.prop.upper in
+ if actualUpper = 1 then
+ 1
+ else
+ let conditions : Sequence(TCS!AtomExp) = self.getConditions->select(e |
+ e.oclIsKindOf(TCS!OneExp)
+ )->select(e |
+ e.propertyName = self.name
+ ) in
+ if conditions->notEmpty() then
+ 1
+ else
+ actualUpper
+ endif
+ endif;
+
+helper context TCS!Property def: importContext : Boolean =
+ self.propertyArgs->select(e |
+ e.oclIsKindOf(TCS!ImportContextPArg)
+ )->notEmpty();
+
+helper context TCS!Property def: as : TCS!AsPArg =
+ self.propertyArgs->select(e |
+ e.oclIsKindOf(TCS!AsPArg)
+ )->first();
+
+helper context TCS!Property def: autoCreate : TCS!AutoCreatePArg =
+ self.propertyArgs->select(e |
+ e.oclIsKindOf(TCS!AutoCreatePArg)
+ )->first();
+
+helper context TCS!Property def: createAs : TCS!CreateAsPArg =
+ self.propertyArgs->select(e |
+ e.oclIsKindOf(TCS!CreateAsPArg)
+ )->first();
+
+helper context TCS!Property def: refersTo : TCS!RefersToPArg =
+ self.propertyArgs->select(e |
+ e.oclIsKindOf(TCS!RefersToPArg)
+ )->first();
+
+helper context TCS!Property def: lookIn : TCS!LookInPArg =
+ self.propertyArgs->select(e |
+ e.oclIsKindOf(TCS!LookInPArg)
+ )->first();
+
+helper context TCS!Property def: createIn : TCS!CreateInPArg =
+ self.propertyArgs->select(e |
+ e.oclIsKindOf(TCS!CreateInPArg)
+ )->first();
+
+helper context TCS!Property def: finalProp : KM3!StructuralFeature =
+ if self.refersTo.oclIsUndefined() then
+ self.prop
+ else
+ self.prop.type.lookupElementExtended(self.refersTo.propertyName)
+ endif;
+
+helper context TCS!Property def: mode : String =
+ let ret : TCS!ModePArg = self.propertyArgs->select(e |
+ e.oclIsKindOf(TCS!ModePArg)
+ )->first() in
+ if ret.oclIsUndefined() then
+ ret
+ else
+ ret.mode
+ endif;
+
+helper context TCS!Property def: calledTemplate : TCS!Template =
+ if self.finalProp.type.oclIsKindOf(KM3!Class) then
+ TCS!ClassTemplate.getInstancesBy('name', self.finalProp.type.name)->select(e |
+ e.mode = self.mode
+ )->first()
+ else if self.finalProp.type.oclIsKindOf(KM3!DataType) then
+ self.finalProp.getPrimitiveRule(
+ if self.as.oclIsUndefined() then
+ ''
+ else
+ self.as.value
+ endif
+ )
+ else -- if self.finalProp.type.oclIsKindOf(KM3!Enumeration) then
+ TCS!EnumerationTemplate.getInstanceBy('name', self.finalProp.type.name)
+ endif endif;
+
+helper context TCS!Property def: saTxt : String =
+ if self.prop = self.finalProp then
+ 'ei.set(ret, \"' + self.name + '\", temp);'
+ else
+ 'ei.setRef(ret, \"' + self.name + '\", \"' + self.prop.type.name + '\", \"' + self.refersTo.propertyName + '\", temp, ' + if self.lookIn.oclIsUndefined() then
+ 'null'
+ else
+ '\"' + self.lookIn.propertyName->iterate(e; acc : String = '' |
+ acc + if acc = '' then
+ ''
+ else
+ '.'
+ endif + e
+ ) + '\"'
+ endif + ', ' + if self.autoCreate.oclIsUndefined() then
+ '\"never\"'
+ else
+ '\"' + self.autoCreate.value.toString() + '\"'
+ endif + ', ' + if self.createAs.oclIsUndefined() then
+ 'null'
+ else
+ '\"' + self.createAs.name + '\"'
+ endif + ', ' + self.importContext.toString() + ', ' + if self.createIn.oclIsUndefined() then
+ 'null'
+ else
+ '\"' + self.createIn.propertyName->iterate(e; acc : String = '' |
+ acc + if acc = '' then
+ ''
+ else
+ '.'
+ endif + e
+ ) + '\"'
+ endif + ');'
+ endif;
+
+rule Property2RuleCall {
+ from
+ p : TCS!Property
+ (
+ p.upper = 1
+ )
+ to
+ rc : ANTLR!RuleCall (
+ id <- p.location,
+ calledRule <- p.calledTemplate,
+ syntacticPredicate <- p.calledTemplate.disambiguate,
+ -- TESTING
+ storeTo <- v,
+ action <- sa
+ ),
+ v : ANTLR!Variable (
+ id <- p.location,
+ declaration <- thisModule.resolveTemp(p.getTemplate, 'temp')
+ ),
+ sa : ANTLR!SimpleSemanticAction (
+ id <- p.location,
+ value <- p.saTxt
+ )
+}
+
+-- Only used by MultiValuedProperty2Sequence
+helper context TCS!Property def: lower : Integer =
+ let forcedLower : Integer = self.propertyArgs->select(e |
+ e.oclIsKindOf(TCS!ForcedLowerPArg)
+ )->first() in
+ if forcedLower.oclIsUndefined() then
+ self.prop.lower
+ else
+ forcedLower.value
+ endif;
+
+rule MultiValuedProperty2Sequence {
+ from
+ p : TCS!Property
+ (
+ p.upper > 1 or p.upper = 0 - 1
+ )
+ to
+ s : ANTLR!Sequence_ (
+ id <- p.location,
+ lower <- if p.lower = 0 then
+ 0
+ else
+ 1
+ endif,
+ upper <- 1,
+ expression <- globalC
+ ),
+ globalC : ANTLR!Concatenation (
+ id <- p.location,
+ expressions <- Sequence {firstrc, reps}
+ ),
+ reps : ANTLR!Sequence_ (
+ lower <- if p.lower = 0 then
+ 0
+ else
+ p.lower - 1
+ endif,
+ upper <- 0 - 1,
+-- code below not possible because ANTLR has no construct for this, we would need to expand this somehow
+-- if p.upper < 0 then
+-- 0 - 1
+-- else
+-- p.upper - 1
+-- endif,
+ expression <- repC
+ ),
+ repC : ANTLR!Concatenation (
+ id <- p.location,
+ expressions <- let sep : TCS!SeparatorPArg = p.propertyArgs->select(e |
+ e.oclIsKindOf(TCS!SeparatorPArg)
+ )->first() in
+ if sep.oclIsUndefined() then
+ Sequence {reprc}
+ else
+ Sequence {sep.separatorSequence, reprc}
+ endif
+ ),
+ firstrc : ANTLR!RuleCall (
+ id <- p.location,
+ calledRule <- p.calledTemplate,
+ syntacticPredicate <- p.calledTemplate.disambiguate,
+ -- TESTING
+ storeTo <- firstv,
+ action <- firstsa
+ ),
+ firstv : ANTLR!Variable (
+ id <- p.location,
+ declaration <- thisModule.resolveTemp(p.getTemplate, 'temp')
+ ),
+ firstsa : ANTLR!SimpleSemanticAction (
+ id <- p.location,
+ value <- p.saTxt
+ ),
+ reprc : ANTLR!RuleCall (
+ id <- p.location,
+ calledRule <- p.calledTemplate,
+ syntacticPredicate <- p.calledTemplate.disambiguate,
+ -- TESTING
+ storeTo <- repv,
+ action <- repsa
+ ),
+ repv : ANTLR!Variable (
+ id <- p.location,
+ declaration <- thisModule.resolveTemp(p.getTemplate, 'temp')
+ ),
+ repsa : ANTLR!SimpleSemanticAction (
+ id <- p.location,
+ value <- p.saTxt
+ )
+}
+
+rule Block2Concatenation {
+ from
+ b : TCS!Block
+ to
+ c : ANTLR!Concatenation (
+ id <- b.location,
+ expressions <- b.blockSequence
+ )
+}
+
+helper context TCS!StringVal def: toActionPart() : String =
+ '\"' + self.symbol + '\"';
+
+helper context TCS!IntegerVal def: toActionPart() : String =
+ 'new java.lang.Integer(' + self.symbol.toString() + ')';
+
+helper context TCS!NegativeIntegerVal def: toActionPart() : String =
+ 'new java.lang.Integer(-' + self.symbol.toString() + ')';
+
+helper context TCS!EnumLiteralVal def: toActionPart() : String =
+ 'ei.createEnumLiteral(\"' + self.name + '\")';
+
+helper context TCS!ConditionalElement def: getAction(thenAction : Boolean) : String =
+ self.condition.expressions->iterate(e; acc : String = '' |
+ acc + if acc = '' then '' else ' ' endif +
+ if e.oclIsKindOf(TCS!BooleanPropertyExp) then
+ 'ei.set(ret, \"' + e.propertyName + '\", java.lang.Boolean.' +
+ if thenAction then
+ 'TRUE'
+ else
+ 'FALSE'
+ endif + ');'
+ else if e.oclIsKindOf(TCS!EqualsExp) then
+ if thenAction then
+ 'ei.set(ret, \"' + e.propertyName + '\", ' + e.value.toActionPart() + ');'
+ else
+ '' -- nothing to do here: if it does not equals something, then we can't know what is its value
+ endif
+ else -- if e.oclIsKindOf(TCS!IsDefinedExp) or e.oclIsKindOf(TCS!OneExp) then
+ '' -- nothing to do here
+ endif endif
+ );
+
+abstract rule ConditionalElement2Alternative {
+ from
+ ta : TCS!ConditionalElement
+ to
+ aa : ANTLR!Alternative (
+ id <- ta.location
+ ),
+ saThen : ANTLR!SimpleSemanticAction (
+ expression <- ta.thenSequence,
+ value <- ta.getAction(true)
+ ),
+ saElse : ANTLR!SimpleSemanticAction (
+ value <- ta.getAction(false)
+ )
+}
+
+rule HalfConditionalElement2Alternative extends ConditionalElement2Alternative {
+ from
+ ta : TCS!ConditionalElement (
+ ta.elseSequence.oclIsUndefined()
+ )
+ to
+ aa : ANTLR!Alternative (
+ expressions <- Sequence {ta.thenSequence, c}
+ ),
+ c : ANTLR!Concatenation (
+ id <- ta.location,
+ action <- saElse
+ )
+}
+
+rule FullConditionalElement2Alternative extends ConditionalElement2Alternative {
+ from
+ ta : TCS!ConditionalElement (
+ not ta.elseSequence.oclIsUndefined()
+ )
+ to
+ aa : ANTLR!Alternative (
+ expressions <- Sequence {ta.thenSequence, ta.elseSequence}
+ ),
+ saElse : ANTLR!SimpleSemanticAction (
+ expression <- ta.elseSequence
+ )
+}
+
+rule Alternative2Alternative {
+ from
+ ta : TCS!Alternative
+ to
+ aa : ANTLR!Alternative (
+ id <- ta.location,
+ expressions <- ta.sequences
+ )
+}
+
+rule FunctionCall2RuleCall {
+ from
+ fc : TCS!FunctionCall
+ to
+ rc : ANTLR!RuleCall (
+ calledRule <- fc.calledFunction,
+ arguments <- te
+ ),
+ te : ANTLR!TextualExpression (
+ value <- 'ret'
+ )
+}
+-- @end SequenceElements
+
diff --git a/dsls/TCS/Compiler/TCS2ANTLRv2Actions.atl b/dsls/TCS/Compiler/TCS2ANTLRv2Actions.atl
new file mode 100644
index 0000000..df3dbf0
--- /dev/null
+++ b/dsls/TCS/Compiler/TCS2ANTLRv2Actions.atl
@@ -0,0 +1,91 @@
+-- @atlcompiler atl2006
+library TCS2ANTLRActions;
+
+helper def: reserved : Sequence(String) =
+ Sequence {'case', 'class', 'clone', 'final', 'import', 'interface', 'package', 'super', 'void'};
+
+helper def: literalDelim : String =
+ '\"'; -- ANTLR 2
+
+helper def: typeModelElement : String =
+-- thisModule.nativelibPackage + '.ASMModelElement';
+ 'Object';
+
+helper def: postActions : String =
+ 'if(LT(0) != null) ei.setLocation(ret, firstToken.getLine() + \":\" + firstToken.getColumn() + \"-\" + ((org.atl.engine.injectors.ebnf.LocationToken)LT(0)).getEndLine() + \":\" + ((org.atl.engine.injectors.ebnf.LocationToken)LT(0)).getEndColumn());\n' + 'ei.setCommentsBefore(ret, (Object)((antlr.CommonHiddenStreamToken)firstToken).getHiddenBefore());\n' + 'if(LT(0) != null) ei.setCommentsAfter(ret, (Object)((antlr.CommonHiddenStreamToken)LT(0)).getHiddenAfter());';
+
+helper def: nextTokenValue : String =
+ 'LT(1)';
+
+helper def: tokenType : String =
+ 'antlr.Token';
+
+helper def: createAction(typeName : String, isContext : Boolean, isAddToContext : Boolean) : String =
+ '(inputState.guessing==0) ? ei.create(\"' + typeName + '\", ' + isContext.toString() + ', ' + isAddToContext.toString() + ') : null';
+
+helper def: lexerFragmentKeyword : String =
+ 'protected';
+
+-- \\ is required before $ because of Java regex replacement pattern ($ is used for group references)
+helper def: lexerActionSetText : String =
+ '\\$setText';
+
+helper def: lexerActionGetText : String =
+ '\\$getText';
+
+helper def: lexerHeader : String =
+ '
+class %name%Lexer extends Lexer;
+
+options {
+ k = 2;
+ charVocabulary = \'\\0\' .. \'\\u00FF\';
+ %optionsPlaceHolder
+}
+
+{
+
+ protected Token makeToken(int t) {
+ org.atl.engine.injectors.ebnf.LocationToken ret = null;
+
+ tokenObjectClass = org.atl.engine.injectors.ebnf.LocationToken.class;
+ ret = (org.atl.engine.injectors.ebnf.LocationToken)super.makeToken(t);
+ ret.setEndLine(getLine());
+ ret.setEndColumn(getColumn());
+
+ return ret;
+ }
+
+}
+ ';
+
+helper def: lexerV2Replacement : String =
+ '';
+
+helper def: lexerV3Replacement : String =
+ '//';
+
+helper def: getGrammarOptions(k : Integer) : String =
+ if k.oclIsUndefined() then
+ '\tk = 3;\n'
+ else if k > 0 then
+ '\tk = ' + k.toString() + ';\n'
+ else
+ '\tk = 3;\n' -- e.g., for when k=0 for ANTLRv3 (i.e., backtrack)
+ endif endif;
+
+helper def: errorReportingAction : String =
+ '
+ public void reportError(RecognitionException ex) {
+ ei.reportError((Exception)ex);
+ }
+
+ public void reportError(String s) {
+ ei.reportError(s);
+ }
+
+ public void reportWarning(String s) {
+ ei.reportWarning(s);
+ }
+ ';
+
diff --git a/dsls/TCS/Compiler/TCS2ANTLRv3Actions.atl b/dsls/TCS/Compiler/TCS2ANTLRv3Actions.atl
new file mode 100644
index 0000000..4d30f0b
--- /dev/null
+++ b/dsls/TCS/Compiler/TCS2ANTLRv3Actions.atl
@@ -0,0 +1,86 @@
+-- @atlcompiler atl2006
+library TCS2ANTLRActions;
+
+helper def: reserved : Sequence(String) =
+ Sequence {'case', 'class', 'clone', 'final', 'import', 'interface', 'package', 'super', 'void'}->union(
+ Sequence {'grammar'}
+ );
+
+helper def: literalDelim : String =
+ '\''; -- ANTLR 3
+
+helper def: typeModelElement : String =
+-- thisModule.nativelibPackage + '.ASMModelElement';
+ 'Object';
+
+ -- test1
+helper
+-- test2
+def: postActions : String =
+ 'if(input.LT(-1) != null) ei.setLocation(ret, firstToken.getLine() + \":\" + (firstToken.getCharPositionInLine() + 1) + \"-\" + ((org.eclipse.gmt.tcs.injector.wrappers.antlr3.ANTLR3LocationToken)input.LT(-1)).getEndLine() + \":\" + (((org.eclipse.gmt.tcs.injector.wrappers.antlr3.ANTLR3LocationToken)input.LT(-1)).getEndColumn() + 1));'
+ --+ 'ei.setCommentsBefore(ret, ((antlr.CommonHiddenStreamToken)firstToken).getHiddenBefore());\n' + 'if(input.LT(-1) != null) ei.setCommentsAfter(ret, ((antlr.CommonHiddenStreamToken)input.LT(-1)).getHiddenAfter());';
+ +
+ 'ei.setCommentsBefore(ret, new Object[] {input, firstToken});
+ ei.setCommentsAfter(ret, new Object[] {input, input.LT(-1)});';
+
+helper def: nextTokenValue : String =
+ 'input.LT(1)';
+
+helper def: tokenType : String =
+ 'org.antlr.runtime.Token';
+
+-- TODO: how do we do the inputState.guessing == 0 in ANTLRv3?
+helper def: createAction(typeName : String, isContext : Boolean, isAddToContext : Boolean) : String =
+ '(backtracking==0) ? ei.create(\"' + typeName + '\", ' + isContext.toString() + ', ' + isAddToContext.toString() + ') : null';
+
+helper def: lexerFragmentKeyword : String =
+ 'fragment';
+
+helper def: lexerActionSetText : String =
+ 'setText';
+
+helper def: lexerActionGetText : String =
+ 'getText()';
+
+-- http://www.antlr.org/api/Java/_lexer_8java-source.html#l00160
+helper def: lexerHeader : String =
+ '
+ ';
+
+helper def: lexerV2Replacement : String =
+ '//';
+
+helper def: lexerV3Replacement : String =
+ '';
+
+helper def: getGrammarOptions(k : Integer) : String =
+ if k.oclIsUndefined() then
+ OclUndefined
+ else
+ if k = 0 then
+ 'backtrack = true;\n'
+ else
+ OclUndefined -- LL(*) should not need k
+ endif
+ endif;
+
+helper def: errorReportingAction : String =
+ '
+// public void reportError(RecognitionException ex) {
+// ei.reportError((Exception)ex);
+// }
+
+// public void emitErrorMessage(String s) {
+// ei.reportError(s);
+// }
+
+ public void displayRecognitionError(String[] tokenNames, RecognitionException e) {
+ ei.reportError((Exception)e);
+ }
+
+ //TODO: what about warnings?
+// public void reportWarning(String s) {
+// ei.reportWarning(s);
+// }
+ ';
+
diff --git a/dsls/TCS/Helpers/.gitignore b/dsls/TCS/Helpers/.gitignore
new file mode 100644
index 0000000..74e5d69
--- /dev/null
+++ b/dsls/TCS/Helpers/.gitignore
@@ -0,0 +1 @@
+/TCSHelpers.asm
diff --git a/dsls/TCS/Helpers/TCSHelpers.atl b/dsls/TCS/Helpers/TCSHelpers.atl
new file mode 100644
index 0000000..17136f7
--- /dev/null
+++ b/dsls/TCS/Helpers/TCSHelpers.atl
@@ -0,0 +1,16 @@
+-- @atlcompiler atl2006
+library TCSHelpers;
+
+helper context TCS!"TCS::ClassTemplate" def : classFromClassTemplate : KM3!"KM3::Class" =
+ KM3!"KM3::Class".allInstances()->select(e | e.name = self.name)->first();
+
+helper context TCS!"TCS::LocatedElement" def : ownerClassTemplate : TCS!"TCS::ClassTemplate" =
+ if (not self.refImmediateComposite().oclIsUndefined()) then
+ if (self.refImmediateComposite().oclIsKindOf(TCS!"TCS::ClassTemplate")) then
+ self.refImmediateComposite()
+ else
+ self.refImmediateComposite().ownerClassTemplate
+ endif
+ else
+ OclUndefined
+ endif; \ No newline at end of file
diff --git a/dsls/TCS/Metamodel/TCS.ann b/dsls/TCS/Metamodel/TCS.ann
new file mode 100644
index 0000000..8d49d7d
--- /dev/null
+++ b/dsls/TCS/Metamodel/TCS.ann
@@ -0,0 +1,61 @@
+annotate TCS {
+ annotate TCS with
+ nsURI='http://www.eclipse.org/gmt/tcs/2007/TCS',
+ nsPrefix='tcs';
+
+ annotate "TCS::TemplateModifiers::abstract" with
+ literalValue='abstract';
+
+ annotate "TCS::TemplateModifiers::operatored" with
+ literalValue='operatored';
+
+ annotate "TCS::TemplateModifiers::main" with
+ literalValue='main';
+
+ annotate "TCS::TemplateModifiers::context" with
+ literalValue='context';
+
+ annotate "TCS::TemplateModifiers::addToContext" with
+ literalValue='addToContext';
+
+ annotate "TCS::SpaceKind::leftSpace" with
+ literalValue='leftSpace';
+
+ annotate "TCS::SpaceKind::leftNone" with
+ literalValue='leftNone';
+
+ annotate "TCS::SpaceKind::rightSpace" with
+ literalValue='rightSpace';
+
+ annotate "TCS::rSpaceKind::ightNone" with
+ literalValue='rightNone';
+
+ annotate "TCS::Associativity::left" with
+ literalValue='left';
+
+ annotate "TCS::Associativity::right" with
+ literalValue='right';
+
+ annotate "TCS::AutoCreateKind::always" with
+ literalValue='always';
+
+ annotate "TCS::AutoCreateKind::ifmissing" with
+ literalValue='ifmissing';
+
+ annotate "TCS::AutoCreateKind::never" with
+ literalValue='never';
+
+ annotate PrimitiveTypes with
+ nsURI='http://www.eclipse.org/gmt/tcs/2007/TCS-PrimitiveTypes',
+ nsPrefix='pt';
+
+ annotate "PrimitiveTypes::Boolean" with
+ instanceClassName='boolean';
+
+ annotate "PrimitiveTypes::Integer" with
+ instanceClassName='int';
+
+ annotate "PrimitiveTypes::String" with
+ instanceClassName='java.lang.String';
+
+} \ No newline at end of file
diff --git a/dsls/TCS/Metamodel/TCS.km3 b/dsls/TCS/Metamodel/TCS.km3
new file mode 100644
index 0000000..7c33853
--- /dev/null
+++ b/dsls/TCS/Metamodel/TCS.km3
@@ -0,0 +1,449 @@
+-- @name TCS
+-- @version 1.0
+-- @domains MDE, Grammarware
+-- @authors Frédéric Jouault
+-- @date 2007/07/30
+-- @description TCS (Textual Concrete Syntax) is a textual syntax specification language for metamodels.
+
+package TCS {
+
+ abstract class LocatedElement {
+ attribute location[0-1] : String;
+ attribute commentsBefore[*] ordered : String;
+ attribute commentsAfter[*] ordered : String;
+ }
+
+ abstract class NamedElement extends LocatedElement {
+ attribute name : String;
+ }
+
+ class ConcreteSyntax extends NamedElement {
+ -- name must be the metamodel's
+ attribute k[0-1] : Integer;
+ reference templates[*] ordered container : Template oppositeOf concreteSyntax;
+ reference keywords[*] ordered container : Keyword;
+ reference symbols[*] ordered container : Symbol;
+ reference operatorLists[*] ordered container : OperatorList;
+ reference tokens[*] ordered container : Token;
+ attribute lexer : String;
+ }
+
+-- @begin Templates
+ abstract class Template extends NamedElement {
+ reference concreteSyntax : ConcreteSyntax oppositeOf templates;
+ attribute disambiguate[0-1] : String;
+ attribute disambiguateV3[0-1] : String;
+ }
+
+ class FunctionTemplate extends Template {
+ attribute className : String;
+ reference functionSequence container : Sequence oppositeOf functionContainer;
+ }
+
+ class ClassTemplate extends Template {
+ -- name must be the class's
+ reference templateSequence[0-1] container : Sequence oppositeOf templateContainer;
+ attribute modifiers[*] : TemplateModifiers;
+
+ -- until Enumeration is supported
+ attribute isAbstract : Boolean;
+ attribute isDeep : Boolean;
+ reference prefixSequence container : Sequence oppositeOf prefixContainer;
+ attribute isOperatored : Boolean;
+ reference operatorList[0-1] : OperatorList;
+ reference parentheses[0-1] container : Parentheses;
+ attribute isMain : Boolean;
+ attribute isMulti : Boolean; -- can be used in combination with main
+ attribute isContext : Boolean;
+ attribute isAddToContext : Boolean;
+ attribute isNonPrimary : Boolean;
+ attribute mode[0-1] : String;
+ }
+
+ class Parentheses extends LocatedElement {
+ attribute isOff : Boolean;
+ reference left[0-1] container : Sequence;
+ reference right[0-1] container : Sequence;
+ }
+
+ enumeration TemplateModifiers {
+ literal "abstract";
+ literal operatored;
+ literal main;
+ literal context;
+ literal addToContext;
+ }
+
+ class PrimitiveTemplate extends Template {
+ attribute typeName : String;
+ attribute isDefault : Boolean;
+ attribute tokenName : String;
+ attribute value : String;
+ attribute serializer : String;
+ attribute orKeyword : Boolean;
+ }
+
+ class OperatorTemplate extends Template {
+ reference operators[*] : Operator oppositeOf templates;
+ attribute source : String;
+ attribute storeOpTo[0-1] : String;
+ attribute storeRightTo[0-1] : String;
+ reference otSequence[0-1] container : Sequence oppositeOf otContainer;
+ attribute isContext : Boolean;
+ }
+
+ class EnumerationTemplate extends Template {
+ -- name must be the enumeration's
+ attribute automatic : Boolean;
+ reference mappings[*] ordered container : EnumLiteralMapping;
+ }
+
+ class EnumLiteralMapping extends LocatedElement {
+ reference "literal" container : EnumLiteralVal;
+ reference element container : SequenceElement;
+ }
+-- @end Templates
+
+-- @begin Literals
+ abstract class Literal extends NamedElement {
+ reference operators[*] : Operator oppositeOf "literal";
+ reference literalRefs[*] : LiteralRef oppositeOf "referredLiteral";
+ attribute value : String;
+ }
+
+ class Symbol extends Literal {
+ attribute spaces[*] : SpaceKind;
+ }
+
+ enumeration SpaceKind {
+ literal leftSpace;
+ literal leftNone;
+ literal rightSpace;
+ literal rightNone;
+ }
+
+ class Keyword extends Literal {
+ }
+-- @end Literals
+
+-- @begin Operators
+ class OperatorList extends LocatedElement {
+ attribute name[0-1] : String;
+ reference priorities[*] ordered container : Priority oppositeOf list;
+ }
+
+ class Priority extends LocatedElement {
+ reference list : OperatorList oppositeOf priorities;
+ attribute value : Integer;
+ attribute associativity : Associativity;
+ reference operators[*] container : Operator oppositeOf priority;
+ }
+
+ class Operator extends NamedElement {
+ attribute isPostfix : Boolean;
+ attribute arity : Integer;
+ reference "literal"[0-1] : Literal oppositeOf operators;
+ reference priority : Priority oppositeOf operators;
+ reference templates[*] : OperatorTemplate oppositeOf operators;
+ }
+
+ enumeration Associativity {
+ literal left;
+ literal right;
+ }
+-- @end Operators
+
+ class Sequence extends LocatedElement {
+ reference elements[*] ordered container : SequenceElement oppositeOf elementSequence;
+ reference templateContainer[0-1] : ClassTemplate oppositeOf templateSequence;
+ reference prefixContainer[0-1] : ClassTemplate oppositeOf prefixSequence;
+ reference functionContainer[0-1] : FunctionTemplate oppositeOf functionSequence;
+ reference blockContainer[0-1] : Block oppositeOf blockSequence;
+ reference thenContainer[0-1] : ConditionalElement oppositeOf thenSequence;
+ reference elseContainer[0-1] : ConditionalElement oppositeOf elseSequence;
+ reference separatorContainer[0-1] : SeparatorPArg oppositeOf separatorSequence;
+ reference otContainer[0-1] : OperatorTemplate oppositeOf otSequence;
+-- reference keyContainer : Key oppositeOf keySequence;
+ reference alternativeContainer[0-1] : Alternative oppositeOf sequences;
+ }
+
+-- @begin Sequence Elements
+ abstract class SequenceElement extends LocatedElement {
+ reference elementSequence : Sequence oppositeOf elements;
+ }
+
+ class LiteralRef extends SequenceElement {
+ reference referredLiteral : Literal oppositeOf literalRefs;
+ }
+
+ class Property extends SequenceElement {
+ attribute name : String;
+ reference propertyArgs[*] ordered container : PropertyArg oppositeOf property;
+ }
+
+ class CustomSeparator extends SequenceElement {
+ attribute name : String;
+ }
+
+ class Block extends SequenceElement {
+ reference blockSequence container : Sequence oppositeOf blockContainer;
+ reference blockArgs[*] ordered container : BlockArg oppositeOf block;
+ }
+
+ class ConditionalElement extends SequenceElement {
+ -- condition must be boolean
+ reference condition container : Expression oppositeOf conditionalElement;
+ reference thenSequence container : Sequence oppositeOf thenContainer;
+ reference elseSequence container : Sequence oppositeOf elseContainer;
+ }
+
+ class PropertyInit extends SequenceElement {
+ attribute name : String;
+ reference value container : Value;
+ }
+
+ class Alternative extends SequenceElement {
+ reference sequences[2-*] ordered container : Sequence oppositeOf alternativeContainer;
+ attribute isMulti : Boolean;
+ }
+
+ class FunctionCall extends SequenceElement {
+ reference calledFunction : FunctionTemplate;
+ }
+-- @end Sequence Elements
+
+-- @begin Property Arguments
+ abstract class PropertyArg extends LocatedElement {
+ reference property : Property oppositeOf propertyArgs;
+ }
+
+ class RefersToPArg extends PropertyArg {
+ attribute propertyName : String;
+ }
+
+ class LookInPArg extends PropertyArg {
+ attribute propertyName[1-*] ordered : String;
+ }
+
+ class CreateInPArg extends PropertyArg {
+ attribute propertyName[1-*] ordered : String;
+ }
+
+ class RefersToKeyPArg extends PropertyArg {
+ attribute value : Boolean;
+ }
+
+ class SeparatorPArg extends PropertyArg {
+ reference separatorSequence container : Sequence oppositeOf separatorContainer;
+ }
+
+ class AutoCreatePArg extends PropertyArg {
+ attribute value : AutoCreateKind;
+ }
+
+ class ImportContextPArg extends PropertyArg {
+
+ }
+
+ class ForcedLowerPArg extends PropertyArg {
+ attribute value : Integer;
+ }
+
+ enumeration AutoCreateKind {
+ literal always;
+ literal ifmissing;
+ literal never;
+ }
+
+ class CreateAsPArg extends PropertyArg {
+ attribute name : String;
+ }
+
+ class AsPArg extends PropertyArg {
+ attribute value : String;
+ }
+
+ class ModePArg extends PropertyArg {
+ attribute mode : String;
+ }
+-- @end Property Arguments
+
+
+-- @begin Block Arguments
+ abstract class BlockArg extends LocatedElement {
+ reference block : Block oppositeOf blockArgs;
+ }
+
+ class NbNLBArg extends BlockArg {
+ attribute value : Integer;
+ }
+
+ class IndentIncrBArg extends BlockArg {
+ attribute value : Integer;
+ }
+
+ class StartNLBArg extends BlockArg {
+ attribute value : Boolean;
+ }
+
+ class StartNbNLBArg extends BlockArg {
+ attribute value : Integer;
+ }
+
+ class EndNLBArg extends BlockArg {
+ attribute value : Boolean;
+ }
+-- @end Block Arguments
+
+
+-- @begin Expressions
+ abstract class Expression extends LocatedElement {
+ reference conditionalElement : ConditionalElement oppositeOf condition;
+ }
+
+ class AndExp extends Expression {
+ reference expressions[*] ordered container : AtomExp oppositeOf andExp;
+ }
+
+ abstract class AtomExp extends LocatedElement {
+ reference andExp : AndExp oppositeOf expressions;
+ attribute propertyName : String;
+ }
+
+ class EqualsExp extends AtomExp {
+ reference value container : Value; -- Was an Attribute but Ecore forbids non-EDataType attributes
+ }
+
+ class BooleanPropertyExp extends AtomExp {
+ }
+
+ class IsDefinedExp extends AtomExp {
+ }
+
+ class OneExp extends AtomExp {
+ }
+-- @end Expressions
+
+
+-- @begin Values
+ abstract class Value extends LocatedElement {
+
+ }
+
+ class StringVal extends Value {
+ attribute symbol : String;
+ }
+
+ class IntegerVal extends Value {
+ attribute symbol : Integer;
+ }
+
+ class NegativeIntegerVal extends Value {
+ attribute symbol : Integer;
+ }
+
+ class EnumLiteralVal extends Value {
+ attribute name : String;
+ }
+
+ class PropertyVal extends Value {
+ attribute propertyName[1-*] : String;
+ }
+-- @end Values
+
+
+-- @begin Tokens
+ class Token extends NamedElement {
+ reference pattern container : OrPattern;
+ }
+
+ class OrPattern extends LocatedElement {
+ reference simplePatterns[1-*] ordered container : SimplePattern;
+ }
+
+-- @begin SimplePatterns
+ abstract class SimplePattern extends NamedElement {
+ }
+
+ class RulePattern extends SimplePattern {
+ reference rule container : Rule;
+-- reference arguments[*] ordered container : RuleArgument;
+ }
+
+-- @begin Rules
+ abstract class Rule extends LocatedElement {
+ }
+
+ class WordRule extends Rule {
+ reference start container : OrPattern;
+ reference part container : OrPattern;
+ reference end[0-1] container : OrPattern;
+ reference words[*] container : Word;
+ }
+
+ class Word extends NamedElement {
+ attribute token : String;
+ }
+
+ class EndOfLineRule extends Rule {
+ reference start container : StringPattern;
+ attribute dropStart : Boolean;
+ }
+
+ class MultiLineRule extends Rule {
+ reference start container : StringPattern;
+ attribute dropStart : Boolean;
+ reference end container : StringPattern;
+ attribute dropEnd : Boolean;
+ reference esc[0-1] container : StringPattern;
+ reference escMappings[*] container : Mapping;
+ }
+
+ abstract class Mapping extends LocatedElement {}
+
+ class SimpleMapping extends Mapping {
+ attribute key : String;
+ attribute value : String;
+ }
+
+ class WildcardMapping extends Mapping {}
+
+ class OctalMapping extends Mapping {}
+
+ class HexadecimalMapping extends Mapping {}
+-- @end Rules
+
+-- class RuleArgument extends NamedElement {
+-- reference value container : OrPattern;
+-- }
+
+ class StringPattern extends SimplePattern {
+ }
+
+ class ClassPattern extends SimplePattern {
+ }
+-- @end SimplePatterns
+-- @end Tokens
+
+
+-- @begin Obsolete Items
+-- class Key extends NamedElement {
+-- -- name must be the class's
+-- reference keySequence container : Sequence oppositeOf keyContainer;
+-- }
+-- class FunctionCall extends SequenceElement { -- unused
+-- reference function : Function;
+-- reference arguments[*] ordered container : Argument;
+-- }
+-- @end Obsolete Items
+
+}
+
+package PrimitiveTypes {
+
+ datatype Boolean;
+ datatype Integer;
+ datatype String;
+
+}
+
diff --git a/dsls/TCS/Syntax/TCS.tcs b/dsls/TCS/Syntax/TCS.tcs
new file mode 100644
index 0000000..fdbdb74
--- /dev/null
+++ b/dsls/TCS/Syntax/TCS.tcs
@@ -0,0 +1,601 @@
+-- @authors Frédéric Jouault
+-- @date 2007/09/19
+-- @description This TCS model defines the syntax of the TCS language.
+
+-- REMARK: to use this tcs for extraction: remove the alternatives for keywords
+-- Identifiers are ALPHA (ALPHA | DIGIT)* with a special form between single quote to escape them in case they are the same as a keywords of TCS
+-- Strings are double quoted
+-- Comments begin with -- and end with the end of the line
+syntax TCS {
+
+ primitiveTemplate identifier for String default using NAME:
+ value = "%token%";
+
+ primitiveTemplate identifierOrKeyword for String using NAME orKeyword:
+ value = "%token%";
+
+ primitiveTemplate stringSymbol for String using STRING:
+ value = "%token%",
+ serializer="'\\\"' + %value%.toCString() + '\\\"'";
+
+ primitiveTemplate integerSymbol for Integer default using INT:
+ value = "Integer.valueOf(%token%)";
+
+ template ConcreteSyntax main context
+ : "syntax" name (isDefined(k) ? "(" "k" "=" k ")") "{" [
+ templates
+ (isDefined(keywords) ? "keywords" "{" [ keywords ] "}")
+ (isDefined(symbols) ? "symbols" "{" [ symbols ] "}")
+ operatorLists
+ tokens
+ (isDefined(lexer) ? "lexer" "=" lexer{as = stringSymbol} ";")
+ ] {nbNL = 2} "}"
+ ;
+
+-- @begin Templates
+ template Template abstract;
+
+ template PrimitiveTemplate
+ : "primitiveTemplate" name "for" typeName
+ (isDefault ? "default")
+ "using" tokenName
+ (orKeyword ? "orKeyword")
+ ":"
+ "value" "=" value{as = stringSymbol}
+ (isDefined(serializer) ?
+ "," "serializer" "=" serializer{as = stringSymbol}
+ )
+ ";"
+ ;
+
+ template EnumerationTemplate
+ : "enumerationTemplate" name (automatic ? "auto")
+ (isDefined(mappings) ?
+ [ ":" [
+ mappings{separator = ","}
+ ] {startNL = false} ";" ]
+ :
+ ";"
+ )
+ ;
+
+ template EnumLiteralMapping
+ : literal "=" element
+ ;
+
+ template ClassTemplate
+ : "template" name
+ (isDefined(mode) ? "#" mode)
+ (isDefined(disambiguate) ? "(" "disambiguate" "=" disambiguate{as = stringSymbol} ")")
+ (isMulti ? "multi")
+ (isMain ? "main")
+ (isAbstract ? (isDeep ? "deep") "abstract")
+ (isOperatored ?
+ "operatored"
+ (isDefined(operatorList) ?
+ "("
+ operatorList{refersTo = name}
+ (isDefined(parentheses) ?
+ "," parentheses
+ )
+ ")"
+ )
+ )
+ (isContext ? "context")
+ (isAddToContext ? "addToContext")
+ (isNonPrimary ? "nonPrimary")
+ (isDefined(prefixSequence) ? "prefix" [ ":" [ prefixSequence ] {startNL = false} ])
+ (isDefined(templateSequence) ? [ ":" [ templateSequence ] {startNL = false} ";" ] : ";")
+ ;
+
+ template Parentheses
+ : "parens" "("
+ (isOff ?
+ "off"
+ :
+ left "," right
+ )
+ ")"
+ ;
+
+ template OperatorTemplate
+ : "operatorTemplate" name "("
+ "operators" "=" operators{refersTo = name}
+ "," "source" "=" source
+ (isDefined(storeOpTo) ? "," "storeOpTo" "=" storeOpTo)
+ (isDefined(storeRightTo) ? "," "storeRightTo" "=" storeRightTo)
+ (isDefined(disambiguate) ? "," "disambiguate" "=" disambiguate{as = stringSymbol})
+ (isDefined(disambiguateV3) ? "," "disambiguateV3" "=" disambiguateV3{as = stringSymbol})
+ ")"
+ (isContext ? "context")
+ (isDefined(otSequence) ? [ ":" [ otSequence ] {startNL = false} ";" ] : ";")
+ ;
+
+ template FunctionTemplate addToContext
+ : "function" name "(" className ")"
+ [ ":"
+ [ functionSequence ] {startNL = false}
+ ";" ]
+ ;
+-- @end Templates
+
+ template Sequence
+ : elements
+ ;
+
+-- @begin Sequence Elements
+ template SequenceElement abstract;
+
+ template LiteralRef
+ :
+-- COMMENT FOR EXTRACTOR
+-- [[
+ referredLiteral{refersTo = value, lookIn = #all, as = stringSymbol, autoCreate = ifmissing, createAs = Keyword}
+-- |
+-- "@" referredLiteral{refersTo = name}
+-- ]]
+ ;
+
+ template Property
+ : name{as = identifierOrKeyword} (isDefined(propertyArgs) ? "{" propertyArgs{separator = ","} "}")
+ ;
+
+ template CustomSeparator
+ : "<" name ">"
+ ;
+
+ template Block
+ : "[" blockSequence "]" (isDefined(blockArgs) ? "{" blockArgs{separator = ","} "}")
+ ;
+
+ template ConditionalElement
+ : "(" condition "?" thenSequence (isDefined(elseSequence) ? ":" elseSequence) ")"
+ ;
+
+ template PropertyInit
+ : "{{" name "<-" value "}}"
+ ;
+
+ template Alternative
+ : "[[" sequences{separator = "|"} "]]" (isMulti ? "*")
+ ;
+
+ template FunctionCall
+ : "$" calledFunction{refersTo = name}
+ ;
+-- @end Sequence Elements
+
+
+-- @begin Property Arguments
+ template PropertyArg abstract;
+
+ template RefersToPArg
+ : "refersTo" "=" propertyName{as = identifierOrKeyword}
+ ;
+
+ template LookInPArg
+ : "lookIn" "=" (propertyName = "#all" ? "#" "all" : propertyName{as = identifierOrKeyword, separator = "."})
+ ;
+
+ template CreateInPArg
+ : "createIn" "=" propertyName{as = identifierOrKeyword, separator = "."}
+ ;
+
+ template AsPArg
+ : "as" "=" value
+ ;
+
+ template RefersToKeyPArg
+ : "refersToKey" "=" (value ? "true" : "false")
+ ;
+
+ template SeparatorPArg
+ : "separator" "=" separatorSequence
+ ;
+
+ template AutoCreatePArg
+ : "autoCreate" "=" value
+ ;
+
+ enumerationTemplate AutoCreateKind
+ : #always = "always",
+ #ifmissing = "ifmissing",
+ #never = "never"
+ ;
+
+ template ImportContextPArg
+ : "importContext"
+ ;
+
+ template ForcedLowerPArg
+ : "forcedLower" "=" value
+ ;
+
+ template CreateAsPArg
+ : "createAs" "=" name{as = identifierOrKeyword}
+ ;
+
+ template ModePArg
+ : "mode" "=" mode{as = identifierOrKeyword}
+ ;
+-- @end Property Arguments
+
+
+-- @begin Block Arguments
+ template BlockArg abstract;
+
+ template NbNLBArg
+ : "nbNL" "=" value
+ ;
+
+ template IndentIncrBArg
+ : "indentIncr" "=" value
+ ;
+
+ template StartNLBArg
+ : "startNL" "=" (value ? "true" : "false")
+ ;
+
+ template StartNbNLBArg
+ : "startNbNL" "=" value
+ ;
+
+ template EndNLBArg
+ : "endNL" "=" (value ? "true" : "false")
+ ;
+-- @end Block Arguments
+
+
+-- @begin Literals
+-- template Literal abstract;
+
+ template Symbol addToContext
+ : name "=" value{as = stringSymbol} (isDefined(spaces) ? ":" spaces{separator = ","}) ";"
+ ;
+
+ enumerationTemplate SpaceKind
+ : #leftSpace = "leftSpace",
+ #leftNone = "leftNone",
+ #rightSpace = "rightSpace",
+ #rightNone = "rightNone"
+ ;
+
+ template Keyword addToContext
+ : name "=" value{as = stringSymbol} ";"
+ ;
+-- @end Literals
+
+-- @begin Operators
+ template OperatorList addToContext
+ : "operators" (isDefined(name) ? name) "{" [
+ priorities
+ ] "}"
+ ;
+
+ template Priority
+ : "priority" value
+ (associativity = #left ?
+ -- nothing
+ :
+ "," associativity
+ )
+ "{" [
+ operators
+ ] "}"
+ ;
+
+ template Operator addToContext
+ : (isPostfix ? "postfix") name "="
+ (isDefined(literal) ? [[
+ literal{refersTo = name}
+ |
+ literal{refersTo = value, lookIn = #all, as = stringSymbol, autoCreate = ifmissing, createAs = Keyword}
+ ]])
+ "," arity ";"
+ ;
+
+ enumerationTemplate Associativity
+ : #left = "left",
+ #right = "right"
+ ;
+-- @end Operators
+
+-- @begin Expressions
+ template Expression abstract;
+
+ template AndExp
+ : expressions{separator = "and"}
+ ;
+
+ template AtomExp abstract;
+
+ template EqualsExp
+ : propertyName{as = identifierOrKeyword} "=" value
+ ;
+
+ template BooleanPropertyExp
+ : propertyName{as = identifierOrKeyword}
+ ;
+
+ template IsDefinedExp
+ : "isDefined" "(" propertyName{as = identifierOrKeyword} ")"
+ ;
+
+ template OneExp
+ : "one" "(" propertyName{as = identifierOrKeyword} ")"
+ ;
+--@end Expressions
+
+-- @begin Values
+ template Value abstract;
+
+ template StringVal
+ : symbol{as = stringSymbol}
+ ;
+
+ template IntegerVal
+ : symbol
+ ;
+
+ template NegativeIntegerVal
+ : "-" symbol
+ ;
+
+ template EnumLiteralVal
+ : "#" name{as = identifierOrKeyword}
+ ;
+-- @end Values
+
+
+-- @begin Tokens
+ template Token
+ : "token" name ":" pattern ";"
+ ;
+
+ template OrPattern
+ : simplePatterns{separator = "|"}
+ ;
+
+-- @begin SimplePatterns
+ template SimplePattern abstract;
+
+ template RulePattern
+-- : name "(" arguments{separator = ","} ")"
+ : rule
+ ;
+
+-- @begin Rules
+ template Rule abstract;
+
+ template WordRule
+ : "word" "("
+ "start" "=" start ","
+ "part" "=" part
+ (isDefined(end) ?
+ "," "end" "=" end
+ )
+ (isDefined(words) ?
+ "," "words" "=" "(" words{separator = ","} ")"
+ )
+ ")"
+ ;
+
+ template Word
+ : name{as = stringSymbol} ":" token
+ ;
+
+ template EndOfLineRule
+ : "endOfLine" "("
+ "start" "=" (dropStart ? "drop") start
+ ")"
+ ;
+
+ template MultiLineRule
+ : "multiLine" "("
+ "start" "=" (dropStart ? "drop") start ","
+ "end" "=" (dropEnd ? "drop") end
+ (isDefined(esc) ?
+ "," "esc" "=" esc
+ (isDefined(escMappings) ?
+ "," "(" escMappings{separator = ","} ")"
+ )
+ )
+ ")"
+ ;
+
+ template Mapping abstract;
+
+ template SimpleMapping
+ : key "->" value
+ ;
+
+ template WildcardMapping
+ : "." "->" "."
+ ;
+
+ template OctalMapping
+ : "octal"
+ ;
+
+ template HexadecimalMapping
+ : "hex"
+ ;
+-- @end Rules
+
+-- template RuleArgument
+-- : name "=" value
+-- ;
+
+ template StringPattern
+ : name{as = stringSymbol}
+ ;
+
+ template ClassPattern
+ : "[" name "]"
+ ;
+-- @end SimplePatterns
+-- @end Tokens
+
+ symbols {
+ lsquare = "[";
+ rsquare = "]";
+ dlsquare = "[[";
+ drsquare = "]]";
+ excl = "!";
+ coma = ",";
+ lparen = "(";
+ rparen = ")";
+ lcurly = "{";
+ rcurly = "}";
+ dlcurly = "{{";
+ drcurly = "}}";
+ semi = ";";
+ colon = ":";
+ pipe = "|";
+ sharp = "#";
+ qmark = "?";
+ dollar = "$";
+ arobas = "@";
+
+ -- operator symbols
+ point = ".";
+ rarrow = "->";
+ minus = "-";
+ star = "*";
+ slash = "/";
+ plus = "+";
+ eq = "=";
+ gt = ">";
+ lt = "<";
+ ge = ">=";
+ le = "<=";
+ ne = "<>";
+ larrow = "<-";
+ }
+
+ token COMMENT : endOfLine(start = "--");
+
+ lexer = "
+%options testLiterals = false;
+
+NL
+ : ( '\\r' '\\n'
+ | '\\n' '\\r' //Improbable
+ | '\\r'
+ | '\\n'
+ )
+ {newline();}
+ ;
+
+WS
+ : ( ' '
+ | '\\t'
+ )
+ ;
+
+%protected
+DIGIT
+ : '0'..'9'
+ ;
+
+%protected
+ALPHA
+ : 'a'..'z'
+ | 'A'..'Z'
+ | '_'
+ //For Unicode compatibility (from 0000 to 00ff)
+ | '\\u00C0' .. '\\u00D6'
+ | '\\u00D8' .. '\\u00F6'
+ | '\\u00F8' .. '\\u00FF'
+ ;
+
+%protected
+SNAME
+%v2 options {
+%v2 testLiterals = true;
+%v2 }
+ : (ALPHA) (ALPHA | DIGIT)*
+;
+
+NAME
+ : (
+%v3 SNAME
+%v2 s:SNAME {if(s.getType() != SNAME) $setType(s.getType());}
+ | '\\''!
+ ( ESC
+ | '\\n' {newline();}
+ | ~('\\\\'|'\\\''|'\\n')
+ )*
+ '\\''!
+%v3 {setText(ei.unescapeString(getText(), 1));}
+ )
+ ;
+
+INT
+ : (DIGIT)+
+%v2 (('.' DIGIT)=> '.' (DIGIT)+ {$setType(FLOAT);})?
+ ;
+
+%v3 FLOAT : DIGIT+ '.' DIGIT* ;
+
+%protected
+ESC
+ : '\\\\'!
+ ( 'n' %v2{%setText(\"\\n\");}
+ | 'r' %v2{%setText(\"\\r\");}
+ | 't' %v2{%setText(\"\\t\");}
+ | 'b' %v2{%setText(\"\\b\");}
+ | 'f' %v2{%setText(\"\\f\");}
+ | '\"' %v2{%setText(\"\\\"\");}
+ | '\\'' %v2{%setText(\"\\'\");}
+ | '\\\\' %v2{%setText(\"\\\\\");}
+ | (
+ ('0'..'3')
+ (
+%v2 options {
+%v2 warnWhenFollowAmbig = false;
+%v2 }
+ : ('0'..'7')
+ (
+%v2 options {
+%v2 warnWhenFollowAmbig = false;
+%v2 }
+ : '0'..'7'
+ )?
+ )?
+ | ('4'..'7')
+ (
+%v2 options {
+%v2 warnWhenFollowAmbig = false;
+%v2 }
+ : ('0'..'7')
+ )?
+ )
+ {
+%v2 String s = %getText;
+%v2 int i;
+%v2 int ret = 0;
+%v2 String ans;
+%v2 for (i=0; i<s.length(); ++i)
+%v2 ret = ret*8 + s.charAt(i) - '0';
+%v2 ans = String.valueOf((char) ret);
+%v2 %setText(ans);
+ }
+ )
+ ;
+
+STRING
+ : '\"'!
+ ( ESC
+ | '\\n' {newline();}
+ | ~('\\\\'|'\"'|'\\n')
+ )*
+ '\"'!
+%v3 {setText(ei.unescapeString(getText(), 1));}
+
+ ;
+
+ ";
+
+}
+
diff --git a/dsls/TCS/WFR/.gitignore b/dsls/TCS/WFR/.gitignore
new file mode 100644
index 0000000..836623e
--- /dev/null
+++ b/dsls/TCS/WFR/.gitignore
@@ -0,0 +1 @@
+/TCS2Problem.asm
diff --git a/dsls/TCS/WFR/TCS2Problem.atl b/dsls/TCS/WFR/TCS2Problem.atl
new file mode 100644
index 0000000..3714f20
--- /dev/null
+++ b/dsls/TCS/WFR/TCS2Problem.atl
@@ -0,0 +1,293 @@
+-- @atlcompiler atl2006
+module TCS2Problem;
+create OUT : Problem from IN : TCS, MM : KM3;
+
+uses KM3Helpers;
+
+
+-- By default, a Template's class has the same name (except for: PrimitiveTemplate and FunctionTemplate)
+helper context TCS!Template def: classes : KM3!Class =
+ KM3!Classifier.allInstancesFrom('MM')->select(e | e.name = self.name)->asSequence();
+
+helper context TCS!FunctionTemplate def: classes : KM3!Class =
+ KM3!Classifier.allInstancesFrom('MM')->select(e | e.name = self.className)->asSequence();
+
+helper context TCS!PrimitiveTemplate def: classes : KM3!Class =
+ KM3!Classifier.allInstancesFrom('MM')->select(e | e.name = self.typeName)->asSequence();
+
+
+
+helper context TCS!Template def: class : KM3!Class =
+ self.classes->first();
+
+-- @begin Classifier.template
+helper context KM3!Class def: template : TCS!ClassTemplate =
+ TCS!ClassTemplate.allInstancesFrom('IN')->select(e | e.name = self.name)->asSequence()->first();
+
+helper context KM3!DataType def: template : TCS!PrimitiveTemplate =
+ TCS!PrimitiveTemplate.allInstancesFrom('IN')->select(e | e.typeName = self.name)->asSequence()->first();
+
+helper context KM3!Enumeration def: template : TCS!EnumerationTemplate =
+ TCS!EnumerationTemplate.allInstancesFrom('IN')->select(e | e.name = self.name)->asSequence()->first();
+-- @end Classifier.template
+
+-- [C-1] At least one KM3!Class for each TCS!ClassTemplate
+nodefault rule AtLeastOneClassByClassTemplate {
+ from
+ s : TCS!ClassTemplate (
+ s.class.oclIsUndefined()
+ )
+ to
+ t : Problem!Problem (
+ severity <- #error,
+ description <- '[C-1] There is no metamodel Class corresponding to ClassTemplate ' + s.name,
+ location <- s.location
+ )
+}
+
+-- [C-2] At most one KM3!Class for each TCS!ClassTemplate.
+-- We have to check that because the KM3 metamodel could have several classes with the same name
+-- in different packages (at least in a future version of KM3) but this version of TCS does not
+-- support KM3 packages.
+nodefault rule AtMostOneClassByClassTemplate {
+ from
+ s : TCS!ClassTemplate (
+ s.classes->size() > 1
+ )
+ to
+ t : Problem!Problem (
+ severity <- #error,
+ description <- '[C-2] There are several metamodel Classes corresponding to ClassTemplate ' + s.name,
+ location <- s.location
+ )
+}
+
+---- [C-3] Each TCS!Template must have a unique name.
+nodefault rule TemplateNamesUnique {
+ from
+ s : TCS!Template (
+ TCS!Template.allInstancesFrom('IN')->select(e |
+ e.name = s.name and
+ if e.oclIsKindOf(TCS!ClassTemplate) and s.oclIsKindOf(TCS!ClassTemplate) then
+ e.mode = s.mode
+ else
+ true
+ endif
+ )->size() > 1
+ )
+ to
+ t : Problem!Problem (
+ severity <- #error,
+ description <- '[C-3] There are several Templates with the same name: ' + s.name,
+ location <- s.location
+ )
+}
+
+helper context TCS!LocatedElement def: template : TCS!Template =
+ let ic : OclAny = self.refImmediateComposite() in
+ if ic.oclIsKindOf(TCS!Template) then
+ ic
+ else
+ ic.template
+ endif;
+
+helper context TCS!Property def: hasClass : Boolean =
+ if self.template.oclIsUndefined() then
+ false -- should not happen in a well-formed TCS
+ else
+ if self.template.class.oclIsUndefined() then
+ false -- should not happen if [C-1] is satisfied
+ else
+ true
+ endif
+ endif;
+
+helper context TCS!Property def: feature : KM3!StructuralFeature =
+ if not self.hasClass then
+ OclUndefined
+ else
+ self.template.class.allStructuralFeatures->select(e |
+ e.name = self.name
+ )->asSequence()->first()
+ endif;
+
+-- [C-4] At least one KM3!StructuralFeature for each TCS!Property.
+-- There is no need to check if there are more than one because the KM3 metamodel would then be invalid.
+nodefault rule AtLeastOneStructuralFeatureByProperty {
+ from
+ s : TCS!Property (
+ if s.hasClass then
+ s.feature.oclIsUndefined()
+ else
+ false -- if [C-1] is not satisfied we do not want to give an error for every property contained in the Template
+ endif
+ )
+ to
+ t : Problem!Problem (
+ severity <- #error,
+ description <- '[C-4] There is no metamodel StructuralFeature corresponding to property ' + s.name,
+ location <- s.location
+ )
+}
+
+-- [C-5] There must be at least one template matching each property type except for refersTo properties.
+-- There is no need to check if there are more than one because the TCS model would not be well-formed. (TODO: check if there are no template with same name)
+nodefault rule AtLeastOneTemplateByPropertyType {
+ from
+ s : TCS!Property (
+ if s.feature.oclIsUndefined() then
+ false -- should not happen if [C-4] is satisfied
+ else if s.propertyArgs->exists(e | e.oclIsKindOf(TCS!RefersToPArg)) then
+ false -- TODO: check target type?
+ else
+ s.feature.type.template.oclIsUndefined()
+ endif endif
+ )
+ to
+ t : Problem!Problem (
+ severity <- #error,
+ description <- '[C-5] There is no TCS Template corresponding to the type of property ' + s.name,
+ location <- s.location
+ )
+}
+
+helper context TCS!RefersToPArg def: feature : KM3!StructuralFeature =
+ if self.property.feature.oclIsUndefined() then
+ OclUndefined
+ else
+ self.property.feature.type.allStructuralFeatures->select(e |
+ e.name = self.propertyName
+ )->asSequence()->first()
+ endif;
+
+-- [C-] At least one KM3!StructuralFeature for each TCS!RefersToPArg.
+-- There is no need to check if there are more than one because the KM3 metamodel would then be invalid.
+nodefault rule AtLeastOneStructuralFeatureByRefersToPArg {
+ from
+ s : TCS!RefersToPArg (
+ if s.property.hasClass then
+ if s.property.feature.oclIsUndefined() then
+ false
+ else
+ s.feature.oclIsUndefined()
+ endif
+ else
+ false -- if [C-1] is not satisfied we do not want to give an error for every property contained in the Template
+ endif
+ )
+ to
+ t : Problem!Problem (
+ severity <- #error,
+ description <- 'There is no metamodel StructuralFeature corresponding to referredTo property ' + s.propertyName + ' in ' + s.property.feature.type.name,
+ location <- s.location
+ )
+}
+
+helper context TCS!AtomExp def: hasClass : Boolean =
+ let ce : TCS!ConditionalElement = self.andExp.conditionalElement in
+ if ce.template.oclIsUndefined() then
+ false -- should not happen in a well-formed TCS
+ else
+ if ce.template.class.oclIsUndefined() then
+ false -- should not happen if [C-1] is satisfied
+ else
+ true
+ endif
+ endif;
+
+helper context TCS!AtomExp def: feature : KM3!StructuralFeature =
+ if not self.hasClass then
+ OclUndefined
+ else
+ self.andExp.conditionalElement.template.class.allStructuralFeatures->select(e |
+ e.name = self.propertyName
+ )->asSequence()->first()
+ endif;
+
+-- [C-6] At least one KM3!StructuralFeature for each TCS!AtomExp.
+-- There is no need to check if there are more than one because the KM3 metamodel would then be invalid.
+nodefault rule AtLeastOneStructuralFeatureByAtomExp {
+ from
+ s : TCS!AtomExp (
+ if s.hasClass then
+ s.feature.oclIsUndefined()
+ else
+ false -- if [C-1] is not satisfied
+ endif
+ )
+ to
+ t : Problem!Problem (
+ severity <- #error,
+ description <- 'There is no metamodel StructuralFeature corresponding to property ' + s.propertyName,
+ location <- s.location
+ )
+}
+
+-- [C-7] At least one KM3!Class for each TCS!FunctionTemplate
+nodefault rule AtLeastOneClassByFunctionTemplate {
+ from
+ s : TCS!FunctionTemplate (
+ s.class.oclIsUndefined()
+ )
+ to
+ t : Problem!Problem (
+ severity <- #error,
+ description <- 'There is no metamodel Class corresponding to FunctionTemplate ' + s.name,
+ location <- s.location
+ )
+}
+
+-- [C-8] At most one KM3!Class for each TCS!ClassTemplate.
+-- We have to check that because the KM3 metamodel could have several classes with the same name
+-- in different packages (at least in a future version of KM3) but this version of TCS does not
+-- support KM3 packages.
+nodefault rule AtMostOneClassByFunctionTemplate {
+ from
+ s : TCS!FunctionTemplate (
+ s.classes->size() > 1
+ )
+ to
+ t : Problem!Problem (
+ severity <- #error,
+ description <- 'There are several metamodel Classes corresponding to FunctionTemplate ' + s.name,
+ location <- s.location
+ )
+}
+
+-- [C-] A non-container reference should be referred to.
+nodefault rule NonContainerReferenceShouldBeReferredTo {
+ from
+ s : TCS!Property (
+ if s.feature.oclIsUndefined() then
+ false -- should not happen if [C-4] is satisfied
+ else if s.feature.oclIsKindOf(KM3!Reference) then
+ not(s.propertyArgs->exists(e | e.oclIsKindOf(TCS!RefersToPArg)) or s.feature.isContainer)
+ else
+ false -- Attributes are always container
+ endif endif
+ )
+ to
+ t : Problem!Problem (
+ severity <- #warning,
+ description <- 'Property ' + s.name + ', which corresponds to a non-container Reference, should referTo',
+ location <- s.location
+ )
+}
+
+-- [C-] Only elements can be referred to, not primitive types.
+nodefault rule PrimitiveTypesCannotBeReferredTo {
+ from
+ s : TCS!Property (
+ if s.feature.oclIsUndefined() then
+ false -- should not happen if [C-4] is satisfied
+ else
+ s.propertyArgs->exists(e | e.oclIsKindOf(TCS!RefersToPArg)) and s.feature.type.oclIsKindOf(KM3!DataType)
+ endif
+ )
+ to
+ t : Problem!Problem (
+ severity <- #error,
+ description <- 'Property ' + s.name + ', which corresponds to a StructuralFeature of type ' + s.feature.type.name + ' should not referTo',
+ location <- s.location
+ )
+}
diff --git a/dsls/TCS/build.properties b/dsls/TCS/build.properties
new file mode 100644
index 0000000..890fb95
--- /dev/null
+++ b/dsls/TCS/build.properties
@@ -0,0 +1,2 @@
+dsl.name=TCS
+dsl.ext=tcs \ No newline at end of file
diff --git a/plugins/org.eclipse.gmt.tcs-feature/.project b/plugins/org.eclipse.gmt.tcs-feature/.project
new file mode 100644
index 0000000..a931114
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs-feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.gmt.tcs-feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.gmt.tcs-feature/about.html b/plugins/org.eclipse.gmt.tcs-feature/about.html
new file mode 100644
index 0000000..7cc291c
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs-feature/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>January 21, 2008</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/plugins/org.eclipse.gmt.tcs-feature/build.properties b/plugins/org.eclipse.gmt.tcs-feature/build.properties
new file mode 100644
index 0000000..b4df6b8
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs-feature/build.properties
@@ -0,0 +1,16 @@
+bin.includes = feature.xml,\
+ epl-v10.html,\
+ feature.properties,\
+ license.html,\
+ license.txt,\
+ modeling32.png,\
+ about.html,\
+ tcs32.png
+src.includes = about.html,\
+ epl-v10.html,\
+ feature.properties,\
+ feature.xml,\
+ license.html,\
+ license.txt,\
+ modeling32.png,\
+ tcs32.png
diff --git a/plugins/org.eclipse.gmt.tcs-feature/epl-v10.html b/plugins/org.eclipse.gmt.tcs-feature/epl-v10.html
new file mode 100644
index 0000000..b15cf1a
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs-feature/epl-v10.html
@@ -0,0 +1,304 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel=File-List
+href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head>
+
+<body lang="EN-US" style='tab-interval:.5in'>
+
+<div class=Section1>
+
+<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear=left>
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+changes to the Program, and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+additions to the Program;</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span
+style='color:red'> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+its license agreement:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
+
+<p><span style='font-size:10.0pt'>When the Program is made available in source
+code form:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it must be made available under this Agreement; and </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style='font-size:10.0pt'>Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor (&quot;Commercial
+Contributor&quot;) hereby agrees to defend and indemnify every other
+Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
+costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style='font-size:10.0pt'>For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
+
+<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class=MsoNormal></p>
+
+</div>
+
+</body>
+
+</html> \ No newline at end of file
diff --git a/plugins/org.eclipse.gmt.tcs-feature/feature.properties b/plugins/org.eclipse.gmt.tcs-feature/feature.properties
new file mode 100644
index 0000000..dd75cbc
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs-feature/feature.properties
@@ -0,0 +1,145 @@
+# /**
+# * <copyright>
+# *
+# * Copyright (c) 2007-2008 INRIA.
+# * All rights reserved. This program and the accompanying materials
+# * are made available under the terms of the Eclipse Public License v1.0
+# * which accompanies this distribution, and is available at
+# * http://www.eclipse.org/legal/epl-v10.html
+# *
+# * Contributors:
+# * INRIA
+# *
+# * </copyright>
+# *
+# */
+
+# NLS_MESSAGEFORMAT_VAR
+
+# ==============================================================================
+# Do not change the properties between this line and the last line containing:
+# %%% END OF TRANSLATED PROPERTIES %%%
+# Instead, either redefine an existing property, or create a new property,
+# append it to the end of the file, and change the code to use the new name.
+# ==============================================================================
+
+# This file contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=TCS Feature
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse.org
+
+# "description" property - description of the feature
+description=TCS Feature
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+January 28, 2004\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse.org CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+Content may be apportioned into plug-ins ("Plug-ins"), plug-in fragments\n\
+("Fragments"), and features ("Features"). A Feature is a bundle of one or\n\
+more Plug-ins and/or Fragments and associated material. Files named\n\
+"feature.xml" may contain a list of the names and version numbers of the\n\
+Plug-ins and/or Fragments associated with a Feature. Plug-ins and Fragments\n\
+are located in directories named "plugins" and Features are located in\n\
+directories named "features".\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Subdirectories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE CPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n
+########### end of license property ##########################################
+
+
+# "updateSiteName" property - label for the update site
+updateSiteName=TCS Updates \ No newline at end of file
diff --git a/plugins/org.eclipse.gmt.tcs-feature/feature.xml b/plugins/org.eclipse.gmt.tcs-feature/feature.xml
new file mode 100644
index 0000000..da92bc5
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs-feature/feature.xml
@@ -0,0 +1,315 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.gmt.tcs_feature"
+ label="TCS Feature"
+ version="0.0.1"
+ provider-name="Eclipse.org"
+ plugin="org.eclipse.gmt.tcs">
+
+ <description>
+ TCS Feature
+ </description>
+
+ <copyright url="http://www.eclipse.org/legal/epl-v10.html">
+ /*
+* Copyright (c) 2008, INRIA.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License
+v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+*/
+ </copyright>
+
+ <license url="http://www.eclipse.org/legal/epl-v10.html">
+ Eclipse Public License - v 1.0
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS
+ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE, REPRODUCTION OR
+DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT&apos;S ACCEPTANCE
+OF THIS AGREEMENT.
+1. DEFINITIONS
+&quot;Contribution&quot; means:
+a) in the case of the initial Contributor, the initial code and
+documentation distributed under this Agreement, and
+b) in the case of each subsequent Contributor:
+i) changes to the Program, and
+ii) additions to the Program;
+where such changes and/or additions to the Program originate
+from and are distributed by that particular Contributor. A Contribution
+&apos;originates&apos; from a Contributor if it was added to the Program
+by such Contributor itself or anyone acting on such Contributor&apos;s
+behalf. Contributions do not include additions to the Program
+which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii)
+are not derivative works of the Program.
+&quot;Contributor&quot; means any person or entity that distributes the
+Program.
+&quot;Licensed Patents &quot; mean patent claims licensable by a Contributor
+which are necessarily infringed by the use or sale of its Contribution
+alone or when combined with the Program.
+&quot;Program&quot; means the Contributions distributed in accordance with
+this Agreement.
+&quot;Recipient&quot; means anyone who receives the Program under this
+Agreement, including all Contributors.
+2. GRANT OF RIGHTS
+a) Subject to the terms of this Agreement, each Contributor hereby
+grants Recipient a non-exclusive, worldwide, royalty-free copyright
+license to reproduce, prepare derivative works of, publicly display,
+publicly perform, distribute and sublicense the Contribution
+of such Contributor, if any, and such derivative works, in source
+code and object code form.
+b) Subject to the terms of this Agreement, each Contributor hereby
+grants Recipient a non-exclusive, worldwide, royalty-free patent
+license under Licensed Patents to make, use, sell, offer to sell,
+import and otherwise transfer the Contribution of such Contributor,
+if any, in source code and object code form. This patent license
+shall apply to the combination of the Contribution and the Program
+if, at the time the Contribution is added by the Contributor,
+such addition of the Contribution causes such combination to
+be covered by the Licensed Patents. The patent license shall
+not apply to any other combinations which include the Contribution.
+No hardware per se is licensed hereunder.
+c) Recipient understands that although each Contributor grants
+the licenses to its Contributions set forth herein, no assurances
+are provided by any Contributor that the Program does not infringe
+the patent or other intellectual property rights of any other
+entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement
+of intellectual property rights or otherwise. As a condition
+to exercising the rights and licenses granted hereunder, each
+Recipient hereby assumes sole responsibility to secure any other
+intellectual property rights needed, if any. For example, if
+a third party patent license is required to allow Recipient to
+distribute the Program, it is Recipient&apos;s responsibility to acquire
+that license before distributing the Program.
+d) Each Contributor represents that to its knowledge it has sufficient
+copyright rights in its Contribution, if any, to grant the copyright
+license set forth in this Agreement.
+3. REQUIREMENTS
+A Contributor may choose to distribute the Program in object
+code form under its own license agreement, provided that:
+a) it complies with the terms and conditions of this Agreement;
+and
+b) its license agreement:
+i) effectively disclaims on behalf of all Contributors all warranties
+and conditions, express and implied, including warranties or
+conditions of title and non-infringement, and implied warranties
+or conditions of merchantability and fitness for a particular
+purpose;
+ii) effectively excludes on behalf of all Contributors all liability
+for damages, including direct, indirect, special, incidental
+and consequential damages, such as lost profits;
+iii) states that any provisions which differ from this Agreement
+are offered by that Contributor alone and not by any other party;
+and
+iv) states that source code for the Program is available from
+such Contributor, and informs licensees how to obtain it in a
+reasonable manner on or through a medium customarily used for
+software exchange.
+When the Program is made available in source code form:
+a) it must be made available under this Agreement; and
+b) a copy of this Agreement must be included with each copy of
+the Program.
+Contributors may not remove or alter any copyright notices contained
+within the Program.
+Each Contributor must identify itself as the originator of its
+Contribution, if any, in a manner that reasonably allows subsequent
+Recipients to identify the originator of the Contribution.
+4. COMMERCIAL DISTRIBUTION
+Commercial distributors of software may accept certain responsibilities
+with respect to end users, business partners and the like. While
+this license is intended to facilitate the commercial use of
+the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create
+potential liability for other Contributors. Therefore, if a Contributor
+includes the Program in a commercial product offering, such Contributor
+(&quot;Commercial Contributor&quot;) hereby agrees to defend and indemnify
+every other Contributor (&quot;Indemnified Contributor&quot;) against any
+losses, damages and costs (collectively &quot;Losses&quot;) arising from
+claims, lawsuits and other legal actions brought by a third party
+against the Indemnified Contributor to the extent caused by the
+acts or omissions of such Commercial Contributor in connection
+with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any
+claims or Losses relating to any actual or alleged intellectual
+property infringement. In order to qualify, an Indemnified Contributor
+must: a) promptly notify the Commercial Contributor in writing
+of such claim, and b) allow the Commercial Contributor to control,
+and cooperate with the Commercial Contributor in, the defense
+and any related settlement negotiations. The Indemnified Contributor
+may participate in any such claim at its own expense.
+For example, a Contributor might include the Program in a commercial
+product offering, Product X. That Contributor is then a Commercial
+Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance
+claims and warranties are such Commercial Contributor&apos;s responsibility
+alone. Under this section, the Commercial Contributor would have
+to defend claims against the other Contributors related to those
+performance claims and warranties, and if a court requires any
+other Contributor to pay any damages as a result, the Commercial
+Contributor must pay those damages.
+5. NO WARRANTY
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM
+IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS
+OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
+ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
+OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and
+distributing the Program and assumes all risks associated with
+its exercise of rights under this Agreement , including but not
+limited to the risks and costs of program errors, compliance
+with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations.
+6. DISCLAIMER OF LIABILITY
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
+NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE
+OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY
+OF SUCH DAMAGES.
+7. GENERAL
+If any provision of this Agreement is invalid or unenforceable
+under applicable law, it shall not affect the validity or enforceability
+of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be
+reformed to the minimum extent necessary to make such provision
+valid and enforceable.
+If Recipient institutes patent litigation against any entity
+(including a cross-claim or counterclaim in a lawsuit) alleging
+that the Program itself (excluding combinations of the Program
+with other software or hardware) infringes such Recipient&apos;s patent(s),
+then such Recipient&apos;s rights granted under Section 2(b) shall
+terminate as of the date such litigation is filed.
+All Recipient&apos;s rights under this Agreement shall terminate if
+it fails to comply with any of the material terms or conditions
+of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If
+all Recipient&apos;s rights under this Agreement terminate, Recipient
+agrees to cease use and distribution of the Program as soon as
+reasonably practicable. However, Recipient&apos;s obligations under
+this Agreement and any licenses granted by Recipient relating
+to the Program shall continue and survive.
+Everyone is permitted to copy and distribute copies of this Agreement,
+but in order to avoid inconsistency the Agreement is copyrighted
+and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including
+revisions) of this Agreement from time to time. No one other
+than the Agreement Steward has the right to modify this Agreement.
+The Eclipse Foundation is the initial Agreement Steward. The
+Eclipse Foundation may assign the responsibility to serve as
+the Agreement Steward to a suitable separate entity. Each new
+version of the Agreement will be given a distinguishing version
+number. The Program (including Contributions) may always be distributed
+subject to the version of the Agreement under which it was received.
+In addition, after a new version of the Agreement is published,
+Contributor may elect to distribute the Program (including its
+Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights
+or licenses to the intellectual property of any Contributor under
+this Agreement, whether expressly, by implication, estoppel or
+otherwise. All rights in the Program not expressly granted under
+this Agreement are reserved.
+This Agreement is governed by the laws of the State of New York
+and the intellectual property laws of the United States of America.
+No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose.
+Each party waives its rights to a jury trial in any resulting
+litigation.
+ </license>
+
+ <requires>
+ <import plugin="org.eclipse.core.runtime"/>
+ <import plugin="org.eclipse.m2m.atl.engine"/>
+ <import plugin="org.eclipse.core.resources"/>
+ <import plugin="org.eclipse.jdt.core"/>
+ <import plugin="org.eclipse.jdt.core.manipulation"/>
+ <import plugin="org.eclipse.emf.common"/>
+ <import plugin="org.eclipse.ui"/>
+ <import plugin="org.eclipse.m2m.atl.dsls"/>
+ <import plugin="org.eclipse.emf.ecore"/>
+ <import plugin="org.eclipse.emf.ecore.xmi"/>
+ <import plugin="org.eclipse.m2m.atl.engine.vm"/>
+ <import plugin="org.eclipse.m2m.atl.dsls" version="0.0.1" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.jface.text"/>
+ <import plugin="org.eclipse.ui.editors"/>
+ <import plugin="org.eclipse.ui.workbench.texteditor"/>
+ <import plugin="org.eclipse.ui.ide"/>
+ <import plugin="org.eclipse.emf.edit.ui"/>
+ <import plugin="org.eclipse.m2m.atl.ocl.core"/>
+ </requires>
+
+ <plugin
+ id="org.eclipse.gmt.tcs.builder"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.gmt.tcs.wizard"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.gmt.tcs"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.gmt.tcs.actions"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.gmt.tcs.dsls"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.gmt.tcs.emfresource"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.gmt.tcs.metadata"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.gmt.tcs.extractor"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.gmt.tcs.injector"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.am3.tools.tge"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/plugins/org.eclipse.gmt.tcs-feature/license.html b/plugins/org.eclipse.gmt.tcs-feature/license.html
new file mode 100644
index 0000000..be33262
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs-feature/license.html
@@ -0,0 +1,319 @@
+<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="ProgId" content="Word.Document">
+<meta name="Generator" content="Microsoft Word 9">
+<meta name="Originator" content="Microsoft Word 9">
+<link rel="File-List" href="http://www.eclipse.org/legal/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml"><title>Eclipse Public License - Version 1.0</title><!--[if gte mso 9]><xml>
+ <o:DocumentProperties>
+ <o:Revision>2</o:Revision>
+ <o:TotalTime>3</o:TotalTime>
+ <o:Created>2004-03-05T23:03:00Z</o:Created>
+ <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
+ <o:Pages>4</o:Pages>
+ <o:Words>1626</o:Words>
+ <o:Characters>9270</o:Characters>
+ <o:Lines>77</o:Lines>
+ <o:Paragraphs>18</o:Paragraphs>
+ <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
+ <o:Version>9.4402</o:Version>
+ </o:DocumentProperties>
+</xml><![endif]--><!--[if gte mso 9]><xml>
+ <w:WordDocument>
+ <w:TrackRevisions/>
+ </w:WordDocument>
+</xml><![endif]-->
+
+
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {font-family:Tahoma;
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+ font-family:Tahoma;
+ mso-fareast-font-family:"Times New Roman";}
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style></head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"><o:p></o:p></p>
+
+</div>
+
+</body></html> \ No newline at end of file
diff --git a/plugins/org.eclipse.gmt.tcs-feature/license.txt b/plugins/org.eclipse.gmt.tcs-feature/license.txt
new file mode 100644
index 0000000..bc1ccc7
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs-feature/license.txt
@@ -0,0 +1,87 @@
+Eclipse Public License - v 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
+b) in the case of each subsequent Contributor:
+
+i) changes to the Program, and
+
+ii) additions to the Program;
+
+where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
+
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
+
+"Program" means the Contributions distributed in accordance with this Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
+
+2. GRANT OF RIGHTS
+
+a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
+
+b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
+
+c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
+
+d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
+
+a) it complies with the terms and conditions of this Agreement; and
+
+b) its license agreement:
+
+i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
+
+ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
+
+iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
+
+iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
+
+When the Program is made available in source code form:
+
+a) it must be made available under this Agreement; and
+
+b) a copy of this Agreement must be included with each copy of the Program.
+
+Contributors may not remove or alter any copyright notices contained within the Program.
+
+Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
+
+4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
+
+6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
+
+If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
+
+This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.
+
diff --git a/plugins/org.eclipse.gmt.tcs-feature/modeling32.png b/plugins/org.eclipse.gmt.tcs-feature/modeling32.png
new file mode 100644
index 0000000..6b08de2
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs-feature/modeling32.png
Binary files differ
diff --git a/plugins/org.eclipse.gmt.tcs-feature/rootfiles/epl-v10.html b/plugins/org.eclipse.gmt.tcs-feature/rootfiles/epl-v10.html
new file mode 100644
index 0000000..b15cf1a
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs-feature/rootfiles/epl-v10.html
@@ -0,0 +1,304 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel=File-List
+href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head>
+
+<body lang="EN-US" style='tab-interval:.5in'>
+
+<div class=Section1>
+
+<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear=left>
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+changes to the Program, and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+additions to the Program;</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span
+style='color:red'> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+its license agreement:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
+
+<p><span style='font-size:10.0pt'>When the Program is made available in source
+code form:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it must be made available under this Agreement; and </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style='font-size:10.0pt'>Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor (&quot;Commercial
+Contributor&quot;) hereby agrees to defend and indemnify every other
+Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
+costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style='font-size:10.0pt'>For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
+
+<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class=MsoNormal></p>
+
+</div>
+
+</body>
+
+</html> \ No newline at end of file
diff --git a/plugins/org.eclipse.gmt.tcs-feature/rootfiles/notice.html b/plugins/org.eclipse.gmt.tcs-feature/rootfiles/notice.html
new file mode 100644
index 0000000..901c1c0
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs-feature/rootfiles/notice.html
@@ -0,0 +1,79 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head>
+
+<body lang="EN-US" link=blue vlink=purple>
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
+ modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java<sup>TM</sup> ARchive) in a directory named &quot;plugins&quot;.</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
+Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body>
+</html>
diff --git a/plugins/org.eclipse.gmt.tcs-feature/tcs32.png b/plugins/org.eclipse.gmt.tcs-feature/tcs32.png
new file mode 100644
index 0000000..33c9015
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs-feature/tcs32.png
Binary files differ
diff --git a/plugins/org.eclipse.gmt.tcs.actions/.classpath b/plugins/org.eclipse.gmt.tcs.actions/.classpath
new file mode 100644
index 0000000..f1b3ad8
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.actions/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.gmt.tcs.actions/.project b/plugins/org.eclipse.gmt.tcs.actions/.project
new file mode 100644
index 0000000..67a92b1
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.actions/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.gmt.tcs.actions</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.gmt.tcs.actions/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.gmt.tcs.actions/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..f1bc370
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.actions/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+#Sun Mar 30 23:05:33 CEST 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.source=1.3
diff --git a/plugins/org.eclipse.gmt.tcs.actions/META-INF/MANIFEST.MF b/plugins/org.eclipse.gmt.tcs.actions/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..01ccc1f
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.actions/META-INF/MANIFEST.MF
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.gmt.tcs.actions;singleton:=true
+Bundle-Version: 0.8.0
+Bundle-Activator: org.eclipse.gmt.tcs.actions.Activator
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.gmt.tcs.metadata,
+ org.eclipse.m2m.atl.engine
+Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Eclipse-LazyStart: true
diff --git a/plugins/org.eclipse.gmt.tcs.actions/about.html b/plugins/org.eclipse.gmt.tcs.actions/about.html
new file mode 100644
index 0000000..7cc291c
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.actions/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>January 21, 2008</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/plugins/org.eclipse.gmt.tcs.actions/bin/org/eclipse/gmt/tcs/actions/Activator.class b/plugins/org.eclipse.gmt.tcs.actions/bin/org/eclipse/gmt/tcs/actions/Activator.class
new file mode 100644
index 0000000..be216bb
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.actions/bin/org/eclipse/gmt/tcs/actions/Activator.class
Binary files differ
diff --git a/plugins/org.eclipse.gmt.tcs.actions/bin/org/eclipse/gmt/tcs/actions/ExtractAction.class b/plugins/org.eclipse.gmt.tcs.actions/bin/org/eclipse/gmt/tcs/actions/ExtractAction.class
new file mode 100644
index 0000000..de4d2f5
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.actions/bin/org/eclipse/gmt/tcs/actions/ExtractAction.class
Binary files differ
diff --git a/plugins/org.eclipse.gmt.tcs.actions/bin/org/eclipse/gmt/tcs/actions/InjectAction.class b/plugins/org.eclipse.gmt.tcs.actions/bin/org/eclipse/gmt/tcs/actions/InjectAction.class
new file mode 100644
index 0000000..1c10581
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.actions/bin/org/eclipse/gmt/tcs/actions/InjectAction.class
Binary files differ
diff --git a/plugins/org.eclipse.gmt.tcs.actions/bin/org/eclipse/gmt/tcs/actions/StartUp.class b/plugins/org.eclipse.gmt.tcs.actions/bin/org/eclipse/gmt/tcs/actions/StartUp.class
new file mode 100644
index 0000000..18442f3
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.actions/bin/org/eclipse/gmt/tcs/actions/StartUp.class
Binary files differ
diff --git a/plugins/org.eclipse.gmt.tcs.actions/build.properties b/plugins/org.eclipse.gmt.tcs.actions/build.properties
new file mode 100644
index 0000000..3f16b02
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.actions/build.properties
@@ -0,0 +1,12 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ plugin.properties
+src.includes = src/,\
+ .classpath,\
+ .settings/,\
+ .project,\
+ build.properties,\
+ about.html
diff --git a/plugins/org.eclipse.gmt.tcs.actions/plugin.properties b/plugins/org.eclipse.gmt.tcs.actions/plugin.properties
new file mode 100644
index 0000000..0a23f59
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.actions/plugin.properties
@@ -0,0 +1,3 @@
+# NLS_MESSAGEFORMAT_VAR
+pluginName=TCS Actions (Incubation)
+providerName=Eclipse.org
diff --git a/plugins/org.eclipse.gmt.tcs.actions/plugin.xml b/plugins/org.eclipse.gmt.tcs.actions/plugin.xml
new file mode 100644
index 0000000..d6a4df9
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.actions/plugin.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.popupMenus">
+ <objectContribution
+ adaptable="false"
+ id="org.eclipse.gmt.tcs.actions.Projections"
+ nameFilter="*"
+ objectClass="org.eclipse.core.resources.IFile">
+ <action
+ class="org.eclipse.gmt.tcs.actions.InjectAction"
+ enablesFor="1"
+ id="org.eclipse.gmt.tcs.actions.Injection"
+ label="Inject to EMF model">
+ </action>
+ <action
+ class="org.eclipse.gmt.tcs.actions.ExtractAction"
+ enablesFor="1"
+ id="org.eclipse.gmt.tcs.actions.Extraction"
+ label="Extract EMF model to file">
+ </action>
+ </objectContribution>
+ </extension>
+ <extension
+ point="org.eclipse.ui.startup">
+ <startup
+ class="org.eclipse.gmt.tcs.actions.StartUp">
+ </startup>
+ </extension>
+</plugin>
diff --git a/plugins/org.eclipse.gmt.tcs.actions/src/org/eclipse/gmt/tcs/actions/Activator.java b/plugins/org.eclipse.gmt.tcs.actions/src/org/eclipse/gmt/tcs/actions/Activator.java
new file mode 100644
index 0000000..ba28899
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.actions/src/org/eclipse/gmt/tcs/actions/Activator.java
@@ -0,0 +1,63 @@
+/**
+ * Copyright (c) 2008 INRIA.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * INRIA - initial API and implementation
+ *
+ * $$Id: Activator.java,v 1.1 2008/04/01 18:31:03 fjouault Exp $$
+ */
+package org.eclipse.gmt.tcs.actions;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ * @author Frédéric Jouault
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.gmt.tcs.actions";
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/plugins/org.eclipse.gmt.tcs.actions/src/org/eclipse/gmt/tcs/actions/ExtractAction.java b/plugins/org.eclipse.gmt.tcs.actions/src/org/eclipse/gmt/tcs/actions/ExtractAction.java
new file mode 100644
index 0000000..ab70dfa
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.actions/src/org/eclipse/gmt/tcs/actions/ExtractAction.java
@@ -0,0 +1,114 @@
+/**
+ * Copyright (c) 2008 INRIA.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * INRIA - initial API and implementation
+ *
+ * $$Id: ExtractAction.java,v 1.3 2008/04/08 15:11:57 fjouault Exp $$
+ */
+package org.eclipse.gmt.tcs.actions;
+
+import java.io.BufferedInputStream;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.gmt.tcs.metadata.ASMModelFactory;
+import org.eclipse.gmt.tcs.metadata.Language;
+import org.eclipse.gmt.tcs.metadata.LanguageRegistry;
+import org.eclipse.gmt.tcs.metadata.ModelFactory;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.m2m.atl.engine.AtlEMFModelHandler;
+import org.eclipse.m2m.atl.engine.AtlModelHandler;
+import org.eclipse.m2m.atl.engine.vm.nativelib.ASMModel;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
+
+/**
+ *
+ * @author Frédéric Jouault
+ *
+ */
+public class ExtractAction implements IObjectActionDelegate {
+
+ private IStructuredSelection selection;
+
+ public ExtractAction() {
+ // TODO Auto-generated constructor stub
+ }
+
+ public void setActivePart(IAction action, IWorkbenchPart targetPart) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void run(IAction action) {
+ IFile file = getSelectedElement();
+ Language language = getLanguage();
+ AtlEMFModelHandler amh = (AtlEMFModelHandler)AtlModelHandler.getDefault(AtlModelHandler.AMH_EMF);
+ ModelFactory factory = ASMModelFactory.getDefault();
+ ASMModel metamodel = (ASMModel)language.getMetamodel(factory);
+ try {
+ BufferedInputStream in = new BufferedInputStream(file.getContents());
+ ASMModel model = amh.loadModel("model.xmi", metamodel, in);
+ in.close();
+ Map params = new HashMap();
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ language.extract(factory, model, out, params);
+ IFile outFile = file.getParent().getFile(new Path(file.getName() + "." + language.getExtension()));
+ if(outFile.exists()) {
+ outFile.setContents(new ByteArrayInputStream(out.toByteArray()), IFile.FORCE + IFile.DERIVED, null);
+ } else {
+ outFile.create(new ByteArrayInputStream(out.toByteArray()), IFile.FORCE + IFile.DERIVED, null);
+ }
+ } catch(IOException e) {
+ throw new RuntimeException("Error extracting " + file.toString(), e);
+ } catch (CoreException e) {
+ throw new RuntimeException("Error extracting " + file.toString(), e);
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void selectionChanged(IAction action, ISelection selection) {
+ this.selection = (IStructuredSelection)selection;
+ Language language = getLanguage();
+ if(language != null) {
+ action.setText("Extract " + language.getName() + " model to " + language.getName() + " file (." + language.getExtension() + ")");
+ action.setEnabled(true);
+ } else {
+ action.setEnabled(false);
+ action.setText("Cannot extract");
+ }
+ }
+
+ private Language getLanguage() {
+ IFile file = getSelectedElement();
+ if(file != null) {
+ String fileNameParts[] = getSelectedElement().getName().split("\\.");
+ if(fileNameParts.length > 2) {
+ int last = fileNameParts.length - 1;
+ if("ecore".equals(fileNameParts[last]) || "xmi".equals(fileNameParts[last])) {
+ String formatExtension = fileNameParts[last - 1];
+ Language language = LanguageRegistry.getDefault().getLanguage(formatExtension);
+ return language;
+ }
+ }
+ }
+ return null;
+ }
+ private IFile getSelectedElement() {
+ return (IFile)selection.getFirstElement();
+ }
+}
diff --git a/plugins/org.eclipse.gmt.tcs.actions/src/org/eclipse/gmt/tcs/actions/InjectAction.java b/plugins/org.eclipse.gmt.tcs.actions/src/org/eclipse/gmt/tcs/actions/InjectAction.java
new file mode 100644
index 0000000..3aa323a
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.actions/src/org/eclipse/gmt/tcs/actions/InjectAction.java
@@ -0,0 +1,78 @@
+/**
+ * Copyright (c) 2008 INRIA.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * INRIA - initial API and implementation
+ *
+ * $$Id: InjectAction.java,v 1.3 2008/04/08 15:11:57 fjouault Exp $$
+ */
+package org.eclipse.gmt.tcs.actions;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.gmt.tcs.metadata.ASMModelFactory;
+import org.eclipse.gmt.tcs.metadata.Language;
+import org.eclipse.gmt.tcs.metadata.LanguageRegistry;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.m2m.atl.dsls.textsource.IFileTextSource;
+import org.eclipse.m2m.atl.engine.AtlModelHandler;
+import org.eclipse.m2m.atl.engine.vm.nativelib.ASMModel;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
+
+/**
+ *
+ * @author Frédéric Jouault
+ *
+ */
+public class InjectAction implements IObjectActionDelegate {
+
+ private IStructuredSelection selection;
+
+ public InjectAction() {
+ // TODO Auto-generated constructor stub
+ }
+
+ public void setActivePart(IAction action, IWorkbenchPart targetPart) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void run(IAction action) {
+ IFile file = getSelectedElement();
+ Language language = LanguageRegistry.getDefault().getLanguage(getSelectedElement().getFileExtension());
+ AtlModelHandler amh = AtlModelHandler.getDefault(AtlModelHandler.AMH_EMF);
+ Map params = new HashMap();
+ ASMModel model = (ASMModel)language.inject(ASMModelFactory.getDefault(), null, new IFileTextSource(file), params);
+ amh.saveModel(model, file.getProjectRelativePath().toString() + ".xmi", file.getProject());
+ }
+
+ public void selectionChanged(IAction action, ISelection selection) {
+ this.selection = (IStructuredSelection)selection;
+ IFile file = getSelectedElement();
+ if(file != null) {
+ Language language = LanguageRegistry.getDefault().getLanguage(file.getFileExtension());
+ if(language != null) {
+ action.setText("Inject " + language.getName() + " file to " + language.getName() + " model");
+ action.setEnabled(true);
+ } else {
+ action.setEnabled(false);
+ action.setText("Cannot inject");
+ }
+ } else {
+ action.setEnabled(false);
+ }
+ }
+
+ private IFile getSelectedElement() {
+ return (IFile)selection.getFirstElement();
+ }
+}
diff --git a/plugins/org.eclipse.gmt.tcs.actions/src/org/eclipse/gmt/tcs/actions/StartUp.java b/plugins/org.eclipse.gmt.tcs.actions/src/org/eclipse/gmt/tcs/actions/StartUp.java
new file mode 100644
index 0000000..4b6f903
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.actions/src/org/eclipse/gmt/tcs/actions/StartUp.java
@@ -0,0 +1,31 @@
+/**
+ * Copyright (c) 2008 INRIA.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * INRIA - initial API and implementation
+ *
+ * $Id: StartUp.java,v 1.1 2008/04/02 02:08:29 fjouault Exp $
+ */
+package org.eclipse.gmt.tcs.actions;
+
+import org.eclipse.ui.IStartup;
+
+/**
+ * @author Frédéric Jouault
+ *
+ */
+public class StartUp implements IStartup {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IStartup#earlyStartup()
+ */
+ public void earlyStartup() {
+ // We only need startup to make sure this plugin
+ // is activated, so that the actions can disable themselves.
+ }
+
+}
diff --git a/plugins/org.eclipse.gmt.tcs.builder/.classpath b/plugins/org.eclipse.gmt.tcs.builder/.classpath
new file mode 100644
index 0000000..731ea5f
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.gmt.tcs.builder/.project b/plugins/org.eclipse.gmt.tcs.builder/.project
new file mode 100644
index 0000000..7b79c57
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.gmt.tcs.builder</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.gmt.tcs.builder/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.gmt.tcs.builder/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..2d82a4b
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#Thu Mar 27 22:18:25 CET 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.source=1.3
diff --git a/plugins/org.eclipse.gmt.tcs.builder/META-INF/MANIFEST.MF b/plugins/org.eclipse.gmt.tcs.builder/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..eabf0b6
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/META-INF/MANIFEST.MF
@@ -0,0 +1,23 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.gmt.tcs.builder;singleton:=true
+Bundle-Version: 0.8.0
+Bundle-Activator: org.eclipse.gmt.tcs.builder.Activator
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.m2m.atl.engine,
+ org.eclipse.core.resources,
+ org.eclipse.jdt.core,
+ org.eclipse.jdt.core.manipulation,
+ org.eclipse.emf.common,
+ org.eclipse.ui,
+ org.eclipse.gmt.tcs.dsls,
+ org.eclipse.gmt.tcs.metadata
+Export-Package: org.eclipse.gmt.tcs.builder,
+ org.eclipse.gmt.tcs.builder.ct,
+ org.eclipse.gmt.tcs.builder.ct.definition,
+ org.eclipse.gmt.tcs.builder.ct.usage
+Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.gmt.tcs.builder/about.html b/plugins/org.eclipse.gmt.tcs.builder/about.html
new file mode 100644
index 0000000..7cc291c
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>January 21, 2008</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/plugins/org.eclipse.gmt.tcs.builder/build.properties b/plugins/org.eclipse.gmt.tcs.builder/build.properties
new file mode 100644
index 0000000..10a7ede
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/build.properties
@@ -0,0 +1,14 @@
+source.. = src/
+output.. = bin/
+bin.includes = .,\
+ META-INF/,\
+ plugin.xml,\
+ resources/templates/,\
+ plugin.properties
+src.includes = src/,\
+ build.properties,\
+ .project,\
+ .classpath,\
+ .settings/,\
+ schema/,\
+ about.html
diff --git a/plugins/org.eclipse.gmt.tcs.builder/plugin.properties b/plugins/org.eclipse.gmt.tcs.builder/plugin.properties
new file mode 100644
index 0000000..d11b84f
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/plugin.properties
@@ -0,0 +1,3 @@
+# NLS_MESSAGEFORMAT_VAR
+pluginName=TCS Builder (Incubation)
+providerName=Eclipse.org
diff --git a/plugins/org.eclipse.gmt.tcs.builder/plugin.xml b/plugins/org.eclipse.gmt.tcs.builder/plugin.xml
new file mode 100644
index 0000000..e81b0c6
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/plugin.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+ <extension-point id="parserGenerator" name="Parser generator" schema="schema/parserGenerator.exsd"/>
+ <extension
+ id="Builder"
+ name="TCS builder"
+ point="org.eclipse.core.resources.builders">
+ <builder>
+ <run class="org.eclipse.gmt.tcs.builder.TCSBuilder"/>
+ </builder>
+ </extension>
+
+</plugin>
diff --git a/plugins/org.eclipse.gmt.tcs.builder/resources/templates/MANIFEST.MF b/plugins/org.eclipse.gmt.tcs.builder/resources/templates/MANIFEST.MF
new file mode 100644
index 0000000..66ec980
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/resources/templates/MANIFEST.MF
@@ -0,0 +1,6 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: ${dsl.name} Language Support Plug-in
+Bundle-SymbolicName: org.eclipse.gmt.tcs.language.${dsl.name};singleton:=true
+Bundle-Version: 1.0.0
+Require-Bundle: org.eclipse.gmt.tcs.metadata;bundle-version="1.0.0"
diff --git a/plugins/org.eclipse.gmt.tcs.builder/resources/templates/annotations.ann b/plugins/org.eclipse.gmt.tcs.builder/resources/templates/annotations.ann
new file mode 100644
index 0000000..4cd8ae0
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/resources/templates/annotations.ann
@@ -0,0 +1,21 @@
+annotate ${dsl.name} {
+ annotate ${dsl.name} with
+ nsURI='${dsl.name}',
+ nsPrefix='${dsl.name}';
+
+ annotate PrimitiveTypes with
+ nsURI='${dsl.name}-PrimitiveTypes',
+ nsPrefix='pt';
+
+ annotate "PrimitiveTypes::Boolean" with
+ instanceClassName='boolean';
+
+ annotate "PrimitiveTypes::Double" with
+ instanceClassName='double';
+
+ annotate "PrimitiveTypes::Integer" with
+ instanceClassName='int';
+
+ annotate "PrimitiveTypes::String" with
+ instanceClassName='java.lang.String';
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.gmt.tcs.builder/resources/templates/build.properties b/plugins/org.eclipse.gmt.tcs.builder/resources/templates/build.properties
new file mode 100644
index 0000000..4130129
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/resources/templates/build.properties
@@ -0,0 +1,5 @@
+dsl.name=${dsl.name}
+dsl.ext=${dsl.ext}
+syntax.jar.source.remove=true
+plugin.create=true
+scripts.ant.create=true \ No newline at end of file
diff --git a/plugins/org.eclipse.gmt.tcs.builder/resources/templates/extractor.xml b/plugins/org.eclipse.gmt.tcs.builder/resources/templates/extractor.xml
new file mode 100644
index 0000000..e0c84de
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/resources/templates/extractor.xml
@@ -0,0 +1,56 @@
+<!--
+ Auto-generated ant script that extracts a <file>.${dsl.ext}.xmi into <file>.${dsl.ext}.xmi.${dsl.ext}
+ It may be used in different ways:
+ - As an example to write your own ant scripts that do further processing
+ (e.g., injections, ATL transformations).
+ - Called from another script
+ - From the "AM3 Resource Navigator" view, and if the corresponding megamodel
+ (megamodel.xmi) has been registered (via right-click action "Add megamodel"):
+ by right-click action "Extract ${dsl.name} Model to ${dsl.name} File" on files
+ with extension "${dsl.ext}.xmi".
+
+ Notes:
+ - Property "MUri" is initialized by AM3 when invoked as a right-click injection
+ action. In any other case (e.g., calling the ant script, copy-paste-modify), property
+ "MUri" has to be defined explicitely.
+ - This script creates uses extension "${dsl.ext}.xmi.${dsl.ext}" instead of
+ simply "${dsl.ext}" so that inadvertendly erasing a source file is less likely.
+ - You may want to change some of the default options of the extractor (e.g., "indentString").
+-->
+<project name="${dsl.name}Extractor" default="extraction">
+ <property name="MUri" value="/${dsl.name}/Samples/Test1.${dsl.ext}.xmi"/>
+
+ <target name="extraction">
+ <!-- Loading ${dsl.name} metamodel -->
+ <am3.loadModel modelHandler="EMF" name="${dsl.name}" metamodel="MOF" path="${mm.location}"/>
+
+ <!-- Loading ${dsl.name} model -->
+ <am3.loadModel modelHandler="EMF" name="my${dsl.name}" metamodel="${dsl.name}" path="${MUri}"/>
+
+ <!-- Loading TCS metamodel -->
+ <am3.loadModel modelHandler="EMF" name="TCS" metamodel="MOF" path="/AMMACore/TCS/Metamodel/TCS.ecore"/>
+
+ <!-- Loading ${dsl.name}.tcs model -->
+ <am3.loadModel modelHandler="EMF" name="${dsl.name}.tcs" metamodel="TCS" path="${syntax.path}/${syntax.tcs.filename}">
+ <injector name="ebnf">
+ <param name="name" value="TCS"/>
+ <param name="parserGenerator" value="antlr3"/>
+ </injector>
+ </am3.loadModel>
+
+ <!-- Saving ${dsl.name} model -->
+ <am3.saveModel model="my${dsl.name}" path="${MUri}.${dsl.ext}">
+ <extractor name="ebnf">
+ <param name="format" value="${dsl.name}.tcs"/>
+
+ <param name="indentString" value="&#9;"/>
+ <param name="identEsc" value="&quot;"/>
+ <param name="stringDelim" value="&apos;"/>
+ <param name="decimalFormat" value="0.##############"/>
+
+ <param name="serializeComments" value="true"/>
+ </extractor>
+ </am3.saveModel>
+ </target>
+
+</project>
diff --git a/plugins/org.eclipse.gmt.tcs.builder/resources/templates/injector.xml b/plugins/org.eclipse.gmt.tcs.builder/resources/templates/injector.xml
new file mode 100644
index 0000000..e2c544f
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/resources/templates/injector.xml
@@ -0,0 +1,38 @@
+<!--
+ Auto-generated ant script that injects a <file>.${dsl.ext} into <file>.${dsl.ext}.xmi
+ It may be used in different ways:
+ - As an example to write your own ant scripts that do further processing
+ (e.g., ATL transformations, extractions).
+ - Called from another script
+ - From the "AM3 Resource Navigator" view, and if the corresponding megamodel
+ (megamodel.xmi) has been registered (via right-click action "Add megamodel"):
+ by right-click action "Inject ${dsl.name} File to ${dsl.name} Model" on files
+ with extension "${dsl.ext}".
+
+ Note that property "MUri" is initialized by AM3 when invoked as a right-click injection
+ action. In any other case (e.g., calling the ant script, copy-paste-modify), property
+ "MUri" has to be defined explicitely.
+-->
+<project name="${dsl.name}Injector" default="injection">
+ <property name="MUri" value="/${dsl.name}/Samples/Test1.${dsl.ext}"/>
+
+ <target name="injection">
+ <!-- Loading ${dsl.name} metamodel -->
+ <am3.loadModel modelHandler="EMF" name="${dsl.name}" metamodel="MOF" path="${mm.location}"/>
+
+ <!-- Loading ${dsl.name} model -->
+ <am3.loadModel modelHandler="EMF" name="my${dsl.name}" metamodel="${dsl.name}" path="${MUri}">
+ <injector name="ebnf">
+ <param name="name" value="${dsl.name}"/>
+ <param name="parserGenerator" value="antlr3"/>
+ <classpath>
+ <pathelement location="Syntax/${syntax.jar.filename}"/>
+ </classpath>
+ </injector>
+ </am3.loadModel>
+
+ <!-- Saving ${dsl.name} model -->
+ <am3.saveModel model="my${dsl.name}" path="${MUri}.xmi"/>
+ </target>
+
+</project>
diff --git a/plugins/org.eclipse.gmt.tcs.builder/resources/templates/metamodel.km3 b/plugins/org.eclipse.gmt.tcs.builder/resources/templates/metamodel.km3
new file mode 100644
index 0000000..b690a74
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/resources/templates/metamodel.km3
@@ -0,0 +1,32 @@
+-- @name ${dsl.name}
+-- @version 1.0
+-- @authors ${author}
+-- @date ${date}
+-- @description ${description}
+package ${dsl.name} {
+
+ -- Every class should extend LocatedElement, directly or indirectly.
+ -- This is a technical constraint to support text-to-model traceability.
+ abstract class LocatedElement {
+ attribute location[0-1] : String;
+ attribute commentsBefore[*] ordered : String;
+ attribute commentsAfter[*] ordered : String;
+ }
+
+-- BEGIN Language-specific classes (replace sample contents)
+ class Root extends LocatedElement {
+ reference elements[*] ordered container : Element;
+ }
+
+ class Element extends LocatedElement {
+ attribute name : String;
+ }
+-- END Language-specific classes
+}
+
+package PrimitiveTypes {
+ datatype Boolean;
+ datatype Double;
+ datatype Integer;
+ datatype String;
+}
diff --git a/plugins/org.eclipse.gmt.tcs.builder/resources/templates/plugin.xml b/plugins/org.eclipse.gmt.tcs.builder/resources/templates/plugin.xml
new file mode 100644
index 0000000..67e10fa
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/resources/templates/plugin.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+ <extension
+ point="org.eclipse.gmt.tcs.metadata.language">
+ <language
+ editor="resources/${dsl.name}-Editor.xmi"
+ extension="${dsl.ext}"
+ metamodel="resources/${dsl.name}.ecore"
+ name="${dsl.name}"
+ outline="resources/${dsl.name}-Outline.xmi"
+ syntax="resources/${dsl.name}-TCS.xmi"
+ parser="resources/${dsl.name}-parser.jar">
+ </language>
+ </extension>
+
+</plugin>
diff --git a/plugins/org.eclipse.gmt.tcs.builder/resources/templates/syntax.tcs b/plugins/org.eclipse.gmt.tcs.builder/resources/templates/syntax.tcs
new file mode 100644
index 0000000..0c3a43b
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/resources/templates/syntax.tcs
@@ -0,0 +1,209 @@
+-- @name ${dsl.name}
+-- @version 1.0
+-- @authors ${author}
+-- @date ${date}
+-- @description ${description}
+
+-- The different sections of a TCS model have been enclosed between BEGIN and END
+-- comments below. Additional information is provided below each BEGIN comment.
+-- The main sections of interest are "Class templates", and
+-- "Operator table" (the latter only for DSLs using operators).
+syntax ${dsl.name} {
+
+-- BEGIN Primitive templates
+-- Specifies representation of primitive types.
+-- Only needs modification when default lexer is not satisfactory.
+-- Generally modified along with the lexer.
+ primitiveTemplate identifier for String default using NAME:
+ value = "%token%";
+
+ primitiveTemplate stringSymbol for String using STRING:
+ value = "ei.unescapeString(%token%, 1)",
+ serializer="'\'' + %value%.toCString() + '\''";
+
+ primitiveTemplate integerSymbol for Integer default using INT:
+ value = "Integer.valueOf(%token%)";
+
+ primitiveTemplate floatSymbol for Double default using FLOAT:
+ value = "Double.valueOf(%token%)";
+-- END Primitive templates
+
+-- BEGIN Class templates
+-- Specifies representation of classes.
+-- This is the main section to work on.
+ template Root main
+ : "{" elements{separator = ","} "}"
+ ;
+
+ template Element
+ : name
+ ;
+-- END Class templates
+
+-- BEGIN Special symbols
+-- Possible modifications:
+-- - Addition of new symbols.
+-- - Modification of spaces information.
+-- - Removal of unused symbols so that using these symbols results in lexical
+-- error rather than parsing error.
+ symbols {
+ lsquare = "[";
+ rsquare = "]" : rightSpace;
+ excl = "!";
+ coma = "," : leftNone, rightSpace;
+ lparen = "(";
+ rparen = ")" : leftNone, rightSpace;
+ lcurly = "{" : leftSpace;
+ rcurly = "}" : leftNone, rightSpace;
+ semi = ";" : leftNone, rightSpace;
+ colon = ":" : leftSpace, rightSpace;
+ pipe = "|" : leftSpace, rightSpace;
+ sharp = "#" : leftSpace;
+ qmark = "?";
+ coloncolon = "::" : leftNone, rightNone;
+
+ -- operator symbols
+ point = "." : leftNone;
+ rarrow = "->" : leftNone;
+ minus = "-" : leftSpace, rightSpace;
+ star = "*" : leftSpace, rightSpace;
+ slash = "/" : leftSpace, rightSpace;
+ plus = "+" : leftSpace, rightSpace;
+ eq = "=" : leftSpace, rightSpace;
+ gt = ">" : leftSpace, rightSpace;
+ lt = "<" : leftSpace, rightSpace;
+ ge = ">=" : leftSpace, rightSpace;
+ le = "<=" : leftSpace, rightSpace;
+ ne = "<>" : leftSpace, rightSpace;
+ larrow = "<-" : leftSpace, rightSpace;
+ }
+-- END Special symbols
+
+-- BEGIN Operator table
+-- Defines all operators with their priority, arity, and associativity.
+-- All defined operators must be used in operator templates.
+
+-- Specify operator table(s) here if necessary.
+
+-- END Operator table
+
+
+-- BEGIN Lexer
+-- Specifies the lexical entities.
+-- Only needs modification when default lexer is not satisfactory.
+-- Generally modified along with Primitive templates.
+ token COMMENT : endOfLine(start = "--");
+ token STRING : multiLine(start = "\'", end = "\'", esc = "\\");
+
+ lexer = "
+%options testLiterals = false;
+
+NL
+ : ( '\\r' '\\n'
+ | '\\n' '\\r' //Improbable
+ | '\\r'
+ | '\\n'
+ )
+ {newline();}
+ ;
+
+WS
+ : ( ' '
+ | '\\t'
+ )
+ ;
+
+%protected
+DIGIT
+ : '0'..'9'
+ ;
+
+%protected
+ALPHA
+ : 'a'..'z'
+ | 'A'..'Z'
+ | '_'
+ //For Unicode compatibility (from 0000 to 00ff)
+ | '\\u00C0' .. '\\u00D6'
+ | '\\u00D8' .. '\\u00F6'
+ | '\\u00F8' .. '\\u00FF'
+ ;
+
+%protected
+SNAME
+%v2 options {
+%v2 testLiterals = true;
+%v2 }
+ : (ALPHA) (ALPHA | DIGIT)*
+;
+
+NAME
+ : (
+%v3 SNAME
+%v2 s:SNAME {if(s.getType() != SNAME) $setType(s.getType());}
+ | '\"'!
+ ( ESC
+ | '\\n' {newline();}
+ | ~('\\\\'|'\\\"'|'\\n')
+ )*
+ '\"'!
+%v3 {setText(ei.unescapeString(getText(), 1));}
+ )
+ ;
+
+INT
+ : (DIGIT)+
+%v2 (('.' DIGIT)=> '.' (DIGIT)+ {$setType(FLOAT);})?
+ ;
+
+%v3 FLOAT : DIGIT+ '.' DIGIT* ;
+
+%protected
+ESC
+ : '\\\\'!
+ ( 'n' %v2{%setText(\"\\n\");}
+ | 'r' %v2{%setText(\"\\r\");}
+ | 't' %v2{%setText(\"\\t\");}
+ | 'b' %v2{%setText(\"\\b\");}
+ | 'f' %v2{%setText(\"\\f\");}
+ | '\"' %v2{%setText(\"\\\"\");}
+ | '\\'' %v2{%setText(\"\\'\");}
+ | '\\\\' %v2{%setText(\"\\\\\");}
+ | (
+ ('0'..'3')
+ (
+%v2 options {
+%v2 warnWhenFollowAmbig = false;
+%v2 }
+ : ('0'..'7')
+ (
+%v2 options {
+%v2 warnWhenFollowAmbig = false;
+%v2 }
+ : '0'..'7'
+ )?
+ )?
+ | ('4'..'7')
+ (
+%v2 options {
+%v2 warnWhenFollowAmbig = false;
+%v2 }
+ : ('0'..'7')
+ )?
+ )
+ {
+%v2 String s = %getText;
+%v2 int i;
+%v2 int ret = 0;
+%v2 String ans;
+%v2 for (i=0; i<s.length(); ++i)
+%v2 ret = ret*8 + s.charAt(i) - '0';
+%v2 ans = String.valueOf((char) ret);
+%v2 %setText(ans);
+ }
+ )
+ ;
+ ";
+-- END Lexer
+
+}
diff --git a/plugins/org.eclipse.gmt.tcs.builder/schema/parserGenerator.exsd b/plugins/org.eclipse.gmt.tcs.builder/schema/parserGenerator.exsd
new file mode 100644
index 0000000..9962b39
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/schema/parserGenerator.exsd
@@ -0,0 +1,109 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.gmt.tcs.builder" xmlns="http://www.w3.org/2001/XMLSchema">
+ <annotation>
+ <appInfo>
+ <meta.schema plugin="org.eclipse.gmt.tcs.builder" id="parserGenerator" name="Parser generator"/>
+ </appInfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appInfo>
+ <meta.element />
+ </appInfo>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="parserGenerator"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute translatable="true"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="parserGenerator">
+ <complexType>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="class" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.gmt.tcs.builder.ParserGenerator"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="since"/>
+ </appInfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="examples"/>
+ </appInfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="apiinfo"/>
+ </appInfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="implementation"/>
+ </appInfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
diff --git a/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/Activator.java b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/Activator.java
new file mode 100644
index 0000000..a77ae46
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/Activator.java
@@ -0,0 +1,64 @@
+/**
+ * Copyright (c) 2007 INRIA.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * INRIA - initial API and implementation
+ *
+ * $Id: Activator.java,v 1.2 2008/06/25 13:02:47 fjouault Exp $
+ */
+package org.eclipse.gmt.tcs.builder;
+
+import org.eclipse.core.runtime.Plugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ * @author Frédéric Jouault
+ *
+ */
+public class Activator extends Plugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.gmt.tcs.builder";
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ParserGenerator.java b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ParserGenerator.java
new file mode 100644
index 0000000..7f87d76
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ParserGenerator.java
@@ -0,0 +1,23 @@
+/**
+ * Copyright (c) 2008 INRIA.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * INRIA - initial API and implementation
+ *
+ * $Id: ParserGenerator.java,v 1.1 2008/06/28 17:15:27 fjouault Exp $
+ */
+package org.eclipse.gmt.tcs.builder;
+
+/**
+ *
+ * @author Frédéric Jouault
+ *
+ */
+public interface ParserGenerator {
+
+ public void generate(String antlrFile, String javaFilesPath, ParserGeneratorErrorListener errorListener);
+}
diff --git a/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ParserGeneratorErrorListener.java b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ParserGeneratorErrorListener.java
new file mode 100644
index 0000000..541ddd0
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ParserGeneratorErrorListener.java
@@ -0,0 +1,27 @@
+/**
+ * Copyright (c) 2008 INRIA.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * INRIA - initial API and implementation
+ *
+ * $Id: ParserGeneratorErrorListener.java,v 1.1 2008/06/28 17:15:27 fjouault Exp $
+ */
+package org.eclipse.gmt.tcs.builder;
+
+/**
+ *
+ * @author Frédéric Jouault
+ *
+ */
+public interface ParserGeneratorErrorListener {
+
+ public void addError(String message, int lineNumber, int charStart, int charEnd);
+
+ public void addInfo(String message, int lineNumber, int charStart, int charEnd);
+
+ public void addWarning(String message, int lineNumber, int charStart, int charEnd);
+}
diff --git a/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ProblemReporter.java b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ProblemReporter.java
new file mode 100644
index 0000000..8280cb3
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ProblemReporter.java
@@ -0,0 +1,26 @@
+/**
+ * Copyright (c) 2007, 2008 INRIA.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * INRIA - initial API and implementation
+ *
+ * $Id: ProblemReporter.java,v 1.3 2008/06/25 13:03:20 fjouault Exp $
+ */
+package org.eclipse.gmt.tcs.builder;
+
+import org.eclipse.m2m.atl.dsls.textsource.TextSource;
+import org.eclipse.m2m.atl.engine.vm.nativelib.ASMModel;
+
+/**
+ *
+ * @author Frédéric Jouault
+ *
+ */
+public interface ProblemReporter {
+
+ public boolean reportProblem(TextSource textSource, ASMModel problemModel);
+}
diff --git a/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/TCSBuilder.java b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/TCSBuilder.java
new file mode 100644
index 0000000..eebc4f5
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/TCSBuilder.java
@@ -0,0 +1,556 @@
+/**
+ * Copyright (c) 2008 INRIA.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * INRIA - initial API and implementation
+ *
+ * $Id: TCSBuilder.java,v 1.17 2008/07/03 14:38:28 fjouault Exp $
+ */
+package org.eclipse.gmt.tcs.builder;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.lang.ref.SoftReference;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.jar.JarOutputStream;
+import java.util.jar.Manifest;
+import java.util.zip.ZipEntry;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.gmt.tcs.builder.ct.ResourceLocator;
+import org.eclipse.gmt.tcs.metadata.Language;
+import org.eclipse.gmt.tcs.metadata.LanguageRegistry;
+import org.eclipse.gmt.tcs.metadata.LanguageSource;
+import org.eclipse.jdt.core.compiler.CategorizedProblem;
+import org.eclipse.jdt.internal.compiler.ClassFile;
+import org.eclipse.jdt.internal.compiler.CompilationResult;
+import org.eclipse.jdt.internal.compiler.Compiler;
+import org.eclipse.jdt.internal.compiler.DefaultErrorHandlingPolicies;
+import org.eclipse.jdt.internal.compiler.ICompilerRequestor;
+import org.eclipse.jdt.internal.compiler.batch.FileSystem;
+import org.eclipse.jdt.internal.compiler.env.ICompilationUnit;
+import org.eclipse.jdt.internal.compiler.env.INameEnvironment;
+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+import org.eclipse.jdt.internal.core.builder.ProblemFactory;
+import org.eclipse.jdt.internal.core.util.ResourceCompilationUnit;
+import org.eclipse.m2m.atl.dsls.DSLResourceProvider;
+import org.eclipse.m2m.atl.dsls.Resource;
+import org.eclipse.m2m.atl.dsls.textsource.IFileTextSource;
+import org.eclipse.m2m.atl.dsls.textsource.TextSource;
+import org.eclipse.m2m.atl.engine.AtlModelHandler;
+import org.eclipse.m2m.atl.engine.MarkerMaker;
+import org.eclipse.m2m.atl.engine.vm.nativelib.ASMModel;
+import org.osgi.framework.Bundle;
+
+/**
+ *
+ * @author Frédéric Jouault
+ *
+ */
+public class TCSBuilder extends IncrementalProjectBuilder {
+
+ public static final String ID = "org.eclipse.gmt.tcs.builder.Builder";
+
+ private Map parserGenerators = new HashMap();;
+
+ public TCSBuilder() throws Exception {
+ }
+
+ private ResourceLocator rl;
+ // soft reference: to prevent from being retained, which causes a leak
+ // TODO: is the SoftReference itself leaked now?
+ private SoftReference ct = null;
+
+ private TCSBuilderCT getTCSBuilderCT() throws CoreException {
+ TCSBuilderCT ret = (ct == null) ? null : (TCSBuilderCT)ct.get();
+ final IProject ammaCore = ResourcesPlugin.getWorkspace().getRoot().getProject("AMMACore");
+ if((ret != null) && (ammaCore.exists())) {
+ IFile noChangeFile = ammaCore.getFile("NO_CHANGE.txt");
+ if(!noChangeFile.exists()) {
+ ret = null; // force reload of all models
+ noChangeFile.create(new ByteArrayInputStream("Remove this file to force the TCS builder to purge its cache and reload the AMMACore models (e.g., after updating from CVS, or changing a model).".getBytes()), true, null);
+ noChangeFile.setDerived(true);
+ }
+ }
+ if(ret == null) {
+ boolean canUseAMMACore = false;
+ if(ammaCore.exists()) {
+ IFile doNotUseFile = ammaCore.getFile("DO_NOT_USE.txt");
+ if(!doNotUseFile.exists()) {
+ canUseAMMACore = true;
+ }
+ }
+ final boolean useAMMACore = canUseAMMACore;
+ rl = new ResourceLocator() {
+ public Resource getResource(final String id) throws IOException {
+ if(useAMMACore) {
+ // Get resources from AMMACore project in workspace
+ return new Resource() {
+ public TextSource asTextSource() {
+ return new IFileTextSource(ammaCore.getFile(id));
+ }
+
+ public URI asEMFURI() {
+ return URI.createPlatformResourceURI(ammaCore.getFile(id).getFullPath().toString(), true);
+ }
+ public URL asURL() {
+ throw new RuntimeException("Conversion to URL unsupported");
+ }
+ };
+ } else {
+ return DSLResourceProvider.getDefault().getResource(id);
+ }
+ }
+ };
+ try {
+ ret = new TCSBuilderCT(rl);
+ ct = new SoftReference(ret);
+ } catch(IOException ioe) {
+ // setting exception (ie., last argument) to non-null value (i.e., ioe) prevents the error pop-up from opening
+ throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.OK, "error loading resources from AMMACore project", ioe));
+ }
+ }
+ return ret;
+ }
+
+
+ // TODO: add 'if(monitor.isCanceled()) return null;' where appropriate
+ protected IProject[] build(int kind, Map args, IProgressMonitor monitor) throws CoreException {
+ TCSBuilderCT ct = getTCSBuilderCT();
+ final IProject p = getProject();
+ Language ts = LanguageRegistry.getDefault().getLanguageFromSource(p);
+ if(ts == null) {
+ return null; // not a valid TCS project
+ }
+ LanguageSource tss = ts.getSource();
+ final String name = ts.getName();
+ IFile km3File = tss.getKM3SourceFile();
+ IFile tcsFile = tss.getTCSSourceFile();
+ IFile outlineFile = tss.getOutlineFile();
+ IFile editorFile = tss.getEditorFile();
+ IFile ecoreFile = tss.getMetamodelFile();
+ final IFile grammarFile = tss.getGrammarFile();
+ final IFile jarFile = tss.getParserFile();
+ IFile compilerSourceFile = tss.getACGSourceFile();
+ IFile compilerBinaryFile = tss.getCompilerFile();
+ try {
+ String ext = ts.getExtension();
+ boolean removeParserJavaSource = !"false".equals(tss.getProperty("syntax.jar.source.remove"));
+ boolean rebuildPlugin = false;
+ boolean isJavaProject = false;
+
+ AtlModelHandler amh = AtlModelHandler.getDefault(AtlModelHandler.AMH_EMF);
+ Map models = new HashMap();
+ models.put(ct.srckm3, new IFileTextSource(km3File));
+ models.put(ct.srctcs, new IFileTextSource(tcsFile));
+ models.put("problemReporter", new ProblemReporter() {
+ public boolean reportProblem(TextSource textSource, ASMModel problemModel) {
+ int nbErrors = 0;
+ try {
+ IFile file = ((IFileTextSource)textSource).file;
+ nbErrors = new MarkerMaker().applyMarkers(file, problemModel);
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+ return nbErrors == 0;
+ }
+ });
+
+ if(tcsFile.getLocalTimeStamp() > editorFile.getLocalTimeStamp()) {
+ monitor.subTask("creating Editor model " + editorFile.getName());
+ ASMModel editorModel = (ASMModel)ct.getTarget(ct.tgteditor, models);
+ amh.saveModel(editorModel, editorFile.getProjectRelativePath().toString(), p);
+ p.getFolder("TGE").setDerived(true);
+ rebuildPlugin = true;
+ }
+
+ if(km3File.getLocalTimeStamp() > outlineFile.getLocalTimeStamp()) {
+ monitor.subTask("creating Outline model " + outlineFile.getName());
+ ASMModel outlineModel = (ASMModel)ct.getTarget(ct.tgtoutline, models);
+ amh.saveModel(outlineModel, outlineFile.getProjectRelativePath().toString(), p);
+ p.getFolder("TGE").setDerived(true);
+ rebuildPlugin = true;
+ }
+
+ if(km3File.getLocalTimeStamp() > ecoreFile.getLocalTimeStamp()) {
+ monitor.subTask("creating Ecore metamodel " + ecoreFile.getName());
+ ASMModel ecoreModel = (ASMModel)ct.getTarget(ct.tgtecore, models);
+
+ IFile annotationFile = tss.getAnnotationSourceFile();
+ if(annotationFile.exists()) {
+ models.put(ct.srcannotation, new IFileTextSource(annotationFile));
+ ecoreModel = (ASMModel)ct.getTarget(ct.tgtecorePlusAnnotations, models);
+ }
+
+ amh.saveModel(ecoreModel, ecoreFile.getProjectRelativePath().toString(), p);
+ rebuildPlugin = true;
+ }
+
+ if(compilerSourceFile.exists()) {
+ if(compilerSourceFile.getLocalTimeStamp() > compilerBinaryFile.getLocalTimeStamp()) {
+ monitor.subTask("compiling compiler to " + compilerBinaryFile.getName());
+ models.put(ct.srcacg, new IFileTextSource(compilerSourceFile));
+// ASMModel acgProblemModel = (ASMModel)ct.getTarget(ct.tgtacgproblem, models);
+// int nbACGErrors = new MarkerMaker().applyMarkers(compilerSourceFile, acgProblemModel);
+ int nbACGErrors = 0;
+ if(nbACGErrors == 0) {
+ TextSource asmFile = (TextSource)ct.getTarget(ct.tgtasm, models);
+ if (compilerBinaryFile.exists()) {
+ compilerBinaryFile.setContents(asmFile.openStream(), IFile.DERIVED, monitor);
+ } else {
+ compilerBinaryFile.create(asmFile.openStream(), IFile.DERIVED, monitor);
+ }
+ }
+ }
+ }
+
+ // TODO: improve TCS2Problem so that it is automatically invoked after injection (e.g., for TCS2Editor too)
+ // TODO: keep injection errors as well
+ // => possible solution to both problems: add a problem model to each getTarget request
+ // (possibly using a special id in the models Map)
+ if(
+ (km3File.getLocalTimeStamp() > grammarFile.getLocalTimeStamp()) ||
+ (tcsFile.getLocalTimeStamp() > grammarFile.getLocalTimeStamp())) {
+ monitor.subTask("creating grammar " + grammarFile.getName());
+ ASMModel tcsProblemModel = (ASMModel)ct.getTarget(ct.tgttcsproblem, models);
+ int nbTCSErrors = new MarkerMaker().applyMarkers(tcsFile, tcsProblemModel);
+ ASMModel km3ProblemModel = (ASMModel)ct.getTarget(ct.tgtkm3problem, models);
+ int nbKM3Errors = new MarkerMaker().applyMarkers(km3File, km3ProblemModel);
+ if((nbTCSErrors == 0) && (nbKM3Errors == 0)) {
+ TextSource grammarModel = (TextSource)ct.getTarget(ct.tgtgrammar, models);
+ if (grammarFile.exists()) {
+ grammarFile.setContents(grammarModel.openStream(), IFile.DERIVED, monitor);
+ } else {
+ grammarFile.create(grammarModel.openStream(), IFile.DERIVED, monitor);
+ }
+ }
+ }
+
+ String parserSourceFolderPathName = "Syntax/parser_src/";
+ if(grammarFile.getLocalTimeStamp() > jarFile.getLocalTimeStamp()) {
+ monitor.subTask("compiling grammar to jar " + jarFile.getName());
+ IFolder javaFilesPath = p.getFolder(parserSourceFolderPathName + "org/eclipse/gmt/tcs/injector/");
+ grammarFile.deleteMarkers(IMarker.PROBLEM, true, IResource.DEPTH_INFINITE);
+ ParserGenerator parserGenerator = getParserGenerator(tss);
+ if(parserGenerator == null) {
+ throw new RuntimeException("Missing parser generator: " + tss.getParserGenerator() + " see http://wiki.eclipse.org/TCS/Language_Project#Installing_the_Required_Features");
+ }
+ parserGenerator.generate(
+ grammarFile.getRawLocation().toOSString(),
+ javaFilesPath.getRawLocation().toOSString(),
+ new ParserGeneratorErrorListener() {
+ public void addError(String message, int lineNumber,
+ int charStart, int charEnd) {
+ addMarker(grammarFile, IMarker.SEVERITY_ERROR, message, lineNumber, charStart, charEnd);
+ }
+
+ public void addInfo(String message, int lineNumber,
+ int charStart, int charEnd) {
+ addMarker(grammarFile, IMarker.SEVERITY_INFO, message, lineNumber, charStart, charEnd);
+ }
+
+ public void addWarning(String message, int lineNumber,
+ int charStart, int charEnd) {
+ addMarker(grammarFile, IMarker.SEVERITY_WARNING, message, lineNumber, charStart, charEnd);
+ }
+ });
+ IFolder syntaxFolder = p.getFolder("Syntax/");
+ syntaxFolder.refreshLocal(IFolder.DEPTH_INFINITE, null);
+
+ if(!isJavaProject) {
+ monitor.subTask("compiling parser and lexer to jar " + jarFile.getName());
+ try {
+ if(jarFile.exists())
+ jarFile.delete(true, monitor);
+ } catch(CoreException ce) {
+ // We tried to delete the jarFile, but it may be in use (e.g., by TGE).
+ // In this case, we can still overwrite it.
+ }
+ Manifest man = new Manifest();
+ man.getMainAttributes().putValue("Manifest-Version", "1.0");
+ final JarOutputStream out = new JarOutputStream(new FileOutputStream(jarFile.getLocation().toFile()), man);
+ final List errors = new ArrayList();
+
+
+ List classpath = new ArrayList();
+ populateClassPath(p, classpath);
+ INameEnvironment ne = new FileSystem((String[])classpath.toArray(new String[] {}), new String[0], "UTF-8");
+ CompilerOptions co = new CompilerOptions();
+ Map options = new HashMap();
+ options.put(CompilerOptions.OPTION_LocalVariableAttribute, CompilerOptions.GENERATE);
+ // Java code generated by the parser generator may contain unused imports that are not worth reporting
+ options.put(CompilerOptions.OPTION_ReportUnusedImport, CompilerOptions.IGNORE);
+ co.set(options);
+ ICompilerRequestor cr = new ICompilerRequestor() {
+ public void acceptResult(CompilationResult result) {
+ try {
+ // TODO: report errors
+ CategorizedProblem pbs[] = result.getProblems();
+ boolean hasError = false;
+ IFile javaFile = p.getParent().getFile(new Path(new String(result.getFileName())));
+ javaFile.deleteMarkers(IMarker.PROBLEM, true, IResource.DEPTH_INFINITE);
+ if(pbs != null) {
+ for(int i = 0 ; i < pbs.length ; i++) {
+ CategorizedProblem pb = pbs[i];
+ System.out.println(pb);
+ if(pb.isError()) {
+ hasError |= true;
+ errors.add(pb);
+ addMarker(javaFile, IMarker.SEVERITY_ERROR, pb.getMessage(), pb.getSourceLineNumber(), pb.getSourceStart(), pb.getSourceEnd() + 1);
+ } else if(pb.isWarning()) {
+ addMarker(javaFile, IMarker.SEVERITY_WARNING, pb.getMessage(), pb.getSourceLineNumber(), pb.getSourceStart(), pb.getSourceEnd() + 1);
+ }
+ }
+ }
+ if(!hasError) {
+ ClassFile cfs[] = result.getClassFiles();
+ for(int i = 0 ; i < cfs.length ; i++) {
+ out.putNextEntry(new ZipEntry(new String(cfs[i].fileName()) + ".class"));
+ out.write(cfs[i].getBytes());
+ out.closeEntry();
+ }
+ }
+ } catch(IOException ioe) {
+ ioe.printStackTrace(System.out);
+ } catch (CoreException e) {
+ e.printStackTrace(System.out);
+ }
+ }
+ };
+ Compiler compiler = new Compiler(ne, DefaultErrorHandlingPolicies.proceedWithAllProblems(), co, cr, ProblemFactory.getProblemFactory(Locale.getDefault()));
+ syntaxFolder.refreshLocal(IFolder.DEPTH_INFINITE, null);
+ compiler.compile(new ICompilationUnit[] {
+ new ResourceCompilationUnit(javaFilesPath.getFile(name + "_ANTLR3Lexer.java"), null),
+ new ResourceCompilationUnit(javaFilesPath.getFile(name + "_ANTLR3Parser.java"), null),
+ });
+ syntaxFolder.refreshLocal(IFolder.DEPTH_INFINITE, null);
+ out.close();
+
+ IFolder parserSourceFolder = p.getFolder(parserSourceFolderPathName);
+ if(parserSourceFolder.exists()) {
+ parserSourceFolder.setDerived(true);
+ }
+ if(errors.isEmpty()) {
+ if(removeParserJavaSource) {
+ parserSourceFolder.delete(false, null);
+ }
+ } else {
+ jarFile.delete(true, null);
+ }
+ if(jarFile.exists()) {
+ jarFile.refreshLocal(IResource.DEPTH_ZERO, monitor);
+ jarFile.setDerived(true);
+ rebuildPlugin = true;
+ }
+ }
+ }
+
+ Map subst = new HashMap();
+// subst.put("ammacore.path", "/AMMACore");
+// subst.put("ammacore.metamodel.dir.name", "Metamodel");
+ subst.put("dsl.name", name);
+ subst.put("syntax.path", "/" + name + "/Syntax");
+ subst.put("syntax.tcs.filename", name + ".tcs");
+ subst.put("syntax.jar.filename", name + "-parser.jar");
+ subst.put("dsl.ext", ext);
+// subst.put("tge.path", "/" + name + "/TGE");
+ subst.put("mm.location", "/" + name + "/Metamodel/" + name + ".ecore");
+// subst.put("injector.path", "/" + name + "/injector.xml");
+// subst.put("extractor.path", "/" + name + "/extractor.xml");
+
+ if("true".equals(tss.getProperty("scripts.ant.create"))) {
+ IFile injectorFile = p.getFile("injector.xml");
+ if(!injectorFile.exists()) {
+ injectorFile.create(new ByteArrayInputStream(getTemplate("templates/injector.xml", subst).getBytes()), true, null);
+ injectorFile.setDerived(true);
+ }
+ IFile extractorFile = p.getFile("extractor.xml");
+ if(!extractorFile.exists()) {
+ extractorFile.create(new ByteArrayInputStream(getTemplate("templates/extractor.xml", subst).getBytes()), true, null);
+ extractorFile.setDerived(true);
+ }
+ }
+
+
+ if(!isJavaProject) {
+ IFile pluginFile = p.getFile("plugin/org.eclipse.gmt.tcs.language." + name + ".jar");
+ if(!pluginFile.exists()) {
+ rebuildPlugin = true;
+ }
+ if("true".equals(tss.getProperty("plugin.create")) && rebuildPlugin) {
+ IFolder pluginFolder = p.getFolder("plugin");
+ if(!pluginFolder.exists()) {
+ pluginFolder.create(IFolder.DERIVED + IFolder.FORCE, true, monitor);
+ }
+ BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(pluginFile.getRawLocation().toString()));
+ JarOutputStream jout = new JarOutputStream(out);
+
+ jout.putNextEntry(new ZipEntry("plugin.xml"));
+ jout.write(getTemplate("templates/plugin.xml", subst).getBytes());
+
+ jout.putNextEntry(new ZipEntry("META-INF/MANIFEST.MF"));
+ jout.write(getTemplate("templates/MANIFEST.MF", subst).getBytes());
+
+ jout.putNextEntry(new ZipEntry("resources/" + name + ".ecore"));
+ ASMModel ecoreModel = (ASMModel)ct.getTarget(ct.tgtecore, models);
+ amh.saveModel(ecoreModel, jout);
+
+ jout.putNextEntry(new ZipEntry("resources/" + name + "-Editor.xmi"));
+ ASMModel editorModel = (ASMModel)ct.getTarget(ct.tgteditor, models);
+ amh.saveModel(editorModel, jout);
+
+ jout.putNextEntry(new ZipEntry("resources/" + name + "-Outline.xmi"));
+ ASMModel outlineModel = (ASMModel)ct.getTarget(ct.tgtoutline, models);
+ amh.saveModel(outlineModel, jout);
+
+ jout.putNextEntry(new ZipEntry("resources/" + name + "-TCS.xmi"));
+ ASMModel tcsModel = (ASMModel)ct.getTarget(ct.tgttcs, models);
+ amh.saveModel(tcsModel, jout);
+
+ jout.putNextEntry(new ZipEntry("resources/" + name + "-parser.jar"));
+ BufferedInputStream in = new BufferedInputStream(jarFile.getContents());
+ int size;
+ byte buffer[] = new byte[1024];
+ while((size = in.read(buffer)) > 0) {
+ jout.write(buffer, 0, size);
+ }
+ in.close();
+
+ jout.close();
+ if(!pluginFile.exists()) {
+ pluginFile.refreshLocal(IResource.DEPTH_ZERO, monitor);
+ pluginFile.setDerived(true);
+ }
+ }
+ }
+ } catch(IOException ioe) {
+ ioe.printStackTrace(System.out);
+ }
+ rl=null;ct=null;
+ return null;
+ }
+
+ private ParserGenerator getParserGenerator(LanguageSource tss) {
+ String parserGeneratorName = tss.getParserGenerator();
+ ParserGenerator ret = (ParserGenerator)parserGenerators.get(parserGeneratorName);
+
+ if(ret == null) {
+ IExtensionRegistry registry = Platform.getExtensionRegistry();
+ if (registry == null) {
+ throw new RuntimeException("Extension registry not found");
+ }
+
+ IExtensionPoint point = registry.getExtensionPoint("org.eclipse.gmt.tcs.builder.parserGenerator");//$NON-NLS-1$
+
+ IExtension[] extensions = point.getExtensions();
+ extensions: for(int i = 0 ; i < extensions.length ; i++) {
+ IConfigurationElement[] elements = extensions[i].getConfigurationElements();
+ for(int j = 0 ; j < elements.length ; j++) {
+ try {
+ if(elements[j].getAttribute("name").equals(parserGeneratorName)) {//$NON-NLS-1$
+ ret = (ParserGenerator)elements[j].createExecutableExtension("class");
+ break extensions;
+ }
+ } catch (CoreException e){
+ throw new RuntimeException(e);
+ }
+ }
+ }
+ synchronized(parserGenerators) {
+ parserGenerators.put(parserGeneratorName, ret);
+ }
+ }
+
+ return ret;
+ }
+
+ private static void addMarker(IResource res, int severity, String description, int lineNumber, int charStart, int charEnd) {
+ try {
+ IMarker pbmMarker = res.createMarker(IMarker.PROBLEM);
+ pbmMarker.setAttribute(IMarker.SEVERITY, severity);
+ pbmMarker.setAttribute(IMarker.MESSAGE, description);
+ pbmMarker.setAttribute(IMarker.LINE_NUMBER, (lineNumber == -1) ? 1 : lineNumber);
+ pbmMarker.setAttribute(IMarker.CHAR_START, charStart);
+ pbmMarker.setAttribute(IMarker.CHAR_END, charEnd);
+ } catch(CoreException ce) {
+ ce.printStackTrace(System.err);
+ }
+ }
+
+ public static String getTemplate(String path, Map substitutions) throws IOException {
+ Bundle bundle = Activator.getDefault().getBundle();
+ URL templateURL = bundle.getResource("resources/" + path); //FileLocator.find(bundle, new Path("resources/" + path), Collections.EMPTY_MAP);
+ BufferedInputStream in = new BufferedInputStream(templateURL.openStream());
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ int size;
+ byte buffer[] = new byte[1000];
+ while((size = in.read(buffer)) > 0) {
+ out.write(buffer, 0, size);
+ }
+ String ret = out.toString();
+ for(Iterator i = substitutions.keySet().iterator() ; i.hasNext() ; ) {
+ String key = (String)i.next();
+ String value = (String)substitutions.get(key);
+ ret = ret.replaceAll("\\$\\{" + key + "}", value);
+ }
+ return ret;
+ }
+
+// private void createIfMissing(IFolder f, IProgressMonitor monitor) throws CoreException {
+// if(!f.exists()) {
+// createIfMissing((IFolder)f.getParent(), monitor);
+// f.create(0,false, monitor);
+// }
+// }
+
+ private void populateClassPath(IProject project, List classpath) throws IOException {
+ // property: sun.boot.class.path
+ // According to JDT help: If no bootclasspath is specified, the compiler will infer it using the following system properties sun.boot.class.path, vm.boot.class.path or org.apache.harmony.boot.class.path in this order respectively.
+ // see example in org.eclipse.jdt.internal.compiler.batch.Main.handleBootclasspath([...])
+ classpath.add(System.getProperty("java.home") + "/lib/rt.jar");
+
+ Bundle bundle = org.eclipse.m2m.atl.dsls.Activator.getDefault().getBundle();
+ URL urlPlatform = bundle.getEntry("/");
+ URL localFileInPluginURL;
+ localFileInPluginURL = FileLocator.toFileURL(urlPlatform);
+ String atlEnginePath = localFileInPluginURL.getPath().toString();
+
+ classpath.add(atlEnginePath + "libraries/org.eclipse.gmt.tcs.injector.jar");
+
+ urlPlatform = Platform.getBundle("org.antlr.runtime").getEntry("/");
+ localFileInPluginURL = FileLocator.toFileURL(urlPlatform);
+ classpath.add(localFileInPluginURL.getPath().toString());
+ }
+}
diff --git a/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/TCSBuilderCT.java b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/TCSBuilderCT.java
new file mode 100644
index 0000000..62f99b0
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/TCSBuilderCT.java
@@ -0,0 +1,306 @@
+/**
+ * Copyright (c) 2007, 2008 INRIA.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * INRIA - initial API and implementation
+ *
+ * $Id: TCSBuilderCT.java,v 1.7 2008/06/25 13:02:47 fjouault Exp $
+ */
+package org.eclipse.gmt.tcs.builder;
+
+import java.io.IOException;
+import java.util.Map;
+
+import org.eclipse.gmt.tcs.builder.ct.CompositeTransformation;
+import org.eclipse.gmt.tcs.builder.ct.Metamodel;
+import org.eclipse.gmt.tcs.builder.ct.ResourceLocator;
+import org.eclipse.gmt.tcs.builder.ct.definition.ACGTransformation;
+import org.eclipse.gmt.tcs.builder.ct.definition.ATLRefinedTargetDefinition;
+import org.eclipse.gmt.tcs.builder.ct.definition.ATLSourceDefinition;
+import org.eclipse.gmt.tcs.builder.ct.definition.ATLTargetDefinition;
+import org.eclipse.gmt.tcs.builder.ct.definition.ATLTransformation;
+import org.eclipse.gmt.tcs.builder.ct.definition.CompositeTransformationSourceDefinition;
+import org.eclipse.gmt.tcs.builder.ct.definition.CompositeTransformationTargetDefinition;
+import org.eclipse.gmt.tcs.builder.ct.definition.ModelSourceDefinition;
+import org.eclipse.gmt.tcs.builder.ct.definition.ModelTargetDefinition;
+import org.eclipse.gmt.tcs.builder.ct.definition.SourceDefinition;
+import org.eclipse.gmt.tcs.builder.ct.definition.TCSExtraction;
+import org.eclipse.gmt.tcs.builder.ct.definition.TCSInjection;
+import org.eclipse.gmt.tcs.builder.ct.definition.TargetDefinition;
+import org.eclipse.gmt.tcs.builder.ct.definition.Transformation;
+import org.eclipse.gmt.tcs.builder.ct.usage.Source;
+import org.eclipse.gmt.tcs.builder.ct.usage.Target;
+import org.eclipse.gmt.tcs.builder.ct.usage.TransformationUsage;
+import org.eclipse.m2m.atl.engine.AtlModelHandler;
+
+/**
+ *
+ * @author Frédéric Jouault
+ *
+ */
+public class TCSBuilderCT {
+
+ public Object getTarget(CompositeTransformationTargetDefinition target, Map models) throws IOException {
+ return ct.getTarget(target, models);
+ }
+
+ public CompositeTransformation ct;
+ public CompositeTransformationSourceDefinition srckm3;
+ public CompositeTransformationSourceDefinition srcannotation;
+ public CompositeTransformationSourceDefinition srctcs;
+ public CompositeTransformationSourceDefinition srcacg;
+ public CompositeTransformationTargetDefinition tgttcsproblem;
+// public CompositeTransformationTargetDefinition tgttcssyntaxproblem;
+ public CompositeTransformationTargetDefinition tgtkm3problem;
+ public CompositeTransformationTargetDefinition tgtacgproblem;
+ public CompositeTransformationTargetDefinition tgtasm;
+ public CompositeTransformationTargetDefinition tgttcs;
+// public CompositeTransformationTargetDefinition tgtkm3syntaxproblem;
+ public CompositeTransformationTargetDefinition tgteditor;
+ public CompositeTransformationTargetDefinition tgtoutline;
+ public CompositeTransformationTargetDefinition tgtgrammar;
+ public CompositeTransformationTargetDefinition tgtecore;
+ public CompositeTransformationTargetDefinition tgtecorePlusAnnotations;
+
+ public TCSBuilderCT(ResourceLocator rl) throws IOException {
+ AtlModelHandler amh = AtlModelHandler.getDefault(AtlModelHandler.AMH_EMF);
+
+ this.rl = rl;
+ Metamodel km3mm = getMetamodel("KM3", "-2005");
+ Metamodel tcsmm = getMetamodel("TCS");
+ Metamodel annotationmm = getMetamodel("Annotation");
+ Metamodel refiningTracemm = new Metamodel("RefiningTrace", rl.getResource("ATL/RuntimeSupport/RefiningTrace.ecore"));
+
+ Metamodel editormm = getMetamodel("Editor");
+ Metamodel outlinemm = getMetamodel("Outline");
+
+ Metamodel problemmm = getMetamodel("Problem");
+ Metamodel antlrmm = getMetamodel("ANTLR");
+
+ Metamodel acgmm = getMetamodel("ACG");
+
+ Metamodel ecoremm = new Metamodel("Ecore", amh.getMof());
+
+ // TCS Injection
+ Transformation tcsinjection = new TCSInjection(problemmm);
+ SourceDefinition tcsinjectionSrc = new SourceDefinition(tcsinjection);
+ TargetDefinition tcsinjectionTgt = new ModelTargetDefinition(tcsinjection, tcsmm);
+// TargetDefinition tcsinjectionProblemTgt = new ModelTargetDefinition(tcsinjection, problemmm);
+
+ // TCS2Problem
+ ATLTransformation tcs2problem = new ATLTransformation(rl.getResource("TCS/WFR/TCS2Problem.asm").asTextSource());
+ tcs2problem.addLibrary("KM3Helpers", rl.getResource("KM3-2005/Helpers/KM3Helpers.asm").asTextSource());
+ SourceDefinition tcs2problemTCSSrc = new ATLSourceDefinition(tcs2problem, "IN", "TCS", tcsmm);
+ SourceDefinition tcs2problemKM3Src = new ATLSourceDefinition(tcs2problem, "MM", "KM3", km3mm);
+ TargetDefinition tcs2problemTgt = new ATLTargetDefinition(tcs2problem, "OUT", "Problem", problemmm);
+
+ // TCS2Editor
+ Transformation tcs2editor = new ATLTransformation(rl.getResource("Editor/Compiler/TCS2Editor.asm").asTextSource());
+ SourceDefinition tcs2editorSrc = new ATLSourceDefinition(tcs2editor, "IN", "TCS", tcsmm);
+ TargetDefinition tcs2editorTgt = new ATLTargetDefinition(tcs2editor, "OUT", "Editor", editormm);
+
+ // KM3 Injection
+ Transformation km3injection = new TCSInjection(problemmm);
+ SourceDefinition km3injectionSrc = new SourceDefinition(km3injection);
+ TargetDefinition km3injectionTgt = new ModelTargetDefinition(km3injection, km3mm);
+// TargetDefinition km3injectionProblemTgt = new ModelTargetDefinition(km3injection, problemmm);
+
+ // KM32Problem
+ ATLTransformation km32problem = new ATLTransformation(rl.getResource("KM3-2005/WFR/KM32Problem.asm").asTextSource());
+ SourceDefinition km32problemSrc = new ATLSourceDefinition(km32problem, "IN", "KM3", km3mm);
+ TargetDefinition km32problemTgt = new ATLTargetDefinition(km32problem, "OUT", "Problem", problemmm);
+
+ // KM32Outline
+ ATLTransformation km32outline = new ATLTransformation(rl.getResource("Outline/Compiler/KM32Outline.asm").asTextSource());
+ km32outline.addLibrary("KM3Helpers", rl.getResource("KM3-2005/Helpers/KM3Helpers.asm").asTextSource());
+ SourceDefinition km32outlineSrc = new ATLSourceDefinition(km32outline, "IN", "KM3", km3mm);
+ TargetDefinition km32outlineTgt = new ATLTargetDefinition(km32outline, "OUT", "Outline", outlinemm);
+
+ // ACG Injection
+ Transformation acginjection = new TCSInjection(problemmm);
+ SourceDefinition acginjectionSrc = new SourceDefinition(acginjection);
+ TargetDefinition acginjectionTgt = new ModelTargetDefinition(acginjection, acgmm);
+// TargetDefinition acginjectionProblemTgt = new ModelTargetDefinition(acginjection, problemmm);
+
+ // ACGCompilation
+ ACGTransformation acgCompilation = new ACGTransformation(rl.getResource("ACG/Compiler/ACG.asm").asTextSource());
+ SourceDefinition acgCompilationSrc = new ATLSourceDefinition(acgCompilation, "IN", "ACG", acgmm);
+ TargetDefinition acgCompilationTgt = new TargetDefinition(acgCompilation);
+
+ // KM32Ecore
+ ATLTransformation km32ecore = new ATLTransformation(rl.getResource("KM3-2005/Compiler/KM32Ecore.asm").asTextSource());
+// km32ecore.addLibrary("KM3Helpers", rl.getResource("KM3-2005/Helpers/KM3Helpers.asm"));
+ SourceDefinition km32ecoreSrc = new ATLSourceDefinition(km32ecore, "IN", "KM3", km3mm);
+ TargetDefinition km32ecoreTgt = new ATLTargetDefinition(km32ecore, "OUT", "Ecore", ecoremm);
+
+ // Annotation Injection
+ Transformation annotationinjection = new TCSInjection(problemmm);
+ SourceDefinition annotationinjectionSrc = new SourceDefinition(annotationinjection);
+ TargetDefinition annotationinjectionTgt = new ModelTargetDefinition(annotationinjection, annotationmm);
+// TargetDefinition annotationinjectionProblemTgt = new ModelTargetDefinition(annotationinjection, problemmm);
+
+ // ApplyAnnotations2Ecore
+ ATLTransformation applyAnnotations2ecore = new ATLTransformation(rl.getResource("Annotation/Compiler/ApplyAnnotations2Ecore.asm").asTextSource());
+ SourceDefinition applyAnnotations2ecoreSrc = new ATLSourceDefinition(applyAnnotations2ecore, "IN", "Ecore", ecoremm);
+ SourceDefinition applyAnnotations2ecoreAnnotationSrc = new ATLSourceDefinition(applyAnnotations2ecore, "annotations", "Annotation", annotationmm);
+ TargetDefinition applyAnnotations2ecoreTgt = new ATLRefinedTargetDefinition(applyAnnotations2ecore, applyAnnotations2ecoreSrc);
+ TargetDefinition applyAnnotations2ecoreRefiningTraceTgt = new ATLTargetDefinition(applyAnnotations2ecore, "refiningTrace", "RefiningTrace", refiningTracemm);
+
+ // TCS2ANTLR
+ ATLTransformation tcs2antlr = new ATLTransformation(rl.getResource("TCS/Compiler/TCS2ANTLR.asm").asTextSource());
+ tcs2antlr.addLibrary("TCS2ANTLRActions", rl.getResource("TCS/Compiler/TCS2ANTLRv3Actions.asm").asTextSource());
+ tcs2antlr.addLibrary("KM3Helpers", rl.getResource("KM3-2005/Helpers/KM3Helpers.asm").asTextSource());
+ tcs2antlr.addLibrary("strings", rl.getResource("libs/strings.asm").asTextSource());
+ SourceDefinition tcs2antlrTCSSrc = new ATLSourceDefinition(tcs2antlr, "IN", "TCS", tcsmm);
+ SourceDefinition tcs2antlrKM3Src = new ATLSourceDefinition(tcs2antlr, "MM", "KM3", km3mm);
+ TargetDefinition tcs2antlrTgt = new ATLTargetDefinition(tcs2antlr, "OUT", "ANTLR", antlrmm);
+
+ // ANTLR Extraction
+ // not asEMFURI() because then this model is somehow not disposed off before its metamodel is
+ Transformation antlrextraction = new TCSExtraction(tcsmm, rl.getResource("ANTLR/Syntax/ANTLR-TCS.xmi").asURL());
+ SourceDefinition antlrextractionSrc = new ModelSourceDefinition(antlrextraction, antlrmm);
+ TargetDefinition antlrextractionTgt = new TargetDefinition(antlrextraction);
+ antlrextraction.setOption("identEsc", "");
+
+
+ ct = new CompositeTransformation();
+ srckm3 = new CompositeTransformationSourceDefinition(ct, km3mm);
+ srcannotation = new CompositeTransformationSourceDefinition(ct, annotationmm);
+ srctcs = new CompositeTransformationSourceDefinition(ct, tcsmm);
+ srcacg = new CompositeTransformationSourceDefinition(ct, acgmm);
+ tgttcsproblem = new CompositeTransformationTargetDefinition(ct, problemmm);
+ tgtkm3problem = new CompositeTransformationTargetDefinition(ct, problemmm);
+ tgtacgproblem = new CompositeTransformationTargetDefinition(ct, problemmm);
+ tgtasm = new CompositeTransformationTargetDefinition(ct, null);
+ tgteditor = new CompositeTransformationTargetDefinition(ct, editormm);
+ tgtoutline = new CompositeTransformationTargetDefinition(ct, outlinemm);
+ tgtgrammar = new CompositeTransformationTargetDefinition(ct, antlrmm);
+ tgtecore = new CompositeTransformationTargetDefinition(ct, ecoremm);
+ tgtecorePlusAnnotations = new CompositeTransformationTargetDefinition(ct, ecoremm);
+ tgttcs = new CompositeTransformationTargetDefinition(ct, tcsmm);
+
+ // TCS Injection Usage
+ TransformationUsage tcsinjectionUsage = new TransformationUsage(tcsinjection);
+// Source tcsinjectionUsageSrc =
+ new Source(tcsinjectionUsage, tcsinjectionSrc, srctcs);
+ Target tcsinjectionUsageTgt = new Target(tcsinjectionUsage, tcsinjectionTgt);
+// Target tcsinjectionUsageProblemTgt = new Target(tcsinjectionUsage, tcsinjectionProblemTgt);
+
+ tgttcs.setSource(tcsinjectionUsageTgt);
+
+// tgttcssyntaxproblem.setSource(tcsinjectionUsageProblemTgt);
+
+ // TCS2Editor Usage
+ TransformationUsage tcs2editorUsage = new TransformationUsage(tcs2editor);
+// Source tcs2editorUsageSrc =
+ new Source(tcs2editorUsage, tcs2editorSrc, tcsinjectionUsageTgt);
+ Target tcs2editorUsageTgt = new Target(tcs2editorUsage, tcs2editorTgt);
+
+ tgteditor.setSource(tcs2editorUsageTgt);
+
+ // KM3 Injection Usage
+ TransformationUsage km3injectionUsage = new TransformationUsage(km3injection);
+// Source km3injectionUsageSrc =
+ new Source(km3injectionUsage, km3injectionSrc, srckm3);
+ Target km3injectionUsageTgt = new Target(km3injectionUsage, km3injectionTgt);
+// Target km3injectionUsageProblemTgt = new Target(km3injectionUsage, km3injectionProblemTgt);
+
+// tgtkm3syntaxproblem.setSource(km3injectionUsageProblemTgt);
+
+ // Annotation Injection Usage
+ TransformationUsage annotationinjectionUsage = new TransformationUsage(annotationinjection);
+// Source annotation =
+ new Source(annotationinjectionUsage, annotationinjectionSrc, srcannotation);
+ Target annotationinjectionUsageTgt = new Target(annotationinjectionUsage, annotationinjectionTgt);
+
+ // TCS2Problem Usage
+ TransformationUsage tcs2problemUsage = new TransformationUsage(tcs2problem);
+// Source tcs2problemUsageTCSSrc =
+ new Source(tcs2problemUsage, tcs2problemTCSSrc, tcsinjectionUsageTgt);
+// Source tcs2problemUsageKM3Src =
+ new Source(tcs2problemUsage, tcs2problemKM3Src, km3injectionUsageTgt);
+ Target tcs2problemUsageTgt = new Target(tcs2problemUsage, tcs2problemTgt);
+
+ tgttcsproblem.setSource(tcs2problemUsageTgt);
+
+ // KM32Problem Usage
+ TransformationUsage km32problemUsage = new TransformationUsage(km32problem);
+// Source km32problemUsageSrc =
+ new Source(km32problemUsage, km32problemSrc, km3injectionUsageTgt);
+ Target km32problemUsageTgt = new Target(km32problemUsage, km32problemTgt);
+
+ tgtkm3problem.setSource(km32problemUsageTgt);
+
+ // KM32Outline Usage
+ TransformationUsage km32outlineUsage = new TransformationUsage(km32outline);
+// Source km32outlineUsageSrc =
+ new Source(km32outlineUsage, km32outlineSrc, km3injectionUsageTgt);
+ Target km32outlineUsageTgt = new Target(km32outlineUsage, km32outlineTgt);
+
+ tgtoutline.setSource(km32outlineUsageTgt);
+
+ // ACG Injection Usage
+ TransformationUsage acginjectionUsage = new TransformationUsage(acginjection);
+// Source acginjectionUsageSrc =
+ new Source(acginjectionUsage, acginjectionSrc, srcacg);
+ Target acginjectionUsageTgt = new Target(acginjectionUsage, acginjectionTgt);
+
+ // ACG Compilation Usage
+ TransformationUsage acgCompilationUsage = new TransformationUsage(acgCompilation);
+// Source acgCompilationUsageSrc =
+ new Source(acgCompilationUsage, acgCompilationSrc, acginjectionUsageTgt);
+ Target acgCompilationUsageTgt = new Target(acgCompilationUsage, acgCompilationTgt);
+
+ tgtasm.setSource(acgCompilationUsageTgt);
+
+ // KM32Ecore Usage
+ TransformationUsage km32ecoreUsage = new TransformationUsage(km32ecore);
+// Source km32ecoreUsageSrc =
+ new Source(km32ecoreUsage, km32ecoreSrc, km3injectionUsageTgt);
+ Target km32ecoreUsageTgt = new Target(km32ecoreUsage, km32ecoreTgt);
+
+ tgtecore.setSource(km32ecoreUsageTgt);
+
+ // ApplyAnnotations2Ecore Usage
+ TransformationUsage applyAnnotations2ecoreUsage = new TransformationUsage(applyAnnotations2ecore);
+// Source applyAnnotations2ecoreUsageSrc =
+ new Source(applyAnnotations2ecoreUsage, applyAnnotations2ecoreSrc, km32ecoreUsageTgt);
+// Source applyAnnotations2ecoreUsageAnnotationSrc =
+ new Source(applyAnnotations2ecoreUsage, applyAnnotations2ecoreAnnotationSrc, annotationinjectionUsageTgt);
+ Target applyAnnotations2ecoreUsageTgt = new Target(applyAnnotations2ecoreUsage, applyAnnotations2ecoreTgt);
+// Target applyAnnotations2ecoreUsageRefiningTraceTgt =
+ new Target(applyAnnotations2ecoreUsage, applyAnnotations2ecoreRefiningTraceTgt);
+
+ tgtecorePlusAnnotations.setSource(applyAnnotations2ecoreUsageTgt);
+
+ // TCS2ANTLR Usage
+ TransformationUsage tcs2antlrUsage = new TransformationUsage(tcs2antlr);
+// Source tcs2antlrUsageTCSSrc =
+ new Source(tcs2antlrUsage, tcs2antlrTCSSrc, tcsinjectionUsageTgt);
+// Source tcs2antlrUsageKM3Src =
+ new Source(tcs2antlrUsage, tcs2antlrKM3Src, km3injectionUsageTgt);
+ Target tcs2antlrUsageTgt = new Target(tcs2antlrUsage, tcs2antlrTgt);
+
+ // ANTLR Extraction Usage
+ TransformationUsage antlrextractionUsage = new TransformationUsage(antlrextraction);
+// Source antlrextractionUsageSrc =
+ new Source(antlrextractionUsage, antlrextractionSrc, tcs2antlrUsageTgt);
+ Target antlrextractionUsageTgt = new Target(antlrextractionUsage, antlrextractionTgt);
+
+ tgtgrammar.setSource(antlrextractionUsageTgt);
+ }
+
+ private ResourceLocator rl;
+
+ protected Metamodel getMetamodel(String name) throws IOException {
+ return getMetamodel(name, "");
+ }
+
+ protected Metamodel getMetamodel(String name, String folderSuffix) throws IOException {
+ return new Metamodel(name, rl.getResource(name + folderSuffix + "/Metamodel/" + name + ".ecore"));
+ }
+}
diff --git a/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/CompositeTransformation.java b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/CompositeTransformation.java
new file mode 100644
index 0000000..7b63c9d
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/CompositeTransformation.java
@@ -0,0 +1,46 @@
+/**
+ * Copyright (c) 2007 INRIA.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * INRIA - initial API and implementation
+ *
+ * $Id: CompositeTransformation.java,v 1.2 2008/06/25 13:01:57 fjouault Exp $
+ */
+package org.eclipse.gmt.tcs.builder.ct;
+
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.gmt.tcs.builder.ct.definition.CompositeTransformationTargetDefinition;
+import org.eclipse.gmt.tcs.builder.ct.definition.Transformation;
+import org.eclipse.gmt.tcs.builder.ct.usage.Target;
+import org.eclipse.gmt.tcs.builder.ct.usage.TransformationUsage;
+
+/**
+ *
+ * @author Frédéric Jouault
+ *
+ */
+public class CompositeTransformation extends Transformation {
+
+ public Object getTarget(CompositeTransformationTargetDefinition target, Map models) throws IOException {
+ return target.get(models);
+ }
+
+ /**
+ * Populates the models Map with all targets. Note that each target may also be retrieved separately
+ * by directly calling its get method.
+ * @throws IOException
+ */
+ public void execute(TransformationUsage usage, Map models) throws IOException {
+ for(Iterator i = usage.targets.iterator() ; i.hasNext() ; ) {
+ Target target = (Target)i.next();
+ models.put(target, target.get(models));
+ }
+ }
+}
diff --git a/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/Metamodel.java b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/Metamodel.java
new file mode 100644
index 0000000..7c77dd8
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/Metamodel.java
@@ -0,0 +1,74 @@
+/**
+ * Copyright (c) 2007, 2008 INRIA.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * INRIA - initial API and implementation
+ *
+ * $Id: Metamodel.java,v 1.5 2008/06/25 13:01:57 fjouault Exp $
+ */
+package org.eclipse.gmt.tcs.builder.ct;
+
+import java.io.IOException;
+
+import org.eclipse.gmt.tcs.builder.ct.definition.ATLTransformation;
+import org.eclipse.m2m.atl.dsls.Resource;
+import org.eclipse.m2m.atl.dsls.textsource.TextSource;
+import org.eclipse.m2m.atl.engine.AtlEMFModelHandler;
+import org.eclipse.m2m.atl.engine.AtlModelHandler;
+import org.eclipse.m2m.atl.engine.vm.nativelib.ASMModel;
+
+/**
+ *
+ * @author Frédéric Jouault
+ *
+ */
+public class Metamodel {
+
+ public String name;
+ public ASMModel metamodel;
+ public ATLTransformation checker = null;
+ public TextSource source = null;
+
+ public Metamodel(String name, String nsURI) throws IOException {
+ this.name = name;
+
+ AtlEMFModelHandler amh = (AtlEMFModelHandler)AtlModelHandler.getDefault(AtlModelHandler.AMH_EMF);
+
+ metamodel = amh.loadModel(name, amh.getMof(), "uri:" + nsURI);
+ }
+
+ public Metamodel(String name, ASMModel metamodel) throws IOException {
+ this.name = name;
+ this.metamodel = metamodel;
+ }
+
+ public Metamodel(String name, TextSource metamodelTS) throws IOException {
+ this.name = name;
+
+ AtlModelHandler amh = AtlModelHandler.getDefault(AtlModelHandler.AMH_EMF);
+
+ metamodel = amh.loadModel(name, amh.getMof(), metamodelTS.openStream());
+ source = metamodelTS;
+ }
+
+ public Metamodel(String name, Resource metamodelResource) throws IOException {
+ this.name = name;
+
+ AtlEMFModelHandler amh = (AtlEMFModelHandler)AtlModelHandler.getDefault(AtlModelHandler.AMH_EMF);
+
+ metamodel = amh.loadModel(name, amh.getMof(), metamodelResource.asEMFURI());
+ source = metamodelResource.asTextSource();
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public ASMModel getMetamodel() {
+ return metamodel;
+ }
+}
diff --git a/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/Origin.java b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/Origin.java
new file mode 100644
index 0000000..effac3a
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/Origin.java
@@ -0,0 +1,26 @@
+/**
+ * Copyright (c) 2007 INRIA.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * INRIA - initial API and implementation
+ *
+ * $Id: Origin.java,v 1.2 2008/06/25 13:01:57 fjouault Exp $
+ */
+package org.eclipse.gmt.tcs.builder.ct;
+
+import java.io.IOException;
+import java.util.Map;
+
+/**
+ *
+ * @author Frédéric Jouault
+ *
+ */
+public interface Origin {
+
+ public Object get(Map models) throws IOException;
+}
diff --git a/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/ResourceLocator.java b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/ResourceLocator.java
new file mode 100644
index 0000000..106d575
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/ResourceLocator.java
@@ -0,0 +1,28 @@
+/**
+ * Copyright (c) 2007, 2008 INRIA.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * INRIA - initial API and implementation
+ *
+ * $Id: ResourceLocator.java,v 1.4 2008/06/25 13:01:57 fjouault Exp $
+ */
+package org.eclipse.gmt.tcs.builder.ct;
+
+import java.io.IOException;
+
+import org.eclipse.m2m.atl.dsls.Resource;
+
+/**
+ *
+ * @author Frédéric Jouault
+ *
+ */
+public interface ResourceLocator {
+
+ public Resource getResource(String path) throws IOException;
+
+}
diff --git a/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/ACGTransformation.java b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/ACGTransformation.java
new file mode 100644
index 0000000..7f2e390
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/ACGTransformation.java
@@ -0,0 +1,131 @@
+/**
+ * Copyright (c) 2008 INRIA.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * INRIA - initial API and implementation
+ *
+ * $Id: ACGTransformation.java,v 1.2 2008/06/25 13:01:57 fjouault Exp $
+ */
+package org.eclipse.gmt.tcs.builder.ct.definition;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.gmt.tcs.builder.ct.usage.Source;
+import org.eclipse.gmt.tcs.builder.ct.usage.Target;
+import org.eclipse.gmt.tcs.builder.ct.usage.TransformationUsage;
+import org.eclipse.m2m.atl.dsls.textsource.ByteArrayTextSource;
+import org.eclipse.m2m.atl.dsls.textsource.TextSource;
+import org.eclipse.m2m.atl.engine.ASMRetriever;
+import org.eclipse.m2m.atl.engine.AtlLauncher;
+import org.eclipse.m2m.atl.engine.AtlModelHandler;
+import org.eclipse.m2m.atl.engine.vm.ASM;
+import org.eclipse.m2m.atl.engine.vm.ASMXMLReader;
+import org.eclipse.m2m.atl.engine.vm.ASMXMLWriter;
+import org.eclipse.m2m.atl.engine.vm.Debugger;
+import org.eclipse.m2m.atl.engine.vm.SimpleDebugger;
+import org.eclipse.m2m.atl.engine.vm.nativelib.ASMModel;
+
+/**
+ *
+ * @author Frédéric Jouault
+ *
+ */
+public class ACGTransformation extends Transformation {
+
+ public void execute(TransformationUsage usage, Map contextualModels) throws IOException {
+ Map libraries = new HashMap(this.libraries);
+ AtlModelHandler amh = AtlModelHandler.getDefault(AtlModelHandler.AMH_EMF);
+
+ Map models = new HashMap();
+ models.put("MOF", amh.getMof());
+ for(Iterator i = usage.sources.iterator() ; i.hasNext() ; ) {
+ Source source = (Source)i.next();
+ ATLSourceDefinition sourceDef = (ATLSourceDefinition)source.definition;
+ ASMModel sourceModel = (ASMModel)source.origin.get(contextualModels);
+ ASMModel sourceMetamodel = sourceDef.getMetamodel().getMetamodel();
+ sourceModel.setIsTarget(false);
+ models.put(sourceDef.getMetamodelName(), sourceMetamodel);
+ models.put(sourceDef.getModelName(), sourceModel);
+ }
+/* for(Iterator i = usage.targets.iterator() ; i.hasNext() ; ) {
+ Target target = (Target)i.next();
+ ATLTargetDefinition targetDef = (ATLTargetDefinition)target.definition;
+ ASMModel targetMetamodel = targetDef.getMetamodel().getMetamodel();
+ models.put(targetDef.getMetamodelName(), targetMetamodel);
+ ASMModel targetModel = amh.newModel(targetDef.getModelName(), "myTarget.xmi", targetMetamodel);
+ models.put(targetDef.getModelName(), targetModel);
+
+ contextualModels.put(target, targetModel);
+ }
+*/
+ IFile file = ASMRetriever.getFile();
+ List superimpose = Collections.EMPTY_LIST;
+
+ Map options = Collections.EMPTY_MAP;
+
+ Debugger debugger = new SimpleDebugger(
+ /* step = */ "true".equals(options.get("step")),
+ /* stepops = */ new ArrayList(),
+ /* deepstepops = */ new ArrayList(),
+ /* nostepops = */ new ArrayList(),
+ /* deepnostepops = */ new ArrayList(),
+ /* showStackTrace = */ true,
+ "true".equals(options.get("showSummary")),
+ "true".equals(options.get("profile")),
+ "true".equals(options.get("continueAfterError"))
+ );
+// debugger = new NetworkDebugger(6060, true);
+
+ Map asmParams = new HashMap();
+ asmParams.put("debug", "false");//$NON-NLS-1$//$NON-NLS-2$
+ asmParams.put("WriteTo", file.getLocation().toString());//$NON-NLS-1$
+ AtlLauncher.getDefault().launch(asm, libraries, models, asmParams, superimpose, options, debugger);
+ ASM asm = ASMRetriever.getASM(file);
+ Target target = (Target)usage.targets.get(0);
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ Map params = new HashMap();
+ params.putAll(options);
+ PrintWriter pw = new PrintWriter(baos);
+ new ASMXMLWriter(pw, false).print(asm);
+ pw.close();
+ contextualModels.put(target, new ByteArrayTextSource(baos.toByteArray()));
+ }
+
+ private ASM asm;
+ public Map libraries;
+
+ public ACGTransformation(TextSource transformationTS) throws IOException {
+ this(transformationTS, Collections.EMPTY_MAP);
+ }
+
+ public ACGTransformation(TextSource transformationTS, Map libraries) throws IOException {
+ asm = new ASMXMLReader().read(transformationTS.openStream());
+
+ this.libraries = new HashMap();
+ for(Iterator i = libraries.keySet().iterator() ; i.hasNext() ; ) {
+ Object key = i.next();
+ addLibrary(key, (TextSource)libraries.get(key));
+ }
+ }
+
+ public void addLibrary(Object name, TextSource ts) throws IOException {
+ this.libraries.put(name, new ASMXMLReader().read(ts.openStream()));
+ }
+
+ public ASM getASM() {
+ return asm;
+ }
+}
diff --git a/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/ATLRefinedTargetDefinition.java b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/ATLRefinedTargetDefinition.java
new file mode 100644
index 0000000..6fc646f
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/ATLRefinedTargetDefinition.java
@@ -0,0 +1,32 @@
+/**
+ * Copyright (c) 2008 INRIA.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * INRIA - initial API and implementation
+ *
+ * $Id: ATLRefinedTargetDefinition.java,v 1.2 2008/06/25 13:01:56 fjouault Exp $
+ */
+package org.eclipse.gmt.tcs.builder.ct.definition;
+
+/**
+ *
+ * @author Frédéric Jouault
+ *
+ */
+public class ATLRefinedTargetDefinition extends ModelTargetDefinition {
+
+ private ATLSourceDefinition source;
+
+ public ATLRefinedTargetDefinition(Transformation transformation, SourceDefinition source) {
+ super(transformation, ((ATLSourceDefinition)source).getMetamodel());
+ this.source = (ATLSourceDefinition)source;
+ }
+
+ public ATLSourceDefinition getSourceDefinition() {
+ return source;
+ }
+}
diff --git a/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/ATLSourceDefinition.java b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/ATLSourceDefinition.java
new file mode 100644
index 0000000..1ea532d
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/ATLSourceDefinition.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) 2007 INRIA.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * INRIA - initial API and implementation
+ *
+ * $Id: ATLSourceDefinition.java,v 1.2 2008/06/25 13:01:56 fjouault Exp $
+ */
+package org.eclipse.gmt.tcs.builder.ct.definition;
+
+import org.eclipse.gmt.tcs.builder.ct.Metamodel;
+
+/**
+ *
+ * @author Frédéric Jouault
+ *
+ */
+public class ATLSourceDefinition extends ModelSourceDefinition {
+
+ private String modelName;
+ private String metamodelName;
+
+ public ATLSourceDefinition(Transformation transformation, String modelName, String metamodelName, Metamodel metamodel) {
+ super(transformation, metamodel);
+ this.modelName = modelName;
+ this.metamodelName = metamodelName;
+ }
+
+ public String getModelName() {
+ return modelName;
+ }
+
+ public String getMetamodelName() {
+ return metamodelName;
+ }
+
+}
diff --git a/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/ATLTargetDefinition.java b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/ATLTargetDefinition.java
new file mode 100644
index 0000000..4384555
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/ATLTargetDefinition.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) 2007 INRIA.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * INRIA - initial API and implementation
+ *
+ * $Id: ATLTargetDefinition.java,v 1.2 2008/06/25 13:01:57 fjouault Exp $
+ */
+package org.eclipse.gmt.tcs.builder.ct.definition;
+
+import org.eclipse.gmt.tcs.builder.ct.Metamodel;
+
+/**
+ *
+ * @author Frédéric Jouault
+ *
+ */
+public class ATLTargetDefinition extends ModelTargetDefinition {
+
+ private String modelName;
+ private String metamodelName;
+
+ public ATLTargetDefinition(Transformation transformation, String modelName, String metamodelName, Metamodel metamodel) {
+ super(transformation, metamodel);
+ this.modelName = modelName;
+ this.metamodelName = metamodelName;
+ }
+
+ public String getModelName() {
+ return modelName;
+ }
+
+ public String getMetamodelName() {
+ return metamodelName;
+ }
+
+}
diff --git a/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/ATLTransformation.java b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/ATLTransformation.java
new file mode 100644
index 0000000..7dae3e7
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/ATLTransformation.java
@@ -0,0 +1,120 @@
+/**
+ * Copyright (c) 2007, 2008 INRIA.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * INRIA - initial API and implementation
+ *
+ * $Id: ATLTransformation.java,v 1.4 2008/06/25 13:01:57 fjouault Exp $
+ */
+package org.eclipse.gmt.tcs.builder.ct.definition;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.gmt.tcs.builder.ct.usage.Source;
+import org.eclipse.gmt.tcs.builder.ct.usage.Target;
+import org.eclipse.gmt.tcs.builder.ct.usage.TransformationUsage;
+import org.eclipse.m2m.atl.dsls.textsource.TextSource;
+import org.eclipse.m2m.atl.engine.AtlLauncher;
+import org.eclipse.m2m.atl.engine.AtlModelHandler;
+import org.eclipse.m2m.atl.engine.vm.ASM;
+import org.eclipse.m2m.atl.engine.vm.ASMXMLReader;
+import org.eclipse.m2m.atl.engine.vm.Debugger;
+import org.eclipse.m2m.atl.engine.vm.SimpleDebugger;
+import org.eclipse.m2m.atl.engine.vm.nativelib.ASMModel;
+
+/**
+ *
+ * @author Frédéric Jouault
+ *
+ */
+public class ATLTransformation extends Transformation {
+
+ public void execute(TransformationUsage usage, Map contextualModels) throws IOException {
+ Map libraries = new HashMap(this.libraries);
+ AtlModelHandler amh = AtlModelHandler.getDefault(AtlModelHandler.AMH_EMF);
+
+ Map models = new HashMap();
+ models.put("MOF", amh.getMof());
+ Map sourceModelBySourceDef = new HashMap();
+ for(Iterator i = usage.sources.iterator() ; i.hasNext() ; ) {
+ Source source = (Source)i.next();
+ ATLSourceDefinition sourceDef = (ATLSourceDefinition)source.definition;
+ ASMModel sourceModel = (ASMModel)source.origin.get(contextualModels);
+ ASMModel sourceMetamodel = sourceDef.getMetamodel().getMetamodel();
+ sourceModel.setIsTarget(false);
+ models.put(sourceDef.getMetamodelName(), sourceMetamodel);
+ models.put(sourceDef.getModelName(), sourceModel);
+ sourceModelBySourceDef.put(sourceDef, sourceModel);
+ }
+ for(Iterator i = usage.targets.iterator() ; i.hasNext() ; ) {
+ Target target = (Target)i.next();
+ ASMModel targetModel = null;
+ if(target.definition instanceof ATLTargetDefinition) {
+ ATLTargetDefinition targetDef = (ATLTargetDefinition)target.definition;
+ ASMModel targetMetamodel = targetDef.getMetamodel().getMetamodel();
+ models.put(targetDef.getMetamodelName(), targetMetamodel);
+ targetModel = amh.newModel(targetDef.getModelName(), "myTarget.xmi", targetMetamodel);
+ models.put(targetDef.getModelName(), targetModel);
+
+ } else {
+ ATLRefinedTargetDefinition targetDef = (ATLRefinedTargetDefinition)target.definition;
+ targetModel = (ASMModel)sourceModelBySourceDef.get(targetDef.getSourceDefinition());
+ }
+ contextualModels.put(target, targetModel);
+ }
+
+ List superimpose = Collections.EMPTY_LIST;
+
+ Map options = Collections.EMPTY_MAP;
+
+ Debugger debugger = new SimpleDebugger(
+ /* step = */ "true".equals(options.get("step")),
+ /* stepops = */ new ArrayList(),
+ /* deepstepops = */ new ArrayList(),
+ /* nostepops = */ new ArrayList(),
+ /* deepnostepops = */ new ArrayList(),
+ /* showStackTrace = */ true,
+ "true".equals(options.get("showSummary")),
+ "true".equals(options.get("profile")),
+ "true".equals(options.get("continueAfterError"))
+ );
+// debugger = new NetworkDebugger(6060, true);
+
+ AtlLauncher.getDefault().launch(asm, libraries, models, Collections.EMPTY_MAP, superimpose, options, debugger);
+ }
+
+ private ASM asm;
+ public Map libraries;
+
+ public ATLTransformation(TextSource transformationTS) throws IOException {
+ this(transformationTS, Collections.EMPTY_MAP);
+ }
+
+ public ATLTransformation(TextSource transformationTS, Map libraries) throws IOException {
+ asm = new ASMXMLReader().read(transformationTS.openStream());
+
+ this.libraries = new HashMap();
+ for(Iterator i = libraries.keySet().iterator() ; i.hasNext() ; ) {
+ Object key = i.next();
+ addLibrary(key, (TextSource)libraries.get(key));
+ }
+ }
+
+ public void addLibrary(Object name, TextSource ts) throws IOException {
+ this.libraries.put(name, new ASMXMLReader().read(ts.openStream()));
+ }
+
+ public ASM getASM() {
+ return asm;
+ }
+}
diff --git a/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/CompositeTransformationSourceDefinition.java b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/CompositeTransformationSourceDefinition.java
new file mode 100644
index 0000000..2a6e09a
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/CompositeTransformationSourceDefinition.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) 2007 INRIA.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * INRIA - initial API and implementation
+ *
+ * $Id: CompositeTransformationSourceDefinition.java,v 1.2 2008/06/25 13:01:57 fjouault Exp $
+ */
+package org.eclipse.gmt.tcs.builder.ct.definition;
+
+import java.util.Map;
+
+import org.eclipse.gmt.tcs.builder.ct.CompositeTransformation;
+import org.eclipse.gmt.tcs.builder.ct.Metamodel;
+import org.eclipse.gmt.tcs.builder.ct.Origin;
+
+/**
+ *
+ * @author Frédéric Jouault
+ *
+ */
+public class CompositeTransformationSourceDefinition extends ModelSourceDefinition implements Origin {
+
+ public CompositeTransformationSourceDefinition(CompositeTransformation transformation, Metamodel metamodel) {
+ super(transformation, metamodel);
+ }
+
+ public Object get(Map models) {
+ Object ret = models.get(this);
+
+ if(ret == null)
+ throw new RuntimeException("source of composite transformation missing");
+
+ return ret;
+ }
+
+}
diff --git a/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/CompositeTransformationTargetDefinition.java b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/CompositeTransformationTargetDefinition.java
new file mode 100644
index 0000000..c4e2a23
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/CompositeTransformationTargetDefinition.java
@@ -0,0 +1,42 @@
+/**
+ * Copyright (c) 2007 INRIA.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * INRIA - initial API and implementation
+ *
+ * $Id: CompositeTransformationTargetDefinition.java,v 1.2 2008/06/25 13:01:57 fjouault Exp $
+ */
+package org.eclipse.gmt.tcs.builder.ct.definition;
+
+import java.io.IOException;
+import java.util.Map;
+
+import org.eclipse.gmt.tcs.builder.ct.Metamodel;
+import org.eclipse.gmt.tcs.builder.ct.usage.Target;
+
+/**
+ *
+ * @author Frédéric Jouault
+ *
+ */
+public class CompositeTransformationTargetDefinition extends ModelTargetDefinition {
+
+ private Target source;
+
+ public CompositeTransformationTargetDefinition(Transformation transformation, Metamodel metamodel) {
+ super(transformation, metamodel);
+ }
+
+ public void setSource(Target source) {
+ this.source = source;
+ }
+
+ public Object get(Map models) throws IOException {
+ return source.get(models);
+ }
+
+}
diff --git a/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/ModelSourceDefinition.java b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/ModelSourceDefinition.java
new file mode 100644
index 0000000..92f6b96
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/ModelSourceDefinition.java
@@ -0,0 +1,35 @@
+/**
+ * Copyright (c) 2007 INRIA.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * INRIA - initial API and implementation
+ *
+ * $Id: ModelSourceDefinition.java,v 1.2 2008/06/25 13:01:57 fjouault Exp $
+ */
+package org.eclipse.gmt.tcs.builder.ct.definition;
+
+import org.eclipse.gmt.tcs.builder.ct.Metamodel;
+
+/**
+ *
+ * @author Frédéric Jouault
+ *
+ */
+public class ModelSourceDefinition extends SourceDefinition {
+
+ private Metamodel metamodel;
+
+ public ModelSourceDefinition(Transformation transformation, Metamodel metamodel) {
+ super(transformation);
+ this.metamodel = metamodel;
+ }
+
+ public Metamodel getMetamodel() {
+ return metamodel;
+ }
+
+}
diff --git a/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/ModelTargetDefinition.java b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/ModelTargetDefinition.java
new file mode 100644
index 0000000..53b8331
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/ModelTargetDefinition.java
@@ -0,0 +1,34 @@
+/**
+ * Copyright (c) 2007 INRIA.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * INRIA - initial API and implementation
+ *
+ * $Id: ModelTargetDefinition.java,v 1.2 2008/06/25 13:01:56 fjouault Exp $
+ */
+package org.eclipse.gmt.tcs.builder.ct.definition;
+
+import org.eclipse.gmt.tcs.builder.ct.Metamodel;
+
+/**
+ *
+ * @author Frédéric Jouault
+ *
+ */
+public class ModelTargetDefinition extends TargetDefinition {
+
+ private Metamodel metamodel;
+
+ public ModelTargetDefinition(Transformation transformation, Metamodel metamodel) {
+ super(transformation);
+ this.metamodel = metamodel;
+ }
+
+ public Metamodel getMetamodel() {
+ return metamodel;
+ }
+}
diff --git a/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/SourceDefinition.java b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/SourceDefinition.java
new file mode 100644
index 0000000..10165d1
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/SourceDefinition.java
@@ -0,0 +1,28 @@
+/**
+ * Copyright (c) 2007 INRIA.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * INRIA - initial API and implementation
+ *
+ * $Id: SourceDefinition.java,v 1.2 2008/06/25 13:01:56 fjouault Exp $
+ */
+package org.eclipse.gmt.tcs.builder.ct.definition;
+
+/**
+ *
+ * @author Frédéric Jouault
+ *
+ */
+public class SourceDefinition {
+
+ public Transformation transformation;
+
+ public SourceDefinition(Transformation transformation) {
+ this.transformation = transformation;
+ transformation.sources.add(this);
+ }
+}
diff --git a/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/TCSExtraction.java b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/TCSExtraction.java
new file mode 100644
index 0000000..ddaac6b
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/TCSExtraction.java
@@ -0,0 +1,74 @@
+/**
+ * Copyright (c) 2007, 2008 INRIA.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * INRIA - initial API and implementation
+ *
+ * $Id: TCSExtraction.java,v 1.5 2008/06/25 13:01:57 fjouault Exp $
+ */
+package org.eclipse.gmt.tcs.builder.ct.definition;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.gmt.tcs.builder.ct.Metamodel;
+import org.eclipse.gmt.tcs.builder.ct.usage.Source;
+import org.eclipse.gmt.tcs.builder.ct.usage.Target;
+import org.eclipse.gmt.tcs.builder.ct.usage.TransformationUsage;
+import org.eclipse.gmt.tcs.extractor.TCSExtractor;
+import org.eclipse.m2m.atl.dsls.textsource.ByteArrayTextSource;
+import org.eclipse.m2m.atl.engine.AtlEMFModelHandler;
+import org.eclipse.m2m.atl.engine.AtlModelHandler;
+import org.eclipse.m2m.atl.engine.extractors.Extractor;
+import org.eclipse.m2m.atl.engine.vm.nativelib.ASMModel;
+
+/**
+ *
+ * @author Frédéric Jouault
+ *
+ */
+public class TCSExtraction extends Transformation {
+
+ public void execute(TransformationUsage usage, Map models) throws IOException {
+ Source source = (Source)usage.sources.get(0);
+ ASMModel sourceModel = (ASMModel)source.origin.get(models);
+ Extractor ext = new TCSExtractor();
+ Map params = new HashMap();
+ params.put("indentString", " ");
+ params.put("format", syntax);
+ params.put("serializeComments", "true");
+ Target target = (Target)usage.targets.get(0);
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ params.putAll(options);
+ ext.extract(sourceModel, baos, params);
+ models.put(target, new ByteArrayTextSource(baos.toByteArray()));
+ }
+
+ private ASMModel syntax;
+
+ public TCSExtraction(Metamodel tcsmm, URI syntaxURI) throws IOException {
+ AtlEMFModelHandler amh = (AtlEMFModelHandler)AtlModelHandler.getDefault(AtlModelHandler.AMH_EMF);
+
+ ASMModel tcsMetamodel = tcsmm.getMetamodel();
+ syntax = amh.loadModel(tcsMetamodel.getName() + "-TCS.xmi", tcsMetamodel, syntaxURI);
+ }
+
+ public TCSExtraction(Metamodel tcsmm, URL syntaxURL) throws IOException {
+ AtlEMFModelHandler amh = (AtlEMFModelHandler)AtlModelHandler.getDefault(AtlModelHandler.AMH_EMF);
+
+ ASMModel tcsMetamodel = tcsmm.getMetamodel();
+ InputStream in = syntaxURL.openStream();
+ syntax = amh.loadModel(tcsMetamodel.getName() + "-TCS.xmi", tcsMetamodel, in);
+ in.close();
+ }
+
+}
diff --git a/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/TCSInjection.java b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/TCSInjection.java
new file mode 100644
index 0000000..7a06ed8
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/TCSInjection.java
@@ -0,0 +1,114 @@
+/**
+ * Copyright (c) 2007, 2008 INRIA.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * INRIA - initial API and implementation
+ *
+ * $Id: TCSInjection.java,v 1.6 2008/06/25 13:01:56 fjouault Exp $
+ */
+package org.eclipse.gmt.tcs.builder.ct.definition;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.gmt.tcs.builder.ProblemReporter;
+import org.eclipse.gmt.tcs.builder.ct.Metamodel;
+import org.eclipse.gmt.tcs.builder.ct.usage.Source;
+import org.eclipse.gmt.tcs.builder.ct.usage.Target;
+import org.eclipse.gmt.tcs.builder.ct.usage.TransformationUsage;
+import org.eclipse.gmt.tcs.injector.TCSInjector;
+import org.eclipse.m2m.atl.dsls.textsource.TextSource;
+import org.eclipse.m2m.atl.engine.AtlModelHandler;
+import org.eclipse.m2m.atl.engine.injectors.Injector;
+import org.eclipse.m2m.atl.engine.vm.nativelib.ASMModel;
+
+/**
+ *
+ * @author Frédéric Jouault
+ *
+ */
+public class TCSInjection extends Transformation {
+
+ public void execute(TransformationUsage usage, Map models) throws IOException {
+ AtlModelHandler amh = AtlModelHandler.getDefault(AtlModelHandler.AMH_EMF);
+
+ Target target = null;
+ ModelTargetDefinition targetDef = null;
+ Target problem = null;
+ ModelTargetDefinition problemDef = null;
+ for(Iterator i = usage.targets.iterator() ; i.hasNext() ; ) {
+ Target tgt = (Target)i.next();
+ ModelTargetDefinition tgtDef = (ModelTargetDefinition)tgt.definition;
+ if("Problem".equals(tgtDef.getMetamodel().name)) {
+ problem = tgt;
+ problemDef = tgtDef;
+ } else {
+ target = tgt;
+ targetDef = tgtDef;
+ }
+ }
+
+
+ Injector inj = new TCSInjector();
+ Map params = new HashMap();
+ String name = targetDef.getMetamodel().getName();
+ params.put("name", name);
+ params.put("parserGenerator", parserGenerator);
+ try {
+ params.put("lexerClass", getClass().getClassLoader().loadClass("org.eclipse.gmt.tcs.injector." + name + "_ANTLR3Lexer"));
+ params.put("parserClass", getClass().getClassLoader().loadClass("org.eclipse.gmt.tcs.injector." + name + "_ANTLR3Parser"));
+ } catch (ClassNotFoundException e) {
+ IOException ioe = new IOException("problem loading lexer and/or parser class");
+ ioe.initCause(e);
+ throw ioe;
+ }
+ params.put("tabSize", "1");
+ ASMModel problemModel = null;
+ ProblemReporter problemReporter = null;
+ if(problemMetamodel != null)
+ problemReporter = (ProblemReporter)models.get("problemReporter");
+ if(problemDef != null) {
+ problemModel = amh.newModel("pbs", "pbs.xmi", problemDef.getMetamodel().getMetamodel());
+ params.put("problems", problemModel);
+ } else if(problemReporter != null) {
+ problemModel = amh.newModel("pbs", "pbs.xmi", problemMetamodel.getMetamodel());
+ params.put("problems", problemModel);
+ }
+ ASMModel targetModel = amh.newModel("myTarget", "myTarget.xmi", targetDef.getMetamodel().getMetamodel());
+ TextSource textSource = (TextSource)((Source)usage.sources.get(0)).origin.get(models);
+ InputStream stream = textSource.openStream();
+ inj.inject(targetModel, stream, params);
+ stream.close();
+ models.put(target, targetModel);
+ if(problemDef != null) {
+ models.put(problem, problemModel);
+ } else if(problemReporter != null) {
+ if(!problemReporter.reportProblem(textSource, problemModel)) {
+ models.remove(target);
+ }
+ }
+ }
+
+ private String parserGenerator;
+ private Metamodel problemMetamodel;
+
+ public TCSInjection() throws IOException {
+ this(null);
+ }
+
+ public TCSInjection(Metamodel problemMetamodel) throws IOException {
+ this(problemMetamodel, "antlr3");
+ }
+
+ public TCSInjection(Metamodel problemMetamodel, String parserGenerator) throws IOException {
+ this.parserGenerator = parserGenerator;
+ this.problemMetamodel = problemMetamodel;
+ }
+}
diff --git a/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/TargetDefinition.java b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/TargetDefinition.java
new file mode 100644
index 0000000..4c9a152
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/TargetDefinition.java
@@ -0,0 +1,28 @@
+/**
+ * Copyright (c) 2007 INRIA.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * INRIA - initial API and implementation
+ *
+ * $Id: TargetDefinition.java,v 1.2 2008/06/25 13:01:57 fjouault Exp $
+ */
+package org.eclipse.gmt.tcs.builder.ct.definition;
+
+/**
+ *
+ * @author Frédéric Jouault
+ *
+ */
+public class TargetDefinition {
+
+ public Transformation transformation;
+
+ public TargetDefinition(Transformation transformation) {
+ this.transformation = transformation;
+ transformation.targets.add(this);
+ }
+}
diff --git a/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/Transformation.java b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/Transformation.java
new file mode 100644
index 0000000..d9e4fed
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/definition/Transformation.java
@@ -0,0 +1,47 @@
+/**
+ * Copyright (c) 2007 INRIA.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * INRIA - initial API and implementation
+ *
+ * $Id: Transformation.java,v 1.2 2008/06/25 13:01:57 fjouault Exp $
+ */
+package org.eclipse.gmt.tcs.builder.ct.definition;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.gmt.tcs.builder.ct.usage.TransformationUsage;
+
+/**
+ *
+ * @author Frédéric Jouault
+ *
+ */
+public abstract class Transformation {
+
+ protected Map options = new HashMap();
+ public List sources = new ArrayList();
+ public List targets = new ArrayList();
+
+ public void addSource(SourceDefinition source) {
+ sources.add(source);
+ }
+
+ public void addTarget(TargetDefinition target) {
+ targets.add(target);
+ }
+
+ public abstract void execute(TransformationUsage usage, Map models) throws IOException;
+
+ public void setOption(String name, String value) {
+ options.put(name, value);
+ }
+}
diff --git a/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/usage/Source.java b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/usage/Source.java
new file mode 100644
index 0000000..9215670
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/usage/Source.java
@@ -0,0 +1,36 @@
+/**
+ * Copyright (c) 2007, 2008 INRIA.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * INRIA - initial API and implementation
+ *
+ * $Id: Source.java,v 1.3 2008/06/25 13:01:57 fjouault Exp $
+ */
+package org.eclipse.gmt.tcs.builder.ct.usage;
+
+import org.eclipse.gmt.tcs.builder.ct.Origin;
+import org.eclipse.gmt.tcs.builder.ct.definition.SourceDefinition;
+
+/**
+ *
+ * @author Frédéric Jouault
+ *
+ */
+public class Source {
+
+// private TransformationUsage usage;
+ public SourceDefinition definition;
+ public Origin origin;
+
+ public Source(TransformationUsage usage, SourceDefinition definition, Origin origin) {
+// this.usage = usage;
+ this.definition = definition;
+ this.origin = origin;
+
+ usage.sources.add(this);
+ }
+}
diff --git a/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/usage/Target.java b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/usage/Target.java
new file mode 100644
index 0000000..f667914
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/usage/Target.java
@@ -0,0 +1,47 @@
+/**
+ * Copyright (c) 2007, 2008 INRIA.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * INRIA - initial API and implementation
+ *
+ * $Id: Target.java,v 1.3 2008/06/25 13:01:57 fjouault Exp $
+ */
+package org.eclipse.gmt.tcs.builder.ct.usage;
+
+import java.io.IOException;
+import java.util.Map;
+
+import org.eclipse.gmt.tcs.builder.ct.Origin;
+import org.eclipse.gmt.tcs.builder.ct.definition.TargetDefinition;
+
+/**
+ *
+ * @author Frédéric Jouault
+ *
+ */
+public class Target implements Origin {
+
+ private TransformationUsage usage;
+ public TargetDefinition definition;
+
+ public Target(TransformationUsage usage, TargetDefinition definition) {
+ this.usage = usage;
+ this.definition = definition;
+
+ usage.targets.add(this);
+ }
+
+ public Object get(Map models) throws IOException {
+ Object ret = models.get(this);
+
+ if(ret == null) {
+ definition.transformation.execute(usage, models);
+ }
+
+ return models.get(this);
+ }
+}
diff --git a/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/usage/TransformationUsage.java b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/usage/TransformationUsage.java
new file mode 100644
index 0000000..734a5ff
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.builder/src/org/eclipse/gmt/tcs/builder/ct/usage/TransformationUsage.java
@@ -0,0 +1,35 @@
+/**
+ * Copyright (c) 2007, 2008 INRIA.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * INRIA - initial API and implementation
+ *
+ * $Id: TransformationUsage.java,v 1.3 2008/06/25 13:01:57 fjouault Exp $
+ */
+package org.eclipse.gmt.tcs.builder.ct.usage;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.gmt.tcs.builder.ct.definition.Transformation;
+
+/**
+ *
+ * @author Frédéric Jouault
+ *
+ */
+public class TransformationUsage {
+
+// private Transformation transformation;
+ public List sources = new ArrayList();
+ public List targets = new ArrayList();
+
+ public TransformationUsage(Transformation transformation) {
+// this.transformation = transformation;
+ }
+
+}
diff --git a/plugins/org.eclipse.gmt.tcs.dsls/.classpath b/plugins/org.eclipse.gmt.tcs.dsls/.classpath
new file mode 100644
index 0000000..c119047
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.dsls/.classpath
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry exported="true" kind="lib" path="resources/Annotation/Syntax/Annotation-parser.jar"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="lib" path="resources/KM3-2005/Syntax/KM3-parser.jar"/>
+ <classpathentry kind="lib" path="resources/TCS/Syntax/TCS-parser.jar"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.gmt.tcs.dsls/.project b/plugins/org.eclipse.gmt.tcs.dsls/.project
new file mode 100644
index 0000000..70e285c
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.dsls/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.gmt.tcs.dsls</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.gmt.tcs.dsls/META-INF/MANIFEST.MF b/plugins/org.eclipse.gmt.tcs.dsls/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..01465cd
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.dsls/META-INF/MANIFEST.MF
@@ -0,0 +1,19 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.gmt.tcs.dsls;singleton:=true
+Bundle-Version: 0.8.0
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-ClassPath: resources/KM3-2005/Syntax/KM3-parser.jar,
+ resources/TCS/Syntax/TCS-parser.jar,
+ resources/Annotation/Syntax/Annotation-parser.jar,
+ .
+Export-Package: org.eclipse.gmt.tcs.dsls,
+ org.eclipse.gmt.tcs.injector
+Require-Bundle: org.eclipse.m2m.atl.dsls;visibility:=reexport,
+ org.eclipse.core.runtime,
+ org.eclipse.gmt.tcs.metadata
+Eclipse-LazyStart: true
+Bundle-Activator: org.eclipse.gmt.tcs.dsls.Activator
+Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/plugins/org.eclipse.gmt.tcs.dsls/about.html b/plugins/org.eclipse.gmt.tcs.dsls/about.html
new file mode 100644
index 0000000..7cc291c
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.dsls/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>January 21, 2008</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/plugins/org.eclipse.gmt.tcs.dsls/build.properties b/plugins/org.eclipse.gmt.tcs.dsls/build.properties
new file mode 100644
index 0000000..ba52230
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.dsls/build.properties
@@ -0,0 +1,18 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ resources/,\
+ plugin.xml,\
+ resources/Annotation/Syntax/Annotation-parser.jar,\
+ plugin.properties
+src.includes = src/,\
+ org.eclipse.gmt.tcs.dsls copy.binaries.from_ammacore.xml.launch,\
+ copy.binaries.from_ammacore.xml,\
+ build.properties,\
+ .project,\
+ .classpath,\
+ META-INF/,\
+ plugin.xml,\
+ resources/,\
+ about.html
diff --git a/plugins/org.eclipse.gmt.tcs.dsls/copy.binaries.from_ammacore.xml b/plugins/org.eclipse.gmt.tcs.dsls/copy.binaries.from_ammacore.xml
new file mode 100644
index 0000000..65d79b8
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.dsls/copy.binaries.from_ammacore.xml
@@ -0,0 +1,27 @@
+<project name="copy.binaries.from.ammacore" default="all">
+ <property name="ammacore.path" value="/AMMACore"/>
+ <property name="copy.to.path" value="/org.eclipse.gmt.tcs.dsls/resources"/>
+
+ <eclipse.convertPath property="ammacore.absolute.path" resourcepath="${ammacore.path}"/>
+ <eclipse.convertPath property="copy.to.absolute.path" resourcepath="${copy.to.path}"/>
+
+ <target name="all">
+ <loadfile property="files" srcfile="${copy.to.absolute.path}/contents.list">
+ <filterchain>
+ <prefixlines prefix=","/>
+ <striplinebreaks/>
+ </filterchain>
+ </loadfile>
+
+ <delete>
+ <fileset dir="${copy.to.absolute.path}" includes="${files}"/>
+ </delete>
+
+ <copy todir="${copy.to.absolute.path}">
+ <fileset dir="${ammacore.absolute.path}" includes="${files}"/>
+ </copy>
+
+ <eclipse.refreshLocal resource="${copy.to.path}" depth="infinite"/>
+ </target>
+
+</project> \ No newline at end of file
diff --git a/plugins/org.eclipse.gmt.tcs.dsls/org.eclipse.gmt.tcs.dsls copy.binaries.from_ammacore.xml.launch b/plugins/org.eclipse.gmt.tcs.dsls/org.eclipse.gmt.tcs.dsls copy.binaries.from_ammacore.xml.launch
new file mode 100644
index 0000000..0a76f87
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.dsls/org.eclipse.gmt.tcs.dsls copy.binaries.from_ammacore.xml.launch
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.ant.AntLaunchConfigurationType">
+<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
+<booleanAttribute key="org.eclipse.ant.uiSET_INPUTHANDLER" value="false"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.gmt.tcs.dsls/copy.binaries.from_ammacore.xml"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.gmt.tcs.dsls"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.gmt.tcs.dsls/copy.binaries.from_ammacore.xml}"/>
+<stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
+</launchConfiguration>
diff --git a/plugins/org.eclipse.gmt.tcs.dsls/plugin.properties b/plugins/org.eclipse.gmt.tcs.dsls/plugin.properties
new file mode 100644
index 0000000..e2cf858
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.dsls/plugin.properties
@@ -0,0 +1,3 @@
+# NLS_MESSAGEFORMAT_VAR
+pluginName=Textual Concrete Syntax (TCS) DSLs (Incubation)
+providerName=Eclipse.org
diff --git a/plugins/org.eclipse.gmt.tcs.dsls/plugin.xml b/plugins/org.eclipse.gmt.tcs.dsls/plugin.xml
new file mode 100644
index 0000000..ad9d84d
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.dsls/plugin.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+ <extension
+ point="org.eclipse.m2m.atl.dsls.dslresourceprovider">
+ <dsl.resourceprovider class="org.eclipse.gmt.tcs.dsls.DSLResourceProvider"/>
+ </extension>
+ <extension
+ point="org.eclipse.gmt.tcs.metadata.language">
+ <language
+ editor="resources/KM3-2005/Editor/KM3-Editor.xmi"
+ extension="km3"
+ metamodel="resources/KM3-2005/Metamodel/KM3.ecore"
+ name="KM3"
+ outline="resources/KM3-2005/Outline/KM3-Outline.xmi"
+ parser="resources/KM3-2005/Syntax/KM3-parser.jar"
+ syntax="resources/KM3-2005/Syntax/KM3-TCS.xmi">
+ </language>
+ <language
+ editor="resources/TCS/Editor/TCS-Editor.xmi"
+ extension="tcs"
+ metamodel="resources/TCS/Metamodel/TCS.ecore"
+ name="TCS"
+ outline="resources/TCS/Outline/TCS-Outline.xmi"
+ parser="resources/TCS/Syntax/TCS-parser.jar"
+ syntax="resources/TCS/Syntax/TCS-TCS.xmi">
+ </language>
+ </extension>
+
+</plugin>
diff --git a/plugins/org.eclipse.gmt.tcs.dsls/resources/ANTLR/Metamodel/ANTLR.ecore b/plugins/org.eclipse.gmt.tcs.dsls/resources/ANTLR/Metamodel/ANTLR.ecore
new file mode 100644
index 0000000..75ef3bc
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.dsls/resources/ANTLR/Metamodel/ANTLR.ecore
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore">
+ <ecore:EPackage name="Core" nsURI="http://www.eclipse.org/gmt/tcs/2007/ANTLR-Core" nsPrefix="antlrcore">
+ <eClassifiers xsi:type="ecore:EClass" name="LocatedElement" abstract="true">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="location" ordered="false" unique="false" lowerBound="1" eType="/3/String"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="id" ordered="false" unique="false" lowerBound="1" eType="/3/String"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="NamedElement" abstract="true" eSuperTypes="/0/LocatedElement">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" ordered="false" unique="false" lowerBound="1" eType="/3/String"/>
+ </eClassifiers>
+ </ecore:EPackage>
+ <ecore:EPackage name="ANTLR" nsURI="http://www.eclipse.org/gmt/tcs/2007/ANTLR" nsPrefix="antlr">
+ <eClassifiers xsi:type="ecore:EClass" name="Grammar" eSuperTypes="/0/NamedElement">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="package" unique="false" lowerBound="1" eType="/3/String"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="actions" upperBound="-1" eType="/2/SemanticAction" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="rules" upperBound="-1" eType="/1/ProductionRule" containment="true" eOpposite="/1/ProductionRule/grammar"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="options" unique="false" lowerBound="1" eType="/3/String"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="lexer" unique="false" lowerBound="1" eType="/3/String"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="lexerRules" upperBound="-1" eType="/1/ProductionRule" containment="true" eOpposite="/1/ProductionRule/grammarAsLexer"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="ProductionRule" eSuperTypes="/0/NamedElement">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="grammar" ordered="false" eType="/1/Grammar" eOpposite="/1/Grammar/rules"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="grammarAsLexer" ordered="false" eType="/1/Grammar" eOpposite="/1/Grammar/lexerRules"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="actions" upperBound="-1" eType="/2/SemanticAction" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="returns" ordered="false" eType="/2/VariableDeclaration" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="declarations" upperBound="-1" eType="/2/VariableDeclaration" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="needReturnDeclaration" ordered="false" unique="false" lowerBound="1" eType="/3/Boolean"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="labelDeclarations" upperBound="-1" eType="/2/VariableDeclaration" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="parameters" upperBound="-1" eType="/2/Parameter" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="expression" ordered="false" lowerBound="1" eType="/1/Expression" containment="true" eOpposite="/1/Expression/rule"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="options" unique="false" upperBound="-1" eType="/3/String"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Expression" abstract="true" eSuperTypes="/0/LocatedElement">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="sequence" ordered="false" eType="/1/Sequence_" eOpposite="/1/Sequence_/expression"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="rule" ordered="false" eType="/1/ProductionRule" eOpposite="/1/ProductionRule/expression"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="prevAction" ordered="false" eType="/2/SemanticAction" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="action" ordered="false" eType="/2/SemanticAction" containment="true" eOpposite="/2/SemanticAction/expression"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="storeTo" ordered="false" eType="/2/Variable" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="concatenation" ordered="false" eType="/1/Concatenation" eOpposite="/1/Concatenation/expressions"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="alternative" ordered="false" eType="/1/Alternative" eOpposite="/1/Alternative/expressions"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="syntacticPredicate" ordered="false" unique="false" eType="/3/String"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="options" unique="false" upperBound="-1" eType="/3/String"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Sequence_" eSuperTypes="/1/Expression">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="expression" ordered="false" lowerBound="1" eType="/1/Expression" containment="true" eOpposite="/1/Expression/sequence"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="lower" ordered="false" unique="false" lowerBound="1" eType="/3/Integer"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="upper" ordered="false" unique="false" lowerBound="1" eType="/3/Integer"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Concatenation" eSuperTypes="/1/Expression">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="expressions" lowerBound="1" upperBound="-1" eType="/1/Expression" containment="true" eOpposite="/1/Expression/concatenation"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Alternative" eSuperTypes="/1/Expression">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="expressions" lowerBound="1" upperBound="-1" eType="/1/Expression" containment="true" eOpposite="/1/Expression/alternative"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="RuleCall" eSuperTypes="/1/Expression">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="calledRule" ordered="false" lowerBound="1" eType="/1/ProductionRule"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="arguments" ordered="false" upperBound="-1" eType="/2/ActionExpression" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="TokenCall" eSuperTypes="/1/Expression">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" unique="false" lowerBound="1" eType="/3/String"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="storeASTTo" unique="false" eType="/3/String"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Terminal" eSuperTypes="/1/Expression">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" ordered="false" unique="false" lowerBound="1" eType="/3/String"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="CharTerminal" eSuperTypes="/1/Expression">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" ordered="false" unique="false" lowerBound="1" eType="/3/String"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Negation" eSuperTypes="/1/Expression">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="expression" ordered="false" lowerBound="1" eType="/1/Expression" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Drop" eSuperTypes="/1/Expression">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="expression" ordered="false" lowerBound="1" eType="/1/Expression" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Interval" eSuperTypes="/1/Expression">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="start" ordered="false" lowerBound="1" eType="/1/CharTerminal" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="end" ordered="false" lowerBound="1" eType="/1/CharTerminal" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="LiteralExpression" eSuperTypes="/1/Expression">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" ordered="false" unique="false" lowerBound="1" eType="/3/String"/>
+ </eClassifiers>
+ </ecore:EPackage>
+ <ecore:EPackage name="Actions" nsURI="http://www.eclipse.org/gmt/tcs/2007/ANTLR-Actions" nsPrefix="antlractions">
+ <eClassifiers xsi:type="ecore:EClass" name="Type" eSuperTypes="/0/NamedElement"/>
+ <eClassifiers xsi:type="ecore:EClass" name="VariableDeclaration" eSuperTypes="/0/NamedElement">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="variable" ordered="false" upperBound="-1" eType="/2/Variable" eOpposite="/2/Variable/declaration"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" ordered="false" unique="false" lowerBound="1" eType="/3/String"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="initialValue" ordered="false" unique="false" lowerBound="1" eType="/3/String"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Parameter" eSuperTypes="/2/VariableDeclaration"/>
+ <eClassifiers xsi:type="ecore:EClass" name="Variable" eSuperTypes="/2/ActionExpression">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="declaration" ordered="false" lowerBound="1" eType="/2/VariableDeclaration" eOpposite="/2/VariableDeclaration/variable"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="SemanticAction" abstract="true" eSuperTypes="/0/LocatedElement">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="block" ordered="false" eType="/2/SemanticActionBlock" eOpposite="/2/SemanticActionBlock/actions"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="expression" ordered="false" lowerBound="1" eType="/1/Expression" eOpposite="/1/Expression/action"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="SimpleSemanticAction" eSuperTypes="/2/SemanticAction">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" ordered="false" unique="false" lowerBound="1" eType="/3/String"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="SemanticActionBlock" eSuperTypes="/2/SemanticAction">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="actions" ordered="false" upperBound="-1" eType="/2/SemanticAction" containment="true" eOpposite="/2/SemanticAction/block"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="ActionExpression" abstract="true" eSuperTypes="/0/LocatedElement">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" ordered="false" unique="false" lowerBound="1" eType="/3/String"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="TextualExpression" eSuperTypes="/2/ActionExpression">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" ordered="false" unique="false" lowerBound="1" eType="/3/String"/>
+ </eClassifiers>
+ </ecore:EPackage>
+ <ecore:EPackage name="PrimitiveTypes" nsURI="http://www.eclipse.org/gmt/tcs/2007/ANTLR-PrimitiveTypes" nsPrefix="pt">
+ <eClassifiers xsi:type="ecore:EDataType" name="Boolean" instanceClassName="boolean"/>
+ <eClassifiers xsi:type="ecore:EDataType" name="Integer" instanceClassName="int"/>
+ <eClassifiers xsi:type="ecore:EDataType" name="String" instanceClassName="java.lang.String"/>
+ </ecore:EPackage>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.gmt.tcs.dsls/resources/ANTLR/Syntax/ANTLR-TCS.xmi b/plugins/org.eclipse.gmt.tcs.dsls/resources/ANTLR/Syntax/ANTLR-TCS.xmi
new file mode 100644
index 0000000..b96ea64
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.dsls/resources/ANTLR/Syntax/ANTLR-TCS.xmi
@@ -0,0 +1,638 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tcs="http://www.eclipse.org/gmt/tcs/2007/TCS">
+ <tcs:ConcreteSyntax location="7:1-313:2" name="ANTLR" lexer="&#xD;&#xA;&#x9;&#x9;// no need for lexer for a serialization-only TCS model&#xD;&#xA;&#x9;">
+ <commentsBefore>-- @date&#x9;&#x9;2007/09/19</commentsBefore>
+ <commentsBefore>-- @description&#x9;This TCS model defines the syntax of the ANTLRv3 language.</commentsBefore>
+ <commentsBefore>-- REMARK: this model can only be used for serialization so far.</commentsBefore>
+ <commentsBefore>-- NOT TO BE USED as a typical example of TCS model.</commentsBefore>
+ <templates xsi:type="tcs:PrimitiveTemplate" location="9:2-10:21" name="identifier" typeName="String" isDefault="true" tokenName="NAME" value="%token%"/>
+ <templates xsi:type="tcs:PrimitiveTemplate" location="12:2-14:50" name="stringSymbol" typeName="String" tokenName="STRING" value="%token%" serializer="''' + %value%.toCString() + '''"/>
+ <templates xsi:type="tcs:PrimitiveTemplate" location="16:2-17:38" name="integerSymbol" typeName="Integer" isDefault="true" tokenName="INT" value="Integer.valueOf(%token%)"/>
+ <templates xsi:type="tcs:PrimitiveTemplate" location="19:2-20:38" name="booleanSymbol" typeName="Boolean" isDefault="true" tokenName="BOOLEAN" value="Boolean.valueOf(%token%)"/>
+ <templates xsi:type="tcs:ClassTemplate" location="22:2-86:4" name="Grammar" isMain="true">
+ <templateSequence location="24:4-85:5">
+ <elements xsi:type="tcs:LiteralRef" location="24:4-24:13" referredLiteral="/1"/>
+ <elements xsi:type="tcs:Property" location="24:14-24:18" name="name"/>
+ <elements xsi:type="tcs:CustomSeparator" location="24:19-24:29" name="no_space"/>
+ <elements xsi:type="tcs:LiteralRef" location="24:30-24:39" referredLiteral="/2"/>
+ <elements xsi:type="tcs:LiteralRef" location="24:40-24:43" referredLiteral="/0/@symbols.8"/>
+ <elements xsi:type="tcs:ConditionalElement" location="25:4-29:5">
+ <condition xsi:type="tcs:AndExp" location="25:5-25:23">
+ <expressions xsi:type="tcs:IsDefinedExp" location="25:5-25:23" propertyName="options"/>
+ </condition>
+ <thenSequence location="26:5-28:10">
+ <elements xsi:type="tcs:LiteralRef" location="26:5-26:14" referredLiteral="/3"/>
+ <elements xsi:type="tcs:LiteralRef" location="26:15-26:18" referredLiteral="/0/@symbols.6"/>
+ <elements xsi:type="tcs:Block" location="26:19-28:6">
+ <blockSequence location="27:6-27:13">
+ <elements xsi:type="tcs:Property" location="27:6-27:13" name="options"/>
+ </blockSequence>
+ </elements>
+ <elements xsi:type="tcs:LiteralRef" location="28:7-28:10" referredLiteral="/0/@symbols.7"/>
+ </thenSequence>
+ </elements>
+ <elements xsi:type="tcs:ConditionalElement" location="30:4-62:5">
+ <condition xsi:type="tcs:AndExp" location="30:5-30:23">
+ <expressions xsi:type="tcs:IsDefinedExp" location="30:5-30:23" propertyName="package"/>
+ </condition>
+ <thenSequence location="31:5-61:3">
+ <elements xsi:type="tcs:LiteralRef" location="31:5-31:14" referredLiteral="/4"/>
+ <elements xsi:type="tcs:LiteralRef" location="31:15-31:18" referredLiteral="/0/@symbols.6"/>
+ <elements xsi:type="tcs:LiteralRef" location="32:6-32:15" referredLiteral="/5"/>
+ <elements xsi:type="tcs:Property" location="32:16-32:23" name="package"/>
+ <elements xsi:type="tcs:LiteralRef" location="32:24-32:27" referredLiteral="/0/@symbols.8"/>
+ <elements xsi:type="tcs:LiteralRef" location="33:5-33:8" referredLiteral="/0/@symbols.7"/>
+ <elements xsi:type="tcs:LiteralRef" location="34:5-34:21" referredLiteral="/6"/>
+ <elements xsi:type="tcs:LiteralRef" location="34:22-34:25" referredLiteral="/0/@symbols.6"/>
+ <elements xsi:type="tcs:LiteralRef" location="35:6-35:15" referredLiteral="/5"/>
+ <elements xsi:type="tcs:Property" location="35:16-35:23" name="package"/>
+ <elements xsi:type="tcs:LiteralRef" location="35:24-35:27" referredLiteral="/0/@symbols.8"/>
+ <elements xsi:type="tcs:LiteralRef" location="36:5-36:8" referredLiteral="/0/@symbols.7"/>
+ <elements xsi:type="tcs:LiteralRef" location="37:1-61:3" referredLiteral="/7"/>
+ </thenSequence>
+ </elements>
+ <elements xsi:type="tcs:ConditionalElement" location="63:4-78:5">
+ <condition xsi:type="tcs:AndExp" location="63:5-63:23">
+ <expressions xsi:type="tcs:IsDefinedExp" location="63:5-63:23" propertyName="actions"/>
+ </condition>
+ <thenSequence location="64:5-77:10">
+ <elements xsi:type="tcs:LiteralRef" location="64:5-64:15" referredLiteral="/8"/>
+ <elements xsi:type="tcs:LiteralRef" location="64:16-64:19" referredLiteral="/0/@symbols.6"/>
+ <elements xsi:type="tcs:Block" location="64:20-77:6">
+ <blockSequence location="65:6-76:8">
+ <elements xsi:type="tcs:Property" location="65:6-65:13" name="actions"/>
+ <elements xsi:type="tcs:LiteralRef" location="66:6-67:56" referredLiteral="/9"/>
+ <elements xsi:type="tcs:Property" location="68:7-68:11" name="name"/>
+ <elements xsi:type="tcs:CustomSeparator" location="68:12-68:22" name="no_space"/>
+ <elements xsi:type="tcs:LiteralRef" location="68:23-68:48" referredLiteral="/10"/>
+ <elements xsi:type="tcs:Property" location="68:49-68:53" name="name"/>
+ <elements xsi:type="tcs:CustomSeparator" location="68:54-68:64" name="no_space"/>
+ <elements xsi:type="tcs:LiteralRef" location="68:65-73:8" referredLiteral="/11"/>
+ <elements xsi:type="tcs:Property" location="74:7-74:11" name="name"/>
+ <elements xsi:type="tcs:CustomSeparator" location="74:12-74:22" name="no_space"/>
+ <elements xsi:type="tcs:LiteralRef" location="74:23-74:52" referredLiteral="/12"/>
+ <elements xsi:type="tcs:Property" location="74:53-74:57" name="name"/>
+ <elements xsi:type="tcs:CustomSeparator" location="74:58-74:68" name="no_space"/>
+ <elements xsi:type="tcs:LiteralRef" location="74:69-76:8" referredLiteral="/13"/>
+ </blockSequence>
+ </elements>
+ <elements xsi:type="tcs:LiteralRef" location="77:7-77:10" referredLiteral="/0/@symbols.7"/>
+ </thenSequence>
+ </elements>
+ <elements xsi:type="tcs:Block" location="79:4-81:32">
+ <blockSequence location="80:5-80:10">
+ <elements xsi:type="tcs:Property" location="80:5-80:10" name="rules"/>
+ </blockSequence>
+ <blockArgs xsi:type="tcs:IndentIncrBArg" location="81:7-81:21" value="0"/>
+ <blockArgs xsi:type="tcs:NbNLBArg" location="81:23-81:31" value="2"/>
+ </elements>
+ <elements xsi:type="tcs:ConditionalElement" location="82:4-85:5">
+ <condition xsi:type="tcs:AndExp" location="82:5-82:23">
+ <expressions xsi:type="tcs:IsDefinedExp" location="82:5-82:23" propertyName="lexer"/>
+ </condition>
+ <thenSequence location="83:5-84:46">
+ <elements xsi:type="tcs:Property" location="83:5-83:12" name="lexer"/>
+ <elements xsi:type="tcs:Block" location="84:5-84:46">
+ <blockSequence location="84:7-84:17">
+ <elements xsi:type="tcs:Property" location="84:7-84:17" name="lexerRules"/>
+ </blockSequence>
+ <blockArgs xsi:type="tcs:IndentIncrBArg" location="84:21-84:35" value="0"/>
+ <blockArgs xsi:type="tcs:NbNLBArg" location="84:37-84:45" value="2"/>
+ </elements>
+ </thenSequence>
+ </elements>
+ </templateSequence>
+ </templates>
+ <templates xsi:type="tcs:ClassTemplate" location="88:2-120:4" name="ProductionRule">
+ <templateSequence location="89:5-119:23">
+ <elements xsi:type="tcs:Property" location="89:5-89:9" name="name"/>
+ <elements xsi:type="tcs:ConditionalElement" location="90:4-92:5">
+ <condition xsi:type="tcs:AndExp" location="90:5-90:26">
+ <expressions xsi:type="tcs:IsDefinedExp" location="90:5-90:26" propertyName="parameters"/>
+ </condition>
+ <thenSequence location="91:5-91:40">
+ <elements xsi:type="tcs:LiteralRef" location="91:5-91:8" referredLiteral="/0/@symbols.0"/>
+ <elements xsi:type="tcs:Property" location="91:9-91:36" name="parameters">
+ <propertyArgs xsi:type="tcs:SeparatorPArg" location="91:20-91:35">
+ <separatorSequence location="91:32-91:35">
+ <elements xsi:type="tcs:LiteralRef" location="91:32-91:35" referredLiteral="/0/@symbols.3"/>
+ </separatorSequence>
+ </propertyArgs>
+ </elements>
+ <elements xsi:type="tcs:LiteralRef" location="91:37-91:40" referredLiteral="/0/@symbols.1"/>
+ </thenSequence>
+ </elements>
+ <elements xsi:type="tcs:ConditionalElement" location="93:4-97:5">
+ <condition xsi:type="tcs:AndExp" location="93:5-93:23">
+ <expressions xsi:type="tcs:IsDefinedExp" location="93:5-93:23" propertyName="returns"/>
+ </condition>
+ <thenSequence location="94:5-96:8">
+ <elements xsi:type="tcs:LiteralRef" location="94:5-94:14" referredLiteral="/14"/>
+ <elements xsi:type="tcs:LiteralRef" location="94:15-94:18" referredLiteral="/0/@symbols.0"/>
+ <elements xsi:type="tcs:LiteralRef" location="95:6-95:14" referredLiteral="/15"/>
+ <elements xsi:type="tcs:LiteralRef" location="95:15-95:21" referredLiteral="/16"/>
+ <elements xsi:type="tcs:LiteralRef" location="96:5-96:8" referredLiteral="/0/@symbols.1"/>
+ </thenSequence>
+ </elements>
+ <elements xsi:type="tcs:LiteralRef" location="98:4-98:11" referredLiteral="/17"/>
+ <elements xsi:type="tcs:LiteralRef" location="98:12-98:15" referredLiteral="/0/@symbols.6">
+ <commentsAfter>-- if not needReturnDeclaration, then it is a label, which is automatically created by ANTLRv3, or it is not needed for some other reason</commentsAfter>
+ </elements>
+ <elements xsi:type="tcs:ConditionalElement" location="100:5-102:6">
+ <commentsBefore>-- if not needReturnDeclaration, then it is a label, which is automatically created by ANTLRv3, or it is not needed for some other reason</commentsBefore>
+ <condition xsi:type="tcs:AndExp" location="100:6-100:50">
+ <expressions xsi:type="tcs:IsDefinedExp" location="100:6-100:24" propertyName="returns"/>
+ <expressions xsi:type="tcs:BooleanPropertyExp" location="100:29-100:50" propertyName="needReturnDeclaration"/>
+ </condition>
+ <thenSequence location="101:6-101:13">
+ <elements xsi:type="tcs:Property" location="101:6-101:13" name="returns"/>
+ </thenSequence>
+ </elements>
+ <elements xsi:type="tcs:ConditionalElement" location="103:5-105:6">
+ <condition xsi:type="tcs:AndExp" location="103:6-103:29">
+ <expressions xsi:type="tcs:IsDefinedExp" location="103:6-103:29" propertyName="declarations"/>
+ </condition>
+ <thenSequence location="104:6-104:18">
+ <elements xsi:type="tcs:Property" location="104:6-104:18" name="declarations"/>
+ </thenSequence>
+ </elements>
+ <elements xsi:type="tcs:LiteralRef" location="106:4-106:7" referredLiteral="/0/@symbols.7"/>
+ <elements xsi:type="tcs:CustomSeparator" location="107:4-107:13" name="newline"/>
+ <elements xsi:type="tcs:CustomSeparator" location="107:14-107:19" name="tab"/>
+ <elements xsi:type="tcs:LiteralRef" location="107:20-107:23" referredLiteral="/0/@symbols.9"/>
+ <elements xsi:type="tcs:ConditionalElement" location="108:5-110:6">
+ <condition xsi:type="tcs:AndExp" location="108:6-108:27">
+ <expressions xsi:type="tcs:IsDefinedExp" location="108:6-108:27" propertyName="expression"/>
+ </condition>
+ <thenSequence location="109:6-109:22">
+ <elements xsi:type="tcs:CustomSeparator" location="109:6-109:11" name="tab"/>
+ <elements xsi:type="tcs:Property" location="109:12-109:22" name="expression"/>
+ </thenSequence>
+ </elements>
+ <elements xsi:type="tcs:Block" location="111:6-118:30">
+ <blockSequence location="111:8-118:11">
+ <elements xsi:type="tcs:LiteralRef" location="111:8-111:11" referredLiteral="/0/@symbols.6"/>
+ <elements xsi:type="tcs:Block" location="111:12-118:7">
+ <blockSequence location="112:5-117:7">
+ <elements xsi:type="tcs:ConditionalElement" location="112:5-114:6">
+ <condition xsi:type="tcs:AndExp" location="112:6-112:24">
+ <expressions xsi:type="tcs:IsDefinedExp" location="112:6-112:24" propertyName="actions"/>
+ </condition>
+ <thenSequence location="113:7-113:14">
+ <elements xsi:type="tcs:Property" location="113:7-113:14" name="actions"/>
+ </thenSequence>
+ </elements>
+ <elements xsi:type="tcs:ConditionalElement" location="115:5-117:7">
+ <condition xsi:type="tcs:AndExp" location="115:6-115:24">
+ <expressions xsi:type="tcs:IsDefinedExp" location="115:6-115:24" propertyName="returns"/>
+ </condition>
+ <thenSequence location="116:7-116:27">
+ <elements xsi:type="tcs:LiteralRef" location="116:7-116:13" referredLiteral="/16"/>
+ <elements xsi:type="tcs:LiteralRef" location="116:14-116:17" referredLiteral="/0/@symbols.20"/>
+ <elements xsi:type="tcs:LiteralRef" location="116:18-116:23" referredLiteral="/18"/>
+ <elements xsi:type="tcs:LiteralRef" location="116:24-116:27" referredLiteral="/0/@symbols.8"/>
+ </thenSequence>
+ </elements>
+ </blockSequence>
+ </elements>
+ <elements xsi:type="tcs:LiteralRef" location="118:8-118:11" referredLiteral="/0/@symbols.7"/>
+ </blockSequence>
+ <blockArgs xsi:type="tcs:IndentIncrBArg" location="118:15-118:29" value="2"/>
+ </elements>
+ <elements xsi:type="tcs:CustomSeparator" location="119:4-119:13" name="newline"/>
+ <elements xsi:type="tcs:CustomSeparator" location="119:14-119:19" name="tab"/>
+ <elements xsi:type="tcs:LiteralRef" location="119:20-119:23" referredLiteral="/0/@symbols.8"/>
+ </templateSequence>
+ </templates>
+ <templates xsi:type="tcs:ClassTemplate" location="122:2-128:4" name="VariableDeclaration">
+ <templateSequence location="123:5-127:7">
+ <elements xsi:type="tcs:Property" location="123:5-123:9" name="type"/>
+ <elements xsi:type="tcs:Property" location="123:10-123:14" name="name"/>
+ <elements xsi:type="tcs:ConditionalElement" location="124:4-126:5">
+ <condition xsi:type="tcs:AndExp" location="124:5-124:28">
+ <expressions xsi:type="tcs:IsDefinedExp" location="124:5-124:28" propertyName="initialValue"/>
+ </condition>
+ <thenSequence location="125:5-125:21">
+ <elements xsi:type="tcs:LiteralRef" location="125:5-125:8" referredLiteral="/0/@symbols.20"/>
+ <elements xsi:type="tcs:Property" location="125:9-125:21" name="initialValue"/>
+ </thenSequence>
+ </elements>
+ <elements xsi:type="tcs:LiteralRef" location="127:4-127:7" referredLiteral="/0/@symbols.8"/>
+ </templateSequence>
+ </templates>
+ <templates xsi:type="tcs:ClassTemplate" location="130:2-132:4" name="Parameter">
+ <templateSequence location="131:5-131:14">
+ <elements xsi:type="tcs:Property" location="131:5-131:9" name="type"/>
+ <elements xsi:type="tcs:Property" location="131:10-131:14" name="name"/>
+ </templateSequence>
+ </templates>
+ <templates xsi:type="tcs:ClassTemplate" location="134:2-136:4" name="Variable">
+ <templateSequence location="135:5-135:33">
+ <elements xsi:type="tcs:Property" location="135:5-135:33" name="declaration">
+ <propertyArgs xsi:type="tcs:RefersToPArg" location="135:17-135:32" propertyName="name"/>
+ </elements>
+ </templateSequence>
+ </templates>
+ <templates xsi:type="tcs:ClassTemplate" location="138:2-138:31" name="Expression" isAbstract="true"/>
+ <templates xsi:type="tcs:ClassTemplate" location="140:2-156:4" name="Alternative">
+ <templateSequence location="141:5-155:5">
+ <elements xsi:type="tcs:ConditionalElement" location="141:5-143:5">
+ <condition xsi:type="tcs:AndExp" location="141:6-141:27">
+ <expressions xsi:type="tcs:IsDefinedExp" location="141:6-141:27" propertyName="prevAction"/>
+ </condition>
+ <thenSequence location="142:5-142:23">
+ <elements xsi:type="tcs:LiteralRef" location="142:5-142:8" referredLiteral="/0/@symbols.6"/>
+ <elements xsi:type="tcs:Property" location="142:9-142:19" name="prevAction"/>
+ <elements xsi:type="tcs:LiteralRef" location="142:20-142:23" referredLiteral="/0/@symbols.7"/>
+ </thenSequence>
+ </elements>
+ <elements xsi:type="tcs:ConditionalElement" location="144:4-155:5">
+ <condition xsi:type="tcs:AndExp" location="144:5-144:21">
+ <expressions xsi:type="tcs:OneExp" location="144:5-144:21" propertyName="expressions"/>
+ </condition>
+ <thenSequence location="145:6-145:17">
+ <elements xsi:type="tcs:Property" location="145:6-145:17" name="expressions"/>
+ </thenSequence>
+ <elseSequence location="147:4-154:7">
+ <elements xsi:type="tcs:LiteralRef" location="147:4-147:7" referredLiteral="/0/@symbols.4"/>
+ <elements xsi:type="tcs:ConditionalElement" location="148:5-152:6">
+ <condition xsi:type="tcs:AndExp" location="148:6-148:24">
+ <expressions xsi:type="tcs:IsDefinedExp" location="148:6-148:24" propertyName="options"/>
+ </condition>
+ <thenSequence location="149:6-151:13">
+ <elements xsi:type="tcs:LiteralRef" location="149:6-149:15" referredLiteral="/3"/>
+ <elements xsi:type="tcs:LiteralRef" location="149:16-149:19" referredLiteral="/0/@symbols.6"/>
+ <elements xsi:type="tcs:Property" location="150:7-150:14" name="options"/>
+ <elements xsi:type="tcs:LiteralRef" location="151:6-151:9" referredLiteral="/0/@symbols.7"/>
+ <elements xsi:type="tcs:LiteralRef" location="151:10-151:13" referredLiteral="/0/@symbols.9"/>
+ </thenSequence>
+ </elements>
+ <elements xsi:type="tcs:Property" location="153:5-153:33" name="expressions">
+ <propertyArgs xsi:type="tcs:SeparatorPArg" location="153:17-153:32">
+ <separatorSequence location="153:29-153:32">
+ <elements xsi:type="tcs:LiteralRef" location="153:29-153:32" referredLiteral="/0/@symbols.11"/>
+ </separatorSequence>
+ </propertyArgs>
+ </elements>
+ <elements xsi:type="tcs:LiteralRef" location="154:4-154:7" referredLiteral="/0/@symbols.5"/>
+ </elseSequence>
+ </elements>
+ </templateSequence>
+ </templates>
+ <templates xsi:type="tcs:ClassTemplate" location="158:2-173:4" name="Concatenation">
+ <templateSequence location="159:5-172:5">
+ <elements xsi:type="tcs:ConditionalElement" location="159:5-161:5">
+ <condition xsi:type="tcs:AndExp" location="159:6-159:35">
+ <expressions xsi:type="tcs:IsDefinedExp" location="159:6-159:35" propertyName="syntacticPredicate"/>
+ </condition>
+ <thenSequence location="160:5-160:36">
+ <elements xsi:type="tcs:LiteralRef" location="160:5-160:8" referredLiteral="/0/@symbols.4"/>
+ <elements xsi:type="tcs:Property" location="160:9-160:27" name="syntacticPredicate"/>
+ <elements xsi:type="tcs:LiteralRef" location="160:28-160:31" referredLiteral="/0/@symbols.5"/>
+ <elements xsi:type="tcs:LiteralRef" location="160:32-160:36" referredLiteral="/19"/>
+ </thenSequence>
+ </elements>
+ <elements xsi:type="tcs:LiteralRef" location="162:4-162:7" referredLiteral="/0/@symbols.4"/>
+ <elements xsi:type="tcs:ConditionalElement" location="163:5-167:6">
+ <condition xsi:type="tcs:AndExp" location="163:6-163:24">
+ <expressions xsi:type="tcs:IsDefinedExp" location="163:6-163:24" propertyName="options"/>
+ </condition>
+ <thenSequence location="164:6-166:13">
+ <elements xsi:type="tcs:LiteralRef" location="164:6-164:15" referredLiteral="/3"/>
+ <elements xsi:type="tcs:LiteralRef" location="164:16-164:19" referredLiteral="/0/@symbols.6"/>
+ <elements xsi:type="tcs:Property" location="165:7-165:14" name="options"/>
+ <elements xsi:type="tcs:LiteralRef" location="166:6-166:9" referredLiteral="/0/@symbols.7"/>
+ <elements xsi:type="tcs:LiteralRef" location="166:10-166:13" referredLiteral="/0/@symbols.9"/>
+ </thenSequence>
+ </elements>
+ <elements xsi:type="tcs:Property" location="168:5-168:16" name="expressions"/>
+ <elements xsi:type="tcs:LiteralRef" location="169:4-169:7" referredLiteral="/0/@symbols.5"/>
+ <elements xsi:type="tcs:ConditionalElement" location="170:4-172:5">
+ <condition xsi:type="tcs:AndExp" location="170:5-170:22">
+ <expressions xsi:type="tcs:IsDefinedExp" location="170:5-170:22" propertyName="action"/>
+ </condition>
+ <thenSequence location="171:5-171:19">
+ <elements xsi:type="tcs:LiteralRef" location="171:5-171:8" referredLiteral="/0/@symbols.6"/>
+ <elements xsi:type="tcs:Property" location="171:9-171:15" name="action"/>
+ <elements xsi:type="tcs:LiteralRef" location="171:16-171:19" referredLiteral="/0/@symbols.7"/>
+ </thenSequence>
+ </elements>
+ </templateSequence>
+ </templates>
+ <templates xsi:type="tcs:ClassTemplate" location="175:2-180:4" name="Terminal">
+ <commentsAfter>-- @begin ForLexer</commentsAfter>
+ <templateSequence location="176:5-179:5">
+ <elements xsi:type="tcs:LiteralRef" location="176:5-176:9" referredLiteral="/20"/>
+ <elements xsi:type="tcs:CustomSeparator" location="176:10-176:20" name="no_space"/>
+ <elements xsi:type="tcs:Property" location="176:21-176:28" name="value"/>
+ <elements xsi:type="tcs:CustomSeparator" location="176:29-176:39" name="no_space"/>
+ <elements xsi:type="tcs:LiteralRef" location="176:40-176:44" referredLiteral="/20"/>
+ <elements xsi:type="tcs:ConditionalElement" location="177:4-179:5">
+ <condition xsi:type="tcs:AndExp" location="177:5-177:22">
+ <expressions xsi:type="tcs:IsDefinedExp" location="177:5-177:22" propertyName="action"/>
+ </condition>
+ <thenSequence location="178:5-178:19">
+ <elements xsi:type="tcs:LiteralRef" location="178:5-178:8" referredLiteral="/0/@symbols.6"/>
+ <elements xsi:type="tcs:Property" location="178:9-178:15" name="action"/>
+ <elements xsi:type="tcs:LiteralRef" location="178:16-178:19" referredLiteral="/0/@symbols.7"/>
+ </thenSequence>
+ </elements>
+ </templateSequence>
+ </templates>
+ <templates xsi:type="tcs:ClassTemplate" location="183:2-185:4" name="CharTerminal">
+ <commentsBefore>-- @begin ForLexer</commentsBefore>
+ <templateSequence location="184:5-184:42">
+ <elements xsi:type="tcs:LiteralRef" location="184:5-184:9" referredLiteral="/20"/>
+ <elements xsi:type="tcs:CustomSeparator" location="184:10-184:20" name="no_space"/>
+ <elements xsi:type="tcs:Property" location="184:21-184:26" name="value"/>
+ <elements xsi:type="tcs:CustomSeparator" location="184:27-184:37" name="no_space"/>
+ <elements xsi:type="tcs:LiteralRef" location="184:38-184:42" referredLiteral="/20"/>
+ </templateSequence>
+ </templates>
+ <templates xsi:type="tcs:ClassTemplate" location="187:2-189:4" name="Negation">
+ <templateSequence location="188:5-188:19">
+ <elements xsi:type="tcs:LiteralRef" location="188:5-188:8" referredLiteral="/21"/>
+ <elements xsi:type="tcs:Property" location="188:9-188:19" name="expression"/>
+ </templateSequence>
+ </templates>
+ <templates xsi:type="tcs:ClassTemplate" location="191:2-193:4" name="Drop">
+ <templateSequence location="192:5-192:19">
+ <elements xsi:type="tcs:Property" location="192:5-192:15" name="expression"/>
+ <elements xsi:type="tcs:LiteralRef" location="192:16-192:19" referredLiteral="/0/@symbols.2"/>
+ </templateSequence>
+ </templates>
+ <templates xsi:type="tcs:ClassTemplate" location="195:2-197:4" name="Interval">
+ <commentsAfter>-- @end ForLexer</commentsAfter>
+ <templateSequence location="196:5-196:19">
+ <elements xsi:type="tcs:Property" location="196:5-196:10" name="start"/>
+ <elements xsi:type="tcs:LiteralRef" location="196:11-196:15" referredLiteral="/22"/>
+ <elements xsi:type="tcs:Property" location="196:16-196:19" name="end"/>
+ </templateSequence>
+ </templates>
+ <templates xsi:type="tcs:ClassTemplate" location="200:2-217:4" name="RuleCall">
+ <commentsBefore>-- @end ForLexer</commentsBefore>
+ <templateSequence location="201:5-216:5">
+ <elements xsi:type="tcs:ConditionalElement" location="201:5-203:5">
+ <condition xsi:type="tcs:AndExp" location="201:6-201:27">
+ <expressions xsi:type="tcs:IsDefinedExp" location="201:6-201:27" propertyName="prevAction"/>
+ </condition>
+ <thenSequence location="202:5-202:23">
+ <elements xsi:type="tcs:LiteralRef" location="202:5-202:8" referredLiteral="/0/@symbols.6"/>
+ <elements xsi:type="tcs:Property" location="202:9-202:19" name="prevAction"/>
+ <elements xsi:type="tcs:LiteralRef" location="202:20-202:23" referredLiteral="/0/@symbols.7"/>
+ </thenSequence>
+ </elements>
+ <elements xsi:type="tcs:ConditionalElement" location="204:4-206:5">
+ <condition xsi:type="tcs:AndExp" location="204:5-204:34">
+ <expressions xsi:type="tcs:IsDefinedExp" location="204:5-204:34" propertyName="syntacticPredicate"/>
+ </condition>
+ <thenSequence location="206:4-204:36">
+ <commentsBefore>--&#x9;&#x9;&#x9;&#x9;&quot;(&quot; syntacticPredicate &quot;)&quot; &quot;=>&quot;</commentsBefore>
+ <commentsAfter>--&#x9;&#x9;&#x9;&#x9;&quot;(&quot; syntacticPredicate &quot;)&quot; &quot;=>&quot;</commentsAfter>
+ </thenSequence>
+ </elements>
+ <elements xsi:type="tcs:ConditionalElement" location="207:4-209:5">
+ <condition xsi:type="tcs:AndExp" location="207:5-207:23">
+ <expressions xsi:type="tcs:IsDefinedExp" location="207:5-207:23" propertyName="storeTo"/>
+ </condition>
+ <thenSequence location="208:5-208:16">
+ <elements xsi:type="tcs:Property" location="208:5-208:12" name="storeTo"/>
+ <elements xsi:type="tcs:LiteralRef" location="208:13-208:16" referredLiteral="/0/@symbols.20"/>
+ </thenSequence>
+ </elements>
+ <elements xsi:type="tcs:Property" location="210:4-210:31" name="calledRule">
+ <propertyArgs xsi:type="tcs:RefersToPArg" location="210:15-210:30" propertyName="name"/>
+ </elements>
+ <elements xsi:type="tcs:ConditionalElement" location="211:4-213:5">
+ <condition xsi:type="tcs:AndExp" location="211:5-211:25">
+ <expressions xsi:type="tcs:IsDefinedExp" location="211:5-211:25" propertyName="arguments"/>
+ </condition>
+ <thenSequence location="212:5-212:39">
+ <elements xsi:type="tcs:LiteralRef" location="212:5-212:8" referredLiteral="/0/@symbols.0"/>
+ <elements xsi:type="tcs:Property" location="212:9-212:35" name="arguments">
+ <propertyArgs xsi:type="tcs:SeparatorPArg" location="212:19-212:34">
+ <separatorSequence location="212:31-212:34">
+ <elements xsi:type="tcs:LiteralRef" location="212:31-212:34" referredLiteral="/0/@symbols.3"/>
+ </separatorSequence>
+ </propertyArgs>
+ </elements>
+ <elements xsi:type="tcs:LiteralRef" location="212:36-212:39" referredLiteral="/0/@symbols.1"/>
+ </thenSequence>
+ </elements>
+ <elements xsi:type="tcs:ConditionalElement" location="214:4-216:5">
+ <condition xsi:type="tcs:AndExp" location="214:5-214:22">
+ <expressions xsi:type="tcs:IsDefinedExp" location="214:5-214:22" propertyName="action"/>
+ </condition>
+ <thenSequence location="215:5-215:19">
+ <elements xsi:type="tcs:LiteralRef" location="215:5-215:8" referredLiteral="/0/@symbols.6"/>
+ <elements xsi:type="tcs:Property" location="215:9-215:15" name="action"/>
+ <elements xsi:type="tcs:LiteralRef" location="215:16-215:19" referredLiteral="/0/@symbols.7"/>
+ </thenSequence>
+ </elements>
+ </templateSequence>
+ </templates>
+ <templates xsi:type="tcs:ClassTemplate" location="219:2-230:4" name="TokenCall">
+ <templateSequence location="220:5-229:5">
+ <elements xsi:type="tcs:ConditionalElement" location="220:5-222:5">
+ <condition xsi:type="tcs:AndExp" location="220:6-220:27">
+ <expressions xsi:type="tcs:IsDefinedExp" location="220:6-220:27" propertyName="prevAction"/>
+ </condition>
+ <thenSequence location="221:5-221:23">
+ <elements xsi:type="tcs:LiteralRef" location="221:5-221:8" referredLiteral="/0/@symbols.6"/>
+ <elements xsi:type="tcs:Property" location="221:9-221:19" name="prevAction"/>
+ <elements xsi:type="tcs:LiteralRef" location="221:20-221:23" referredLiteral="/0/@symbols.7"/>
+ </thenSequence>
+ </elements>
+ <elements xsi:type="tcs:ConditionalElement" location="223:4-225:5">
+ <condition xsi:type="tcs:AndExp" location="223:5-223:26">
+ <expressions xsi:type="tcs:IsDefinedExp" location="223:5-223:26" propertyName="storeASTTo"/>
+ </condition>
+ <thenSequence location="224:5-224:19">
+ <elements xsi:type="tcs:Property" location="224:5-224:15" name="storeASTTo"/>
+ <elements xsi:type="tcs:LiteralRef" location="224:16-224:19" referredLiteral="/0/@symbols.20"/>
+ </thenSequence>
+ </elements>
+ <elements xsi:type="tcs:Property" location="226:4-226:8" name="name"/>
+ <elements xsi:type="tcs:ConditionalElement" location="227:4-229:5">
+ <condition xsi:type="tcs:AndExp" location="227:5-227:22">
+ <expressions xsi:type="tcs:IsDefinedExp" location="227:5-227:22" propertyName="action"/>
+ </condition>
+ <thenSequence location="228:5-228:19">
+ <elements xsi:type="tcs:LiteralRef" location="228:5-228:8" referredLiteral="/0/@symbols.6"/>
+ <elements xsi:type="tcs:Property" location="228:9-228:15" name="action"/>
+ <elements xsi:type="tcs:LiteralRef" location="228:16-228:19" referredLiteral="/0/@symbols.7"/>
+ </thenSequence>
+ </elements>
+ </templateSequence>
+ </templates>
+ <templates xsi:type="tcs:ClassTemplate" location="232:2-232:35" name="SemanticAction" isAbstract="true"/>
+ <templates xsi:type="tcs:ClassTemplate" location="234:2-236:4" name="SimpleSemanticAction">
+ <templateSequence location="235:5-235:12">
+ <elements xsi:type="tcs:Property" location="235:5-235:12" name="value"/>
+ </templateSequence>
+ </templates>
+ <templates xsi:type="tcs:ClassTemplate" location="238:2-240:4" name="SemanticActionBlock">
+ <templateSequence location="239:5-239:12">
+ <elements xsi:type="tcs:Property" location="239:5-239:12" name="actions"/>
+ </templateSequence>
+ </templates>
+ <templates xsi:type="tcs:ClassTemplate" location="242:2-242:37" name="ActionExpression" isAbstract="true"/>
+ <templates xsi:type="tcs:ClassTemplate" location="244:2-246:4" name="TextualExpression">
+ <templateSequence location="245:5-245:12">
+ <elements xsi:type="tcs:Property" location="245:5-245:12" name="value"/>
+ </templateSequence>
+ </templates>
+ <templates xsi:type="tcs:ClassTemplate" location="248:2-250:4" name="LiteralExpression">
+ <templateSequence location="249:5-249:12">
+ <elements xsi:type="tcs:Property" location="249:5-249:12" name="value"/>
+ </templateSequence>
+ </templates>
+ <templates xsi:type="tcs:ClassTemplate" location="252:2-275:4" name="Sequence_">
+ <templateSequence location="253:5-273:5">
+ <elements xsi:type="tcs:ConditionalElement" location="253:5-255:5">
+ <condition xsi:type="tcs:AndExp" location="253:6-253:27">
+ <expressions xsi:type="tcs:IsDefinedExp" location="253:6-253:27" propertyName="prevAction"/>
+ </condition>
+ <thenSequence location="254:5-254:23">
+ <elements xsi:type="tcs:LiteralRef" location="254:5-254:8" referredLiteral="/0/@symbols.6"/>
+ <elements xsi:type="tcs:Property" location="254:9-254:19" name="prevAction"/>
+ <elements xsi:type="tcs:LiteralRef" location="254:20-254:23" referredLiteral="/0/@symbols.7"/>
+ </thenSequence>
+ </elements>
+ <elements xsi:type="tcs:LiteralRef" location="256:4-256:7" referredLiteral="/0/@symbols.4"/>
+ <elements xsi:type="tcs:ConditionalElement" location="257:5-261:6">
+ <condition xsi:type="tcs:AndExp" location="257:6-257:24">
+ <expressions xsi:type="tcs:IsDefinedExp" location="257:6-257:24" propertyName="options"/>
+ </condition>
+ <thenSequence location="258:6-260:13">
+ <elements xsi:type="tcs:LiteralRef" location="258:6-258:15" referredLiteral="/3"/>
+ <elements xsi:type="tcs:LiteralRef" location="258:16-258:19" referredLiteral="/0/@symbols.6"/>
+ <elements xsi:type="tcs:Property" location="259:7-259:14" name="options"/>
+ <elements xsi:type="tcs:LiteralRef" location="260:6-260:9" referredLiteral="/0/@symbols.7"/>
+ <elements xsi:type="tcs:LiteralRef" location="260:10-260:13" referredLiteral="/0/@symbols.9"/>
+ </thenSequence>
+ </elements>
+ <elements xsi:type="tcs:Property" location="262:5-262:15" name="expression"/>
+ <elements xsi:type="tcs:LiteralRef" location="263:4-263:7" referredLiteral="/0/@symbols.5"/>
+ <elements xsi:type="tcs:ConditionalElement" location="264:4-267:5">
+ <condition xsi:type="tcs:AndExp" location="264:5-264:14">
+ <expressions xsi:type="tcs:EqualsExp" location="264:5-264:14" propertyName="lower">
+ <value xsi:type="tcs:IntegerVal" location="264:13-264:14" symbol="0"/>
+ </expressions>
+ </condition>
+ <thenSequence location="265:5-266:23">
+ <elements xsi:type="tcs:ConditionalElement" location="265:5-265:22">
+ <condition xsi:type="tcs:AndExp" location="265:6-265:15">
+ <expressions xsi:type="tcs:EqualsExp" location="265:6-265:15" propertyName="upper">
+ <value xsi:type="tcs:IntegerVal" location="265:14-265:15" symbol="1"/>
+ </expressions>
+ </condition>
+ <thenSequence location="265:18-265:21">
+ <elements xsi:type="tcs:LiteralRef" location="265:18-265:21" referredLiteral="/0/@symbols.13"/>
+ </thenSequence>
+ </elements>
+ <elements xsi:type="tcs:ConditionalElement" location="266:5-266:23">
+ <condition xsi:type="tcs:AndExp" location="266:6-266:16">
+ <expressions xsi:type="tcs:EqualsExp" location="266:6-266:16" propertyName="upper">
+ <value xsi:type="tcs:NegativeIntegerVal" location="266:14-266:16" symbol="1"/>
+ </expressions>
+ </condition>
+ <thenSequence location="266:19-266:22">
+ <elements xsi:type="tcs:LiteralRef" location="266:19-266:22" referredLiteral="/0/@symbols.17"/>
+ </thenSequence>
+ </elements>
+ </thenSequence>
+ </elements>
+ <elements xsi:type="tcs:ConditionalElement" location="268:4-270:5">
+ <condition xsi:type="tcs:AndExp" location="268:5-268:14">
+ <expressions xsi:type="tcs:EqualsExp" location="268:5-268:14" propertyName="lower">
+ <value xsi:type="tcs:IntegerVal" location="268:13-268:14" symbol="1"/>
+ </expressions>
+ </condition>
+ <thenSequence location="269:5-269:23">
+ <elements xsi:type="tcs:ConditionalElement" location="269:5-269:23">
+ <condition xsi:type="tcs:AndExp" location="269:6-269:16">
+ <expressions xsi:type="tcs:EqualsExp" location="269:6-269:16" propertyName="upper">
+ <value xsi:type="tcs:NegativeIntegerVal" location="269:14-269:16" symbol="1"/>
+ </expressions>
+ </condition>
+ <thenSequence location="269:19-269:22">
+ <elements xsi:type="tcs:LiteralRef" location="269:19-269:22" referredLiteral="/0/@symbols.19"/>
+ </thenSequence>
+ </elements>
+ </thenSequence>
+ </elements>
+ <elements xsi:type="tcs:ConditionalElement" location="271:4-273:5">
+ <condition xsi:type="tcs:AndExp" location="271:5-271:22">
+ <expressions xsi:type="tcs:IsDefinedExp" location="271:5-271:22" propertyName="action"/>
+ </condition>
+ <thenSequence location="272:5-272:19">
+ <elements xsi:type="tcs:LiteralRef" location="272:5-272:8" referredLiteral="/0/@symbols.6"/>
+ <elements xsi:type="tcs:Property" location="272:9-272:15" name="action"/>
+ <elements xsi:type="tcs:LiteralRef" location="272:16-272:19" referredLiteral="/0/@symbols.7"/>
+ </thenSequence>
+ </elements>
+ </templateSequence>
+ </templates>
+ <symbols location="278:3-278:18" name="lsquare" literalRefs="/0/@templates.5/@templateSequence/@elements.1/@thenSequence/@elements.0 /0/@templates.5/@templateSequence/@elements.2/@thenSequence/@elements.1 /0/@templates.17/@templateSequence/@elements.4/@thenSequence/@elements.0" value="["/>
+ <symbols location="279:3-279:31" name="rsquare" literalRefs="/0/@templates.5/@templateSequence/@elements.1/@thenSequence/@elements.2 /0/@templates.5/@templateSequence/@elements.2/@thenSequence/@elements.4 /0/@templates.17/@templateSequence/@elements.4/@thenSequence/@elements.2" value="]">
+ <spaces>rightSpace</spaces>
+ </symbols>
+ <symbols location="280:3-280:15" name="excl" literalRefs="/0/@templates.15/@templateSequence/@elements.1" value="!"/>
+ <symbols location="281:3-281:15" name="coma" literalRefs="/0/@templates.5/@templateSequence/@elements.1/@thenSequence/@elements.1/@propertyArgs.0/@separatorSequence/@elements.0 /0/@templates.17/@templateSequence/@elements.4/@thenSequence/@elements.1/@propertyArgs.0/@separatorSequence/@elements.0" value=","/>
+ <symbols location="282:3-282:17" name="lparen" literalRefs="/0/@templates.10/@templateSequence/@elements.1/@elseSequence/@elements.0 /0/@templates.11/@templateSequence/@elements.0/@thenSequence/@elements.0 /0/@templates.11/@templateSequence/@elements.1 /0/@templates.25/@templateSequence/@elements.1" value="("/>
+ <symbols location="283:3-283:17" name="rparen" literalRefs="/0/@templates.10/@templateSequence/@elements.1/@elseSequence/@elements.3 /0/@templates.11/@templateSequence/@elements.0/@thenSequence/@elements.2 /0/@templates.11/@templateSequence/@elements.4 /0/@templates.25/@templateSequence/@elements.4" value=")"/>
+ <symbols location="284:3-284:29" name="lcurly" literalRefs="/0/@templates.4/@templateSequence/@elements.5/@thenSequence/@elements.1 /0/@templates.4/@templateSequence/@elements.6/@thenSequence/@elements.1 /0/@templates.4/@templateSequence/@elements.6/@thenSequence/@elements.7 /0/@templates.4/@templateSequence/@elements.7/@thenSequence/@elements.1 /0/@templates.5/@templateSequence/@elements.4 /0/@templates.5/@templateSequence/@elements.12/@blockSequence/@elements.0 /0/@templates.10/@templateSequence/@elements.0/@thenSequence/@elements.0 /0/@templates.10/@templateSequence/@elements.1/@elseSequence/@elements.1/@thenSequence/@elements.1 /0/@templates.11/@templateSequence/@elements.2/@thenSequence/@elements.1 /0/@templates.11/@templateSequence/@elements.5/@thenSequence/@elements.0 /0/@templates.12/@templateSequence/@elements.5/@thenSequence/@elements.0 /0/@templates.17/@templateSequence/@elements.0/@thenSequence/@elements.0 /0/@templates.17/@templateSequence/@elements.5/@thenSequence/@elements.0 /0/@templates.18/@templateSequence/@elements.0/@thenSequence/@elements.0 /0/@templates.18/@templateSequence/@elements.3/@thenSequence/@elements.0 /0/@templates.25/@templateSequence/@elements.0/@thenSequence/@elements.0 /0/@templates.25/@templateSequence/@elements.2/@thenSequence/@elements.1 /0/@templates.25/@templateSequence/@elements.7/@thenSequence/@elements.0" value="{">
+ <spaces>leftSpace</spaces>
+ </symbols>
+ <symbols location="285:3-285:17" name="rcurly" literalRefs="/0/@templates.4/@templateSequence/@elements.5/@thenSequence/@elements.3 /0/@templates.4/@templateSequence/@elements.6/@thenSequence/@elements.5 /0/@templates.4/@templateSequence/@elements.6/@thenSequence/@elements.11 /0/@templates.4/@templateSequence/@elements.7/@thenSequence/@elements.3 /0/@templates.5/@templateSequence/@elements.7 /0/@templates.5/@templateSequence/@elements.12/@blockSequence/@elements.2 /0/@templates.10/@templateSequence/@elements.0/@thenSequence/@elements.2 /0/@templates.10/@templateSequence/@elements.1/@elseSequence/@elements.1/@thenSequence/@elements.3 /0/@templates.11/@templateSequence/@elements.2/@thenSequence/@elements.3 /0/@templates.11/@templateSequence/@elements.5/@thenSequence/@elements.2 /0/@templates.12/@templateSequence/@elements.5/@thenSequence/@elements.2 /0/@templates.17/@templateSequence/@elements.0/@thenSequence/@elements.2 /0/@templates.17/@templateSequence/@elements.5/@thenSequence/@elements.2 /0/@templates.18/@templateSequence/@elements.0/@thenSequence/@elements.2 /0/@templates.18/@templateSequence/@elements.3/@thenSequence/@elements.2 /0/@templates.25/@templateSequence/@elements.0/@thenSequence/@elements.2 /0/@templates.25/@templateSequence/@elements.2/@thenSequence/@elements.3 /0/@templates.25/@templateSequence/@elements.7/@thenSequence/@elements.2" value="}"/>
+ <symbols location="286:3-286:15" name="semi" literalRefs="/0/@templates.4/@templateSequence/@elements.4 /0/@templates.4/@templateSequence/@elements.6/@thenSequence/@elements.4 /0/@templates.4/@templateSequence/@elements.6/@thenSequence/@elements.10 /0/@templates.5/@templateSequence/@elements.12/@blockSequence/@elements.1/@blockSequence/@elements.1/@thenSequence/@elements.3 /0/@templates.5/@templateSequence/@elements.15 /0/@templates.6/@templateSequence/@elements.3" value=";"/>
+ <symbols location="287:3-287:40" name="colon" literalRefs="/0/@templates.5/@templateSequence/@elements.10 /0/@templates.10/@templateSequence/@elements.1/@elseSequence/@elements.1/@thenSequence/@elements.4 /0/@templates.11/@templateSequence/@elements.2/@thenSequence/@elements.4 /0/@templates.25/@templateSequence/@elements.2/@thenSequence/@elements.4" value=":">
+ <spaces>leftSpace</spaces>
+ <spaces>rightSpace</spaces>
+ </symbols>
+ <symbols location="288:3-288:18" name="colons" value="::"/>
+ <symbols location="289:3-289:15" name="pipe" literalRefs="/0/@templates.10/@templateSequence/@elements.1/@elseSequence/@elements.2/@propertyArgs.0/@separatorSequence/@elements.0" value="|"/>
+ <symbols location="290:3-290:16" name="sharp" value="#"/>
+ <symbols location="291:3-291:16" name="qmark" literalRefs="/0/@templates.25/@templateSequence/@elements.5/@thenSequence/@elements.0/@thenSequence/@elements.0" value="?">
+ <commentsAfter>-- operator symbols</commentsAfter>
+ </symbols>
+ <symbols location="294:3-294:16" name="point" value=".">
+ <commentsBefore>-- operator symbols</commentsBefore>
+ </symbols>
+ <symbols location="295:3-295:18" name="rarrow" value="->"/>
+ <symbols location="296:3-296:16" name="minus" value="-"/>
+ <symbols location="297:3-297:15" name="star" literalRefs="/0/@templates.25/@templateSequence/@elements.5/@thenSequence/@elements.1/@thenSequence/@elements.0" value="*"/>
+ <symbols location="298:3-298:16" name="slash" value="/"/>
+ <symbols location="299:3-299:15" name="plus" literalRefs="/0/@templates.25/@templateSequence/@elements.6/@thenSequence/@elements.0/@thenSequence/@elements.0" value="+"/>
+ <symbols location="300:3-300:13" name="eq" literalRefs="/0/@templates.5/@templateSequence/@elements.12/@blockSequence/@elements.1/@blockSequence/@elements.1/@thenSequence/@elements.1 /0/@templates.6/@templateSequence/@elements.2/@thenSequence/@elements.0 /0/@templates.17/@templateSequence/@elements.2/@thenSequence/@elements.1 /0/@templates.18/@templateSequence/@elements.1/@thenSequence/@elements.1" value="="/>
+ <symbols location="301:3-301:13" name="gt" value=">"/>
+ <symbols location="302:3-302:13" name="lt" value="&lt;"/>
+ <symbols location="303:3-303:14" name="ge" value=">="/>
+ <symbols location="304:3-304:14" name="le" value="&lt;="/>
+ <symbols location="305:3-305:14" name="ne" value="&lt;>"/>
+ <symbols location="306:3-306:18" name="larrow" value="&lt;-"/>
+ </tcs:ConcreteSyntax>
+ <tcs:Keyword location="24:4-24:13" literalRefs="/0/@templates.4/@templateSequence/@elements.0" value="grammar"/>
+ <tcs:Keyword location="24:30-24:39" literalRefs="/0/@templates.4/@templateSequence/@elements.3" value="_ANTLR3"/>
+ <tcs:Keyword location="26:5-26:14" literalRefs="/0/@templates.4/@templateSequence/@elements.5/@thenSequence/@elements.0 /0/@templates.10/@templateSequence/@elements.1/@elseSequence/@elements.1/@thenSequence/@elements.0 /0/@templates.11/@templateSequence/@elements.2/@thenSequence/@elements.0 /0/@templates.25/@templateSequence/@elements.2/@thenSequence/@elements.0" value="options"/>
+ <tcs:Keyword location="31:5-31:14" literalRefs="/0/@templates.4/@templateSequence/@elements.6/@thenSequence/@elements.0" value="@header"/>
+ <tcs:Keyword location="32:6-32:15" literalRefs="/0/@templates.4/@templateSequence/@elements.6/@thenSequence/@elements.2 /0/@templates.4/@templateSequence/@elements.6/@thenSequence/@elements.8" value="package"/>
+ <tcs:Keyword location="34:5-34:21" literalRefs="/0/@templates.4/@templateSequence/@elements.6/@thenSequence/@elements.6" value="@lexer::header"/>
+ <tcs:Keyword location="37:1-61:3" literalRefs="/0/@templates.4/@templateSequence/@elements.6/@thenSequence/@elements.12" value="@lexer::members {&#xD;&#xA;&#xD;&#xA;&#x9;private void newline() {}&#xD;&#xA;&#xD;&#xA;&#x9;public org.eclipse.gmt.tcs.injector.TCSRuntime ei = null;&#xD;&#xA;&#xD;&#xA;&#x9;public void displayRecognitionError(String[] tokenNames, RecognitionException e) {&#xD;&#xA;&#x9;&#x9;ei.reportError((Exception)e);&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;public Token emit() {&#xD;&#xA;&#x9;&#x9;org.eclipse.gmt.tcs.injector.wrappers.antlr3.ANTLR3LocationToken ret = null;&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;ret = new org.eclipse.gmt.tcs.injector.wrappers.antlr3.ANTLR3LocationToken(input, type, channel, tokenStartCharIndex, getCharIndex()-1);&#xD;&#xA;&#x9;&#x9;ret.setLine(tokenStartLine);&#xD;&#xA;&#x9;&#x9;ret.setText(text);&#xD;&#xA;&#x9; &#x9;ret.setCharPositionInLine(tokenStartCharPositionInLine);&#xD;&#xA;&#x9;&#x9;ret.setEndLine(getLine());&#xD;&#xA;&#x9;&#x9;ret.setEndColumn(getCharPositionInLine());&#xD;&#xA;&#x9;&#x9;emit(ret);&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;return ret;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;}"/>
+ <tcs:Keyword location="64:5-64:15" literalRefs="/0/@templates.4/@templateSequence/@elements.7/@thenSequence/@elements.0" value="@members"/>
+ <tcs:Keyword location="66:6-67:56" literalRefs="/0/@templates.4/@templateSequence/@elements.7/@thenSequence/@elements.2/@blockSequence/@elements.1" value="public static void main(String[] args) throws Exception {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;CharStream input = new ANTLRFileStream(args[0]);"/>
+ <tcs:Keyword location="68:23-68:48" literalRefs="/0/@templates.4/@templateSequence/@elements.7/@thenSequence/@elements.2/@blockSequence/@elements.4" value="_ANTLR3Lexer lex = new "/>
+ <tcs:Keyword location="68:65-73:8" literalRefs="/0/@templates.4/@templateSequence/@elements.7/@thenSequence/@elements.2/@blockSequence/@elements.7" value="_ANTLR3Lexer(input);&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;CommonTokenStream tokens = new CommonTokenStream(lex);&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;tokens.discardTokenType(WS);&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;tokens.discardTokenType(COMMENT);&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;tokens.discardTokenType(NL);&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;"/>
+ <tcs:Keyword location="74:23-74:52" literalRefs="/0/@templates.4/@templateSequence/@elements.7/@thenSequence/@elements.2/@blockSequence/@elements.10" value="_ANTLR3Parser parser = new "/>
+ <tcs:Keyword location="74:69-76:8" literalRefs="/0/@templates.4/@templateSequence/@elements.7/@thenSequence/@elements.2/@blockSequence/@elements.13" value="_ANTLR3Parser(tokens);&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;parser.main();&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;}"/>
+ <tcs:Keyword location="94:5-94:14" literalRefs="/0/@templates.5/@templateSequence/@elements.2/@thenSequence/@elements.0" value="returns"/>
+ <tcs:Keyword location="95:6-95:14" literalRefs="/0/@templates.5/@templateSequence/@elements.2/@thenSequence/@elements.2" value="Object"/>
+ <tcs:Keyword location="95:15-95:21" literalRefs="/0/@templates.5/@templateSequence/@elements.2/@thenSequence/@elements.3 /0/@templates.5/@templateSequence/@elements.12/@blockSequence/@elements.1/@blockSequence/@elements.1/@thenSequence/@elements.0" value="ret2"/>
+ <tcs:Keyword location="98:4-98:11" literalRefs="/0/@templates.5/@templateSequence/@elements.3" value="@init"/>
+ <tcs:Keyword location="116:18-116:23" literalRefs="/0/@templates.5/@templateSequence/@elements.12/@blockSequence/@elements.1/@blockSequence/@elements.1/@thenSequence/@elements.2" value="ret"/>
+ <tcs:Keyword location="160:32-160:36" literalRefs="/0/@templates.11/@templateSequence/@elements.0/@thenSequence/@elements.3" value="=>"/>
+ <tcs:Keyword location="176:5-176:9" literalRefs="/0/@templates.12/@templateSequence/@elements.0 /0/@templates.12/@templateSequence/@elements.4 /0/@templates.13/@templateSequence/@elements.0 /0/@templates.13/@templateSequence/@elements.4" value="'"/>
+ <tcs:Keyword location="188:5-188:8" literalRefs="/0/@templates.14/@templateSequence/@elements.0" value="~"/>
+ <tcs:Keyword location="196:11-196:15" literalRefs="/0/@templates.16/@templateSequence/@elements.1" value=".."/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.gmt.tcs.dsls/resources/Annotation/Compiler/ApplyAnnotations2Ecore.asm b/plugins/org.eclipse.gmt.tcs.dsls/resources/Annotation/Compiler/ApplyAnnotations2Ecore.asm
new file mode 100644
index 0000000..7aeab5d
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.dsls/resources/Annotation/Compiler/ApplyAnnotations2Ecore.asm
@@ -0,0 +1,1411 @@
+<?xml version = '1.0' encoding = 'ISO-8859-1' ?>
+<asm name="0">
+ <cp>
+ <constant value="ApplyAnnotations2Ecore"/>
+ <constant value="links"/>
+ <constant value="NTransientLinkSet;"/>
+ <constant value="col"/>
+ <constant value="J"/>
+ <constant value="enumLiteralType"/>
+ <constant value="main"/>
+ <constant value="A"/>
+ <constant value="OclParametrizedType"/>
+ <constant value="#native"/>
+ <constant value="Collection"/>
+ <constant value="J.setName(S):V"/>
+ <constant value="OclSimpleType"/>
+ <constant value="OclAny"/>
+ <constant value="J.setElementType(J):V"/>
+ <constant value="EnumLiteral"/>
+ <constant value="J.oclType():J"/>
+ <constant value="Element"/>
+ <constant value="RefiningTrace"/>
+ <constant value="sourceElement"/>
+ <constant value="persistedSourceElement"/>
+ <constant value="J.registerWeavingHelper(SS):V"/>
+ <constant value="EModelElement"/>
+ <constant value="Ecore"/>
+ <constant value="FQN"/>
+ <constant value="__initFQN"/>
+ <constant value="J.registerHelperAttribute(SS):V"/>
+ <constant value="annotations"/>
+ <constant value="__initannotations"/>
+ <constant value="properties"/>
+ <constant value="__initproperties"/>
+ <constant value="TransientLinkSet"/>
+ <constant value="A.__matcher__():V"/>
+ <constant value="A.__exec__():V"/>
+ <constant value="A.__applyRefiningTrace__():V"/>
+ <constant value="6:16-6:35"/>
+ <constant value="13:16-13:35"/>
+ <constant value="18:16-18:35"/>
+ <constant value="self"/>
+ <constant value="__resolve__"/>
+ <constant value="1"/>
+ <constant value="J.oclIsKindOf(J):B"/>
+ <constant value="18"/>
+ <constant value="NTransientLinkSet;.getLinkBySourceElement(S):QNTransientLink;"/>
+ <constant value="J.oclIsUndefined():B"/>
+ <constant value="15"/>
+ <constant value="NTransientLink;.getTargetFromSource(J):J"/>
+ <constant value="17"/>
+ <constant value="30"/>
+ <constant value="Sequence"/>
+ <constant value="2"/>
+ <constant value="A.__resolve__(J):J"/>
+ <constant value="QJ.including(J):QJ"/>
+ <constant value="QJ.flatten():QJ"/>
+ <constant value="e"/>
+ <constant value="value"/>
+ <constant value="resolveTemp"/>
+ <constant value="S"/>
+ <constant value="NTransientLink;.getNamedTargetFromSource(JS):J"/>
+ <constant value="name"/>
+ <constant value="__matcher__"/>
+ <constant value="A.__matchPackageAnnotations():V"/>
+ <constant value="A.__matchDataTypeAnnotations():V"/>
+ <constant value="A.__matchEnumLiteralAnnotations():V"/>
+ <constant value="__exec__"/>
+ <constant value="PackageAnnotations"/>
+ <constant value="NTransientLinkSet;.getLinksByRule(S):QNTransientLink;"/>
+ <constant value="A.__applyPackageAnnotations(NTransientLink;):V"/>
+ <constant value="DataTypeAnnotations"/>
+ <constant value="A.__applyDataTypeAnnotations(NTransientLink;):V"/>
+ <constant value="EnumLiteralAnnotations"/>
+ <constant value="A.__applyEnumLiteralAnnotations(NTransientLink;):V"/>
+ <constant value="setProperty"/>
+ <constant value="MRefiningTrace!Element;"/>
+ <constant value="0"/>
+ <constant value="Slot"/>
+ <constant value="16"/>
+ <constant value="J.__toValue():J"/>
+ <constant value="20"/>
+ <constant value="QJ.first():J"/>
+ <constant value="slots"/>
+ <constant value="propertyName"/>
+ <constant value="__applyRefiningTrace__"/>
+ <constant value="refiningTrace"/>
+ <constant value="MMOF!Classifier;.allInstancesFrom(S):QJ"/>
+ <constant value="B.not():B"/>
+ <constant value="94"/>
+ <constant value="type"/>
+ <constant value="metamodel"/>
+ <constant value="95"/>
+ <constant value="J.__fromValue():J"/>
+ <constant value="J.refSetValue(SJ):J"/>
+ <constant value="21"/>
+ <constant value="57"/>
+ <constant value="58"/>
+ <constant value="__toValue"/>
+ <constant value="B"/>
+ <constant value="BooleanVal"/>
+ <constant value="I"/>
+ <constant value="IntegerVal"/>
+ <constant value="D"/>
+ <constant value="RealVal"/>
+ <constant value="StringVal"/>
+ <constant value="ElementVal"/>
+ <constant value="J.=(J):B"/>
+ <constant value="J.__asElement():J"/>
+ <constant value="28"/>
+ <constant value="NullVal"/>
+ <constant value="EnumLiteralVal"/>
+ <constant value="J.toString():S"/>
+ <constant value="__asElement"/>
+ <constant value="__fromValue"/>
+ <constant value="MRefiningTrace!BooleanVal;"/>
+ <constant value="MRefiningTrace!IntegerVal;"/>
+ <constant value="MRefiningTrace!RealVal;"/>
+ <constant value="MRefiningTrace!StringVal;"/>
+ <constant value="MRefiningTrace!NullVal;"/>
+ <constant value="MRefiningTrace!ElementVal;"/>
+ <constant value="MRefiningTrace!EnumLiteralVal;"/>
+ <constant value="MEcore!EModelElement;"/>
+ <constant value="J.refImmediateComposite():J"/>
+ <constant value="J.oclIsUndefined():J"/>
+ <constant value="13"/>
+ <constant value="::"/>
+ <constant value="J.+(J):J"/>
+ <constant value="7:5-7:9"/>
+ <constant value="7:5-7:33"/>
+ <constant value="7:5-7:50"/>
+ <constant value="10:3-10:7"/>
+ <constant value="10:3-10:31"/>
+ <constant value="10:3-10:35"/>
+ <constant value="10:38-10:42"/>
+ <constant value="10:3-10:42"/>
+ <constant value="10:45-10:49"/>
+ <constant value="10:45-10:54"/>
+ <constant value="10:3-10:54"/>
+ <constant value="8:3-8:7"/>
+ <constant value="8:3-8:12"/>
+ <constant value="7:2-11:7"/>
+ <constant value="Annotation"/>
+ <constant value="J.allInstances():J"/>
+ <constant value="annotatedModelElement"/>
+ <constant value="element"/>
+ <constant value="ref"/>
+ <constant value="J.=(J):J"/>
+ <constant value="CJ.including(J):CJ"/>
+ <constant value="14:2-14:23"/>
+ <constant value="14:2-14:38"/>
+ <constant value="15:9-15:10"/>
+ <constant value="15:9-15:32"/>
+ <constant value="15:9-15:40"/>
+ <constant value="15:9-15:44"/>
+ <constant value="15:47-15:51"/>
+ <constant value="15:47-15:55"/>
+ <constant value="15:9-15:55"/>
+ <constant value="14:2-16:6"/>
+ <constant value="J.flatten():J"/>
+ <constant value="19:2-19:6"/>
+ <constant value="19:2-19:18"/>
+ <constant value="19:32-19:33"/>
+ <constant value="19:32-19:44"/>
+ <constant value="19:2-19:45"/>
+ <constant value="19:2-19:56"/>
+ <constant value="getAnnotation"/>
+ <constant value="key"/>
+ <constant value="CJ.asSequence():QJ"/>
+ <constant value="25"/>
+ <constant value="29"/>
+ <constant value="22:39-22:43"/>
+ <constant value="22:39-22:54"/>
+ <constant value="22:64-22:65"/>
+ <constant value="22:64-22:69"/>
+ <constant value="22:72-22:75"/>
+ <constant value="22:64-22:75"/>
+ <constant value="22:39-22:76"/>
+ <constant value="23:5-23:13"/>
+ <constant value="23:5-23:30"/>
+ <constant value="26:3-26:11"/>
+ <constant value="26:3-26:17"/>
+ <constant value="24:3-24:15"/>
+ <constant value="23:2-27:7"/>
+ <constant value="22:2-27:7"/>
+ <constant value="property"/>
+ <constant value="__matchPackageAnnotations"/>
+ <constant value="EPackage"/>
+ <constant value="IN"/>
+ <constant value="TransientLink"/>
+ <constant value="NTransientLink;.setRule(MATL!Rule;):V"/>
+ <constant value="s"/>
+ <constant value="NTransientLink;.addSourceElement(SJ):V"/>
+ <constant value="t"/>
+ <constant value="NTransientLink;.addTargetElement(SJ):V"/>
+ <constant value="NTransientLinkSet;.addLink2(NTransientLink;B):V"/>
+ <constant value="33:3-48:4"/>
+ <constant value="__applyPackageAnnotations"/>
+ <constant value="NTransientLink;"/>
+ <constant value="NTransientLink;.getSourceElement(S):J"/>
+ <constant value="NTransientLink;.getTargetElement(S):J"/>
+ <constant value="3"/>
+ <constant value="nsURI"/>
+ <constant value="J.getAnnotation(J):J"/>
+ <constant value="4"/>
+ <constant value="23"/>
+ <constant value="MRefiningTrace!Element;.setProperty(SJ):V"/>
+ <constant value="nsPrefix"/>
+ <constant value="37"/>
+ <constant value="39"/>
+ <constant value="35:22-35:23"/>
+ <constant value="35:38-35:45"/>
+ <constant value="35:22-35:46"/>
+ <constant value="36:8-36:9"/>
+ <constant value="36:8-36:26"/>
+ <constant value="39:6-39:7"/>
+ <constant value="37:6-37:7"/>
+ <constant value="37:6-37:13"/>
+ <constant value="36:5-40:10"/>
+ <constant value="35:5-40:10"/>
+ <constant value="34:4-40:10"/>
+ <constant value="42:22-42:23"/>
+ <constant value="42:38-42:48"/>
+ <constant value="42:22-42:49"/>
+ <constant value="43:8-43:9"/>
+ <constant value="43:8-43:26"/>
+ <constant value="46:6-46:7"/>
+ <constant value="44:6-44:7"/>
+ <constant value="44:6-44:16"/>
+ <constant value="43:5-47:10"/>
+ <constant value="42:5-47:10"/>
+ <constant value="41:4-47:10"/>
+ <constant value="a"/>
+ <constant value="link"/>
+ <constant value="__matchDataTypeAnnotations"/>
+ <constant value="EDataType"/>
+ <constant value="55:3-63:4"/>
+ <constant value="__applyDataTypeAnnotations"/>
+ <constant value="instanceClassName"/>
+ <constant value="57:22-57:23"/>
+ <constant value="57:38-57:57"/>
+ <constant value="57:22-57:58"/>
+ <constant value="58:8-58:9"/>
+ <constant value="58:8-58:26"/>
+ <constant value="61:6-61:7"/>
+ <constant value="59:6-59:7"/>
+ <constant value="59:6-59:25"/>
+ <constant value="58:5-62:10"/>
+ <constant value="57:5-62:10"/>
+ <constant value="56:4-62:10"/>
+ <constant value="__matchEnumLiteralAnnotations"/>
+ <constant value="EEnumLiteral"/>
+ <constant value="70:3-78:4"/>
+ <constant value="__applyEnumLiteralAnnotations"/>
+ <constant value="literal"/>
+ <constant value="literalValue"/>
+ <constant value="72:22-72:23"/>
+ <constant value="72:38-72:52"/>
+ <constant value="72:22-72:53"/>
+ <constant value="73:8-73:9"/>
+ <constant value="73:8-73:26"/>
+ <constant value="76:6-76:7"/>
+ <constant value="74:6-74:7"/>
+ <constant value="74:6-74:15"/>
+ <constant value="73:5-77:10"/>
+ <constant value="72:5-77:10"/>
+ <constant value="71:4-77:10"/>
+ </cp>
+ <field name="1" type="2"/>
+ <field name="3" type="4"/>
+ <field name="5" type="4"/>
+ <operation name="6">
+ <context type="7"/>
+ <parameters>
+ </parameters>
+ <code>
+ <getasm/>
+ <push arg="8"/>
+ <push arg="9"/>
+ <new/>
+ <dup/>
+ <push arg="10"/>
+ <call arg="11"/>
+ <dup/>
+ <push arg="12"/>
+ <push arg="9"/>
+ <new/>
+ <dup/>
+ <push arg="13"/>
+ <call arg="11"/>
+ <call arg="14"/>
+ <set arg="3"/>
+ <getasm/>
+ <push arg="15"/>
+ <push arg="9"/>
+ <new/>
+ <call arg="16"/>
+ <set arg="5"/>
+ <push arg="17"/>
+ <push arg="18"/>
+ <findme/>
+ <push arg="19"/>
+ <push arg="20"/>
+ <call arg="21"/>
+ <push arg="22"/>
+ <push arg="23"/>
+ <findme/>
+ <push arg="24"/>
+ <push arg="25"/>
+ <call arg="26"/>
+ <push arg="22"/>
+ <push arg="23"/>
+ <findme/>
+ <push arg="27"/>
+ <push arg="28"/>
+ <call arg="26"/>
+ <push arg="22"/>
+ <push arg="23"/>
+ <findme/>
+ <push arg="29"/>
+ <push arg="30"/>
+ <call arg="26"/>
+ <getasm/>
+ <push arg="31"/>
+ <push arg="9"/>
+ <new/>
+ <set arg="1"/>
+ <getasm/>
+ <call arg="32"/>
+ <getasm/>
+ <call arg="33"/>
+ <getasm/>
+ <call arg="34"/>
+ </code>
+ <linenumbertable>
+ <lne id="35" begin="28" end="30"/>
+ <lne id="36" begin="34" end="36"/>
+ <lne id="37" begin="40" end="42"/>
+ </linenumbertable>
+ <localvariabletable>
+ <lve slot="0" name="38" begin="0" end="56"/>
+ </localvariabletable>
+ </operation>
+ <operation name="39">
+ <context type="7"/>
+ <parameters>
+ <parameter name="40" type="4"/>
+ </parameters>
+ <code>
+ <load arg="40"/>
+ <getasm/>
+ <get arg="3"/>
+ <call arg="41"/>
+ <if arg="42"/>
+ <getasm/>
+ <get arg="1"/>
+ <load arg="40"/>
+ <call arg="43"/>
+ <dup/>
+ <call arg="44"/>
+ <if arg="45"/>
+ <load arg="40"/>
+ <call arg="46"/>
+ <goto arg="47"/>
+ <pop/>
+ <load arg="40"/>
+ <goto arg="48"/>
+ <push arg="49"/>
+ <push arg="9"/>
+ <new/>
+ <load arg="40"/>
+ <iterate/>
+ <store arg="50"/>
+ <getasm/>
+ <load arg="50"/>
+ <call arg="51"/>
+ <call arg="52"/>
+ <enditerate/>
+ <call arg="53"/>
+ </code>
+ <linenumbertable>
+ </linenumbertable>
+ <localvariabletable>
+ <lve slot="2" name="54" begin="23" end="27"/>
+ <lve slot="0" name="38" begin="0" end="29"/>
+ <lve slot="1" name="55" begin="0" end="29"/>
+ </localvariabletable>
+ </operation>
+ <operation name="56">
+ <context type="7"/>
+ <parameters>
+ <parameter name="40" type="4"/>
+ <parameter name="50" type="57"/>
+ </parameters>
+ <code>
+ <getasm/>
+ <get arg="1"/>
+ <load arg="40"/>
+ <call arg="43"/>
+ <load arg="40"/>
+ <load arg="50"/>
+ <call arg="58"/>
+ </code>
+ <linenumbertable>
+ </linenumbertable>
+ <localvariabletable>
+ <lve slot="0" name="38" begin="0" end="6"/>
+ <lve slot="1" name="55" begin="0" end="6"/>
+ <lve slot="2" name="59" begin="0" end="6"/>
+ </localvariabletable>
+ </operation>
+ <operation name="60">
+ <context type="7"/>
+ <parameters>
+ </parameters>
+ <code>
+ <getasm/>
+ <call arg="61"/>
+ <getasm/>
+ <call arg="62"/>
+ <getasm/>
+ <call arg="63"/>
+ </code>
+ <linenumbertable>
+ </linenumbertable>
+ <localvariabletable>
+ <lve slot="0" name="38" begin="0" end="5"/>
+ </localvariabletable>
+ </operation>
+ <operation name="64">
+ <context type="7"/>
+ <parameters>
+ </parameters>
+ <code>
+ <getasm/>
+ <get arg="1"/>
+ <push arg="65"/>
+ <call arg="66"/>
+ <iterate/>
+ <store arg="40"/>
+ <getasm/>
+ <load arg="40"/>
+ <call arg="67"/>
+ <enditerate/>
+ <getasm/>
+ <get arg="1"/>
+ <push arg="68"/>
+ <call arg="66"/>
+ <iterate/>
+ <store arg="40"/>
+ <getasm/>
+ <load arg="40"/>
+ <call arg="69"/>
+ <enditerate/>
+ <getasm/>
+ <get arg="1"/>
+ <push arg="70"/>
+ <call arg="66"/>
+ <iterate/>
+ <store arg="40"/>
+ <getasm/>
+ <load arg="40"/>
+ <call arg="71"/>
+ <enditerate/>
+ </code>
+ <linenumbertable>
+ </linenumbertable>
+ <localvariabletable>
+ <lve slot="1" name="54" begin="5" end="8"/>
+ <lve slot="1" name="54" begin="15" end="18"/>
+ <lve slot="1" name="54" begin="25" end="28"/>
+ <lve slot="0" name="38" begin="0" end="29"/>
+ </localvariabletable>
+ </operation>
+ <operation name="72">
+ <context type="73"/>
+ <parameters>
+ <parameter name="40" type="57"/>
+ <parameter name="50" type="4"/>
+ </parameters>
+ <code>
+ <load arg="74"/>
+ <push arg="75"/>
+ <push arg="18"/>
+ <new/>
+ <dup/>
+ <load arg="40"/>
+ <set arg="59"/>
+ <dup/>
+ <load arg="50"/>
+ <dup/>
+ <getasm/>
+ <get arg="3"/>
+ <call arg="41"/>
+ <if arg="76"/>
+ <call arg="77"/>
+ <goto arg="78"/>
+ <push arg="49"/>
+ <push arg="9"/>
+ <new/>
+ <call arg="79"/>
+ <set arg="55"/>
+ <set arg="80"/>
+ </code>
+ <linenumbertable>
+ </linenumbertable>
+ <localvariabletable>
+ <lve slot="0" name="38" begin="0" end="21"/>
+ <lve slot="1" name="81" begin="0" end="21"/>
+ <lve slot="2" name="55" begin="0" end="21"/>
+ </localvariabletable>
+ </operation>
+ <operation name="82">
+ <context type="7"/>
+ <parameters>
+ </parameters>
+ <code>
+ <push arg="17"/>
+ <push arg="18"/>
+ <findme/>
+ <push arg="83"/>
+ <call arg="84"/>
+ <dup/>
+ <iterate/>
+ <dup/>
+ <get arg="19"/>
+ <call arg="44"/>
+ <call arg="85"/>
+ <if arg="86"/>
+ <dup/>
+ <get arg="87"/>
+ <swap/>
+ <dup_x1/>
+ <get arg="88"/>
+ <new/>
+ <set arg="19"/>
+ <goto arg="89"/>
+ <pop/>
+ <enditerate/>
+ <iterate/>
+ <dup/>
+ <get arg="19"/>
+ <swap/>
+ <get arg="80"/>
+ <iterate/>
+ <dup/>
+ <get arg="59"/>
+ <swap/>
+ <get arg="55"/>
+ <call arg="90"/>
+ <call arg="91"/>
+ <enditerate/>
+ <pop/>
+ <enditerate/>
+ <push arg="17"/>
+ <push arg="18"/>
+ <findme/>
+ <push arg="83"/>
+ <call arg="84"/>
+ <dup/>
+ <iterate/>
+ <dup/>
+ <get arg="19"/>
+ <call arg="44"/>
+ <call arg="85"/>
+ <if arg="78"/>
+ <dup/>
+ <get arg="87"/>
+ <swap/>
+ <dup_x1/>
+ <get arg="88"/>
+ <new/>
+ <set arg="19"/>
+ <goto arg="92"/>
+ <pop/>
+ <enditerate/>
+ <iterate/>
+ <dup/>
+ <get arg="19"/>
+ <swap/>
+ <get arg="80"/>
+ <iterate/>
+ <dup/>
+ <get arg="59"/>
+ <swap/>
+ <get arg="55"/>
+ <call arg="90"/>
+ <call arg="91"/>
+ <enditerate/>
+ <pop/>
+ <enditerate/>
+ <push arg="17"/>
+ <push arg="18"/>
+ <findme/>
+ <push arg="83"/>
+ <call arg="84"/>
+ <dup/>
+ <iterate/>
+ <dup/>
+ <get arg="19"/>
+ <call arg="44"/>
+ <call arg="85"/>
+ <if arg="93"/>
+ <dup/>
+ <get arg="87"/>
+ <swap/>
+ <dup_x1/>
+ <get arg="88"/>
+ <new/>
+ <set arg="19"/>
+ <goto arg="94"/>
+ <pop/>
+ <enditerate/>
+ <iterate/>
+ <dup/>
+ <get arg="19"/>
+ <swap/>
+ <get arg="80"/>
+ <iterate/>
+ <dup/>
+ <get arg="59"/>
+ <swap/>
+ <get arg="55"/>
+ <call arg="90"/>
+ <call arg="91"/>
+ <enditerate/>
+ <pop/>
+ <enditerate/>
+ </code>
+ <linenumbertable>
+ </linenumbertable>
+ <localvariabletable>
+ <lve slot="0" name="38" begin="0" end="110"/>
+ </localvariabletable>
+ </operation>
+ <operation name="95">
+ <context type="96"/>
+ <parameters>
+ </parameters>
+ <code>
+ <push arg="97"/>
+ <push arg="18"/>
+ <new/>
+ <dup/>
+ <load arg="74"/>
+ <set arg="55"/>
+ </code>
+ <linenumbertable>
+ </linenumbertable>
+ <localvariabletable>
+ <lve slot="0" name="38" begin="0" end="5"/>
+ </localvariabletable>
+ </operation>
+ <operation name="95">
+ <context type="98"/>
+ <parameters>
+ </parameters>
+ <code>
+ <push arg="99"/>
+ <push arg="18"/>
+ <new/>
+ <dup/>
+ <load arg="74"/>
+ <set arg="55"/>
+ </code>
+ <linenumbertable>
+ </linenumbertable>
+ <localvariabletable>
+ <lve slot="0" name="38" begin="0" end="5"/>
+ </localvariabletable>
+ </operation>
+ <operation name="95">
+ <context type="100"/>
+ <parameters>
+ </parameters>
+ <code>
+ <push arg="101"/>
+ <push arg="18"/>
+ <new/>
+ <dup/>
+ <load arg="74"/>
+ <set arg="55"/>
+ </code>
+ <linenumbertable>
+ </linenumbertable>
+ <localvariabletable>
+ <lve slot="0" name="38" begin="0" end="5"/>
+ </localvariabletable>
+ </operation>
+ <operation name="95">
+ <context type="57"/>
+ <parameters>
+ </parameters>
+ <code>
+ <push arg="102"/>
+ <push arg="18"/>
+ <new/>
+ <dup/>
+ <load arg="74"/>
+ <set arg="55"/>
+ </code>
+ <linenumbertable>
+ </linenumbertable>
+ <localvariabletable>
+ <lve slot="0" name="38" begin="0" end="5"/>
+ </localvariabletable>
+ </operation>
+ <operation name="95">
+ <context type="73"/>
+ <parameters>
+ </parameters>
+ <code>
+ <push arg="103"/>
+ <push arg="18"/>
+ <new/>
+ <dup/>
+ <load arg="74"/>
+ <set arg="55"/>
+ </code>
+ <linenumbertable>
+ </linenumbertable>
+ <localvariabletable>
+ <lve slot="0" name="38" begin="0" end="5"/>
+ </localvariabletable>
+ </operation>
+ <operation name="95">
+ <context type="4"/>
+ <parameters>
+ </parameters>
+ <code>
+ <load arg="74"/>
+ <call arg="16"/>
+ <getasm/>
+ <get arg="5"/>
+ <call arg="104"/>
+ <if arg="92"/>
+ <load arg="74"/>
+ <call arg="44"/>
+ <if arg="47"/>
+ <push arg="103"/>
+ <push arg="18"/>
+ <new/>
+ <dup/>
+ <load arg="74"/>
+ <call arg="105"/>
+ <set arg="55"/>
+ <goto arg="106"/>
+ <push arg="107"/>
+ <push arg="18"/>
+ <new/>
+ <goto arg="106"/>
+ <push arg="108"/>
+ <push arg="18"/>
+ <new/>
+ <dup/>
+ <load arg="74"/>
+ <call arg="109"/>
+ <set arg="55"/>
+ </code>
+ <linenumbertable>
+ </linenumbertable>
+ <localvariabletable>
+ <lve slot="0" name="38" begin="0" end="27"/>
+ </localvariabletable>
+ </operation>
+ <operation name="110">
+ <context type="4"/>
+ <parameters>
+ </parameters>
+ <code>
+ <push arg="17"/>
+ <push arg="18"/>
+ <new/>
+ <dup/>
+ <load arg="74"/>
+ <set arg="19"/>
+ </code>
+ <linenumbertable>
+ </linenumbertable>
+ <localvariabletable>
+ <lve slot="0" name="38" begin="0" end="5"/>
+ </localvariabletable>
+ </operation>
+ <operation name="111">
+ <context type="112"/>
+ <parameters>
+ </parameters>
+ <code>
+ <load arg="74"/>
+ <get arg="55"/>
+ </code>
+ <linenumbertable>
+ </linenumbertable>
+ <localvariabletable>
+ <lve slot="0" name="38" begin="0" end="1"/>
+ </localvariabletable>
+ </operation>
+ <operation name="111">
+ <context type="113"/>
+ <parameters>
+ </parameters>
+ <code>
+ <load arg="74"/>
+ <get arg="55"/>
+ </code>
+ <linenumbertable>
+ </linenumbertable>
+ <localvariabletable>
+ <lve slot="0" name="38" begin="0" end="1"/>
+ </localvariabletable>
+ </operation>
+ <operation name="111">
+ <context type="114"/>
+ <parameters>
+ </parameters>
+ <code>
+ <load arg="74"/>
+ <get arg="55"/>
+ </code>
+ <linenumbertable>
+ </linenumbertable>
+ <localvariabletable>
+ <lve slot="0" name="38" begin="0" end="1"/>
+ </localvariabletable>
+ </operation>
+ <operation name="111">
+ <context type="115"/>
+ <parameters>
+ </parameters>
+ <code>
+ <load arg="74"/>
+ <get arg="55"/>
+ </code>
+ <linenumbertable>
+ </linenumbertable>
+ <localvariabletable>
+ <lve slot="0" name="38" begin="0" end="1"/>
+ </localvariabletable>
+ </operation>
+ <operation name="111">
+ <context type="116"/>
+ <parameters>
+ </parameters>
+ <code>
+ <push arg="49"/>
+ <push arg="9"/>
+ <new/>
+ <call arg="79"/>
+ </code>
+ <linenumbertable>
+ </linenumbertable>
+ <localvariabletable>
+ <lve slot="0" name="38" begin="0" end="3"/>
+ </localvariabletable>
+ </operation>
+ <operation name="111">
+ <context type="117"/>
+ <parameters>
+ </parameters>
+ <code>
+ <load arg="74"/>
+ <get arg="55"/>
+ <get arg="19"/>
+ </code>
+ <linenumbertable>
+ </linenumbertable>
+ <localvariabletable>
+ <lve slot="0" name="38" begin="0" end="2"/>
+ </localvariabletable>
+ </operation>
+ <operation name="111">
+ <context type="118"/>
+ <parameters>
+ </parameters>
+ <code>
+ <push arg="15"/>
+ <push arg="9"/>
+ <new/>
+ <dup/>
+ <load arg="74"/>
+ <get arg="55"/>
+ <set arg="59"/>
+ </code>
+ <linenumbertable>
+ </linenumbertable>
+ <localvariabletable>
+ <lve slot="0" name="38" begin="0" end="6"/>
+ </localvariabletable>
+ </operation>
+ <operation name="25">
+ <context type="119"/>
+ <parameters>
+ </parameters>
+ <code>
+ <load arg="74"/>
+ <call arg="120"/>
+ <call arg="121"/>
+ <if arg="122"/>
+ <load arg="74"/>
+ <call arg="120"/>
+ <get arg="24"/>
+ <push arg="123"/>
+ <call arg="124"/>
+ <load arg="74"/>
+ <get arg="59"/>
+ <call arg="124"/>
+ <goto arg="45"/>
+ <load arg="74"/>
+ <get arg="59"/>
+ </code>
+ <linenumbertable>
+ <lne id="125" begin="0" end="0"/>
+ <lne id="126" begin="0" end="1"/>
+ <lne id="127" begin="0" end="2"/>
+ <lne id="128" begin="4" end="4"/>
+ <lne id="129" begin="4" end="5"/>
+ <lne id="130" begin="4" end="6"/>
+ <lne id="131" begin="7" end="7"/>
+ <lne id="132" begin="4" end="8"/>
+ <lne id="133" begin="9" end="9"/>
+ <lne id="134" begin="9" end="10"/>
+ <lne id="135" begin="4" end="11"/>
+ <lne id="136" begin="13" end="13"/>
+ <lne id="137" begin="13" end="14"/>
+ <lne id="138" begin="0" end="14"/>
+ </linenumbertable>
+ <localvariabletable>
+ <lve slot="0" name="38" begin="0" end="14"/>
+ </localvariabletable>
+ </operation>
+ <operation name="28">
+ <context type="119"/>
+ <parameters>
+ </parameters>
+ <code>
+ <push arg="49"/>
+ <push arg="9"/>
+ <new/>
+ <push arg="139"/>
+ <push arg="139"/>
+ <findme/>
+ <call arg="140"/>
+ <iterate/>
+ <store arg="40"/>
+ <load arg="40"/>
+ <get arg="141"/>
+ <get arg="142"/>
+ <get arg="143"/>
+ <load arg="74"/>
+ <get arg="24"/>
+ <call arg="144"/>
+ <call arg="85"/>
+ <if arg="78"/>
+ <load arg="40"/>
+ <call arg="145"/>
+ <enditerate/>
+ </code>
+ <linenumbertable>
+ <lne id="146" begin="3" end="5"/>
+ <lne id="147" begin="3" end="6"/>
+ <lne id="148" begin="9" end="9"/>
+ <lne id="149" begin="9" end="10"/>
+ <lne id="150" begin="9" end="11"/>
+ <lne id="151" begin="9" end="12"/>
+ <lne id="152" begin="13" end="13"/>
+ <lne id="153" begin="13" end="14"/>
+ <lne id="154" begin="9" end="15"/>
+ <lne id="155" begin="0" end="20"/>
+ </linenumbertable>
+ <localvariabletable>
+ <lve slot="1" name="54" begin="8" end="19"/>
+ <lve slot="0" name="38" begin="0" end="20"/>
+ </localvariabletable>
+ </operation>
+ <operation name="30">
+ <context type="119"/>
+ <parameters>
+ </parameters>
+ <code>
+ <push arg="49"/>
+ <push arg="9"/>
+ <new/>
+ <load arg="74"/>
+ <get arg="27"/>
+ <iterate/>
+ <store arg="40"/>
+ <load arg="40"/>
+ <get arg="29"/>
+ <call arg="145"/>
+ <enditerate/>
+ <call arg="156"/>
+ </code>
+ <linenumbertable>
+ <lne id="157" begin="3" end="3"/>
+ <lne id="158" begin="3" end="4"/>
+ <lne id="159" begin="7" end="7"/>
+ <lne id="160" begin="7" end="8"/>
+ <lne id="161" begin="0" end="10"/>
+ <lne id="162" begin="0" end="11"/>
+ </linenumbertable>
+ <localvariabletable>
+ <lve slot="1" name="54" begin="6" end="9"/>
+ <lve slot="0" name="38" begin="0" end="11"/>
+ </localvariabletable>
+ </operation>
+ <operation name="163">
+ <context type="119"/>
+ <parameters>
+ <parameter name="40" type="4"/>
+ </parameters>
+ <code>
+ <push arg="49"/>
+ <push arg="9"/>
+ <new/>
+ <load arg="74"/>
+ <get arg="29"/>
+ <iterate/>
+ <store arg="50"/>
+ <load arg="50"/>
+ <get arg="164"/>
+ <load arg="40"/>
+ <call arg="144"/>
+ <call arg="85"/>
+ <if arg="45"/>
+ <load arg="50"/>
+ <call arg="145"/>
+ <enditerate/>
+ <call arg="165"/>
+ <call arg="79"/>
+ <store arg="50"/>
+ <load arg="50"/>
+ <call arg="121"/>
+ <if arg="166"/>
+ <load arg="50"/>
+ <get arg="55"/>
+ <goto arg="167"/>
+ <push arg="49"/>
+ <push arg="9"/>
+ <new/>
+ <call arg="79"/>
+ </code>
+ <linenumbertable>
+ <lne id="168" begin="3" end="3"/>
+ <lne id="169" begin="3" end="4"/>
+ <lne id="170" begin="7" end="7"/>
+ <lne id="171" begin="7" end="8"/>
+ <lne id="172" begin="9" end="9"/>
+ <lne id="173" begin="7" end="10"/>
+ <lne id="174" begin="0" end="17"/>
+ <lne id="175" begin="19" end="19"/>
+ <lne id="176" begin="19" end="20"/>
+ <lne id="177" begin="22" end="22"/>
+ <lne id="178" begin="22" end="23"/>
+ <lne id="179" begin="25" end="28"/>
+ <lne id="180" begin="19" end="28"/>
+ <lne id="181" begin="0" end="28"/>
+ </linenumbertable>
+ <localvariabletable>
+ <lve slot="2" name="54" begin="6" end="14"/>
+ <lve slot="2" name="182" begin="18" end="28"/>
+ <lve slot="0" name="38" begin="0" end="28"/>
+ <lve slot="1" name="164" begin="0" end="28"/>
+ </localvariabletable>
+ </operation>
+ <operation name="183">
+ <context type="7"/>
+ <parameters>
+ </parameters>
+ <code>
+ <push arg="184"/>
+ <push arg="23"/>
+ <findme/>
+ <push arg="185"/>
+ <call arg="84"/>
+ <iterate/>
+ <store arg="40"/>
+ <getasm/>
+ <get arg="1"/>
+ <push arg="186"/>
+ <push arg="9"/>
+ <new/>
+ <dup/>
+ <push arg="65"/>
+ <call arg="187"/>
+ <dup/>
+ <push arg="188"/>
+ <load arg="40"/>
+ <call arg="189"/>
+ <dup/>
+ <push arg="190"/>
+ <push arg="17"/>
+ <push arg="18"/>
+ <new/>
+ <dup/>
+ <push arg="184"/>
+ <set arg="87"/>
+ <dup/>
+ <push arg="23"/>
+ <set arg="88"/>
+ <dup/>
+ <load arg="40"/>
+ <set arg="19"/>
+ <call arg="191"/>
+ <pusht/>
+ <call arg="192"/>
+ <enditerate/>
+ </code>
+ <linenumbertable>
+ <lne id="193" begin="19" end="33"/>
+ </linenumbertable>
+ <localvariabletable>
+ <lve slot="1" name="188" begin="6" end="35"/>
+ <lve slot="0" name="38" begin="0" end="36"/>
+ </localvariabletable>
+ </operation>
+ <operation name="194">
+ <context type="7"/>
+ <parameters>
+ <parameter name="40" type="195"/>
+ </parameters>
+ <code>
+ <load arg="40"/>
+ <push arg="188"/>
+ <call arg="196"/>
+ <store arg="50"/>
+ <load arg="40"/>
+ <push arg="190"/>
+ <call arg="197"/>
+ <store arg="198"/>
+ <load arg="198"/>
+ <dup/>
+ <push arg="199"/>
+ <getasm/>
+ <load arg="50"/>
+ <push arg="199"/>
+ <call arg="200"/>
+ <store arg="201"/>
+ <load arg="201"/>
+ <call arg="121"/>
+ <if arg="92"/>
+ <load arg="201"/>
+ <goto arg="202"/>
+ <load arg="50"/>
+ <get arg="199"/>
+ <call arg="51"/>
+ <call arg="203"/>
+ <dup/>
+ <push arg="204"/>
+ <getasm/>
+ <load arg="50"/>
+ <push arg="204"/>
+ <call arg="200"/>
+ <store arg="201"/>
+ <load arg="201"/>
+ <call arg="121"/>
+ <if arg="205"/>
+ <load arg="201"/>
+ <goto arg="206"/>
+ <load arg="50"/>
+ <get arg="204"/>
+ <call arg="51"/>
+ <call arg="203"/>
+ <pop/>
+ </code>
+ <linenumbertable>
+ <lne id="207" begin="12" end="12"/>
+ <lne id="208" begin="13" end="13"/>
+ <lne id="209" begin="12" end="14"/>
+ <lne id="210" begin="16" end="16"/>
+ <lne id="211" begin="16" end="17"/>
+ <lne id="212" begin="19" end="19"/>
+ <lne id="213" begin="21" end="21"/>
+ <lne id="214" begin="21" end="22"/>
+ <lne id="215" begin="16" end="22"/>
+ <lne id="216" begin="12" end="22"/>
+ <lne id="217" begin="9" end="24"/>
+ <lne id="218" begin="28" end="28"/>
+ <lne id="219" begin="29" end="29"/>
+ <lne id="220" begin="28" end="30"/>
+ <lne id="221" begin="32" end="32"/>
+ <lne id="222" begin="32" end="33"/>
+ <lne id="223" begin="35" end="35"/>
+ <lne id="224" begin="37" end="37"/>
+ <lne id="225" begin="37" end="38"/>
+ <lne id="226" begin="32" end="38"/>
+ <lne id="227" begin="28" end="38"/>
+ <lne id="228" begin="25" end="40"/>
+ <lne id="193" begin="8" end="41"/>
+ </linenumbertable>
+ <localvariabletable>
+ <lve slot="4" name="229" begin="15" end="22"/>
+ <lve slot="4" name="229" begin="31" end="38"/>
+ <lve slot="3" name="190" begin="7" end="41"/>
+ <lve slot="2" name="188" begin="3" end="41"/>
+ <lve slot="0" name="38" begin="0" end="41"/>
+ <lve slot="1" name="230" begin="0" end="41"/>
+ </localvariabletable>
+ </operation>
+ <operation name="231">
+ <context type="7"/>
+ <parameters>
+ </parameters>
+ <code>
+ <push arg="232"/>
+ <push arg="23"/>
+ <findme/>
+ <push arg="185"/>
+ <call arg="84"/>
+ <iterate/>
+ <store arg="40"/>
+ <getasm/>
+ <get arg="1"/>
+ <push arg="186"/>
+ <push arg="9"/>
+ <new/>
+ <dup/>
+ <push arg="68"/>
+ <call arg="187"/>
+ <dup/>
+ <push arg="188"/>
+ <load arg="40"/>
+ <call arg="189"/>
+ <dup/>
+ <push arg="190"/>
+ <push arg="17"/>
+ <push arg="18"/>
+ <new/>
+ <dup/>
+ <push arg="232"/>
+ <set arg="87"/>
+ <dup/>
+ <push arg="23"/>
+ <set arg="88"/>
+ <dup/>
+ <load arg="40"/>
+ <set arg="19"/>
+ <call arg="191"/>
+ <pusht/>
+ <call arg="192"/>
+ <enditerate/>
+ </code>
+ <linenumbertable>
+ <lne id="233" begin="19" end="33"/>
+ </linenumbertable>
+ <localvariabletable>
+ <lve slot="1" name="188" begin="6" end="35"/>
+ <lve slot="0" name="38" begin="0" end="36"/>
+ </localvariabletable>
+ </operation>
+ <operation name="234">
+ <context type="7"/>
+ <parameters>
+ <parameter name="40" type="195"/>
+ </parameters>
+ <code>
+ <load arg="40"/>
+ <push arg="188"/>
+ <call arg="196"/>
+ <store arg="50"/>
+ <load arg="40"/>
+ <push arg="190"/>
+ <call arg="197"/>
+ <store arg="198"/>
+ <load arg="198"/>
+ <dup/>
+ <push arg="235"/>
+ <getasm/>
+ <load arg="50"/>
+ <push arg="235"/>
+ <call arg="200"/>
+ <store arg="201"/>
+ <load arg="201"/>
+ <call arg="121"/>
+ <if arg="92"/>
+ <load arg="201"/>
+ <goto arg="202"/>
+ <load arg="50"/>
+ <get arg="235"/>
+ <call arg="51"/>
+ <call arg="203"/>
+ <pop/>
+ </code>
+ <linenumbertable>
+ <lne id="236" begin="12" end="12"/>
+ <lne id="237" begin="13" end="13"/>
+ <lne id="238" begin="12" end="14"/>
+ <lne id="239" begin="16" end="16"/>
+ <lne id="240" begin="16" end="17"/>
+ <lne id="241" begin="19" end="19"/>
+ <lne id="242" begin="21" end="21"/>
+ <lne id="243" begin="21" end="22"/>
+ <lne id="244" begin="16" end="22"/>
+ <lne id="245" begin="12" end="22"/>
+ <lne id="246" begin="9" end="24"/>
+ <lne id="233" begin="8" end="25"/>
+ </linenumbertable>
+ <localvariabletable>
+ <lve slot="4" name="229" begin="15" end="22"/>
+ <lve slot="3" name="190" begin="7" end="25"/>
+ <lve slot="2" name="188" begin="3" end="25"/>
+ <lve slot="0" name="38" begin="0" end="25"/>
+ <lve slot="1" name="230" begin="0" end="25"/>
+ </localvariabletable>
+ </operation>
+ <operation name="247">
+ <context type="7"/>
+ <parameters>
+ </parameters>
+ <code>
+ <push arg="248"/>
+ <push arg="23"/>
+ <findme/>
+ <push arg="185"/>
+ <call arg="84"/>
+ <iterate/>
+ <store arg="40"/>
+ <getasm/>
+ <get arg="1"/>
+ <push arg="186"/>
+ <push arg="9"/>
+ <new/>
+ <dup/>
+ <push arg="70"/>
+ <call arg="187"/>
+ <dup/>
+ <push arg="188"/>
+ <load arg="40"/>
+ <call arg="189"/>
+ <dup/>
+ <push arg="190"/>
+ <push arg="17"/>
+ <push arg="18"/>
+ <new/>
+ <dup/>
+ <push arg="248"/>
+ <set arg="87"/>
+ <dup/>
+ <push arg="23"/>
+ <set arg="88"/>
+ <dup/>
+ <load arg="40"/>
+ <set arg="19"/>
+ <call arg="191"/>
+ <pusht/>
+ <call arg="192"/>
+ <enditerate/>
+ </code>
+ <linenumbertable>
+ <lne id="249" begin="19" end="33"/>
+ </linenumbertable>
+ <localvariabletable>
+ <lve slot="1" name="188" begin="6" end="35"/>
+ <lve slot="0" name="38" begin="0" end="36"/>
+ </localvariabletable>
+ </operation>
+ <operation name="250">
+ <context type="7"/>
+ <parameters>
+ <parameter name="40" type="195"/>
+ </parameters>
+ <code>
+ <load arg="40"/>
+ <push arg="188"/>
+ <call arg="196"/>
+ <store arg="50"/>
+ <load arg="40"/>
+ <push arg="190"/>
+ <call arg="197"/>
+ <store arg="198"/>
+ <load arg="198"/>
+ <dup/>
+ <push arg="251"/>
+ <getasm/>
+ <load arg="50"/>
+ <push arg="252"/>
+ <call arg="200"/>
+ <store arg="201"/>
+ <load arg="201"/>
+ <call arg="121"/>
+ <if arg="92"/>
+ <load arg="201"/>
+ <goto arg="202"/>
+ <load arg="50"/>
+ <get arg="251"/>
+ <call arg="51"/>
+ <call arg="203"/>
+ <pop/>
+ </code>
+ <linenumbertable>
+ <lne id="253" begin="12" end="12"/>
+ <lne id="254" begin="13" end="13"/>
+ <lne id="255" begin="12" end="14"/>
+ <lne id="256" begin="16" end="16"/>
+ <lne id="257" begin="16" end="17"/>
+ <lne id="258" begin="19" end="19"/>
+ <lne id="259" begin="21" end="21"/>
+ <lne id="260" begin="21" end="22"/>
+ <lne id="261" begin="16" end="22"/>
+ <lne id="262" begin="12" end="22"/>
+ <lne id="263" begin="9" end="24"/>
+ <lne id="249" begin="8" end="25"/>
+ </linenumbertable>
+ <localvariabletable>
+ <lve slot="4" name="229" begin="15" end="22"/>
+ <lve slot="3" name="190" begin="7" end="25"/>
+ <lve slot="2" name="188" begin="3" end="25"/>
+ <lve slot="0" name="38" begin="0" end="25"/>
+ <lve slot="1" name="230" begin="0" end="25"/>
+ </localvariabletable>
+ </operation>
+</asm>
diff --git a/plugins/org.eclipse.gmt.tcs.dsls/resources/Annotation/Metamodel/Annotation.ecore b/plugins/org.eclipse.gmt.tcs.dsls/resources/Annotation/Metamodel/Annotation.ecore
new file mode 100644
index 0000000..04f2721
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.dsls/resources/Annotation/Metamodel/Annotation.ecore
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore">
+ <ecore:EPackage name="mwcore" nsURI="http://www.eclipse.org/gmt/amw/2005/MWCore" nsPrefix="mwcore">
+ <eClassifiers xsi:type="ecore:EClass" name="WElement" abstract="true">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" ordered="false" unique="false" lowerBound="1" eType="/1/String"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="description" ordered="false" unique="false" lowerBound="1" eType="/1/String"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="model" ordered="false" lowerBound="1" eType="/0/WModel" eOpposite="/0/WModel/ownedElement"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="WModel" abstract="true" eSuperTypes="/0/WElement">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="ownedElement" upperBound="-1" eType="/0/WElement" containment="true" eOpposite="/0/WElement/model"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="wovenModel" ordered="false" lowerBound="1" upperBound="-1" eType="/0/WModelRef" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="WRef" abstract="true" eSuperTypes="/0/WElement">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="ref" ordered="false" unique="false" lowerBound="1" eType="/1/String"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="WModelRef" abstract="true" eSuperTypes="/0/WRef">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="ownedElementRef" ordered="false" upperBound="-1" eType="/0/WElementRef" containment="true" eOpposite="/0/WElementRef/modelRef"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="WElementRef" abstract="true" eSuperTypes="/0/WRef">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="modelRef" ordered="false" lowerBound="1" eType="/0/WModelRef" eOpposite="/0/WModelRef/ownedElementRef"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="WAssociation" abstract="true" eSuperTypes="/0/WElement">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="associationEnd" ordered="false" lowerBound="1" upperBound="-1" eType="/0/WAssociationEnd" containment="true" eOpposite="/0/WAssociationEnd/association"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="WAssociationEnd" abstract="true" eSuperTypes="/0/WElement">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="association" ordered="false" lowerBound="1" eType="/0/WAssociation" eOpposite="/0/WAssociation/associationEnd"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="relatedLink" ordered="false" lowerBound="1" eType="/0/WLink"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="WLink" abstract="true" eSuperTypes="/0/WElement">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="child" upperBound="-1" eType="/0/WLink" containment="true" eOpposite="/0/WLink/parent"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="parent" ordered="false" lowerBound="1" eType="/0/WLink" eOpposite="/0/WLink/child"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="end" ordered="false" lowerBound="1" upperBound="-1" eType="/0/WLinkEnd" containment="true" eOpposite="/0/WLinkEnd/link"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="WLinkEnd" abstract="true" eSuperTypes="/0/WElement">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="link" ordered="false" lowerBound="1" eType="/0/WLink" eOpposite="/0/WLink/end"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="element" ordered="false" lowerBound="1" eType="/0/WElementRef"/>
+ </eClassifiers>
+ </ecore:EPackage>
+ <ecore:EPackage name="PrimitiveTypes" nsURI="http://www.eclipse.org/gmt/amw/2005/MWCore-PrimitiveTypes" nsPrefix="pt">
+ <eClassifiers xsi:type="ecore:EDataType" name="Boolean" instanceClassName="boolean"/>
+ <eClassifiers xsi:type="ecore:EDataType" name="Integer" instanceClassName="int"/>
+ <eClassifiers xsi:type="ecore:EDataType" name="String" instanceClassName="java.lang.String"/>
+ </ecore:EPackage>
+ <ecore:EPackage name="Annotation" nsURI="http://www.eclipse.org/gmt/am3/2007/Annotation" nsPrefix="ann">
+ <eClassifiers xsi:type="ecore:EClass" name="AnnotationModel" eSuperTypes="/0/WModel">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="contents" upperBound="-1" eType="/2/Annotation" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="referencedModel" ordered="false" lowerBound="1" eType="/2/AnnotatedModel" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="AnnotatedModel" eSuperTypes="/0/WModelRef"/>
+ <eClassifiers xsi:type="ecore:EClass" name="AnnotatedModelElementRef" eSuperTypes="/0/WElementRef"/>
+ <eClassifiers xsi:type="ecore:EClass" name="Annotation" eSuperTypes="/0/WLink">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="properties" upperBound="-1" eType="/2/Property" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="annotatedModelElement" ordered="false" lowerBound="1" eType="/2/AnnotatedModelElement" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="AnnotatedModelElement" eSuperTypes="/0/WLinkEnd"/>
+ <eClassifiers xsi:type="ecore:EClass" name="Property">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="key" ordered="false" unique="false" lowerBound="1" eType="/1/String"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" ordered="false" unique="false" lowerBound="1" eType="/1/String"/>
+ </eClassifiers>
+ </ecore:EPackage>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.gmt.tcs.dsls/resources/Editor/Compiler/TCS2Editor.asm b/plugins/org.eclipse.gmt.tcs.dsls/resources/Editor/Compiler/TCS2Editor.asm
new file mode 100644
index 0000000..d695b27
--- /dev/null
+++ b/plugins/org.eclipse.gmt.tcs.dsls/resources/Editor/Compiler/TCS2Editor.asm
@@ -0,0 +1,1585 @@
+<?xml version = '1.0' encoding = 'ISO-8859-1' ?>
+<asm name="0">
+ <cp>
+ <constant value="TCS2Editor"/>
+ <constant value="links"/>
+ <constant value="NTransientLinkSet;"/>
+ <constant value="col"/>
+ <constant value="J;"/>
+ <constant value="main"/>
+ <constant value="A"/>
+ <constant value="0"/>
+ <constant value="OclParametrizedType"/>
+ <constant value="#native"/>
+ <constant value="Collection"/>
+ <constant value="J.setName(S):V"/>
+ <constant value="OclSimpleType"/>
+ <constant value="OclAny"/>
+ <constant value="J.setElementType(J):V"/>
+ <constant value="TransientLinkSet"/>
+ <constant value="A.__matcher__():V"/>
+ <constant value="A.__exec__():V"/>
+ <constant value="self"/>
+ <constant value="__matcher__"/>
+ <constant value="A.__matchTCS2Editor():V"/>
+ <constant value="A.__matchkeyword():V"/>
+ <constant value="A.__matchsymbol():V"/>
+ <constant value="A.__matchtype():V"/>
+ <constant value="__matchTCS2Editor"/>
+ <constant value="ConcreteSyntax"/>
+ <constant value="TCS"/>
+ <constant value="Sequence"/>
+ <constant value="IN"/>
+ <constant value="MMOF!Classifier;.allInstancesFrom(S):QJ"/>
+ <constant value="CJ.union(CJ):CJ"/>
+ <constant value="1"/>
+ <constant value="B.not():B"/>
+ <constant value="55"/>
+ <constant value="TransientLink"/>
+ <constant value="NTransientLink;.setRule(MATL!Rule;):V"/>
+ <constant value="s"/>
+ <constant value="NTransientLink;.addSourceElement(SJ):V"/>
+ <constant value="t"/>
+ <constant value="Editor"/>
+ <constant value="NTransientLink;.addTargetElement(SJ):V"/>
+ <constant value="keywords"/>
+ <constant value="GroupElement"/>
+ <constant value="symbols"/>
+ <constant value="types"/>
+ <constant value="NTransientLinkSet;.addLink(NTransientLink;):V"/>
+ <constant value="11:7-11:20"/>
+ <constant value="37:14-37:33"/>
+ <constant value="42:13-42:32"/>
+ <constant value="47:11-47:30"/>
+ <constant value="__matchkeyword"/>
+ <constant value="Keyword"/>
+ <constant value="37"/>
+ <constant value="keyword"/>
+ <constant value="Element"/>
+ <constant value="122:7-122:21"/>
+ <constant value="__matchsymbol"/>
+ <constant value="Symbol"/>
+ <constant value="symbol"/>
+ <constant value="131:7-131:21"/>
+ <constant value="__matchtype"/>
+ <constant value="PrimitiveTemplate"/>
+ <constant value="type"/>
+ <constant value="140:7-140:21"/>
+ <constant value="__resolve__"/>
+ <constant value="J"/>
+ <constant value="J.oclIsKindOf(J):B"/>
+ <constant value="18"/>
+ <constant value="NTransientLinkSet;.getLinkBySourceElement(S):QNTransientLink;"/>
+ <constant value="J.oclIsUndefined():J"/>
+ <constant value="15"/>
+ <constant value="NTransientLink;.getTargetFromSource(J):J"/>
+ <constant value="17"/>
+ <constant value="30"/>
+ <constant value="2"/>
+ <constant value="A.__resolve__(J):J"/>
+ <constant value="QJ.including(J):QJ"/>
+ <constant value="QJ.flatten():QJ"/>
+ <constant value="e"/>
+ <constant value="value"/>
+ <constant value="resolveTemp"/>
+ <constant value="S"/>
+ <constant value="NTransientLink;.getNamedTargetFromSource(JS):J"/>
+ <constant value="name"/>
+ <constant value="__exec__"/>
+ <constant value="NTransientLinkSet;.getLinksByRule(S):QNTransientLink;"/>
+ <constant value="A.__applyTCS2Editor(NTransientLink;):V"/>
+ <constant value="A.__applykeyword(NTransientLink;):V"/>
+ <constant value="A.__applysymbol(NTransientLink;):V"/>
+ <constant value="A.__applytype(NTransientLink;):V"/>
+ <constant value="getToken"/>
+ <constant value="MTCS!ConcreteSyntax;"/>
+ <constant value="tokens"/>
+ <constant value="J.=(J):J"/>
+ <constant value="CJ.including(J):CJ"/>
+ <constant value="CJ.asSequence():QJ"/>
+ <constant value="QJ.first():J"/>
+ <constant value="5:2-5:6"/>
+ <constant value="5:2-5:13"/>
+ <constant value="5:23-5:24"/>
+ <constant value="5:23-5:29"/>
+ <constant value="5:32-5:36"/>
+ <constant value="5:23-5:36"/>
+ <constant value="5:2-5:37"/>
+ <constant value="__applyTCS2Editor"/>
+ <constant value="NTransientLink;"/>
+ <constant value="NTransientLink;.getSourceElement(S):J"/>
+ <constant value="NTransientLink;.getTargetElement(S):J"/>
+ <constant value="3"/>
+ <constant value="4"/>
+ <constant value="5"/>
+ <constant value="6"/>
+ <constant value="mgm"/>
+ <constant value="extension"/>
+ <constant value="Set"/>
+ <constant value="group"/>
+ <constant value="COMMENT"/>
+ <constant value="J.getToken(J):J"/>
+ <constant value="7"/>
+ <constant value="63"/>
+ <constant value="pattern"/>
+ <constant value="simplePatterns"/>
+ <constant value="8"/>
+ <constant value="rule"/>
+ <constant value="J.createCommentBlock(J):J"/>
+ <constant value="66"/>
+ <constant value="STRING"/>
+ <constant value="100"/>
+ <constant value="J.first():J"/>
+ <constant value="9"/>
+ <constant value="start"/>
+ <constant value="end"/>
+ <constant value="esc"/>
+ <constant value="94"/>
+ <constant value="98"/>
+ <constant value="J.createStringBlock(JJJ):J"/>
+ <constant value="105"/>
+ <constant value="&quot;"/>
+ <constant value="\"/>
+ <constant value="J.including(J):J"/>
+ <constant value="block"/>
+ <constant value="times"/>
+ <constant value="127"/>
+ <constant value="85"/>
+ <constant value="J.createFormat(JJJJJJ):J"/>
+ <constant value="format"/>
+ <constant value="J.allInstances():J"/>
+ <constant value="element"/>
+ <constant value="42"/>
+ <constant value="255"/>
+ <constant value="templates"/>
+ <constant value="12:17-12:22"/>
+ <constant value="12:4-12:22"/>
+ <constant value="13:18-13:26"/>
+ <constant value="13:28-13:35"/>
+ <constant value="13:37-13:42"/>
+ <constant value="13:13-13:43"/>
+ <constant value="13:4-13:43"/>
+ <constant value="14:34-14:35"/>
+ <constant value="14:45-14:54"/>
+ <constant value="14:34-14:55"/>
+ <constant value="14:17-14:55"/>
+ <constant value="15:8-15:10"/>
+ <constant value="15:8-15:27"/>
+ <constant value="18:6-18:8"/>
+ <constant value="18:6-18:16"/>
+ <constant value="18:6-18:31"/>
+ <constant value="18:45-18:55"/>
+ <constant value="18:75-18:76"/>
+ <constant value="18:75-18:81"/>
+ <constant value="18:45-18:82"/>
+ <constant value="18:6-18:83"/>
+ <constant value="16:6-16:17"/>
+ <constant value="15:5-19:10"/>
+ <constant value="20:27-20:28"/>
+ <constant value="20:38-20:46"/>
+ <constant value="20:27-20:47"/>
+ <constant value="20:10-20:47"/>
+ <constant value="21:9-21:11"/>
+ <constant value="21:9-21:28"/>
+ <constant value="24:26-24:28"/>
+ <constant value="24:26-24:36"/>
+ <constant value="24:26-24:51"/>
+ <constant value="24:26-24:60"/>
+ <constant value="24:26-24:65"/>
+ <constant value="24:11-24:65"/>
+ <constant value="25:7-25:17"/>
+ <constant value="26:8-26:9"/>
+ <constant value="26:8-26:15"/>
+ <constant value="26:8-26:20"/>
+ <constant value="27:8-27:9"/>
+ <constant value="27:8-27:13"/>
+ <constant value="27:8-27:18"/>
+ <constant value="28:11-28:12"/>
+ <constant value="28:11-28:16"/>
+ <constant value="28:11-28:33"/>
+ <constant value="31:9-31:10"/>
+ <constant value="31:9-31:14"/>
+ <constant value="31:9-31:19"/>
+ <constant value="29:9-29:21"/>
+ <constant value="28:8-32:13"/>
+ <constant value="25:7-33:8"/>
+ <constant value="24:7-33:8"/>
+ <constant value="22:7-22:17"/>
+ <constant value="22:36-22:40"/>
+ <constant value="22:42-22:46"/>
+ <constant value="22:48-22:52"/>
+ <constant value="22:7-22:53"/>
+ <constant value="21:6-34:11"/>
+ <constant value="20:6-34:11"/>
+ <constant value="15:5-35:6"/>
+ <constant value="14:13-35:6"/>
+ <constant value="14:4-35:6"/>
+ <constant value="38:12-38:22"/>
+ <constant value="38:4-38:22"/>
+ <constant value="39:14-39:24"/>
+ <constant value="39:38-39:45"/>
+ <constant value="39:47-39:51"/>
+ <constant value="39:53-39:58"/>
+ <constant value="39:60-39:63"/>
+ <constant value="39:65-39:66"/>
+ <constant value="39:68-39:70"/>
+ <constant value="39:14-39:71"/>
+ <constant value="39:4-39:71"/>
+ <constant value="40:15-40:26"/>
+ <constant value="40:15-40:41"/>
+ <constant value="40:4-40:41"/>
+ <constant value="43:12-43:21"/>
+ <constant value="43:4-43:21"/>
+ <constant value="44:14-44:24"/>
+ <constant value="44:38-44:45"/>
+ <constant value="44:47-44:51"/>
+ <constant value="44:53-44:58"/>
+ <constant value="44:60-44:63"/>
+ <constant value="44:65-44:66"/>
+ <constant value="44:68-44:70"/>
+ <constant value="44:14-44:71"/>
+ <constant value="44:4-44:71"/>
+ <constant value="45:15-45:25"/>
+ <constant value="45:15-45:40"/>
+ <constant value="45:4-45:40"/>
+ <constant value="48:12-48:19"/>
+ <constant value="48:4-48:19"/>
+ <constant value="49:14-49:24"/>
+ <constant value="49:38-49:45"/>
+ <constant value="49:47-49:51"/>
+ <constant value="49:53-49:58"/>
+ <constant value="49:60-49:62"/>
+ <constant value="49:64-49:65"/>
+ <constant value="49:67-49:70"/>
+ <constant value="49:14-49:71"/>
+ <constant value="49:4-49:71"/>
+ <constant value="50:15-50:16"/>
+ <constant value="50:15-50:26"/>
+ <constant value="50:4-50:26"/>
+ <constant value="r"/>
+ <constant value="st"/>
+ <constant value="ct"/>
+ <constant value="link"/>
+ <constant value="createCommentBlock"/>
+ <constant value="MTCS!RulePattern;"/>
+ <constant value="Block"/>
+ <constant value="CommentsLine"/>
+ <constant value="130"/>
+ <constant value="blockbegin"/>
+ <constant value="MultiLineRule"/>
+ <constant value="J.oclIsKindOf(J):J"/>
+ <constant value=""/>
+ <constant value="40"/>
+ <constant value="blockend"/>
+ <constant value="57:3-60:4"/>
+ <constant value="58:12-58:26"/>
+ <constant value="58:4-58:26"/>
+ <constant value="59:14-59:24"/>
+ <constant value="59:38-59:45"/>
+ <constant value="59:47-59:52"/>
+ <constant value="59:54-59:58"/>
+ <constant value="59:60-59:61"/>
+ <constant value="59:63-59:66"/>
+ <constant value="59:68-59:69"/>
+ <constant value="59:14-59:70"/>
+ <constant value="59:4-59:70"/>
+ <constant value="62:3-62:4"/>
+ <constant value="62:19-62:20"/>
+ <constant value="62:19-62:26"/>
+ <constant value="62:19-62:31"/>
+ <constant value="63:3-63:4"/>
+ <constant value="63:20-63:21"/>
+ <constant value="63:34-63:51"/>
+ <constant value="63:20-63:52"/>
+ <constant value="63:74-63:76"/>
+ <constant value="63:58-63:59"/>
+ <constant value="63:58-63:63"/>
+ <constant value="63:58-63:68"/>
+ <constant value="63:17-63:82"/>
+ <constant value="64:3-64:4"/>
+ <constant value="createStringBlock"/>
+ <constant value="string"/>
+ <constant value="71:3-77:4"/>
+ <constant value="72:12-72:20"/>
+ <constant value="72:4-72:20"/>
+ <constant value="73:18-73:23"/>
+ <constant value="73:4-73:23"/>
+ <constant value="74:16-74:19"/>
+ <constant value="74:4-74:19"/>
+ <constant value="75:11-75:14"/>
+ <constant value="75:4-75:14"/>
+ <constant value="76:14-76:24"/>
+ <constant value="76:38-76:45"/>
+ <constant value="76:47-76:52"/>
+ <constant value="76:54-76:59"/>
+ <constant value="76:61-76:62"/>
+ <constant value="76:64-76:65"/>
+ <constant value="76:67-76:70"/>
+ <constant value="76:14-76:71"/>
+ <constant value="76:4-76:71"/>
+ <constant value="79:3-79:4"/>
+ <constant value="createFormat"/>
+ <constant value="B"/>
+ <constant value="I"/>
+ <constant value="Format"/>
+ <constant value="J.createColor(JJJ):J"/>
+ <constant value="color"/>
+ <constant value="J.createFont(JJJ):J"/>
+ <constant value="font"/>
+ <constant value="85:3-88:4"/>
+ <constant value="86:13-86:23"/>
+ <constant value="86:36-86:37"/>
+ <constant value="86:39-86:40"/>
+ <constant value="86:42-86:43"/>
+ <constant value="86:13-86:44"/>
+ <constant value="86:4-86:44"/>
+ <constant value="87:12-87:22"/>
+ <constant value="87:34-87:35"/>
+ <constant value="87:37-87:41"/>
+ <constant value="87:43-87:44"/>
+ <constant value="87:12-87:45"/>
+ <constant value="87:4-87:45"/>
+ <constant value="90:3-90:4"/>
+ <constant value="f"/>
+ <constant value="bold"/>
+ <constant value="i"/>
+ <constant value="g"/>
+ <constant value="b"/>
+ <constant value="createFont"/>
+ <constant value="Font"/>
+ <constant value="italic"/>
+ <constant value="96:3-100:4"/>
+ <constant value="97:12-97:13"/>
+ <constant value="97:4-97:13"/>
+ <constant value="98:12-98:13"/>
+ <constant value="98:4-98:13"/>
+ <constant value="99:14-99:15"/>
+ <constant value="99:4-99:15"/>
+ <constant value="102:3-102:4"/>
+ <constant value="createColor"/>
+ <constant value="Color"/>
+ <constant value="red"/>
+ <constant value="green"/>
+ <constant value="blue"/>
+ <constant value="108:3-112:4"/>
+ <constant value="109:11-109:12"/>
+ <constant value="109:4-109:12"/>
+ <constant value="110:13-110:14"/>
+ <constant value="110:4-110:14"/>
+ <constant value="111:12-111:13"/>
+ <constant value="111:4-111:13"/>
+ <constant value="114:3-114:4"/>
+ <constant value="__applykeyword"/>
+ <constant value="123:15-123:16"/>
+ <constant value="123:15-123:22"/>
+ <constant value="123:4-123:22"/>
+ <constant value="__applysymbol"/>
+ <constant value="132:15-132:16"/>
+ <constant value="132:15-132:22"/>
+ <constant value="132:4-132:22"/>
+ <constant value="__applytype"/>
+ <constant value="typeName"/>
+ <constant value="141:15-141:16"/>
+ <constant value="141:15-141:25"/>
+ <constant value="141:4-141:25"/>
+ </cp>
+ <field name="1" type="2"/>
+ <field name="3" type="4"/>
+ <operation name="5">
+ <context type="6"/>
+ <parameters>
+ </parameters>
+ <code>
+ <load arg="7"/>
+ <push arg="8"/>
+ <push arg="9"/>
+ <new/>
+ <dup/>
+ <push arg="10"/>
+ <call arg="11"/>
+ <dup/>
+ <push arg="12"/>
+ <push arg="9"/>
+ <new/>
+ <dup/>
+ <push arg="13"/>
+ <call arg="11"/>
+ <call arg="14"/>
+ <set arg="3"/>
+ <load arg="7"/>
+ <push arg="15"/>
+ <push arg="9"/>
+ <new/>
+ <set arg="1"/>
+ <load arg="7"/>
+ <call arg="16"/>
+ <load arg="7"/>
+ <call arg="17"/>
+ </code>
+ <linenumbertable>
+ </linenumbertable>
+ <localvariabletable>
+ <lve slot="0" name="18" begin="0" end="24"/>
+ </localvariabletable>
+ </operation>
+ <operation name="19">
+ <context type="6"/>
+ <parameters>
+ </parameters>
+ <code>
+ <load arg="7"/>
+ <call arg="20"/>
+ <load arg="7"/>
+ <call arg="21"/>
+ <load arg="7"/>
+ <call arg="22"/>
+ <load arg="7"/>
+ <call arg="23"/>
+ </code>
+ <linenumbertable>
+ </linenumbertable>
+ <localvariabletable>
+ <lve slot="0" name="18" begin="0" end="7"/>
+ </localvariabletable>
+ </operation>
+ <operation name="24">
+ <context type="6"/>
+ <parameters>
+ </parameters>
+ <code>
+ <push arg="25"/>
+ <push arg="26"/>
+ <findme/>
+ <push arg="27"/>
+ <push arg="9"/>
+ <new/>
+ <swap/>
+ <dup_x1/>
+ <push arg="28"/>
+ <call arg="29"/>
+ <call arg="30"/>
+ &l