Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.etrice.core.config')
-rw-r--r--plugins/org.eclipse.etrice.core.config/.launch/Generate Language Infrastructure (org.eclipse.etrice.core.config).launch36
-rw-r--r--plugins/org.eclipse.etrice.core.config/.project68
-rw-r--r--plugins/org.eclipse.etrice.core.config/build.properties10
-rw-r--r--plugins/org.eclipse.etrice.core.config/plugin.xml36
-rw-r--r--plugins/org.eclipse.etrice.core.config/plugin.xml_gen34
-rw-r--r--plugins/org.eclipse.etrice.core.config/src-gen/org/eclipse/etrice/core/AbstractConfigRuntimeModule.java324
-rw-r--r--plugins/org.eclipse.etrice.core.config/src-gen/org/eclipse/etrice/core/ConfigStandaloneSetupGenerated.java86
-rw-r--r--plugins/org.eclipse.etrice.core.config/src-gen/org/eclipse/etrice/core/parser/antlr/ConfigAntlrTokenFileProvider.java30
-rw-r--r--plugins/org.eclipse.etrice.core.config/src-gen/org/eclipse/etrice/core/parser/antlr/ConfigParser.java78
-rw-r--r--plugins/org.eclipse.etrice.core.config/src-gen/org/eclipse/etrice/core/parser/antlr/internal/InternalConfig.g4294
-rw-r--r--plugins/org.eclipse.etrice.core.config/src-gen/org/eclipse/etrice/core/services/ConfigGrammarAccess.java3794
-rw-r--r--plugins/org.eclipse.etrice.core.config/src-gen/org/eclipse/etrice/core/validation/AbstractConfigJavaValidator.java36
-rw-r--r--plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/Config.xtext408
-rw-r--r--plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/ConfigRuntimeModule.java108
-rw-r--r--plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/ConfigStandaloneSetup.java48
-rw-r--r--plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/formatting/ConfigFormatter.java148
-rw-r--r--plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/generator/ConfigGenerator.xtend30
-rw-r--r--plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/scoping/ConfigScopeProvider.java286
-rw-r--r--plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/validation/ConfigJavaValidator.java986
19 files changed, 5420 insertions, 5420 deletions
diff --git a/plugins/org.eclipse.etrice.core.config/.launch/Generate Language Infrastructure (org.eclipse.etrice.core.config).launch b/plugins/org.eclipse.etrice.core.config/.launch/Generate Language Infrastructure (org.eclipse.etrice.core.config).launch
index 02f9fee76..dcafc05a4 100644
--- a/plugins/org.eclipse.etrice.core.config/.launch/Generate Language Infrastructure (org.eclipse.etrice.core.config).launch
+++ b/plugins/org.eclipse.etrice.core.config/.launch/Generate Language Infrastructure (org.eclipse.etrice.core.config).launch
@@ -1,18 +1,18 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.emf.mwe2.launch.Mwe2LaunchConfigurationType">
-<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;launchConfigurationWorkingSet factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; id=&quot;1299248699643_13&quot; label=&quot;working set&quot; name=&quot;working set&quot;&gt;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/org.eclipse.etrice.core.config&quot; type=&quot;4&quot;/&gt;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/org.eclipse.etrice.core.config.generator&quot; type=&quot;4&quot;/&gt;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/org.eclipse.etrice.core.config.tests&quot; type=&quot;4&quot;/&gt;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/org.eclipse.etrice.core.config.ui&quot; type=&quot;4&quot;/&gt;&#10;&lt;/launchConfigurationWorkingSet&gt;}"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.etrice.core.config"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="4"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
-<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
-<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="src/org/eclipse/etrice/core/GenerateConfig.mwe2"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.etrice.core.config"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx512m"/>
-</launchConfiguration>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.emf.mwe2.launch.Mwe2LaunchConfigurationType">
+<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;launchConfigurationWorkingSet factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; id=&quot;1299248699643_13&quot; label=&quot;working set&quot; name=&quot;working set&quot;&gt;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/org.eclipse.etrice.core.config&quot; type=&quot;4&quot;/&gt;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/org.eclipse.etrice.core.config.generator&quot; type=&quot;4&quot;/&gt;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/org.eclipse.etrice.core.config.tests&quot; type=&quot;4&quot;/&gt;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/org.eclipse.etrice.core.config.ui&quot; type=&quot;4&quot;/&gt;&#10;&lt;/launchConfigurationWorkingSet&gt;}"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.etrice.core.config"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="4"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
+<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
+<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="src/org/eclipse/etrice/core/GenerateConfig.mwe2"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.etrice.core.config"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx512m"/>
+</launchConfiguration>
diff --git a/plugins/org.eclipse.etrice.core.config/.project b/plugins/org.eclipse.etrice.core.config/.project
index 6bde47b31..0883b001d 100644
--- a/plugins/org.eclipse.etrice.core.config/.project
+++ b/plugins/org.eclipse.etrice.core.config/.project
@@ -1,34 +1,34 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.etrice.core.config</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>
- <buildCommand>
- <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.etrice.core.config</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>
+ <buildCommand>
+ <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.etrice.core.config/build.properties b/plugins/org.eclipse.etrice.core.config/build.properties
index 31255ed05..a1186e97f 100644
--- a/plugins/org.eclipse.etrice.core.config/build.properties
+++ b/plugins/org.eclipse.etrice.core.config/build.properties
@@ -1,6 +1,6 @@
-source.. = src/,\
- src-gen/,\
- xtend-gen/
-bin.includes = META-INF/,\
- .,\
+source.. = src/,\
+ src-gen/,\
+ xtend-gen/
+bin.includes = META-INF/,\
+ .,\
plugin.xml \ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.core.config/plugin.xml b/plugins/org.eclipse.etrice.core.config/plugin.xml
index fc1516a0f..79748dd18 100644
--- a/plugins/org.eclipse.etrice.core.config/plugin.xml
+++ b/plugins/org.eclipse.etrice.core.config/plugin.xml
@@ -1,18 +1,18 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-
-<plugin>
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/etrice/core/Config"
- class = "org.eclipse.etrice.core.config.ConfigPackage"
- genModel = "org/eclipse/etrice/core/Config.genmodel" />
-
- </extension>
-
-
-
-
-
-</plugin>
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<plugin>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <package
+ uri = "http://www.eclipse.org/etrice/core/Config"
+ class = "org.eclipse.etrice.core.config.ConfigPackage"
+ genModel = "org/eclipse/etrice/core/Config.genmodel" />
+
+ </extension>
+
+
+
+
+
+</plugin>
diff --git a/plugins/org.eclipse.etrice.core.config/plugin.xml_gen b/plugins/org.eclipse.etrice.core.config/plugin.xml_gen
index 86ac574da..e1d038f34 100644
--- a/plugins/org.eclipse.etrice.core.config/plugin.xml_gen
+++ b/plugins/org.eclipse.etrice.core.config/plugin.xml_gen
@@ -1,17 +1,17 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-
-<plugin>
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri = "http://www.eclipse.org/etrice/core/Config"
- class = "org.eclipse.etrice.core.config.ConfigPackage"
- genModel = "org/eclipse/etrice/core/Config.genmodel" />
-
- </extension>
-
-
-
-
-</plugin>
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<plugin>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <package
+ uri = "http://www.eclipse.org/etrice/core/Config"
+ class = "org.eclipse.etrice.core.config.ConfigPackage"
+ genModel = "org/eclipse/etrice/core/Config.genmodel" />
+
+ </extension>
+
+
+
+
+</plugin>
diff --git a/plugins/org.eclipse.etrice.core.config/src-gen/org/eclipse/etrice/core/AbstractConfigRuntimeModule.java b/plugins/org.eclipse.etrice.core.config/src-gen/org/eclipse/etrice/core/AbstractConfigRuntimeModule.java
index 61110b1ad..c1bdce9cb 100644
--- a/plugins/org.eclipse.etrice.core.config/src-gen/org/eclipse/etrice/core/AbstractConfigRuntimeModule.java
+++ b/plugins/org.eclipse.etrice.core.config/src-gen/org/eclipse/etrice/core/AbstractConfigRuntimeModule.java
@@ -1,162 +1,162 @@
-/*
- * generated by Xtext
- */
-package org.eclipse.etrice.core;
-
-import java.util.Properties;
-
-import org.eclipse.xtext.Constants;
-import org.eclipse.xtext.service.DefaultRuntimeModule;
-
-import com.google.inject.Binder;
-import com.google.inject.name.Names;
-
-/**
- * Manual modifications go to {org.eclipse.etrice.core.ConfigRuntimeModule}
- */
- @SuppressWarnings("all")
-public abstract class AbstractConfigRuntimeModule extends DefaultRuntimeModule {
-
- protected Properties properties = null;
-
- @Override
- public void configure(Binder binder) {
- properties = tryBindProperties(binder, "org/eclipse/etrice/core/Config.properties");
- super.configure(binder);
- }
-
- public void configureLanguageName(Binder binder) {
- binder.bind(String.class).annotatedWith(Names.named(Constants.LANGUAGE_NAME)).toInstance("org.eclipse.etrice.core.Config");
- }
-
- public void configureFileExtensions(Binder binder) {
- if (properties == null || properties.getProperty(Constants.FILE_EXTENSIONS) == null)
- binder.bind(String.class).annotatedWith(Names.named(Constants.FILE_EXTENSIONS)).toInstance("config");
- }
-
- // contributed by org.eclipse.xtext.generator.grammarAccess.GrammarAccessFragment
- public java.lang.ClassLoader bindClassLoaderToInstance() {
- return getClass().getClassLoader();
- }
-
- // contributed by org.eclipse.xtext.generator.grammarAccess.GrammarAccessFragment
- public Class<? extends org.eclipse.xtext.IGrammarAccess> bindIGrammarAccess() {
- return org.eclipse.etrice.core.services.ConfigGrammarAccess.class;
- }
-
- // contributed by org.eclipse.xtext.generator.serializer.SerializerFragment
- public Class<? extends org.eclipse.xtext.serializer.sequencer.ISemanticSequencer> bindISemanticSequencer() {
- return org.eclipse.etrice.core.serializer.ConfigSemanticSequencer.class;
- }
-
- // contributed by org.eclipse.xtext.generator.serializer.SerializerFragment
- public Class<? extends org.eclipse.xtext.serializer.sequencer.ISyntacticSequencer> bindISyntacticSequencer() {
- return org.eclipse.etrice.core.serializer.ConfigSyntacticSequencer.class;
- }
-
- // contributed by org.eclipse.xtext.generator.serializer.SerializerFragment
- public Class<? extends org.eclipse.xtext.serializer.ISerializer> bindISerializer() {
- return org.eclipse.xtext.serializer.impl.Serializer.class;
- }
-
- // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
- public Class<? extends org.eclipse.xtext.parser.IParser> bindIParser() {
- return org.eclipse.etrice.core.parser.antlr.ConfigParser.class;
- }
-
- // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
- public Class<? extends org.eclipse.xtext.parser.ITokenToStringConverter> bindITokenToStringConverter() {
- return org.eclipse.xtext.parser.antlr.AntlrTokenToStringConverter.class;
- }
-
- // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
- public Class<? extends org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider> bindIAntlrTokenFileProvider() {
- return org.eclipse.etrice.core.parser.antlr.ConfigAntlrTokenFileProvider.class;
- }
-
- // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
- public Class<? extends org.eclipse.xtext.parser.antlr.Lexer> bindLexer() {
- return org.eclipse.etrice.core.parser.antlr.internal.InternalConfigLexer.class;
- }
-
- // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
- public com.google.inject.Provider<org.eclipse.etrice.core.parser.antlr.internal.InternalConfigLexer> provideInternalConfigLexer() {
- return org.eclipse.xtext.parser.antlr.LexerProvider.create(org.eclipse.etrice.core.parser.antlr.internal.InternalConfigLexer.class);
- }
-
- // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
- public void configureRuntimeLexer(com.google.inject.Binder binder) {
- binder.bind(org.eclipse.xtext.parser.antlr.Lexer.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.parser.antlr.LexerBindings.RUNTIME)).to(org.eclipse.etrice.core.parser.antlr.internal.InternalConfigLexer.class);
- }
-
- // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
- public Class<? extends org.eclipse.xtext.parser.antlr.ITokenDefProvider> bindITokenDefProvider() {
- return org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider.class;
- }
-
- // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
- public Class<? extends org.eclipse.xtext.parser.antlr.IUnorderedGroupHelper> bindIUnorderedGroupHelper() {
- return org.eclipse.xtext.parser.antlr.UnorderedGroupHelper.class;
- }
-
- // contributed by org.eclipse.xtext.generator.validation.JavaValidatorFragment
- @org.eclipse.xtext.service.SingletonBinding(eager=true) public Class<? extends org.eclipse.etrice.core.validation.ConfigJavaValidator> bindConfigJavaValidator() {
- return org.eclipse.etrice.core.validation.ConfigJavaValidator.class;
- }
-
- // contributed by org.eclipse.xtext.generator.scoping.AbstractScopingFragment
- public Class<? extends org.eclipse.xtext.scoping.IScopeProvider> bindIScopeProvider() {
- return org.eclipse.etrice.core.scoping.ConfigScopeProvider.class;
- }
-
- // contributed by org.eclipse.xtext.generator.scoping.AbstractScopingFragment
- public void configureIScopeProviderDelegate(com.google.inject.Binder binder) {
- binder.bind(org.eclipse.xtext.scoping.IScopeProvider.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider.NAMED_DELEGATE)).to(org.eclipse.xtext.scoping.impl.SimpleLocalScopeProvider.class);
- }
-
- // contributed by org.eclipse.xtext.generator.scoping.AbstractScopingFragment
- public Class<? extends org.eclipse.xtext.scoping.IGlobalScopeProvider> bindIGlobalScopeProvider() {
- return org.eclipse.xtext.scoping.impl.ImportUriGlobalScopeProvider.class;
- }
-
- // contributed by org.eclipse.xtext.generator.scoping.AbstractScopingFragment
- public void configureIgnoreCaseLinking(com.google.inject.Binder binder) {
- binder.bindConstant().annotatedWith(org.eclipse.xtext.scoping.IgnoreCaseLinking.class).to(false);
- }
-
- // contributed by org.eclipse.xtext.generator.exporting.QualifiedNamesFragment
- public Class<? extends org.eclipse.xtext.naming.IQualifiedNameProvider> bindIQualifiedNameProvider() {
- return org.eclipse.xtext.naming.DefaultDeclarativeQualifiedNameProvider.class;
- }
-
- // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
- public Class<? extends org.eclipse.xtext.resource.IContainer.Manager> bindIContainer$Manager() {
- return org.eclipse.xtext.resource.containers.StateBasedContainerManager.class;
- }
-
- // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
- public Class<? extends org.eclipse.xtext.resource.containers.IAllContainersState.Provider> bindIAllContainersState$Provider() {
- return org.eclipse.xtext.resource.containers.ResourceSetBasedAllContainersStateProvider.class;
- }
-
- // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
- public void configureIResourceDescriptions(com.google.inject.Binder binder) {
- binder.bind(org.eclipse.xtext.resource.IResourceDescriptions.class).to(org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions.class);
- }
-
- // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
- public void configureIResourceDescriptionsBuilderScope(com.google.inject.Binder binder) {
- binder.bind(org.eclipse.xtext.resource.IResourceDescriptions.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.resource.impl.ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE)).to(org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions.class);
- }
-
- // contributed by org.eclipse.xtext.generator.generator.GeneratorFragment
- public Class<? extends org.eclipse.xtext.generator.IGenerator> bindIGenerator() {
- return org.eclipse.etrice.core.generator.ConfigGenerator.class;
- }
-
- // contributed by org.eclipse.xtext.generator.formatting.FormatterFragment
- public Class<? extends org.eclipse.xtext.formatting.IFormatter> bindIFormatter() {
- return org.eclipse.etrice.core.formatting.ConfigFormatter.class;
- }
-
-}
+/*
+ * generated by Xtext
+ */
+package org.eclipse.etrice.core;
+
+import java.util.Properties;
+
+import org.eclipse.xtext.Constants;
+import org.eclipse.xtext.service.DefaultRuntimeModule;
+
+import com.google.inject.Binder;
+import com.google.inject.name.Names;
+
+/**
+ * Manual modifications go to {org.eclipse.etrice.core.ConfigRuntimeModule}
+ */
+ @SuppressWarnings("all")
+public abstract class AbstractConfigRuntimeModule extends DefaultRuntimeModule {
+
+ protected Properties properties = null;
+
+ @Override
+ public void configure(Binder binder) {
+ properties = tryBindProperties(binder, "org/eclipse/etrice/core/Config.properties");
+ super.configure(binder);
+ }
+
+ public void configureLanguageName(Binder binder) {
+ binder.bind(String.class).annotatedWith(Names.named(Constants.LANGUAGE_NAME)).toInstance("org.eclipse.etrice.core.Config");
+ }
+
+ public void configureFileExtensions(Binder binder) {
+ if (properties == null || properties.getProperty(Constants.FILE_EXTENSIONS) == null)
+ binder.bind(String.class).annotatedWith(Names.named(Constants.FILE_EXTENSIONS)).toInstance("config");
+ }
+
+ // contributed by org.eclipse.xtext.generator.grammarAccess.GrammarAccessFragment
+ public java.lang.ClassLoader bindClassLoaderToInstance() {
+ return getClass().getClassLoader();
+ }
+
+ // contributed by org.eclipse.xtext.generator.grammarAccess.GrammarAccessFragment
+ public Class<? extends org.eclipse.xtext.IGrammarAccess> bindIGrammarAccess() {
+ return org.eclipse.etrice.core.services.ConfigGrammarAccess.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.serializer.SerializerFragment
+ public Class<? extends org.eclipse.xtext.serializer.sequencer.ISemanticSequencer> bindISemanticSequencer() {
+ return org.eclipse.etrice.core.serializer.ConfigSemanticSequencer.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.serializer.SerializerFragment
+ public Class<? extends org.eclipse.xtext.serializer.sequencer.ISyntacticSequencer> bindISyntacticSequencer() {
+ return org.eclipse.etrice.core.serializer.ConfigSyntacticSequencer.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.serializer.SerializerFragment
+ public Class<? extends org.eclipse.xtext.serializer.ISerializer> bindISerializer() {
+ return org.eclipse.xtext.serializer.impl.Serializer.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
+ public Class<? extends org.eclipse.xtext.parser.IParser> bindIParser() {
+ return org.eclipse.etrice.core.parser.antlr.ConfigParser.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
+ public Class<? extends org.eclipse.xtext.parser.ITokenToStringConverter> bindITokenToStringConverter() {
+ return org.eclipse.xtext.parser.antlr.AntlrTokenToStringConverter.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
+ public Class<? extends org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider> bindIAntlrTokenFileProvider() {
+ return org.eclipse.etrice.core.parser.antlr.ConfigAntlrTokenFileProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
+ public Class<? extends org.eclipse.xtext.parser.antlr.Lexer> bindLexer() {
+ return org.eclipse.etrice.core.parser.antlr.internal.InternalConfigLexer.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
+ public com.google.inject.Provider<org.eclipse.etrice.core.parser.antlr.internal.InternalConfigLexer> provideInternalConfigLexer() {
+ return org.eclipse.xtext.parser.antlr.LexerProvider.create(org.eclipse.etrice.core.parser.antlr.internal.InternalConfigLexer.class);
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
+ public void configureRuntimeLexer(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.parser.antlr.Lexer.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.parser.antlr.LexerBindings.RUNTIME)).to(org.eclipse.etrice.core.parser.antlr.internal.InternalConfigLexer.class);
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
+ public Class<? extends org.eclipse.xtext.parser.antlr.ITokenDefProvider> bindITokenDefProvider() {
+ return org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
+ public Class<? extends org.eclipse.xtext.parser.antlr.IUnorderedGroupHelper> bindIUnorderedGroupHelper() {
+ return org.eclipse.xtext.parser.antlr.UnorderedGroupHelper.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.validation.JavaValidatorFragment
+ @org.eclipse.xtext.service.SingletonBinding(eager=true) public Class<? extends org.eclipse.etrice.core.validation.ConfigJavaValidator> bindConfigJavaValidator() {
+ return org.eclipse.etrice.core.validation.ConfigJavaValidator.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.scoping.AbstractScopingFragment
+ public Class<? extends org.eclipse.xtext.scoping.IScopeProvider> bindIScopeProvider() {
+ return org.eclipse.etrice.core.scoping.ConfigScopeProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.scoping.AbstractScopingFragment
+ public void configureIScopeProviderDelegate(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.scoping.IScopeProvider.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider.NAMED_DELEGATE)).to(org.eclipse.xtext.scoping.impl.SimpleLocalScopeProvider.class);
+ }
+
+ // contributed by org.eclipse.xtext.generator.scoping.AbstractScopingFragment
+ public Class<? extends org.eclipse.xtext.scoping.IGlobalScopeProvider> bindIGlobalScopeProvider() {
+ return org.eclipse.xtext.scoping.impl.ImportUriGlobalScopeProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.scoping.AbstractScopingFragment
+ public void configureIgnoreCaseLinking(com.google.inject.Binder binder) {
+ binder.bindConstant().annotatedWith(org.eclipse.xtext.scoping.IgnoreCaseLinking.class).to(false);
+ }
+
+ // contributed by org.eclipse.xtext.generator.exporting.QualifiedNamesFragment
+ public Class<? extends org.eclipse.xtext.naming.IQualifiedNameProvider> bindIQualifiedNameProvider() {
+ return org.eclipse.xtext.naming.DefaultDeclarativeQualifiedNameProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
+ public Class<? extends org.eclipse.xtext.resource.IContainer.Manager> bindIContainer$Manager() {
+ return org.eclipse.xtext.resource.containers.StateBasedContainerManager.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
+ public Class<? extends org.eclipse.xtext.resource.containers.IAllContainersState.Provider> bindIAllContainersState$Provider() {
+ return org.eclipse.xtext.resource.containers.ResourceSetBasedAllContainersStateProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
+ public void configureIResourceDescriptions(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.resource.IResourceDescriptions.class).to(org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions.class);
+ }
+
+ // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
+ public void configureIResourceDescriptionsBuilderScope(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.resource.IResourceDescriptions.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.resource.impl.ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE)).to(org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions.class);
+ }
+
+ // contributed by org.eclipse.xtext.generator.generator.GeneratorFragment
+ public Class<? extends org.eclipse.xtext.generator.IGenerator> bindIGenerator() {
+ return org.eclipse.etrice.core.generator.ConfigGenerator.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.formatting.FormatterFragment
+ public Class<? extends org.eclipse.xtext.formatting.IFormatter> bindIFormatter() {
+ return org.eclipse.etrice.core.formatting.ConfigFormatter.class;
+ }
+
+}
diff --git a/plugins/org.eclipse.etrice.core.config/src-gen/org/eclipse/etrice/core/ConfigStandaloneSetupGenerated.java b/plugins/org.eclipse.etrice.core.config/src-gen/org/eclipse/etrice/core/ConfigStandaloneSetupGenerated.java
index 4651430a3..d31b31c64 100644
--- a/plugins/org.eclipse.etrice.core.config/src-gen/org/eclipse/etrice/core/ConfigStandaloneSetupGenerated.java
+++ b/plugins/org.eclipse.etrice.core.config/src-gen/org/eclipse/etrice/core/ConfigStandaloneSetupGenerated.java
@@ -1,43 +1,43 @@
-
-package org.eclipse.etrice.core;
-
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.xtext.ISetup;
-import org.eclipse.emf.ecore.resource.Resource;
-
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
-/**
- * Generated from StandaloneSetup.xpt!
- */
-@SuppressWarnings("all")
-public class ConfigStandaloneSetupGenerated implements ISetup {
-
- public Injector createInjectorAndDoEMFRegistration() {
- org.eclipse.xtext.common.TerminalsStandaloneSetup.doSetup();
-
- Injector injector = createInjector();
- register(injector);
- return injector;
- }
-
- public Injector createInjector() {
- return Guice.createInjector(new org.eclipse.etrice.core.ConfigRuntimeModule());
- }
-
- public void register(Injector injector) {
- if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/etrice/core/Config")) {
- EPackage.Registry.INSTANCE.put("http://www.eclipse.org/etrice/core/Config", org.eclipse.etrice.core.config.ConfigPackage.eINSTANCE);
- }
-
- org.eclipse.xtext.resource.IResourceFactory resourceFactory = injector.getInstance(org.eclipse.xtext.resource.IResourceFactory.class);
- org.eclipse.xtext.resource.IResourceServiceProvider serviceProvider = injector.getInstance(org.eclipse.xtext.resource.IResourceServiceProvider.class);
- Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("config", resourceFactory);
- org.eclipse.xtext.resource.IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("config", serviceProvider);
-
-
-
-
- }
-}
+
+package org.eclipse.etrice.core;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.xtext.ISetup;
+import org.eclipse.emf.ecore.resource.Resource;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+/**
+ * Generated from StandaloneSetup.xpt!
+ */
+@SuppressWarnings("all")
+public class ConfigStandaloneSetupGenerated implements ISetup {
+
+ public Injector createInjectorAndDoEMFRegistration() {
+ org.eclipse.xtext.common.TerminalsStandaloneSetup.doSetup();
+
+ Injector injector = createInjector();
+ register(injector);
+ return injector;
+ }
+
+ public Injector createInjector() {
+ return Guice.createInjector(new org.eclipse.etrice.core.ConfigRuntimeModule());
+ }
+
+ public void register(Injector injector) {
+ if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/etrice/core/Config")) {
+ EPackage.Registry.INSTANCE.put("http://www.eclipse.org/etrice/core/Config", org.eclipse.etrice.core.config.ConfigPackage.eINSTANCE);
+ }
+
+ org.eclipse.xtext.resource.IResourceFactory resourceFactory = injector.getInstance(org.eclipse.xtext.resource.IResourceFactory.class);
+ org.eclipse.xtext.resource.IResourceServiceProvider serviceProvider = injector.getInstance(org.eclipse.xtext.resource.IResourceServiceProvider.class);
+ Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("config", resourceFactory);
+ org.eclipse.xtext.resource.IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("config", serviceProvider);
+
+
+
+
+ }
+}
diff --git a/plugins/org.eclipse.etrice.core.config/src-gen/org/eclipse/etrice/core/parser/antlr/ConfigAntlrTokenFileProvider.java b/plugins/org.eclipse.etrice.core.config/src-gen/org/eclipse/etrice/core/parser/antlr/ConfigAntlrTokenFileProvider.java
index fdd47642c..e7f19df15 100644
--- a/plugins/org.eclipse.etrice.core.config/src-gen/org/eclipse/etrice/core/parser/antlr/ConfigAntlrTokenFileProvider.java
+++ b/plugins/org.eclipse.etrice.core.config/src-gen/org/eclipse/etrice/core/parser/antlr/ConfigAntlrTokenFileProvider.java
@@ -1,15 +1,15 @@
-/*
-* generated by Xtext
-*/
-package org.eclipse.etrice.core.parser.antlr;
-
-import java.io.InputStream;
-import org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider;
-
-public class ConfigAntlrTokenFileProvider implements IAntlrTokenFileProvider {
-
- public InputStream getAntlrTokenFile() {
- ClassLoader classLoader = getClass().getClassLoader();
- return classLoader.getResourceAsStream("org/eclipse/etrice/core/parser/antlr/internal/InternalConfig.tokens");
- }
-}
+/*
+* generated by Xtext
+*/
+package org.eclipse.etrice.core.parser.antlr;
+
+import java.io.InputStream;
+import org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider;
+
+public class ConfigAntlrTokenFileProvider implements IAntlrTokenFileProvider {
+
+ public InputStream getAntlrTokenFile() {
+ ClassLoader classLoader = getClass().getClassLoader();
+ return classLoader.getResourceAsStream("org/eclipse/etrice/core/parser/antlr/internal/InternalConfig.tokens");
+ }
+}
diff --git a/plugins/org.eclipse.etrice.core.config/src-gen/org/eclipse/etrice/core/parser/antlr/ConfigParser.java b/plugins/org.eclipse.etrice.core.config/src-gen/org/eclipse/etrice/core/parser/antlr/ConfigParser.java
index 2b7ad294f..db66f38bd 100644
--- a/plugins/org.eclipse.etrice.core.config/src-gen/org/eclipse/etrice/core/parser/antlr/ConfigParser.java
+++ b/plugins/org.eclipse.etrice.core.config/src-gen/org/eclipse/etrice/core/parser/antlr/ConfigParser.java
@@ -1,39 +1,39 @@
-/*
-* generated by Xtext
-*/
-package org.eclipse.etrice.core.parser.antlr;
-
-import com.google.inject.Inject;
-
-import org.eclipse.xtext.parser.antlr.XtextTokenStream;
-import org.eclipse.etrice.core.services.ConfigGrammarAccess;
-
-public class ConfigParser extends org.eclipse.xtext.parser.antlr.AbstractAntlrParser {
-
- @Inject
- private ConfigGrammarAccess grammarAccess;
-
- @Override
- protected void setInitialHiddenTokens(XtextTokenStream tokenStream) {
- tokenStream.setInitialHiddenTokens("RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT");
- }
-
- @Override
- protected org.eclipse.etrice.core.parser.antlr.internal.InternalConfigParser createParser(XtextTokenStream stream) {
- return new org.eclipse.etrice.core.parser.antlr.internal.InternalConfigParser(stream, getGrammarAccess());
- }
-
- @Override
- protected String getDefaultRuleName() {
- return "ConfigModel";
- }
-
- public ConfigGrammarAccess getGrammarAccess() {
- return this.grammarAccess;
- }
-
- public void setGrammarAccess(ConfigGrammarAccess grammarAccess) {
- this.grammarAccess = grammarAccess;
- }
-
-}
+/*
+* generated by Xtext
+*/
+package org.eclipse.etrice.core.parser.antlr;
+
+import com.google.inject.Inject;
+
+import org.eclipse.xtext.parser.antlr.XtextTokenStream;
+import org.eclipse.etrice.core.services.ConfigGrammarAccess;
+
+public class ConfigParser extends org.eclipse.xtext.parser.antlr.AbstractAntlrParser {
+
+ @Inject
+ private ConfigGrammarAccess grammarAccess;
+
+ @Override
+ protected void setInitialHiddenTokens(XtextTokenStream tokenStream) {
+ tokenStream.setInitialHiddenTokens("RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT");
+ }
+
+ @Override
+ protected org.eclipse.etrice.core.parser.antlr.internal.InternalConfigParser createParser(XtextTokenStream stream) {
+ return new org.eclipse.etrice.core.parser.antlr.internal.InternalConfigParser(stream, getGrammarAccess());
+ }
+
+ @Override
+ protected String getDefaultRuleName() {
+ return "ConfigModel";
+ }
+
+ public ConfigGrammarAccess getGrammarAccess() {
+ return this.grammarAccess;
+ }
+
+ public void setGrammarAccess(ConfigGrammarAccess grammarAccess) {
+ this.grammarAccess = grammarAccess;
+ }
+
+}
diff --git a/plugins/org.eclipse.etrice.core.config/src-gen/org/eclipse/etrice/core/parser/antlr/internal/InternalConfig.g b/plugins/org.eclipse.etrice.core.config/src-gen/org/eclipse/etrice/core/parser/antlr/internal/InternalConfig.g
index a9e7e19bf..303db4fe4 100644
--- a/plugins/org.eclipse.etrice.core.config/src-gen/org/eclipse/etrice/core/parser/antlr/internal/InternalConfig.g
+++ b/plugins/org.eclipse.etrice.core.config/src-gen/org/eclipse/etrice/core/parser/antlr/internal/InternalConfig.g
@@ -1,2147 +1,2147 @@
-/*
-* generated by Xtext
-*/
-grammar InternalConfig;
-
-options {
- superClass=AbstractInternalAntlrParser;
-
-}
-
-@lexer::header {
-package org.eclipse.etrice.core.parser.antlr.internal;
-
-// Hack: Use our own Lexer superclass by means of import.
-// Currently there is no other way to specify the superclass for the lexer.
-import org.eclipse.xtext.parser.antlr.Lexer;
-}
-
-@parser::header {
-package org.eclipse.etrice.core.parser.antlr.internal;
-
-import org.eclipse.xtext.*;
-import org.eclipse.xtext.parser.*;
-import org.eclipse.xtext.parser.impl.*;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser;
-import org.eclipse.xtext.parser.antlr.XtextTokenStream;
-import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens;
-import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken;
-import org.eclipse.etrice.core.services.ConfigGrammarAccess;
-
-}
-
-@parser::members {
-
- private ConfigGrammarAccess grammarAccess;
-
- public InternalConfigParser(TokenStream input, ConfigGrammarAccess grammarAccess) {
- this(input);
- this.grammarAccess = grammarAccess;
- registerRules(grammarAccess.getGrammar());
- }
-
- @Override
- protected String getFirstRuleName() {
- return "ConfigModel";
- }
-
- @Override
- protected ConfigGrammarAccess getGrammarAccess() {
- return grammarAccess;
- }
-}
-
-@rulecatch {
- catch (RecognitionException re) {
- recover(input,re);
- appendSkippedTokens();
- }
-}
-
-
-
-
-// Entry rule entryRuleConfigModel
-entryRuleConfigModel returns [EObject current=null]
- :
- { newCompositeNode(grammarAccess.getConfigModelRule()); }
- iv_ruleConfigModel=ruleConfigModel
- { $current=$iv_ruleConfigModel.current; }
- EOF
-;
-
-// Rule ConfigModel
-ruleConfigModel returns [EObject current=null]
- @init { enterRule();
- }
- @after { leaveRule(); }:
-((
-(
- {
- newCompositeNode(grammarAccess.getConfigModelAccess().getImportsImportParserRuleCall_0_0());
- }
- lv_imports_0_0=ruleImport {
- if ($current==null) {
- $current = createModelElementForParent(grammarAccess.getConfigModelRule());
- }
- add(
- $current,
- "imports",
- lv_imports_0_0,
- "Import");
- afterParserOrEnumRuleCall();
- }
-
-)
-)*(
-(
- {
- newCompositeNode(grammarAccess.getConfigModelAccess().getConfigElementsConfigElementParserRuleCall_1_0());
- }
- lv_configElements_1_0=ruleConfigElement {
- if ($current==null) {
- $current = createModelElementForParent(grammarAccess.getConfigModelRule());
- }
- add(
- $current,
- "configElements",
- lv_configElements_1_0,
- "ConfigElement");
- afterParserOrEnumRuleCall();
- }
-
-)
-)*)
-;
-
-
-
-
-
-// Entry rule entryRuleConfigElement
-entryRuleConfigElement returns [EObject current=null]
- :
- { newCompositeNode(grammarAccess.getConfigElementRule()); }
- iv_ruleConfigElement=ruleConfigElement
- { $current=$iv_ruleConfigElement.current; }
- EOF
-;
-
-// Rule ConfigElement
-ruleConfigElement returns [EObject current=null]
- @init { enterRule();
- }
- @after { leaveRule(); }:
-(
- {
- newCompositeNode(grammarAccess.getConfigElementAccess().getSubSystemConfigParserRuleCall_0());
- }
- this_SubSystemConfig_0=ruleSubSystemConfig
- {
- $current = $this_SubSystemConfig_0.current;
- afterParserOrEnumRuleCall();
- }
-
- |
- {
- newCompositeNode(grammarAccess.getConfigElementAccess().getActorClassConfigParserRuleCall_1());
- }
- this_ActorClassConfig_1=ruleActorClassConfig
- {
- $current = $this_ActorClassConfig_1.current;
- afterParserOrEnumRuleCall();
- }
-
- |
- {
- newCompositeNode(grammarAccess.getConfigElementAccess().getActorInstanceConfigParserRuleCall_2());
- }
- this_ActorInstanceConfig_2=ruleActorInstanceConfig
- {
- $current = $this_ActorInstanceConfig_2.current;
- afterParserOrEnumRuleCall();
- }
-
- |
- {
- newCompositeNode(grammarAccess.getConfigElementAccess().getProtocolClassConfigParserRuleCall_3());
- }
- this_ProtocolClassConfig_3=ruleProtocolClassConfig
- {
- $current = $this_ProtocolClassConfig_3.current;
- afterParserOrEnumRuleCall();
- }
-)
-;
-
-
-
-
-
-// Entry rule entryRuleSubSystemConfig
-entryRuleSubSystemConfig returns [EObject current=null]
- :
- { newCompositeNode(grammarAccess.getSubSystemConfigRule()); }
- iv_ruleSubSystemConfig=ruleSubSystemConfig
- { $current=$iv_ruleSubSystemConfig.current; }
- EOF
-;
-
-// Rule SubSystemConfig
-ruleSubSystemConfig returns [EObject current=null]
- @init { enterRule();
- }
- @after { leaveRule(); }:
-( otherlv_0='SubSystemConfig'
- {
- newLeafNode(otherlv_0, grammarAccess.getSubSystemConfigAccess().getSubSystemConfigKeyword_0());
- }
-(
-(
- {
- if ($current==null) {
- $current = createModelElement(grammarAccess.getSubSystemConfigRule());
- }
- }
- otherlv_1=RULE_ID
- {
- newLeafNode(otherlv_1, grammarAccess.getSubSystemConfigAccess().getSubSystemSubSystemClassCrossReference_1_0());
- }
-
-)
-) otherlv_2='{'
- {
- newLeafNode(otherlv_2, grammarAccess.getSubSystemConfigAccess().getLeftCurlyBracketKeyword_2());
- }
-(
-(
- {
- newCompositeNode(grammarAccess.getSubSystemConfigAccess().getDynConfigDynamicConfigParserRuleCall_3_0());
- }
- lv_dynConfig_3_0=ruleDynamicConfig {
- if ($current==null) {
- $current = createModelElementForParent(grammarAccess.getSubSystemConfigRule());
- }
- set(
- $current,
- "dynConfig",
- lv_dynConfig_3_0,
- "DynamicConfig");
- afterParserOrEnumRuleCall();
- }
-
-)
-) otherlv_4='}'
- {
- newLeafNode(otherlv_4, grammarAccess.getSubSystemConfigAccess().getRightCurlyBracketKeyword_4());
- }
-)
-;
-
-
-
-
-
-// Entry rule entryRuleDynamicConfig
-entryRuleDynamicConfig returns [EObject current=null]
- :
- { newCompositeNode(grammarAccess.getDynamicConfigRule()); }
- iv_ruleDynamicConfig=ruleDynamicConfig
- { $current=$iv_ruleDynamicConfig.current; }
- EOF
-;
-
-// Rule DynamicConfig
-ruleDynamicConfig returns [EObject current=null]
- @init { enterRule();
- }
- @after { leaveRule(); }:
-( otherlv_0='dynamic configuration'
- {
- newLeafNode(otherlv_0, grammarAccess.getDynamicConfigAccess().getDynamicConfigurationKeyword_0());
- }
- otherlv_1='{'
- {
- newLeafNode(otherlv_1, grammarAccess.getDynamicConfigAccess().getLeftCurlyBracketKeyword_1());
- }
-(
-
-(
- {
- getUnorderedGroupHelper().enter(grammarAccess.getDynamicConfigAccess().getUnorderedGroup_2());
- }
- (
- (
-
- (
- {getUnorderedGroupHelper().canSelect(grammarAccess.getDynamicConfigAccess().getUnorderedGroup_2(), 0)}?=>(
- {
- getUnorderedGroupHelper().select(grammarAccess.getDynamicConfigAccess().getUnorderedGroup_2(), 0);
- }
- ({true}?=>(( otherlv_3='file path'
- {
- newLeafNode(otherlv_3, grammarAccess.getDynamicConfigAccess().getFilePathKeyword_2_0_0_0());
- }
-(
-(
- lv_filePath_4_0=RULE_STRING
- {
- newLeafNode(lv_filePath_4_0, grammarAccess.getDynamicConfigAccess().getFilePathSTRINGTerminalRuleCall_2_0_0_1_0());
- }
- {
- if ($current==null) {
- $current = createModelElement(grammarAccess.getDynamicConfigRule());
- }
- setWithLastConsumed(
- $current,
- "filePath",
- lv_filePath_4_0,
- "STRING");
- }
-
-)
-))
- |(( otherlv_5='user import'
- {
- newLeafNode(otherlv_5, grammarAccess.getDynamicConfigAccess().getUserImportKeyword_2_0_1_0_0());
- }
-(
-(
- lv_userCode1_6_0=RULE_STRING
- {
- newLeafNode(lv_userCode1_6_0, grammarAccess.getDynamicConfigAccess().getUserCode1STRINGTerminalRuleCall_2_0_1_0_1_0());
- }
- {
- if ($current==null) {
- $current = createModelElement(grammarAccess.getDynamicConfigRule());
- }
- setWithLastConsumed(
- $current,
- "userCode1",
- lv_userCode1_6_0,
- "STRING");
- }
-
-)
-))( otherlv_7='user constructor'
- {
- newLeafNode(otherlv_7, grammarAccess.getDynamicConfigAccess().getUserConstructorKeyword_2_0_1_1_0());
- }
-(
-(
- lv_userCode2_8_0=RULE_STRING
- {
- newLeafNode(lv_userCode2_8_0, grammarAccess.getDynamicConfigAccess().getUserCode2STRINGTerminalRuleCall_2_0_1_1_1_0());
- }
- {
- if ($current==null) {
- $current = createModelElement(grammarAccess.getDynamicConfigRule());
- }
- setWithLastConsumed(
- $current,
- "userCode2",
- lv_userCode2_8_0,
- "STRING");
- }
-
-)
-)))))
- {
- getUnorderedGroupHelper().returnFromSelection(grammarAccess.getDynamicConfigAccess().getUnorderedGroup_2());
- }
- )
- ) |
-
- (
- {getUnorderedGroupHelper().canSelect(grammarAccess.getDynamicConfigAccess().getUnorderedGroup_2(), 1)}?=>(
- {
- getUnorderedGroupHelper().select(grammarAccess.getDynamicConfigAccess().getUnorderedGroup_2(), 1);
- }
- ({true}?=>( otherlv_9='polling timer [ms]'
- {
- newLeafNode(otherlv_9, grammarAccess.getDynamicConfigAccess().getPollingTimerMsKeyword_2_1_0());
- }
-(
-(
- lv_polling_10_0=RULE_INT
- {
- newLeafNode(lv_polling_10_0, grammarAccess.getDynamicConfigAccess().getPollingINTTerminalRuleCall_2_1_1_0());
- }
- {
- if ($current==null) {
- $current = createModelElement(grammarAccess.getDynamicConfigRule());
- }
- setWithLastConsumed(
- $current,
- "polling",
- lv_polling_10_0,
- "INT");
- }
-
-)
-)))
- {
- getUnorderedGroupHelper().returnFromSelection(grammarAccess.getDynamicConfigAccess().getUnorderedGroup_2());
- }
- )
- )
-
- )+
- {getUnorderedGroupHelper().canLeave(grammarAccess.getDynamicConfigAccess().getUnorderedGroup_2())}?
- )
-)
- {
- getUnorderedGroupHelper().leave(grammarAccess.getDynamicConfigAccess().getUnorderedGroup_2());
- }
-
-) otherlv_11='}'
- {
- newLeafNode(otherlv_11, grammarAccess.getDynamicConfigAccess().getRightCurlyBracketKeyword_3());
- }
-)
-;
-
-
-
-
-
-// Entry rule entryRuleActorClassConfig
-entryRuleActorClassConfig returns [EObject current=null]
- :
- { newCompositeNode(grammarAccess.getActorClassConfigRule()); }
- iv_ruleActorClassConfig=ruleActorClassConfig
- { $current=$iv_ruleActorClassConfig.current; }
- EOF
-;
-
-// Rule ActorClassConfig
-ruleActorClassConfig returns [EObject current=null]
- @init { enterRule();
- }
- @after { leaveRule(); }:
-( otherlv_0='ActorClassConfig'
- {
- newLeafNode(otherlv_0, grammarAccess.getActorClassConfigAccess().getActorClassConfigKeyword_0());
- }
-(
-(
- {
- if ($current==null) {
- $current = createModelElement(grammarAccess.getActorClassConfigRule());
- }
- }
- {
- newCompositeNode(grammarAccess.getActorClassConfigAccess().getActorActorClassCrossReference_1_0());
- }
- ruleFQN {
- afterParserOrEnumRuleCall();
- }
-
-)
-) otherlv_2='{'
- {
- newLeafNode(otherlv_2, grammarAccess.getActorClassConfigAccess().getLeftCurlyBracketKeyword_2());
- }
-(
-(
- {
- newCompositeNode(grammarAccess.getActorClassConfigAccess().getAttributesAttrClassConfigParserRuleCall_3_0());
- }
- lv_attributes_3_0=ruleAttrClassConfig {
- if ($current==null) {
- $current = createModelElementForParent(grammarAccess.getActorClassConfigRule());
- }
- add(
- $current,
- "attributes",
- lv_attributes_3_0,
- "AttrClassConfig");
- afterParserOrEnumRuleCall();
- }
-
-)
-)* otherlv_4='}'
- {
- newLeafNode(otherlv_4, grammarAccess.getActorClassConfigAccess().getRightCurlyBracketKeyword_4());
- }
-)
-;
-
-
-
-
-
-// Entry rule entryRuleActorInstanceConfig
-entryRuleActorInstanceConfig returns [EObject current=null]
- :
- { newCompositeNode(grammarAccess.getActorInstanceConfigRule()); }
- iv_ruleActorInstanceConfig=ruleActorInstanceConfig
- { $current=$iv_ruleActorInstanceConfig.current; }
- EOF
-;
-
-// Rule ActorInstanceConfig
-ruleActorInstanceConfig returns [EObject current=null]
- @init { enterRule();
- }
- @after { leaveRule(); }:
-( otherlv_0='ActorInstanceConfig'
- {
- newLeafNode(otherlv_0, grammarAccess.getActorInstanceConfigAccess().getActorInstanceConfigKeyword_0());
- }
-(
-(
- {
- if ($current==null) {
- $current = createModelElement(grammarAccess.getActorInstanceConfigRule());
- }
- }
- {
- newCompositeNode(grammarAccess.getActorInstanceConfigAccess().getRootSubSystemClassCrossReference_1_0());
- }
- ruleFQN {
- afterParserOrEnumRuleCall();
- }
-
-)
-) otherlv_2='/'
- {
- newLeafNode(otherlv_2, grammarAccess.getActorInstanceConfigAccess().getSolidusKeyword_2());
- }
-(
-(
- {
- newCompositeNode(grammarAccess.getActorInstanceConfigAccess().getPathRefPathParserRuleCall_3_0());
- }
- lv_path_3_0=ruleRefPath {
- if ($current==null) {
- $current = createModelElementForParent(grammarAccess.getActorInstanceConfigRule());
- }
- set(
- $current,
- "path",
- lv_path_3_0,
- "RefPath");
- afterParserOrEnumRuleCall();
- }
-
-)
-) otherlv_4='{'
- {
- newLeafNode(otherlv_4, grammarAccess.getActorInstanceConfigAccess().getLeftCurlyBracketKeyword_4());
- }
-(
-
-(
- {
- getUnorderedGroupHelper().enter(grammarAccess.getActorInstanceConfigAccess().getUnorderedGroup_5());
- }
- (
- (
-
- (
- {getUnorderedGroupHelper().canSelect(grammarAccess.getActorInstanceConfigAccess().getUnorderedGroup_5(), 0)}?=>(
- {
- getUnorderedGroupHelper().select(grammarAccess.getActorInstanceConfigAccess().getUnorderedGroup_5(), 0);
- }
- ({true}?=>(
-(
- {
- newCompositeNode(grammarAccess.getActorInstanceConfigAccess().getAttributesAttrInstanceConfigParserRuleCall_5_0_0());
- }
- lv_attributes_6_0=ruleAttrInstanceConfig {
- if ($current==null) {
- $current = createModelElementForParent(grammarAccess.getActorInstanceConfigRule());
- }
- add(
- $current,
- "attributes",
- lv_attributes_6_0,
- "AttrInstanceConfig");
- afterParserOrEnumRuleCall();
- }
-
-)
-))+
- {
- getUnorderedGroupHelper().returnFromSelection(grammarAccess.getActorInstanceConfigAccess().getUnorderedGroup_5());
- }
- )
- ) |
-
- (
- {getUnorderedGroupHelper().canSelect(grammarAccess.getActorInstanceConfigAccess().getUnorderedGroup_5(), 1)}?=>(
- {
- getUnorderedGroupHelper().select(grammarAccess.getActorInstanceConfigAccess().getUnorderedGroup_5(), 1);
- }
- ({true}?=>(
-(
- {
- newCompositeNode(grammarAccess.getActorInstanceConfigAccess().getPortsPortInstanceConfigParserRuleCall_5_1_0());
- }
- lv_ports_7_0=rulePortInstanceConfig {
- if ($current==null) {
- $current = createModelElementForParent(grammarAccess.getActorInstanceConfigRule());
- }
- add(
- $current,
- "ports",
- lv_ports_7_0,
- "PortInstanceConfig");
- afterParserOrEnumRuleCall();
- }
-
-)
-))+
- {
- getUnorderedGroupHelper().returnFromSelection(grammarAccess.getActorInstanceConfigAccess().getUnorderedGroup_5());
- }
- )
- )
-
- )*
- )
-)
- {
- getUnorderedGroupHelper().leave(grammarAccess.getActorInstanceConfigAccess().getUnorderedGroup_5());
- }
-
-) otherlv_8='}'
- {
- newLeafNode(otherlv_8, grammarAccess.getActorInstanceConfigAccess().getRightCurlyBracketKeyword_6());
- }
-)
-;
-
-
-
-
-
-// Entry rule entryRuleProtocolClassConfig
-entryRuleProtocolClassConfig returns [EObject current=null]
- :
- { newCompositeNode(grammarAccess.getProtocolClassConfigRule()); }
- iv_ruleProtocolClassConfig=ruleProtocolClassConfig
- { $current=$iv_ruleProtocolClassConfig.current; }
- EOF
-;
-
-// Rule ProtocolClassConfig
-ruleProtocolClassConfig returns [EObject current=null]
- @init { enterRule();
- }
- @after { leaveRule(); }:
-( otherlv_0='ProtocolClassConfig'
- {
- newLeafNode(otherlv_0, grammarAccess.getProtocolClassConfigAccess().getProtocolClassConfigKeyword_0());
- }
-(
-(
- {
- if ($current==null) {
- $current = createModelElement(grammarAccess.getProtocolClassConfigRule());
- }
- }
- {
- newCompositeNode(grammarAccess.getProtocolClassConfigAccess().getProtocolProtocolClassCrossReference_1_0());
- }
- ruleFQN {
- afterParserOrEnumRuleCall();
- }
-
-)
-) otherlv_2='{'
- {
- newLeafNode(otherlv_2, grammarAccess.getProtocolClassConfigAccess().getLeftCurlyBracketKeyword_2());
- }
-(
-
-(
- {
- getUnorderedGroupHelper().enter(grammarAccess.getProtocolClassConfigAccess().getUnorderedGroup_3());
- }
- (
- (
-
- (
- {getUnorderedGroupHelper().canSelect(grammarAccess.getProtocolClassConfigAccess().getUnorderedGroup_3(), 0)}?=>(
- {
- getUnorderedGroupHelper().select(grammarAccess.getProtocolClassConfigAccess().getUnorderedGroup_3(), 0);
- }
- ({true}?=>( otherlv_4='regular'
- {
- newLeafNode(otherlv_4, grammarAccess.getProtocolClassConfigAccess().getRegularKeyword_3_0_0());
- }
-(
-(
- {
- newCompositeNode(grammarAccess.getProtocolClassConfigAccess().getRegularPortClassConfigParserRuleCall_3_0_1_0());
- }
- lv_regular_5_0=rulePortClassConfig {
- if ($current==null) {
- $current = createModelElementForParent(grammarAccess.getProtocolClassConfigRule());
- }
- set(
- $current,
- "regular",
- lv_regular_5_0,
- "PortClassConfig");
- afterParserOrEnumRuleCall();
- }
-
-)
-)))
- {
- getUnorderedGroupHelper().returnFromSelection(grammarAccess.getProtocolClassConfigAccess().getUnorderedGroup_3());
- }
- )
- ) |
-
- (
- {getUnorderedGroupHelper().canSelect(grammarAccess.getProtocolClassConfigAccess().getUnorderedGroup_3(), 1)}?=>(
- {
- getUnorderedGroupHelper().select(grammarAccess.getProtocolClassConfigAccess().getUnorderedGroup_3(), 1);
- }
- ({true}?=>( otherlv_6='conjugate'
- {
- newLeafNode(otherlv_6, grammarAccess.getProtocolClassConfigAccess().getConjugateKeyword_3_1_0());
- }
-(
-(
- {
- newCompositeNode(grammarAccess.getProtocolClassConfigAccess().getConjugatedPortClassConfigParserRuleCall_3_1_1_0());
- }
- lv_conjugated_7_0=rulePortClassConfig {
- if ($current==null) {
- $current = createModelElementForParent(grammarAccess.getProtocolClassConfigRule());
- }
- set(
- $current,
- "conjugated",
- lv_conjugated_7_0,
- "PortClassConfig");
- afterParserOrEnumRuleCall();
- }
-
-)
-)))
- {
- getUnorderedGroupHelper().returnFromSelection(grammarAccess.getProtocolClassConfigAccess().getUnorderedGroup_3());
- }
- )
- )
-
- )*
- )
-)
- {
- getUnorderedGroupHelper().leave(grammarAccess.getProtocolClassConfigAccess().getUnorderedGroup_3());
- }
-
-) otherlv_8='}'
- {
- newLeafNode(otherlv_8, grammarAccess.getProtocolClassConfigAccess().getRightCurlyBracketKeyword_4());
- }
-)
-;
-
-
-
-
-
-// Entry rule entryRulePortClassConfig
-entryRulePortClassConfig returns [EObject current=null]
- :
- { newCompositeNode(grammarAccess.getPortClassConfigRule()); }
- iv_rulePortClassConfig=rulePortClassConfig
- { $current=$iv_rulePortClassConfig.current; }
- EOF
-;
-
-// Rule PortClassConfig
-rulePortClassConfig returns [EObject current=null]
- @init { enterRule();
- }
- @after { leaveRule(); }:
-((
- {
- $current = forceCreateModelElement(
- grammarAccess.getPortClassConfigAccess().getPortClassConfigAction_0(),
- $current);
- }
-) otherlv_1='Port'
- {
- newLeafNode(otherlv_1, grammarAccess.getPortClassConfigAccess().getPortKeyword_1());
- }
- otherlv_2='{'
- {
- newLeafNode(otherlv_2, grammarAccess.getPortClassConfigAccess().getLeftCurlyBracketKeyword_2());
- }
-(
-(
- {
- newCompositeNode(grammarAccess.getPortClassConfigAccess().getAttributesAttrClassConfigParserRuleCall_3_0());
- }
- lv_attributes_3_0=ruleAttrClassConfig {
- if ($current==null) {
- $current = createModelElementForParent(grammarAccess.getPortClassConfigRule());
- }
- add(
- $current,
- "attributes",
- lv_attributes_3_0,
- "AttrClassConfig");
- afterParserOrEnumRuleCall();
- }
-
-)
-)* otherlv_4='}'
- {
- newLeafNode(otherlv_4, grammarAccess.getPortClassConfigAccess().getRightCurlyBracketKeyword_4());
- }
-)
-;
-
-
-
-
-
-// Entry rule entryRulePortInstanceConfig
-entryRulePortInstanceConfig returns [EObject current=null]
- :
- { newCompositeNode(grammarAccess.getPortInstanceConfigRule()); }
- iv_rulePortInstanceConfig=rulePortInstanceConfig
- { $current=$iv_rulePortInstanceConfig.current; }
- EOF
-;
-
-// Rule PortInstanceConfig
-rulePortInstanceConfig returns [EObject current=null]
- @init { enterRule();
- }
- @after { leaveRule(); }:
-( otherlv_0='InterfaceItem'
- {
- newLeafNode(otherlv_0, grammarAccess.getPortInstanceConfigAccess().getInterfaceItemKeyword_0());
- }
-(
-(
- {
- if ($current==null) {
- $current = createModelElement(grammarAccess.getPortInstanceConfigRule());
- }
- }
- otherlv_1=RULE_ID
- {
- newLeafNode(otherlv_1, grammarAccess.getPortInstanceConfigAccess().getItemInterfaceItemCrossReference_1_0());
- }
-
-)
-) otherlv_2='{'
- {
- newLeafNode(otherlv_2, grammarAccess.getPortInstanceConfigAccess().getLeftCurlyBracketKeyword_2());
- }
-(
-(
- {
- newCompositeNode(grammarAccess.getPortInstanceConfigAccess().getAttributesAttrInstanceConfigParserRuleCall_3_0());
- }
- lv_attributes_3_0=ruleAttrInstanceConfig {
- if ($current==null) {
- $current = createModelElementForParent(grammarAccess.getPortInstanceConfigRule());
- }
- add(
- $current,
- "attributes",
- lv_attributes_3_0,
- "AttrInstanceConfig");
- afterParserOrEnumRuleCall();
- }
-
-)
-)* otherlv_4='}'
- {
- newLeafNode(otherlv_4, grammarAccess.getPortInstanceConfigAccess().getRightCurlyBracketKeyword_4());
- }
-)
-;
-
-
-
-
-
-
-
-// Entry rule entryRuleAttrClassConfig
-entryRuleAttrClassConfig returns [EObject current=null]
- :
- { newCompositeNode(grammarAccess.getAttrClassConfigRule()); }
- iv_ruleAttrClassConfig=ruleAttrClassConfig
- { $current=$iv_ruleAttrClassConfig.current; }
- EOF
-;
-
-// Rule AttrClassConfig
-ruleAttrClassConfig returns [EObject current=null]
- @init { enterRule();
- }
- @after { leaveRule(); }:
-( otherlv_0='Attr'
- {
- newLeafNode(otherlv_0, grammarAccess.getAttrClassConfigAccess().getAttrKeyword_0());
- }
-(
-(
- {
- if ($current==null) {
- $current = createModelElement(grammarAccess.getAttrClassConfigRule());
- }
- }
- otherlv_1=RULE_ID
- {
- newLeafNode(otherlv_1, grammarAccess.getAttrClassConfigAccess().getAttributeAttributeCrossReference_1_0());
- }
-
-)
-)( otherlv_2='='
- {
- newLeafNode(otherlv_2, grammarAccess.getAttrClassConfigAccess().getEqualsSignKeyword_2_0());
- }
-(
-(
- {
- newCompositeNode(grammarAccess.getAttrClassConfigAccess().getValueLiteralArrayParserRuleCall_2_1_0());
- }
- lv_value_3_0=ruleLiteralArray {
- if ($current==null) {
- $current = createModelElementForParent(grammarAccess.getAttrClassConfigRule());
- }
- set(
- $current,
- "value",
- lv_value_3_0,
- "LiteralArray");
- afterParserOrEnumRuleCall();
- }
-
-)
-))?( otherlv_4='{'
- {
- newLeafNode(otherlv_4, grammarAccess.getAttrClassConfigAccess().getLeftCurlyBracketKeyword_3_0());
- }
-(( otherlv_5='min'
- {
- newLeafNode(otherlv_5, grammarAccess.getAttrClassConfigAccess().getMinKeyword_3_1_0_0());
- }
- otherlv_6='='
- {
- newLeafNode(otherlv_6, grammarAccess.getAttrClassConfigAccess().getEqualsSignKeyword_3_1_0_1());
- }
-(
-(
- {
- newCompositeNode(grammarAccess.getAttrClassConfigAccess().getMinNumberLiteralParserRuleCall_3_1_0_2_0());
- }
- lv_min_7_0=ruleNumberLiteral {
- if ($current==null) {
- $current = createModelElementForParent(grammarAccess.getAttrClassConfigRule());
- }
- set(
- $current,
- "min",
- lv_min_7_0,
- "NumberLiteral");
- afterParserOrEnumRuleCall();
- }
-
-)
-))?( otherlv_8='max'
- {
- newLeafNode(otherlv_8, grammarAccess.getAttrClassConfigAccess().getMaxKeyword_3_1_1_0());
- }
- otherlv_9='='
- {
- newLeafNode(otherlv_9, grammarAccess.getAttrClassConfigAccess().getEqualsSignKeyword_3_1_1_1());
- }
-(
-(
- {
- newCompositeNode(grammarAccess.getAttrClassConfigAccess().getMaxNumberLiteralParserRuleCall_3_1_1_2_0());
- }
- lv_max_10_0=ruleNumberLiteral {
- if ($current==null) {
- $current = createModelElementForParent(grammarAccess.getAttrClassConfigRule());
- }
- set(
- $current,
- "max",
- lv_max_10_0,
- "NumberLiteral");
- afterParserOrEnumRuleCall();
- }
-
-)
-))?(
-(
- {
- newCompositeNode(grammarAccess.getAttrClassConfigAccess().getAttributesAttrClassConfigParserRuleCall_3_1_2_0());
- }
- lv_attributes_11_0=ruleAttrClassConfig {
- if ($current==null) {
- $current = createModelElementForParent(grammarAccess.getAttrClassConfigRule());
- }
- add(
- $current,
- "attributes",
- lv_attributes_11_0,
- "AttrClassConfig");
- afterParserOrEnumRuleCall();
- }
-
-)
-)*) otherlv_12='}'
- {
- newLeafNode(otherlv_12, grammarAccess.getAttrClassConfigAccess().getRightCurlyBracketKeyword_3_2());
- }
-)?)
-;
-
-
-
-
-
-// Entry rule entryRuleAttrInstanceConfig
-entryRuleAttrInstanceConfig returns [EObject current=null]
- :
- { newCompositeNode(grammarAccess.getAttrInstanceConfigRule()); }
- iv_ruleAttrInstanceConfig=ruleAttrInstanceConfig
- { $current=$iv_ruleAttrInstanceConfig.current; }
- EOF
-;
-
-// Rule AttrInstanceConfig
-ruleAttrInstanceConfig returns [EObject current=null]
- @init { enterRule();
- }
- @after { leaveRule(); }:
-( otherlv_0='Attr'
- {
- newLeafNode(otherlv_0, grammarAccess.getAttrInstanceConfigAccess().getAttrKeyword_0());
- }
-(
-(
- {
- if ($current==null) {
- $current = createModelElement(grammarAccess.getAttrInstanceConfigRule());
- }
- }
- otherlv_1=RULE_ID
- {
- newLeafNode(otherlv_1, grammarAccess.getAttrInstanceConfigAccess().getAttributeAttributeCrossReference_1_0());
- }
-
-)
-)( otherlv_2='='
- {
- newLeafNode(otherlv_2, grammarAccess.getAttrInstanceConfigAccess().getEqualsSignKeyword_2_0());
- }
-(
-(
- {
- newCompositeNode(grammarAccess.getAttrInstanceConfigAccess().getValueLiteralArrayParserRuleCall_2_1_0());
- }
- lv_value_3_0=ruleLiteralArray {
- if ($current==null) {
- $current = createModelElementForParent(grammarAccess.getAttrInstanceConfigRule());
- }
- set(
- $current,
- "value",
- lv_value_3_0,
- "LiteralArray");
- afterParserOrEnumRuleCall();
- }
-
-)
-))?( otherlv_4='{'
- {
- newLeafNode(otherlv_4, grammarAccess.getAttrInstanceConfigAccess().getLeftCurlyBracketKeyword_3_0());
- }
-(((
-(
- lv_dynConfig_5_0= 'dynamic configuration'
- {
- newLeafNode(lv_dynConfig_5_0, grammarAccess.getAttrInstanceConfigAccess().getDynConfigDynamicConfigurationKeyword_3_1_0_0_0());
- }
-
- {
- if ($current==null) {
- $current = createModelElement(grammarAccess.getAttrInstanceConfigRule());
- }
- setWithLastConsumed($current, "dynConfig", true, "dynamic configuration");
- }
-
-)
-)((
-(
- lv_readOnly_6_0= 'read'
- {
- newLeafNode(lv_readOnly_6_0, grammarAccess.getAttrInstanceConfigAccess().getReadOnlyReadKeyword_3_1_0_1_0_0());
- }
-
- {
- if ($current==null) {
- $current = createModelElement(grammarAccess.getAttrInstanceConfigRule());
- }
- setWithLastConsumed($current, "readOnly", true, "read");
- }
-
-)
-)
- | otherlv_7='write'
- {
- newLeafNode(otherlv_7, grammarAccess.getAttrInstanceConfigAccess().getWriteKeyword_3_1_0_1_1());
- }
-))?(
-(
- {
- newCompositeNode(grammarAccess.getAttrInstanceConfigAccess().getAttributesAttrInstanceConfigParserRuleCall_3_1_1_0());
- }
- lv_attributes_8_0=ruleAttrInstanceConfig {
- if ($current==null) {
- $current = createModelElementForParent(grammarAccess.getAttrInstanceConfigRule());
- }
- add(
- $current,
- "attributes",
- lv_attributes_8_0,
- "AttrInstanceConfig");
- afterParserOrEnumRuleCall();
- }
-
-)
-)*) otherlv_9='}'
- {
- newLeafNode(otherlv_9, grammarAccess.getAttrInstanceConfigAccess().getRightCurlyBracketKeyword_3_2());
- }
-)?)
-;
-
-
-
-
-
-// Entry rule entryRuleRefPath
-entryRuleRefPath returns [EObject current=null]
- :
- { newCompositeNode(grammarAccess.getRefPathRule()); }
- iv_ruleRefPath=ruleRefPath
- { $current=$iv_ruleRefPath.current; }
- EOF
-;
-
-// Rule RefPath
-ruleRefPath returns [EObject current=null]
- @init { enterRule();
- }
- @after { leaveRule(); }:
-((
-(
- lv_refs_0_0=RULE_ID
- {
- newLeafNode(lv_refs_0_0, grammarAccess.getRefPathAccess().getRefsIDTerminalRuleCall_0_0());
- }
- {
- if ($current==null) {
- $current = createModelElement(grammarAccess.getRefPathRule());
- }
- addWithLastConsumed(
- $current,
- "refs",
- lv_refs_0_0,
- "ID");
- }
-
-)
-)( otherlv_1='/'
- {
- newLeafNode(otherlv_1, grammarAccess.getRefPathAccess().getSolidusKeyword_1_0());
- }
-(
-(
- lv_refs_2_0=RULE_ID
- {
- newLeafNode(lv_refs_2_0, grammarAccess.getRefPathAccess().getRefsIDTerminalRuleCall_1_1_0());
- }
- {
- if ($current==null) {
- $current = createModelElement(grammarAccess.getRefPathRule());
- }
- addWithLastConsumed(
- $current,
- "refs",
- lv_refs_2_0,
- "ID");
- }
-
-)
-))*)
-;
-
-
-
-
-
-// Entry rule entryRuleImport
-entryRuleImport returns [EObject current=null]
- :
- { newCompositeNode(grammarAccess.getImportRule()); }
- iv_ruleImport=ruleImport
- { $current=$iv_ruleImport.current; }
- EOF
-;
-
-// Rule Import
-ruleImport returns [EObject current=null]
- @init { enterRule();
- }
- @after { leaveRule(); }:
-( otherlv_0='import'
- {
- newLeafNode(otherlv_0, grammarAccess.getImportAccess().getImportKeyword_0());
- }
-(((
-(
- {
- newCompositeNode(grammarAccess.getImportAccess().getImportedNamespaceImportedFQNParserRuleCall_1_0_0_0());
- }
- lv_importedNamespace_1_0=ruleImportedFQN {
- if ($current==null) {
- $current = createModelElementForParent(grammarAccess.getImportRule());
- }
- set(
- $current,
- "importedNamespace",
- lv_importedNamespace_1_0,
- "ImportedFQN");
- afterParserOrEnumRuleCall();
- }
-
-)
-) otherlv_2='from'
- {
- newLeafNode(otherlv_2, grammarAccess.getImportAccess().getFromKeyword_1_0_1());
- }
-)
- | otherlv_3='model'
- {
- newLeafNode(otherlv_3, grammarAccess.getImportAccess().getModelKeyword_1_1());
- }
-)(
-(
- lv_importURI_4_0=RULE_STRING
- {
- newLeafNode(lv_importURI_4_0, grammarAccess.getImportAccess().getImportURISTRINGTerminalRuleCall_2_0());
- }
- {
- if ($current==null) {
- $current = createModelElement(grammarAccess.getImportRule());
- }
- setWithLastConsumed(
- $current,
- "importURI",
- lv_importURI_4_0,
- "STRING");
- }
-
-)
-))
-;
-
-
-
-
-
-// Entry rule entryRuleImportedFQN
-entryRuleImportedFQN returns [String current=null]
- :
- { newCompositeNode(grammarAccess.getImportedFQNRule()); }
- iv_ruleImportedFQN=ruleImportedFQN
- { $current=$iv_ruleImportedFQN.current.getText(); }
- EOF
-;
-
-// Rule ImportedFQN
-ruleImportedFQN returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()]
- @init { enterRule();
- }
- @after { leaveRule(); }:
-(
- {
- newCompositeNode(grammarAccess.getImportedFQNAccess().getFQNParserRuleCall_0());
- }
- this_FQN_0=ruleFQN {
- $current.merge(this_FQN_0);
- }
-
- {
- afterParserOrEnumRuleCall();
- }
-(
- kw='.*'
- {
- $current.merge(kw);
- newLeafNode(kw, grammarAccess.getImportedFQNAccess().getFullStopAsteriskKeyword_1());
- }
-)?)
- ;
-
-
-
-
-
-// Entry rule entryRuleFQN
-entryRuleFQN returns [String current=null]
- :
- { newCompositeNode(grammarAccess.getFQNRule()); }
- iv_ruleFQN=ruleFQN
- { $current=$iv_ruleFQN.current.getText(); }
- EOF
-;
-
-// Rule FQN
-ruleFQN returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()]
- @init { enterRule();
- }
- @after { leaveRule(); }:
-( this_ID_0=RULE_ID {
- $current.merge(this_ID_0);
- }
-
- {
- newLeafNode(this_ID_0, grammarAccess.getFQNAccess().getIDTerminalRuleCall_0());
- }
-(
- kw='.'
- {
- $current.merge(kw);
- newLeafNode(kw, grammarAccess.getFQNAccess().getFullStopKeyword_1_0());
- }
- this_ID_2=RULE_ID {
- $current.merge(this_ID_2);
- }
-
- {
- newLeafNode(this_ID_2, grammarAccess.getFQNAccess().getIDTerminalRuleCall_1_1());
- }
-)*)
- ;
-
-
-
-
-
-// Entry rule entryRuleLiteralArray
-entryRuleLiteralArray returns [EObject current=null]
- :
- { newCompositeNode(grammarAccess.getLiteralArrayRule()); }
- iv_ruleLiteralArray=ruleLiteralArray
- { $current=$iv_ruleLiteralArray.current; }
- EOF
-;
-
-// Rule LiteralArray
-ruleLiteralArray returns [EObject current=null]
- @init { enterRule();
- }
- @after { leaveRule(); }:
-((
-(
- {
- newCompositeNode(grammarAccess.getLiteralArrayAccess().getLiteralsLiteralParserRuleCall_0_0());
- }
- lv_literals_0_0=ruleLiteral {
- if ($current==null) {
- $current = createModelElementForParent(grammarAccess.getLiteralArrayRule());
- }
- add(
- $current,
- "literals",
- lv_literals_0_0,
- "Literal");
- afterParserOrEnumRuleCall();
- }
-
-)
-)( otherlv_1=','
- {
- newLeafNode(otherlv_1, grammarAccess.getLiteralArrayAccess().getCommaKeyword_1_0());
- }
-(
-(
- {
- newCompositeNode(grammarAccess.getLiteralArrayAccess().getLiteralsLiteralParserRuleCall_1_1_0());
- }
- lv_literals_2_0=ruleLiteral {
- if ($current==null) {
- $current = createModelElementForParent(grammarAccess.getLiteralArrayRule());
- }
- add(
- $current,
- "literals",
- lv_literals_2_0,
- "Literal");
- afterParserOrEnumRuleCall();
- }
-
-)
-))*)
-;
-
-
-
-
-
-// Entry rule entryRuleLiteral
-entryRuleLiteral returns [EObject current=null]
- :
- { newCompositeNode(grammarAccess.getLiteralRule()); }
- iv_ruleLiteral=ruleLiteral
- { $current=$iv_ruleLiteral.current; }
- EOF
-;
-
-// Rule Literal
-ruleLiteral returns [EObject current=null]
- @init { enterRule();
- }
- @after { leaveRule(); }:
-(
- {
- newCompositeNode(grammarAccess.getLiteralAccess().getBooleanLiteralParserRuleCall_0());
- }
- this_BooleanLiteral_0=ruleBooleanLiteral
- {
- $current = $this_BooleanLiteral_0.current;
- afterParserOrEnumRuleCall();
- }
-
- |
- {
- newCompositeNode(grammarAccess.getLiteralAccess().getNumberLiteralParserRuleCall_1());
- }
- this_NumberLiteral_1=ruleNumberLiteral
- {
- $current = $this_NumberLiteral_1.current;
- afterParserOrEnumRuleCall();
- }
-
- |
- {
- newCompositeNode(grammarAccess.getLiteralAccess().getStringLiteralParserRuleCall_2());
- }
- this_StringLiteral_2=ruleStringLiteral
- {
- $current = $this_StringLiteral_2.current;
- afterParserOrEnumRuleCall();
- }
-)
-;
-
-
-
-
-
-// Entry rule entryRuleBooleanLiteral
-entryRuleBooleanLiteral returns [EObject current=null]
- :
- { newCompositeNode(grammarAccess.getBooleanLiteralRule()); }
- iv_ruleBooleanLiteral=ruleBooleanLiteral
- { $current=$iv_ruleBooleanLiteral.current; }
- EOF
-;
-
-// Rule BooleanLiteral
-ruleBooleanLiteral returns [EObject current=null]
- @init { enterRule();
- }
- @after { leaveRule(); }:
-((
- {
- $current = forceCreateModelElement(
- grammarAccess.getBooleanLiteralAccess().getBooleanLiteralAction_0(),
- $current);
- }
-)( otherlv_1='false'
- {
- newLeafNode(otherlv_1, grammarAccess.getBooleanLiteralAccess().getFalseKeyword_1_0());
- }
-
- |(
-(
- lv_isTrue_2_0= 'true'
- {
- newLeafNode(lv_isTrue_2_0, grammarAccess.getBooleanLiteralAccess().getIsTrueTrueKeyword_1_1_0());
- }
-
- {
- if ($current==null) {
- $current = createModelElement(grammarAccess.getBooleanLiteralRule());
- }
- setWithLastConsumed($current, "isTrue", true, "true");
- }
-
-)
-)))
-;
-
-
-
-
-
-// Entry rule entryRuleNumberLiteral
-entryRuleNumberLiteral returns [EObject current=null]
- :
- { newCompositeNode(grammarAccess.getNumberLiteralRule()); }
- iv_ruleNumberLiteral=ruleNumberLiteral
- { $current=$iv_ruleNumberLiteral.current; }
- EOF
-;
-
-// Rule NumberLiteral
-ruleNumberLiteral returns [EObject current=null]
- @init { enterRule();
- }
- @after { leaveRule(); }:
-(
- {
- newCompositeNode(grammarAccess.getNumberLiteralAccess().getIntLiteralParserRuleCall_0());
- }
- this_IntLiteral_0=ruleIntLiteral
- {
- $current = $this_IntLiteral_0.current;
- afterParserOrEnumRuleCall();
- }
-
- |
- {
- newCompositeNode(grammarAccess.getNumberLiteralAccess().getRealLiteralParserRuleCall_1());
- }
- this_RealLiteral_1=ruleRealLiteral
- {
- $current = $this_RealLiteral_1.current;
- afterParserOrEnumRuleCall();
- }
-)
-;
-
-
-
-
-
-// Entry rule entryRuleRealLiteral
-entryRuleRealLiteral returns [EObject current=null]
- :
- { newCompositeNode(grammarAccess.getRealLiteralRule()); }
- iv_ruleRealLiteral=ruleRealLiteral
- { $current=$iv_ruleRealLiteral.current; }
- EOF
-;
-
-// Rule RealLiteral
-ruleRealLiteral returns [EObject current=null]
- @init { enterRule();
- }
- @after { leaveRule(); }:
-((
- {
- $current = forceCreateModelElement(
- grammarAccess.getRealLiteralAccess().getRealLiteralAction_0(),
- $current);
- }
-)(
-(
- {
- newCompositeNode(grammarAccess.getRealLiteralAccess().getValueRealParserRuleCall_1_0());
- }
- lv_value_1_0=ruleReal {
- if ($current==null) {
- $current = createModelElementForParent(grammarAccess.getRealLiteralRule());
- }
- set(
- $current,
- "value",
- lv_value_1_0,
- "Real");
- afterParserOrEnumRuleCall();
- }
-
-)
-))
-;
-
-
-
-
-
-// Entry rule entryRuleIntLiteral
-entryRuleIntLiteral returns [EObject current=null]
- :
- { newCompositeNode(grammarAccess.getIntLiteralRule()); }
- iv_ruleIntLiteral=ruleIntLiteral
- { $current=$iv_ruleIntLiteral.current; }
- EOF
-;
-
-// Rule IntLiteral
-ruleIntLiteral returns [EObject current=null]
- @init { enterRule();
- }
- @after { leaveRule(); }:
-((
- {
- $current = forceCreateModelElement(
- grammarAccess.getIntLiteralAccess().getIntLiteralAction_0(),
- $current);
- }
-)(
-(
- {
- newCompositeNode(grammarAccess.getIntLiteralAccess().getValueIntegerParserRuleCall_1_0());
- }
- lv_value_1_0=ruleInteger {
- if ($current==null) {
- $current = createModelElementForParent(grammarAccess.getIntLiteralRule());
- }
- set(
- $current,
- "value",
- lv_value_1_0,
- "Integer");
- afterParserOrEnumRuleCall();
- }
-
-)
-))
-;
-
-
-
-
-
-// Entry rule entryRuleStringLiteral
-entryRuleStringLiteral returns [EObject current=null]
- :
- { newCompositeNode(grammarAccess.getStringLiteralRule()); }
- iv_ruleStringLiteral=ruleStringLiteral
- { $current=$iv_ruleStringLiteral.current; }
- EOF
-;
-
-// Rule StringLiteral
-ruleStringLiteral returns [EObject current=null]
- @init { enterRule();
- }
- @after { leaveRule(); }:
-((
- {
- $current = forceCreateModelElement(
- grammarAccess.getStringLiteralAccess().getStringLiteralAction_0(),
- $current);
- }
-)(
-(
- lv_value_1_0=RULE_STRING
- {
- newLeafNode(lv_value_1_0, grammarAccess.getStringLiteralAccess().getValueSTRINGTerminalRuleCall_1_0());
- }
- {
- if ($current==null) {
- $current = createModelElement(grammarAccess.getStringLiteralRule());
- }
- setWithLastConsumed(
- $current,
- "value",
- lv_value_1_0,
- "STRING");
- }
-
-)
-))
-;
-
-
-
-
-
-// Entry rule entryRuleInteger
-entryRuleInteger returns [String current=null]
- :
- { newCompositeNode(grammarAccess.getIntegerRule()); }
- iv_ruleInteger=ruleInteger
- { $current=$iv_ruleInteger.current.getText(); }
- EOF
-;
-
-// Rule Integer
-ruleInteger returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()]
- @init { enterRule();
- }
- @after { leaveRule(); }:
-(
- {
- newCompositeNode(grammarAccess.getIntegerAccess().getSignedIntegerParserRuleCall_0());
- }
- this_SignedInteger_0=ruleSignedInteger {
- $current.merge(this_SignedInteger_0);
- }
-
- {
- afterParserOrEnumRuleCall();
- }
-
- |
- {
- newCompositeNode(grammarAccess.getIntegerAccess().getHexadecimalParserRuleCall_1());
- }
- this_Hexadecimal_1=ruleHexadecimal {
- $current.merge(this_Hexadecimal_1);
- }
-
- {
- afterParserOrEnumRuleCall();
- }
-)
- ;
-
-
-
-
-
-// Entry rule entryRuleSignedInteger
-entryRuleSignedInteger returns [String current=null]
- @init {
- HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();
- }
- :
- { newCompositeNode(grammarAccess.getSignedIntegerRule()); }
- iv_ruleSignedInteger=ruleSignedInteger
- { $current=$iv_ruleSignedInteger.current.getText(); }
- EOF
-;
-finally {
- myHiddenTokenState.restore();
-}
-
-// Rule SignedInteger
-ruleSignedInteger returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()]
- @init { enterRule();
- HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();
- }
- @after { leaveRule(); }:
-((
- kw='+'
- {
- $current.merge(kw);
- newLeafNode(kw, grammarAccess.getSignedIntegerAccess().getPlusSignKeyword_0_0());
- }
-
- |
- kw='-'
- {
- $current.merge(kw);
- newLeafNode(kw, grammarAccess.getSignedIntegerAccess().getHyphenMinusKeyword_0_1());
- }
-)? this_INT_2=RULE_INT {
- $current.merge(this_INT_2);
- }
-
- {
- newLeafNode(this_INT_2, grammarAccess.getSignedIntegerAccess().getINTTerminalRuleCall_1());
- }
-)
- ;
-finally {
- myHiddenTokenState.restore();
-}
-
-
-
-
-
-// Entry rule entryRuleHexadecimal
-entryRuleHexadecimal returns [String current=null]
- @init {
- HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();
- }
- :
- { newCompositeNode(grammarAccess.getHexadecimalRule()); }
- iv_ruleHexadecimal=ruleHexadecimal
- { $current=$iv_ruleHexadecimal.current.getText(); }
- EOF
-;
-finally {
- myHiddenTokenState.restore();
-}
-
-// Rule Hexadecimal
-ruleHexadecimal returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()]
- @init { enterRule();
- HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();
- }
- @after { leaveRule(); }:
- this_HEX_0=RULE_HEX {
- $current.merge(this_HEX_0);
- }
-
- {
- newLeafNode(this_HEX_0, grammarAccess.getHexadecimalAccess().getHEXTerminalRuleCall());
- }
-
- ;
-finally {
- myHiddenTokenState.restore();
-}
-
-
-
-
-
-// Entry rule entryRuleReal
-entryRuleReal returns [String current=null]
- :
- { newCompositeNode(grammarAccess.getRealRule()); }
- iv_ruleReal=ruleReal
- { $current=$iv_ruleReal.current.getText(); }
- EOF
-;
-
-// Rule Real
-ruleReal returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()]
- @init { enterRule();
- }
- @after { leaveRule(); }:
-(
- {
- newCompositeNode(grammarAccess.getRealAccess().getDecimalParserRuleCall_0());
- }
- this_Decimal_0=ruleDecimal {
- $current.merge(this_Decimal_0);
- }
-
- {
- afterParserOrEnumRuleCall();
- }
-
- |
- {
- newCompositeNode(grammarAccess.getRealAccess().getDotDecimalParserRuleCall_1());
- }
- this_DotDecimal_1=ruleDotDecimal {
- $current.merge(this_DotDecimal_1);
- }
-
- {
- afterParserOrEnumRuleCall();
- }
-
- |
- {
- newCompositeNode(grammarAccess.getRealAccess().getDecimalDotParserRuleCall_2());
- }
- this_DecimalDot_2=ruleDecimalDot {
- $current.merge(this_DecimalDot_2);
- }
-
- {
- afterParserOrEnumRuleCall();
- }
-
- |
- {
- newCompositeNode(grammarAccess.getRealAccess().getDecimalExpParserRuleCall_3());
- }
- this_DecimalExp_3=ruleDecimalExp {
- $current.merge(this_DecimalExp_3);
- }
-
- {
- afterParserOrEnumRuleCall();
- }
-)
- ;
-
-
-
-
-
-// Entry rule entryRuleDecimal
-entryRuleDecimal returns [String current=null]
- @init {
- HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();
- }
- :
- { newCompositeNode(grammarAccess.getDecimalRule()); }
- iv_ruleDecimal=ruleDecimal
- { $current=$iv_ruleDecimal.current.getText(); }
- EOF
-;
-finally {
- myHiddenTokenState.restore();
-}
-
-// Rule Decimal
-ruleDecimal returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()]
- @init { enterRule();
- HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();
- }
- @after { leaveRule(); }:
-((
- kw='+'
- {
- $current.merge(kw);
- newLeafNode(kw, grammarAccess.getDecimalAccess().getPlusSignKeyword_0_0());
- }
-
- |
- kw='-'
- {
- $current.merge(kw);
- newLeafNode(kw, grammarAccess.getDecimalAccess().getHyphenMinusKeyword_0_1());
- }
-)? this_INT_2=RULE_INT {
- $current.merge(this_INT_2);
- }
-
- {
- newLeafNode(this_INT_2, grammarAccess.getDecimalAccess().getINTTerminalRuleCall_1());
- }
-
- kw='.'
- {
- $current.merge(kw);
- newLeafNode(kw, grammarAccess.getDecimalAccess().getFullStopKeyword_2());
- }
- this_INT_4=RULE_INT {
- $current.merge(this_INT_4);
- }
-
- {
- newLeafNode(this_INT_4, grammarAccess.getDecimalAccess().getINTTerminalRuleCall_3());
- }
-)
- ;
-finally {
- myHiddenTokenState.restore();
-}
-
-
-
-
-
-// Entry rule entryRuleDotDecimal
-entryRuleDotDecimal returns [String current=null]
- @init {
- HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();
- }
- :
- { newCompositeNode(grammarAccess.getDotDecimalRule()); }
- iv_ruleDotDecimal=ruleDotDecimal
- { $current=$iv_ruleDotDecimal.current.getText(); }
- EOF
-;
-finally {
- myHiddenTokenState.restore();
-}
-
-// Rule DotDecimal
-ruleDotDecimal returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()]
- @init { enterRule();
- HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();
- }
- @after { leaveRule(); }:
-((
- kw='+'
- {
- $current.merge(kw);
- newLeafNode(kw, grammarAccess.getDotDecimalAccess().getPlusSignKeyword_0_0());
- }
-
- |
- kw='-'
- {
- $current.merge(kw);
- newLeafNode(kw, grammarAccess.getDotDecimalAccess().getHyphenMinusKeyword_0_1());
- }
-)?
- kw='.'
- {
- $current.merge(kw);
- newLeafNode(kw, grammarAccess.getDotDecimalAccess().getFullStopKeyword_1());
- }
- this_INT_3=RULE_INT {
- $current.merge(this_INT_3);
- }
-
- {
- newLeafNode(this_INT_3, grammarAccess.getDotDecimalAccess().getINTTerminalRuleCall_2());
- }
-)
- ;
-finally {
- myHiddenTokenState.restore();
-}
-
-
-
-
-
-// Entry rule entryRuleDecimalDot
-entryRuleDecimalDot returns [String current=null]
- @init {
- HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();
- }
- :
- { newCompositeNode(grammarAccess.getDecimalDotRule()); }
- iv_ruleDecimalDot=ruleDecimalDot
- { $current=$iv_ruleDecimalDot.current.getText(); }
- EOF
-;
-finally {
- myHiddenTokenState.restore();
-}
-
-// Rule DecimalDot
-ruleDecimalDot returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()]
- @init { enterRule();
- HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();
- }
- @after { leaveRule(); }:
-((
- kw='+'
- {
- $current.merge(kw);
- newLeafNode(kw, grammarAccess.getDecimalDotAccess().getPlusSignKeyword_0_0());
- }
-
- |
- kw='-'
- {
- $current.merge(kw);
- newLeafNode(kw, grammarAccess.getDecimalDotAccess().getHyphenMinusKeyword_0_1());
- }
-)? this_INT_2=RULE_INT {
- $current.merge(this_INT_2);
- }
-
- {
- newLeafNode(this_INT_2, grammarAccess.getDecimalDotAccess().getINTTerminalRuleCall_1());
- }
-
- kw='.'
- {
- $current.merge(kw);
- newLeafNode(kw, grammarAccess.getDecimalDotAccess().getFullStopKeyword_2());
- }
-)
- ;
-finally {
- myHiddenTokenState.restore();
-}
-
-
-
-
-
-// Entry rule entryRuleDecimalExp
-entryRuleDecimalExp returns [String current=null]
- @init {
- HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();
- }
- :
- { newCompositeNode(grammarAccess.getDecimalExpRule()); }
- iv_ruleDecimalExp=ruleDecimalExp
- { $current=$iv_ruleDecimalExp.current.getText(); }
- EOF
-;
-finally {
- myHiddenTokenState.restore();
-}
-
-// Rule DecimalExp
-ruleDecimalExp returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()]
- @init { enterRule();
- HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();
- }
- @after { leaveRule(); }:
-((
- kw='+'
- {
- $current.merge(kw);
- newLeafNode(kw, grammarAccess.getDecimalExpAccess().getPlusSignKeyword_0_0());
- }
-
- |
- kw='-'
- {
- $current.merge(kw);
- newLeafNode(kw, grammarAccess.getDecimalExpAccess().getHyphenMinusKeyword_0_1());
- }
-)? this_INT_2=RULE_INT {
- $current.merge(this_INT_2);
- }
-
- {
- newLeafNode(this_INT_2, grammarAccess.getDecimalExpAccess().getINTTerminalRuleCall_1());
- }
-
- kw='.'
- {
- $current.merge(kw);
- newLeafNode(kw, grammarAccess.getDecimalExpAccess().getFullStopKeyword_2());
- }
- this_INT_4=RULE_INT {
- $current.merge(this_INT_4);
- }
-
- {
- newLeafNode(this_INT_4, grammarAccess.getDecimalExpAccess().getINTTerminalRuleCall_3());
- }
- this_EXP_5=RULE_EXP {
- $current.merge(this_EXP_5);
- }
-
- {
- newLeafNode(this_EXP_5, grammarAccess.getDecimalExpAccess().getEXPTerminalRuleCall_4());
- }
-)
- ;
-finally {
- myHiddenTokenState.restore();
-}
-
-
-
-
-
-RULE_EXP : ('e'|'E') ('+'|'-')? ('0'..'9')+;
-
-RULE_HEX : ('0x'|'0X') ('0'..'9'|'a'..'f'|'A'..'F')+;
-
-RULE_ID : '^'? ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*;
-
-RULE_INT : ('0'..'9')+;
-
-RULE_STRING : ('"' ('\\' ('b'|'t'|'n'|'f'|'r'|'u'|'"'|'\''|'\\')|~(('\\'|'"')))* '"'|'\'' ('\\' ('b'|'t'|'n'|'f'|'r'|'u'|'"'|'\''|'\\')|~(('\\'|'\'')))* '\'');
-
-RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )*'*/';
-
-RULE_SL_COMMENT : '//' ~(('\n'|'\r'))* ('\r'? '\n')?;
-
-RULE_WS : (' '|'\t'|'\r'|'\n')+;
-
-RULE_ANY_OTHER : .;
-
-
+/*
+* generated by Xtext
+*/
+grammar InternalConfig;
+
+options {
+ superClass=AbstractInternalAntlrParser;
+
+}
+
+@lexer::header {
+package org.eclipse.etrice.core.parser.antlr.internal;
+
+// Hack: Use our own Lexer superclass by means of import.
+// Currently there is no other way to specify the superclass for the lexer.
+import org.eclipse.xtext.parser.antlr.Lexer;
+}
+
+@parser::header {
+package org.eclipse.etrice.core.parser.antlr.internal;
+
+import org.eclipse.xtext.*;
+import org.eclipse.xtext.parser.*;
+import org.eclipse.xtext.parser.impl.*;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens;
+import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken;
+import org.eclipse.etrice.core.services.ConfigGrammarAccess;
+
+}
+
+@parser::members {
+
+ private ConfigGrammarAccess grammarAccess;
+
+ public InternalConfigParser(TokenStream input, ConfigGrammarAccess grammarAccess) {
+ this(input);
+ this.grammarAccess = grammarAccess;
+ registerRules(grammarAccess.getGrammar());
+ }
+
+ @Override
+ protected String getFirstRuleName() {
+ return "ConfigModel";
+ }
+
+ @Override
+ protected ConfigGrammarAccess getGrammarAccess() {
+ return grammarAccess;
+ }
+}
+
+@rulecatch {
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+}
+
+
+
+
+// Entry rule entryRuleConfigModel
+entryRuleConfigModel returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getConfigModelRule()); }
+ iv_ruleConfigModel=ruleConfigModel
+ { $current=$iv_ruleConfigModel.current; }
+ EOF
+;
+
+// Rule ConfigModel
+ruleConfigModel returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+((
+(
+ {
+ newCompositeNode(grammarAccess.getConfigModelAccess().getImportsImportParserRuleCall_0_0());
+ }
+ lv_imports_0_0=ruleImport {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getConfigModelRule());
+ }
+ add(
+ $current,
+ "imports",
+ lv_imports_0_0,
+ "Import");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+)*(
+(
+ {
+ newCompositeNode(grammarAccess.getConfigModelAccess().getConfigElementsConfigElementParserRuleCall_1_0());
+ }
+ lv_configElements_1_0=ruleConfigElement {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getConfigModelRule());
+ }
+ add(
+ $current,
+ "configElements",
+ lv_configElements_1_0,
+ "ConfigElement");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+)*)
+;
+
+
+
+
+
+// Entry rule entryRuleConfigElement
+entryRuleConfigElement returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getConfigElementRule()); }
+ iv_ruleConfigElement=ruleConfigElement
+ { $current=$iv_ruleConfigElement.current; }
+ EOF
+;
+
+// Rule ConfigElement
+ruleConfigElement returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+(
+ {
+ newCompositeNode(grammarAccess.getConfigElementAccess().getSubSystemConfigParserRuleCall_0());
+ }
+ this_SubSystemConfig_0=ruleSubSystemConfig
+ {
+ $current = $this_SubSystemConfig_0.current;
+ afterParserOrEnumRuleCall();
+ }
+
+ |
+ {
+ newCompositeNode(grammarAccess.getConfigElementAccess().getActorClassConfigParserRuleCall_1());
+ }
+ this_ActorClassConfig_1=ruleActorClassConfig
+ {
+ $current = $this_ActorClassConfig_1.current;
+ afterParserOrEnumRuleCall();
+ }
+
+ |
+ {
+ newCompositeNode(grammarAccess.getConfigElementAccess().getActorInstanceConfigParserRuleCall_2());
+ }
+ this_ActorInstanceConfig_2=ruleActorInstanceConfig
+ {
+ $current = $this_ActorInstanceConfig_2.current;
+ afterParserOrEnumRuleCall();
+ }
+
+ |
+ {
+ newCompositeNode(grammarAccess.getConfigElementAccess().getProtocolClassConfigParserRuleCall_3());
+ }
+ this_ProtocolClassConfig_3=ruleProtocolClassConfig
+ {
+ $current = $this_ProtocolClassConfig_3.current;
+ afterParserOrEnumRuleCall();
+ }
+)
+;
+
+
+
+
+
+// Entry rule entryRuleSubSystemConfig
+entryRuleSubSystemConfig returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getSubSystemConfigRule()); }
+ iv_ruleSubSystemConfig=ruleSubSystemConfig
+ { $current=$iv_ruleSubSystemConfig.current; }
+ EOF
+;
+
+// Rule SubSystemConfig
+ruleSubSystemConfig returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+( otherlv_0='SubSystemConfig'
+ {
+ newLeafNode(otherlv_0, grammarAccess.getSubSystemConfigAccess().getSubSystemConfigKeyword_0());
+ }
+(
+(
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getSubSystemConfigRule());
+ }
+ }
+ otherlv_1=RULE_ID
+ {
+ newLeafNode(otherlv_1, grammarAccess.getSubSystemConfigAccess().getSubSystemSubSystemClassCrossReference_1_0());
+ }
+
+)
+) otherlv_2='{'
+ {
+ newLeafNode(otherlv_2, grammarAccess.getSubSystemConfigAccess().getLeftCurlyBracketKeyword_2());
+ }
+(
+(
+ {
+ newCompositeNode(grammarAccess.getSubSystemConfigAccess().getDynConfigDynamicConfigParserRuleCall_3_0());
+ }
+ lv_dynConfig_3_0=ruleDynamicConfig {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getSubSystemConfigRule());
+ }
+ set(
+ $current,
+ "dynConfig",
+ lv_dynConfig_3_0,
+ "DynamicConfig");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+) otherlv_4='}'
+ {
+ newLeafNode(otherlv_4, grammarAccess.getSubSystemConfigAccess().getRightCurlyBracketKeyword_4());
+ }
+)
+;
+
+
+
+
+
+// Entry rule entryRuleDynamicConfig
+entryRuleDynamicConfig returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getDynamicConfigRule()); }
+ iv_ruleDynamicConfig=ruleDynamicConfig
+ { $current=$iv_ruleDynamicConfig.current; }
+ EOF
+;
+
+// Rule DynamicConfig
+ruleDynamicConfig returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+( otherlv_0='dynamic configuration'
+ {
+ newLeafNode(otherlv_0, grammarAccess.getDynamicConfigAccess().getDynamicConfigurationKeyword_0());
+ }
+ otherlv_1='{'
+ {
+ newLeafNode(otherlv_1, grammarAccess.getDynamicConfigAccess().getLeftCurlyBracketKeyword_1());
+ }
+(
+
+(
+ {
+ getUnorderedGroupHelper().enter(grammarAccess.getDynamicConfigAccess().getUnorderedGroup_2());
+ }
+ (
+ (
+
+ (
+ {getUnorderedGroupHelper().canSelect(grammarAccess.getDynamicConfigAccess().getUnorderedGroup_2(), 0)}?=>(
+ {
+ getUnorderedGroupHelper().select(grammarAccess.getDynamicConfigAccess().getUnorderedGroup_2(), 0);
+ }
+ ({true}?=>(( otherlv_3='file path'
+ {
+ newLeafNode(otherlv_3, grammarAccess.getDynamicConfigAccess().getFilePathKeyword_2_0_0_0());
+ }
+(
+(
+ lv_filePath_4_0=RULE_STRING
+ {
+ newLeafNode(lv_filePath_4_0, grammarAccess.getDynamicConfigAccess().getFilePathSTRINGTerminalRuleCall_2_0_0_1_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getDynamicConfigRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "filePath",
+ lv_filePath_4_0,
+ "STRING");
+ }
+
+)
+))
+ |(( otherlv_5='user import'
+ {
+ newLeafNode(otherlv_5, grammarAccess.getDynamicConfigAccess().getUserImportKeyword_2_0_1_0_0());
+ }
+(
+(
+ lv_userCode1_6_0=RULE_STRING
+ {
+ newLeafNode(lv_userCode1_6_0, grammarAccess.getDynamicConfigAccess().getUserCode1STRINGTerminalRuleCall_2_0_1_0_1_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getDynamicConfigRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "userCode1",
+ lv_userCode1_6_0,
+ "STRING");
+ }
+
+)
+))( otherlv_7='user constructor'
+ {
+ newLeafNode(otherlv_7, grammarAccess.getDynamicConfigAccess().getUserConstructorKeyword_2_0_1_1_0());
+ }
+(
+(
+ lv_userCode2_8_0=RULE_STRING
+ {
+ newLeafNode(lv_userCode2_8_0, grammarAccess.getDynamicConfigAccess().getUserCode2STRINGTerminalRuleCall_2_0_1_1_1_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getDynamicConfigRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "userCode2",
+ lv_userCode2_8_0,
+ "STRING");
+ }
+
+)
+)))))
+ {
+ getUnorderedGroupHelper().returnFromSelection(grammarAccess.getDynamicConfigAccess().getUnorderedGroup_2());
+ }
+ )
+ ) |
+
+ (
+ {getUnorderedGroupHelper().canSelect(grammarAccess.getDynamicConfigAccess().getUnorderedGroup_2(), 1)}?=>(
+ {
+ getUnorderedGroupHelper().select(grammarAccess.getDynamicConfigAccess().getUnorderedGroup_2(), 1);
+ }
+ ({true}?=>( otherlv_9='polling timer [ms]'
+ {
+ newLeafNode(otherlv_9, grammarAccess.getDynamicConfigAccess().getPollingTimerMsKeyword_2_1_0());
+ }
+(
+(
+ lv_polling_10_0=RULE_INT
+ {
+ newLeafNode(lv_polling_10_0, grammarAccess.getDynamicConfigAccess().getPollingINTTerminalRuleCall_2_1_1_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getDynamicConfigRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "polling",
+ lv_polling_10_0,
+ "INT");
+ }
+
+)
+)))
+ {
+ getUnorderedGroupHelper().returnFromSelection(grammarAccess.getDynamicConfigAccess().getUnorderedGroup_2());
+ }
+ )
+ )
+
+ )+
+ {getUnorderedGroupHelper().canLeave(grammarAccess.getDynamicConfigAccess().getUnorderedGroup_2())}?
+ )
+)
+ {
+ getUnorderedGroupHelper().leave(grammarAccess.getDynamicConfigAccess().getUnorderedGroup_2());
+ }
+
+) otherlv_11='}'
+ {
+ newLeafNode(otherlv_11, grammarAccess.getDynamicConfigAccess().getRightCurlyBracketKeyword_3());
+ }
+)
+;
+
+
+
+
+
+// Entry rule entryRuleActorClassConfig
+entryRuleActorClassConfig returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getActorClassConfigRule()); }
+ iv_ruleActorClassConfig=ruleActorClassConfig
+ { $current=$iv_ruleActorClassConfig.current; }
+ EOF
+;
+
+// Rule ActorClassConfig
+ruleActorClassConfig returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+( otherlv_0='ActorClassConfig'
+ {
+ newLeafNode(otherlv_0, grammarAccess.getActorClassConfigAccess().getActorClassConfigKeyword_0());
+ }
+(
+(
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getActorClassConfigRule());
+ }
+ }
+ {
+ newCompositeNode(grammarAccess.getActorClassConfigAccess().getActorActorClassCrossReference_1_0());
+ }
+ ruleFQN {
+ afterParserOrEnumRuleCall();
+ }
+
+)
+) otherlv_2='{'
+ {
+ newLeafNode(otherlv_2, grammarAccess.getActorClassConfigAccess().getLeftCurlyBracketKeyword_2());
+ }
+(
+(
+ {
+ newCompositeNode(grammarAccess.getActorClassConfigAccess().getAttributesAttrClassConfigParserRuleCall_3_0());
+ }
+ lv_attributes_3_0=ruleAttrClassConfig {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getActorClassConfigRule());
+ }
+ add(
+ $current,
+ "attributes",
+ lv_attributes_3_0,
+ "AttrClassConfig");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+)* otherlv_4='}'
+ {
+ newLeafNode(otherlv_4, grammarAccess.getActorClassConfigAccess().getRightCurlyBracketKeyword_4());
+ }
+)
+;
+
+
+
+
+
+// Entry rule entryRuleActorInstanceConfig
+entryRuleActorInstanceConfig returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getActorInstanceConfigRule()); }
+ iv_ruleActorInstanceConfig=ruleActorInstanceConfig
+ { $current=$iv_ruleActorInstanceConfig.current; }
+ EOF
+;
+
+// Rule ActorInstanceConfig
+ruleActorInstanceConfig returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+( otherlv_0='ActorInstanceConfig'
+ {
+ newLeafNode(otherlv_0, grammarAccess.getActorInstanceConfigAccess().getActorInstanceConfigKeyword_0());
+ }
+(
+(
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getActorInstanceConfigRule());
+ }
+ }
+ {
+ newCompositeNode(grammarAccess.getActorInstanceConfigAccess().getRootSubSystemClassCrossReference_1_0());
+ }
+ ruleFQN {
+ afterParserOrEnumRuleCall();
+ }
+
+)
+) otherlv_2='/'
+ {
+ newLeafNode(otherlv_2, grammarAccess.getActorInstanceConfigAccess().getSolidusKeyword_2());
+ }
+(
+(
+ {
+ newCompositeNode(grammarAccess.getActorInstanceConfigAccess().getPathRefPathParserRuleCall_3_0());
+ }
+ lv_path_3_0=ruleRefPath {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getActorInstanceConfigRule());
+ }
+ set(
+ $current,
+ "path",
+ lv_path_3_0,
+ "RefPath");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+) otherlv_4='{'
+ {
+ newLeafNode(otherlv_4, grammarAccess.getActorInstanceConfigAccess().getLeftCurlyBracketKeyword_4());
+ }
+(
+
+(
+ {
+ getUnorderedGroupHelper().enter(grammarAccess.getActorInstanceConfigAccess().getUnorderedGroup_5());
+ }
+ (
+ (
+
+ (
+ {getUnorderedGroupHelper().canSelect(grammarAccess.getActorInstanceConfigAccess().getUnorderedGroup_5(), 0)}?=>(
+ {
+ getUnorderedGroupHelper().select(grammarAccess.getActorInstanceConfigAccess().getUnorderedGroup_5(), 0);
+ }
+ ({true}?=>(
+(
+ {
+ newCompositeNode(grammarAccess.getActorInstanceConfigAccess().getAttributesAttrInstanceConfigParserRuleCall_5_0_0());
+ }
+ lv_attributes_6_0=ruleAttrInstanceConfig {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getActorInstanceConfigRule());
+ }
+ add(
+ $current,
+ "attributes",
+ lv_attributes_6_0,
+ "AttrInstanceConfig");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+))+
+ {
+ getUnorderedGroupHelper().returnFromSelection(grammarAccess.getActorInstanceConfigAccess().getUnorderedGroup_5());
+ }
+ )
+ ) |
+
+ (
+ {getUnorderedGroupHelper().canSelect(grammarAccess.getActorInstanceConfigAccess().getUnorderedGroup_5(), 1)}?=>(
+ {
+ getUnorderedGroupHelper().select(grammarAccess.getActorInstanceConfigAccess().getUnorderedGroup_5(), 1);
+ }
+ ({true}?=>(
+(
+ {
+ newCompositeNode(grammarAccess.getActorInstanceConfigAccess().getPortsPortInstanceConfigParserRuleCall_5_1_0());
+ }
+ lv_ports_7_0=rulePortInstanceConfig {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getActorInstanceConfigRule());
+ }
+ add(
+ $current,
+ "ports",
+ lv_ports_7_0,
+ "PortInstanceConfig");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+))+
+ {
+ getUnorderedGroupHelper().returnFromSelection(grammarAccess.getActorInstanceConfigAccess().getUnorderedGroup_5());
+ }
+ )
+ )
+
+ )*
+ )
+)
+ {
+ getUnorderedGroupHelper().leave(grammarAccess.getActorInstanceConfigAccess().getUnorderedGroup_5());
+ }
+
+) otherlv_8='}'
+ {
+ newLeafNode(otherlv_8, grammarAccess.getActorInstanceConfigAccess().getRightCurlyBracketKeyword_6());
+ }
+)
+;
+
+
+
+
+
+// Entry rule entryRuleProtocolClassConfig
+entryRuleProtocolClassConfig returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getProtocolClassConfigRule()); }
+ iv_ruleProtocolClassConfig=ruleProtocolClassConfig
+ { $current=$iv_ruleProtocolClassConfig.current; }
+ EOF
+;
+
+// Rule ProtocolClassConfig
+ruleProtocolClassConfig returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+( otherlv_0='ProtocolClassConfig'
+ {
+ newLeafNode(otherlv_0, grammarAccess.getProtocolClassConfigAccess().getProtocolClassConfigKeyword_0());
+ }
+(
+(
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getProtocolClassConfigRule());
+ }
+ }
+ {
+ newCompositeNode(grammarAccess.getProtocolClassConfigAccess().getProtocolProtocolClassCrossReference_1_0());
+ }
+ ruleFQN {
+ afterParserOrEnumRuleCall();
+ }
+
+)
+) otherlv_2='{'
+ {
+ newLeafNode(otherlv_2, grammarAccess.getProtocolClassConfigAccess().getLeftCurlyBracketKeyword_2());
+ }
+(
+
+(
+ {
+ getUnorderedGroupHelper().enter(grammarAccess.getProtocolClassConfigAccess().getUnorderedGroup_3());
+ }
+ (
+ (
+
+ (
+ {getUnorderedGroupHelper().canSelect(grammarAccess.getProtocolClassConfigAccess().getUnorderedGroup_3(), 0)}?=>(
+ {
+ getUnorderedGroupHelper().select(grammarAccess.getProtocolClassConfigAccess().getUnorderedGroup_3(), 0);
+ }
+ ({true}?=>( otherlv_4='regular'
+ {
+ newLeafNode(otherlv_4, grammarAccess.getProtocolClassConfigAccess().getRegularKeyword_3_0_0());
+ }
+(
+(
+ {
+ newCompositeNode(grammarAccess.getProtocolClassConfigAccess().getRegularPortClassConfigParserRuleCall_3_0_1_0());
+ }
+ lv_regular_5_0=rulePortClassConfig {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getProtocolClassConfigRule());
+ }
+ set(
+ $current,
+ "regular",
+ lv_regular_5_0,
+ "PortClassConfig");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+)))
+ {
+ getUnorderedGroupHelper().returnFromSelection(grammarAccess.getProtocolClassConfigAccess().getUnorderedGroup_3());
+ }
+ )
+ ) |
+
+ (
+ {getUnorderedGroupHelper().canSelect(grammarAccess.getProtocolClassConfigAccess().getUnorderedGroup_3(), 1)}?=>(
+ {
+ getUnorderedGroupHelper().select(grammarAccess.getProtocolClassConfigAccess().getUnorderedGroup_3(), 1);
+ }
+ ({true}?=>( otherlv_6='conjugate'
+ {
+ newLeafNode(otherlv_6, grammarAccess.getProtocolClassConfigAccess().getConjugateKeyword_3_1_0());
+ }
+(
+(
+ {
+ newCompositeNode(grammarAccess.getProtocolClassConfigAccess().getConjugatedPortClassConfigParserRuleCall_3_1_1_0());
+ }
+ lv_conjugated_7_0=rulePortClassConfig {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getProtocolClassConfigRule());
+ }
+ set(
+ $current,
+ "conjugated",
+ lv_conjugated_7_0,
+ "PortClassConfig");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+)))
+ {
+ getUnorderedGroupHelper().returnFromSelection(grammarAccess.getProtocolClassConfigAccess().getUnorderedGroup_3());
+ }
+ )
+ )
+
+ )*
+ )
+)
+ {
+ getUnorderedGroupHelper().leave(grammarAccess.getProtocolClassConfigAccess().getUnorderedGroup_3());
+ }
+
+) otherlv_8='}'
+ {
+ newLeafNode(otherlv_8, grammarAccess.getProtocolClassConfigAccess().getRightCurlyBracketKeyword_4());
+ }
+)
+;
+
+
+
+
+
+// Entry rule entryRulePortClassConfig
+entryRulePortClassConfig returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getPortClassConfigRule()); }
+ iv_rulePortClassConfig=rulePortClassConfig
+ { $current=$iv_rulePortClassConfig.current; }
+ EOF
+;
+
+// Rule PortClassConfig
+rulePortClassConfig returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+((
+ {
+ $current = forceCreateModelElement(
+ grammarAccess.getPortClassConfigAccess().getPortClassConfigAction_0(),
+ $current);
+ }
+) otherlv_1='Port'
+ {
+ newLeafNode(otherlv_1, grammarAccess.getPortClassConfigAccess().getPortKeyword_1());
+ }
+ otherlv_2='{'
+ {
+ newLeafNode(otherlv_2, grammarAccess.getPortClassConfigAccess().getLeftCurlyBracketKeyword_2());
+ }
+(
+(
+ {
+ newCompositeNode(grammarAccess.getPortClassConfigAccess().getAttributesAttrClassConfigParserRuleCall_3_0());
+ }
+ lv_attributes_3_0=ruleAttrClassConfig {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getPortClassConfigRule());
+ }
+ add(
+ $current,
+ "attributes",
+ lv_attributes_3_0,
+ "AttrClassConfig");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+)* otherlv_4='}'
+ {
+ newLeafNode(otherlv_4, grammarAccess.getPortClassConfigAccess().getRightCurlyBracketKeyword_4());
+ }
+)
+;
+
+
+
+
+
+// Entry rule entryRulePortInstanceConfig
+entryRulePortInstanceConfig returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getPortInstanceConfigRule()); }
+ iv_rulePortInstanceConfig=rulePortInstanceConfig
+ { $current=$iv_rulePortInstanceConfig.current; }
+ EOF
+;
+
+// Rule PortInstanceConfig
+rulePortInstanceConfig returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+( otherlv_0='InterfaceItem'
+ {
+ newLeafNode(otherlv_0, grammarAccess.getPortInstanceConfigAccess().getInterfaceItemKeyword_0());
+ }
+(
+(
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getPortInstanceConfigRule());
+ }
+ }
+ otherlv_1=RULE_ID
+ {
+ newLeafNode(otherlv_1, grammarAccess.getPortInstanceConfigAccess().getItemInterfaceItemCrossReference_1_0());
+ }
+
+)
+) otherlv_2='{'
+ {
+ newLeafNode(otherlv_2, grammarAccess.getPortInstanceConfigAccess().getLeftCurlyBracketKeyword_2());
+ }
+(
+(
+ {
+ newCompositeNode(grammarAccess.getPortInstanceConfigAccess().getAttributesAttrInstanceConfigParserRuleCall_3_0());
+ }
+ lv_attributes_3_0=ruleAttrInstanceConfig {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getPortInstanceConfigRule());
+ }
+ add(
+ $current,
+ "attributes",
+ lv_attributes_3_0,
+ "AttrInstanceConfig");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+)* otherlv_4='}'
+ {
+ newLeafNode(otherlv_4, grammarAccess.getPortInstanceConfigAccess().getRightCurlyBracketKeyword_4());
+ }
+)
+;
+
+
+
+
+
+
+
+// Entry rule entryRuleAttrClassConfig
+entryRuleAttrClassConfig returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getAttrClassConfigRule()); }
+ iv_ruleAttrClassConfig=ruleAttrClassConfig
+ { $current=$iv_ruleAttrClassConfig.current; }
+ EOF
+;
+
+// Rule AttrClassConfig
+ruleAttrClassConfig returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+( otherlv_0='Attr'
+ {
+ newLeafNode(otherlv_0, grammarAccess.getAttrClassConfigAccess().getAttrKeyword_0());
+ }
+(
+(
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getAttrClassConfigRule());
+ }
+ }
+ otherlv_1=RULE_ID
+ {
+ newLeafNode(otherlv_1, grammarAccess.getAttrClassConfigAccess().getAttributeAttributeCrossReference_1_0());
+ }
+
+)
+)( otherlv_2='='
+ {
+ newLeafNode(otherlv_2, grammarAccess.getAttrClassConfigAccess().getEqualsSignKeyword_2_0());
+ }
+(
+(
+ {
+ newCompositeNode(grammarAccess.getAttrClassConfigAccess().getValueLiteralArrayParserRuleCall_2_1_0());
+ }
+ lv_value_3_0=ruleLiteralArray {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getAttrClassConfigRule());
+ }
+ set(
+ $current,
+ "value",
+ lv_value_3_0,
+ "LiteralArray");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+))?( otherlv_4='{'
+ {
+ newLeafNode(otherlv_4, grammarAccess.getAttrClassConfigAccess().getLeftCurlyBracketKeyword_3_0());
+ }
+(( otherlv_5='min'
+ {
+ newLeafNode(otherlv_5, grammarAccess.getAttrClassConfigAccess().getMinKeyword_3_1_0_0());
+ }
+ otherlv_6='='
+ {
+ newLeafNode(otherlv_6, grammarAccess.getAttrClassConfigAccess().getEqualsSignKeyword_3_1_0_1());
+ }
+(
+(
+ {
+ newCompositeNode(grammarAccess.getAttrClassConfigAccess().getMinNumberLiteralParserRuleCall_3_1_0_2_0());
+ }
+ lv_min_7_0=ruleNumberLiteral {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getAttrClassConfigRule());
+ }
+ set(
+ $current,
+ "min",
+ lv_min_7_0,
+ "NumberLiteral");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+))?( otherlv_8='max'
+ {
+ newLeafNode(otherlv_8, grammarAccess.getAttrClassConfigAccess().getMaxKeyword_3_1_1_0());
+ }
+ otherlv_9='='
+ {
+ newLeafNode(otherlv_9, grammarAccess.getAttrClassConfigAccess().getEqualsSignKeyword_3_1_1_1());
+ }
+(
+(
+ {
+ newCompositeNode(grammarAccess.getAttrClassConfigAccess().getMaxNumberLiteralParserRuleCall_3_1_1_2_0());
+ }
+ lv_max_10_0=ruleNumberLiteral {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getAttrClassConfigRule());
+ }
+ set(
+ $current,
+ "max",
+ lv_max_10_0,
+ "NumberLiteral");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+))?(
+(
+ {
+ newCompositeNode(grammarAccess.getAttrClassConfigAccess().getAttributesAttrClassConfigParserRuleCall_3_1_2_0());
+ }
+ lv_attributes_11_0=ruleAttrClassConfig {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getAttrClassConfigRule());
+ }
+ add(
+ $current,
+ "attributes",
+ lv_attributes_11_0,
+ "AttrClassConfig");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+)*) otherlv_12='}'
+ {
+ newLeafNode(otherlv_12, grammarAccess.getAttrClassConfigAccess().getRightCurlyBracketKeyword_3_2());
+ }
+)?)
+;
+
+
+
+
+
+// Entry rule entryRuleAttrInstanceConfig
+entryRuleAttrInstanceConfig returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getAttrInstanceConfigRule()); }
+ iv_ruleAttrInstanceConfig=ruleAttrInstanceConfig
+ { $current=$iv_ruleAttrInstanceConfig.current; }
+ EOF
+;
+
+// Rule AttrInstanceConfig
+ruleAttrInstanceConfig returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+( otherlv_0='Attr'
+ {
+ newLeafNode(otherlv_0, grammarAccess.getAttrInstanceConfigAccess().getAttrKeyword_0());
+ }
+(
+(
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getAttrInstanceConfigRule());
+ }
+ }
+ otherlv_1=RULE_ID
+ {
+ newLeafNode(otherlv_1, grammarAccess.getAttrInstanceConfigAccess().getAttributeAttributeCrossReference_1_0());
+ }
+
+)
+)( otherlv_2='='
+ {
+ newLeafNode(otherlv_2, grammarAccess.getAttrInstanceConfigAccess().getEqualsSignKeyword_2_0());
+ }
+(
+(
+ {
+ newCompositeNode(grammarAccess.getAttrInstanceConfigAccess().getValueLiteralArrayParserRuleCall_2_1_0());
+ }
+ lv_value_3_0=ruleLiteralArray {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getAttrInstanceConfigRule());
+ }
+ set(
+ $current,
+ "value",
+ lv_value_3_0,
+ "LiteralArray");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+))?( otherlv_4='{'
+ {
+ newLeafNode(otherlv_4, grammarAccess.getAttrInstanceConfigAccess().getLeftCurlyBracketKeyword_3_0());
+ }
+(((
+(
+ lv_dynConfig_5_0= 'dynamic configuration'
+ {
+ newLeafNode(lv_dynConfig_5_0, grammarAccess.getAttrInstanceConfigAccess().getDynConfigDynamicConfigurationKeyword_3_1_0_0_0());
+ }
+
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getAttrInstanceConfigRule());
+ }
+ setWithLastConsumed($current, "dynConfig", true, "dynamic configuration");
+ }
+
+)
+)((
+(
+ lv_readOnly_6_0= 'read'
+ {
+ newLeafNode(lv_readOnly_6_0, grammarAccess.getAttrInstanceConfigAccess().getReadOnlyReadKeyword_3_1_0_1_0_0());
+ }
+
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getAttrInstanceConfigRule());
+ }
+ setWithLastConsumed($current, "readOnly", true, "read");
+ }
+
+)
+)
+ | otherlv_7='write'
+ {
+ newLeafNode(otherlv_7, grammarAccess.getAttrInstanceConfigAccess().getWriteKeyword_3_1_0_1_1());
+ }
+))?(
+(
+ {
+ newCompositeNode(grammarAccess.getAttrInstanceConfigAccess().getAttributesAttrInstanceConfigParserRuleCall_3_1_1_0());
+ }
+ lv_attributes_8_0=ruleAttrInstanceConfig {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getAttrInstanceConfigRule());
+ }
+ add(
+ $current,
+ "attributes",
+ lv_attributes_8_0,
+ "AttrInstanceConfig");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+)*) otherlv_9='}'
+ {
+ newLeafNode(otherlv_9, grammarAccess.getAttrInstanceConfigAccess().getRightCurlyBracketKeyword_3_2());
+ }
+)?)
+;
+
+
+
+
+
+// Entry rule entryRuleRefPath
+entryRuleRefPath returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getRefPathRule()); }
+ iv_ruleRefPath=ruleRefPath
+ { $current=$iv_ruleRefPath.current; }
+ EOF
+;
+
+// Rule RefPath
+ruleRefPath returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+((
+(
+ lv_refs_0_0=RULE_ID
+ {
+ newLeafNode(lv_refs_0_0, grammarAccess.getRefPathAccess().getRefsIDTerminalRuleCall_0_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getRefPathRule());
+ }
+ addWithLastConsumed(
+ $current,
+ "refs",
+ lv_refs_0_0,
+ "ID");
+ }
+
+)
+)( otherlv_1='/'
+ {
+ newLeafNode(otherlv_1, grammarAccess.getRefPathAccess().getSolidusKeyword_1_0());
+ }
+(
+(
+ lv_refs_2_0=RULE_ID
+ {
+ newLeafNode(lv_refs_2_0, grammarAccess.getRefPathAccess().getRefsIDTerminalRuleCall_1_1_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getRefPathRule());
+ }
+ addWithLastConsumed(
+ $current,
+ "refs",
+ lv_refs_2_0,
+ "ID");
+ }
+
+)
+))*)
+;
+
+
+
+
+
+// Entry rule entryRuleImport
+entryRuleImport returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getImportRule()); }
+ iv_ruleImport=ruleImport
+ { $current=$iv_ruleImport.current; }
+ EOF
+;
+
+// Rule Import
+ruleImport returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+( otherlv_0='import'
+ {
+ newLeafNode(otherlv_0, grammarAccess.getImportAccess().getImportKeyword_0());
+ }
+(((
+(
+ {
+ newCompositeNode(grammarAccess.getImportAccess().getImportedNamespaceImportedFQNParserRuleCall_1_0_0_0());
+ }
+ lv_importedNamespace_1_0=ruleImportedFQN {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getImportRule());
+ }
+ set(
+ $current,
+ "importedNamespace",
+ lv_importedNamespace_1_0,
+ "ImportedFQN");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+) otherlv_2='from'
+ {
+ newLeafNode(otherlv_2, grammarAccess.getImportAccess().getFromKeyword_1_0_1());
+ }
+)
+ | otherlv_3='model'
+ {
+ newLeafNode(otherlv_3, grammarAccess.getImportAccess().getModelKeyword_1_1());
+ }
+)(
+(
+ lv_importURI_4_0=RULE_STRING
+ {
+ newLeafNode(lv_importURI_4_0, grammarAccess.getImportAccess().getImportURISTRINGTerminalRuleCall_2_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getImportRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "importURI",
+ lv_importURI_4_0,
+ "STRING");
+ }
+
+)
+))
+;
+
+
+
+
+
+// Entry rule entryRuleImportedFQN
+entryRuleImportedFQN returns [String current=null]
+ :
+ { newCompositeNode(grammarAccess.getImportedFQNRule()); }
+ iv_ruleImportedFQN=ruleImportedFQN
+ { $current=$iv_ruleImportedFQN.current.getText(); }
+ EOF
+;
+
+// Rule ImportedFQN
+ruleImportedFQN returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+(
+ {
+ newCompositeNode(grammarAccess.getImportedFQNAccess().getFQNParserRuleCall_0());
+ }
+ this_FQN_0=ruleFQN {
+ $current.merge(this_FQN_0);
+ }
+
+ {
+ afterParserOrEnumRuleCall();
+ }
+(
+ kw='.*'
+ {
+ $current.merge(kw);
+ newLeafNode(kw, grammarAccess.getImportedFQNAccess().getFullStopAsteriskKeyword_1());
+ }
+)?)
+ ;
+
+
+
+
+
+// Entry rule entryRuleFQN
+entryRuleFQN returns [String current=null]
+ :
+ { newCompositeNode(grammarAccess.getFQNRule()); }
+ iv_ruleFQN=ruleFQN
+ { $current=$iv_ruleFQN.current.getText(); }
+ EOF
+;
+
+// Rule FQN
+ruleFQN returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+( this_ID_0=RULE_ID {
+ $current.merge(this_ID_0);
+ }
+
+ {
+ newLeafNode(this_ID_0, grammarAccess.getFQNAccess().getIDTerminalRuleCall_0());
+ }
+(
+ kw='.'
+ {
+ $current.merge(kw);
+ newLeafNode(kw, grammarAccess.getFQNAccess().getFullStopKeyword_1_0());
+ }
+ this_ID_2=RULE_ID {
+ $current.merge(this_ID_2);
+ }
+
+ {
+ newLeafNode(this_ID_2, grammarAccess.getFQNAccess().getIDTerminalRuleCall_1_1());
+ }
+)*)
+ ;
+
+
+
+
+
+// Entry rule entryRuleLiteralArray
+entryRuleLiteralArray returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getLiteralArrayRule()); }
+ iv_ruleLiteralArray=ruleLiteralArray
+ { $current=$iv_ruleLiteralArray.current; }
+ EOF
+;
+
+// Rule LiteralArray
+ruleLiteralArray returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+((
+(
+ {
+ newCompositeNode(grammarAccess.getLiteralArrayAccess().getLiteralsLiteralParserRuleCall_0_0());
+ }
+ lv_literals_0_0=ruleLiteral {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getLiteralArrayRule());
+ }
+ add(
+ $current,
+ "literals",
+ lv_literals_0_0,
+ "Literal");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+)( otherlv_1=','
+ {
+ newLeafNode(otherlv_1, grammarAccess.getLiteralArrayAccess().getCommaKeyword_1_0());
+ }
+(
+(
+ {
+ newCompositeNode(grammarAccess.getLiteralArrayAccess().getLiteralsLiteralParserRuleCall_1_1_0());
+ }
+ lv_literals_2_0=ruleLiteral {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getLiteralArrayRule());
+ }
+ add(
+ $current,
+ "literals",
+ lv_literals_2_0,
+ "Literal");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+))*)
+;
+
+
+
+
+
+// Entry rule entryRuleLiteral
+entryRuleLiteral returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getLiteralRule()); }
+ iv_ruleLiteral=ruleLiteral
+ { $current=$iv_ruleLiteral.current; }
+ EOF
+;
+
+// Rule Literal
+ruleLiteral returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+(
+ {
+ newCompositeNode(grammarAccess.getLiteralAccess().getBooleanLiteralParserRuleCall_0());
+ }
+ this_BooleanLiteral_0=ruleBooleanLiteral
+ {
+ $current = $this_BooleanLiteral_0.current;
+ afterParserOrEnumRuleCall();
+ }
+
+ |
+ {
+ newCompositeNode(grammarAccess.getLiteralAccess().getNumberLiteralParserRuleCall_1());
+ }
+ this_NumberLiteral_1=ruleNumberLiteral
+ {
+ $current = $this_NumberLiteral_1.current;
+ afterParserOrEnumRuleCall();
+ }
+
+ |
+ {
+ newCompositeNode(grammarAccess.getLiteralAccess().getStringLiteralParserRuleCall_2());
+ }
+ this_StringLiteral_2=ruleStringLiteral
+ {
+ $current = $this_StringLiteral_2.current;
+ afterParserOrEnumRuleCall();
+ }
+)
+;
+
+
+
+
+
+// Entry rule entryRuleBooleanLiteral
+entryRuleBooleanLiteral returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getBooleanLiteralRule()); }
+ iv_ruleBooleanLiteral=ruleBooleanLiteral
+ { $current=$iv_ruleBooleanLiteral.current; }
+ EOF
+;
+
+// Rule BooleanLiteral
+ruleBooleanLiteral returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+((
+ {
+ $current = forceCreateModelElement(
+ grammarAccess.getBooleanLiteralAccess().getBooleanLiteralAction_0(),
+ $current);
+ }
+)( otherlv_1='false'
+ {
+ newLeafNode(otherlv_1, grammarAccess.getBooleanLiteralAccess().getFalseKeyword_1_0());
+ }
+
+ |(
+(
+ lv_isTrue_2_0= 'true'
+ {
+ newLeafNode(lv_isTrue_2_0, grammarAccess.getBooleanLiteralAccess().getIsTrueTrueKeyword_1_1_0());
+ }
+
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getBooleanLiteralRule());
+ }
+ setWithLastConsumed($current, "isTrue", true, "true");
+ }
+
+)
+)))
+;
+
+
+
+
+
+// Entry rule entryRuleNumberLiteral
+entryRuleNumberLiteral returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getNumberLiteralRule()); }
+ iv_ruleNumberLiteral=ruleNumberLiteral
+ { $current=$iv_ruleNumberLiteral.current; }
+ EOF
+;
+
+// Rule NumberLiteral
+ruleNumberLiteral returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+(
+ {
+ newCompositeNode(grammarAccess.getNumberLiteralAccess().getIntLiteralParserRuleCall_0());
+ }
+ this_IntLiteral_0=ruleIntLiteral
+ {
+ $current = $this_IntLiteral_0.current;
+ afterParserOrEnumRuleCall();
+ }
+
+ |
+ {
+ newCompositeNode(grammarAccess.getNumberLiteralAccess().getRealLiteralParserRuleCall_1());
+ }
+ this_RealLiteral_1=ruleRealLiteral
+ {
+ $current = $this_RealLiteral_1.current;
+ afterParserOrEnumRuleCall();
+ }
+)
+;
+
+
+
+
+
+// Entry rule entryRuleRealLiteral
+entryRuleRealLiteral returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getRealLiteralRule()); }
+ iv_ruleRealLiteral=ruleRealLiteral
+ { $current=$iv_ruleRealLiteral.current; }
+ EOF
+;
+
+// Rule RealLiteral
+ruleRealLiteral returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+((
+ {
+ $current = forceCreateModelElement(
+ grammarAccess.getRealLiteralAccess().getRealLiteralAction_0(),
+ $current);
+ }
+)(
+(
+ {
+ newCompositeNode(grammarAccess.getRealLiteralAccess().getValueRealParserRuleCall_1_0());
+ }
+ lv_value_1_0=ruleReal {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getRealLiteralRule());
+ }
+ set(
+ $current,
+ "value",
+ lv_value_1_0,
+ "Real");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+))
+;
+
+
+
+
+
+// Entry rule entryRuleIntLiteral
+entryRuleIntLiteral returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getIntLiteralRule()); }
+ iv_ruleIntLiteral=ruleIntLiteral
+ { $current=$iv_ruleIntLiteral.current; }
+ EOF
+;
+
+// Rule IntLiteral
+ruleIntLiteral returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+((
+ {
+ $current = forceCreateModelElement(
+ grammarAccess.getIntLiteralAccess().getIntLiteralAction_0(),
+ $current);
+ }
+)(
+(
+ {
+ newCompositeNode(grammarAccess.getIntLiteralAccess().getValueIntegerParserRuleCall_1_0());
+ }
+ lv_value_1_0=ruleInteger {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getIntLiteralRule());
+ }
+ set(
+ $current,
+ "value",
+ lv_value_1_0,
+ "Integer");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+))
+;
+
+
+
+
+
+// Entry rule entryRuleStringLiteral
+entryRuleStringLiteral returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getStringLiteralRule()); }
+ iv_ruleStringLiteral=ruleStringLiteral
+ { $current=$iv_ruleStringLiteral.current; }
+ EOF
+;
+
+// Rule StringLiteral
+ruleStringLiteral returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+((
+ {
+ $current = forceCreateModelElement(
+ grammarAccess.getStringLiteralAccess().getStringLiteralAction_0(),
+ $current);
+ }
+)(
+(
+ lv_value_1_0=RULE_STRING
+ {
+ newLeafNode(lv_value_1_0, grammarAccess.getStringLiteralAccess().getValueSTRINGTerminalRuleCall_1_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getStringLiteralRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "value",
+ lv_value_1_0,
+ "STRING");
+ }
+
+)
+))
+;
+
+
+
+
+
+// Entry rule entryRuleInteger
+entryRuleInteger returns [String current=null]
+ :
+ { newCompositeNode(grammarAccess.getIntegerRule()); }
+ iv_ruleInteger=ruleInteger
+ { $current=$iv_ruleInteger.current.getText(); }
+ EOF
+;
+
+// Rule Integer
+ruleInteger returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+(
+ {
+ newCompositeNode(grammarAccess.getIntegerAccess().getSignedIntegerParserRuleCall_0());
+ }
+ this_SignedInteger_0=ruleSignedInteger {
+ $current.merge(this_SignedInteger_0);
+ }
+
+ {
+ afterParserOrEnumRuleCall();
+ }
+
+ |
+ {
+ newCompositeNode(grammarAccess.getIntegerAccess().getHexadecimalParserRuleCall_1());
+ }
+ this_Hexadecimal_1=ruleHexadecimal {
+ $current.merge(this_Hexadecimal_1);
+ }
+
+ {
+ afterParserOrEnumRuleCall();
+ }
+)
+ ;
+
+
+
+
+
+// Entry rule entryRuleSignedInteger
+entryRuleSignedInteger returns [String current=null]
+ @init {
+ HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();
+ }
+ :
+ { newCompositeNode(grammarAccess.getSignedIntegerRule()); }
+ iv_ruleSignedInteger=ruleSignedInteger
+ { $current=$iv_ruleSignedInteger.current.getText(); }
+ EOF
+;
+finally {
+ myHiddenTokenState.restore();
+}
+
+// Rule SignedInteger
+ruleSignedInteger returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()]
+ @init { enterRule();
+ HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();
+ }
+ @after { leaveRule(); }:
+((
+ kw='+'
+ {
+ $current.merge(kw);
+ newLeafNode(kw, grammarAccess.getSignedIntegerAccess().getPlusSignKeyword_0_0());
+ }
+
+ |
+ kw='-'
+ {
+ $current.merge(kw);
+ newLeafNode(kw, grammarAccess.getSignedIntegerAccess().getHyphenMinusKeyword_0_1());
+ }
+)? this_INT_2=RULE_INT {
+ $current.merge(this_INT_2);
+ }
+
+ {
+ newLeafNode(this_INT_2, grammarAccess.getSignedIntegerAccess().getINTTerminalRuleCall_1());
+ }
+)
+ ;
+finally {
+ myHiddenTokenState.restore();
+}
+
+
+
+
+
+// Entry rule entryRuleHexadecimal
+entryRuleHexadecimal returns [String current=null]
+ @init {
+ HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();
+ }
+ :
+ { newCompositeNode(grammarAccess.getHexadecimalRule()); }
+ iv_ruleHexadecimal=ruleHexadecimal
+ { $current=$iv_ruleHexadecimal.current.getText(); }
+ EOF
+;
+finally {
+ myHiddenTokenState.restore();
+}
+
+// Rule Hexadecimal
+ruleHexadecimal returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()]
+ @init { enterRule();
+ HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();
+ }
+ @after { leaveRule(); }:
+ this_HEX_0=RULE_HEX {
+ $current.merge(this_HEX_0);
+ }
+
+ {
+ newLeafNode(this_HEX_0, grammarAccess.getHexadecimalAccess().getHEXTerminalRuleCall());
+ }
+
+ ;
+finally {
+ myHiddenTokenState.restore();
+}
+
+
+
+
+
+// Entry rule entryRuleReal
+entryRuleReal returns [String current=null]
+ :
+ { newCompositeNode(grammarAccess.getRealRule()); }
+ iv_ruleReal=ruleReal
+ { $current=$iv_ruleReal.current.getText(); }
+ EOF
+;
+
+// Rule Real
+ruleReal returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+(
+ {
+ newCompositeNode(grammarAccess.getRealAccess().getDecimalParserRuleCall_0());
+ }
+ this_Decimal_0=ruleDecimal {
+ $current.merge(this_Decimal_0);
+ }
+
+ {
+ afterParserOrEnumRuleCall();
+ }
+
+ |
+ {
+ newCompositeNode(grammarAccess.getRealAccess().getDotDecimalParserRuleCall_1());
+ }
+ this_DotDecimal_1=ruleDotDecimal {
+ $current.merge(this_DotDecimal_1);
+ }
+
+ {
+ afterParserOrEnumRuleCall();
+ }
+
+ |
+ {
+ newCompositeNode(grammarAccess.getRealAccess().getDecimalDotParserRuleCall_2());
+ }
+ this_DecimalDot_2=ruleDecimalDot {
+ $current.merge(this_DecimalDot_2);
+ }
+
+ {
+ afterParserOrEnumRuleCall();
+ }
+
+ |
+ {
+ newCompositeNode(grammarAccess.getRealAccess().getDecimalExpParserRuleCall_3());
+ }
+ this_DecimalExp_3=ruleDecimalExp {
+ $current.merge(this_DecimalExp_3);
+ }
+
+ {
+ afterParserOrEnumRuleCall();
+ }
+)
+ ;
+
+
+
+
+
+// Entry rule entryRuleDecimal
+entryRuleDecimal returns [String current=null]
+ @init {
+ HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();
+ }
+ :
+ { newCompositeNode(grammarAccess.getDecimalRule()); }
+ iv_ruleDecimal=ruleDecimal
+ { $current=$iv_ruleDecimal.current.getText(); }
+ EOF
+;
+finally {
+ myHiddenTokenState.restore();
+}
+
+// Rule Decimal
+ruleDecimal returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()]
+ @init { enterRule();
+ HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();
+ }
+ @after { leaveRule(); }:
+((
+ kw='+'
+ {
+ $current.merge(kw);
+ newLeafNode(kw, grammarAccess.getDecimalAccess().getPlusSignKeyword_0_0());
+ }
+
+ |
+ kw='-'
+ {
+ $current.merge(kw);
+ newLeafNode(kw, grammarAccess.getDecimalAccess().getHyphenMinusKeyword_0_1());
+ }
+)? this_INT_2=RULE_INT {
+ $current.merge(this_INT_2);
+ }
+
+ {
+ newLeafNode(this_INT_2, grammarAccess.getDecimalAccess().getINTTerminalRuleCall_1());
+ }
+
+ kw='.'
+ {
+ $current.merge(kw);
+ newLeafNode(kw, grammarAccess.getDecimalAccess().getFullStopKeyword_2());
+ }
+ this_INT_4=RULE_INT {
+ $current.merge(this_INT_4);
+ }
+
+ {
+ newLeafNode(this_INT_4, grammarAccess.getDecimalAccess().getINTTerminalRuleCall_3());
+ }
+)
+ ;
+finally {
+ myHiddenTokenState.restore();
+}
+
+
+
+
+
+// Entry rule entryRuleDotDecimal
+entryRuleDotDecimal returns [String current=null]
+ @init {
+ HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();
+ }
+ :
+ { newCompositeNode(grammarAccess.getDotDecimalRule()); }
+ iv_ruleDotDecimal=ruleDotDecimal
+ { $current=$iv_ruleDotDecimal.current.getText(); }
+ EOF
+;
+finally {
+ myHiddenTokenState.restore();
+}
+
+// Rule DotDecimal
+ruleDotDecimal returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()]
+ @init { enterRule();
+ HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();
+ }
+ @after { leaveRule(); }:
+((
+ kw='+'
+ {
+ $current.merge(kw);
+ newLeafNode(kw, grammarAccess.getDotDecimalAccess().getPlusSignKeyword_0_0());
+ }
+
+ |
+ kw='-'
+ {
+ $current.merge(kw);
+ newLeafNode(kw, grammarAccess.getDotDecimalAccess().getHyphenMinusKeyword_0_1());
+ }
+)?
+ kw='.'
+ {
+ $current.merge(kw);
+ newLeafNode(kw, grammarAccess.getDotDecimalAccess().getFullStopKeyword_1());
+ }
+ this_INT_3=RULE_INT {
+ $current.merge(this_INT_3);
+ }
+
+ {
+ newLeafNode(this_INT_3, grammarAccess.getDotDecimalAccess().getINTTerminalRuleCall_2());
+ }
+)
+ ;
+finally {
+ myHiddenTokenState.restore();
+}
+
+
+
+
+
+// Entry rule entryRuleDecimalDot
+entryRuleDecimalDot returns [String current=null]
+ @init {
+ HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();
+ }
+ :
+ { newCompositeNode(grammarAccess.getDecimalDotRule()); }
+ iv_ruleDecimalDot=ruleDecimalDot
+ { $current=$iv_ruleDecimalDot.current.getText(); }
+ EOF
+;
+finally {
+ myHiddenTokenState.restore();
+}
+
+// Rule DecimalDot
+ruleDecimalDot returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()]
+ @init { enterRule();
+ HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();
+ }
+ @after { leaveRule(); }:
+((
+ kw='+'
+ {
+ $current.merge(kw);
+ newLeafNode(kw, grammarAccess.getDecimalDotAccess().getPlusSignKeyword_0_0());
+ }
+
+ |
+ kw='-'
+ {
+ $current.merge(kw);
+ newLeafNode(kw, grammarAccess.getDecimalDotAccess().getHyphenMinusKeyword_0_1());
+ }
+)? this_INT_2=RULE_INT {
+ $current.merge(this_INT_2);
+ }
+
+ {
+ newLeafNode(this_INT_2, grammarAccess.getDecimalDotAccess().getINTTerminalRuleCall_1());
+ }
+
+ kw='.'
+ {
+ $current.merge(kw);
+ newLeafNode(kw, grammarAccess.getDecimalDotAccess().getFullStopKeyword_2());
+ }
+)
+ ;
+finally {
+ myHiddenTokenState.restore();
+}
+
+
+
+
+
+// Entry rule entryRuleDecimalExp
+entryRuleDecimalExp returns [String current=null]
+ @init {
+ HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();
+ }
+ :
+ { newCompositeNode(grammarAccess.getDecimalExpRule()); }
+ iv_ruleDecimalExp=ruleDecimalExp
+ { $current=$iv_ruleDecimalExp.current.getText(); }
+ EOF
+;
+finally {
+ myHiddenTokenState.restore();
+}
+
+// Rule DecimalExp
+ruleDecimalExp returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()]
+ @init { enterRule();
+ HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();
+ }
+ @after { leaveRule(); }:
+((
+ kw='+'
+ {
+ $current.merge(kw);
+ newLeafNode(kw, grammarAccess.getDecimalExpAccess().getPlusSignKeyword_0_0());
+ }
+
+ |
+ kw='-'
+ {
+ $current.merge(kw);
+ newLeafNode(kw, grammarAccess.getDecimalExpAccess().getHyphenMinusKeyword_0_1());
+ }
+)? this_INT_2=RULE_INT {
+ $current.merge(this_INT_2);
+ }
+
+ {
+ newLeafNode(this_INT_2, grammarAccess.getDecimalExpAccess().getINTTerminalRuleCall_1());
+ }
+
+ kw='.'
+ {
+ $current.merge(kw);
+ newLeafNode(kw, grammarAccess.getDecimalExpAccess().getFullStopKeyword_2());
+ }
+ this_INT_4=RULE_INT {
+ $current.merge(this_INT_4);
+ }
+
+ {
+ newLeafNode(this_INT_4, grammarAccess.getDecimalExpAccess().getINTTerminalRuleCall_3());
+ }
+ this_EXP_5=RULE_EXP {
+ $current.merge(this_EXP_5);
+ }
+
+ {
+ newLeafNode(this_EXP_5, grammarAccess.getDecimalExpAccess().getEXPTerminalRuleCall_4());
+ }
+)
+ ;
+finally {
+ myHiddenTokenState.restore();
+}
+
+
+
+
+
+RULE_EXP : ('e'|'E') ('+'|'-')? ('0'..'9')+;
+
+RULE_HEX : ('0x'|'0X') ('0'..'9'|'a'..'f'|'A'..'F')+;
+
+RULE_ID : '^'? ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*;
+
+RULE_INT : ('0'..'9')+;
+
+RULE_STRING : ('"' ('\\' ('b'|'t'|'n'|'f'|'r'|'u'|'"'|'\''|'\\')|~(('\\'|'"')))* '"'|'\'' ('\\' ('b'|'t'|'n'|'f'|'r'|'u'|'"'|'\''|'\\')|~(('\\'|'\'')))* '\'');
+
+RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )*'*/';
+
+RULE_SL_COMMENT : '//' ~(('\n'|'\r'))* ('\r'? '\n')?;
+
+RULE_WS : (' '|'\t'|'\r'|'\n')+;
+
+RULE_ANY_OTHER : .;
+
+
diff --git a/plugins/org.eclipse.etrice.core.config/src-gen/org/eclipse/etrice/core/services/ConfigGrammarAccess.java b/plugins/org.eclipse.etrice.core.config/src-gen/org/eclipse/etrice/core/services/ConfigGrammarAccess.java
index aba2d4c3e..799d31562 100644
--- a/plugins/org.eclipse.etrice.core.config/src-gen/org/eclipse/etrice/core/services/ConfigGrammarAccess.java
+++ b/plugins/org.eclipse.etrice.core.config/src-gen/org/eclipse/etrice/core/services/ConfigGrammarAccess.java
@@ -1,1897 +1,1897 @@
-/*
-* generated by Xtext
-*/
-
-package org.eclipse.etrice.core.services;
-
-import com.google.inject.Singleton;
-import com.google.inject.Inject;
-
-import java.util.List;
-
-import org.eclipse.xtext.*;
-import org.eclipse.xtext.service.GrammarProvider;
-import org.eclipse.xtext.service.AbstractElementFinder.*;
-
-import org.eclipse.xtext.common.services.TerminalsGrammarAccess;
-
-@Singleton
-public class ConfigGrammarAccess extends AbstractGrammarElementFinder {
-
-
- public class ConfigModelElements extends AbstractParserRuleElementFinder {
- private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "ConfigModel");
- private final Group cGroup = (Group)rule.eContents().get(1);
- private final Assignment cImportsAssignment_0 = (Assignment)cGroup.eContents().get(0);
- private final RuleCall cImportsImportParserRuleCall_0_0 = (RuleCall)cImportsAssignment_0.eContents().get(0);
- private final Assignment cConfigElementsAssignment_1 = (Assignment)cGroup.eContents().get(1);
- private final RuleCall cConfigElementsConfigElementParserRuleCall_1_0 = (RuleCall)cConfigElementsAssignment_1.eContents().get(0);
-
- //ConfigModel:
- //
- // imports+=Import* configElements+=ConfigElement*;
- public ParserRule getRule() { return rule; }
-
- //imports+=Import* configElements+=ConfigElement*
- public Group getGroup() { return cGroup; }
-
- //imports+=Import*
- public Assignment getImportsAssignment_0() { return cImportsAssignment_0; }
-
- //Import
- public RuleCall getImportsImportParserRuleCall_0_0() { return cImportsImportParserRuleCall_0_0; }
-
- //configElements+=ConfigElement*
- public Assignment getConfigElementsAssignment_1() { return cConfigElementsAssignment_1; }
-
- //ConfigElement
- public RuleCall getConfigElementsConfigElementParserRuleCall_1_0() { return cConfigElementsConfigElementParserRuleCall_1_0; }
- }
-
- public class ConfigElementElements extends AbstractParserRuleElementFinder {
- private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "ConfigElement");
- private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1);
- private final RuleCall cSubSystemConfigParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0);
- private final RuleCall cActorClassConfigParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1);
- private final RuleCall cActorInstanceConfigParserRuleCall_2 = (RuleCall)cAlternatives.eContents().get(2);
- private final RuleCall cProtocolClassConfigParserRuleCall_3 = (RuleCall)cAlternatives.eContents().get(3);
-
- //ConfigElement:
- //
- // SubSystemConfig | ActorClassConfig | ActorInstanceConfig | ProtocolClassConfig;
- public ParserRule getRule() { return rule; }
-
- //SubSystemConfig | ActorClassConfig | ActorInstanceConfig | ProtocolClassConfig
- public Alternatives getAlternatives() { return cAlternatives; }
-
- //SubSystemConfig
- public RuleCall getSubSystemConfigParserRuleCall_0() { return cSubSystemConfigParserRuleCall_0; }
-
- //ActorClassConfig
- public RuleCall getActorClassConfigParserRuleCall_1() { return cActorClassConfigParserRuleCall_1; }
-
- //ActorInstanceConfig
- public RuleCall getActorInstanceConfigParserRuleCall_2() { return cActorInstanceConfigParserRuleCall_2; }
-
- //ProtocolClassConfig
- public RuleCall getProtocolClassConfigParserRuleCall_3() { return cProtocolClassConfigParserRuleCall_3; }
- }
-
- public class SubSystemConfigElements extends AbstractParserRuleElementFinder {
- private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "SubSystemConfig");
- private final Group cGroup = (Group)rule.eContents().get(1);
- private final Keyword cSubSystemConfigKeyword_0 = (Keyword)cGroup.eContents().get(0);
- private final Assignment cSubSystemAssignment_1 = (Assignment)cGroup.eContents().get(1);
- private final CrossReference cSubSystemSubSystemClassCrossReference_1_0 = (CrossReference)cSubSystemAssignment_1.eContents().get(0);
- private final RuleCall cSubSystemSubSystemClassIDTerminalRuleCall_1_0_1 = (RuleCall)cSubSystemSubSystemClassCrossReference_1_0.eContents().get(1);
- private final Keyword cLeftCurlyBracketKeyword_2 = (Keyword)cGroup.eContents().get(2);
- private final Assignment cDynConfigAssignment_3 = (Assignment)cGroup.eContents().get(3);
- private final RuleCall cDynConfigDynamicConfigParserRuleCall_3_0 = (RuleCall)cDynConfigAssignment_3.eContents().get(0);
- private final Keyword cRightCurlyBracketKeyword_4 = (Keyword)cGroup.eContents().get(4);
-
- //SubSystemConfig:
- //
- // "SubSystemConfig" subSystem=[room::SubSystemClass] "{" dynConfig=DynamicConfig "}";
- public ParserRule getRule() { return rule; }
-
- //"SubSystemConfig" subSystem=[room::SubSystemClass] "{" dynConfig=DynamicConfig "}"
- public Group getGroup() { return cGroup; }
-
- //"SubSystemConfig"
- public Keyword getSubSystemConfigKeyword_0() { return cSubSystemConfigKeyword_0; }
-
- //subSystem=[room::SubSystemClass]
- public Assignment getSubSystemAssignment_1() { return cSubSystemAssignment_1; }
-
- //[room::SubSystemClass]
- public CrossReference getSubSystemSubSystemClassCrossReference_1_0() { return cSubSystemSubSystemClassCrossReference_1_0; }
-
- //ID
- public RuleCall getSubSystemSubSystemClassIDTerminalRuleCall_1_0_1() { return cSubSystemSubSystemClassIDTerminalRuleCall_1_0_1; }
-
- //"{"
- public Keyword getLeftCurlyBracketKeyword_2() { return cLeftCurlyBracketKeyword_2; }
-
- //dynConfig=DynamicConfig
- public Assignment getDynConfigAssignment_3() { return cDynConfigAssignment_3; }
-
- //DynamicConfig
- public RuleCall getDynConfigDynamicConfigParserRuleCall_3_0() { return cDynConfigDynamicConfigParserRuleCall_3_0; }
-
- //"}"
- public Keyword getRightCurlyBracketKeyword_4() { return cRightCurlyBracketKeyword_4; }
- }
-
- public class DynamicConfigElements extends AbstractParserRuleElementFinder {
- private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "DynamicConfig");
- private final Group cGroup = (Group)rule.eContents().get(1);
- private final Keyword cDynamicConfigurationKeyword_0 = (Keyword)cGroup.eContents().get(0);
- private final Keyword cLeftCurlyBracketKeyword_1 = (Keyword)cGroup.eContents().get(1);
- private final UnorderedGroup cUnorderedGroup_2 = (UnorderedGroup)cGroup.eContents().get(2);
- private final Alternatives cAlternatives_2_0 = (Alternatives)cUnorderedGroup_2.eContents().get(0);
- private final Group cGroup_2_0_0 = (Group)cAlternatives_2_0.eContents().get(0);
- private final Keyword cFilePathKeyword_2_0_0_0 = (Keyword)cGroup_2_0_0.eContents().get(0);
- private final Assignment cFilePathAssignment_2_0_0_1 = (Assignment)cGroup_2_0_0.eContents().get(1);
- private final RuleCall cFilePathSTRINGTerminalRuleCall_2_0_0_1_0 = (RuleCall)cFilePathAssignment_2_0_0_1.eContents().get(0);
- private final Group cGroup_2_0_1 = (Group)cAlternatives_2_0.eContents().get(1);
- private final Group cGroup_2_0_1_0 = (Group)cGroup_2_0_1.eContents().get(0);
- private final Keyword cUserImportKeyword_2_0_1_0_0 = (Keyword)cGroup_2_0_1_0.eContents().get(0);
- private final Assignment cUserCode1Assignment_2_0_1_0_1 = (Assignment)cGroup_2_0_1_0.eContents().get(1);
- private final RuleCall cUserCode1STRINGTerminalRuleCall_2_0_1_0_1_0 = (RuleCall)cUserCode1Assignment_2_0_1_0_1.eContents().get(0);
- private final Group cGroup_2_0_1_1 = (Group)cGroup_2_0_1.eContents().get(1);
- private final Keyword cUserConstructorKeyword_2_0_1_1_0 = (Keyword)cGroup_2_0_1_1.eContents().get(0);
- private final Assignment cUserCode2Assignment_2_0_1_1_1 = (Assignment)cGroup_2_0_1_1.eContents().get(1);
- private final RuleCall cUserCode2STRINGTerminalRuleCall_2_0_1_1_1_0 = (RuleCall)cUserCode2Assignment_2_0_1_1_1.eContents().get(0);
- private final Group cGroup_2_1 = (Group)cUnorderedGroup_2.eContents().get(1);
- private final Keyword cPollingTimerMsKeyword_2_1_0 = (Keyword)cGroup_2_1.eContents().get(0);
- private final Assignment cPollingAssignment_2_1_1 = (Assignment)cGroup_2_1.eContents().get(1);
- private final RuleCall cPollingINTTerminalRuleCall_2_1_1_0 = (RuleCall)cPollingAssignment_2_1_1.eContents().get(0);
- private final Keyword cRightCurlyBracketKeyword_3 = (Keyword)cGroup.eContents().get(3);
-
- //DynamicConfig:
- //
- // "dynamic configuration" "{" (("file path" filePath=STRING | ("user import" userCode1=STRING) ("user constructor"
- //
- // userCode2=STRING)) & ("polling timer [ms]" polling=INT)?) "}";
- public ParserRule getRule() { return rule; }
-
- //"dynamic configuration" "{" (("file path" filePath=STRING | ("user import" userCode1=STRING) ("user constructor"
- //
- //userCode2=STRING)) & ("polling timer [ms]" polling=INT)?) "}"
- public Group getGroup() { return cGroup; }
-
- //"dynamic configuration"
- public Keyword getDynamicConfigurationKeyword_0() { return cDynamicConfigurationKeyword_0; }
-
- //"{"
- public Keyword getLeftCurlyBracketKeyword_1() { return cLeftCurlyBracketKeyword_1; }
-
- //("file path" filePath=STRING | ("user import" userCode1=STRING) ("user constructor" userCode2=STRING)) &
- //
- //("polling timer [ms]" polling=INT)?
- public UnorderedGroup getUnorderedGroup_2() { return cUnorderedGroup_2; }
-
- //"file path" filePath=STRING | ("user import" userCode1=STRING) ("user constructor" userCode2=STRING)
- public Alternatives getAlternatives_2_0() { return cAlternatives_2_0; }
-
- //"file path" filePath=STRING
- public Group getGroup_2_0_0() { return cGroup_2_0_0; }
-
- //"file path"
- public Keyword getFilePathKeyword_2_0_0_0() { return cFilePathKeyword_2_0_0_0; }
-
- //filePath=STRING
- public Assignment getFilePathAssignment_2_0_0_1() { return cFilePathAssignment_2_0_0_1; }
-
- //STRING
- public RuleCall getFilePathSTRINGTerminalRuleCall_2_0_0_1_0() { return cFilePathSTRINGTerminalRuleCall_2_0_0_1_0; }
-
- //("user import" userCode1=STRING) ("user constructor" userCode2=STRING)
- public Group getGroup_2_0_1() { return cGroup_2_0_1; }
-
- //"user import" userCode1=STRING
- public Group getGroup_2_0_1_0() { return cGroup_2_0_1_0; }
-
- //"user import"
- public Keyword getUserImportKeyword_2_0_1_0_0() { return cUserImportKeyword_2_0_1_0_0; }
-
- //userCode1=STRING
- public Assignment getUserCode1Assignment_2_0_1_0_1() { return cUserCode1Assignment_2_0_1_0_1; }
-
- //STRING
- public RuleCall getUserCode1STRINGTerminalRuleCall_2_0_1_0_1_0() { return cUserCode1STRINGTerminalRuleCall_2_0_1_0_1_0; }
-
- //"user constructor" userCode2=STRING
- public Group getGroup_2_0_1_1() { return cGroup_2_0_1_1; }
-
- //"user constructor"
- public Keyword getUserConstructorKeyword_2_0_1_1_0() { return cUserConstructorKeyword_2_0_1_1_0; }
-
- //userCode2=STRING
- public Assignment getUserCode2Assignment_2_0_1_1_1() { return cUserCode2Assignment_2_0_1_1_1; }
-
- //STRING
- public RuleCall getUserCode2STRINGTerminalRuleCall_2_0_1_1_1_0() { return cUserCode2STRINGTerminalRuleCall_2_0_1_1_1_0; }
-
- //("polling timer [ms]" polling=INT)?
- public Group getGroup_2_1() { return cGroup_2_1; }
-
- //"polling timer [ms]"
- public Keyword getPollingTimerMsKeyword_2_1_0() { return cPollingTimerMsKeyword_2_1_0; }
-
- //polling=INT
- public Assignment getPollingAssignment_2_1_1() { return cPollingAssignment_2_1_1; }
-
- //INT
- public RuleCall getPollingINTTerminalRuleCall_2_1_1_0() { return cPollingINTTerminalRuleCall_2_1_1_0; }
-
- //"}"
- public Keyword getRightCurlyBracketKeyword_3() { return cRightCurlyBracketKeyword_3; }
- }
-
- public class ActorClassConfigElements extends AbstractParserRuleElementFinder {
- private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "ActorClassConfig");
- private final Group cGroup = (Group)rule.eContents().get(1);
- private final Keyword cActorClassConfigKeyword_0 = (Keyword)cGroup.eContents().get(0);
- private final Assignment cActorAssignment_1 = (Assignment)cGroup.eContents().get(1);
- private final CrossReference cActorActorClassCrossReference_1_0 = (CrossReference)cActorAssignment_1.eContents().get(0);
- private final RuleCall cActorActorClassFQNParserRuleCall_1_0_1 = (RuleCall)cActorActorClassCrossReference_1_0.eContents().get(1);
- private final Keyword cLeftCurlyBracketKeyword_2 = (Keyword)cGroup.eContents().get(2);
- private final Assignment cAttributesAssignment_3 = (Assignment)cGroup.eContents().get(3);
- private final RuleCall cAttributesAttrClassConfigParserRuleCall_3_0 = (RuleCall)cAttributesAssignment_3.eContents().get(0);
- private final Keyword cRightCurlyBracketKeyword_4 = (Keyword)cGroup.eContents().get(4);
-
- /// *
- // * Validation:
- // * duplicates config, attributes
- // * / ActorClassConfig:
- //
- // "ActorClassConfig" actor=[room::ActorClass|FQN] "{" attributes+=AttrClassConfig* "}";
- public ParserRule getRule() { return rule; }
-
- //"ActorClassConfig" actor=[room::ActorClass|FQN] "{" attributes+=AttrClassConfig* "}"
- public Group getGroup() { return cGroup; }
-
- //"ActorClassConfig"
- public Keyword getActorClassConfigKeyword_0() { return cActorClassConfigKeyword_0; }
-
- //actor=[room::ActorClass|FQN]
- public Assignment getActorAssignment_1() { return cActorAssignment_1; }
-
- //[room::ActorClass|FQN]
- public CrossReference getActorActorClassCrossReference_1_0() { return cActorActorClassCrossReference_1_0; }
-
- //FQN
- public RuleCall getActorActorClassFQNParserRuleCall_1_0_1() { return cActorActorClassFQNParserRuleCall_1_0_1; }
-
- //"{"
- public Keyword getLeftCurlyBracketKeyword_2() { return cLeftCurlyBracketKeyword_2; }
-
- //attributes+=AttrClassConfig*
- public Assignment getAttributesAssignment_3() { return cAttributesAssignment_3; }
-
- //AttrClassConfig
- public RuleCall getAttributesAttrClassConfigParserRuleCall_3_0() { return cAttributesAttrClassConfigParserRuleCall_3_0; }
-
- //"}"
- public Keyword getRightCurlyBracketKeyword_4() { return cRightCurlyBracketKeyword_4; }
- }
-
- public class ActorInstanceConfigElements extends AbstractParserRuleElementFinder {
- private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "ActorInstanceConfig");
- private final Group cGroup = (Group)rule.eContents().get(1);
- private final Keyword cActorInstanceConfigKeyword_0 = (Keyword)cGroup.eContents().get(0);
- private final Assignment cRootAssignment_1 = (Assignment)cGroup.eContents().get(1);
- private final CrossReference cRootSubSystemClassCrossReference_1_0 = (CrossReference)cRootAssignment_1.eContents().get(0);
- private final RuleCall cRootSubSystemClassFQNParserRuleCall_1_0_1 = (RuleCall)cRootSubSystemClassCrossReference_1_0.eContents().get(1);
- private final Keyword cSolidusKeyword_2 = (Keyword)cGroup.eContents().get(2);
- private final Assignment cPathAssignment_3 = (Assignment)cGroup.eContents().get(3);
- private final RuleCall cPathRefPathParserRuleCall_3_0 = (RuleCall)cPathAssignment_3.eContents().get(0);
- private final Keyword cLeftCurlyBracketKeyword_4 = (Keyword)cGroup.eContents().get(4);
- private final UnorderedGroup cUnorderedGroup_5 = (UnorderedGroup)cGroup.eContents().get(5);
- private final Assignment cAttributesAssignment_5_0 = (Assignment)cUnorderedGroup_5.eContents().get(0);
- private final RuleCall cAttributesAttrInstanceConfigParserRuleCall_5_0_0 = (RuleCall)cAttributesAssignment_5_0.eContents().get(0);
- private final Assignment cPortsAssignment_5_1 = (Assignment)cUnorderedGroup_5.eContents().get(1);
- private final RuleCall cPortsPortInstanceConfigParserRuleCall_5_1_0 = (RuleCall)cPortsAssignment_5_1.eContents().get(0);
- private final Keyword cRightCurlyBracketKeyword_6 = (Keyword)cGroup.eContents().get(6);
-
- /// *
- // * Validation:
- // * duplicates config, attributes
- // * valid instance reference
- // * Proposal:
- // * attributes
- // * /
- //
- //ActorInstanceConfig:
- //
- // "ActorInstanceConfig" root=[room::SubSystemClass|FQN] "/" path=RefPath "{" (attributes+=AttrInstanceConfig* &
- //
- // ports+=PortInstanceConfig*) "}";
- public ParserRule getRule() { return rule; }
-
- //"ActorInstanceConfig" root=[room::SubSystemClass|FQN] "/" path=RefPath "{" (attributes+=AttrInstanceConfig* &
- //
- //ports+=PortInstanceConfig*) "}"
- public Group getGroup() { return cGroup; }
-
- //"ActorInstanceConfig"
- public Keyword getActorInstanceConfigKeyword_0() { return cActorInstanceConfigKeyword_0; }
-
- //root=[room::SubSystemClass|FQN]
- public Assignment getRootAssignment_1() { return cRootAssignment_1; }
-
- //[room::SubSystemClass|FQN]
- public CrossReference getRootSubSystemClassCrossReference_1_0() { return cRootSubSystemClassCrossReference_1_0; }
-
- //FQN
- public RuleCall getRootSubSystemClassFQNParserRuleCall_1_0_1() { return cRootSubSystemClassFQNParserRuleCall_1_0_1; }
-
- //"/"
- public Keyword getSolidusKeyword_2() { return cSolidusKeyword_2; }
-
- //path=RefPath
- public Assignment getPathAssignment_3() { return cPathAssignment_3; }
-
- //RefPath
- public RuleCall getPathRefPathParserRuleCall_3_0() { return cPathRefPathParserRuleCall_3_0; }
-
- //"{"
- public Keyword getLeftCurlyBracketKeyword_4() { return cLeftCurlyBracketKeyword_4; }
-
- //attributes+=AttrInstanceConfig* & ports+=PortInstanceConfig*
- public UnorderedGroup getUnorderedGroup_5() { return cUnorderedGroup_5; }
-
- //attributes+=AttrInstanceConfig*
- public Assignment getAttributesAssignment_5_0() { return cAttributesAssignment_5_0; }
-
- //AttrInstanceConfig
- public RuleCall getAttributesAttrInstanceConfigParserRuleCall_5_0_0() { return cAttributesAttrInstanceConfigParserRuleCall_5_0_0; }
-
- //ports+=PortInstanceConfig*
- public Assignment getPortsAssignment_5_1() { return cPortsAssignment_5_1; }
-
- //PortInstanceConfig
- public RuleCall getPortsPortInstanceConfigParserRuleCall_5_1_0() { return cPortsPortInstanceConfigParserRuleCall_5_1_0; }
-
- //"}"
- public Keyword getRightCurlyBracketKeyword_6() { return cRightCurlyBracketKeyword_6; }
- }
-
- public class ProtocolClassConfigElements extends AbstractParserRuleElementFinder {
- private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "ProtocolClassConfig");
- private final Group cGroup = (Group)rule.eContents().get(1);
- private final Keyword cProtocolClassConfigKeyword_0 = (Keyword)cGroup.eContents().get(0);
- private final Assignment cProtocolAssignment_1 = (Assignment)cGroup.eContents().get(1);
- private final CrossReference cProtocolProtocolClassCrossReference_1_0 = (CrossReference)cProtocolAssignment_1.eContents().get(0);
- private final RuleCall cProtocolProtocolClassFQNParserRuleCall_1_0_1 = (RuleCall)cProtocolProtocolClassCrossReference_1_0.eContents().get(1);
- private final Keyword cLeftCurlyBracketKeyword_2 = (Keyword)cGroup.eContents().get(2);
- private final UnorderedGroup cUnorderedGroup_3 = (UnorderedGroup)cGroup.eContents().get(3);
- private final Group cGroup_3_0 = (Group)cUnorderedGroup_3.eContents().get(0);
- private final Keyword cRegularKeyword_3_0_0 = (Keyword)cGroup_3_0.eContents().get(0);
- private final Assignment cRegularAssignment_3_0_1 = (Assignment)cGroup_3_0.eContents().get(1);
- private final RuleCall cRegularPortClassConfigParserRuleCall_3_0_1_0 = (RuleCall)cRegularAssignment_3_0_1.eContents().get(0);
- private final Group cGroup_3_1 = (Group)cUnorderedGroup_3.eContents().get(1);
- private final Keyword cConjugateKeyword_3_1_0 = (Keyword)cGroup_3_1.eContents().get(0);
- private final Assignment cConjugatedAssignment_3_1_1 = (Assignment)cGroup_3_1.eContents().get(1);
- private final RuleCall cConjugatedPortClassConfigParserRuleCall_3_1_1_0 = (RuleCall)cConjugatedAssignment_3_1_1.eContents().get(0);
- private final Keyword cRightCurlyBracketKeyword_4 = (Keyword)cGroup.eContents().get(4);
-
- //ProtocolClassConfig:
- //
- // "ProtocolClassConfig" protocol=[room::ProtocolClass|FQN] "{" (("regular" regular=PortClassConfig)? & ("conjugate"
- //
- // conjugated=PortClassConfig)?) "}";
- public ParserRule getRule() { return rule; }
-
- //"ProtocolClassConfig" protocol=[room::ProtocolClass|FQN] "{" (("regular" regular=PortClassConfig)? & ("conjugate"
- //
- //conjugated=PortClassConfig)?) "}"
- public Group getGroup() { return cGroup; }
-
- //"ProtocolClassConfig"
- public Keyword getProtocolClassConfigKeyword_0() { return cProtocolClassConfigKeyword_0; }
-
- //protocol=[room::ProtocolClass|FQN]
- public Assignment getProtocolAssignment_1() { return cProtocolAssignment_1; }
-
- //[room::ProtocolClass|FQN]
- public CrossReference getProtocolProtocolClassCrossReference_1_0() { return cProtocolProtocolClassCrossReference_1_0; }
-
- //FQN
- public RuleCall getProtocolProtocolClassFQNParserRuleCall_1_0_1() { return cProtocolProtocolClassFQNParserRuleCall_1_0_1; }
-
- //"{"
- public Keyword getLeftCurlyBracketKeyword_2() { return cLeftCurlyBracketKeyword_2; }
-
- //("regular" regular=PortClassConfig)? & ("conjugate" conjugated=PortClassConfig)?
- public UnorderedGroup getUnorderedGroup_3() { return cUnorderedGroup_3; }
-
- //("regular" regular=PortClassConfig)?
- public Group getGroup_3_0() { return cGroup_3_0; }
-
- //"regular"
- public Keyword getRegularKeyword_3_0_0() { return cRegularKeyword_3_0_0; }
-
- //regular=PortClassConfig
- public Assignment getRegularAssignment_3_0_1() { return cRegularAssignment_3_0_1; }
-
- //PortClassConfig
- public RuleCall getRegularPortClassConfigParserRuleCall_3_0_1_0() { return cRegularPortClassConfigParserRuleCall_3_0_1_0; }
-
- //("conjugate" conjugated=PortClassConfig)?
- public Group getGroup_3_1() { return cGroup_3_1; }
-
- //"conjugate"
- public Keyword getConjugateKeyword_3_1_0() { return cConjugateKeyword_3_1_0; }
-
- //conjugated=PortClassConfig
- public Assignment getConjugatedAssignment_3_1_1() { return cConjugatedAssignment_3_1_1; }
-
- //PortClassConfig
- public RuleCall getConjugatedPortClassConfigParserRuleCall_3_1_1_0() { return cConjugatedPortClassConfigParserRuleCall_3_1_1_0; }
-
- //"}"
- public Keyword getRightCurlyBracketKeyword_4() { return cRightCurlyBracketKeyword_4; }
- }
-
- public class PortClassConfigElements extends AbstractParserRuleElementFinder {
- private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "PortClassConfig");
- private final Group cGroup = (Group)rule.eContents().get(1);
- private final Action cPortClassConfigAction_0 = (Action)cGroup.eContents().get(0);
- private final Keyword cPortKeyword_1 = (Keyword)cGroup.eContents().get(1);
- private final Keyword cLeftCurlyBracketKeyword_2 = (Keyword)cGroup.eContents().get(2);
- private final Assignment cAttributesAssignment_3 = (Assignment)cGroup.eContents().get(3);
- private final RuleCall cAttributesAttrClassConfigParserRuleCall_3_0 = (RuleCall)cAttributesAssignment_3.eContents().get(0);
- private final Keyword cRightCurlyBracketKeyword_4 = (Keyword)cGroup.eContents().get(4);
-
- //PortClassConfig:
- //
- // {PortClassConfig} "Port" "{" attributes+=AttrClassConfig* "}";
- public ParserRule getRule() { return rule; }
-
- //{PortClassConfig} "Port" "{" attributes+=AttrClassConfig* "}"
- public Group getGroup() { return cGroup; }
-
- //{PortClassConfig}
- public Action getPortClassConfigAction_0() { return cPortClassConfigAction_0; }
-
- //"Port"
- public Keyword getPortKeyword_1() { return cPortKeyword_1; }
-
- //"{"
- public Keyword getLeftCurlyBracketKeyword_2() { return cLeftCurlyBracketKeyword_2; }
-
- //attributes+=AttrClassConfig*
- public Assignment getAttributesAssignment_3() { return cAttributesAssignment_3; }
-
- //AttrClassConfig
- public RuleCall getAttributesAttrClassConfigParserRuleCall_3_0() { return cAttributesAttrClassConfigParserRuleCall_3_0; }
-
- //"}"
- public Keyword getRightCurlyBracketKeyword_4() { return cRightCurlyBracketKeyword_4; }
- }
-
- public class PortInstanceConfigElements extends AbstractParserRuleElementFinder {
- private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "PortInstanceConfig");
- private final Group cGroup = (Group)rule.eContents().get(1);
- private final Keyword cInterfaceItemKeyword_0 = (Keyword)cGroup.eContents().get(0);
- private final Assignment cItemAssignment_1 = (Assignment)cGroup.eContents().get(1);
- private final CrossReference cItemInterfaceItemCrossReference_1_0 = (CrossReference)cItemAssignment_1.eContents().get(0);
- private final RuleCall cItemInterfaceItemIDTerminalRuleCall_1_0_1 = (RuleCall)cItemInterfaceItemCrossReference_1_0.eContents().get(1);
- private final Keyword cLeftCurlyBracketKeyword_2 = (Keyword)cGroup.eContents().get(2);
- private final Assignment cAttributesAssignment_3 = (Assignment)cGroup.eContents().get(3);
- private final RuleCall cAttributesAttrInstanceConfigParserRuleCall_3_0 = (RuleCall)cAttributesAssignment_3.eContents().get(0);
- private final Keyword cRightCurlyBracketKeyword_4 = (Keyword)cGroup.eContents().get(4);
-
- //PortInstanceConfig:
- //
- // "InterfaceItem" item=[room::InterfaceItem] "{" attributes+=AttrInstanceConfig* "}";
- public ParserRule getRule() { return rule; }
-
- //"InterfaceItem" item=[room::InterfaceItem] "{" attributes+=AttrInstanceConfig* "}"
- public Group getGroup() { return cGroup; }
-
- //"InterfaceItem"
- public Keyword getInterfaceItemKeyword_0() { return cInterfaceItemKeyword_0; }
-
- //item=[room::InterfaceItem]
- public Assignment getItemAssignment_1() { return cItemAssignment_1; }
-
- //[room::InterfaceItem]
- public CrossReference getItemInterfaceItemCrossReference_1_0() { return cItemInterfaceItemCrossReference_1_0; }
-
- //ID
- public RuleCall getItemInterfaceItemIDTerminalRuleCall_1_0_1() { return cItemInterfaceItemIDTerminalRuleCall_1_0_1; }
-
- //"{"
- public Keyword getLeftCurlyBracketKeyword_2() { return cLeftCurlyBracketKeyword_2; }
-
- //attributes+=AttrInstanceConfig*
- public Assignment getAttributesAssignment_3() { return cAttributesAssignment_3; }
-
- //AttrInstanceConfig
- public RuleCall getAttributesAttrInstanceConfigParserRuleCall_3_0() { return cAttributesAttrInstanceConfigParserRuleCall_3_0; }
-
- //"}"
- public Keyword getRightCurlyBracketKeyword_4() { return cRightCurlyBracketKeyword_4; }
- }
-
- public class AttrConfigElements extends AbstractParserRuleElementFinder {
- private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "AttrConfig");
- private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1);
- private final RuleCall cAttrClassConfigParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0);
- private final RuleCall cAttrInstanceConfigParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1);
-
- /// *
- // * Validation:
- // * correct value type
- // * Proposal:
- // * correct Literal
- // * / AttrConfig:
- //
- // AttrClassConfig | AttrInstanceConfig;
- public ParserRule getRule() { return rule; }
-
- //AttrClassConfig | AttrInstanceConfig
- public Alternatives getAlternatives() { return cAlternatives; }
-
- //AttrClassConfig
- public RuleCall getAttrClassConfigParserRuleCall_0() { return cAttrClassConfigParserRuleCall_0; }
-
- //AttrInstanceConfig
- public RuleCall getAttrInstanceConfigParserRuleCall_1() { return cAttrInstanceConfigParserRuleCall_1; }
- }
-
- public class AttrClassConfigElements extends AbstractParserRuleElementFinder {
- private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "AttrClassConfig");
- private final Group cGroup = (Group)rule.eContents().get(1);
- private final Keyword cAttrKeyword_0 = (Keyword)cGroup.eContents().get(0);
- private final Assignment cAttributeAssignment_1 = (Assignment)cGroup.eContents().get(1);
- private final CrossReference cAttributeAttributeCrossReference_1_0 = (CrossReference)cAttributeAssignment_1.eContents().get(0);
- private final RuleCall cAttributeAttributeIDTerminalRuleCall_1_0_1 = (RuleCall)cAttributeAttributeCrossReference_1_0.eContents().get(1);
- private final Group cGroup_2 = (Group)cGroup.eContents().get(2);
- private final Keyword cEqualsSignKeyword_2_0 = (Keyword)cGroup_2.eContents().get(0);
- private final Assignment cValueAssignment_2_1 = (Assignment)cGroup_2.eContents().get(1);
- private final RuleCall cValueLiteralArrayParserRuleCall_2_1_0 = (RuleCall)cValueAssignment_2_1.eContents().get(0);
- private final Group cGroup_3 = (Group)cGroup.eContents().get(3);
- private final Keyword cLeftCurlyBracketKeyword_3_0 = (Keyword)cGroup_3.eContents().get(0);
- private final Group cGroup_3_1 = (Group)cGroup_3.eContents().get(1);
- private final Group cGroup_3_1_0 = (Group)cGroup_3_1.eContents().get(0);
- private final Keyword cMinKeyword_3_1_0_0 = (Keyword)cGroup_3_1_0.eContents().get(0);
- private final Keyword cEqualsSignKeyword_3_1_0_1 = (Keyword)cGroup_3_1_0.eContents().get(1);
- private final Assignment cMinAssignment_3_1_0_2 = (Assignment)cGroup_3_1_0.eContents().get(2);
- private final RuleCall cMinNumberLiteralParserRuleCall_3_1_0_2_0 = (RuleCall)cMinAssignment_3_1_0_2.eContents().get(0);
- private final Group cGroup_3_1_1 = (Group)cGroup_3_1.eContents().get(1);
- private final Keyword cMaxKeyword_3_1_1_0 = (Keyword)cGroup_3_1_1.eContents().get(0);
- private final Keyword cEqualsSignKeyword_3_1_1_1 = (Keyword)cGroup_3_1_1.eContents().get(1);
- private final Assignment cMaxAssignment_3_1_1_2 = (Assignment)cGroup_3_1_1.eContents().get(2);
- private final RuleCall cMaxNumberLiteralParserRuleCall_3_1_1_2_0 = (RuleCall)cMaxAssignment_3_1_1_2.eContents().get(0);
- private final Assignment cAttributesAssignment_3_1_2 = (Assignment)cGroup_3_1.eContents().get(2);
- private final RuleCall cAttributesAttrClassConfigParserRuleCall_3_1_2_0 = (RuleCall)cAttributesAssignment_3_1_2.eContents().get(0);
- private final Keyword cRightCurlyBracketKeyword_3_2 = (Keyword)cGroup_3.eContents().get(2);
-
- /// *
- // * Validation:
- // * correct min, max type + available
- // * min <= value <= max
- // * if !value -> min <= attribute.defaultValue <= max
- // * character length
- // *
- // * /
- //
- //AttrClassConfig:
- //
- // "Attr" attribute=[room::Attribute] ("=" value=LiteralArray)? ("{" (("min" "=" min=NumberLiteral)? ("max" "="
- //
- // max=NumberLiteral)? attributes+=AttrClassConfig*) "}")?;
- public ParserRule getRule() { return rule; }
-
- //"Attr" attribute=[room::Attribute] ("=" value=LiteralArray)? ("{" (("min" "=" min=NumberLiteral)? ("max" "="
- //
- //max=NumberLiteral)? attributes+=AttrClassConfig*) "}")?
- public Group getGroup() { return cGroup; }
-
- //"Attr"
- public Keyword getAttrKeyword_0() { return cAttrKeyword_0; }
-
- //attribute=[room::Attribute]
- public Assignment getAttributeAssignment_1() { return cAttributeAssignment_1; }
-
- //[room::Attribute]
- public CrossReference getAttributeAttributeCrossReference_1_0() { return cAttributeAttributeCrossReference_1_0; }
-
- //ID
- public RuleCall getAttributeAttributeIDTerminalRuleCall_1_0_1() { return cAttributeAttributeIDTerminalRuleCall_1_0_1; }
-
- //("=" value=LiteralArray)?
- public Group getGroup_2() { return cGroup_2; }
-
- //"="
- public Keyword getEqualsSignKeyword_2_0() { return cEqualsSignKeyword_2_0; }
-
- //value=LiteralArray
- public Assignment getValueAssignment_2_1() { return cValueAssignment_2_1; }
-
- //LiteralArray
- public RuleCall getValueLiteralArrayParserRuleCall_2_1_0() { return cValueLiteralArrayParserRuleCall_2_1_0; }
-
- //("{" (("min" "=" min=NumberLiteral)? ("max" "=" max=NumberLiteral)? attributes+=AttrClassConfig*) "}")?
- public Group getGroup_3() { return cGroup_3; }
-
- //"{"
- public Keyword getLeftCurlyBracketKeyword_3_0() { return cLeftCurlyBracketKeyword_3_0; }
-
- //("min" "=" min=NumberLiteral)? ("max" "=" max=NumberLiteral)? attributes+=AttrClassConfig*
- public Group getGroup_3_1() { return cGroup_3_1; }
-
- //("min" "=" min=NumberLiteral)?
- public Group getGroup_3_1_0() { return cGroup_3_1_0; }
-
- //"min"
- public Keyword getMinKeyword_3_1_0_0() { return cMinKeyword_3_1_0_0; }
-
- //"="
- public Keyword getEqualsSignKeyword_3_1_0_1() { return cEqualsSignKeyword_3_1_0_1; }
-
- //min=NumberLiteral
- public Assignment getMinAssignment_3_1_0_2() { return cMinAssignment_3_1_0_2; }
-
- //NumberLiteral
- public RuleCall getMinNumberLiteralParserRuleCall_3_1_0_2_0() { return cMinNumberLiteralParserRuleCall_3_1_0_2_0; }
-
- //("max" "=" max=NumberLiteral)?
- public Group getGroup_3_1_1() { return cGroup_3_1_1; }
-
- //"max"
- public Keyword getMaxKeyword_3_1_1_0() { return cMaxKeyword_3_1_1_0; }
-
- //"="
- public Keyword getEqualsSignKeyword_3_1_1_1() { return cEqualsSignKeyword_3_1_1_1; }
-
- //max=NumberLiteral
- public Assignment getMaxAssignment_3_1_1_2() { return cMaxAssignment_3_1_1_2; }
-
- //NumberLiteral
- public RuleCall getMaxNumberLiteralParserRuleCall_3_1_1_2_0() { return cMaxNumberLiteralParserRuleCall_3_1_1_2_0; }
-
- //attributes+=AttrClassConfig*
- public Assignment getAttributesAssignment_3_1_2() { return cAttributesAssignment_3_1_2; }
-
- //AttrClassConfig
- public RuleCall getAttributesAttrClassConfigParserRuleCall_3_1_2_0() { return cAttributesAttrClassConfigParserRuleCall_3_1_2_0; }
-
- //"}"
- public Keyword getRightCurlyBracketKeyword_3_2() { return cRightCurlyBracketKeyword_3_2; }
- }
-
- public class AttrInstanceConfigElements extends AbstractParserRuleElementFinder {
- private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "AttrInstanceConfig");
- private final Group cGroup = (Group)rule.eContents().get(1);
- private final Keyword cAttrKeyword_0 = (Keyword)cGroup.eContents().get(0);
- private final Assignment cAttributeAssignment_1 = (Assignment)cGroup.eContents().get(1);
- private final CrossReference cAttributeAttributeCrossReference_1_0 = (CrossReference)cAttributeAssignment_1.eContents().get(0);
- private final RuleCall cAttributeAttributeIDTerminalRuleCall_1_0_1 = (RuleCall)cAttributeAttributeCrossReference_1_0.eContents().get(1);
- private final Group cGroup_2 = (Group)cGroup.eContents().get(2);
- private final Keyword cEqualsSignKeyword_2_0 = (Keyword)cGroup_2.eContents().get(0);
- private final Assignment cValueAssignment_2_1 = (Assignment)cGroup_2.eContents().get(1);
- private final RuleCall cValueLiteralArrayParserRuleCall_2_1_0 = (RuleCall)cValueAssignment_2_1.eContents().get(0);
- private final Group cGroup_3 = (Group)cGroup.eContents().get(3);
- private final Keyword cLeftCurlyBracketKeyword_3_0 = (Keyword)cGroup_3.eContents().get(0);
- private final Group cGroup_3_1 = (Group)cGroup_3.eContents().get(1);
- private final Group cGroup_3_1_0 = (Group)cGroup_3_1.eContents().get(0);
- private final Assignment cDynConfigAssignment_3_1_0_0 = (Assignment)cGroup_3_1_0.eContents().get(0);
- private final Keyword cDynConfigDynamicConfigurationKeyword_3_1_0_0_0 = (Keyword)cDynConfigAssignment_3_1_0_0.eContents().get(0);
- private final Alternatives cAlternatives_3_1_0_1 = (Alternatives)cGroup_3_1_0.eContents().get(1);
- private final Assignment cReadOnlyAssignment_3_1_0_1_0 = (Assignment)cAlternatives_3_1_0_1.eContents().get(0);
- private final Keyword cReadOnlyReadKeyword_3_1_0_1_0_0 = (Keyword)cReadOnlyAssignment_3_1_0_1_0.eContents().get(0);
- private final Keyword cWriteKeyword_3_1_0_1_1 = (Keyword)cAlternatives_3_1_0_1.eContents().get(1);
- private final Assignment cAttributesAssignment_3_1_1 = (Assignment)cGroup_3_1.eContents().get(1);
- private final RuleCall cAttributesAttrInstanceConfigParserRuleCall_3_1_1_0 = (RuleCall)cAttributesAssignment_3_1_1.eContents().get(0);
- private final Keyword cRightCurlyBracketKeyword_3_2 = (Keyword)cGroup_3.eContents().get(2);
-
- //AttrInstanceConfig:
- //
- // "Attr" attribute=[room::Attribute] ("=" value=LiteralArray)? ("{" ((dynConfig?="dynamic configuration"
- //
- // (readOnly?="read" | "write"))? attributes+=AttrInstanceConfig*) "}")?;
- public ParserRule getRule() { return rule; }
-
- //"Attr" attribute=[room::Attribute] ("=" value=LiteralArray)? ("{" ((dynConfig?="dynamic configuration" (readOnly?="read"
- //
- //| "write"))? attributes+=AttrInstanceConfig*) "}")?
- public Group getGroup() { return cGroup; }
-
- //"Attr"
- public Keyword getAttrKeyword_0() { return cAttrKeyword_0; }
-
- //attribute=[room::Attribute]
- public Assignment getAttributeAssignment_1() { return cAttributeAssignment_1; }
-
- //[room::Attribute]
- public CrossReference getAttributeAttributeCrossReference_1_0() { return cAttributeAttributeCrossReference_1_0; }
-
- //ID
- public RuleCall getAttributeAttributeIDTerminalRuleCall_1_0_1() { return cAttributeAttributeIDTerminalRuleCall_1_0_1; }
-
- //("=" value=LiteralArray)?
- public Group getGroup_2() { return cGroup_2; }
-
- //"="
- public Keyword getEqualsSignKeyword_2_0() { return cEqualsSignKeyword_2_0; }
-
- //value=LiteralArray
- public Assignment getValueAssignment_2_1() { return cValueAssignment_2_1; }
-
- //LiteralArray
- public RuleCall getValueLiteralArrayParserRuleCall_2_1_0() { return cValueLiteralArrayParserRuleCall_2_1_0; }
-
- //("{" ((dynConfig?="dynamic configuration" (readOnly?="read" | "write"))? attributes+=AttrInstanceConfig*) "}")?
- public Group getGroup_3() { return cGroup_3; }
-
- //"{"
- public Keyword getLeftCurlyBracketKeyword_3_0() { return cLeftCurlyBracketKeyword_3_0; }
-
- //(dynConfig?="dynamic configuration" (readOnly?="read" | "write"))? attributes+=AttrInstanceConfig*
- public Group getGroup_3_1() { return cGroup_3_1; }
-
- //(dynConfig?="dynamic configuration" (readOnly?="read" | "write"))?
- public Group getGroup_3_1_0() { return cGroup_3_1_0; }
-
- //dynConfig?="dynamic configuration"
- public Assignment getDynConfigAssignment_3_1_0_0() { return cDynConfigAssignment_3_1_0_0; }
-
- //"dynamic configuration"
- public Keyword getDynConfigDynamicConfigurationKeyword_3_1_0_0_0() { return cDynConfigDynamicConfigurationKeyword_3_1_0_0_0; }
-
- //readOnly?="read" | "write"
- public Alternatives getAlternatives_3_1_0_1() { return cAlternatives_3_1_0_1; }
-
- //readOnly?="read"
- public Assignment getReadOnlyAssignment_3_1_0_1_0() { return cReadOnlyAssignment_3_1_0_1_0; }
-
- //"read"
- public Keyword getReadOnlyReadKeyword_3_1_0_1_0_0() { return cReadOnlyReadKeyword_3_1_0_1_0_0; }
-
- //"write"
- public Keyword getWriteKeyword_3_1_0_1_1() { return cWriteKeyword_3_1_0_1_1; }
-
- //attributes+=AttrInstanceConfig*
- public Assignment getAttributesAssignment_3_1_1() { return cAttributesAssignment_3_1_1; }
-
- //AttrInstanceConfig
- public RuleCall getAttributesAttrInstanceConfigParserRuleCall_3_1_1_0() { return cAttributesAttrInstanceConfigParserRuleCall_3_1_1_0; }
-
- //"}"
- public Keyword getRightCurlyBracketKeyword_3_2() { return cRightCurlyBracketKeyword_3_2; }
- }
-
- public class RefPathElements extends AbstractParserRuleElementFinder {
- private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "RefPath");
- private final Group cGroup = (Group)rule.eContents().get(1);
- private final Assignment cRefsAssignment_0 = (Assignment)cGroup.eContents().get(0);
- private final RuleCall cRefsIDTerminalRuleCall_0_0 = (RuleCall)cRefsAssignment_0.eContents().get(0);
- private final Group cGroup_1 = (Group)cGroup.eContents().get(1);
- private final Keyword cSolidusKeyword_1_0 = (Keyword)cGroup_1.eContents().get(0);
- private final Assignment cRefsAssignment_1_1 = (Assignment)cGroup_1.eContents().get(1);
- private final RuleCall cRefsIDTerminalRuleCall_1_1_0 = (RuleCall)cRefsAssignment_1_1.eContents().get(0);
-
- /// *
- // * Proposal:
- // * for ActorInstanceConfig
- // * / RefPath:
- //
- // refs+=ID ("/" refs+=ID)*;
- public ParserRule getRule() { return rule; }
-
- //refs+=ID ("/" refs+=ID)*
- public Group getGroup() { return cGroup; }
-
- //refs+=ID
- public Assignment getRefsAssignment_0() { return cRefsAssignment_0; }
-
- //ID
- public RuleCall getRefsIDTerminalRuleCall_0_0() { return cRefsIDTerminalRuleCall_0_0; }
-
- //("/" refs+=ID)*
- public Group getGroup_1() { return cGroup_1; }
-
- //"/"
- public Keyword getSolidusKeyword_1_0() { return cSolidusKeyword_1_0; }
-
- //refs+=ID
- public Assignment getRefsAssignment_1_1() { return cRefsAssignment_1_1; }
-
- //ID
- public RuleCall getRefsIDTerminalRuleCall_1_1_0() { return cRefsIDTerminalRuleCall_1_1_0; }
- }
-
- public class ImportElements extends AbstractParserRuleElementFinder {
- private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Import");
- private final Group cGroup = (Group)rule.eContents().get(1);
- private final Keyword cImportKeyword_0 = (Keyword)cGroup.eContents().get(0);
- private final Alternatives cAlternatives_1 = (Alternatives)cGroup.eContents().get(1);
- private final Group cGroup_1_0 = (Group)cAlternatives_1.eContents().get(0);
- private final Assignment cImportedNamespaceAssignment_1_0_0 = (Assignment)cGroup_1_0.eContents().get(0);
- private final RuleCall cImportedNamespaceImportedFQNParserRuleCall_1_0_0_0 = (RuleCall)cImportedNamespaceAssignment_1_0_0.eContents().get(0);
- private final Keyword cFromKeyword_1_0_1 = (Keyword)cGroup_1_0.eContents().get(1);
- private final Keyword cModelKeyword_1_1 = (Keyword)cAlternatives_1.eContents().get(1);
- private final Assignment cImportURIAssignment_2 = (Assignment)cGroup.eContents().get(2);
- private final RuleCall cImportURISTRINGTerminalRuleCall_2_0 = (RuleCall)cImportURIAssignment_2.eContents().get(0);
-
- //// -------------------- from org.eclipse.etrice.core.Room.xtext ---------------
- // Import:
- //
- // "import" (importedNamespace=ImportedFQN "from" | "model") importURI=STRING;
- public ParserRule getRule() { return rule; }
-
- //"import" (importedNamespace=ImportedFQN "from" | "model") importURI=STRING
- public Group getGroup() { return cGroup; }
-
- //"import"
- public Keyword getImportKeyword_0() { return cImportKeyword_0; }
-
- //importedNamespace=ImportedFQN "from" | "model"
- public Alternatives getAlternatives_1() { return cAlternatives_1; }
-
- //importedNamespace=ImportedFQN "from"
- public Group getGroup_1_0() { return cGroup_1_0; }
-
- //importedNamespace=ImportedFQN
- public Assignment getImportedNamespaceAssignment_1_0_0() { return cImportedNamespaceAssignment_1_0_0; }
-
- //ImportedFQN
- public RuleCall getImportedNamespaceImportedFQNParserRuleCall_1_0_0_0() { return cImportedNamespaceImportedFQNParserRuleCall_1_0_0_0; }
-
- //"from"
- public Keyword getFromKeyword_1_0_1() { return cFromKeyword_1_0_1; }
-
- //"model"
- public Keyword getModelKeyword_1_1() { return cModelKeyword_1_1; }
-
- //importURI=STRING
- public Assignment getImportURIAssignment_2() { return cImportURIAssignment_2; }
-
- //STRING
- public RuleCall getImportURISTRINGTerminalRuleCall_2_0() { return cImportURISTRINGTerminalRuleCall_2_0; }
- }
-
- public class ImportedFQNElements extends AbstractParserRuleElementFinder {
- private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "ImportedFQN");
- private final Group cGroup = (Group)rule.eContents().get(1);
- private final RuleCall cFQNParserRuleCall_0 = (RuleCall)cGroup.eContents().get(0);
- private final Keyword cFullStopAsteriskKeyword_1 = (Keyword)cGroup.eContents().get(1);
-
- //ImportedFQN:
- //
- // FQN ".*"?;
- public ParserRule getRule() { return rule; }
-
- //FQN ".*"?
- public Group getGroup() { return cGroup; }
-
- //FQN
- public RuleCall getFQNParserRuleCall_0() { return cFQNParserRuleCall_0; }
-
- //".*"?
- public Keyword getFullStopAsteriskKeyword_1() { return cFullStopAsteriskKeyword_1; }
- }
-
- public class FQNElements extends AbstractParserRuleElementFinder {
- private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "FQN");
- private final Group cGroup = (Group)rule.eContents().get(1);
- private final RuleCall cIDTerminalRuleCall_0 = (RuleCall)cGroup.eContents().get(0);
- private final Group cGroup_1 = (Group)cGroup.eContents().get(1);
- private final Keyword cFullStopKeyword_1_0 = (Keyword)cGroup_1.eContents().get(0);
- private final RuleCall cIDTerminalRuleCall_1_1 = (RuleCall)cGroup_1.eContents().get(1);
-
- //FQN:
- //
- // ID ("." ID)*;
- public ParserRule getRule() { return rule; }
-
- //ID ("." ID)*
- public Group getGroup() { return cGroup; }
-
- //ID
- public RuleCall getIDTerminalRuleCall_0() { return cIDTerminalRuleCall_0; }
-
- //("." ID)*
- public Group getGroup_1() { return cGroup_1; }
-
- //"."
- public Keyword getFullStopKeyword_1_0() { return cFullStopKeyword_1_0; }
-
- //ID
- public RuleCall getIDTerminalRuleCall_1_1() { return cIDTerminalRuleCall_1_1; }
- }
-
- public class LiteralArrayElements extends AbstractParserRuleElementFinder {
- private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "LiteralArray");
- private final Group cGroup = (Group)rule.eContents().get(1);
- private final Assignment cLiteralsAssignment_0 = (Assignment)cGroup.eContents().get(0);
- private final RuleCall cLiteralsLiteralParserRuleCall_0_0 = (RuleCall)cLiteralsAssignment_0.eContents().get(0);
- private final Group cGroup_1 = (Group)cGroup.eContents().get(1);
- private final Keyword cCommaKeyword_1_0 = (Keyword)cGroup_1.eContents().get(0);
- private final Assignment cLiteralsAssignment_1_1 = (Assignment)cGroup_1.eContents().get(1);
- private final RuleCall cLiteralsLiteralParserRuleCall_1_1_0 = (RuleCall)cLiteralsAssignment_1_1.eContents().get(0);
-
- //// -----------------------------------------------------------------------------
- // //enum Unit:
- // // N|
- // // W|
- //
- //
- //// S = 's'|
- // // KG = 'kg'|
- // // M = 'm'|
- // // C|
- // // NM|
- // // RPM|
- // // V|
- // // A|
- // // HZ = 'Hz'|
- // // KW
- // //;
- //
- //
- //// LiteralArray = BooleanLiteral+|NumberLiteral+
- // // LiteralArray = StringLiteral
- // LiteralArray:
- //
- // literals+=Literal ("," literals+=Literal)*;
- public ParserRule getRule() { return rule; }
-
- //literals+=Literal ("," literals+=Literal)*
- public Group getGroup() { return cGroup; }
-
- //literals+=Literal
- public Assignment getLiteralsAssignment_0() { return cLiteralsAssignment_0; }
-
- //Literal
- public RuleCall getLiteralsLiteralParserRuleCall_0_0() { return cLiteralsLiteralParserRuleCall_0_0; }
-
- //("," literals+=Literal)*
- public Group getGroup_1() { return cGroup_1; }
-
- //","
- public Keyword getCommaKeyword_1_0() { return cCommaKeyword_1_0; }
-
- //literals+=Literal
- public Assignment getLiteralsAssignment_1_1() { return cLiteralsAssignment_1_1; }
-
- //Literal
- public RuleCall getLiteralsLiteralParserRuleCall_1_1_0() { return cLiteralsLiteralParserRuleCall_1_1_0; }
- }
-
- public class LiteralElements extends AbstractParserRuleElementFinder {
- private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Literal");
- private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1);
- private final RuleCall cBooleanLiteralParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0);
- private final RuleCall cNumberLiteralParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1);
- private final RuleCall cStringLiteralParserRuleCall_2 = (RuleCall)cAlternatives.eContents().get(2);
-
- //// Value Types for Attributes
- // Literal:
- //
- // BooleanLiteral | NumberLiteral | StringLiteral;
- public ParserRule getRule() { return rule; }
-
- //BooleanLiteral | NumberLiteral | StringLiteral
- public Alternatives getAlternatives() { return cAlternatives; }
-
- //BooleanLiteral
- public RuleCall getBooleanLiteralParserRuleCall_0() { return cBooleanLiteralParserRuleCall_0; }
-
- //NumberLiteral
- public RuleCall getNumberLiteralParserRuleCall_1() { return cNumberLiteralParserRuleCall_1; }
-
- //StringLiteral
- public RuleCall getStringLiteralParserRuleCall_2() { return cStringLiteralParserRuleCall_2; }
- }
-
- public class BooleanLiteralElements extends AbstractParserRuleElementFinder {
- private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "BooleanLiteral");
- private final Group cGroup = (Group)rule.eContents().get(1);
- private final Action cBooleanLiteralAction_0 = (Action)cGroup.eContents().get(0);
- private final Alternatives cAlternatives_1 = (Alternatives)cGroup.eContents().get(1);
- private final Keyword cFalseKeyword_1_0 = (Keyword)cAlternatives_1.eContents().get(0);
- private final Assignment cIsTrueAssignment_1_1 = (Assignment)cAlternatives_1.eContents().get(1);
- private final Keyword cIsTrueTrueKeyword_1_1_0 = (Keyword)cIsTrueAssignment_1_1.eContents().get(0);
-
- //BooleanLiteral:
- //
- // {BooleanLiteral} ("false" | isTrue?="true");
- public ParserRule getRule() { return rule; }
-
- //{BooleanLiteral} ("false" | isTrue?="true")
- public Group getGroup() { return cGroup; }
-
- //{BooleanLiteral}
- public Action getBooleanLiteralAction_0() { return cBooleanLiteralAction_0; }
-
- //"false" | isTrue?="true"
- public Alternatives getAlternatives_1() { return cAlternatives_1; }
-
- //"false"
- public Keyword getFalseKeyword_1_0() { return cFalseKeyword_1_0; }
-
- //isTrue?="true"
- public Assignment getIsTrueAssignment_1_1() { return cIsTrueAssignment_1_1; }
-
- //"true"
- public Keyword getIsTrueTrueKeyword_1_1_0() { return cIsTrueTrueKeyword_1_1_0; }
- }
-
- public class NumberLiteralElements extends AbstractParserRuleElementFinder {
- private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "NumberLiteral");
- private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1);
- private final RuleCall cIntLiteralParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0);
- private final RuleCall cRealLiteralParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1);
-
- //NumberLiteral:
- //
- // IntLiteral | RealLiteral;
- public ParserRule getRule() { return rule; }
-
- //IntLiteral | RealLiteral
- public Alternatives getAlternatives() { return cAlternatives; }
-
- //IntLiteral
- public RuleCall getIntLiteralParserRuleCall_0() { return cIntLiteralParserRuleCall_0; }
-
- //RealLiteral
- public RuleCall getRealLiteralParserRuleCall_1() { return cRealLiteralParserRuleCall_1; }
- }
-
- public class RealLiteralElements extends AbstractParserRuleElementFinder {
- private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "RealLiteral");
- private final Group cGroup = (Group)rule.eContents().get(1);
- private final Action cRealLiteralAction_0 = (Action)cGroup.eContents().get(0);
- private final Assignment cValueAssignment_1 = (Assignment)cGroup.eContents().get(1);
- private final RuleCall cValueRealParserRuleCall_1_0 = (RuleCall)cValueAssignment_1.eContents().get(0);
-
- //RealLiteral:
- //
- // {RealLiteral} value=Real;
- public ParserRule getRule() { return rule; }
-
- //{RealLiteral} value=Real
- public Group getGroup() { return cGroup; }
-
- //{RealLiteral}
- public Action getRealLiteralAction_0() { return cRealLiteralAction_0; }
-
- //value=Real
- public Assignment getValueAssignment_1() { return cValueAssignment_1; }
-
- //Real
- public RuleCall getValueRealParserRuleCall_1_0() { return cValueRealParserRuleCall_1_0; }
- }
-
- public class IntLiteralElements extends AbstractParserRuleElementFinder {
- private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "IntLiteral");
- private final Group cGroup = (Group)rule.eContents().get(1);
- private final Action cIntLiteralAction_0 = (Action)cGroup.eContents().get(0);
- private final Assignment cValueAssignment_1 = (Assignment)cGroup.eContents().get(1);
- private final RuleCall cValueIntegerParserRuleCall_1_0 = (RuleCall)cValueAssignment_1.eContents().get(0);
-
- //IntLiteral:
- //
- // {IntLiteral} value=Integer;
- public ParserRule getRule() { return rule; }
-
- //{IntLiteral} value=Integer
- public Group getGroup() { return cGroup; }
-
- //{IntLiteral}
- public Action getIntLiteralAction_0() { return cIntLiteralAction_0; }
-
- //value=Integer
- public Assignment getValueAssignment_1() { return cValueAssignment_1; }
-
- //Integer
- public RuleCall getValueIntegerParserRuleCall_1_0() { return cValueIntegerParserRuleCall_1_0; }
- }
-
- public class StringLiteralElements extends AbstractParserRuleElementFinder {
- private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "StringLiteral");
- private final Group cGroup = (Group)rule.eContents().get(1);
- private final Action cStringLiteralAction_0 = (Action)cGroup.eContents().get(0);
- private final Assignment cValueAssignment_1 = (Assignment)cGroup.eContents().get(1);
- private final RuleCall cValueSTRINGTerminalRuleCall_1_0 = (RuleCall)cValueAssignment_1.eContents().get(0);
-
- //StringLiteral:
- //
- // {StringLiteral} value=STRING;
- public ParserRule getRule() { return rule; }
-
- //{StringLiteral} value=STRING
- public Group getGroup() { return cGroup; }
-
- //{StringLiteral}
- public Action getStringLiteralAction_0() { return cStringLiteralAction_0; }
-
- //value=STRING
- public Assignment getValueAssignment_1() { return cValueAssignment_1; }
-
- //STRING
- public RuleCall getValueSTRINGTerminalRuleCall_1_0() { return cValueSTRINGTerminalRuleCall_1_0; }
- }
-
- public class IntegerElements extends AbstractParserRuleElementFinder {
- private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Integer");
- private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1);
- private final RuleCall cSignedIntegerParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0);
- private final RuleCall cHexadecimalParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1);
-
- //Integer returns ecore::ELong:
- //
- // SignedInteger | Hexadecimal;
- public ParserRule getRule() { return rule; }
-
- //SignedInteger | Hexadecimal
- public Alternatives getAlternatives() { return cAlternatives; }
-
- //SignedInteger
- public RuleCall getSignedIntegerParserRuleCall_0() { return cSignedIntegerParserRuleCall_0; }
-
- //Hexadecimal
- public RuleCall getHexadecimalParserRuleCall_1() { return cHexadecimalParserRuleCall_1; }
- }
-
- public class SignedIntegerElements extends AbstractParserRuleElementFinder {
- private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "SignedInteger");
- private final Group cGroup = (Group)rule.eContents().get(1);
- private final Alternatives cAlternatives_0 = (Alternatives)cGroup.eContents().get(0);
- private final Keyword cPlusSignKeyword_0_0 = (Keyword)cAlternatives_0.eContents().get(0);
- private final Keyword cHyphenMinusKeyword_0_1 = (Keyword)cAlternatives_0.eContents().get(1);
- private final RuleCall cINTTerminalRuleCall_1 = (RuleCall)cGroup.eContents().get(1);
-
- //SignedInteger hidden():
- //
- // ("+" | "-")? INT;
- public ParserRule getRule() { return rule; }
-
- //("+" | "-")? INT
- public Group getGroup() { return cGroup; }
-
- //("+" | "-")?
- public Alternatives getAlternatives_0() { return cAlternatives_0; }
-
- //"+"
- public Keyword getPlusSignKeyword_0_0() { return cPlusSignKeyword_0_0; }
-
- //"-"
- public Keyword getHyphenMinusKeyword_0_1() { return cHyphenMinusKeyword_0_1; }
-
- //INT
- public RuleCall getINTTerminalRuleCall_1() { return cINTTerminalRuleCall_1; }
- }
-
- public class HexadecimalElements extends AbstractParserRuleElementFinder {
- private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Hexadecimal");
- private final RuleCall cHEXTerminalRuleCall = (RuleCall)rule.eContents().get(1);
-
- //Hexadecimal hidden():
- //
- // HEX;
- public ParserRule getRule() { return rule; }
-
- //HEX
- public RuleCall getHEXTerminalRuleCall() { return cHEXTerminalRuleCall; }
- }
-
- public class RealElements extends AbstractParserRuleElementFinder {
- private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Real");
- private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1);
- private final RuleCall cDecimalParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0);
- private final RuleCall cDotDecimalParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1);
- private final RuleCall cDecimalDotParserRuleCall_2 = (RuleCall)cAlternatives.eContents().get(2);
- private final RuleCall cDecimalExpParserRuleCall_3 = (RuleCall)cAlternatives.eContents().get(3);
-
- //Real returns ecore::EDouble:
- //
- // Decimal | DotDecimal | DecimalDot | DecimalExp;
- public ParserRule getRule() { return rule; }
-
- //Decimal | DotDecimal | DecimalDot | DecimalExp
- public Alternatives getAlternatives() { return cAlternatives; }
-
- //Decimal
- public RuleCall getDecimalParserRuleCall_0() { return cDecimalParserRuleCall_0; }
-
- //DotDecimal
- public RuleCall getDotDecimalParserRuleCall_1() { return cDotDecimalParserRuleCall_1; }
-
- //DecimalDot
- public RuleCall getDecimalDotParserRuleCall_2() { return cDecimalDotParserRuleCall_2; }
-
- //DecimalExp
- public RuleCall getDecimalExpParserRuleCall_3() { return cDecimalExpParserRuleCall_3; }
- }
-
- public class DecimalElements extends AbstractParserRuleElementFinder {
- private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Decimal");
- private final Group cGroup = (Group)rule.eContents().get(1);
- private final Alternatives cAlternatives_0 = (Alternatives)cGroup.eContents().get(0);
- private final Keyword cPlusSignKeyword_0_0 = (Keyword)cAlternatives_0.eContents().get(0);
- private final Keyword cHyphenMinusKeyword_0_1 = (Keyword)cAlternatives_0.eContents().get(1);
- private final RuleCall cINTTerminalRuleCall_1 = (RuleCall)cGroup.eContents().get(1);
- private final Keyword cFullStopKeyword_2 = (Keyword)cGroup.eContents().get(2);
- private final RuleCall cINTTerminalRuleCall_3 = (RuleCall)cGroup.eContents().get(3);
-
- //Decimal hidden():
- //
- // ("+" | "-")? INT "." INT;
- public ParserRule getRule() { return rule; }
-
- //("+" | "-")? INT "." INT
- public Group getGroup() { return cGroup; }
-
- //("+" | "-")?
- public Alternatives getAlternatives_0() { return cAlternatives_0; }
-
- //"+"
- public Keyword getPlusSignKeyword_0_0() { return cPlusSignKeyword_0_0; }
-
- //"-"
- public Keyword getHyphenMinusKeyword_0_1() { return cHyphenMinusKeyword_0_1; }
-
- //INT
- public RuleCall getINTTerminalRuleCall_1() { return cINTTerminalRuleCall_1; }
-
- //"."
- public Keyword getFullStopKeyword_2() { return cFullStopKeyword_2; }
-
- //INT
- public RuleCall getINTTerminalRuleCall_3() { return cINTTerminalRuleCall_3; }
- }
-
- public class DotDecimalElements extends AbstractParserRuleElementFinder {
- private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "DotDecimal");
- private final Group cGroup = (Group)rule.eContents().get(1);
- private final Alternatives cAlternatives_0 = (Alternatives)cGroup.eContents().get(0);
- private final Keyword cPlusSignKeyword_0_0 = (Keyword)cAlternatives_0.eContents().get(0);
- private final Keyword cHyphenMinusKeyword_0_1 = (Keyword)cAlternatives_0.eContents().get(1);
- private final Keyword cFullStopKeyword_1 = (Keyword)cGroup.eContents().get(1);
- private final RuleCall cINTTerminalRuleCall_2 = (RuleCall)cGroup.eContents().get(2);
-
- //DotDecimal hidden():
- //
- // ("+" | "-")? "." INT;
- public ParserRule getRule() { return rule; }
-
- //("+" | "-")? "." INT
- public Group getGroup() { return cGroup; }
-
- //("+" | "-")?
- public Alternatives getAlternatives_0() { return cAlternatives_0; }
-
- //"+"
- public Keyword getPlusSignKeyword_0_0() { return cPlusSignKeyword_0_0; }
-
- //"-"
- public Keyword getHyphenMinusKeyword_0_1() { return cHyphenMinusKeyword_0_1; }
-
- //"."
- public Keyword getFullStopKeyword_1() { return cFullStopKeyword_1; }
-
- //INT
- public RuleCall getINTTerminalRuleCall_2() { return cINTTerminalRuleCall_2; }
- }
-
- public class DecimalDotElements extends AbstractParserRuleElementFinder {
- private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "DecimalDot");
- private final Group cGroup = (Group)rule.eContents().get(1);
- private final Alternatives cAlternatives_0 = (Alternatives)cGroup.eContents().get(0);
- private final Keyword cPlusSignKeyword_0_0 = (Keyword)cAlternatives_0.eContents().get(0);
- private final Keyword cHyphenMinusKeyword_0_1 = (Keyword)cAlternatives_0.eContents().get(1);
- private final RuleCall cINTTerminalRuleCall_1 = (RuleCall)cGroup.eContents().get(1);
- private final Keyword cFullStopKeyword_2 = (Keyword)cGroup.eContents().get(2);
-
- //DecimalDot hidden():
- //
- // ("+" | "-")? INT ".";
- public ParserRule getRule() { return rule; }
-
- //("+" | "-")? INT "."
- public Group getGroup() { return cGroup; }
-
- //("+" | "-")?
- public Alternatives getAlternatives_0() { return cAlternatives_0; }
-
- //"+"
- public Keyword getPlusSignKeyword_0_0() { return cPlusSignKeyword_0_0; }
-
- //"-"
- public Keyword getHyphenMinusKeyword_0_1() { return cHyphenMinusKeyword_0_1; }
-
- //INT
- public RuleCall getINTTerminalRuleCall_1() { return cINTTerminalRuleCall_1; }
-
- //"."
- public Keyword getFullStopKeyword_2() { return cFullStopKeyword_2; }
- }
-
- public class DecimalExpElements extends AbstractParserRuleElementFinder {
- private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "DecimalExp");
- private final Group cGroup = (Group)rule.eContents().get(1);
- private final Alternatives cAlternatives_0 = (Alternatives)cGroup.eContents().get(0);
- private final Keyword cPlusSignKeyword_0_0 = (Keyword)cAlternatives_0.eContents().get(0);
- private final Keyword cHyphenMinusKeyword_0_1 = (Keyword)cAlternatives_0.eContents().get(1);
- private final RuleCall cINTTerminalRuleCall_1 = (RuleCall)cGroup.eContents().get(1);
- private final Keyword cFullStopKeyword_2 = (Keyword)cGroup.eContents().get(2);
- private final RuleCall cINTTerminalRuleCall_3 = (RuleCall)cGroup.eContents().get(3);
- private final RuleCall cEXPTerminalRuleCall_4 = (RuleCall)cGroup.eContents().get(4);
-
- //DecimalExp hidden():
- //
- // ("+" | "-")? INT "." INT EXP;
- public ParserRule getRule() { return rule; }
-
- //("+" | "-")? INT "." INT EXP
- public Group getGroup() { return cGroup; }
-
- //("+" | "-")?
- public Alternatives getAlternatives_0() { return cAlternatives_0; }
-
- //"+"
- public Keyword getPlusSignKeyword_0_0() { return cPlusSignKeyword_0_0; }
-
- //"-"
- public Keyword getHyphenMinusKeyword_0_1() { return cHyphenMinusKeyword_0_1; }
-
- //INT
- public RuleCall getINTTerminalRuleCall_1() { return cINTTerminalRuleCall_1; }
-
- //"."
- public Keyword getFullStopKeyword_2() { return cFullStopKeyword_2; }
-
- //INT
- public RuleCall getINTTerminalRuleCall_3() { return cINTTerminalRuleCall_3; }
-
- //EXP
- public RuleCall getEXPTerminalRuleCall_4() { return cEXPTerminalRuleCall_4; }
- }
-
-
- private ConfigModelElements pConfigModel;
- private ConfigElementElements pConfigElement;
- private SubSystemConfigElements pSubSystemConfig;
- private DynamicConfigElements pDynamicConfig;
- private ActorClassConfigElements pActorClassConfig;
- private ActorInstanceConfigElements pActorInstanceConfig;
- private ProtocolClassConfigElements pProtocolClassConfig;
- private PortClassConfigElements pPortClassConfig;
- private PortInstanceConfigElements pPortInstanceConfig;
- private AttrConfigElements pAttrConfig;
- private AttrClassConfigElements pAttrClassConfig;
- private AttrInstanceConfigElements pAttrInstanceConfig;
- private RefPathElements pRefPath;
- private ImportElements pImport;
- private ImportedFQNElements pImportedFQN;
- private FQNElements pFQN;
- private LiteralArrayElements pLiteralArray;
- private LiteralElements pLiteral;
- private BooleanLiteralElements pBooleanLiteral;
- private NumberLiteralElements pNumberLiteral;
- private RealLiteralElements pRealLiteral;
- private IntLiteralElements pIntLiteral;
- private StringLiteralElements pStringLiteral;
- private IntegerElements pInteger;
- private SignedIntegerElements pSignedInteger;
- private HexadecimalElements pHexadecimal;
- private RealElements pReal;
- private DecimalElements pDecimal;
- private DotDecimalElements pDotDecimal;
- private DecimalDotElements pDecimalDot;
- private DecimalExpElements pDecimalExp;
- private TerminalRule tEXP;
- private TerminalRule tHEX;
-
- private final Grammar grammar;
-
- private TerminalsGrammarAccess gaTerminals;
-
- @Inject
- public ConfigGrammarAccess(GrammarProvider grammarProvider,
- TerminalsGrammarAccess gaTerminals) {
- this.grammar = internalFindGrammar(grammarProvider);
- this.gaTerminals = gaTerminals;
- }
-
- protected Grammar internalFindGrammar(GrammarProvider grammarProvider) {
- Grammar grammar = grammarProvider.getGrammar(this);
- while (grammar != null) {
- if ("org.eclipse.etrice.core.Config".equals(grammar.getName())) {
- return grammar;
- }
- List<Grammar> grammars = grammar.getUsedGrammars();
- if (!grammars.isEmpty()) {
- grammar = grammars.iterator().next();
- } else {
- return null;
- }
- }
- return grammar;
- }
-
-
- public Grammar getGrammar() {
- return grammar;
- }
-
-
- public TerminalsGrammarAccess getTerminalsGrammarAccess() {
- return gaTerminals;
- }
-
-
- //ConfigModel:
- //
- // imports+=Import* configElements+=ConfigElement*;
- public ConfigModelElements getConfigModelAccess() {
- return (pConfigModel != null) ? pConfigModel : (pConfigModel = new ConfigModelElements());
- }
-
- public ParserRule getConfigModelRule() {
- return getConfigModelAccess().getRule();
- }
-
- //ConfigElement:
- //
- // SubSystemConfig | ActorClassConfig | ActorInstanceConfig | ProtocolClassConfig;
- public ConfigElementElements getConfigElementAccess() {
- return (pConfigElement != null) ? pConfigElement : (pConfigElement = new ConfigElementElements());
- }
-
- public ParserRule getConfigElementRule() {
- return getConfigElementAccess().getRule();
- }
-
- //SubSystemConfig:
- //
- // "SubSystemConfig" subSystem=[room::SubSystemClass] "{" dynConfig=DynamicConfig "}";
- public SubSystemConfigElements getSubSystemConfigAccess() {
- return (pSubSystemConfig != null) ? pSubSystemConfig : (pSubSystemConfig = new SubSystemConfigElements());
- }
-
- public ParserRule getSubSystemConfigRule() {
- return getSubSystemConfigAccess().getRule();
- }
-
- //DynamicConfig:
- //
- // "dynamic configuration" "{" (("file path" filePath=STRING | ("user import" userCode1=STRING) ("user constructor"
- //
- // userCode2=STRING)) & ("polling timer [ms]" polling=INT)?) "}";
- public DynamicConfigElements getDynamicConfigAccess() {
- return (pDynamicConfig != null) ? pDynamicConfig : (pDynamicConfig = new DynamicConfigElements());
- }
-
- public ParserRule getDynamicConfigRule() {
- return getDynamicConfigAccess().getRule();
- }
-
- /// *
- // * Validation:
- // * duplicates config, attributes
- // * / ActorClassConfig:
- //
- // "ActorClassConfig" actor=[room::ActorClass|FQN] "{" attributes+=AttrClassConfig* "}";
- public ActorClassConfigElements getActorClassConfigAccess() {
- return (pActorClassConfig != null) ? pActorClassConfig : (pActorClassConfig = new ActorClassConfigElements());
- }
-
- public ParserRule getActorClassConfigRule() {
- return getActorClassConfigAccess().getRule();
- }
-
- /// *
- // * Validation:
- // * duplicates config, attributes
- // * valid instance reference
- // * Proposal:
- // * attributes
- // * /
- //
- //ActorInstanceConfig:
- //
- // "ActorInstanceConfig" root=[room::SubSystemClass|FQN] "/" path=RefPath "{" (attributes+=AttrInstanceConfig* &
- //
- // ports+=PortInstanceConfig*) "}";
- public ActorInstanceConfigElements getActorInstanceConfigAccess() {
- return (pActorInstanceConfig != null) ? pActorInstanceConfig : (pActorInstanceConfig = new ActorInstanceConfigElements());
- }
-
- public ParserRule getActorInstanceConfigRule() {
- return getActorInstanceConfigAccess().getRule();
- }
-
- //ProtocolClassConfig:
- //
- // "ProtocolClassConfig" protocol=[room::ProtocolClass|FQN] "{" (("regular" regular=PortClassConfig)? & ("conjugate"
- //
- // conjugated=PortClassConfig)?) "}";
- public ProtocolClassConfigElements getProtocolClassConfigAccess() {
- return (pProtocolClassConfig != null) ? pProtocolClassConfig : (pProtocolClassConfig = new ProtocolClassConfigElements());
- }
-
- public ParserRule getProtocolClassConfigRule() {
- return getProtocolClassConfigAccess().getRule();
- }
-
- //PortClassConfig:
- //
- // {PortClassConfig} "Port" "{" attributes+=AttrClassConfig* "}";
- public PortClassConfigElements getPortClassConfigAccess() {
- return (pPortClassConfig != null) ? pPortClassConfig : (pPortClassConfig = new PortClassConfigElements());
- }
-
- public ParserRule getPortClassConfigRule() {
- return getPortClassConfigAccess().getRule();
- }
-
- //PortInstanceConfig:
- //
- // "InterfaceItem" item=[room::InterfaceItem] "{" attributes+=AttrInstanceConfig* "}";
- public PortInstanceConfigElements getPortInstanceConfigAccess() {
- return (pPortInstanceConfig != null) ? pPortInstanceConfig : (pPortInstanceConfig = new PortInstanceConfigElements());
- }
-
- public ParserRule getPortInstanceConfigRule() {
- return getPortInstanceConfigAccess().getRule();
- }
-
- /// *
- // * Validation:
- // * correct value type
- // * Proposal:
- // * correct Literal
- // * / AttrConfig:
- //
- // AttrClassConfig | AttrInstanceConfig;
- public AttrConfigElements getAttrConfigAccess() {
- return (pAttrConfig != null) ? pAttrConfig : (pAttrConfig = new AttrConfigElements());
- }
-
- public ParserRule getAttrConfigRule() {
- return getAttrConfigAccess().getRule();
- }
-
- /// *
- // * Validation:
- // * correct min, max type + available
- // * min <= value <= max
- // * if !value -> min <= attribute.defaultValue <= max
- // * character length
- // *
- // * /
- //
- //AttrClassConfig:
- //
- // "Attr" attribute=[room::Attribute] ("=" value=LiteralArray)? ("{" (("min" "=" min=NumberLiteral)? ("max" "="
- //
- // max=NumberLiteral)? attributes+=AttrClassConfig*) "}")?;
- public AttrClassConfigElements getAttrClassConfigAccess() {
- return (pAttrClassConfig != null) ? pAttrClassConfig : (pAttrClassConfig = new AttrClassConfigElements());
- }
-
- public ParserRule getAttrClassConfigRule() {
- return getAttrClassConfigAccess().getRule();
- }
-
- //AttrInstanceConfig:
- //
- // "Attr" attribute=[room::Attribute] ("=" value=LiteralArray)? ("{" ((dynConfig?="dynamic configuration"
- //
- // (readOnly?="read" | "write"))? attributes+=AttrInstanceConfig*) "}")?;
- public AttrInstanceConfigElements getAttrInstanceConfigAccess() {
- return (pAttrInstanceConfig != null) ? pAttrInstanceConfig : (pAttrInstanceConfig = new AttrInstanceConfigElements());
- }
-
- public ParserRule getAttrInstanceConfigRule() {
- return getAttrInstanceConfigAccess().getRule();
- }
-
- /// *
- // * Proposal:
- // * for ActorInstanceConfig
- // * / RefPath:
- //
- // refs+=ID ("/" refs+=ID)*;
- public RefPathElements getRefPathAccess() {
- return (pRefPath != null) ? pRefPath : (pRefPath = new RefPathElements());
- }
-
- public ParserRule getRefPathRule() {
- return getRefPathAccess().getRule();
- }
-
- //// -------------------- from org.eclipse.etrice.core.Room.xtext ---------------
- // Import:
- //
- // "import" (importedNamespace=ImportedFQN "from" | "model") importURI=STRING;
- public ImportElements getImportAccess() {
- return (pImport != null) ? pImport : (pImport = new ImportElements());
- }
-
- public ParserRule getImportRule() {
- return getImportAccess().getRule();
- }
-
- //ImportedFQN:
- //
- // FQN ".*"?;
- public ImportedFQNElements getImportedFQNAccess() {
- return (pImportedFQN != null) ? pImportedFQN : (pImportedFQN = new ImportedFQNElements());
- }
-
- public ParserRule getImportedFQNRule() {
- return getImportedFQNAccess().getRule();
- }
-
- //FQN:
- //
- // ID ("." ID)*;
- public FQNElements getFQNAccess() {
- return (pFQN != null) ? pFQN : (pFQN = new FQNElements());
- }
-
- public ParserRule getFQNRule() {
- return getFQNAccess().getRule();
- }
-
- //// -----------------------------------------------------------------------------
- // //enum Unit:
- // // N|
- // // W|
- //
- //
- //// S = 's'|
- // // KG = 'kg'|
- // // M = 'm'|
- // // C|
- // // NM|
- // // RPM|
- // // V|
- // // A|
- // // HZ = 'Hz'|
- // // KW
- // //;
- //
- //
- //// LiteralArray = BooleanLiteral+|NumberLiteral+
- // // LiteralArray = StringLiteral
- // LiteralArray:
- //
- // literals+=Literal ("," literals+=Literal)*;
- public LiteralArrayElements getLiteralArrayAccess() {
- return (pLiteralArray != null) ? pLiteralArray : (pLiteralArray = new LiteralArrayElements());
- }
-
- public ParserRule getLiteralArrayRule() {
- return getLiteralArrayAccess().getRule();
- }
-
- //// Value Types for Attributes
- // Literal:
- //
- // BooleanLiteral | NumberLiteral | StringLiteral;
- public LiteralElements getLiteralAccess() {
- return (pLiteral != null) ? pLiteral : (pLiteral = new LiteralElements());
- }
-
- public ParserRule getLiteralRule() {
- return getLiteralAccess().getRule();
- }
-
- //BooleanLiteral:
- //
- // {BooleanLiteral} ("false" | isTrue?="true");
- public BooleanLiteralElements getBooleanLiteralAccess() {
- return (pBooleanLiteral != null) ? pBooleanLiteral : (pBooleanLiteral = new BooleanLiteralElements());
- }
-
- public ParserRule getBooleanLiteralRule() {
- return getBooleanLiteralAccess().getRule();
- }
-
- //NumberLiteral:
- //
- // IntLiteral | RealLiteral;
- public NumberLiteralElements getNumberLiteralAccess() {
- return (pNumberLiteral != null) ? pNumberLiteral : (pNumberLiteral = new NumberLiteralElements());
- }
-
- public ParserRule getNumberLiteralRule() {
- return getNumberLiteralAccess().getRule();
- }
-
- //RealLiteral:
- //
- // {RealLiteral} value=Real;
- public RealLiteralElements getRealLiteralAccess() {
- return (pRealLiteral != null) ? pRealLiteral : (pRealLiteral = new RealLiteralElements());
- }
-
- public ParserRule getRealLiteralRule() {
- return getRealLiteralAccess().getRule();
- }
-
- //IntLiteral:
- //
- // {IntLiteral} value=Integer;
- public IntLiteralElements getIntLiteralAccess() {
- return (pIntLiteral != null) ? pIntLiteral : (pIntLiteral = new IntLiteralElements());
- }
-
- public ParserRule getIntLiteralRule() {
- return getIntLiteralAccess().getRule();
- }
-
- //StringLiteral:
- //
- // {StringLiteral} value=STRING;
- public StringLiteralElements getStringLiteralAccess() {
- return (pStringLiteral != null) ? pStringLiteral : (pStringLiteral = new StringLiteralElements());
- }
-
- public ParserRule getStringLiteralRule() {
- return getStringLiteralAccess().getRule();
- }
-
- //Integer returns ecore::ELong:
- //
- // SignedInteger | Hexadecimal;
- public IntegerElements getIntegerAccess() {
- return (pInteger != null) ? pInteger : (pInteger = new IntegerElements());
- }
-
- public ParserRule getIntegerRule() {
- return getIntegerAccess().getRule();
- }
-
- //SignedInteger hidden():
- //
- // ("+" | "-")? INT;
- public SignedIntegerElements getSignedIntegerAccess() {
- return (pSignedInteger != null) ? pSignedInteger : (pSignedInteger = new SignedIntegerElements());
- }
-
- public ParserRule getSignedIntegerRule() {
- return getSignedIntegerAccess().getRule();
- }
-
- //Hexadecimal hidden():
- //
- // HEX;
- public HexadecimalElements getHexadecimalAccess() {
- return (pHexadecimal != null) ? pHexadecimal : (pHexadecimal = new HexadecimalElements());
- }
-
- public ParserRule getHexadecimalRule() {
- return getHexadecimalAccess().getRule();
- }
-
- //Real returns ecore::EDouble:
- //
- // Decimal | DotDecimal | DecimalDot | DecimalExp;
- public RealElements getRealAccess() {
- return (pReal != null) ? pReal : (pReal = new RealElements());
- }
-
- public ParserRule getRealRule() {
- return getRealAccess().getRule();
- }
-
- //Decimal hidden():
- //
- // ("+" | "-")? INT "." INT;
- public DecimalElements getDecimalAccess() {
- return (pDecimal != null) ? pDecimal : (pDecimal = new DecimalElements());
- }
-
- public ParserRule getDecimalRule() {
- return getDecimalAccess().getRule();
- }
-
- //DotDecimal hidden():
- //
- // ("+" | "-")? "." INT;
- public DotDecimalElements getDotDecimalAccess() {
- return (pDotDecimal != null) ? pDotDecimal : (pDotDecimal = new DotDecimalElements());
- }
-
- public ParserRule getDotDecimalRule() {
- return getDotDecimalAccess().getRule();
- }
-
- //DecimalDot hidden():
- //
- // ("+" | "-")? INT ".";
- public DecimalDotElements getDecimalDotAccess() {
- return (pDecimalDot != null) ? pDecimalDot : (pDecimalDot = new DecimalDotElements());
- }
-
- public ParserRule getDecimalDotRule() {
- return getDecimalDotAccess().getRule();
- }
-
- //DecimalExp hidden():
- //
- // ("+" | "-")? INT "." INT EXP;
- public DecimalExpElements getDecimalExpAccess() {
- return (pDecimalExp != null) ? pDecimalExp : (pDecimalExp = new DecimalExpElements());
- }
-
- public ParserRule getDecimalExpRule() {
- return getDecimalExpAccess().getRule();
- }
-
- //terminal EXP:
- //
- // ("e" | "E") ("+" | "-")? "0".."9"+;
- public TerminalRule getEXPRule() {
- return (tEXP != null) ? tEXP : (tEXP = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "EXP"));
- }
-
- //terminal HEX:
- //
- // ("0x" | "0X") ("0".."9" | "a".."f" | "A".."F")+;
- public TerminalRule getHEXRule() {
- return (tHEX != null) ? tHEX : (tHEX = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "HEX"));
- }
-
- //terminal ID:
- //
- // "^"? ("a".."z" | "A".."Z" | "_") ("a".."z" | "A".."Z" | "_" | "0".."9")*;
- public TerminalRule getIDRule() {
- return gaTerminals.getIDRule();
- }
-
- //terminal INT returns ecore::EInt:
- //
- // "0".."9"+;
- public TerminalRule getINTRule() {
- return gaTerminals.getINTRule();
- }
-
- //terminal STRING:
- //
- // "\"" ("\\" ("b" | "t" | "n" | "f" | "r" | "u" | "\"" | "\'" | "\\") | !("\\" | "\""))* "\"" | "\'" ("\\" ("b" | "t" |
- //
- // "n" | "f" | "r" | "u" | "\"" | "\'" | "\\") | !("\\" | "\'"))* "\'";
- public TerminalRule getSTRINGRule() {
- return gaTerminals.getSTRINGRule();
- }
-
- //terminal ML_COMMENT:
- //
- // "/ *"->"* /";
- public TerminalRule getML_COMMENTRule() {
- return gaTerminals.getML_COMMENTRule();
- }
-
- //terminal SL_COMMENT:
- //
- // "//" !("\n" | "\r")* ("\r"? "\n")?;
- public TerminalRule getSL_COMMENTRule() {
- return gaTerminals.getSL_COMMENTRule();
- }
-
- //terminal WS:
- //
- // (" " | "\t" | "\r" | "\n")+;
- public TerminalRule getWSRule() {
- return gaTerminals.getWSRule();
- }
-
- //terminal ANY_OTHER:
- //
- // .;
- public TerminalRule getANY_OTHERRule() {
- return gaTerminals.getANY_OTHERRule();
- }
-}
+/*
+* generated by Xtext
+*/
+
+package org.eclipse.etrice.core.services;
+
+import com.google.inject.Singleton;
+import com.google.inject.Inject;
+
+import java.util.List;
+
+import org.eclipse.xtext.*;
+import org.eclipse.xtext.service.GrammarProvider;
+import org.eclipse.xtext.service.AbstractElementFinder.*;
+
+import org.eclipse.xtext.common.services.TerminalsGrammarAccess;
+
+@Singleton
+public class ConfigGrammarAccess extends AbstractGrammarElementFinder {
+
+
+ public class ConfigModelElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "ConfigModel");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Assignment cImportsAssignment_0 = (Assignment)cGroup.eContents().get(0);
+ private final RuleCall cImportsImportParserRuleCall_0_0 = (RuleCall)cImportsAssignment_0.eContents().get(0);
+ private final Assignment cConfigElementsAssignment_1 = (Assignment)cGroup.eContents().get(1);
+ private final RuleCall cConfigElementsConfigElementParserRuleCall_1_0 = (RuleCall)cConfigElementsAssignment_1.eContents().get(0);
+
+ //ConfigModel:
+ //
+ // imports+=Import* configElements+=ConfigElement*;
+ public ParserRule getRule() { return rule; }
+
+ //imports+=Import* configElements+=ConfigElement*
+ public Group getGroup() { return cGroup; }
+
+ //imports+=Import*
+ public Assignment getImportsAssignment_0() { return cImportsAssignment_0; }
+
+ //Import
+ public RuleCall getImportsImportParserRuleCall_0_0() { return cImportsImportParserRuleCall_0_0; }
+
+ //configElements+=ConfigElement*
+ public Assignment getConfigElementsAssignment_1() { return cConfigElementsAssignment_1; }
+
+ //ConfigElement
+ public RuleCall getConfigElementsConfigElementParserRuleCall_1_0() { return cConfigElementsConfigElementParserRuleCall_1_0; }
+ }
+
+ public class ConfigElementElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "ConfigElement");
+ private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1);
+ private final RuleCall cSubSystemConfigParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0);
+ private final RuleCall cActorClassConfigParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1);
+ private final RuleCall cActorInstanceConfigParserRuleCall_2 = (RuleCall)cAlternatives.eContents().get(2);
+ private final RuleCall cProtocolClassConfigParserRuleCall_3 = (RuleCall)cAlternatives.eContents().get(3);
+
+ //ConfigElement:
+ //
+ // SubSystemConfig | ActorClassConfig | ActorInstanceConfig | ProtocolClassConfig;
+ public ParserRule getRule() { return rule; }
+
+ //SubSystemConfig | ActorClassConfig | ActorInstanceConfig | ProtocolClassConfig
+ public Alternatives getAlternatives() { return cAlternatives; }
+
+ //SubSystemConfig
+ public RuleCall getSubSystemConfigParserRuleCall_0() { return cSubSystemConfigParserRuleCall_0; }
+
+ //ActorClassConfig
+ public RuleCall getActorClassConfigParserRuleCall_1() { return cActorClassConfigParserRuleCall_1; }
+
+ //ActorInstanceConfig
+ public RuleCall getActorInstanceConfigParserRuleCall_2() { return cActorInstanceConfigParserRuleCall_2; }
+
+ //ProtocolClassConfig
+ public RuleCall getProtocolClassConfigParserRuleCall_3() { return cProtocolClassConfigParserRuleCall_3; }
+ }
+
+ public class SubSystemConfigElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "SubSystemConfig");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Keyword cSubSystemConfigKeyword_0 = (Keyword)cGroup.eContents().get(0);
+ private final Assignment cSubSystemAssignment_1 = (Assignment)cGroup.eContents().get(1);
+ private final CrossReference cSubSystemSubSystemClassCrossReference_1_0 = (CrossReference)cSubSystemAssignment_1.eContents().get(0);
+ private final RuleCall cSubSystemSubSystemClassIDTerminalRuleCall_1_0_1 = (RuleCall)cSubSystemSubSystemClassCrossReference_1_0.eContents().get(1);
+ private final Keyword cLeftCurlyBracketKeyword_2 = (Keyword)cGroup.eContents().get(2);
+ private final Assignment cDynConfigAssignment_3 = (Assignment)cGroup.eContents().get(3);
+ private final RuleCall cDynConfigDynamicConfigParserRuleCall_3_0 = (RuleCall)cDynConfigAssignment_3.eContents().get(0);
+ private final Keyword cRightCurlyBracketKeyword_4 = (Keyword)cGroup.eContents().get(4);
+
+ //SubSystemConfig:
+ //
+ // "SubSystemConfig" subSystem=[room::SubSystemClass] "{" dynConfig=DynamicConfig "}";
+ public ParserRule getRule() { return rule; }
+
+ //"SubSystemConfig" subSystem=[room::SubSystemClass] "{" dynConfig=DynamicConfig "}"
+ public Group getGroup() { return cGroup; }
+
+ //"SubSystemConfig"
+ public Keyword getSubSystemConfigKeyword_0() { return cSubSystemConfigKeyword_0; }
+
+ //subSystem=[room::SubSystemClass]
+ public Assignment getSubSystemAssignment_1() { return cSubSystemAssignment_1; }
+
+ //[room::SubSystemClass]
+ public CrossReference getSubSystemSubSystemClassCrossReference_1_0() { return cSubSystemSubSystemClassCrossReference_1_0; }
+
+ //ID
+ public RuleCall getSubSystemSubSystemClassIDTerminalRuleCall_1_0_1() { return cSubSystemSubSystemClassIDTerminalRuleCall_1_0_1; }
+
+ //"{"
+ public Keyword getLeftCurlyBracketKeyword_2() { return cLeftCurlyBracketKeyword_2; }
+
+ //dynConfig=DynamicConfig
+ public Assignment getDynConfigAssignment_3() { return cDynConfigAssignment_3; }
+
+ //DynamicConfig
+ public RuleCall getDynConfigDynamicConfigParserRuleCall_3_0() { return cDynConfigDynamicConfigParserRuleCall_3_0; }
+
+ //"}"
+ public Keyword getRightCurlyBracketKeyword_4() { return cRightCurlyBracketKeyword_4; }
+ }
+
+ public class DynamicConfigElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "DynamicConfig");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Keyword cDynamicConfigurationKeyword_0 = (Keyword)cGroup.eContents().get(0);
+ private final Keyword cLeftCurlyBracketKeyword_1 = (Keyword)cGroup.eContents().get(1);
+ private final UnorderedGroup cUnorderedGroup_2 = (UnorderedGroup)cGroup.eContents().get(2);
+ private final Alternatives cAlternatives_2_0 = (Alternatives)cUnorderedGroup_2.eContents().get(0);
+ private final Group cGroup_2_0_0 = (Group)cAlternatives_2_0.eContents().get(0);
+ private final Keyword cFilePathKeyword_2_0_0_0 = (Keyword)cGroup_2_0_0.eContents().get(0);
+ private final Assignment cFilePathAssignment_2_0_0_1 = (Assignment)cGroup_2_0_0.eContents().get(1);
+ private final RuleCall cFilePathSTRINGTerminalRuleCall_2_0_0_1_0 = (RuleCall)cFilePathAssignment_2_0_0_1.eContents().get(0);
+ private final Group cGroup_2_0_1 = (Group)cAlternatives_2_0.eContents().get(1);
+ private final Group cGroup_2_0_1_0 = (Group)cGroup_2_0_1.eContents().get(0);
+ private final Keyword cUserImportKeyword_2_0_1_0_0 = (Keyword)cGroup_2_0_1_0.eContents().get(0);
+ private final Assignment cUserCode1Assignment_2_0_1_0_1 = (Assignment)cGroup_2_0_1_0.eContents().get(1);
+ private final RuleCall cUserCode1STRINGTerminalRuleCall_2_0_1_0_1_0 = (RuleCall)cUserCode1Assignment_2_0_1_0_1.eContents().get(0);
+ private final Group cGroup_2_0_1_1 = (Group)cGroup_2_0_1.eContents().get(1);
+ private final Keyword cUserConstructorKeyword_2_0_1_1_0 = (Keyword)cGroup_2_0_1_1.eContents().get(0);
+ private final Assignment cUserCode2Assignment_2_0_1_1_1 = (Assignment)cGroup_2_0_1_1.eContents().get(1);
+ private final RuleCall cUserCode2STRINGTerminalRuleCall_2_0_1_1_1_0 = (RuleCall)cUserCode2Assignment_2_0_1_1_1.eContents().get(0);
+ private final Group cGroup_2_1 = (Group)cUnorderedGroup_2.eContents().get(1);
+ private final Keyword cPollingTimerMsKeyword_2_1_0 = (Keyword)cGroup_2_1.eContents().get(0);
+ private final Assignment cPollingAssignment_2_1_1 = (Assignment)cGroup_2_1.eContents().get(1);
+ private final RuleCall cPollingINTTerminalRuleCall_2_1_1_0 = (RuleCall)cPollingAssignment_2_1_1.eContents().get(0);
+ private final Keyword cRightCurlyBracketKeyword_3 = (Keyword)cGroup.eContents().get(3);
+
+ //DynamicConfig:
+ //
+ // "dynamic configuration" "{" (("file path" filePath=STRING | ("user import" userCode1=STRING) ("user constructor"
+ //
+ // userCode2=STRING)) & ("polling timer [ms]" polling=INT)?) "}";
+ public ParserRule getRule() { return rule; }
+
+ //"dynamic configuration" "{" (("file path" filePath=STRING | ("user import" userCode1=STRING) ("user constructor"
+ //
+ //userCode2=STRING)) & ("polling timer [ms]" polling=INT)?) "}"
+ public Group getGroup() { return cGroup; }
+
+ //"dynamic configuration"
+ public Keyword getDynamicConfigurationKeyword_0() { return cDynamicConfigurationKeyword_0; }
+
+ //"{"
+ public Keyword getLeftCurlyBracketKeyword_1() { return cLeftCurlyBracketKeyword_1; }
+
+ //("file path" filePath=STRING | ("user import" userCode1=STRING) ("user constructor" userCode2=STRING)) &
+ //
+ //("polling timer [ms]" polling=INT)?
+ public UnorderedGroup getUnorderedGroup_2() { return cUnorderedGroup_2; }
+
+ //"file path" filePath=STRING | ("user import" userCode1=STRING) ("user constructor" userCode2=STRING)
+ public Alternatives getAlternatives_2_0() { return cAlternatives_2_0; }
+
+ //"file path" filePath=STRING
+ public Group getGroup_2_0_0() { return cGroup_2_0_0; }
+
+ //"file path"
+ public Keyword getFilePathKeyword_2_0_0_0() { return cFilePathKeyword_2_0_0_0; }
+
+ //filePath=STRING
+ public Assignment getFilePathAssignment_2_0_0_1() { return cFilePathAssignment_2_0_0_1; }
+
+ //STRING
+ public RuleCall getFilePathSTRINGTerminalRuleCall_2_0_0_1_0() { return cFilePathSTRINGTerminalRuleCall_2_0_0_1_0; }
+
+ //("user import" userCode1=STRING) ("user constructor" userCode2=STRING)
+ public Group getGroup_2_0_1() { return cGroup_2_0_1; }
+
+ //"user import" userCode1=STRING
+ public Group getGroup_2_0_1_0() { return cGroup_2_0_1_0; }
+
+ //"user import"
+ public Keyword getUserImportKeyword_2_0_1_0_0() { return cUserImportKeyword_2_0_1_0_0; }
+
+ //userCode1=STRING
+ public Assignment getUserCode1Assignment_2_0_1_0_1() { return cUserCode1Assignment_2_0_1_0_1; }
+
+ //STRING
+ public RuleCall getUserCode1STRINGTerminalRuleCall_2_0_1_0_1_0() { return cUserCode1STRINGTerminalRuleCall_2_0_1_0_1_0; }
+
+ //"user constructor" userCode2=STRING
+ public Group getGroup_2_0_1_1() { return cGroup_2_0_1_1; }
+
+ //"user constructor"
+ public Keyword getUserConstructorKeyword_2_0_1_1_0() { return cUserConstructorKeyword_2_0_1_1_0; }
+
+ //userCode2=STRING
+ public Assignment getUserCode2Assignment_2_0_1_1_1() { return cUserCode2Assignment_2_0_1_1_1; }
+
+ //STRING
+ public RuleCall getUserCode2STRINGTerminalRuleCall_2_0_1_1_1_0() { return cUserCode2STRINGTerminalRuleCall_2_0_1_1_1_0; }
+
+ //("polling timer [ms]" polling=INT)?
+ public Group getGroup_2_1() { return cGroup_2_1; }
+
+ //"polling timer [ms]"
+ public Keyword getPollingTimerMsKeyword_2_1_0() { return cPollingTimerMsKeyword_2_1_0; }
+
+ //polling=INT
+ public Assignment getPollingAssignment_2_1_1() { return cPollingAssignment_2_1_1; }
+
+ //INT
+ public RuleCall getPollingINTTerminalRuleCall_2_1_1_0() { return cPollingINTTerminalRuleCall_2_1_1_0; }
+
+ //"}"
+ public Keyword getRightCurlyBracketKeyword_3() { return cRightCurlyBracketKeyword_3; }
+ }
+
+ public class ActorClassConfigElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "ActorClassConfig");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Keyword cActorClassConfigKeyword_0 = (Keyword)cGroup.eContents().get(0);
+ private final Assignment cActorAssignment_1 = (Assignment)cGroup.eContents().get(1);
+ private final CrossReference cActorActorClassCrossReference_1_0 = (CrossReference)cActorAssignment_1.eContents().get(0);
+ private final RuleCall cActorActorClassFQNParserRuleCall_1_0_1 = (RuleCall)cActorActorClassCrossReference_1_0.eContents().get(1);
+ private final Keyword cLeftCurlyBracketKeyword_2 = (Keyword)cGroup.eContents().get(2);
+ private final Assignment cAttributesAssignment_3 = (Assignment)cGroup.eContents().get(3);
+ private final RuleCall cAttributesAttrClassConfigParserRuleCall_3_0 = (RuleCall)cAttributesAssignment_3.eContents().get(0);
+ private final Keyword cRightCurlyBracketKeyword_4 = (Keyword)cGroup.eContents().get(4);
+
+ /// *
+ // * Validation:
+ // * duplicates config, attributes
+ // * / ActorClassConfig:
+ //
+ // "ActorClassConfig" actor=[room::ActorClass|FQN] "{" attributes+=AttrClassConfig* "}";
+ public ParserRule getRule() { return rule; }
+
+ //"ActorClassConfig" actor=[room::ActorClass|FQN] "{" attributes+=AttrClassConfig* "}"
+ public Group getGroup() { return cGroup; }
+
+ //"ActorClassConfig"
+ public Keyword getActorClassConfigKeyword_0() { return cActorClassConfigKeyword_0; }
+
+ //actor=[room::ActorClass|FQN]
+ public Assignment getActorAssignment_1() { return cActorAssignment_1; }
+
+ //[room::ActorClass|FQN]
+ public CrossReference getActorActorClassCrossReference_1_0() { return cActorActorClassCrossReference_1_0; }
+
+ //FQN
+ public RuleCall getActorActorClassFQNParserRuleCall_1_0_1() { return cActorActorClassFQNParserRuleCall_1_0_1; }
+
+ //"{"
+ public Keyword getLeftCurlyBracketKeyword_2() { return cLeftCurlyBracketKeyword_2; }
+
+ //attributes+=AttrClassConfig*
+ public Assignment getAttributesAssignment_3() { return cAttributesAssignment_3; }
+
+ //AttrClassConfig
+ public RuleCall getAttributesAttrClassConfigParserRuleCall_3_0() { return cAttributesAttrClassConfigParserRuleCall_3_0; }
+
+ //"}"
+ public Keyword getRightCurlyBracketKeyword_4() { return cRightCurlyBracketKeyword_4; }
+ }
+
+ public class ActorInstanceConfigElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "ActorInstanceConfig");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Keyword cActorInstanceConfigKeyword_0 = (Keyword)cGroup.eContents().get(0);
+ private final Assignment cRootAssignment_1 = (Assignment)cGroup.eContents().get(1);
+ private final CrossReference cRootSubSystemClassCrossReference_1_0 = (CrossReference)cRootAssignment_1.eContents().get(0);
+ private final RuleCall cRootSubSystemClassFQNParserRuleCall_1_0_1 = (RuleCall)cRootSubSystemClassCrossReference_1_0.eContents().get(1);
+ private final Keyword cSolidusKeyword_2 = (Keyword)cGroup.eContents().get(2);
+ private final Assignment cPathAssignment_3 = (Assignment)cGroup.eContents().get(3);
+ private final RuleCall cPathRefPathParserRuleCall_3_0 = (RuleCall)cPathAssignment_3.eContents().get(0);
+ private final Keyword cLeftCurlyBracketKeyword_4 = (Keyword)cGroup.eContents().get(4);
+ private final UnorderedGroup cUnorderedGroup_5 = (UnorderedGroup)cGroup.eContents().get(5);
+ private final Assignment cAttributesAssignment_5_0 = (Assignment)cUnorderedGroup_5.eContents().get(0);
+ private final RuleCall cAttributesAttrInstanceConfigParserRuleCall_5_0_0 = (RuleCall)cAttributesAssignment_5_0.eContents().get(0);
+ private final Assignment cPortsAssignment_5_1 = (Assignment)cUnorderedGroup_5.eContents().get(1);
+ private final RuleCall cPortsPortInstanceConfigParserRuleCall_5_1_0 = (RuleCall)cPortsAssignment_5_1.eContents().get(0);
+ private final Keyword cRightCurlyBracketKeyword_6 = (Keyword)cGroup.eContents().get(6);
+
+ /// *
+ // * Validation:
+ // * duplicates config, attributes
+ // * valid instance reference
+ // * Proposal:
+ // * attributes
+ // * /
+ //
+ //ActorInstanceConfig:
+ //
+ // "ActorInstanceConfig" root=[room::SubSystemClass|FQN] "/" path=RefPath "{" (attributes+=AttrInstanceConfig* &
+ //
+ // ports+=PortInstanceConfig*) "}";
+ public ParserRule getRule() { return rule; }
+
+ //"ActorInstanceConfig" root=[room::SubSystemClass|FQN] "/" path=RefPath "{" (attributes+=AttrInstanceConfig* &
+ //
+ //ports+=PortInstanceConfig*) "}"
+ public Group getGroup() { return cGroup; }
+
+ //"ActorInstanceConfig"
+ public Keyword getActorInstanceConfigKeyword_0() { return cActorInstanceConfigKeyword_0; }
+
+ //root=[room::SubSystemClass|FQN]
+ public Assignment getRootAssignment_1() { return cRootAssignment_1; }
+
+ //[room::SubSystemClass|FQN]
+ public CrossReference getRootSubSystemClassCrossReference_1_0() { return cRootSubSystemClassCrossReference_1_0; }
+
+ //FQN
+ public RuleCall getRootSubSystemClassFQNParserRuleCall_1_0_1() { return cRootSubSystemClassFQNParserRuleCall_1_0_1; }
+
+ //"/"
+ public Keyword getSolidusKeyword_2() { return cSolidusKeyword_2; }
+
+ //path=RefPath
+ public Assignment getPathAssignment_3() { return cPathAssignment_3; }
+
+ //RefPath
+ public RuleCall getPathRefPathParserRuleCall_3_0() { return cPathRefPathParserRuleCall_3_0; }
+
+ //"{"
+ public Keyword getLeftCurlyBracketKeyword_4() { return cLeftCurlyBracketKeyword_4; }
+
+ //attributes+=AttrInstanceConfig* & ports+=PortInstanceConfig*
+ public UnorderedGroup getUnorderedGroup_5() { return cUnorderedGroup_5; }
+
+ //attributes+=AttrInstanceConfig*
+ public Assignment getAttributesAssignment_5_0() { return cAttributesAssignment_5_0; }
+
+ //AttrInstanceConfig
+ public RuleCall getAttributesAttrInstanceConfigParserRuleCall_5_0_0() { return cAttributesAttrInstanceConfigParserRuleCall_5_0_0; }
+
+ //ports+=PortInstanceConfig*
+ public Assignment getPortsAssignment_5_1() { return cPortsAssignment_5_1; }
+
+ //PortInstanceConfig
+ public RuleCall getPortsPortInstanceConfigParserRuleCall_5_1_0() { return cPortsPortInstanceConfigParserRuleCall_5_1_0; }
+
+ //"}"
+ public Keyword getRightCurlyBracketKeyword_6() { return cRightCurlyBracketKeyword_6; }
+ }
+
+ public class ProtocolClassConfigElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "ProtocolClassConfig");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Keyword cProtocolClassConfigKeyword_0 = (Keyword)cGroup.eContents().get(0);
+ private final Assignment cProtocolAssignment_1 = (Assignment)cGroup.eContents().get(1);
+ private final CrossReference cProtocolProtocolClassCrossReference_1_0 = (CrossReference)cProtocolAssignment_1.eContents().get(0);
+ private final RuleCall cProtocolProtocolClassFQNParserRuleCall_1_0_1 = (RuleCall)cProtocolProtocolClassCrossReference_1_0.eContents().get(1);
+ private final Keyword cLeftCurlyBracketKeyword_2 = (Keyword)cGroup.eContents().get(2);
+ private final UnorderedGroup cUnorderedGroup_3 = (UnorderedGroup)cGroup.eContents().get(3);
+ private final Group cGroup_3_0 = (Group)cUnorderedGroup_3.eContents().get(0);
+ private final Keyword cRegularKeyword_3_0_0 = (Keyword)cGroup_3_0.eContents().get(0);
+ private final Assignment cRegularAssignment_3_0_1 = (Assignment)cGroup_3_0.eContents().get(1);
+ private final RuleCall cRegularPortClassConfigParserRuleCall_3_0_1_0 = (RuleCall)cRegularAssignment_3_0_1.eContents().get(0);
+ private final Group cGroup_3_1 = (Group)cUnorderedGroup_3.eContents().get(1);
+ private final Keyword cConjugateKeyword_3_1_0 = (Keyword)cGroup_3_1.eContents().get(0);
+ private final Assignment cConjugatedAssignment_3_1_1 = (Assignment)cGroup_3_1.eContents().get(1);
+ private final RuleCall cConjugatedPortClassConfigParserRuleCall_3_1_1_0 = (RuleCall)cConjugatedAssignment_3_1_1.eContents().get(0);
+ private final Keyword cRightCurlyBracketKeyword_4 = (Keyword)cGroup.eContents().get(4);
+
+ //ProtocolClassConfig:
+ //
+ // "ProtocolClassConfig" protocol=[room::ProtocolClass|FQN] "{" (("regular" regular=PortClassConfig)? & ("conjugate"
+ //
+ // conjugated=PortClassConfig)?) "}";
+ public ParserRule getRule() { return rule; }
+
+ //"ProtocolClassConfig" protocol=[room::ProtocolClass|FQN] "{" (("regular" regular=PortClassConfig)? & ("conjugate"
+ //
+ //conjugated=PortClassConfig)?) "}"
+ public Group getGroup() { return cGroup; }
+
+ //"ProtocolClassConfig"
+ public Keyword getProtocolClassConfigKeyword_0() { return cProtocolClassConfigKeyword_0; }
+
+ //protocol=[room::ProtocolClass|FQN]
+ public Assignment getProtocolAssignment_1() { return cProtocolAssignment_1; }
+
+ //[room::ProtocolClass|FQN]
+ public CrossReference getProtocolProtocolClassCrossReference_1_0() { return cProtocolProtocolClassCrossReference_1_0; }
+
+ //FQN
+ public RuleCall getProtocolProtocolClassFQNParserRuleCall_1_0_1() { return cProtocolProtocolClassFQNParserRuleCall_1_0_1; }
+
+ //"{"
+ public Keyword getLeftCurlyBracketKeyword_2() { return cLeftCurlyBracketKeyword_2; }
+
+ //("regular" regular=PortClassConfig)? & ("conjugate" conjugated=PortClassConfig)?
+ public UnorderedGroup getUnorderedGroup_3() { return cUnorderedGroup_3; }
+
+ //("regular" regular=PortClassConfig)?
+ public Group getGroup_3_0() { return cGroup_3_0; }
+
+ //"regular"
+ public Keyword getRegularKeyword_3_0_0() { return cRegularKeyword_3_0_0; }
+
+ //regular=PortClassConfig
+ public Assignment getRegularAssignment_3_0_1() { return cRegularAssignment_3_0_1; }
+
+ //PortClassConfig
+ public RuleCall getRegularPortClassConfigParserRuleCall_3_0_1_0() { return cRegularPortClassConfigParserRuleCall_3_0_1_0; }
+
+ //("conjugate" conjugated=PortClassConfig)?
+ public Group getGroup_3_1() { return cGroup_3_1; }
+
+ //"conjugate"
+ public Keyword getConjugateKeyword_3_1_0() { return cConjugateKeyword_3_1_0; }
+
+ //conjugated=PortClassConfig
+ public Assignment getConjugatedAssignment_3_1_1() { return cConjugatedAssignment_3_1_1; }
+
+ //PortClassConfig
+ public RuleCall getConjugatedPortClassConfigParserRuleCall_3_1_1_0() { return cConjugatedPortClassConfigParserRuleCall_3_1_1_0; }
+
+ //"}"
+ public Keyword getRightCurlyBracketKeyword_4() { return cRightCurlyBracketKeyword_4; }
+ }
+
+ public class PortClassConfigElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "PortClassConfig");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Action cPortClassConfigAction_0 = (Action)cGroup.eContents().get(0);
+ private final Keyword cPortKeyword_1 = (Keyword)cGroup.eContents().get(1);
+ private final Keyword cLeftCurlyBracketKeyword_2 = (Keyword)cGroup.eContents().get(2);
+ private final Assignment cAttributesAssignment_3 = (Assignment)cGroup.eContents().get(3);
+ private final RuleCall cAttributesAttrClassConfigParserRuleCall_3_0 = (RuleCall)cAttributesAssignment_3.eContents().get(0);
+ private final Keyword cRightCurlyBracketKeyword_4 = (Keyword)cGroup.eContents().get(4);
+
+ //PortClassConfig:
+ //
+ // {PortClassConfig} "Port" "{" attributes+=AttrClassConfig* "}";
+ public ParserRule getRule() { return rule; }
+
+ //{PortClassConfig} "Port" "{" attributes+=AttrClassConfig* "}"
+ public Group getGroup() { return cGroup; }
+
+ //{PortClassConfig}
+ public Action getPortClassConfigAction_0() { return cPortClassConfigAction_0; }
+
+ //"Port"
+ public Keyword getPortKeyword_1() { return cPortKeyword_1; }
+
+ //"{"
+ public Keyword getLeftCurlyBracketKeyword_2() { return cLeftCurlyBracketKeyword_2; }
+
+ //attributes+=AttrClassConfig*
+ public Assignment getAttributesAssignment_3() { return cAttributesAssignment_3; }
+
+ //AttrClassConfig
+ public RuleCall getAttributesAttrClassConfigParserRuleCall_3_0() { return cAttributesAttrClassConfigParserRuleCall_3_0; }
+
+ //"}"
+ public Keyword getRightCurlyBracketKeyword_4() { return cRightCurlyBracketKeyword_4; }
+ }
+
+ public class PortInstanceConfigElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "PortInstanceConfig");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Keyword cInterfaceItemKeyword_0 = (Keyword)cGroup.eContents().get(0);
+ private final Assignment cItemAssignment_1 = (Assignment)cGroup.eContents().get(1);
+ private final CrossReference cItemInterfaceItemCrossReference_1_0 = (CrossReference)cItemAssignment_1.eContents().get(0);
+ private final RuleCall cItemInterfaceItemIDTerminalRuleCall_1_0_1 = (RuleCall)cItemInterfaceItemCrossReference_1_0.eContents().get(1);
+ private final Keyword cLeftCurlyBracketKeyword_2 = (Keyword)cGroup.eContents().get(2);
+ private final Assignment cAttributesAssignment_3 = (Assignment)cGroup.eContents().get(3);
+ private final RuleCall cAttributesAttrInstanceConfigParserRuleCall_3_0 = (RuleCall)cAttributesAssignment_3.eContents().get(0);
+ private final Keyword cRightCurlyBracketKeyword_4 = (Keyword)cGroup.eContents().get(4);
+
+ //PortInstanceConfig:
+ //
+ // "InterfaceItem" item=[room::InterfaceItem] "{" attributes+=AttrInstanceConfig* "}";
+ public ParserRule getRule() { return rule; }
+
+ //"InterfaceItem" item=[room::InterfaceItem] "{" attributes+=AttrInstanceConfig* "}"
+ public Group getGroup() { return cGroup; }
+
+ //"InterfaceItem"
+ public Keyword getInterfaceItemKeyword_0() { return cInterfaceItemKeyword_0; }
+
+ //item=[room::InterfaceItem]
+ public Assignment getItemAssignment_1() { return cItemAssignment_1; }
+
+ //[room::InterfaceItem]
+ public CrossReference getItemInterfaceItemCrossReference_1_0() { return cItemInterfaceItemCrossReference_1_0; }
+
+ //ID
+ public RuleCall getItemInterfaceItemIDTerminalRuleCall_1_0_1() { return cItemInterfaceItemIDTerminalRuleCall_1_0_1; }
+
+ //"{"
+ public Keyword getLeftCurlyBracketKeyword_2() { return cLeftCurlyBracketKeyword_2; }
+
+ //attributes+=AttrInstanceConfig*
+ public Assignment getAttributesAssignment_3() { return cAttributesAssignment_3; }
+
+ //AttrInstanceConfig
+ public RuleCall getAttributesAttrInstanceConfigParserRuleCall_3_0() { return cAttributesAttrInstanceConfigParserRuleCall_3_0; }
+
+ //"}"
+ public Keyword getRightCurlyBracketKeyword_4() { return cRightCurlyBracketKeyword_4; }
+ }
+
+ public class AttrConfigElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "AttrConfig");
+ private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1);
+ private final RuleCall cAttrClassConfigParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0);
+ private final RuleCall cAttrInstanceConfigParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1);
+
+ /// *
+ // * Validation:
+ // * correct value type
+ // * Proposal:
+ // * correct Literal
+ // * / AttrConfig:
+ //
+ // AttrClassConfig | AttrInstanceConfig;
+ public ParserRule getRule() { return rule; }
+
+ //AttrClassConfig | AttrInstanceConfig
+ public Alternatives getAlternatives() { return cAlternatives; }
+
+ //AttrClassConfig
+ public RuleCall getAttrClassConfigParserRuleCall_0() { return cAttrClassConfigParserRuleCall_0; }
+
+ //AttrInstanceConfig
+ public RuleCall getAttrInstanceConfigParserRuleCall_1() { return cAttrInstanceConfigParserRuleCall_1; }
+ }
+
+ public class AttrClassConfigElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "AttrClassConfig");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Keyword cAttrKeyword_0 = (Keyword)cGroup.eContents().get(0);
+ private final Assignment cAttributeAssignment_1 = (Assignment)cGroup.eContents().get(1);
+ private final CrossReference cAttributeAttributeCrossReference_1_0 = (CrossReference)cAttributeAssignment_1.eContents().get(0);
+ private final RuleCall cAttributeAttributeIDTerminalRuleCall_1_0_1 = (RuleCall)cAttributeAttributeCrossReference_1_0.eContents().get(1);
+ private final Group cGroup_2 = (Group)cGroup.eContents().get(2);
+ private final Keyword cEqualsSignKeyword_2_0 = (Keyword)cGroup_2.eContents().get(0);
+ private final Assignment cValueAssignment_2_1 = (Assignment)cGroup_2.eContents().get(1);
+ private final RuleCall cValueLiteralArrayParserRuleCall_2_1_0 = (RuleCall)cValueAssignment_2_1.eContents().get(0);
+ private final Group cGroup_3 = (Group)cGroup.eContents().get(3);
+ private final Keyword cLeftCurlyBracketKeyword_3_0 = (Keyword)cGroup_3.eContents().get(0);
+ private final Group cGroup_3_1 = (Group)cGroup_3.eContents().get(1);
+ private final Group cGroup_3_1_0 = (Group)cGroup_3_1.eContents().get(0);
+ private final Keyword cMinKeyword_3_1_0_0 = (Keyword)cGroup_3_1_0.eContents().get(0);
+ private final Keyword cEqualsSignKeyword_3_1_0_1 = (Keyword)cGroup_3_1_0.eContents().get(1);
+ private final Assignment cMinAssignment_3_1_0_2 = (Assignment)cGroup_3_1_0.eContents().get(2);
+ private final RuleCall cMinNumberLiteralParserRuleCall_3_1_0_2_0 = (RuleCall)cMinAssignment_3_1_0_2.eContents().get(0);
+ private final Group cGroup_3_1_1 = (Group)cGroup_3_1.eContents().get(1);
+ private final Keyword cMaxKeyword_3_1_1_0 = (Keyword)cGroup_3_1_1.eContents().get(0);
+ private final Keyword cEqualsSignKeyword_3_1_1_1 = (Keyword)cGroup_3_1_1.eContents().get(1);
+ private final Assignment cMaxAssignment_3_1_1_2 = (Assignment)cGroup_3_1_1.eContents().get(2);
+ private final RuleCall cMaxNumberLiteralParserRuleCall_3_1_1_2_0 = (RuleCall)cMaxAssignment_3_1_1_2.eContents().get(0);
+ private final Assignment cAttributesAssignment_3_1_2 = (Assignment)cGroup_3_1.eContents().get(2);
+ private final RuleCall cAttributesAttrClassConfigParserRuleCall_3_1_2_0 = (RuleCall)cAttributesAssignment_3_1_2.eContents().get(0);
+ private final Keyword cRightCurlyBracketKeyword_3_2 = (Keyword)cGroup_3.eContents().get(2);
+
+ /// *
+ // * Validation:
+ // * correct min, max type + available
+ // * min <= value <= max
+ // * if !value -> min <= attribute.defaultValue <= max
+ // * character length
+ // *
+ // * /
+ //
+ //AttrClassConfig:
+ //
+ // "Attr" attribute=[room::Attribute] ("=" value=LiteralArray)? ("{" (("min" "=" min=NumberLiteral)? ("max" "="
+ //
+ // max=NumberLiteral)? attributes+=AttrClassConfig*) "}")?;
+ public ParserRule getRule() { return rule; }
+
+ //"Attr" attribute=[room::Attribute] ("=" value=LiteralArray)? ("{" (("min" "=" min=NumberLiteral)? ("max" "="
+ //
+ //max=NumberLiteral)? attributes+=AttrClassConfig*) "}")?
+ public Group getGroup() { return cGroup; }
+
+ //"Attr"
+ public Keyword getAttrKeyword_0() { return cAttrKeyword_0; }
+
+ //attribute=[room::Attribute]
+ public Assignment getAttributeAssignment_1() { return cAttributeAssignment_1; }
+
+ //[room::Attribute]
+ public CrossReference getAttributeAttributeCrossReference_1_0() { return cAttributeAttributeCrossReference_1_0; }
+
+ //ID
+ public RuleCall getAttributeAttributeIDTerminalRuleCall_1_0_1() { return cAttributeAttributeIDTerminalRuleCall_1_0_1; }
+
+ //("=" value=LiteralArray)?
+ public Group getGroup_2() { return cGroup_2; }
+
+ //"="
+ public Keyword getEqualsSignKeyword_2_0() { return cEqualsSignKeyword_2_0; }
+
+ //value=LiteralArray
+ public Assignment getValueAssignment_2_1() { return cValueAssignment_2_1; }
+
+ //LiteralArray
+ public RuleCall getValueLiteralArrayParserRuleCall_2_1_0() { return cValueLiteralArrayParserRuleCall_2_1_0; }
+
+ //("{" (("min" "=" min=NumberLiteral)? ("max" "=" max=NumberLiteral)? attributes+=AttrClassConfig*) "}")?
+ public Group getGroup_3() { return cGroup_3; }
+
+ //"{"
+ public Keyword getLeftCurlyBracketKeyword_3_0() { return cLeftCurlyBracketKeyword_3_0; }
+
+ //("min" "=" min=NumberLiteral)? ("max" "=" max=NumberLiteral)? attributes+=AttrClassConfig*
+ public Group getGroup_3_1() { return cGroup_3_1; }
+
+ //("min" "=" min=NumberLiteral)?
+ public Group getGroup_3_1_0() { return cGroup_3_1_0; }
+
+ //"min"
+ public Keyword getMinKeyword_3_1_0_0() { return cMinKeyword_3_1_0_0; }
+
+ //"="
+ public Keyword getEqualsSignKeyword_3_1_0_1() { return cEqualsSignKeyword_3_1_0_1; }
+
+ //min=NumberLiteral
+ public Assignment getMinAssignment_3_1_0_2() { return cMinAssignment_3_1_0_2; }
+
+ //NumberLiteral
+ public RuleCall getMinNumberLiteralParserRuleCall_3_1_0_2_0() { return cMinNumberLiteralParserRuleCall_3_1_0_2_0; }
+
+ //("max" "=" max=NumberLiteral)?
+ public Group getGroup_3_1_1() { return cGroup_3_1_1; }
+
+ //"max"
+ public Keyword getMaxKeyword_3_1_1_0() { return cMaxKeyword_3_1_1_0; }
+
+ //"="
+ public Keyword getEqualsSignKeyword_3_1_1_1() { return cEqualsSignKeyword_3_1_1_1; }
+
+ //max=NumberLiteral
+ public Assignment getMaxAssignment_3_1_1_2() { return cMaxAssignment_3_1_1_2; }
+
+ //NumberLiteral
+ public RuleCall getMaxNumberLiteralParserRuleCall_3_1_1_2_0() { return cMaxNumberLiteralParserRuleCall_3_1_1_2_0; }
+
+ //attributes+=AttrClassConfig*
+ public Assignment getAttributesAssignment_3_1_2() { return cAttributesAssignment_3_1_2; }
+
+ //AttrClassConfig
+ public RuleCall getAttributesAttrClassConfigParserRuleCall_3_1_2_0() { return cAttributesAttrClassConfigParserRuleCall_3_1_2_0; }
+
+ //"}"
+ public Keyword getRightCurlyBracketKeyword_3_2() { return cRightCurlyBracketKeyword_3_2; }
+ }
+
+ public class AttrInstanceConfigElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "AttrInstanceConfig");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Keyword cAttrKeyword_0 = (Keyword)cGroup.eContents().get(0);
+ private final Assignment cAttributeAssignment_1 = (Assignment)cGroup.eContents().get(1);
+ private final CrossReference cAttributeAttributeCrossReference_1_0 = (CrossReference)cAttributeAssignment_1.eContents().get(0);
+ private final RuleCall cAttributeAttributeIDTerminalRuleCall_1_0_1 = (RuleCall)cAttributeAttributeCrossReference_1_0.eContents().get(1);
+ private final Group cGroup_2 = (Group)cGroup.eContents().get(2);
+ private final Keyword cEqualsSignKeyword_2_0 = (Keyword)cGroup_2.eContents().get(0);
+ private final Assignment cValueAssignment_2_1 = (Assignment)cGroup_2.eContents().get(1);
+ private final RuleCall cValueLiteralArrayParserRuleCall_2_1_0 = (RuleCall)cValueAssignment_2_1.eContents().get(0);
+ private final Group cGroup_3 = (Group)cGroup.eContents().get(3);
+ private final Keyword cLeftCurlyBracketKeyword_3_0 = (Keyword)cGroup_3.eContents().get(0);
+ private final Group cGroup_3_1 = (Group)cGroup_3.eContents().get(1);
+ private final Group cGroup_3_1_0 = (Group)cGroup_3_1.eContents().get(0);
+ private final Assignment cDynConfigAssignment_3_1_0_0 = (Assignment)cGroup_3_1_0.eContents().get(0);
+ private final Keyword cDynConfigDynamicConfigurationKeyword_3_1_0_0_0 = (Keyword)cDynConfigAssignment_3_1_0_0.eContents().get(0);
+ private final Alternatives cAlternatives_3_1_0_1 = (Alternatives)cGroup_3_1_0.eContents().get(1);
+ private final Assignment cReadOnlyAssignment_3_1_0_1_0 = (Assignment)cAlternatives_3_1_0_1.eContents().get(0);
+ private final Keyword cReadOnlyReadKeyword_3_1_0_1_0_0 = (Keyword)cReadOnlyAssignment_3_1_0_1_0.eContents().get(0);
+ private final Keyword cWriteKeyword_3_1_0_1_1 = (Keyword)cAlternatives_3_1_0_1.eContents().get(1);
+ private final Assignment cAttributesAssignment_3_1_1 = (Assignment)cGroup_3_1.eContents().get(1);
+ private final RuleCall cAttributesAttrInstanceConfigParserRuleCall_3_1_1_0 = (RuleCall)cAttributesAssignment_3_1_1.eContents().get(0);
+ private final Keyword cRightCurlyBracketKeyword_3_2 = (Keyword)cGroup_3.eContents().get(2);
+
+ //AttrInstanceConfig:
+ //
+ // "Attr" attribute=[room::Attribute] ("=" value=LiteralArray)? ("{" ((dynConfig?="dynamic configuration"
+ //
+ // (readOnly?="read" | "write"))? attributes+=AttrInstanceConfig*) "}")?;
+ public ParserRule getRule() { return rule; }
+
+ //"Attr" attribute=[room::Attribute] ("=" value=LiteralArray)? ("{" ((dynConfig?="dynamic configuration" (readOnly?="read"
+ //
+ //| "write"))? attributes+=AttrInstanceConfig*) "}")?
+ public Group getGroup() { return cGroup; }
+
+ //"Attr"
+ public Keyword getAttrKeyword_0() { return cAttrKeyword_0; }
+
+ //attribute=[room::Attribute]
+ public Assignment getAttributeAssignment_1() { return cAttributeAssignment_1; }
+
+ //[room::Attribute]
+ public CrossReference getAttributeAttributeCrossReference_1_0() { return cAttributeAttributeCrossReference_1_0; }
+
+ //ID
+ public RuleCall getAttributeAttributeIDTerminalRuleCall_1_0_1() { return cAttributeAttributeIDTerminalRuleCall_1_0_1; }
+
+ //("=" value=LiteralArray)?
+ public Group getGroup_2() { return cGroup_2; }
+
+ //"="
+ public Keyword getEqualsSignKeyword_2_0() { return cEqualsSignKeyword_2_0; }
+
+ //value=LiteralArray
+ public Assignment getValueAssignment_2_1() { return cValueAssignment_2_1; }
+
+ //LiteralArray
+ public RuleCall getValueLiteralArrayParserRuleCall_2_1_0() { return cValueLiteralArrayParserRuleCall_2_1_0; }
+
+ //("{" ((dynConfig?="dynamic configuration" (readOnly?="read" | "write"))? attributes+=AttrInstanceConfig*) "}")?
+ public Group getGroup_3() { return cGroup_3; }
+
+ //"{"
+ public Keyword getLeftCurlyBracketKeyword_3_0() { return cLeftCurlyBracketKeyword_3_0; }
+
+ //(dynConfig?="dynamic configuration" (readOnly?="read" | "write"))? attributes+=AttrInstanceConfig*
+ public Group getGroup_3_1() { return cGroup_3_1; }
+
+ //(dynConfig?="dynamic configuration" (readOnly?="read" | "write"))?
+ public Group getGroup_3_1_0() { return cGroup_3_1_0; }
+
+ //dynConfig?="dynamic configuration"
+ public Assignment getDynConfigAssignment_3_1_0_0() { return cDynConfigAssignment_3_1_0_0; }
+
+ //"dynamic configuration"
+ public Keyword getDynConfigDynamicConfigurationKeyword_3_1_0_0_0() { return cDynConfigDynamicConfigurationKeyword_3_1_0_0_0; }
+
+ //readOnly?="read" | "write"
+ public Alternatives getAlternatives_3_1_0_1() { return cAlternatives_3_1_0_1; }
+
+ //readOnly?="read"
+ public Assignment getReadOnlyAssignment_3_1_0_1_0() { return cReadOnlyAssignment_3_1_0_1_0; }
+
+ //"read"
+ public Keyword getReadOnlyReadKeyword_3_1_0_1_0_0() { return cReadOnlyReadKeyword_3_1_0_1_0_0; }
+
+ //"write"
+ public Keyword getWriteKeyword_3_1_0_1_1() { return cWriteKeyword_3_1_0_1_1; }
+
+ //attributes+=AttrInstanceConfig*
+ public Assignment getAttributesAssignment_3_1_1() { return cAttributesAssignment_3_1_1; }
+
+ //AttrInstanceConfig
+ public RuleCall getAttributesAttrInstanceConfigParserRuleCall_3_1_1_0() { return cAttributesAttrInstanceConfigParserRuleCall_3_1_1_0; }
+
+ //"}"
+ public Keyword getRightCurlyBracketKeyword_3_2() { return cRightCurlyBracketKeyword_3_2; }
+ }
+
+ public class RefPathElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "RefPath");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Assignment cRefsAssignment_0 = (Assignment)cGroup.eContents().get(0);
+ private final RuleCall cRefsIDTerminalRuleCall_0_0 = (RuleCall)cRefsAssignment_0.eContents().get(0);
+ private final Group cGroup_1 = (Group)cGroup.eContents().get(1);
+ private final Keyword cSolidusKeyword_1_0 = (Keyword)cGroup_1.eContents().get(0);
+ private final Assignment cRefsAssignment_1_1 = (Assignment)cGroup_1.eContents().get(1);
+ private final RuleCall cRefsIDTerminalRuleCall_1_1_0 = (RuleCall)cRefsAssignment_1_1.eContents().get(0);
+
+ /// *
+ // * Proposal:
+ // * for ActorInstanceConfig
+ // * / RefPath:
+ //
+ // refs+=ID ("/" refs+=ID)*;
+ public ParserRule getRule() { return rule; }
+
+ //refs+=ID ("/" refs+=ID)*
+ public Group getGroup() { return cGroup; }
+
+ //refs+=ID
+ public Assignment getRefsAssignment_0() { return cRefsAssignment_0; }
+
+ //ID
+ public RuleCall getRefsIDTerminalRuleCall_0_0() { return cRefsIDTerminalRuleCall_0_0; }
+
+ //("/" refs+=ID)*
+ public Group getGroup_1() { return cGroup_1; }
+
+ //"/"
+ public Keyword getSolidusKeyword_1_0() { return cSolidusKeyword_1_0; }
+
+ //refs+=ID
+ public Assignment getRefsAssignment_1_1() { return cRefsAssignment_1_1; }
+
+ //ID
+ public RuleCall getRefsIDTerminalRuleCall_1_1_0() { return cRefsIDTerminalRuleCall_1_1_0; }
+ }
+
+ public class ImportElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Import");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Keyword cImportKeyword_0 = (Keyword)cGroup.eContents().get(0);
+ private final Alternatives cAlternatives_1 = (Alternatives)cGroup.eContents().get(1);
+ private final Group cGroup_1_0 = (Group)cAlternatives_1.eContents().get(0);
+ private final Assignment cImportedNamespaceAssignment_1_0_0 = (Assignment)cGroup_1_0.eContents().get(0);
+ private final RuleCall cImportedNamespaceImportedFQNParserRuleCall_1_0_0_0 = (RuleCall)cImportedNamespaceAssignment_1_0_0.eContents().get(0);
+ private final Keyword cFromKeyword_1_0_1 = (Keyword)cGroup_1_0.eContents().get(1);
+ private final Keyword cModelKeyword_1_1 = (Keyword)cAlternatives_1.eContents().get(1);
+ private final Assignment cImportURIAssignment_2 = (Assignment)cGroup.eContents().get(2);
+ private final RuleCall cImportURISTRINGTerminalRuleCall_2_0 = (RuleCall)cImportURIAssignment_2.eContents().get(0);
+
+ //// -------------------- from org.eclipse.etrice.core.Room.xtext ---------------
+ // Import:
+ //
+ // "import" (importedNamespace=ImportedFQN "from" | "model") importURI=STRING;
+ public ParserRule getRule() { return rule; }
+
+ //"import" (importedNamespace=ImportedFQN "from" | "model") importURI=STRING
+ public Group getGroup() { return cGroup; }
+
+ //"import"
+ public Keyword getImportKeyword_0() { return cImportKeyword_0; }
+
+ //importedNamespace=ImportedFQN "from" | "model"
+ public Alternatives getAlternatives_1() { return cAlternatives_1; }
+
+ //importedNamespace=ImportedFQN "from"
+ public Group getGroup_1_0() { return cGroup_1_0; }
+
+ //importedNamespace=ImportedFQN
+ public Assignment getImportedNamespaceAssignment_1_0_0() { return cImportedNamespaceAssignment_1_0_0; }
+
+ //ImportedFQN
+ public RuleCall getImportedNamespaceImportedFQNParserRuleCall_1_0_0_0() { return cImportedNamespaceImportedFQNParserRuleCall_1_0_0_0; }
+
+ //"from"
+ public Keyword getFromKeyword_1_0_1() { return cFromKeyword_1_0_1; }
+
+ //"model"
+ public Keyword getModelKeyword_1_1() { return cModelKeyword_1_1; }
+
+ //importURI=STRING
+ public Assignment getImportURIAssignment_2() { return cImportURIAssignment_2; }
+
+ //STRING
+ public RuleCall getImportURISTRINGTerminalRuleCall_2_0() { return cImportURISTRINGTerminalRuleCall_2_0; }
+ }
+
+ public class ImportedFQNElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "ImportedFQN");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final RuleCall cFQNParserRuleCall_0 = (RuleCall)cGroup.eContents().get(0);
+ private final Keyword cFullStopAsteriskKeyword_1 = (Keyword)cGroup.eContents().get(1);
+
+ //ImportedFQN:
+ //
+ // FQN ".*"?;
+ public ParserRule getRule() { return rule; }
+
+ //FQN ".*"?
+ public Group getGroup() { return cGroup; }
+
+ //FQN
+ public RuleCall getFQNParserRuleCall_0() { return cFQNParserRuleCall_0; }
+
+ //".*"?
+ public Keyword getFullStopAsteriskKeyword_1() { return cFullStopAsteriskKeyword_1; }
+ }
+
+ public class FQNElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "FQN");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final RuleCall cIDTerminalRuleCall_0 = (RuleCall)cGroup.eContents().get(0);
+ private final Group cGroup_1 = (Group)cGroup.eContents().get(1);
+ private final Keyword cFullStopKeyword_1_0 = (Keyword)cGroup_1.eContents().get(0);
+ private final RuleCall cIDTerminalRuleCall_1_1 = (RuleCall)cGroup_1.eContents().get(1);
+
+ //FQN:
+ //
+ // ID ("." ID)*;
+ public ParserRule getRule() { return rule; }
+
+ //ID ("." ID)*
+ public Group getGroup() { return cGroup; }
+
+ //ID
+ public RuleCall getIDTerminalRuleCall_0() { return cIDTerminalRuleCall_0; }
+
+ //("." ID)*
+ public Group getGroup_1() { return cGroup_1; }
+
+ //"."
+ public Keyword getFullStopKeyword_1_0() { return cFullStopKeyword_1_0; }
+
+ //ID
+ public RuleCall getIDTerminalRuleCall_1_1() { return cIDTerminalRuleCall_1_1; }
+ }
+
+ public class LiteralArrayElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "LiteralArray");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Assignment cLiteralsAssignment_0 = (Assignment)cGroup.eContents().get(0);
+ private final RuleCall cLiteralsLiteralParserRuleCall_0_0 = (RuleCall)cLiteralsAssignment_0.eContents().get(0);
+ private final Group cGroup_1 = (Group)cGroup.eContents().get(1);
+ private final Keyword cCommaKeyword_1_0 = (Keyword)cGroup_1.eContents().get(0);
+ private final Assignment cLiteralsAssignment_1_1 = (Assignment)cGroup_1.eContents().get(1);
+ private final RuleCall cLiteralsLiteralParserRuleCall_1_1_0 = (RuleCall)cLiteralsAssignment_1_1.eContents().get(0);
+
+ //// -----------------------------------------------------------------------------
+ // //enum Unit:
+ // // N|
+ // // W|
+ //
+ //
+ //// S = 's'|
+ // // KG = 'kg'|
+ // // M = 'm'|
+ // // C|
+ // // NM|
+ // // RPM|
+ // // V|
+ // // A|
+ // // HZ = 'Hz'|
+ // // KW
+ // //;
+ //
+ //
+ //// LiteralArray = BooleanLiteral+|NumberLiteral+
+ // // LiteralArray = StringLiteral
+ // LiteralArray:
+ //
+ // literals+=Literal ("," literals+=Literal)*;
+ public ParserRule getRule() { return rule; }
+
+ //literals+=Literal ("," literals+=Literal)*
+ public Group getGroup() { return cGroup; }
+
+ //literals+=Literal
+ public Assignment getLiteralsAssignment_0() { return cLiteralsAssignment_0; }
+
+ //Literal
+ public RuleCall getLiteralsLiteralParserRuleCall_0_0() { return cLiteralsLiteralParserRuleCall_0_0; }
+
+ //("," literals+=Literal)*
+ public Group getGroup_1() { return cGroup_1; }
+
+ //","
+ public Keyword getCommaKeyword_1_0() { return cCommaKeyword_1_0; }
+
+ //literals+=Literal
+ public Assignment getLiteralsAssignment_1_1() { return cLiteralsAssignment_1_1; }
+
+ //Literal
+ public RuleCall getLiteralsLiteralParserRuleCall_1_1_0() { return cLiteralsLiteralParserRuleCall_1_1_0; }
+ }
+
+ public class LiteralElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Literal");
+ private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1);
+ private final RuleCall cBooleanLiteralParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0);
+ private final RuleCall cNumberLiteralParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1);
+ private final RuleCall cStringLiteralParserRuleCall_2 = (RuleCall)cAlternatives.eContents().get(2);
+
+ //// Value Types for Attributes
+ // Literal:
+ //
+ // BooleanLiteral | NumberLiteral | StringLiteral;
+ public ParserRule getRule() { return rule; }
+
+ //BooleanLiteral | NumberLiteral | StringLiteral
+ public Alternatives getAlternatives() { return cAlternatives; }
+
+ //BooleanLiteral
+ public RuleCall getBooleanLiteralParserRuleCall_0() { return cBooleanLiteralParserRuleCall_0; }
+
+ //NumberLiteral
+ public RuleCall getNumberLiteralParserRuleCall_1() { return cNumberLiteralParserRuleCall_1; }
+
+ //StringLiteral
+ public RuleCall getStringLiteralParserRuleCall_2() { return cStringLiteralParserRuleCall_2; }
+ }
+
+ public class BooleanLiteralElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "BooleanLiteral");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Action cBooleanLiteralAction_0 = (Action)cGroup.eContents().get(0);
+ private final Alternatives cAlternatives_1 = (Alternatives)cGroup.eContents().get(1);
+ private final Keyword cFalseKeyword_1_0 = (Keyword)cAlternatives_1.eContents().get(0);
+ private final Assignment cIsTrueAssignment_1_1 = (Assignment)cAlternatives_1.eContents().get(1);
+ private final Keyword cIsTrueTrueKeyword_1_1_0 = (Keyword)cIsTrueAssignment_1_1.eContents().get(0);
+
+ //BooleanLiteral:
+ //
+ // {BooleanLiteral} ("false" | isTrue?="true");
+ public ParserRule getRule() { return rule; }
+
+ //{BooleanLiteral} ("false" | isTrue?="true")
+ public Group getGroup() { return cGroup; }
+
+ //{BooleanLiteral}
+ public Action getBooleanLiteralAction_0() { return cBooleanLiteralAction_0; }
+
+ //"false" | isTrue?="true"
+ public Alternatives getAlternatives_1() { return cAlternatives_1; }
+
+ //"false"
+ public Keyword getFalseKeyword_1_0() { return cFalseKeyword_1_0; }
+
+ //isTrue?="true"
+ public Assignment getIsTrueAssignment_1_1() { return cIsTrueAssignment_1_1; }
+
+ //"true"
+ public Keyword getIsTrueTrueKeyword_1_1_0() { return cIsTrueTrueKeyword_1_1_0; }
+ }
+
+ public class NumberLiteralElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "NumberLiteral");
+ private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1);
+ private final RuleCall cIntLiteralParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0);
+ private final RuleCall cRealLiteralParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1);
+
+ //NumberLiteral:
+ //
+ // IntLiteral | RealLiteral;
+ public ParserRule getRule() { return rule; }
+
+ //IntLiteral | RealLiteral
+ public Alternatives getAlternatives() { return cAlternatives; }
+
+ //IntLiteral
+ public RuleCall getIntLiteralParserRuleCall_0() { return cIntLiteralParserRuleCall_0; }
+
+ //RealLiteral
+ public RuleCall getRealLiteralParserRuleCall_1() { return cRealLiteralParserRuleCall_1; }
+ }
+
+ public class RealLiteralElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "RealLiteral");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Action cRealLiteralAction_0 = (Action)cGroup.eContents().get(0);
+ private final Assignment cValueAssignment_1 = (Assignment)cGroup.eContents().get(1);
+ private final RuleCall cValueRealParserRuleCall_1_0 = (RuleCall)cValueAssignment_1.eContents().get(0);
+
+ //RealLiteral:
+ //
+ // {RealLiteral} value=Real;
+ public ParserRule getRule() { return rule; }
+
+ //{RealLiteral} value=Real
+ public Group getGroup() { return cGroup; }
+
+ //{RealLiteral}
+ public Action getRealLiteralAction_0() { return cRealLiteralAction_0; }
+
+ //value=Real
+ public Assignment getValueAssignment_1() { return cValueAssignment_1; }
+
+ //Real
+ public RuleCall getValueRealParserRuleCall_1_0() { return cValueRealParserRuleCall_1_0; }
+ }
+
+ public class IntLiteralElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "IntLiteral");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Action cIntLiteralAction_0 = (Action)cGroup.eContents().get(0);
+ private final Assignment cValueAssignment_1 = (Assignment)cGroup.eContents().get(1);
+ private final RuleCall cValueIntegerParserRuleCall_1_0 = (RuleCall)cValueAssignment_1.eContents().get(0);
+
+ //IntLiteral:
+ //
+ // {IntLiteral} value=Integer;
+ public ParserRule getRule() { return rule; }
+
+ //{IntLiteral} value=Integer
+ public Group getGroup() { return cGroup; }
+
+ //{IntLiteral}
+ public Action getIntLiteralAction_0() { return cIntLiteralAction_0; }
+
+ //value=Integer
+ public Assignment getValueAssignment_1() { return cValueAssignment_1; }
+
+ //Integer
+ public RuleCall getValueIntegerParserRuleCall_1_0() { return cValueIntegerParserRuleCall_1_0; }
+ }
+
+ public class StringLiteralElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "StringLiteral");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Action cStringLiteralAction_0 = (Action)cGroup.eContents().get(0);
+ private final Assignment cValueAssignment_1 = (Assignment)cGroup.eContents().get(1);
+ private final RuleCall cValueSTRINGTerminalRuleCall_1_0 = (RuleCall)cValueAssignment_1.eContents().get(0);
+
+ //StringLiteral:
+ //
+ // {StringLiteral} value=STRING;
+ public ParserRule getRule() { return rule; }
+
+ //{StringLiteral} value=STRING
+ public Group getGroup() { return cGroup; }
+
+ //{StringLiteral}
+ public Action getStringLiteralAction_0() { return cStringLiteralAction_0; }
+
+ //value=STRING
+ public Assignment getValueAssignment_1() { return cValueAssignment_1; }
+
+ //STRING
+ public RuleCall getValueSTRINGTerminalRuleCall_1_0() { return cValueSTRINGTerminalRuleCall_1_0; }
+ }
+
+ public class IntegerElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Integer");
+ private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1);
+ private final RuleCall cSignedIntegerParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0);
+ private final RuleCall cHexadecimalParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1);
+
+ //Integer returns ecore::ELong:
+ //
+ // SignedInteger | Hexadecimal;
+ public ParserRule getRule() { return rule; }
+
+ //SignedInteger | Hexadecimal
+ public Alternatives getAlternatives() { return cAlternatives; }
+
+ //SignedInteger
+ public RuleCall getSignedIntegerParserRuleCall_0() { return cSignedIntegerParserRuleCall_0; }
+
+ //Hexadecimal
+ public RuleCall getHexadecimalParserRuleCall_1() { return cHexadecimalParserRuleCall_1; }
+ }
+
+ public class SignedIntegerElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "SignedInteger");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Alternatives cAlternatives_0 = (Alternatives)cGroup.eContents().get(0);
+ private final Keyword cPlusSignKeyword_0_0 = (Keyword)cAlternatives_0.eContents().get(0);
+ private final Keyword cHyphenMinusKeyword_0_1 = (Keyword)cAlternatives_0.eContents().get(1);
+ private final RuleCall cINTTerminalRuleCall_1 = (RuleCall)cGroup.eContents().get(1);
+
+ //SignedInteger hidden():
+ //
+ // ("+" | "-")? INT;
+ public ParserRule getRule() { return rule; }
+
+ //("+" | "-")? INT
+ public Group getGroup() { return cGroup; }
+
+ //("+" | "-")?
+ public Alternatives getAlternatives_0() { return cAlternatives_0; }
+
+ //"+"
+ public Keyword getPlusSignKeyword_0_0() { return cPlusSignKeyword_0_0; }
+
+ //"-"
+ public Keyword getHyphenMinusKeyword_0_1() { return cHyphenMinusKeyword_0_1; }
+
+ //INT
+ public RuleCall getINTTerminalRuleCall_1() { return cINTTerminalRuleCall_1; }
+ }
+
+ public class HexadecimalElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Hexadecimal");
+ private final RuleCall cHEXTerminalRuleCall = (RuleCall)rule.eContents().get(1);
+
+ //Hexadecimal hidden():
+ //
+ // HEX;
+ public ParserRule getRule() { return rule; }
+
+ //HEX
+ public RuleCall getHEXTerminalRuleCall() { return cHEXTerminalRuleCall; }
+ }
+
+ public class RealElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Real");
+ private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1);
+ private final RuleCall cDecimalParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0);
+ private final RuleCall cDotDecimalParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1);
+ private final RuleCall cDecimalDotParserRuleCall_2 = (RuleCall)cAlternatives.eContents().get(2);
+ private final RuleCall cDecimalExpParserRuleCall_3 = (RuleCall)cAlternatives.eContents().get(3);
+
+ //Real returns ecore::EDouble:
+ //
+ // Decimal | DotDecimal | DecimalDot | DecimalExp;
+ public ParserRule getRule() { return rule; }
+
+ //Decimal | DotDecimal | DecimalDot | DecimalExp
+ public Alternatives getAlternatives() { return cAlternatives; }
+
+ //Decimal
+ public RuleCall getDecimalParserRuleCall_0() { return cDecimalParserRuleCall_0; }
+
+ //DotDecimal
+ public RuleCall getDotDecimalParserRuleCall_1() { return cDotDecimalParserRuleCall_1; }
+
+ //DecimalDot
+ public RuleCall getDecimalDotParserRuleCall_2() { return cDecimalDotParserRuleCall_2; }
+
+ //DecimalExp
+ public RuleCall getDecimalExpParserRuleCall_3() { return cDecimalExpParserRuleCall_3; }
+ }
+
+ public class DecimalElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Decimal");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Alternatives cAlternatives_0 = (Alternatives)cGroup.eContents().get(0);
+ private final Keyword cPlusSignKeyword_0_0 = (Keyword)cAlternatives_0.eContents().get(0);
+ private final Keyword cHyphenMinusKeyword_0_1 = (Keyword)cAlternatives_0.eContents().get(1);
+ private final RuleCall cINTTerminalRuleCall_1 = (RuleCall)cGroup.eContents().get(1);
+ private final Keyword cFullStopKeyword_2 = (Keyword)cGroup.eContents().get(2);
+ private final RuleCall cINTTerminalRuleCall_3 = (RuleCall)cGroup.eContents().get(3);
+
+ //Decimal hidden():
+ //
+ // ("+" | "-")? INT "." INT;
+ public ParserRule getRule() { return rule; }
+
+ //("+" | "-")? INT "." INT
+ public Group getGroup() { return cGroup; }
+
+ //("+" | "-")?
+ public Alternatives getAlternatives_0() { return cAlternatives_0; }
+
+ //"+"
+ public Keyword getPlusSignKeyword_0_0() { return cPlusSignKeyword_0_0; }
+
+ //"-"
+ public Keyword getHyphenMinusKeyword_0_1() { return cHyphenMinusKeyword_0_1; }
+
+ //INT
+ public RuleCall getINTTerminalRuleCall_1() { return cINTTerminalRuleCall_1; }
+
+ //"."
+ public Keyword getFullStopKeyword_2() { return cFullStopKeyword_2; }
+
+ //INT
+ public RuleCall getINTTerminalRuleCall_3() { return cINTTerminalRuleCall_3; }
+ }
+
+ public class DotDecimalElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "DotDecimal");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Alternatives cAlternatives_0 = (Alternatives)cGroup.eContents().get(0);
+ private final Keyword cPlusSignKeyword_0_0 = (Keyword)cAlternatives_0.eContents().get(0);
+ private final Keyword cHyphenMinusKeyword_0_1 = (Keyword)cAlternatives_0.eContents().get(1);
+ private final Keyword cFullStopKeyword_1 = (Keyword)cGroup.eContents().get(1);
+ private final RuleCall cINTTerminalRuleCall_2 = (RuleCall)cGroup.eContents().get(2);
+
+ //DotDecimal hidden():
+ //
+ // ("+" | "-")? "." INT;
+ public ParserRule getRule() { return rule; }
+
+ //("+" | "-")? "." INT
+ public Group getGroup() { return cGroup; }
+
+ //("+" | "-")?
+ public Alternatives getAlternatives_0() { return cAlternatives_0; }
+
+ //"+"
+ public Keyword getPlusSignKeyword_0_0() { return cPlusSignKeyword_0_0; }
+
+ //"-"
+ public Keyword getHyphenMinusKeyword_0_1() { return cHyphenMinusKeyword_0_1; }
+
+ //"."
+ public Keyword getFullStopKeyword_1() { return cFullStopKeyword_1; }
+
+ //INT
+ public RuleCall getINTTerminalRuleCall_2() { return cINTTerminalRuleCall_2; }
+ }
+
+ public class DecimalDotElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "DecimalDot");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Alternatives cAlternatives_0 = (Alternatives)cGroup.eContents().get(0);
+ private final Keyword cPlusSignKeyword_0_0 = (Keyword)cAlternatives_0.eContents().get(0);
+ private final Keyword cHyphenMinusKeyword_0_1 = (Keyword)cAlternatives_0.eContents().get(1);
+ private final RuleCall cINTTerminalRuleCall_1 = (RuleCall)cGroup.eContents().get(1);
+ private final Keyword cFullStopKeyword_2 = (Keyword)cGroup.eContents().get(2);
+
+ //DecimalDot hidden():
+ //
+ // ("+" | "-")? INT ".";
+ public ParserRule getRule() { return rule; }
+
+ //("+" | "-")? INT "."
+ public Group getGroup() { return cGroup; }
+
+ //("+" | "-")?
+ public Alternatives getAlternatives_0() { return cAlternatives_0; }
+
+ //"+"
+ public Keyword getPlusSignKeyword_0_0() { return cPlusSignKeyword_0_0; }
+
+ //"-"
+ public Keyword getHyphenMinusKeyword_0_1() { return cHyphenMinusKeyword_0_1; }
+
+ //INT
+ public RuleCall getINTTerminalRuleCall_1() { return cINTTerminalRuleCall_1; }
+
+ //"."
+ public Keyword getFullStopKeyword_2() { return cFullStopKeyword_2; }
+ }
+
+ public class DecimalExpElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "DecimalExp");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Alternatives cAlternatives_0 = (Alternatives)cGroup.eContents().get(0);
+ private final Keyword cPlusSignKeyword_0_0 = (Keyword)cAlternatives_0.eContents().get(0);
+ private final Keyword cHyphenMinusKeyword_0_1 = (Keyword)cAlternatives_0.eContents().get(1);
+ private final RuleCall cINTTerminalRuleCall_1 = (RuleCall)cGroup.eContents().get(1);
+ private final Keyword cFullStopKeyword_2 = (Keyword)cGroup.eContents().get(2);
+ private final RuleCall cINTTerminalRuleCall_3 = (RuleCall)cGroup.eContents().get(3);
+ private final RuleCall cEXPTerminalRuleCall_4 = (RuleCall)cGroup.eContents().get(4);
+
+ //DecimalExp hidden():
+ //
+ // ("+" | "-")? INT "." INT EXP;
+ public ParserRule getRule() { return rule; }
+
+ //("+" | "-")? INT "." INT EXP
+ public Group getGroup() { return cGroup; }
+
+ //("+" | "-")?
+ public Alternatives getAlternatives_0() { return cAlternatives_0; }
+
+ //"+"
+ public Keyword getPlusSignKeyword_0_0() { return cPlusSignKeyword_0_0; }
+
+ //"-"
+ public Keyword getHyphenMinusKeyword_0_1() { return cHyphenMinusKeyword_0_1; }
+
+ //INT
+ public RuleCall getINTTerminalRuleCall_1() { return cINTTerminalRuleCall_1; }
+
+ //"."
+ public Keyword getFullStopKeyword_2() { return cFullStopKeyword_2; }
+
+ //INT
+ public RuleCall getINTTerminalRuleCall_3() { return cINTTerminalRuleCall_3; }
+
+ //EXP
+ public RuleCall getEXPTerminalRuleCall_4() { return cEXPTerminalRuleCall_4; }
+ }
+
+
+ private ConfigModelElements pConfigModel;
+ private ConfigElementElements pConfigElement;
+ private SubSystemConfigElements pSubSystemConfig;
+ private DynamicConfigElements pDynamicConfig;
+ private ActorClassConfigElements pActorClassConfig;
+ private ActorInstanceConfigElements pActorInstanceConfig;
+ private ProtocolClassConfigElements pProtocolClassConfig;
+ private PortClassConfigElements pPortClassConfig;
+ private PortInstanceConfigElements pPortInstanceConfig;
+ private AttrConfigElements pAttrConfig;
+ private AttrClassConfigElements pAttrClassConfig;
+ private AttrInstanceConfigElements pAttrInstanceConfig;
+ private RefPathElements pRefPath;
+ private ImportElements pImport;
+ private ImportedFQNElements pImportedFQN;
+ private FQNElements pFQN;
+ private LiteralArrayElements pLiteralArray;
+ private LiteralElements pLiteral;
+ private BooleanLiteralElements pBooleanLiteral;
+ private NumberLiteralElements pNumberLiteral;
+ private RealLiteralElements pRealLiteral;
+ private IntLiteralElements pIntLiteral;
+ private StringLiteralElements pStringLiteral;
+ private IntegerElements pInteger;
+ private SignedIntegerElements pSignedInteger;
+ private HexadecimalElements pHexadecimal;
+ private RealElements pReal;
+ private DecimalElements pDecimal;
+ private DotDecimalElements pDotDecimal;
+ private DecimalDotElements pDecimalDot;
+ private DecimalExpElements pDecimalExp;
+ private TerminalRule tEXP;
+ private TerminalRule tHEX;
+
+ private final Grammar grammar;
+
+ private TerminalsGrammarAccess gaTerminals;
+
+ @Inject
+ public ConfigGrammarAccess(GrammarProvider grammarProvider,
+ TerminalsGrammarAccess gaTerminals) {
+ this.grammar = internalFindGrammar(grammarProvider);
+ this.gaTerminals = gaTerminals;
+ }
+
+ protected Grammar internalFindGrammar(GrammarProvider grammarProvider) {
+ Grammar grammar = grammarProvider.getGrammar(this);
+ while (grammar != null) {
+ if ("org.eclipse.etrice.core.Config".equals(grammar.getName())) {
+ return grammar;
+ }
+ List<Grammar> grammars = grammar.getUsedGrammars();
+ if (!grammars.isEmpty()) {
+ grammar = grammars.iterator().next();
+ } else {
+ return null;
+ }
+ }
+ return grammar;
+ }
+
+
+ public Grammar getGrammar() {
+ return grammar;
+ }
+
+
+ public TerminalsGrammarAccess getTerminalsGrammarAccess() {
+ return gaTerminals;
+ }
+
+
+ //ConfigModel:
+ //
+ // imports+=Import* configElements+=ConfigElement*;
+ public ConfigModelElements getConfigModelAccess() {
+ return (pConfigModel != null) ? pConfigModel : (pConfigModel = new ConfigModelElements());
+ }
+
+ public ParserRule getConfigModelRule() {
+ return getConfigModelAccess().getRule();
+ }
+
+ //ConfigElement:
+ //
+ // SubSystemConfig | ActorClassConfig | ActorInstanceConfig | ProtocolClassConfig;
+ public ConfigElementElements getConfigElementAccess() {
+ return (pConfigElement != null) ? pConfigElement : (pConfigElement = new ConfigElementElements());
+ }
+
+ public ParserRule getConfigElementRule() {
+ return getConfigElementAccess().getRule();
+ }
+
+ //SubSystemConfig:
+ //
+ // "SubSystemConfig" subSystem=[room::SubSystemClass] "{" dynConfig=DynamicConfig "}";
+ public SubSystemConfigElements getSubSystemConfigAccess() {
+ return (pSubSystemConfig != null) ? pSubSystemConfig : (pSubSystemConfig = new SubSystemConfigElements());
+ }
+
+ public ParserRule getSubSystemConfigRule() {
+ return getSubSystemConfigAccess().getRule();
+ }
+
+ //DynamicConfig:
+ //
+ // "dynamic configuration" "{" (("file path" filePath=STRING | ("user import" userCode1=STRING) ("user constructor"
+ //
+ // userCode2=STRING)) & ("polling timer [ms]" polling=INT)?) "}";
+ public DynamicConfigElements getDynamicConfigAccess() {
+ return (pDynamicConfig != null) ? pDynamicConfig : (pDynamicConfig = new DynamicConfigElements());
+ }
+
+ public ParserRule getDynamicConfigRule() {
+ return getDynamicConfigAccess().getRule();
+ }
+
+ /// *
+ // * Validation:
+ // * duplicates config, attributes
+ // * / ActorClassConfig:
+ //
+ // "ActorClassConfig" actor=[room::ActorClass|FQN] "{" attributes+=AttrClassConfig* "}";
+ public ActorClassConfigElements getActorClassConfigAccess() {
+ return (pActorClassConfig != null) ? pActorClassConfig : (pActorClassConfig = new ActorClassConfigElements());
+ }
+
+ public ParserRule getActorClassConfigRule() {
+ return getActorClassConfigAccess().getRule();
+ }
+
+ /// *
+ // * Validation:
+ // * duplicates config, attributes
+ // * valid instance reference
+ // * Proposal:
+ // * attributes
+ // * /
+ //
+ //ActorInstanceConfig:
+ //
+ // "ActorInstanceConfig" root=[room::SubSystemClass|FQN] "/" path=RefPath "{" (attributes+=AttrInstanceConfig* &
+ //
+ // ports+=PortInstanceConfig*) "}";
+ public ActorInstanceConfigElements getActorInstanceConfigAccess() {
+ return (pActorInstanceConfig != null) ? pActorInstanceConfig : (pActorInstanceConfig = new ActorInstanceConfigElements());
+ }
+
+ public ParserRule getActorInstanceConfigRule() {
+ return getActorInstanceConfigAccess().getRule();
+ }
+
+ //ProtocolClassConfig:
+ //
+ // "ProtocolClassConfig" protocol=[room::ProtocolClass|FQN] "{" (("regular" regular=PortClassConfig)? & ("conjugate"
+ //
+ // conjugated=PortClassConfig)?) "}";
+ public ProtocolClassConfigElements getProtocolClassConfigAccess() {
+ return (pProtocolClassConfig != null) ? pProtocolClassConfig : (pProtocolClassConfig = new ProtocolClassConfigElements());
+ }
+
+ public ParserRule getProtocolClassConfigRule() {
+ return getProtocolClassConfigAccess().getRule();
+ }
+
+ //PortClassConfig:
+ //
+ // {PortClassConfig} "Port" "{" attributes+=AttrClassConfig* "}";
+ public PortClassConfigElements getPortClassConfigAccess() {
+ return (pPortClassConfig != null) ? pPortClassConfig : (pPortClassConfig = new PortClassConfigElements());
+ }
+
+ public ParserRule getPortClassConfigRule() {
+ return getPortClassConfigAccess().getRule();
+ }
+
+ //PortInstanceConfig:
+ //
+ // "InterfaceItem" item=[room::InterfaceItem] "{" attributes+=AttrInstanceConfig* "}";
+ public PortInstanceConfigElements getPortInstanceConfigAccess() {
+ return (pPortInstanceConfig != null) ? pPortInstanceConfig : (pPortInstanceConfig = new PortInstanceConfigElements());
+ }
+
+ public ParserRule getPortInstanceConfigRule() {
+ return getPortInstanceConfigAccess().getRule();
+ }
+
+ /// *
+ // * Validation:
+ // * correct value type
+ // * Proposal:
+ // * correct Literal
+ // * / AttrConfig:
+ //
+ // AttrClassConfig | AttrInstanceConfig;
+ public AttrConfigElements getAttrConfigAccess() {
+ return (pAttrConfig != null) ? pAttrConfig : (pAttrConfig = new AttrConfigElements());
+ }
+
+ public ParserRule getAttrConfigRule() {
+ return getAttrConfigAccess().getRule();
+ }
+
+ /// *
+ // * Validation:
+ // * correct min, max type + available
+ // * min <= value <= max
+ // * if !value -> min <= attribute.defaultValue <= max
+ // * character length
+ // *
+ // * /
+ //
+ //AttrClassConfig:
+ //
+ // "Attr" attribute=[room::Attribute] ("=" value=LiteralArray)? ("{" (("min" "=" min=NumberLiteral)? ("max" "="
+ //
+ // max=NumberLiteral)? attributes+=AttrClassConfig*) "}")?;
+ public AttrClassConfigElements getAttrClassConfigAccess() {
+ return (pAttrClassConfig != null) ? pAttrClassConfig : (pAttrClassConfig = new AttrClassConfigElements());
+ }
+
+ public ParserRule getAttrClassConfigRule() {
+ return getAttrClassConfigAccess().getRule();
+ }
+
+ //AttrInstanceConfig:
+ //
+ // "Attr" attribute=[room::Attribute] ("=" value=LiteralArray)? ("{" ((dynConfig?="dynamic configuration"
+ //
+ // (readOnly?="read" | "write"))? attributes+=AttrInstanceConfig*) "}")?;
+ public AttrInstanceConfigElements getAttrInstanceConfigAccess() {
+ return (pAttrInstanceConfig != null) ? pAttrInstanceConfig : (pAttrInstanceConfig = new AttrInstanceConfigElements());
+ }
+
+ public ParserRule getAttrInstanceConfigRule() {
+ return getAttrInstanceConfigAccess().getRule();
+ }
+
+ /// *
+ // * Proposal:
+ // * for ActorInstanceConfig
+ // * / RefPath:
+ //
+ // refs+=ID ("/" refs+=ID)*;
+ public RefPathElements getRefPathAccess() {
+ return (pRefPath != null) ? pRefPath : (pRefPath = new RefPathElements());
+ }
+
+ public ParserRule getRefPathRule() {
+ return getRefPathAccess().getRule();
+ }
+
+ //// -------------------- from org.eclipse.etrice.core.Room.xtext ---------------
+ // Import:
+ //
+ // "import" (importedNamespace=ImportedFQN "from" | "model") importURI=STRING;
+ public ImportElements getImportAccess() {
+ return (pImport != null) ? pImport : (pImport = new ImportElements());
+ }
+
+ public ParserRule getImportRule() {
+ return getImportAccess().getRule();
+ }
+
+ //ImportedFQN:
+ //
+ // FQN ".*"?;
+ public ImportedFQNElements getImportedFQNAccess() {
+ return (pImportedFQN != null) ? pImportedFQN : (pImportedFQN = new ImportedFQNElements());
+ }
+
+ public ParserRule getImportedFQNRule() {
+ return getImportedFQNAccess().getRule();
+ }
+
+ //FQN:
+ //
+ // ID ("." ID)*;
+ public FQNElements getFQNAccess() {
+ return (pFQN != null) ? pFQN : (pFQN = new FQNElements());
+ }
+
+ public ParserRule getFQNRule() {
+ return getFQNAccess().getRule();
+ }
+
+ //// -----------------------------------------------------------------------------
+ // //enum Unit:
+ // // N|
+ // // W|
+ //
+ //
+ //// S = 's'|
+ // // KG = 'kg'|
+ // // M = 'm'|
+ // // C|
+ // // NM|
+ // // RPM|
+ // // V|
+ // // A|
+ // // HZ = 'Hz'|
+ // // KW
+ // //;
+ //
+ //
+ //// LiteralArray = BooleanLiteral+|NumberLiteral+
+ // // LiteralArray = StringLiteral
+ // LiteralArray:
+ //
+ // literals+=Literal ("," literals+=Literal)*;
+ public LiteralArrayElements getLiteralArrayAccess() {
+ return (pLiteralArray != null) ? pLiteralArray : (pLiteralArray = new LiteralArrayElements());
+ }
+
+ public ParserRule getLiteralArrayRule() {
+ return getLiteralArrayAccess().getRule();
+ }
+
+ //// Value Types for Attributes
+ // Literal:
+ //
+ // BooleanLiteral | NumberLiteral | StringLiteral;
+ public LiteralElements getLiteralAccess() {
+ return (pLiteral != null) ? pLiteral : (pLiteral = new LiteralElements());
+ }
+
+ public ParserRule getLiteralRule() {
+ return getLiteralAccess().getRule();
+ }
+
+ //BooleanLiteral:
+ //
+ // {BooleanLiteral} ("false" | isTrue?="true");
+ public BooleanLiteralElements getBooleanLiteralAccess() {
+ return (pBooleanLiteral != null) ? pBooleanLiteral : (pBooleanLiteral = new BooleanLiteralElements());
+ }
+
+ public ParserRule getBooleanLiteralRule() {
+ return getBooleanLiteralAccess().getRule();
+ }
+
+ //NumberLiteral:
+ //
+ // IntLiteral | RealLiteral;
+ public NumberLiteralElements getNumberLiteralAccess() {
+ return (pNumberLiteral != null) ? pNumberLiteral : (pNumberLiteral = new NumberLiteralElements());
+ }
+
+ public ParserRule getNumberLiteralRule() {
+ return getNumberLiteralAccess().getRule();
+ }
+
+ //RealLiteral:
+ //
+ // {RealLiteral} value=Real;
+ public RealLiteralElements getRealLiteralAccess() {
+ return (pRealLiteral != null) ? pRealLiteral : (pRealLiteral = new RealLiteralElements());
+ }
+
+ public ParserRule getRealLiteralRule() {
+ return getRealLiteralAccess().getRule();
+ }
+
+ //IntLiteral:
+ //
+ // {IntLiteral} value=Integer;
+ public IntLiteralElements getIntLiteralAccess() {
+ return (pIntLiteral != null) ? pIntLiteral : (pIntLiteral = new IntLiteralElements());
+ }
+
+ public ParserRule getIntLiteralRule() {
+ return getIntLiteralAccess().getRule();
+ }
+
+ //StringLiteral:
+ //
+ // {StringLiteral} value=STRING;
+ public StringLiteralElements getStringLiteralAccess() {
+ return (pStringLiteral != null) ? pStringLiteral : (pStringLiteral = new StringLiteralElements());
+ }
+
+ public ParserRule getStringLiteralRule() {
+ return getStringLiteralAccess().getRule();
+ }
+
+ //Integer returns ecore::ELong:
+ //
+ // SignedInteger | Hexadecimal;
+ public IntegerElements getIntegerAccess() {
+ return (pInteger != null) ? pInteger : (pInteger = new IntegerElements());
+ }
+
+ public ParserRule getIntegerRule() {
+ return getIntegerAccess().getRule();
+ }
+
+ //SignedInteger hidden():
+ //
+ // ("+" | "-")? INT;
+ public SignedIntegerElements getSignedIntegerAccess() {
+ return (pSignedInteger != null) ? pSignedInteger : (pSignedInteger = new SignedIntegerElements());
+ }
+
+ public ParserRule getSignedIntegerRule() {
+ return getSignedIntegerAccess().getRule();
+ }
+
+ //Hexadecimal hidden():
+ //
+ // HEX;
+ public HexadecimalElements getHexadecimalAccess() {
+ return (pHexadecimal != null) ? pHexadecimal : (pHexadecimal = new HexadecimalElements());
+ }
+
+ public ParserRule getHexadecimalRule() {
+ return getHexadecimalAccess().getRule();
+ }
+
+ //Real returns ecore::EDouble:
+ //
+ // Decimal | DotDecimal | DecimalDot | DecimalExp;
+ public RealElements getRealAccess() {
+ return (pReal != null) ? pReal : (pReal = new RealElements());
+ }
+
+ public ParserRule getRealRule() {
+ return getRealAccess().getRule();
+ }
+
+ //Decimal hidden():
+ //
+ // ("+" | "-")? INT "." INT;
+ public DecimalElements getDecimalAccess() {
+ return (pDecimal != null) ? pDecimal : (pDecimal = new DecimalElements());
+ }
+
+ public ParserRule getDecimalRule() {
+ return getDecimalAccess().getRule();
+ }
+
+ //DotDecimal hidden():
+ //
+ // ("+" | "-")? "." INT;
+ public DotDecimalElements getDotDecimalAccess() {
+ return (pDotDecimal != null) ? pDotDecimal : (pDotDecimal = new DotDecimalElements());
+ }
+
+ public ParserRule getDotDecimalRule() {
+ return getDotDecimalAccess().getRule();
+ }
+
+ //DecimalDot hidden():
+ //
+ // ("+" | "-")? INT ".";
+ public DecimalDotElements getDecimalDotAccess() {
+ return (pDecimalDot != null) ? pDecimalDot : (pDecimalDot = new DecimalDotElements());
+ }
+
+ public ParserRule getDecimalDotRule() {
+ return getDecimalDotAccess().getRule();
+ }
+
+ //DecimalExp hidden():
+ //
+ // ("+" | "-")? INT "." INT EXP;
+ public DecimalExpElements getDecimalExpAccess() {
+ return (pDecimalExp != null) ? pDecimalExp : (pDecimalExp = new DecimalExpElements());
+ }
+
+ public ParserRule getDecimalExpRule() {
+ return getDecimalExpAccess().getRule();
+ }
+
+ //terminal EXP:
+ //
+ // ("e" | "E") ("+" | "-")? "0".."9"+;
+ public TerminalRule getEXPRule() {
+ return (tEXP != null) ? tEXP : (tEXP = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "EXP"));
+ }
+
+ //terminal HEX:
+ //
+ // ("0x" | "0X") ("0".."9" | "a".."f" | "A".."F")+;
+ public TerminalRule getHEXRule() {
+ return (tHEX != null) ? tHEX : (tHEX = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "HEX"));
+ }
+
+ //terminal ID:
+ //
+ // "^"? ("a".."z" | "A".."Z" | "_") ("a".."z" | "A".."Z" | "_" | "0".."9")*;
+ public TerminalRule getIDRule() {
+ return gaTerminals.getIDRule();
+ }
+
+ //terminal INT returns ecore::EInt:
+ //
+ // "0".."9"+;
+ public TerminalRule getINTRule() {
+ return gaTerminals.getINTRule();
+ }
+
+ //terminal STRING:
+ //
+ // "\"" ("\\" ("b" | "t" | "n" | "f" | "r" | "u" | "\"" | "\'" | "\\") | !("\\" | "\""))* "\"" | "\'" ("\\" ("b" | "t" |
+ //
+ // "n" | "f" | "r" | "u" | "\"" | "\'" | "\\") | !("\\" | "\'"))* "\'";
+ public TerminalRule getSTRINGRule() {
+ return gaTerminals.getSTRINGRule();
+ }
+
+ //terminal ML_COMMENT:
+ //
+ // "/ *"->"* /";
+ public TerminalRule getML_COMMENTRule() {
+ return gaTerminals.getML_COMMENTRule();
+ }
+
+ //terminal SL_COMMENT:
+ //
+ // "//" !("\n" | "\r")* ("\r"? "\n")?;
+ public TerminalRule getSL_COMMENTRule() {
+ return gaTerminals.getSL_COMMENTRule();
+ }
+
+ //terminal WS:
+ //
+ // (" " | "\t" | "\r" | "\n")+;
+ public TerminalRule getWSRule() {
+ return gaTerminals.getWSRule();
+ }
+
+ //terminal ANY_OTHER:
+ //
+ // .;
+ public TerminalRule getANY_OTHERRule() {
+ return gaTerminals.getANY_OTHERRule();
+ }
+}
diff --git a/plugins/org.eclipse.etrice.core.config/src-gen/org/eclipse/etrice/core/validation/AbstractConfigJavaValidator.java b/plugins/org.eclipse.etrice.core.config/src-gen/org/eclipse/etrice/core/validation/AbstractConfigJavaValidator.java
index 9eabc98a7..d01b86cec 100644
--- a/plugins/org.eclipse.etrice.core.config/src-gen/org/eclipse/etrice/core/validation/AbstractConfigJavaValidator.java
+++ b/plugins/org.eclipse.etrice.core.config/src-gen/org/eclipse/etrice/core/validation/AbstractConfigJavaValidator.java
@@ -1,18 +1,18 @@
-package org.eclipse.etrice.core.validation;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.xtext.validation.AbstractDeclarativeValidator;
-
-public class AbstractConfigJavaValidator extends AbstractDeclarativeValidator {
-
- @Override
- protected List<EPackage> getEPackages() {
- List<EPackage> result = new ArrayList<EPackage>();
- result.add(org.eclipse.etrice.core.config.ConfigPackage.eINSTANCE);
- return result;
- }
-
-}
+package org.eclipse.etrice.core.validation;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.xtext.validation.AbstractDeclarativeValidator;
+
+public class AbstractConfigJavaValidator extends AbstractDeclarativeValidator {
+
+ @Override
+ protected List<EPackage> getEPackages() {
+ List<EPackage> result = new ArrayList<EPackage>();
+ result.add(org.eclipse.etrice.core.config.ConfigPackage.eINSTANCE);
+ return result;
+ }
+
+}
diff --git a/plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/Config.xtext b/plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/Config.xtext
index dbe2a9e34..9ebaaa6c9 100644
--- a/plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/Config.xtext
+++ b/plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/Config.xtext
@@ -1,204 +1,204 @@
-/*******************************************************************************
- * Copyright (c) 2012 protos software gmbh (http://www.protos.de).
- * 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:
- * Juergen Haug and Thomas Schuetz (initial contribution)
- *
- *******************************************************************************/
-grammar org.eclipse.etrice.core.Config with org.eclipse.xtext.common.Terminals
-
-generate config "http://www.eclipse.org/etrice/core/Config"
-import "http://www.eclipse.org/emf/2002/Ecore" as ecore
-import "platform:/resource/org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore" as room
-
-ConfigModel:
- imports+=Import*
- configElements+=ConfigElement*;
-
-ConfigElement:
- SubSystemConfig | ActorClassConfig | ActorInstanceConfig | ProtocolClassConfig;
-
-SubSystemConfig:
- 'SubSystemConfig' subSystem=[room::SubSystemClass] '{'
- dynConfig=DynamicConfig
- '}';
-
-DynamicConfig:
- 'dynamic configuration' '{'
- (
- (('file path' filePath=STRING) |
- (('user import' userCode1=STRING)
- ('user constructor' userCode2=STRING))) &
- ('polling timer [ms]' polling=INT)?
- )
- '}';
-
- /*
- * Validation:
- * duplicates config, attributes
- */
-ActorClassConfig:
- 'ActorClassConfig' actor=[room::ActorClass|FQN] '{'
- (attributes+=AttrClassConfig)*
- '}';
-
- /*
- * Validation:
- * duplicates config, attributes
- * valid instance reference
- * Proposal:
- * attributes
- */
-ActorInstanceConfig:
- 'ActorInstanceConfig' root=[room::SubSystemClass|FQN] '/' path=RefPath '{'
- (
- (attributes+=AttrInstanceConfig)* &
- (ports+=PortInstanceConfig)*
- )
- '}';
-
-ProtocolClassConfig:
- 'ProtocolClassConfig' protocol=[room::ProtocolClass|FQN] '{'
- (
- ('regular' regular=PortClassConfig)? &
- ('conjugate' conjugated=PortClassConfig)?
- )
- '}';
-
-PortClassConfig:
- {PortClassConfig} 'Port' '{'
- (attributes+=AttrClassConfig)*
- '}';
-
-PortInstanceConfig:
- 'InterfaceItem' item=[room::InterfaceItem|ID] '{'
- (attributes+=AttrInstanceConfig)*
- '}';
-
- /*
- * Validation:
- * correct value type
- * Proposal:
- * correct Literal
- */
-AttrConfig:
- AttrClassConfig | AttrInstanceConfig;
-
- /*
- * Validation:
- * correct min, max type + available
- * min <= value <= max
- * if !value -> min <= attribute.defaultValue <= max
- * character length
- *
- */
-AttrClassConfig:
- 'Attr' attribute=[room::Attribute] ('=' value=LiteralArray)? ('{'
- (
- ('min' '=' min=NumberLiteral)?
- ('max' '=' max=NumberLiteral)?
- (attributes+=AttrClassConfig)*
- )
- '}')?;
-
-AttrInstanceConfig:
- 'Attr' attribute=[room::Attribute] ('=' value=LiteralArray)? ('{'
- (
- (dynConfig?='dynamic configuration' (readOnly?='read' | 'write'))?
- (attributes+=AttrInstanceConfig*)
- )
- '}')?;
-
- /*
- * Proposal:
- * for ActorInstanceConfig
- */
-RefPath:
- refs+=ID ('/' refs+=ID)*;
-
- // -------------------- from org.eclipse.etrice.core.Room.xtext ---------------
-Import:
- 'import' (importedNamespace=ImportedFQN 'from' | 'model') importURI=STRING;
-
-ImportedFQN:
- FQN ('.*')?;
-
-FQN:
- ID ('.' ID)*;
-
- // -----------------------------------------------------------------------------
-
-//enum Unit:
-// N|
-// W|
-// S = 's'|
-// KG = 'kg'|
-// M = 'm'|
-// C|
-// NM|
-// RPM|
-// V|
-// A|
-// HZ = 'Hz'|
-// KW
-//;
-
-// LiteralArray = BooleanLiteral+|NumberLiteral+
-// LiteralArray = StringLiteral
-LiteralArray:
- literals+=Literal (',' literals+=Literal)*;
-
- // Value Types for Attributes
-Literal:
- BooleanLiteral |
- NumberLiteral |
- StringLiteral;
-
-BooleanLiteral:
- {BooleanLiteral} ('false' | isTrue?='true');
-
-NumberLiteral:
- IntLiteral | RealLiteral;
-
-RealLiteral:
- {RealLiteral} value=Real;
-
-IntLiteral:
- {IntLiteral} value=Integer;
-
-StringLiteral:
- {StringLiteral} value=STRING;
-
-Integer returns ecore::ELong:
- SignedInteger | Hexadecimal;
-
-SignedInteger hidden():
- ('+' | '-')? INT;
-
-Hexadecimal hidden():
- HEX;
-
-Real returns ecore::EDouble:
- Decimal | DotDecimal | DecimalDot | DecimalExp;
-
-Decimal hidden():
- ('+' | '-')? INT '.' INT;
-
-DotDecimal hidden():
- ('+' | '-')? '.' INT;
-
-DecimalDot hidden():
- ('+' | '-')? INT '.';
-
-DecimalExp hidden():
- ('+' | '-')? INT '.' INT EXP;
-
-terminal EXP:
- ('e'|'E') ('+' | '-')? ('0'..'9')+;
-
-terminal HEX:
- ('0x' | '0X') ('0'..'9' | 'a'..'f' | 'A'..'F')+;
+/*******************************************************************************
+ * Copyright (c) 2012 protos software gmbh (http://www.protos.de).
+ * 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:
+ * Juergen Haug and Thomas Schuetz (initial contribution)
+ *
+ *******************************************************************************/
+grammar org.eclipse.etrice.core.Config with org.eclipse.xtext.common.Terminals
+
+generate config "http://www.eclipse.org/etrice/core/Config"
+import "http://www.eclipse.org/emf/2002/Ecore" as ecore
+import "platform:/resource/org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore" as room
+
+ConfigModel:
+ imports+=Import*
+ configElements+=ConfigElement*;
+
+ConfigElement:
+ SubSystemConfig | ActorClassConfig | ActorInstanceConfig | ProtocolClassConfig;
+
+SubSystemConfig:
+ 'SubSystemConfig' subSystem=[room::SubSystemClass] '{'
+ dynConfig=DynamicConfig
+ '}';
+
+DynamicConfig:
+ 'dynamic configuration' '{'
+ (
+ (('file path' filePath=STRING) |
+ (('user import' userCode1=STRING)
+ ('user constructor' userCode2=STRING))) &
+ ('polling timer [ms]' polling=INT)?
+ )
+ '}';
+
+ /*
+ * Validation:
+ * duplicates config, attributes
+ */
+ActorClassConfig:
+ 'ActorClassConfig' actor=[room::ActorClass|FQN] '{'
+ (attributes+=AttrClassConfig)*
+ '}';
+
+ /*
+ * Validation:
+ * duplicates config, attributes
+ * valid instance reference
+ * Proposal:
+ * attributes
+ */
+ActorInstanceConfig:
+ 'ActorInstanceConfig' root=[room::SubSystemClass|FQN] '/' path=RefPath '{'
+ (
+ (attributes+=AttrInstanceConfig)* &
+ (ports+=PortInstanceConfig)*
+ )
+ '}';
+
+ProtocolClassConfig:
+ 'ProtocolClassConfig' protocol=[room::ProtocolClass|FQN] '{'
+ (
+ ('regular' regular=PortClassConfig)? &
+ ('conjugate' conjugated=PortClassConfig)?
+ )
+ '}';
+
+PortClassConfig:
+ {PortClassConfig} 'Port' '{'
+ (attributes+=AttrClassConfig)*
+ '}';
+
+PortInstanceConfig:
+ 'InterfaceItem' item=[room::InterfaceItem|ID] '{'
+ (attributes+=AttrInstanceConfig)*
+ '}';
+
+ /*
+ * Validation:
+ * correct value type
+ * Proposal:
+ * correct Literal
+ */
+AttrConfig:
+ AttrClassConfig | AttrInstanceConfig;
+
+ /*
+ * Validation:
+ * correct min, max type + available
+ * min <= value <= max
+ * if !value -> min <= attribute.defaultValue <= max
+ * character length
+ *
+ */
+AttrClassConfig:
+ 'Attr' attribute=[room::Attribute] ('=' value=LiteralArray)? ('{'
+ (
+ ('min' '=' min=NumberLiteral)?
+ ('max' '=' max=NumberLiteral)?
+ (attributes+=AttrClassConfig)*
+ )
+ '}')?;
+
+AttrInstanceConfig:
+ 'Attr' attribute=[room::Attribute] ('=' value=LiteralArray)? ('{'
+ (
+ (dynConfig?='dynamic configuration' (readOnly?='read' | 'write'))?
+ (attributes+=AttrInstanceConfig*)
+ )
+ '}')?;
+
+ /*
+ * Proposal:
+ * for ActorInstanceConfig
+ */
+RefPath:
+ refs+=ID ('/' refs+=ID)*;
+
+ // -------------------- from org.eclipse.etrice.core.Room.xtext ---------------
+Import:
+ 'import' (importedNamespace=ImportedFQN 'from' | 'model') importURI=STRING;
+
+ImportedFQN:
+ FQN ('.*')?;
+
+FQN:
+ ID ('.' ID)*;
+
+ // -----------------------------------------------------------------------------
+
+//enum Unit:
+// N|
+// W|
+// S = 's'|
+// KG = 'kg'|
+// M = 'm'|
+// C|
+// NM|
+// RPM|
+// V|
+// A|
+// HZ = 'Hz'|
+// KW
+//;
+
+// LiteralArray = BooleanLiteral+|NumberLiteral+
+// LiteralArray = StringLiteral
+LiteralArray:
+ literals+=Literal (',' literals+=Literal)*;
+
+ // Value Types for Attributes
+Literal:
+ BooleanLiteral |
+ NumberLiteral |
+ StringLiteral;
+
+BooleanLiteral:
+ {BooleanLiteral} ('false' | isTrue?='true');
+
+NumberLiteral:
+ IntLiteral | RealLiteral;
+
+RealLiteral:
+ {RealLiteral} value=Real;
+
+IntLiteral:
+ {IntLiteral} value=Integer;
+
+StringLiteral:
+ {StringLiteral} value=STRING;
+
+Integer returns ecore::ELong:
+ SignedInteger | Hexadecimal;
+
+SignedInteger hidden():
+ ('+' | '-')? INT;
+
+Hexadecimal hidden():
+ HEX;
+
+Real returns ecore::EDouble:
+ Decimal | DotDecimal | DecimalDot | DecimalExp;
+
+Decimal hidden():
+ ('+' | '-')? INT '.' INT;
+
+DotDecimal hidden():
+ ('+' | '-')? '.' INT;
+
+DecimalDot hidden():
+ ('+' | '-')? INT '.';
+
+DecimalExp hidden():
+ ('+' | '-')? INT '.' INT EXP;
+
+terminal EXP:
+ ('e'|'E') ('+' | '-')? ('0'..'9')+;
+
+terminal HEX:
+ ('0x' | '0X') ('0'..'9' | 'a'..'f' | 'A'..'F')+;
diff --git a/plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/ConfigRuntimeModule.java b/plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/ConfigRuntimeModule.java
index 831ce5ece..2882444e4 100644
--- a/plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/ConfigRuntimeModule.java
+++ b/plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/ConfigRuntimeModule.java
@@ -1,54 +1,54 @@
-/*******************************************************************************
- * Copyright (c) 2012 Juergen Haug
- * 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:
- * Juergen Haug
- *
- *******************************************************************************/
-
-package org.eclipse.etrice.core;
-
-import org.eclipse.etrice.core.converter.ConfigValueConverterService;
-import org.eclipse.etrice.core.scoping.PlatformRelativeUriResolver;
-import org.eclipse.xtext.conversion.IValueConverterService;
-import org.eclipse.xtext.scoping.impl.ImportUriResolver;
-
-import com.google.inject.Binder;
-
-/**
- * Use this class to register components to be used at runtime / without the
- * Equinox extension registry.
- */
-public class ConfigRuntimeModule extends
- org.eclipse.etrice.core.AbstractConfigRuntimeModule {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.etrice.core.AbstractRoomRuntimeModule#
- * configureIScopeProviderDelegate(com.google.inject.Binder)
- */
- @Override
- public void configureIScopeProviderDelegate(Binder binder) {
- binder.bind(org.eclipse.xtext.scoping.IScopeProvider.class)
- .annotatedWith(
- com.google.inject.name.Names
- .named(org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider.NAMED_DELEGATE))
- .to(org.eclipse.xtext.scoping.impl.ImportedNamespaceAwareLocalScopeProvider.class);
- }
-
- // HOWTO: use URI imports - need special URI resolver
- public Class<? extends ImportUriResolver> bindImportUriResolver() {
- return PlatformRelativeUriResolver.class;
- }
-
- @Override
- public Class<? extends IValueConverterService> bindIValueConverterService() {
- return ConfigValueConverterService.class;
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2012 Juergen Haug
+ * 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:
+ * Juergen Haug
+ *
+ *******************************************************************************/
+
+package org.eclipse.etrice.core;
+
+import org.eclipse.etrice.core.converter.ConfigValueConverterService;
+import org.eclipse.etrice.core.scoping.PlatformRelativeUriResolver;
+import org.eclipse.xtext.conversion.IValueConverterService;
+import org.eclipse.xtext.scoping.impl.ImportUriResolver;
+
+import com.google.inject.Binder;
+
+/**
+ * Use this class to register components to be used at runtime / without the
+ * Equinox extension registry.
+ */
+public class ConfigRuntimeModule extends
+ org.eclipse.etrice.core.AbstractConfigRuntimeModule {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.etrice.core.AbstractRoomRuntimeModule#
+ * configureIScopeProviderDelegate(com.google.inject.Binder)
+ */
+ @Override
+ public void configureIScopeProviderDelegate(Binder binder) {
+ binder.bind(org.eclipse.xtext.scoping.IScopeProvider.class)
+ .annotatedWith(
+ com.google.inject.name.Names
+ .named(org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider.NAMED_DELEGATE))
+ .to(org.eclipse.xtext.scoping.impl.ImportedNamespaceAwareLocalScopeProvider.class);
+ }
+
+ // HOWTO: use URI imports - need special URI resolver
+ public Class<? extends ImportUriResolver> bindImportUriResolver() {
+ return PlatformRelativeUriResolver.class;
+ }
+
+ @Override
+ public Class<? extends IValueConverterService> bindIValueConverterService() {
+ return ConfigValueConverterService.class;
+ }
+
+}
diff --git a/plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/ConfigStandaloneSetup.java b/plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/ConfigStandaloneSetup.java
index a7912b044..b602020e2 100644
--- a/plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/ConfigStandaloneSetup.java
+++ b/plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/ConfigStandaloneSetup.java
@@ -1,24 +1,24 @@
-/*******************************************************************************
- * Copyright (c) 2012 Juergen Haug
- * 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:
- * Juergen Haug
- *
- *******************************************************************************/
-
-package org.eclipse.etrice.core;
-
-/**
- * Initialization support for running Xtext languages without equinox extension
- * registry
- */
-public class ConfigStandaloneSetup extends ConfigStandaloneSetupGenerated {
-
- public static void doSetup() {
- new ConfigStandaloneSetup().createInjectorAndDoEMFRegistration();
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2012 Juergen Haug
+ * 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:
+ * Juergen Haug
+ *
+ *******************************************************************************/
+
+package org.eclipse.etrice.core;
+
+/**
+ * Initialization support for running Xtext languages without equinox extension
+ * registry
+ */
+public class ConfigStandaloneSetup extends ConfigStandaloneSetupGenerated {
+
+ public static void doSetup() {
+ new ConfigStandaloneSetup().createInjectorAndDoEMFRegistration();
+ }
+}
diff --git a/plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/formatting/ConfigFormatter.java b/plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/formatting/ConfigFormatter.java
index a5be3a1a8..03d31e61f 100644
--- a/plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/formatting/ConfigFormatter.java
+++ b/plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/formatting/ConfigFormatter.java
@@ -1,74 +1,74 @@
-/*******************************************************************************
- * Copyright (c) 2012 Juergen Haug
- * 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:
- * Juergen Haug
- *
- *******************************************************************************/
-
-package org.eclipse.etrice.core.formatting;
-
-import org.eclipse.etrice.core.services.ConfigGrammarAccess;
-import org.eclipse.xtext.Keyword;
-import org.eclipse.xtext.formatting.impl.AbstractDeclarativeFormatter;
-import org.eclipse.xtext.formatting.impl.FormattingConfig;
-import org.eclipse.xtext.util.Pair;
-
-/**
- * This class contains custom formatting description.
- *
- * see : http://www.eclipse.org/Xtext/documentation/latest/xtext.html#formatting
- * on how and when to use it
- *
- * Also see {@link org.eclipse.xtext.xtext.XtextFormattingTokenSerializer} as an example
- */
-public class ConfigFormatter extends AbstractDeclarativeFormatter {
-
- @Override
- protected void configureFormatting(FormattingConfig c) {
- ConfigGrammarAccess f = (ConfigGrammarAccess) getGrammarAccess();
-
- // general
-
- c.setAutoLinewrap(120);
- c.setLinewrap(1).before(f.getSL_COMMENTRule());
- c.setLinewrap(2).before(f.getML_COMMENTRule());
-
- for (Pair<Keyword, Keyword> pair : f.findKeywordPairs("{", "}")) {
- c.setLinewrap().after(pair.getFirst());
- c.setIndentationIncrement().after(pair.getFirst());
- c.setLinewrap().before(pair.getSecond());
- c.setIndentationDecrement().before(pair.getSecond());
- c.setSpace(" ").between(pair.getFirst(), pair.getSecond());
- }
-
- for (Keyword k: f.findKeywords("(", "|", ".", "*")) {
- c.setNoSpace().around(k);
- }
-
- for (Keyword k: f.findKeywords("<", "~")) {
- c.setNoSpace().after(k);
- }
- for (Keyword k: f.findKeywords(")", ">", ",", ":")) {
- c.setNoSpace().before(k);
- }
-
- for (Keyword k: f.findKeywords("regular","conjugate")) {
- c.setLinewrap().before(k);
- }
-
- c.setLinewrap(1).after(f.getImportRule());
-
- c.setLinewrap(2).around(f.getActorClassConfigRule());
- c.setLinewrap(2).around(f.getProtocolClassConfigRule());
- c.setLinewrap(2).around(f.getActorInstanceConfigRule());
-
- c.setLinewrap(1).around(f.getAttrClassConfigRule());
- c.setLinewrap(1).around(f.getAttrInstanceConfigRule());
- c.setLinewrap(1).around(f.getPortInstanceConfigRule());
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2012 Juergen Haug
+ * 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:
+ * Juergen Haug
+ *
+ *******************************************************************************/
+
+package org.eclipse.etrice.core.formatting;
+
+import org.eclipse.etrice.core.services.ConfigGrammarAccess;
+import org.eclipse.xtext.Keyword;
+import org.eclipse.xtext.formatting.impl.AbstractDeclarativeFormatter;
+import org.eclipse.xtext.formatting.impl.FormattingConfig;
+import org.eclipse.xtext.util.Pair;
+
+/**
+ * This class contains custom formatting description.
+ *
+ * see : http://www.eclipse.org/Xtext/documentation/latest/xtext.html#formatting
+ * on how and when to use it
+ *
+ * Also see {@link org.eclipse.xtext.xtext.XtextFormattingTokenSerializer} as an example
+ */
+public class ConfigFormatter extends AbstractDeclarativeFormatter {
+
+ @Override
+ protected void configureFormatting(FormattingConfig c) {
+ ConfigGrammarAccess f = (ConfigGrammarAccess) getGrammarAccess();
+
+ // general
+
+ c.setAutoLinewrap(120);
+ c.setLinewrap(1).before(f.getSL_COMMENTRule());
+ c.setLinewrap(2).before(f.getML_COMMENTRule());
+
+ for (Pair<Keyword, Keyword> pair : f.findKeywordPairs("{", "}")) {
+ c.setLinewrap().after(pair.getFirst());
+ c.setIndentationIncrement().after(pair.getFirst());
+ c.setLinewrap().before(pair.getSecond());
+ c.setIndentationDecrement().before(pair.getSecond());
+ c.setSpace(" ").between(pair.getFirst(), pair.getSecond());
+ }
+
+ for (Keyword k: f.findKeywords("(", "|", ".", "*")) {
+ c.setNoSpace().around(k);
+ }
+
+ for (Keyword k: f.findKeywords("<", "~")) {
+ c.setNoSpace().after(k);
+ }
+ for (Keyword k: f.findKeywords(")", ">", ",", ":")) {
+ c.setNoSpace().before(k);
+ }
+
+ for (Keyword k: f.findKeywords("regular","conjugate")) {
+ c.setLinewrap().before(k);
+ }
+
+ c.setLinewrap(1).after(f.getImportRule());
+
+ c.setLinewrap(2).around(f.getActorClassConfigRule());
+ c.setLinewrap(2).around(f.getProtocolClassConfigRule());
+ c.setLinewrap(2).around(f.getActorInstanceConfigRule());
+
+ c.setLinewrap(1).around(f.getAttrClassConfigRule());
+ c.setLinewrap(1).around(f.getAttrInstanceConfigRule());
+ c.setLinewrap(1).around(f.getPortInstanceConfigRule());
+ }
+}
diff --git a/plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/generator/ConfigGenerator.xtend b/plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/generator/ConfigGenerator.xtend
index db116bd88..78f006b63 100644
--- a/plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/generator/ConfigGenerator.xtend
+++ b/plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/generator/ConfigGenerator.xtend
@@ -1,15 +1,15 @@
-/*
- * generated by Xtext
- */
-package org.eclipse.etrice.core.generator
-
-import org.eclipse.emf.ecore.resource.Resource
-import org.eclipse.xtext.generator.IGenerator
-import org.eclipse.xtext.generator.IFileSystemAccess
-
-class ConfigGenerator implements IGenerator {
-
- override void doGenerate(Resource resource, IFileSystemAccess fsa) {
- //TODO implement me
- }
-}
+/*
+ * generated by Xtext
+ */
+package org.eclipse.etrice.core.generator
+
+import org.eclipse.emf.ecore.resource.Resource
+import org.eclipse.xtext.generator.IGenerator
+import org.eclipse.xtext.generator.IFileSystemAccess
+
+class ConfigGenerator implements IGenerator {
+
+ override void doGenerate(Resource resource, IFileSystemAccess fsa) {
+ //TODO implement me
+ }
+}
diff --git a/plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/scoping/ConfigScopeProvider.java b/plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/scoping/ConfigScopeProvider.java
index 32eba06c4..c241dfadd 100644
--- a/plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/scoping/ConfigScopeProvider.java
+++ b/plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/scoping/ConfigScopeProvider.java
@@ -1,143 +1,143 @@
-/*******************************************************************************
- * Copyright (c) 2012 Juergen Haug
- * 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:
- * Juergen Haug
- *
- *******************************************************************************/
-
-package org.eclipse.etrice.core.scoping;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.etrice.core.config.ActorClassConfig;
-import org.eclipse.etrice.core.config.ActorInstanceConfig;
-import org.eclipse.etrice.core.config.AttrConfig;
-import org.eclipse.etrice.core.config.PortClassConfig;
-import org.eclipse.etrice.core.config.PortInstanceConfig;
-import org.eclipse.etrice.core.config.ProtocolClassConfig;
-import org.eclipse.etrice.core.config.util.ConfigUtil;
-import org.eclipse.etrice.core.room.ActorClass;
-import org.eclipse.etrice.core.room.Attribute;
-import org.eclipse.etrice.core.room.DataClass;
-import org.eclipse.etrice.core.room.InterfaceItem;
-import org.eclipse.etrice.core.room.PortClass;
-import org.eclipse.etrice.core.room.SubSystemClass;
-import org.eclipse.etrice.core.room.util.RoomHelpers;
-import org.eclipse.xtext.resource.EObjectDescription;
-import org.eclipse.xtext.resource.IEObjectDescription;
-import org.eclipse.xtext.scoping.IScope;
-import org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider;
-import org.eclipse.xtext.scoping.impl.SimpleScope;
-
-/**
- * This class contains custom scoping description.
- *
- * @see http://www.eclipse.org/Xtext/documentation/latest/xtext.html#scoping on
- * how and when to use it
- *
- */
-public class ConfigScopeProvider extends AbstractDeclarativeScopeProvider {
-
- public IScope scope_PortInstanceConfig_item(PortInstanceConfig ctx,
- EReference ref) {
- final List<IEObjectDescription> scopes = new ArrayList<IEObjectDescription>();
-
- ActorInstanceConfig actorConfig = (ActorInstanceConfig) ctx
- .eContainer();
- SubSystemClass subsystem = actorConfig.getRoot();
- if (subsystem != null) {
- ActorClass ac = ConfigUtil
- .resolve(subsystem, actorConfig.getPath());
- for (InterfaceItem item : ConfigUtil.getConfigurableInterfaceItems(
- ac, true))
- scopes.add(EObjectDescription.create(item.getName(), item));
- }
-
- return new SimpleScope(IScope.NULLSCOPE, scopes);
- }
-
- public IScope scope_AttrConfig_attribute(AttrConfig ctx, EReference ref) {
- final List<IEObjectDescription> scopes = new ArrayList<IEObjectDescription>();
-
- if (ctx.eContainer() instanceof AttrConfig)
- collectAttributes((AttrConfig) ctx.eContainer(), scopes);
- else if (ctx.eContainer() instanceof ActorClassConfig)
- collectAttributes((ActorClassConfig) ctx.eContainer(), scopes);
- else if (ctx.eContainer() instanceof ActorInstanceConfig)
- collectAttributes((ActorInstanceConfig) ctx.eContainer(), scopes);
- else if (ctx.eContainer() instanceof PortClassConfig)
- collectAttributes((PortClassConfig) ctx.eContainer(), scopes);
- else if (ctx.eContainer() instanceof PortInstanceConfig)
- collectAttributes((PortInstanceConfig) ctx.eContainer(), scopes);
- return new SimpleScope(IScope.NULLSCOPE, scopes);
- }
-
- private void collectAttributes(AttrConfig config,
- List<IEObjectDescription> scopes) {
- if (config.getAttribute().getRefType().getType() instanceof DataClass) {
- DataClass dc = (DataClass) config.getAttribute().getRefType()
- .getType();
- for (Attribute att : RoomHelpers.getAllAttributes(dc)) {
- scopes.add(EObjectDescription.create(att.getName(), att));
- }
- }
- }
-
- private void collectAttributes(ActorClassConfig config,
- List<IEObjectDescription> scopes) {
- ActorClass actor = config.getActor();
- if (actor != null) {
- for (Attribute att : RoomHelpers.getAllAttributes(actor)) {
- scopes.add(EObjectDescription.create(att.getName(), att));
- }
- }
- }
-
- private void collectAttributes(ActorInstanceConfig config,
- List<IEObjectDescription> scopes) {
- SubSystemClass subsystem = config.getRoot();
- if (subsystem != null) {
- ActorClass actor = ConfigUtil.resolve(subsystem, config.getPath());
- for (Attribute att : RoomHelpers.getAllAttributes(actor)) {
- scopes.add(EObjectDescription.create(att.getName(), att));
- }
- }
- }
-
- private void collectAttributes(PortClassConfig config,
- List<IEObjectDescription> scopes) {
- ProtocolClassConfig protocolConfig = (ProtocolClassConfig) config
- .eContainer();
- PortClass portClass = null;
- if (protocolConfig.getRegular() == config)
- portClass = protocolConfig.getProtocol().getRegular();
- else
- portClass = protocolConfig.getProtocol().getConjugate();
-
- if (portClass != null)
- for (Attribute att : portClass.getAttributes())
- scopes.add(EObjectDescription.create(att.getName(), att));
- }
-
- private void collectAttributes(PortInstanceConfig config,
- List<IEObjectDescription> scopes) {
- PortClass portClass = ConfigUtil.getPortClass(config);
- if (portClass != null)
- for (Attribute att : portClass.getAttributes())
- scopes.add(EObjectDescription.create(att.getName(), att));
- }
-}
-
-/*
- * IScope scope_<RefDeclaringEClass>_<Reference>( <ContextType> ctx, EReference
- * ref)
- *
- * IScope scope_<TypeToReturn>(<ContextType> ctx, EReference ref)
- */
+/*******************************************************************************
+ * Copyright (c) 2012 Juergen Haug
+ * 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:
+ * Juergen Haug
+ *
+ *******************************************************************************/
+
+package org.eclipse.etrice.core.scoping;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.etrice.core.config.ActorClassConfig;
+import org.eclipse.etrice.core.config.ActorInstanceConfig;
+import org.eclipse.etrice.core.config.AttrConfig;
+import org.eclipse.etrice.core.config.PortClassConfig;
+import org.eclipse.etrice.core.config.PortInstanceConfig;
+import org.eclipse.etrice.core.config.ProtocolClassConfig;
+import org.eclipse.etrice.core.config.util.ConfigUtil;
+import org.eclipse.etrice.core.room.ActorClass;
+import org.eclipse.etrice.core.room.Attribute;
+import org.eclipse.etrice.core.room.DataClass;
+import org.eclipse.etrice.core.room.InterfaceItem;
+import org.eclipse.etrice.core.room.PortClass;
+import org.eclipse.etrice.core.room.SubSystemClass;
+import org.eclipse.etrice.core.room.util.RoomHelpers;
+import org.eclipse.xtext.resource.EObjectDescription;
+import org.eclipse.xtext.resource.IEObjectDescription;
+import org.eclipse.xtext.scoping.IScope;
+import org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider;
+import org.eclipse.xtext.scoping.impl.SimpleScope;
+
+/**
+ * This class contains custom scoping description.
+ *
+ * @see http://www.eclipse.org/Xtext/documentation/latest/xtext.html#scoping on
+ * how and when to use it
+ *
+ */
+public class ConfigScopeProvider extends AbstractDeclarativeScopeProvider {
+
+ public IScope scope_PortInstanceConfig_item(PortInstanceConfig ctx,
+ EReference ref) {
+ final List<IEObjectDescription> scopes = new ArrayList<IEObjectDescription>();
+
+ ActorInstanceConfig actorConfig = (ActorInstanceConfig) ctx
+ .eContainer();
+ SubSystemClass subsystem = actorConfig.getRoot();
+ if (subsystem != null) {
+ ActorClass ac = ConfigUtil
+ .resolve(subsystem, actorConfig.getPath());
+ for (InterfaceItem item : ConfigUtil.getConfigurableInterfaceItems(
+ ac, true))
+ scopes.add(EObjectDescription.create(item.getName(), item));
+ }
+
+ return new SimpleScope(IScope.NULLSCOPE, scopes);
+ }
+
+ public IScope scope_AttrConfig_attribute(AttrConfig ctx, EReference ref) {
+ final List<IEObjectDescription> scopes = new ArrayList<IEObjectDescription>();
+
+ if (ctx.eContainer() instanceof AttrConfig)
+ collectAttributes((AttrConfig) ctx.eContainer(), scopes);
+ else if (ctx.eContainer() instanceof ActorClassConfig)
+ collectAttributes((ActorClassConfig) ctx.eContainer(), scopes);
+ else if (ctx.eContainer() instanceof ActorInstanceConfig)
+ collectAttributes((ActorInstanceConfig) ctx.eContainer(), scopes);
+ else if (ctx.eContainer() instanceof PortClassConfig)
+ collectAttributes((PortClassConfig) ctx.eContainer(), scopes);
+ else if (ctx.eContainer() instanceof PortInstanceConfig)
+ collectAttributes((PortInstanceConfig) ctx.eContainer(), scopes);
+ return new SimpleScope(IScope.NULLSCOPE, scopes);
+ }
+
+ private void collectAttributes(AttrConfig config,
+ List<IEObjectDescription> scopes) {
+ if (config.getAttribute().getRefType().getType() instanceof DataClass) {
+ DataClass dc = (DataClass) config.getAttribute().getRefType()
+ .getType();
+ for (Attribute att : RoomHelpers.getAllAttributes(dc)) {
+ scopes.add(EObjectDescription.create(att.getName(), att));
+ }
+ }
+ }
+
+ private void collectAttributes(ActorClassConfig config,
+ List<IEObjectDescription> scopes) {
+ ActorClass actor = config.getActor();
+ if (actor != null) {
+ for (Attribute att : RoomHelpers.getAllAttributes(actor)) {
+ scopes.add(EObjectDescription.create(att.getName(), att));
+ }
+ }
+ }
+
+ private void collectAttributes(ActorInstanceConfig config,
+ List<IEObjectDescription> scopes) {
+ SubSystemClass subsystem = config.getRoot();
+ if (subsystem != null) {
+ ActorClass actor = ConfigUtil.resolve(subsystem, config.getPath());
+ for (Attribute att : RoomHelpers.getAllAttributes(actor)) {
+ scopes.add(EObjectDescription.create(att.getName(), att));
+ }
+ }
+ }
+
+ private void collectAttributes(PortClassConfig config,
+ List<IEObjectDescription> scopes) {
+ ProtocolClassConfig protocolConfig = (ProtocolClassConfig) config
+ .eContainer();
+ PortClass portClass = null;
+ if (protocolConfig.getRegular() == config)
+ portClass = protocolConfig.getProtocol().getRegular();
+ else
+ portClass = protocolConfig.getProtocol().getConjugate();
+
+ if (portClass != null)
+ for (Attribute att : portClass.getAttributes())
+ scopes.add(EObjectDescription.create(att.getName(), att));
+ }
+
+ private void collectAttributes(PortInstanceConfig config,
+ List<IEObjectDescription> scopes) {
+ PortClass portClass = ConfigUtil.getPortClass(config);
+ if (portClass != null)
+ for (Attribute att : portClass.getAttributes())
+ scopes.add(EObjectDescription.create(att.getName(), att));
+ }
+}
+
+/*
+ * IScope scope_<RefDeclaringEClass>_<Reference>( <ContextType> ctx, EReference
+ * ref)
+ *
+ * IScope scope_<TypeToReturn>(<ContextType> ctx, EReference ref)
+ */
diff --git a/plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/validation/ConfigJavaValidator.java b/plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/validation/ConfigJavaValidator.java
index 50b3ba135..981b84728 100644
--- a/plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/validation/ConfigJavaValidator.java
+++ b/plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/validation/ConfigJavaValidator.java
@@ -1,493 +1,493 @@
-/*******************************************************************************
- * Copyright (c) 2012 Juergen Haug
- * 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:
- * Juergen Haug
- *
- *******************************************************************************/
-
-package org.eclipse.etrice.core.validation;
-
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.etrice.core.config.ActorClassConfig;
-import org.eclipse.etrice.core.config.ActorInstanceConfig;
-import org.eclipse.etrice.core.config.AttrClassConfig;
-import org.eclipse.etrice.core.config.AttrConfig;
-import org.eclipse.etrice.core.config.AttrInstanceConfig;
-import org.eclipse.etrice.core.config.BooleanLiteral;
-import org.eclipse.etrice.core.config.ConfigModel;
-import org.eclipse.etrice.core.config.ConfigPackage;
-import org.eclipse.etrice.core.config.IntLiteral;
-import org.eclipse.etrice.core.config.Literal;
-import org.eclipse.etrice.core.config.NumberLiteral;
-import org.eclipse.etrice.core.config.PortClassConfig;
-import org.eclipse.etrice.core.config.PortInstanceConfig;
-import org.eclipse.etrice.core.config.ProtocolClassConfig;
-import org.eclipse.etrice.core.config.RealLiteral;
-import org.eclipse.etrice.core.config.RefPath;
-import org.eclipse.etrice.core.config.StringLiteral;
-import org.eclipse.etrice.core.config.SubSystemConfig;
-import org.eclipse.etrice.core.config.util.ConfigUtil;
-import org.eclipse.etrice.core.converter.ConfigValueConverterService;
-import org.eclipse.etrice.core.room.ActorClass;
-import org.eclipse.etrice.core.room.ActorContainerClass;
-import org.eclipse.etrice.core.room.ActorRef;
-import org.eclipse.etrice.core.room.Attribute;
-import org.eclipse.etrice.core.room.DataType;
-import org.eclipse.etrice.core.room.InterfaceItem;
-import org.eclipse.etrice.core.room.LiteralType;
-import org.eclipse.etrice.core.room.PrimitiveType;
-import org.eclipse.etrice.core.room.ProtocolClass;
-import org.eclipse.etrice.core.room.SubSystemClass;
-import org.eclipse.xtext.conversion.ValueConverterException;
-import org.eclipse.xtext.validation.Check;
-
-public class ConfigJavaValidator extends AbstractConfigJavaValidator {
-
- private ConfigValueConverterService converter = new ConfigValueConverterService();
-
- @Check
- public void checkConfigModel(ConfigModel model) {
- // duplicate actor class config check
- Set<ActorClass> actorClasses = new HashSet<ActorClass>();
- for (ActorClassConfig classConfig : model.getActorClassConfigs()) {
- if (actorClasses.contains(classConfig.getActor()))
- error("duplicate class config", model,
- ConfigPackage.Literals.CONFIG_MODEL__CONFIG_ELEMENTS,
- model.getConfigElements().indexOf(classConfig));
- else
- actorClasses.add(classConfig.getActor());
- }
- // duplicate actor instance config check
- Set<String> actorRefs = new HashSet<String>();
- for (ActorInstanceConfig instanceConfig : model
- .getActorInstanceConfigs()) {
- String ref = instanceConfig.getRoot().getName()
- + refPathToString(instanceConfig.getPath());
- if (actorRefs.contains(ref))
- error("duplicate actor instance config", model,
- ConfigPackage.Literals.CONFIG_MODEL__CONFIG_ELEMENTS,
- model.getConfigElements().indexOf(instanceConfig));
- else
- actorRefs.add(ref);
- }
- // duplicate protocol class config check
- Set<ProtocolClass> protocolClasses = new HashSet<ProtocolClass>();
- for (ProtocolClassConfig protocolConfig : model
- .getProtocolClassConfigs()) {
- if (protocolClasses.contains(protocolConfig.getProtocol()))
- error("duplicate protocol class config", model,
- ConfigPackage.Literals.CONFIG_MODEL__CONFIG_ELEMENTS,
- model.getConfigElements().indexOf(protocolConfig));
- else
- protocolClasses.add(protocolConfig.getProtocol());
- }
- }
-
- @Check
- public void checkActorClassConfig(ActorClassConfig config) {
- if (config.getActor().isAbstract())
- error("abstract actor classes not supported",
- ConfigPackage.Literals.ACTOR_CLASS_CONFIG__ACTOR);
- checkDuplicateAttributes(config.getAttributes(),
- ConfigPackage.Literals.ACTOR_CLASS_CONFIG__ATTRIBUTES);
-
- }
-
- @Check
- public void checkActorInstanceConfig(ActorInstanceConfig config) {
- ActorContainerClass root = config.getRoot();
- if (root != null && !root.eIsProxy()) {
- RefPath path = config.getPath();
- if (path != null) {
- String invalidSegment = ConfigUtil.checkPath(root, path);
- if (invalidSegment != null)
- error("no match for segment '" + invalidSegment + "'",
- ConfigPackage.Literals.ACTOR_INSTANCE_CONFIG__PATH);
- else {
- ActorRef aRef = ConfigUtil.getLastActorRef(root, path);
- if (aRef != null) {
- if (aRef.getSize() > 1)
- error("no arrays of actor references supported",
- ConfigPackage.Literals.ACTOR_INSTANCE_CONFIG__PATH);
- } else
- error("invalid actor reference",
- ConfigPackage.Literals.ACTOR_INSTANCE_CONFIG__PATH);
- }
- }
- }
- // duplicate port instance config check
- Set<InterfaceItem> items = new HashSet<InterfaceItem>();
- for (PortInstanceConfig portConfig : config.getPorts()) {
- InterfaceItem item = portConfig.getItem();
- if (items.contains(item))
- error("duplicate port instance config",
- ConfigPackage.Literals.ACTOR_INSTANCE_CONFIG__PORTS,
- config.getPorts().indexOf(portConfig));
- else
- items.add(item);
- }
-
- checkDuplicateAttributes(config.getAttributes(),
- ConfigPackage.Literals.ACTOR_INSTANCE_CONFIG__ATTRIBUTES);
- }
-
- @Check
- public void checkPortClassConfig(PortClassConfig config) {
- checkDuplicateAttributes(config.getAttributes(),
- ConfigPackage.Literals.PORT_CLASS_CONFIG__ATTRIBUTES);
- }
-
- @Check
- public void checkPortInstanceConfig(PortInstanceConfig config) {
- checkDuplicateAttributes(config.getAttributes(),
- ConfigPackage.Literals.PORT_INSTANCE_CONFIG__ATTRIBUTES);
- }
-
- private void checkDuplicateAttributes(
- List<? extends AttrConfig> attrConfigs, EReference ref) {
- Set<Attribute> attributes = new HashSet<Attribute>();
- for (AttrConfig config : attrConfigs) {
- if (attributes.contains(config.getAttribute()))
- error("duplicate attribute entry", ref,
- attrConfigs.indexOf(config));
- else
- attributes.add(config.getAttribute());
- }
- }
-
- @Check
- public void checkAttrConfig(AttrConfig config) {
- Attribute a = config.getAttribute();
- if (a == null)
- return;
-
- DataType type = a.getRefType().getType();
- if (type instanceof PrimitiveType) {
- PrimitiveType primitive = (PrimitiveType) type;
- checkAttrConfigValue(primitive, config);
- } else if (type instanceof DataType) {
- if (config.getValue() != null)
- error("not available",
- ConfigPackage.Literals.ATTR_CONFIG__VALUE);
- if (a.getSize() > 0)
- error("DataClass arrays not supported",
- ConfigPackage.Literals.ATTR_CLASS_CONFIG__ATTRIBUTES);
- }
- }
-
- @Check
- public void checkAttrClassConfig(AttrClassConfig config) {
- Attribute attr = config.getAttribute();
- if (attr == null)
- return;
-
- DataType type = attr.getRefType().getType();
- if (type instanceof PrimitiveType) {
- PrimitiveType primitive = (PrimitiveType) type;
-
- checkAttrConfigMin(primitive, config);
- checkAttrConfigMax(primitive, config);
- }
- }
-
- @Check
- public void checkAttrInstanceConfig(AttrInstanceConfig config) {
- Attribute attr = config.getAttribute();
- if (attr == null)
- return;
-
- EStructuralFeature feature = ConfigPackage.eINSTANCE
- .getAttrInstanceConfig_DynConfig();
- if (config.isDynConfig()) {
- if (!(config.eContainer() instanceof ActorInstanceConfig))
- error("dynamic configuration only at root attributes", feature);
- if (config.eContainer() instanceof ActorInstanceConfig) {
- SubSystemClass ssc = ((ActorInstanceConfig) config.eContainer())
- .getRoot();
- ConfigModel model = getConfigModel(config);
- boolean found = false;
- for (SubSystemConfig c : model.getSubSystemConfigs())
- if (c.getSubSystem().equals(ssc)) {
- if (c.getDynConfig() == null)
- error("no source for dynamic config in SubSystemConfig",
- feature);
- found = true;
- }
- if (!found)
- error("no SubSystemConfig found", feature);
-
- }
- }
-
- }
-
- private void checkAttrConfigValue(PrimitiveType primitive, AttrConfig config) {
- if (config.getValue() == null)
- return;
-
- List<Literal> values = config.getValue().getLiterals();
- EReference valueRef = ConfigPackage.eINSTANCE.getAttrConfig_Value();
- EReference arrayRef = ConfigPackage.eINSTANCE
- .getLiteralArray_Literals();
- LiteralType type = primitive.getType();
- Attribute attribute = config.getAttribute();
- int attrMult = (attribute.getSize() > 0) ? attribute.getSize() : 1;
- if (type != LiteralType.CHAR) {
- if (values.size() > attrMult)
- error("too many values, multiplicity is " + attrMult, valueRef);
- if (values.size() > 1 && values.size() < attrMult)
- error("not enough values, multiplicity is " + attrMult,
- valueRef);
- }
- // type check
- for (Literal value : values) {
- switch (type) {
- case BOOL:
- if (!(value instanceof BooleanLiteral))
- error("must be boolean value", valueRef);
- break;
- case REAL:
- if (!(value instanceof NumberLiteral))
- error("must be an integer or real value", valueRef);
- break;
- case INT:
- if (!(value instanceof IntLiteral))
- error("must be an integer", valueRef);
- break;
- case CHAR:
- if (!(value instanceof StringLiteral))
- error("must be a string", valueRef);
- else {
- if (values.size() > 1)
- error("multiplicity must be one", valueRef);
- StringLiteral strValue = (StringLiteral) value;
- if (attribute.getSize() > 0
- && attrMult < strValue.getValue().length())
- error("too many characters - maximal length is "
- + attrMult, valueRef);
- }
- break;
- }
- }
-
- // numeric check
- if ((type == LiteralType.INT || type == LiteralType.REAL)) {
- ActorClassConfig classConfig = null;
- if (config.eContainer() instanceof ActorInstanceConfig) {
- ActorInstanceConfig actorConfig = (ActorInstanceConfig) config
- .eContainer();
- ActorContainerClass actorClass = ConfigUtil.resolve(
- actorConfig.getRoot(), actorConfig.getPath());
- // find ActorClassConfig
- ConfigModel model = getConfigModel(actorConfig);
- for (ActorClassConfig cf : model.getActorClassConfigs()) {
- if (cf.getActor().equals(actorClass)) {
- classConfig = cf;
- break;
- }
- }
- } else if (config.eContainer() instanceof ActorClassConfig)
- classConfig = (ActorClassConfig) config.eContainer();
-
- AttrClassConfig attrClassConfig = null;
- if (classConfig != null) {
- for (AttrClassConfig acf : classConfig.getAttributes())
- if (config.getAttribute().equals(acf.getAttribute())) {
- attrClassConfig = acf;
- break;
- }
- }
-
- if (attrClassConfig != null) {
- NumberLiteral min = attrClassConfig.getMin();
- NumberLiteral max = attrClassConfig.getMax();
- for (Literal value : values) {
- if (!(value instanceof NumberLiteral))
- continue;
-
- if (value instanceof RealLiteral) {
- double dbValue = ((RealLiteral) value).getValue();
- if (min instanceof RealLiteral) {
- double dbMin = ((RealLiteral) min).getValue();
- if (dbMin > dbValue)
- error("value is less than minimum",
- config.getValue(), arrayRef,
- values.indexOf(value));
- }
- if (max instanceof RealLiteral) {
- double dbMax = ((RealLiteral) max).getValue();
- if (dbMax < dbValue)
- error("value exceeds maximum",
- config.getValue(), arrayRef,
- values.indexOf(value));
- }
- } else if (value instanceof IntLiteral) {
- long lValue = ((IntLiteral) value).getValue();
- if (min instanceof IntLiteral) {
- long lMin = ((IntLiteral) min).getValue();
- if (lMin > lValue)
- error("value is less than minimum",
- config.getValue(), arrayRef,
- values.indexOf(value));
- }
- if (max instanceof IntLiteral) {
- long lMax = ((IntLiteral) max).getValue();
- if (lMax < lValue)
- error("value exceeds maximum",
- config.getValue(), arrayRef,
- values.indexOf(value));
- }
- }
- }
- }
- }
- }
-
- private void checkAttrConfigMin(PrimitiveType primitive,
- AttrClassConfig config) {
- NumberLiteral min = config.getMin();
- if (min == null)
- return;
-
- EReference minRef = ConfigPackage.eINSTANCE.getAttrClassConfig_Min();
- LiteralType type = primitive.getType();
-
- if (type == LiteralType.INT || type == LiteralType.REAL) {
- if (primitive.getType() == LiteralType.INT) {
- if (!(min instanceof IntLiteral))
- error("incompatible datatype: maximum is not int", minRef);
- } else if (primitive.getType() == LiteralType.REAL) {
- if (!(min instanceof RealLiteral))
- error("incompatible datatype: maximum is not real", minRef);
- }
- // check room default if config default is not set
- String defaultValue = config.getAttribute()
- .getDefaultValueLiteral();
- if (config.getValue() == null && defaultValue != null) {
- if (type == LiteralType.INT) {
- if (min instanceof IntLiteral) {
- try {
- long lDefaultValue = converter.getLongConverter()
- .toValue(defaultValue, null);
- long lMax = ((IntLiteral) min).getValue();
- if (lMax < lDefaultValue)
- error("default value in ROOM model is less than this maximum",
- minRef);
- } catch (ValueConverterException e) {
- warning("could not compare with int value in ROOM model (parse error)",
- minRef);
- }
- } else
- warning("could not compare with int value in ROOM model (incompatible datatypes)",
- minRef);
- } else if (type == LiteralType.REAL) {
- if (min instanceof RealLiteral) {
- try {
- double dbDefaultValue = converter
- .getRealConverter().toValue(defaultValue,
- null);
- double dbMax = ((RealLiteral) min).getValue();
- if (dbMax < dbDefaultValue)
- error("default value in ROOM model is less than this maximum",
- minRef);
- } catch (ValueConverterException e1) {
- warning("could not compare with real value in ROOM model (parse error)",
- minRef);
- }
- } else
- warning("could not compare with real value in ROOM model (incompatible datatypes)",
- minRef);
- }
-
- }
- }
-
- }
-
- private void checkAttrConfigMax(PrimitiveType primitive,
- AttrClassConfig config) {
- NumberLiteral max = config.getMax();
- if (max == null)
- return;
-
- EReference maxRef = ConfigPackage.eINSTANCE.getAttrClassConfig_Max();
- LiteralType type = primitive.getType();
-
- if (type == LiteralType.INT || type == LiteralType.REAL) {
- if (primitive.getType() == LiteralType.INT) {
- if (!(max instanceof IntLiteral))
- error("incompatible datatype: maximum is not int", maxRef);
- } else if (primitive.getType() == LiteralType.REAL) {
- if (!(max instanceof RealLiteral))
- error("incompatible datatype: maximum is not real", maxRef);
- }
- // check room default if config default is not set
- String defaultValue = config.getAttribute()
- .getDefaultValueLiteral();
- if (config.getValue() == null && defaultValue != null) {
- if (type == LiteralType.INT) {
- if (max instanceof IntLiteral) {
- try {
- long lDefaultValue = converter.getLongConverter()
- .toValue(defaultValue, null);
- long lMax = ((IntLiteral) max).getValue();
- if (lMax < lDefaultValue)
- error("default value in ROOM model exceeds this maximum",
- maxRef);
- } catch (ValueConverterException e) {
- warning("could not compare with int value in ROOM model (parse error)",
- maxRef);
- }
- } else
- warning("could not compare with int value in ROOM model (incompatible datatypes)",
- maxRef);
- } else if (type == LiteralType.REAL) {
- if (max instanceof RealLiteral) {
- try {
- double dbDefaultValue = converter
- .getRealConverter().toValue(defaultValue,
- null);
- double dbMax = ((RealLiteral) max).getValue();
- if (dbMax < dbDefaultValue)
- error("default value in ROOM model exceeds this maximum",
- maxRef);
- } catch (ValueConverterException e1) {
- warning("could not compare with real value in ROOM model (parse error)",
- maxRef);
- }
- } else
- warning("could not compare with real value in ROOM model (incompatible datatypes)",
- maxRef);
- }
-
- }
- }
- }
-
- private ConfigModel getConfigModel(EObject object) {
- EObject root = object;
- while (root.eContainer() != null)
- root = root.eContainer();
-
- return (ConfigModel) root;
- }
-
- private String refPathToString(RefPath path) {
- String str = "";
- for (String s : path.getRefs())
- str += "/" + s;
-
- return str;
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2012 Juergen Haug
+ * 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:
+ * Juergen Haug
+ *
+ *******************************************************************************/
+
+package org.eclipse.etrice.core.validation;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.etrice.core.config.ActorClassConfig;
+import org.eclipse.etrice.core.config.ActorInstanceConfig;
+import org.eclipse.etrice.core.config.AttrClassConfig;
+import org.eclipse.etrice.core.config.AttrConfig;
+import org.eclipse.etrice.core.config.AttrInstanceConfig;
+import org.eclipse.etrice.core.config.BooleanLiteral;
+import org.eclipse.etrice.core.config.ConfigModel;
+import org.eclipse.etrice.core.config.ConfigPackage;
+import org.eclipse.etrice.core.config.IntLiteral;
+import org.eclipse.etrice.core.config.Literal;
+import org.eclipse.etrice.core.config.NumberLiteral;
+import org.eclipse.etrice.core.config.PortClassConfig;
+import org.eclipse.etrice.core.config.PortInstanceConfig;
+import org.eclipse.etrice.core.config.ProtocolClassConfig;
+import org.eclipse.etrice.core.config.RealLiteral;
+import org.eclipse.etrice.core.config.RefPath;
+import org.eclipse.etrice.core.config.StringLiteral;
+import org.eclipse.etrice.core.config.SubSystemConfig;
+import org.eclipse.etrice.core.config.util.ConfigUtil;
+import org.eclipse.etrice.core.converter.ConfigValueConverterService;
+import org.eclipse.etrice.core.room.ActorClass;
+import org.eclipse.etrice.core.room.ActorContainerClass;
+import org.eclipse.etrice.core.room.ActorRef;
+import org.eclipse.etrice.core.room.Attribute;
+import org.eclipse.etrice.core.room.DataType;
+import org.eclipse.etrice.core.room.InterfaceItem;
+import org.eclipse.etrice.core.room.LiteralType;
+import org.eclipse.etrice.core.room.PrimitiveType;
+import org.eclipse.etrice.core.room.ProtocolClass;
+import org.eclipse.etrice.core.room.SubSystemClass;
+import org.eclipse.xtext.conversion.ValueConverterException;
+import org.eclipse.xtext.validation.Check;
+
+public class ConfigJavaValidator extends AbstractConfigJavaValidator {
+
+ private ConfigValueConverterService converter = new ConfigValueConverterService();
+
+ @Check
+ public void checkConfigModel(ConfigModel model) {
+ // duplicate actor class config check
+ Set<ActorClass> actorClasses = new HashSet<ActorClass>();
+ for (ActorClassConfig classConfig : model.getActorClassConfigs()) {
+ if (actorClasses.contains(classConfig.getActor()))
+ error("duplicate class config", model,
+ ConfigPackage.Literals.CONFIG_MODEL__CONFIG_ELEMENTS,
+ model.getConfigElements().indexOf(classConfig));
+ else
+ actorClasses.add(classConfig.getActor());
+ }
+ // duplicate actor instance config check
+ Set<String> actorRefs = new HashSet<String>();
+ for (ActorInstanceConfig instanceConfig : model
+ .getActorInstanceConfigs()) {
+ String ref = instanceConfig.getRoot().getName()
+ + refPathToString(instanceConfig.getPath());
+ if (actorRefs.contains(ref))
+ error("duplicate actor instance config", model,
+ ConfigPackage.Literals.CONFIG_MODEL__CONFIG_ELEMENTS,
+ model.getConfigElements().indexOf(instanceConfig));
+ else
+ actorRefs.add(ref);
+ }
+ // duplicate protocol class config check
+ Set<ProtocolClass> protocolClasses = new HashSet<ProtocolClass>();
+ for (ProtocolClassConfig protocolConfig : model
+ .getProtocolClassConfigs()) {
+ if (protocolClasses.contains(protocolConfig.getProtocol()))
+ error("duplicate protocol class config", model,
+ ConfigPackage.Literals.CONFIG_MODEL__CONFIG_ELEMENTS,
+ model.getConfigElements().indexOf(protocolConfig));
+ else
+ protocolClasses.add(protocolConfig.getProtocol());
+ }
+ }
+
+ @Check
+ public void checkActorClassConfig(ActorClassConfig config) {
+ if (config.getActor().isAbstract())
+ error("abstract actor classes not supported",
+ ConfigPackage.Literals.ACTOR_CLASS_CONFIG__ACTOR);
+ checkDuplicateAttributes(config.getAttributes(),
+ ConfigPackage.Literals.ACTOR_CLASS_CONFIG__ATTRIBUTES);
+
+ }
+
+ @Check
+ public void checkActorInstanceConfig(ActorInstanceConfig config) {
+ ActorContainerClass root = config.getRoot();
+ if (root != null && !root.eIsProxy()) {
+ RefPath path = config.getPath();
+ if (path != null) {
+ String invalidSegment = ConfigUtil.checkPath(root, path);
+ if (invalidSegment != null)
+ error("no match for segment '" + invalidSegment + "'",
+ ConfigPackage.Literals.ACTOR_INSTANCE_CONFIG__PATH);
+ else {
+ ActorRef aRef = ConfigUtil.getLastActorRef(root, path);
+ if (aRef != null) {
+ if (aRef.getSize() > 1)
+ error("no arrays of actor references supported",
+ ConfigPackage.Literals.ACTOR_INSTANCE_CONFIG__PATH);
+ } else
+ error("invalid actor reference",
+ ConfigPackage.Literals.ACTOR_INSTANCE_CONFIG__PATH);
+ }
+ }
+ }
+ // duplicate port instance config check
+ Set<InterfaceItem> items = new HashSet<InterfaceItem>();
+ for (PortInstanceConfig portConfig : config.getPorts()) {
+ InterfaceItem item = portConfig.getItem();
+ if (items.contains(item))
+ error("duplicate port instance config",
+ ConfigPackage.Literals.ACTOR_INSTANCE_CONFIG__PORTS,
+ config.getPorts().indexOf(portConfig));
+ else
+ items.add(item);
+ }
+
+ checkDuplicateAttributes(config.getAttributes(),
+ ConfigPackage.Literals.ACTOR_INSTANCE_CONFIG__ATTRIBUTES);
+ }
+
+ @Check
+ public void checkPortClassConfig(PortClassConfig config) {
+ checkDuplicateAttributes(config.getAttributes(),
+ ConfigPackage.Literals.PORT_CLASS_CONFIG__ATTRIBUTES);
+ }
+
+ @Check
+ public void checkPortInstanceConfig(PortInstanceConfig config) {
+ checkDuplicateAttributes(config.getAttributes(),
+ ConfigPackage.Literals.PORT_INSTANCE_CONFIG__ATTRIBUTES);
+ }
+
+ private void checkDuplicateAttributes(
+ List<? extends AttrConfig> attrConfigs, EReference ref) {
+ Set<Attribute> attributes = new HashSet<Attribute>();
+ for (AttrConfig config : attrConfigs) {
+ if (attributes.contains(config.getAttribute()))
+ error("duplicate attribute entry", ref,
+ attrConfigs.indexOf(config));
+ else
+ attributes.add(config.getAttribute());
+ }
+ }
+
+ @Check
+ public void checkAttrConfig(AttrConfig config) {
+ Attribute a = config.getAttribute();
+ if (a == null)
+ return;
+
+ DataType type = a.getRefType().getType();
+ if (type instanceof PrimitiveType) {
+ PrimitiveType primitive = (PrimitiveType) type;
+ checkAttrConfigValue(primitive, config);
+ } else if (type instanceof DataType) {
+ if (config.getValue() != null)
+ error("not available",
+ ConfigPackage.Literals.ATTR_CONFIG__VALUE);
+ if (a.getSize() > 0)
+ error("DataClass arrays not supported",
+ ConfigPackage.Literals.ATTR_CLASS_CONFIG__ATTRIBUTES);
+ }
+ }
+
+ @Check
+ public void checkAttrClassConfig(AttrClassConfig config) {
+ Attribute attr = config.getAttribute();
+ if (attr == null)
+ return;
+
+ DataType type = attr.getRefType().getType();
+ if (type instanceof PrimitiveType) {
+ PrimitiveType primitive = (PrimitiveType) type;
+
+ checkAttrConfigMin(primitive, config);
+ checkAttrConfigMax(primitive, config);
+ }
+ }
+
+ @Check
+ public void checkAttrInstanceConfig(AttrInstanceConfig config) {
+ Attribute attr = config.getAttribute();
+ if (attr == null)
+ return;
+
+ EStructuralFeature feature = ConfigPackage.eINSTANCE
+ .getAttrInstanceConfig_DynConfig();
+ if (config.isDynConfig()) {
+ if (!(config.eContainer() instanceof ActorInstanceConfig))
+ error("dynamic configuration only at root attributes", feature);
+ if (config.eContainer() instanceof ActorInstanceConfig) {
+ SubSystemClass ssc = ((ActorInstanceConfig) config.eContainer())
+ .getRoot();
+ ConfigModel model = getConfigModel(config);
+ boolean found = false;
+ for (SubSystemConfig c : model.getSubSystemConfigs())
+ if (c.getSubSystem().equals(ssc)) {
+ if (c.getDynConfig() == null)
+ error("no source for dynamic config in SubSystemConfig",
+ feature);
+ found = true;
+ }
+ if (!found)
+ error("no SubSystemConfig found", feature);
+
+ }
+ }
+
+ }
+
+ private void checkAttrConfigValue(PrimitiveType primitive, AttrConfig config) {
+ if (config.getValue() == null)
+ return;
+
+ List<Literal> values = config.getValue().getLiterals();
+ EReference valueRef = ConfigPackage.eINSTANCE.getAttrConfig_Value();
+ EReference arrayRef = ConfigPackage.eINSTANCE
+ .getLiteralArray_Literals();
+ LiteralType type = primitive.getType();
+ Attribute attribute = config.getAttribute();
+ int attrMult = (attribute.getSize() > 0) ? attribute.getSize() : 1;
+ if (type != LiteralType.CHAR) {
+ if (values.size() > attrMult)
+ error("too many values, multiplicity is " + attrMult, valueRef);
+ if (values.size() > 1 && values.size() < attrMult)
+ error("not enough values, multiplicity is " + attrMult,
+ valueRef);
+ }
+ // type check
+ for (Literal value : values) {
+ switch (type) {
+ case BOOL:
+ if (!(value instanceof BooleanLiteral))
+ error("must be boolean value", valueRef);
+ break;
+ case REAL:
+ if (!(value instanceof NumberLiteral))
+ error("must be an integer or real value", valueRef);
+ break;
+ case INT:
+ if (!(value instanceof IntLiteral))
+ error("must be an integer", valueRef);
+ break;
+ case CHAR:
+ if (!(value instanceof StringLiteral))
+ error("must be a string", valueRef);
+ else {
+ if (values.size() > 1)
+ error("multiplicity must be one", valueRef);
+ StringLiteral strValue = (StringLiteral) value;
+ if (attribute.getSize() > 0
+ && attrMult < strValue.getValue().length())
+ error("too many characters - maximal length is "
+ + attrMult, valueRef);
+ }
+ break;
+ }
+ }
+
+ // numeric check
+ if ((type == LiteralType.INT || type == LiteralType.REAL)) {
+ ActorClassConfig classConfig = null;
+ if (config.eContainer() instanceof ActorInstanceConfig) {
+ ActorInstanceConfig actorConfig = (ActorInstanceConfig) config
+ .eContainer();
+ ActorContainerClass actorClass = ConfigUtil.resolve(
+ actorConfig.getRoot(), actorConfig.getPath());
+ // find ActorClassConfig
+ ConfigModel model = getConfigModel(actorConfig);
+ for (ActorClassConfig cf : model.getActorClassConfigs()) {
+ if (cf.getActor().equals(actorClass)) {
+ classConfig = cf;
+ break;
+ }
+ }
+ } else if (config.eContainer() instanceof ActorClassConfig)
+ classConfig = (ActorClassConfig) config.eContainer();
+
+ AttrClassConfig attrClassConfig = null;
+ if (classConfig != null) {
+ for (AttrClassConfig acf : classConfig.getAttributes())
+ if (config.getAttribute().equals(acf.getAttribute())) {
+ attrClassConfig = acf;
+ break;
+ }
+ }
+
+ if (attrClassConfig != null) {
+ NumberLiteral min = attrClassConfig.getMin();
+ NumberLiteral max = attrClassConfig.getMax();
+ for (Literal value : values) {
+ if (!(value instanceof NumberLiteral))
+ continue;
+
+ if (value instanceof RealLiteral) {
+ double dbValue = ((RealLiteral) value).getValue();
+ if (min instanceof RealLiteral) {
+ double dbMin = ((RealLiteral) min).getValue();
+ if (dbMin > dbValue)
+ error("value is less than minimum",
+ config.getValue(), arrayRef,
+ values.indexOf(value));
+ }
+ if (max instanceof RealLiteral) {
+ double dbMax = ((RealLiteral) max).getValue();
+ if (dbMax < dbValue)
+ error("value exceeds maximum",
+ config.getValue(), arrayRef,
+ values.indexOf(value));
+ }
+ } else if (value instanceof IntLiteral) {
+ long lValue = ((IntLiteral) value).getValue();
+ if (min instanceof IntLiteral) {
+ long lMin = ((IntLiteral) min).getValue();
+ if (lMin > lValue)
+ error("value is less than minimum",
+ config.getValue(), arrayRef,
+ values.indexOf(value));
+ }
+ if (max instanceof IntLiteral) {
+ long lMax = ((IntLiteral) max).getValue();
+ if (lMax < lValue)
+ error("value exceeds maximum",
+ config.getValue(), arrayRef,
+ values.indexOf(value));
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private void checkAttrConfigMin(PrimitiveType primitive,
+ AttrClassConfig config) {
+ NumberLiteral min = config.getMin();
+ if (min == null)
+ return;
+
+ EReference minRef = ConfigPackage.eINSTANCE.getAttrClassConfig_Min();
+ LiteralType type = primitive.getType();
+
+ if (type == LiteralType.INT || type == LiteralType.REAL) {
+ if (primitive.getType() == LiteralType.INT) {
+ if (!(min instanceof IntLiteral))
+ error("incompatible datatype: maximum is not int", minRef);
+ } else if (primitive.getType() == LiteralType.REAL) {
+ if (!(min instanceof RealLiteral))
+ error("incompatible datatype: maximum is not real", minRef);
+ }
+ // check room default if config default is not set
+ String defaultValue = config.getAttribute()
+ .getDefaultValueLiteral();
+ if (config.getValue() == null && defaultValue != null) {
+ if (type == LiteralType.INT) {
+ if (min instanceof IntLiteral) {
+ try {
+ long lDefaultValue = converter.getLongConverter()
+ .toValue(defaultValue, null);
+ long lMax = ((IntLiteral) min).getValue();
+ if (lMax < lDefaultValue)
+ error("default value in ROOM model is less than this maximum",
+ minRef);
+ } catch (ValueConverterException e) {
+ warning("could not compare with int value in ROOM model (parse error)",
+ minRef);
+ }
+ } else
+ warning("could not compare with int value in ROOM model (incompatible datatypes)",
+ minRef);
+ } else if (type == LiteralType.REAL) {
+ if (min instanceof RealLiteral) {
+ try {
+ double dbDefaultValue = converter
+ .getRealConverter().toValue(defaultValue,
+ null);
+ double dbMax = ((RealLiteral) min).getValue();
+ if (dbMax < dbDefaultValue)
+ error("default value in ROOM model is less than this maximum",
+ minRef);
+ } catch (ValueConverterException e1) {
+ warning("could not compare with real value in ROOM model (parse error)",
+ minRef);
+ }
+ } else
+ warning("could not compare with real value in ROOM model (incompatible datatypes)",
+ minRef);
+ }
+
+ }
+ }
+
+ }
+
+ private void checkAttrConfigMax(PrimitiveType primitive,
+ AttrClassConfig config) {
+ NumberLiteral max = config.getMax();
+ if (max == null)
+ return;
+
+ EReference maxRef = ConfigPackage.eINSTANCE.getAttrClassConfig_Max();
+ LiteralType type = primitive.getType();
+
+ if (type == LiteralType.INT || type == LiteralType.REAL) {
+ if (primitive.getType() == LiteralType.INT) {
+ if (!(max instanceof IntLiteral))
+ error("incompatible datatype: maximum is not int", maxRef);
+ } else if (primitive.getType() == LiteralType.REAL) {
+ if (!(max instanceof RealLiteral))
+ error("incompatible datatype: maximum is not real", maxRef);
+ }
+ // check room default if config default is not set
+ String defaultValue = config.getAttribute()
+ .getDefaultValueLiteral();
+ if (config.getValue() == null && defaultValue != null) {
+ if (type == LiteralType.INT) {
+ if (max instanceof IntLiteral) {
+ try {
+ long lDefaultValue = converter.getLongConverter()
+ .toValue(defaultValue, null);
+ long lMax = ((IntLiteral) max).getValue();
+ if (lMax < lDefaultValue)
+ error("default value in ROOM model exceeds this maximum",
+ maxRef);
+ } catch (ValueConverterException e) {
+ warning("could not compare with int value in ROOM model (parse error)",
+ maxRef);
+ }
+ } else
+ warning("could not compare with int value in ROOM model (incompatible datatypes)",
+ maxRef);
+ } else if (type == LiteralType.REAL) {
+ if (max instanceof RealLiteral) {
+ try {
+ double dbDefaultValue = converter
+ .getRealConverter().toValue(defaultValue,
+ null);
+ double dbMax = ((RealLiteral) max).getValue();
+ if (dbMax < dbDefaultValue)
+ error("default value in ROOM model exceeds this maximum",
+ maxRef);
+ } catch (ValueConverterException e1) {
+ warning("could not compare with real value in ROOM model (parse error)",
+ maxRef);
+ }
+ } else
+ warning("could not compare with real value in ROOM model (incompatible datatypes)",
+ maxRef);
+ }
+
+ }
+ }
+ }
+
+ private ConfigModel getConfigModel(EObject object) {
+ EObject root = object;
+ while (root.eContainer() != null)
+ root = root.eContainer();
+
+ return (ConfigModel) root;
+ }
+
+ private String refPathToString(RefPath path) {
+ String str = "";
+ for (String s : path.getRefs())
+ str += "/" + s;
+
+ return str;
+ }
+}

Back to the top