diff options
Diffstat (limited to 'plugins/org.eclipse.etrice.generator.fsmtest/src-gen/org/eclipse/etrice/generator')
7 files changed, 1719 insertions, 1719 deletions
diff --git a/plugins/org.eclipse.etrice.generator.fsmtest/src-gen/org/eclipse/etrice/generator/AbstractFSMtestRuntimeModule.java b/plugins/org.eclipse.etrice.generator.fsmtest/src-gen/org/eclipse/etrice/generator/AbstractFSMtestRuntimeModule.java index 092e3ff53..439fdbf7a 100644 --- a/plugins/org.eclipse.etrice.generator.fsmtest/src-gen/org/eclipse/etrice/generator/AbstractFSMtestRuntimeModule.java +++ b/plugins/org.eclipse.etrice.generator.fsmtest/src-gen/org/eclipse/etrice/generator/AbstractFSMtestRuntimeModule.java @@ -1,172 +1,172 @@ -/* - * generated by Xtext - */ -package org.eclipse.etrice.generator; - -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.generator.FSMtestRuntimeModule} - */ - @SuppressWarnings("all") -public abstract class AbstractFSMtestRuntimeModule extends DefaultRuntimeModule { - - protected Properties properties = null; - - @Override - public void configure(Binder binder) { - properties = tryBindProperties(binder, "org/eclipse/etrice/generator/FSMtest.properties"); - super.configure(binder); - } - - public void configureLanguageName(Binder binder) { - binder.bind(String.class).annotatedWith(Names.named(Constants.LANGUAGE_NAME)).toInstance("org.eclipse.etrice.generator.FSMtest"); - } - - 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("fsmtest"); - } - - // contributed by org.eclipse.xtext.generator.grammarAccess.GrammarAccessFragment - public Class<? extends org.eclipse.xtext.IGrammarAccess> bindIGrammarAccess() { - return org.eclipse.etrice.generator.services.FSMtestGrammarAccess.class; - } - - // contributed by org.eclipse.xtext.generator.serializer.SerializerFragment - public Class<? extends org.eclipse.xtext.serializer.sequencer.ISemanticSequencer> bindISemanticSequencer() { - return org.eclipse.etrice.generator.serializer.FSMtestSemanticSequencer.class; - } - - // contributed by org.eclipse.xtext.generator.serializer.SerializerFragment - public Class<? extends org.eclipse.xtext.serializer.sequencer.ISyntacticSequencer> bindISyntacticSequencer() { - return org.eclipse.etrice.generator.serializer.FSMtestSyntacticSequencer.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.generator.parser.antlr.FSMtestParser.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.generator.parser.antlr.FSMtestAntlrTokenFileProvider.class; - } - - // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment - public Class<? extends org.eclipse.xtext.parser.antlr.Lexer> bindLexer() { - return org.eclipse.etrice.generator.parser.antlr.internal.InternalFSMtestLexer.class; - } - - // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment - public com.google.inject.Provider<org.eclipse.etrice.generator.parser.antlr.internal.InternalFSMtestLexer> provideInternalFSMtestLexer() { - return org.eclipse.xtext.parser.antlr.LexerProvider.create(org.eclipse.etrice.generator.parser.antlr.internal.InternalFSMtestLexer.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.generator.parser.antlr.internal.InternalFSMtestLexer.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.validation.JavaValidatorFragment - @org.eclipse.xtext.service.SingletonBinding(eager=true) public Class<? extends org.eclipse.etrice.generator.validation.FSMtestJavaValidator> bindFSMtestJavaValidator() { - return org.eclipse.etrice.generator.validation.FSMtestJavaValidator.class; - } - - // contributed by org.eclipse.xtext.generator.scoping.AbstractScopingFragment - public Class<? extends org.eclipse.xtext.scoping.IScopeProvider> bindIScopeProvider() { - return org.eclipse.etrice.generator.scoping.FSMtestScopeProvider.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.ImportedNamespaceAwareLocalScopeProvider.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.generator.generator.FSMtestGenerator.class; - } - - // contributed by org.eclipse.xtext.generator.formatting.FormatterFragment - public Class<? extends org.eclipse.xtext.formatting.IFormatter> bindIFormatter() { - return org.eclipse.etrice.generator.formatting.FSMtestFormatter.class; - } - - // contributed by org.eclipse.xtext.generator.types.TypesGeneratorFragment - public java.lang.ClassLoader bindClassLoaderToInstance() { - return getClass().getClassLoader(); - } - - // contributed by org.eclipse.xtext.generator.types.TypesGeneratorFragment - public org.eclipse.xtext.common.types.TypesFactory bindTypesFactoryToInstance() { - return org.eclipse.xtext.common.types.TypesFactory.eINSTANCE; - } - - // contributed by org.eclipse.xtext.generator.types.TypesGeneratorFragment - public Class<? extends org.eclipse.xtext.common.types.access.IJvmTypeProvider.Factory> bindIJvmTypeProvider$Factory() { - return org.eclipse.xtext.common.types.access.ClasspathTypeProviderFactory.class; - } - - // contributed by org.eclipse.xtext.generator.types.TypesGeneratorFragment - public Class<? extends org.eclipse.xtext.common.types.xtext.AbstractTypeScopeProvider> bindAbstractTypeScopeProvider() { - return org.eclipse.xtext.common.types.xtext.ClasspathBasedTypeScopeProvider.class; - } - - // contributed by org.eclipse.xtext.generator.types.TypesGeneratorFragment - public Class<? extends org.eclipse.xtext.scoping.IGlobalScopeProvider> bindIGlobalScopeProvider() { - return org.eclipse.xtext.common.types.xtext.TypesAwareDefaultGlobalScopeProvider.class; - } - -} +/*
+ * generated by Xtext
+ */
+package org.eclipse.etrice.generator;
+
+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.generator.FSMtestRuntimeModule}
+ */
+ @SuppressWarnings("all")
+public abstract class AbstractFSMtestRuntimeModule extends DefaultRuntimeModule {
+
+ protected Properties properties = null;
+
+ @Override
+ public void configure(Binder binder) {
+ properties = tryBindProperties(binder, "org/eclipse/etrice/generator/FSMtest.properties");
+ super.configure(binder);
+ }
+
+ public void configureLanguageName(Binder binder) {
+ binder.bind(String.class).annotatedWith(Names.named(Constants.LANGUAGE_NAME)).toInstance("org.eclipse.etrice.generator.FSMtest");
+ }
+
+ 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("fsmtest");
+ }
+
+ // contributed by org.eclipse.xtext.generator.grammarAccess.GrammarAccessFragment
+ public Class<? extends org.eclipse.xtext.IGrammarAccess> bindIGrammarAccess() {
+ return org.eclipse.etrice.generator.services.FSMtestGrammarAccess.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.serializer.SerializerFragment
+ public Class<? extends org.eclipse.xtext.serializer.sequencer.ISemanticSequencer> bindISemanticSequencer() {
+ return org.eclipse.etrice.generator.serializer.FSMtestSemanticSequencer.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.serializer.SerializerFragment
+ public Class<? extends org.eclipse.xtext.serializer.sequencer.ISyntacticSequencer> bindISyntacticSequencer() {
+ return org.eclipse.etrice.generator.serializer.FSMtestSyntacticSequencer.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.generator.parser.antlr.FSMtestParser.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.generator.parser.antlr.FSMtestAntlrTokenFileProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
+ public Class<? extends org.eclipse.xtext.parser.antlr.Lexer> bindLexer() {
+ return org.eclipse.etrice.generator.parser.antlr.internal.InternalFSMtestLexer.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
+ public com.google.inject.Provider<org.eclipse.etrice.generator.parser.antlr.internal.InternalFSMtestLexer> provideInternalFSMtestLexer() {
+ return org.eclipse.xtext.parser.antlr.LexerProvider.create(org.eclipse.etrice.generator.parser.antlr.internal.InternalFSMtestLexer.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.generator.parser.antlr.internal.InternalFSMtestLexer.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.validation.JavaValidatorFragment
+ @org.eclipse.xtext.service.SingletonBinding(eager=true) public Class<? extends org.eclipse.etrice.generator.validation.FSMtestJavaValidator> bindFSMtestJavaValidator() {
+ return org.eclipse.etrice.generator.validation.FSMtestJavaValidator.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.scoping.AbstractScopingFragment
+ public Class<? extends org.eclipse.xtext.scoping.IScopeProvider> bindIScopeProvider() {
+ return org.eclipse.etrice.generator.scoping.FSMtestScopeProvider.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.ImportedNamespaceAwareLocalScopeProvider.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.generator.generator.FSMtestGenerator.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.formatting.FormatterFragment
+ public Class<? extends org.eclipse.xtext.formatting.IFormatter> bindIFormatter() {
+ return org.eclipse.etrice.generator.formatting.FSMtestFormatter.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.types.TypesGeneratorFragment
+ public java.lang.ClassLoader bindClassLoaderToInstance() {
+ return getClass().getClassLoader();
+ }
+
+ // contributed by org.eclipse.xtext.generator.types.TypesGeneratorFragment
+ public org.eclipse.xtext.common.types.TypesFactory bindTypesFactoryToInstance() {
+ return org.eclipse.xtext.common.types.TypesFactory.eINSTANCE;
+ }
+
+ // contributed by org.eclipse.xtext.generator.types.TypesGeneratorFragment
+ public Class<? extends org.eclipse.xtext.common.types.access.IJvmTypeProvider.Factory> bindIJvmTypeProvider$Factory() {
+ return org.eclipse.xtext.common.types.access.ClasspathTypeProviderFactory.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.types.TypesGeneratorFragment
+ public Class<? extends org.eclipse.xtext.common.types.xtext.AbstractTypeScopeProvider> bindAbstractTypeScopeProvider() {
+ return org.eclipse.xtext.common.types.xtext.ClasspathBasedTypeScopeProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.types.TypesGeneratorFragment
+ public Class<? extends org.eclipse.xtext.scoping.IGlobalScopeProvider> bindIGlobalScopeProvider() {
+ return org.eclipse.xtext.common.types.xtext.TypesAwareDefaultGlobalScopeProvider.class;
+ }
+
+}
diff --git a/plugins/org.eclipse.etrice.generator.fsmtest/src-gen/org/eclipse/etrice/generator/FSMtestStandaloneSetupGenerated.java b/plugins/org.eclipse.etrice.generator.fsmtest/src-gen/org/eclipse/etrice/generator/FSMtestStandaloneSetupGenerated.java index 02f9d48b2..85b5a9f77 100644 --- a/plugins/org.eclipse.etrice.generator.fsmtest/src-gen/org/eclipse/etrice/generator/FSMtestStandaloneSetupGenerated.java +++ b/plugins/org.eclipse.etrice.generator.fsmtest/src-gen/org/eclipse/etrice/generator/FSMtestStandaloneSetupGenerated.java @@ -1,43 +1,43 @@ - -package org.eclipse.etrice.generator; - -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 FSMtestStandaloneSetupGenerated 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.generator.FSMtestRuntimeModule()); - } - - public void register(Injector injector) { - if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/etrice/generator/FSMtest")) { - EPackage.Registry.INSTANCE.put("http://www.eclipse.org/etrice/generator/FSMtest", org.eclipse.etrice.generator.fsmtest.FsmtestPackage.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("fsmtest", resourceFactory); - org.eclipse.xtext.resource.IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("fsmtest", serviceProvider); - - - - - } -} +
+package org.eclipse.etrice.generator;
+
+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 FSMtestStandaloneSetupGenerated 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.generator.FSMtestRuntimeModule());
+ }
+
+ public void register(Injector injector) {
+ if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/etrice/generator/FSMtest")) {
+ EPackage.Registry.INSTANCE.put("http://www.eclipse.org/etrice/generator/FSMtest", org.eclipse.etrice.generator.fsmtest.FsmtestPackage.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("fsmtest", resourceFactory);
+ org.eclipse.xtext.resource.IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("fsmtest", serviceProvider);
+
+
+
+
+ }
+}
diff --git a/plugins/org.eclipse.etrice.generator.fsmtest/src-gen/org/eclipse/etrice/generator/parser/antlr/FSMtestAntlrTokenFileProvider.java b/plugins/org.eclipse.etrice.generator.fsmtest/src-gen/org/eclipse/etrice/generator/parser/antlr/FSMtestAntlrTokenFileProvider.java index 74958406b..ba8482e9c 100644 --- a/plugins/org.eclipse.etrice.generator.fsmtest/src-gen/org/eclipse/etrice/generator/parser/antlr/FSMtestAntlrTokenFileProvider.java +++ b/plugins/org.eclipse.etrice.generator.fsmtest/src-gen/org/eclipse/etrice/generator/parser/antlr/FSMtestAntlrTokenFileProvider.java @@ -1,15 +1,15 @@ -/* -* generated by Xtext -*/ -package org.eclipse.etrice.generator.parser.antlr; - -import java.io.InputStream; -import org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider; - -public class FSMtestAntlrTokenFileProvider implements IAntlrTokenFileProvider { - - public InputStream getAntlrTokenFile() { - ClassLoader classLoader = getClass().getClassLoader(); - return classLoader.getResourceAsStream("org/eclipse/etrice/generator/parser/antlr/internal/InternalFSMtest.tokens"); - } -} +/*
+* generated by Xtext
+*/
+package org.eclipse.etrice.generator.parser.antlr;
+
+import java.io.InputStream;
+import org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider;
+
+public class FSMtestAntlrTokenFileProvider implements IAntlrTokenFileProvider {
+
+ public InputStream getAntlrTokenFile() {
+ ClassLoader classLoader = getClass().getClassLoader();
+ return classLoader.getResourceAsStream("org/eclipse/etrice/generator/parser/antlr/internal/InternalFSMtest.tokens");
+ }
+}
diff --git a/plugins/org.eclipse.etrice.generator.fsmtest/src-gen/org/eclipse/etrice/generator/parser/antlr/FSMtestParser.java b/plugins/org.eclipse.etrice.generator.fsmtest/src-gen/org/eclipse/etrice/generator/parser/antlr/FSMtestParser.java index 93cd730b2..4fd6eb12b 100644 --- a/plugins/org.eclipse.etrice.generator.fsmtest/src-gen/org/eclipse/etrice/generator/parser/antlr/FSMtestParser.java +++ b/plugins/org.eclipse.etrice.generator.fsmtest/src-gen/org/eclipse/etrice/generator/parser/antlr/FSMtestParser.java @@ -1,39 +1,39 @@ -/* -* generated by Xtext -*/ -package org.eclipse.etrice.generator.parser.antlr; - -import com.google.inject.Inject; - -import org.eclipse.xtext.parser.antlr.XtextTokenStream; -import org.eclipse.etrice.generator.services.FSMtestGrammarAccess; - -public class FSMtestParser extends org.eclipse.xtext.parser.antlr.AbstractAntlrParser { - - @Inject - private FSMtestGrammarAccess grammarAccess; - - @Override - protected void setInitialHiddenTokens(XtextTokenStream tokenStream) { - tokenStream.setInitialHiddenTokens("RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT"); - } - - @Override - protected org.eclipse.etrice.generator.parser.antlr.internal.InternalFSMtestParser createParser(XtextTokenStream stream) { - return new org.eclipse.etrice.generator.parser.antlr.internal.InternalFSMtestParser(stream, getGrammarAccess()); - } - - @Override - protected String getDefaultRuleName() { - return "Model"; - } - - public FSMtestGrammarAccess getGrammarAccess() { - return this.grammarAccess; - } - - public void setGrammarAccess(FSMtestGrammarAccess grammarAccess) { - this.grammarAccess = grammarAccess; - } - -} +/*
+* generated by Xtext
+*/
+package org.eclipse.etrice.generator.parser.antlr;
+
+import com.google.inject.Inject;
+
+import org.eclipse.xtext.parser.antlr.XtextTokenStream;
+import org.eclipse.etrice.generator.services.FSMtestGrammarAccess;
+
+public class FSMtestParser extends org.eclipse.xtext.parser.antlr.AbstractAntlrParser {
+
+ @Inject
+ private FSMtestGrammarAccess grammarAccess;
+
+ @Override
+ protected void setInitialHiddenTokens(XtextTokenStream tokenStream) {
+ tokenStream.setInitialHiddenTokens("RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT");
+ }
+
+ @Override
+ protected org.eclipse.etrice.generator.parser.antlr.internal.InternalFSMtestParser createParser(XtextTokenStream stream) {
+ return new org.eclipse.etrice.generator.parser.antlr.internal.InternalFSMtestParser(stream, getGrammarAccess());
+ }
+
+ @Override
+ protected String getDefaultRuleName() {
+ return "Model";
+ }
+
+ public FSMtestGrammarAccess getGrammarAccess() {
+ return this.grammarAccess;
+ }
+
+ public void setGrammarAccess(FSMtestGrammarAccess grammarAccess) {
+ this.grammarAccess = grammarAccess;
+ }
+
+}
diff --git a/plugins/org.eclipse.etrice.generator.fsmtest/src-gen/org/eclipse/etrice/generator/parser/antlr/internal/InternalFSMtest.g b/plugins/org.eclipse.etrice.generator.fsmtest/src-gen/org/eclipse/etrice/generator/parser/antlr/internal/InternalFSMtest.g index c26df9733..016f380b7 100644 --- a/plugins/org.eclipse.etrice.generator.fsmtest/src-gen/org/eclipse/etrice/generator/parser/antlr/internal/InternalFSMtest.g +++ b/plugins/org.eclipse.etrice.generator.fsmtest/src-gen/org/eclipse/etrice/generator/parser/antlr/internal/InternalFSMtest.g @@ -1,767 +1,767 @@ -/* -* generated by Xtext -*/ -grammar InternalFSMtest; - -options { - superClass=AbstractInternalAntlrParser; - -} - -@lexer::header { -package org.eclipse.etrice.generator.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.generator.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.generator.services.FSMtestGrammarAccess; - -} - -@parser::members { - - private FSMtestGrammarAccess grammarAccess; - - public InternalFSMtestParser(TokenStream input, FSMtestGrammarAccess grammarAccess) { - this(input); - this.grammarAccess = grammarAccess; - registerRules(grammarAccess.getGrammar()); - } - - @Override - protected String getFirstRuleName() { - return "Model"; - } - - @Override - protected FSMtestGrammarAccess getGrammarAccess() { - return grammarAccess; - } -} - -@rulecatch { - catch (RecognitionException re) { - recover(input,re); - appendSkippedTokens(); - } -} - - - - -// Entry rule entryRuleModel -entryRuleModel returns [EObject current=null] - : - { newCompositeNode(grammarAccess.getModelRule()); } - iv_ruleModel=ruleModel - { $current=$iv_ruleModel.current; } - EOF -; - -// Rule Model -ruleModel returns [EObject current=null] - @init { enterRule(); - } - @after { leaveRule(); }: -( -( - { - newCompositeNode(grammarAccess.getModelAccess().getTestscriptsTestscriptParserRuleCall_0()); - } - lv_Testscripts_0_0=ruleTestscript { - if ($current==null) { - $current = createModelElementForParent(grammarAccess.getModelRule()); - } - add( - $current, - "Testscripts", - lv_Testscripts_0_0, - "Testscript"); - afterParserOrEnumRuleCall(); - } - -) -)* -; - - - - - -// Entry rule entryRuleTestscript -entryRuleTestscript returns [EObject current=null] - : - { newCompositeNode(grammarAccess.getTestscriptRule()); } - iv_ruleTestscript=ruleTestscript - { $current=$iv_ruleTestscript.current; } - EOF -; - -// Rule Testscript -ruleTestscript returns [EObject current=null] - @init { enterRule(); - } - @after { leaveRule(); }: -( otherlv_0='fsmtest' - { - newLeafNode(otherlv_0, grammarAccess.getTestscriptAccess().getFsmtestKeyword_0()); - } -( -( - lv_name_1_0=RULE_ID - { - newLeafNode(lv_name_1_0, grammarAccess.getTestscriptAccess().getNameIDTerminalRuleCall_1_0()); - } - { - if ($current==null) { - $current = createModelElement(grammarAccess.getTestscriptRule()); - } - setWithLastConsumed( - $current, - "name", - lv_name_1_0, - "ID"); - } - -) -)( -( - { - newCompositeNode(grammarAccess.getTestscriptAccess().getStateDeclarationStateDeclarationParserRuleCall_2_0()); - } - lv_stateDeclaration_2_0=ruleStateDeclaration { - if ($current==null) { - $current = createModelElementForParent(grammarAccess.getTestscriptRule()); - } - set( - $current, - "stateDeclaration", - lv_stateDeclaration_2_0, - "StateDeclaration"); - afterParserOrEnumRuleCall(); - } - -) -)( -( - { - newCompositeNode(grammarAccess.getTestscriptAccess().getInitialDeclarationInitialDeclarationParserRuleCall_3_0()); - } - lv_initialDeclaration_3_0=ruleInitialDeclaration { - if ($current==null) { - $current = createModelElementForParent(grammarAccess.getTestscriptRule()); - } - set( - $current, - "initialDeclaration", - lv_initialDeclaration_3_0, - "InitialDeclaration"); - afterParserOrEnumRuleCall(); - } - -) -)( -( - { - newCompositeNode(grammarAccess.getTestscriptAccess().getLoopsDeclarationLoopsDeclarationParserRuleCall_4_0()); - } - lv_loopsDeclaration_4_0=ruleLoopsDeclaration { - if ($current==null) { - $current = createModelElementForParent(grammarAccess.getTestscriptRule()); - } - set( - $current, - "loopsDeclaration", - lv_loopsDeclaration_4_0, - "LoopsDeclaration"); - afterParserOrEnumRuleCall(); - } - -) -)( -( - { - newCompositeNode(grammarAccess.getTestscriptAccess().getSeedDeclarationSeedDeclarationParserRuleCall_5_0()); - } - lv_seedDeclaration_5_0=ruleSeedDeclaration { - if ($current==null) { - $current = createModelElementForParent(grammarAccess.getTestscriptRule()); - } - set( - $current, - "seedDeclaration", - lv_seedDeclaration_5_0, - "SeedDeclaration"); - afterParserOrEnumRuleCall(); - } - -) -)?( -( - { - newCompositeNode(grammarAccess.getTestscriptAccess().getTransitionDeclarationsTransitionDeclarationParserRuleCall_6_0()); - } - lv_transitionDeclarations_6_0=ruleTransitionDeclaration { - if ($current==null) { - $current = createModelElementForParent(grammarAccess.getTestscriptRule()); - } - add( - $current, - "transitionDeclarations", - lv_transitionDeclarations_6_0, - "TransitionDeclaration"); - afterParserOrEnumRuleCall(); - } - -) -)* otherlv_7=';' - { - newLeafNode(otherlv_7, grammarAccess.getTestscriptAccess().getSemicolonKeyword_7()); - } -) -; - - - - - -// Entry rule entryRuleState -entryRuleState returns [EObject current=null] - : - { newCompositeNode(grammarAccess.getStateRule()); } - iv_ruleState=ruleState - { $current=$iv_ruleState.current; } - EOF -; - -// Rule State -ruleState returns [EObject current=null] - @init { enterRule(); - } - @after { leaveRule(); }: -( -( - lv_name_0_0=RULE_ID - { - newLeafNode(lv_name_0_0, grammarAccess.getStateAccess().getNameIDTerminalRuleCall_0()); - } - { - if ($current==null) { - $current = createModelElement(grammarAccess.getStateRule()); - } - setWithLastConsumed( - $current, - "name", - lv_name_0_0, - "ID"); - } - -) -) -; - - - - - -// Entry rule entryRuleStateDeclaration -entryRuleStateDeclaration returns [EObject current=null] - : - { newCompositeNode(grammarAccess.getStateDeclarationRule()); } - iv_ruleStateDeclaration=ruleStateDeclaration - { $current=$iv_ruleStateDeclaration.current; } - EOF -; - -// Rule StateDeclaration -ruleStateDeclaration returns [EObject current=null] - @init { enterRule(); - } - @after { leaveRule(); }: -( otherlv_0='states:' - { - newLeafNode(otherlv_0, grammarAccess.getStateDeclarationAccess().getStatesKeyword_0()); - } -( -( - { - newCompositeNode(grammarAccess.getStateDeclarationAccess().getStatesStateParserRuleCall_1_0()); - } - lv_states_1_0=ruleState { - if ($current==null) { - $current = createModelElementForParent(grammarAccess.getStateDeclarationRule()); - } - add( - $current, - "states", - lv_states_1_0, - "State"); - afterParserOrEnumRuleCall(); - } - -) -)( otherlv_2=',' - { - newLeafNode(otherlv_2, grammarAccess.getStateDeclarationAccess().getCommaKeyword_2_0()); - } -( -( - { - newCompositeNode(grammarAccess.getStateDeclarationAccess().getStatesStateParserRuleCall_2_1_0()); - } - lv_states_3_0=ruleState { - if ($current==null) { - $current = createModelElementForParent(grammarAccess.getStateDeclarationRule()); - } - add( - $current, - "states", - lv_states_3_0, - "State"); - afterParserOrEnumRuleCall(); - } - -) -))*) -; - - - - - -// Entry rule entryRuleInitialDeclaration -entryRuleInitialDeclaration returns [EObject current=null] - : - { newCompositeNode(grammarAccess.getInitialDeclarationRule()); } - iv_ruleInitialDeclaration=ruleInitialDeclaration - { $current=$iv_ruleInitialDeclaration.current; } - EOF -; - -// Rule InitialDeclaration -ruleInitialDeclaration returns [EObject current=null] - @init { enterRule(); - } - @after { leaveRule(); }: -( otherlv_0='initial:' - { - newLeafNode(otherlv_0, grammarAccess.getInitialDeclarationAccess().getInitialKeyword_0()); - } -( -( - { - if ($current==null) { - $current = createModelElement(grammarAccess.getInitialDeclarationRule()); - } - } - otherlv_1=RULE_ID - { - newLeafNode(otherlv_1, grammarAccess.getInitialDeclarationAccess().getInitialStateCrossReference_1_0()); - } - -) -)) -; - - - - - -// Entry rule entryRuleLoopsDeclaration -entryRuleLoopsDeclaration returns [EObject current=null] - : - { newCompositeNode(grammarAccess.getLoopsDeclarationRule()); } - iv_ruleLoopsDeclaration=ruleLoopsDeclaration - { $current=$iv_ruleLoopsDeclaration.current; } - EOF -; - -// Rule LoopsDeclaration -ruleLoopsDeclaration returns [EObject current=null] - @init { enterRule(); - } - @after { leaveRule(); }: -( otherlv_0='loops:' - { - newLeafNode(otherlv_0, grammarAccess.getLoopsDeclarationAccess().getLoopsKeyword_0()); - } -( -( - lv_val_1_0=RULE_INT - { - newLeafNode(lv_val_1_0, grammarAccess.getLoopsDeclarationAccess().getValINTTerminalRuleCall_1_0()); - } - { - if ($current==null) { - $current = createModelElement(grammarAccess.getLoopsDeclarationRule()); - } - setWithLastConsumed( - $current, - "val", - lv_val_1_0, - "INT"); - } - -) -)) -; - - - - - -// Entry rule entryRuleSeedDeclaration -entryRuleSeedDeclaration returns [EObject current=null] - : - { newCompositeNode(grammarAccess.getSeedDeclarationRule()); } - iv_ruleSeedDeclaration=ruleSeedDeclaration - { $current=$iv_ruleSeedDeclaration.current; } - EOF -; - -// Rule SeedDeclaration -ruleSeedDeclaration returns [EObject current=null] - @init { enterRule(); - } - @after { leaveRule(); }: -( otherlv_0='randseed:' - { - newLeafNode(otherlv_0, grammarAccess.getSeedDeclarationAccess().getRandseedKeyword_0()); - } -( -( - lv_val_1_0=RULE_INT - { - newLeafNode(lv_val_1_0, grammarAccess.getSeedDeclarationAccess().getValINTTerminalRuleCall_1_0()); - } - { - if ($current==null) { - $current = createModelElement(grammarAccess.getSeedDeclarationRule()); - } - setWithLastConsumed( - $current, - "val", - lv_val_1_0, - "INT"); - } - -) -)) -; - - - - - -// Entry rule entryRuleSignalDeclaration -entryRuleSignalDeclaration returns [EObject current=null] - : - { newCompositeNode(grammarAccess.getSignalDeclarationRule()); } - iv_ruleSignalDeclaration=ruleSignalDeclaration - { $current=$iv_ruleSignalDeclaration.current; } - EOF -; - -// Rule SignalDeclaration -ruleSignalDeclaration returns [EObject current=null] - @init { enterRule(); - } - @after { leaveRule(); }: -((( -( - lv_port_0_0=RULE_ID - { - newLeafNode(lv_port_0_0, grammarAccess.getSignalDeclarationAccess().getPortIDTerminalRuleCall_0_0_0()); - } - { - if ($current==null) { - $current = createModelElement(grammarAccess.getSignalDeclarationRule()); - } - setWithLastConsumed( - $current, - "port", - lv_port_0_0, - "ID"); - } - -) -) otherlv_1='.' - { - newLeafNode(otherlv_1, grammarAccess.getSignalDeclarationAccess().getFullStopKeyword_0_1()); - } -)?( -( - lv_signame_2_0=RULE_ID - { - newLeafNode(lv_signame_2_0, grammarAccess.getSignalDeclarationAccess().getSignameIDTerminalRuleCall_1_0()); - } - { - if ($current==null) { - $current = createModelElement(grammarAccess.getSignalDeclarationRule()); - } - setWithLastConsumed( - $current, - "signame", - lv_signame_2_0, - "ID"); - } - -) -)(( otherlv_3='=' - { - newLeafNode(otherlv_3, grammarAccess.getSignalDeclarationAccess().getEqualsSignKeyword_2_0_0()); - } -( -( - lv_intVal_4_0=RULE_INT - { - newLeafNode(lv_intVal_4_0, grammarAccess.getSignalDeclarationAccess().getIntValINTTerminalRuleCall_2_0_1_0()); - } - { - if ($current==null) { - $current = createModelElement(grammarAccess.getSignalDeclarationRule()); - } - setWithLastConsumed( - $current, - "intVal", - lv_intVal_4_0, - "INT"); - } - -) -)) - |( otherlv_5='=' - { - newLeafNode(otherlv_5, grammarAccess.getSignalDeclarationAccess().getEqualsSignKeyword_2_1_0()); - } -( -( - lv_strVal_6_0=RULE_STRING - { - newLeafNode(lv_strVal_6_0, grammarAccess.getSignalDeclarationAccess().getStrValSTRINGTerminalRuleCall_2_1_1_0()); - } - { - if ($current==null) { - $current = createModelElement(grammarAccess.getSignalDeclarationRule()); - } - setWithLastConsumed( - $current, - "strVal", - lv_strVal_6_0, - "STRING"); - } - -) -)))?) -; - - - - - -// Entry rule entryRuleSourceDeclaration -entryRuleSourceDeclaration returns [EObject current=null] - : - { newCompositeNode(grammarAccess.getSourceDeclarationRule()); } - iv_ruleSourceDeclaration=ruleSourceDeclaration - { $current=$iv_ruleSourceDeclaration.current; } - EOF -; - -// Rule SourceDeclaration -ruleSourceDeclaration returns [EObject current=null] - @init { enterRule(); - } - @after { leaveRule(); }: -(( -( - { - if ($current==null) { - $current = createModelElement(grammarAccess.getSourceDeclarationRule()); - } - } - otherlv_0=RULE_ID - { - newLeafNode(otherlv_0, grammarAccess.getSourceDeclarationAccess().getRefStateCrossReference_0_0()); - } - -) -) otherlv_1=':' - { - newLeafNode(otherlv_1, grammarAccess.getSourceDeclarationAccess().getColonKeyword_1()); - } -) -; - - - - - -// Entry rule entryRuleDestinationDeclaration -entryRuleDestinationDeclaration returns [EObject current=null] - : - { newCompositeNode(grammarAccess.getDestinationDeclarationRule()); } - iv_ruleDestinationDeclaration=ruleDestinationDeclaration - { $current=$iv_ruleDestinationDeclaration.current; } - EOF -; - -// Rule DestinationDeclaration -ruleDestinationDeclaration returns [EObject current=null] - @init { enterRule(); - } - @after { leaveRule(); }: -( otherlv_0='-> ' - { - newLeafNode(otherlv_0, grammarAccess.getDestinationDeclarationAccess().getHyphenMinusGreaterThanSignSpaceKeyword_0()); - } -( -( - { - if ($current==null) { - $current = createModelElement(grammarAccess.getDestinationDeclarationRule()); - } - } - otherlv_1=RULE_ID - { - newLeafNode(otherlv_1, grammarAccess.getDestinationDeclarationAccess().getRefStateCrossReference_1_0()); - } - -) -)) -; - - - - - -// Entry rule entryRuleTransitionDeclaration -entryRuleTransitionDeclaration returns [EObject current=null] - : - { newCompositeNode(grammarAccess.getTransitionDeclarationRule()); } - iv_ruleTransitionDeclaration=ruleTransitionDeclaration - { $current=$iv_ruleTransitionDeclaration.current; } - EOF -; - -// Rule TransitionDeclaration -ruleTransitionDeclaration returns [EObject current=null] - @init { enterRule(); - } - @after { leaveRule(); }: -(( -( - { - newCompositeNode(grammarAccess.getTransitionDeclarationAccess().getSourceSourceDeclarationParserRuleCall_0_0()); - } - lv_source_0_0=ruleSourceDeclaration { - if ($current==null) { - $current = createModelElementForParent(grammarAccess.getTransitionDeclarationRule()); - } - set( - $current, - "source", - lv_source_0_0, - "SourceDeclaration"); - afterParserOrEnumRuleCall(); - } - -) -) otherlv_1='in:' - { - newLeafNode(otherlv_1, grammarAccess.getTransitionDeclarationAccess().getInKeyword_1()); - } -( -( - { - newCompositeNode(grammarAccess.getTransitionDeclarationAccess().getInSignalDeclarationParserRuleCall_2_0()); - } - lv_in_2_0=ruleSignalDeclaration { - if ($current==null) { - $current = createModelElementForParent(grammarAccess.getTransitionDeclarationRule()); - } - add( - $current, - "in", - lv_in_2_0, - "SignalDeclaration"); - afterParserOrEnumRuleCall(); - } - -) -)* otherlv_3='out:' - { - newLeafNode(otherlv_3, grammarAccess.getTransitionDeclarationAccess().getOutKeyword_3()); - } -( -( - { - newCompositeNode(grammarAccess.getTransitionDeclarationAccess().getOutSignalDeclarationParserRuleCall_4_0()); - } - lv_out_4_0=ruleSignalDeclaration { - if ($current==null) { - $current = createModelElementForParent(grammarAccess.getTransitionDeclarationRule()); - } - add( - $current, - "out", - lv_out_4_0, - "SignalDeclaration"); - afterParserOrEnumRuleCall(); - } - -) -)*( -( - { - newCompositeNode(grammarAccess.getTransitionDeclarationAccess().getDestinationDestinationDeclarationParserRuleCall_5_0()); - } - lv_destination_5_0=ruleDestinationDeclaration { - if ($current==null) { - $current = createModelElementForParent(grammarAccess.getTransitionDeclarationRule()); - } - set( - $current, - "destination", - lv_destination_5_0, - "DestinationDeclaration"); - afterParserOrEnumRuleCall(); - } - -) -)) -; - - - - - -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 InternalFSMtest;
+
+options {
+ superClass=AbstractInternalAntlrParser;
+
+}
+
+@lexer::header {
+package org.eclipse.etrice.generator.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.generator.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.generator.services.FSMtestGrammarAccess;
+
+}
+
+@parser::members {
+
+ private FSMtestGrammarAccess grammarAccess;
+
+ public InternalFSMtestParser(TokenStream input, FSMtestGrammarAccess grammarAccess) {
+ this(input);
+ this.grammarAccess = grammarAccess;
+ registerRules(grammarAccess.getGrammar());
+ }
+
+ @Override
+ protected String getFirstRuleName() {
+ return "Model";
+ }
+
+ @Override
+ protected FSMtestGrammarAccess getGrammarAccess() {
+ return grammarAccess;
+ }
+}
+
+@rulecatch {
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+}
+
+
+
+
+// Entry rule entryRuleModel
+entryRuleModel returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getModelRule()); }
+ iv_ruleModel=ruleModel
+ { $current=$iv_ruleModel.current; }
+ EOF
+;
+
+// Rule Model
+ruleModel returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+(
+(
+ {
+ newCompositeNode(grammarAccess.getModelAccess().getTestscriptsTestscriptParserRuleCall_0());
+ }
+ lv_Testscripts_0_0=ruleTestscript {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getModelRule());
+ }
+ add(
+ $current,
+ "Testscripts",
+ lv_Testscripts_0_0,
+ "Testscript");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+)*
+;
+
+
+
+
+
+// Entry rule entryRuleTestscript
+entryRuleTestscript returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getTestscriptRule()); }
+ iv_ruleTestscript=ruleTestscript
+ { $current=$iv_ruleTestscript.current; }
+ EOF
+;
+
+// Rule Testscript
+ruleTestscript returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+( otherlv_0='fsmtest'
+ {
+ newLeafNode(otherlv_0, grammarAccess.getTestscriptAccess().getFsmtestKeyword_0());
+ }
+(
+(
+ lv_name_1_0=RULE_ID
+ {
+ newLeafNode(lv_name_1_0, grammarAccess.getTestscriptAccess().getNameIDTerminalRuleCall_1_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getTestscriptRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "name",
+ lv_name_1_0,
+ "ID");
+ }
+
+)
+)(
+(
+ {
+ newCompositeNode(grammarAccess.getTestscriptAccess().getStateDeclarationStateDeclarationParserRuleCall_2_0());
+ }
+ lv_stateDeclaration_2_0=ruleStateDeclaration {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getTestscriptRule());
+ }
+ set(
+ $current,
+ "stateDeclaration",
+ lv_stateDeclaration_2_0,
+ "StateDeclaration");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+)(
+(
+ {
+ newCompositeNode(grammarAccess.getTestscriptAccess().getInitialDeclarationInitialDeclarationParserRuleCall_3_0());
+ }
+ lv_initialDeclaration_3_0=ruleInitialDeclaration {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getTestscriptRule());
+ }
+ set(
+ $current,
+ "initialDeclaration",
+ lv_initialDeclaration_3_0,
+ "InitialDeclaration");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+)(
+(
+ {
+ newCompositeNode(grammarAccess.getTestscriptAccess().getLoopsDeclarationLoopsDeclarationParserRuleCall_4_0());
+ }
+ lv_loopsDeclaration_4_0=ruleLoopsDeclaration {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getTestscriptRule());
+ }
+ set(
+ $current,
+ "loopsDeclaration",
+ lv_loopsDeclaration_4_0,
+ "LoopsDeclaration");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+)(
+(
+ {
+ newCompositeNode(grammarAccess.getTestscriptAccess().getSeedDeclarationSeedDeclarationParserRuleCall_5_0());
+ }
+ lv_seedDeclaration_5_0=ruleSeedDeclaration {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getTestscriptRule());
+ }
+ set(
+ $current,
+ "seedDeclaration",
+ lv_seedDeclaration_5_0,
+ "SeedDeclaration");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+)?(
+(
+ {
+ newCompositeNode(grammarAccess.getTestscriptAccess().getTransitionDeclarationsTransitionDeclarationParserRuleCall_6_0());
+ }
+ lv_transitionDeclarations_6_0=ruleTransitionDeclaration {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getTestscriptRule());
+ }
+ add(
+ $current,
+ "transitionDeclarations",
+ lv_transitionDeclarations_6_0,
+ "TransitionDeclaration");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+)* otherlv_7=';'
+ {
+ newLeafNode(otherlv_7, grammarAccess.getTestscriptAccess().getSemicolonKeyword_7());
+ }
+)
+;
+
+
+
+
+
+// Entry rule entryRuleState
+entryRuleState returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getStateRule()); }
+ iv_ruleState=ruleState
+ { $current=$iv_ruleState.current; }
+ EOF
+;
+
+// Rule State
+ruleState returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+(
+(
+ lv_name_0_0=RULE_ID
+ {
+ newLeafNode(lv_name_0_0, grammarAccess.getStateAccess().getNameIDTerminalRuleCall_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getStateRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "name",
+ lv_name_0_0,
+ "ID");
+ }
+
+)
+)
+;
+
+
+
+
+
+// Entry rule entryRuleStateDeclaration
+entryRuleStateDeclaration returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getStateDeclarationRule()); }
+ iv_ruleStateDeclaration=ruleStateDeclaration
+ { $current=$iv_ruleStateDeclaration.current; }
+ EOF
+;
+
+// Rule StateDeclaration
+ruleStateDeclaration returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+( otherlv_0='states:'
+ {
+ newLeafNode(otherlv_0, grammarAccess.getStateDeclarationAccess().getStatesKeyword_0());
+ }
+(
+(
+ {
+ newCompositeNode(grammarAccess.getStateDeclarationAccess().getStatesStateParserRuleCall_1_0());
+ }
+ lv_states_1_0=ruleState {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getStateDeclarationRule());
+ }
+ add(
+ $current,
+ "states",
+ lv_states_1_0,
+ "State");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+)( otherlv_2=','
+ {
+ newLeafNode(otherlv_2, grammarAccess.getStateDeclarationAccess().getCommaKeyword_2_0());
+ }
+(
+(
+ {
+ newCompositeNode(grammarAccess.getStateDeclarationAccess().getStatesStateParserRuleCall_2_1_0());
+ }
+ lv_states_3_0=ruleState {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getStateDeclarationRule());
+ }
+ add(
+ $current,
+ "states",
+ lv_states_3_0,
+ "State");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+))*)
+;
+
+
+
+
+
+// Entry rule entryRuleInitialDeclaration
+entryRuleInitialDeclaration returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getInitialDeclarationRule()); }
+ iv_ruleInitialDeclaration=ruleInitialDeclaration
+ { $current=$iv_ruleInitialDeclaration.current; }
+ EOF
+;
+
+// Rule InitialDeclaration
+ruleInitialDeclaration returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+( otherlv_0='initial:'
+ {
+ newLeafNode(otherlv_0, grammarAccess.getInitialDeclarationAccess().getInitialKeyword_0());
+ }
+(
+(
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getInitialDeclarationRule());
+ }
+ }
+ otherlv_1=RULE_ID
+ {
+ newLeafNode(otherlv_1, grammarAccess.getInitialDeclarationAccess().getInitialStateCrossReference_1_0());
+ }
+
+)
+))
+;
+
+
+
+
+
+// Entry rule entryRuleLoopsDeclaration
+entryRuleLoopsDeclaration returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getLoopsDeclarationRule()); }
+ iv_ruleLoopsDeclaration=ruleLoopsDeclaration
+ { $current=$iv_ruleLoopsDeclaration.current; }
+ EOF
+;
+
+// Rule LoopsDeclaration
+ruleLoopsDeclaration returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+( otherlv_0='loops:'
+ {
+ newLeafNode(otherlv_0, grammarAccess.getLoopsDeclarationAccess().getLoopsKeyword_0());
+ }
+(
+(
+ lv_val_1_0=RULE_INT
+ {
+ newLeafNode(lv_val_1_0, grammarAccess.getLoopsDeclarationAccess().getValINTTerminalRuleCall_1_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getLoopsDeclarationRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "val",
+ lv_val_1_0,
+ "INT");
+ }
+
+)
+))
+;
+
+
+
+
+
+// Entry rule entryRuleSeedDeclaration
+entryRuleSeedDeclaration returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getSeedDeclarationRule()); }
+ iv_ruleSeedDeclaration=ruleSeedDeclaration
+ { $current=$iv_ruleSeedDeclaration.current; }
+ EOF
+;
+
+// Rule SeedDeclaration
+ruleSeedDeclaration returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+( otherlv_0='randseed:'
+ {
+ newLeafNode(otherlv_0, grammarAccess.getSeedDeclarationAccess().getRandseedKeyword_0());
+ }
+(
+(
+ lv_val_1_0=RULE_INT
+ {
+ newLeafNode(lv_val_1_0, grammarAccess.getSeedDeclarationAccess().getValINTTerminalRuleCall_1_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getSeedDeclarationRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "val",
+ lv_val_1_0,
+ "INT");
+ }
+
+)
+))
+;
+
+
+
+
+
+// Entry rule entryRuleSignalDeclaration
+entryRuleSignalDeclaration returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getSignalDeclarationRule()); }
+ iv_ruleSignalDeclaration=ruleSignalDeclaration
+ { $current=$iv_ruleSignalDeclaration.current; }
+ EOF
+;
+
+// Rule SignalDeclaration
+ruleSignalDeclaration returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+(((
+(
+ lv_port_0_0=RULE_ID
+ {
+ newLeafNode(lv_port_0_0, grammarAccess.getSignalDeclarationAccess().getPortIDTerminalRuleCall_0_0_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getSignalDeclarationRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "port",
+ lv_port_0_0,
+ "ID");
+ }
+
+)
+) otherlv_1='.'
+ {
+ newLeafNode(otherlv_1, grammarAccess.getSignalDeclarationAccess().getFullStopKeyword_0_1());
+ }
+)?(
+(
+ lv_signame_2_0=RULE_ID
+ {
+ newLeafNode(lv_signame_2_0, grammarAccess.getSignalDeclarationAccess().getSignameIDTerminalRuleCall_1_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getSignalDeclarationRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "signame",
+ lv_signame_2_0,
+ "ID");
+ }
+
+)
+)(( otherlv_3='='
+ {
+ newLeafNode(otherlv_3, grammarAccess.getSignalDeclarationAccess().getEqualsSignKeyword_2_0_0());
+ }
+(
+(
+ lv_intVal_4_0=RULE_INT
+ {
+ newLeafNode(lv_intVal_4_0, grammarAccess.getSignalDeclarationAccess().getIntValINTTerminalRuleCall_2_0_1_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getSignalDeclarationRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "intVal",
+ lv_intVal_4_0,
+ "INT");
+ }
+
+)
+))
+ |( otherlv_5='='
+ {
+ newLeafNode(otherlv_5, grammarAccess.getSignalDeclarationAccess().getEqualsSignKeyword_2_1_0());
+ }
+(
+(
+ lv_strVal_6_0=RULE_STRING
+ {
+ newLeafNode(lv_strVal_6_0, grammarAccess.getSignalDeclarationAccess().getStrValSTRINGTerminalRuleCall_2_1_1_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getSignalDeclarationRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "strVal",
+ lv_strVal_6_0,
+ "STRING");
+ }
+
+)
+)))?)
+;
+
+
+
+
+
+// Entry rule entryRuleSourceDeclaration
+entryRuleSourceDeclaration returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getSourceDeclarationRule()); }
+ iv_ruleSourceDeclaration=ruleSourceDeclaration
+ { $current=$iv_ruleSourceDeclaration.current; }
+ EOF
+;
+
+// Rule SourceDeclaration
+ruleSourceDeclaration returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+((
+(
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getSourceDeclarationRule());
+ }
+ }
+ otherlv_0=RULE_ID
+ {
+ newLeafNode(otherlv_0, grammarAccess.getSourceDeclarationAccess().getRefStateCrossReference_0_0());
+ }
+
+)
+) otherlv_1=':'
+ {
+ newLeafNode(otherlv_1, grammarAccess.getSourceDeclarationAccess().getColonKeyword_1());
+ }
+)
+;
+
+
+
+
+
+// Entry rule entryRuleDestinationDeclaration
+entryRuleDestinationDeclaration returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getDestinationDeclarationRule()); }
+ iv_ruleDestinationDeclaration=ruleDestinationDeclaration
+ { $current=$iv_ruleDestinationDeclaration.current; }
+ EOF
+;
+
+// Rule DestinationDeclaration
+ruleDestinationDeclaration returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+( otherlv_0='-> '
+ {
+ newLeafNode(otherlv_0, grammarAccess.getDestinationDeclarationAccess().getHyphenMinusGreaterThanSignSpaceKeyword_0());
+ }
+(
+(
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getDestinationDeclarationRule());
+ }
+ }
+ otherlv_1=RULE_ID
+ {
+ newLeafNode(otherlv_1, grammarAccess.getDestinationDeclarationAccess().getRefStateCrossReference_1_0());
+ }
+
+)
+))
+;
+
+
+
+
+
+// Entry rule entryRuleTransitionDeclaration
+entryRuleTransitionDeclaration returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getTransitionDeclarationRule()); }
+ iv_ruleTransitionDeclaration=ruleTransitionDeclaration
+ { $current=$iv_ruleTransitionDeclaration.current; }
+ EOF
+;
+
+// Rule TransitionDeclaration
+ruleTransitionDeclaration returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+((
+(
+ {
+ newCompositeNode(grammarAccess.getTransitionDeclarationAccess().getSourceSourceDeclarationParserRuleCall_0_0());
+ }
+ lv_source_0_0=ruleSourceDeclaration {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getTransitionDeclarationRule());
+ }
+ set(
+ $current,
+ "source",
+ lv_source_0_0,
+ "SourceDeclaration");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+) otherlv_1='in:'
+ {
+ newLeafNode(otherlv_1, grammarAccess.getTransitionDeclarationAccess().getInKeyword_1());
+ }
+(
+(
+ {
+ newCompositeNode(grammarAccess.getTransitionDeclarationAccess().getInSignalDeclarationParserRuleCall_2_0());
+ }
+ lv_in_2_0=ruleSignalDeclaration {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getTransitionDeclarationRule());
+ }
+ add(
+ $current,
+ "in",
+ lv_in_2_0,
+ "SignalDeclaration");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+)* otherlv_3='out:'
+ {
+ newLeafNode(otherlv_3, grammarAccess.getTransitionDeclarationAccess().getOutKeyword_3());
+ }
+(
+(
+ {
+ newCompositeNode(grammarAccess.getTransitionDeclarationAccess().getOutSignalDeclarationParserRuleCall_4_0());
+ }
+ lv_out_4_0=ruleSignalDeclaration {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getTransitionDeclarationRule());
+ }
+ add(
+ $current,
+ "out",
+ lv_out_4_0,
+ "SignalDeclaration");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+)*(
+(
+ {
+ newCompositeNode(grammarAccess.getTransitionDeclarationAccess().getDestinationDestinationDeclarationParserRuleCall_5_0());
+ }
+ lv_destination_5_0=ruleDestinationDeclaration {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getTransitionDeclarationRule());
+ }
+ set(
+ $current,
+ "destination",
+ lv_destination_5_0,
+ "DestinationDeclaration");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+))
+;
+
+
+
+
+
+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.generator.fsmtest/src-gen/org/eclipse/etrice/generator/services/FSMtestGrammarAccess.java b/plugins/org.eclipse.etrice.generator.fsmtest/src-gen/org/eclipse/etrice/generator/services/FSMtestGrammarAccess.java index 9390922f8..4aafcc57b 100644 --- a/plugins/org.eclipse.etrice.generator.fsmtest/src-gen/org/eclipse/etrice/generator/services/FSMtestGrammarAccess.java +++ b/plugins/org.eclipse.etrice.generator.fsmtest/src-gen/org/eclipse/etrice/generator/services/FSMtestGrammarAccess.java @@ -1,665 +1,665 @@ -/* -* generated by Xtext -*/ - -package org.eclipse.etrice.generator.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 FSMtestGrammarAccess extends AbstractGrammarElementFinder { - - - public class ModelElements extends AbstractParserRuleElementFinder { - private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Model"); - private final Assignment cTestscriptsAssignment = (Assignment)rule.eContents().get(1); - private final RuleCall cTestscriptsTestscriptParserRuleCall_0 = (RuleCall)cTestscriptsAssignment.eContents().get(0); - - //Model: - // - // Testscripts+=Testscript*; - public ParserRule getRule() { return rule; } - - //Testscripts+=Testscript* - public Assignment getTestscriptsAssignment() { return cTestscriptsAssignment; } - - //Testscript - public RuleCall getTestscriptsTestscriptParserRuleCall_0() { return cTestscriptsTestscriptParserRuleCall_0; } - } - - public class TestscriptElements extends AbstractParserRuleElementFinder { - private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Testscript"); - private final Group cGroup = (Group)rule.eContents().get(1); - private final Keyword cFsmtestKeyword_0 = (Keyword)cGroup.eContents().get(0); - private final Assignment cNameAssignment_1 = (Assignment)cGroup.eContents().get(1); - private final RuleCall cNameIDTerminalRuleCall_1_0 = (RuleCall)cNameAssignment_1.eContents().get(0); - private final Assignment cStateDeclarationAssignment_2 = (Assignment)cGroup.eContents().get(2); - private final RuleCall cStateDeclarationStateDeclarationParserRuleCall_2_0 = (RuleCall)cStateDeclarationAssignment_2.eContents().get(0); - private final Assignment cInitialDeclarationAssignment_3 = (Assignment)cGroup.eContents().get(3); - private final RuleCall cInitialDeclarationInitialDeclarationParserRuleCall_3_0 = (RuleCall)cInitialDeclarationAssignment_3.eContents().get(0); - private final Assignment cLoopsDeclarationAssignment_4 = (Assignment)cGroup.eContents().get(4); - private final RuleCall cLoopsDeclarationLoopsDeclarationParserRuleCall_4_0 = (RuleCall)cLoopsDeclarationAssignment_4.eContents().get(0); - private final Assignment cSeedDeclarationAssignment_5 = (Assignment)cGroup.eContents().get(5); - private final RuleCall cSeedDeclarationSeedDeclarationParserRuleCall_5_0 = (RuleCall)cSeedDeclarationAssignment_5.eContents().get(0); - private final Assignment cTransitionDeclarationsAssignment_6 = (Assignment)cGroup.eContents().get(6); - private final RuleCall cTransitionDeclarationsTransitionDeclarationParserRuleCall_6_0 = (RuleCall)cTransitionDeclarationsAssignment_6.eContents().get(0); - private final Keyword cSemicolonKeyword_7 = (Keyword)cGroup.eContents().get(7); - - //Testscript: - // - // "fsmtest" name=ID stateDeclaration=StateDeclaration initialDeclaration=InitialDeclaration - // - // loopsDeclaration=LoopsDeclaration seedDeclaration=SeedDeclaration? transitionDeclarations+=TransitionDeclaration* - // - // ";"; - public ParserRule getRule() { return rule; } - - //"fsmtest" name=ID stateDeclaration=StateDeclaration initialDeclaration=InitialDeclaration - // - //loopsDeclaration=LoopsDeclaration seedDeclaration=SeedDeclaration? transitionDeclarations+=TransitionDeclaration* ";" - public Group getGroup() { return cGroup; } - - //"fsmtest" - public Keyword getFsmtestKeyword_0() { return cFsmtestKeyword_0; } - - //name=ID - public Assignment getNameAssignment_1() { return cNameAssignment_1; } - - //ID - public RuleCall getNameIDTerminalRuleCall_1_0() { return cNameIDTerminalRuleCall_1_0; } - - //stateDeclaration=StateDeclaration - public Assignment getStateDeclarationAssignment_2() { return cStateDeclarationAssignment_2; } - - //StateDeclaration - public RuleCall getStateDeclarationStateDeclarationParserRuleCall_2_0() { return cStateDeclarationStateDeclarationParserRuleCall_2_0; } - - //initialDeclaration=InitialDeclaration - public Assignment getInitialDeclarationAssignment_3() { return cInitialDeclarationAssignment_3; } - - //InitialDeclaration - public RuleCall getInitialDeclarationInitialDeclarationParserRuleCall_3_0() { return cInitialDeclarationInitialDeclarationParserRuleCall_3_0; } - - //loopsDeclaration=LoopsDeclaration - public Assignment getLoopsDeclarationAssignment_4() { return cLoopsDeclarationAssignment_4; } - - //LoopsDeclaration - public RuleCall getLoopsDeclarationLoopsDeclarationParserRuleCall_4_0() { return cLoopsDeclarationLoopsDeclarationParserRuleCall_4_0; } - - //seedDeclaration=SeedDeclaration? - public Assignment getSeedDeclarationAssignment_5() { return cSeedDeclarationAssignment_5; } - - //SeedDeclaration - public RuleCall getSeedDeclarationSeedDeclarationParserRuleCall_5_0() { return cSeedDeclarationSeedDeclarationParserRuleCall_5_0; } - - //transitionDeclarations+=TransitionDeclaration* - public Assignment getTransitionDeclarationsAssignment_6() { return cTransitionDeclarationsAssignment_6; } - - //TransitionDeclaration - public RuleCall getTransitionDeclarationsTransitionDeclarationParserRuleCall_6_0() { return cTransitionDeclarationsTransitionDeclarationParserRuleCall_6_0; } - - //";" - public Keyword getSemicolonKeyword_7() { return cSemicolonKeyword_7; } - } - - public class StateElements extends AbstractParserRuleElementFinder { - private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "State"); - private final Assignment cNameAssignment = (Assignment)rule.eContents().get(1); - private final RuleCall cNameIDTerminalRuleCall_0 = (RuleCall)cNameAssignment.eContents().get(0); - - //State: - // - // name=ID; - public ParserRule getRule() { return rule; } - - //name=ID - public Assignment getNameAssignment() { return cNameAssignment; } - - //ID - public RuleCall getNameIDTerminalRuleCall_0() { return cNameIDTerminalRuleCall_0; } - } - - public class StateDeclarationElements extends AbstractParserRuleElementFinder { - private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "StateDeclaration"); - private final Group cGroup = (Group)rule.eContents().get(1); - private final Keyword cStatesKeyword_0 = (Keyword)cGroup.eContents().get(0); - private final Assignment cStatesAssignment_1 = (Assignment)cGroup.eContents().get(1); - private final RuleCall cStatesStateParserRuleCall_1_0 = (RuleCall)cStatesAssignment_1.eContents().get(0); - private final Group cGroup_2 = (Group)cGroup.eContents().get(2); - private final Keyword cCommaKeyword_2_0 = (Keyword)cGroup_2.eContents().get(0); - private final Assignment cStatesAssignment_2_1 = (Assignment)cGroup_2.eContents().get(1); - private final RuleCall cStatesStateParserRuleCall_2_1_0 = (RuleCall)cStatesAssignment_2_1.eContents().get(0); - - //StateDeclaration: - // - // "states:" states+=State ("," states+=State)*; - public ParserRule getRule() { return rule; } - - //"states:" states+=State ("," states+=State)* - public Group getGroup() { return cGroup; } - - //"states:" - public Keyword getStatesKeyword_0() { return cStatesKeyword_0; } - - //states+=State - public Assignment getStatesAssignment_1() { return cStatesAssignment_1; } - - //State - public RuleCall getStatesStateParserRuleCall_1_0() { return cStatesStateParserRuleCall_1_0; } - - //("," states+=State)* - public Group getGroup_2() { return cGroup_2; } - - //"," - public Keyword getCommaKeyword_2_0() { return cCommaKeyword_2_0; } - - //states+=State - public Assignment getStatesAssignment_2_1() { return cStatesAssignment_2_1; } - - //State - public RuleCall getStatesStateParserRuleCall_2_1_0() { return cStatesStateParserRuleCall_2_1_0; } - } - - public class InitialDeclarationElements extends AbstractParserRuleElementFinder { - private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "InitialDeclaration"); - private final Group cGroup = (Group)rule.eContents().get(1); - private final Keyword cInitialKeyword_0 = (Keyword)cGroup.eContents().get(0); - private final Assignment cInitialAssignment_1 = (Assignment)cGroup.eContents().get(1); - private final CrossReference cInitialStateCrossReference_1_0 = (CrossReference)cInitialAssignment_1.eContents().get(0); - private final RuleCall cInitialStateIDTerminalRuleCall_1_0_1 = (RuleCall)cInitialStateCrossReference_1_0.eContents().get(1); - - //InitialDeclaration: - // - // "initial:" initial=[State]; - public ParserRule getRule() { return rule; } - - //"initial:" initial=[State] - public Group getGroup() { return cGroup; } - - //"initial:" - public Keyword getInitialKeyword_0() { return cInitialKeyword_0; } - - //initial=[State] - public Assignment getInitialAssignment_1() { return cInitialAssignment_1; } - - //[State] - public CrossReference getInitialStateCrossReference_1_0() { return cInitialStateCrossReference_1_0; } - - //ID - public RuleCall getInitialStateIDTerminalRuleCall_1_0_1() { return cInitialStateIDTerminalRuleCall_1_0_1; } - } - - public class LoopsDeclarationElements extends AbstractParserRuleElementFinder { - private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "LoopsDeclaration"); - private final Group cGroup = (Group)rule.eContents().get(1); - private final Keyword cLoopsKeyword_0 = (Keyword)cGroup.eContents().get(0); - private final Assignment cValAssignment_1 = (Assignment)cGroup.eContents().get(1); - private final RuleCall cValINTTerminalRuleCall_1_0 = (RuleCall)cValAssignment_1.eContents().get(0); - - //LoopsDeclaration: - // - // "loops:" val=INT; - public ParserRule getRule() { return rule; } - - //"loops:" val=INT - public Group getGroup() { return cGroup; } - - //"loops:" - public Keyword getLoopsKeyword_0() { return cLoopsKeyword_0; } - - //val=INT - public Assignment getValAssignment_1() { return cValAssignment_1; } - - //INT - public RuleCall getValINTTerminalRuleCall_1_0() { return cValINTTerminalRuleCall_1_0; } - } - - public class SeedDeclarationElements extends AbstractParserRuleElementFinder { - private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "SeedDeclaration"); - private final Group cGroup = (Group)rule.eContents().get(1); - private final Keyword cRandseedKeyword_0 = (Keyword)cGroup.eContents().get(0); - private final Assignment cValAssignment_1 = (Assignment)cGroup.eContents().get(1); - private final RuleCall cValINTTerminalRuleCall_1_0 = (RuleCall)cValAssignment_1.eContents().get(0); - - //SeedDeclaration: - // - // "randseed:" val=INT; - public ParserRule getRule() { return rule; } - - //"randseed:" val=INT - public Group getGroup() { return cGroup; } - - //"randseed:" - public Keyword getRandseedKeyword_0() { return cRandseedKeyword_0; } - - //val=INT - public Assignment getValAssignment_1() { return cValAssignment_1; } - - //INT - public RuleCall getValINTTerminalRuleCall_1_0() { return cValINTTerminalRuleCall_1_0; } - } - - public class SignalDeclarationElements extends AbstractParserRuleElementFinder { - private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "SignalDeclaration"); - private final Group cGroup = (Group)rule.eContents().get(1); - private final Group cGroup_0 = (Group)cGroup.eContents().get(0); - private final Assignment cPortAssignment_0_0 = (Assignment)cGroup_0.eContents().get(0); - private final RuleCall cPortIDTerminalRuleCall_0_0_0 = (RuleCall)cPortAssignment_0_0.eContents().get(0); - private final Keyword cFullStopKeyword_0_1 = (Keyword)cGroup_0.eContents().get(1); - private final Assignment cSignameAssignment_1 = (Assignment)cGroup.eContents().get(1); - private final RuleCall cSignameIDTerminalRuleCall_1_0 = (RuleCall)cSignameAssignment_1.eContents().get(0); - private final Alternatives cAlternatives_2 = (Alternatives)cGroup.eContents().get(2); - private final Group cGroup_2_0 = (Group)cAlternatives_2.eContents().get(0); - private final Keyword cEqualsSignKeyword_2_0_0 = (Keyword)cGroup_2_0.eContents().get(0); - private final Assignment cIntValAssignment_2_0_1 = (Assignment)cGroup_2_0.eContents().get(1); - private final RuleCall cIntValINTTerminalRuleCall_2_0_1_0 = (RuleCall)cIntValAssignment_2_0_1.eContents().get(0); - private final Group cGroup_2_1 = (Group)cAlternatives_2.eContents().get(1); - private final Keyword cEqualsSignKeyword_2_1_0 = (Keyword)cGroup_2_1.eContents().get(0); - private final Assignment cStrValAssignment_2_1_1 = (Assignment)cGroup_2_1.eContents().get(1); - private final RuleCall cStrValSTRINGTerminalRuleCall_2_1_1_0 = (RuleCall)cStrValAssignment_2_1_1.eContents().get(0); - - //SignalDeclaration: - // - // (port=ID ".")? signame=ID ("=" intVal=INT | "=" strVal=STRING)?; - public ParserRule getRule() { return rule; } - - //(port=ID ".")? signame=ID ("=" intVal=INT | "=" strVal=STRING)? - public Group getGroup() { return cGroup; } - - //(port=ID ".")? - public Group getGroup_0() { return cGroup_0; } - - //port=ID - public Assignment getPortAssignment_0_0() { return cPortAssignment_0_0; } - - //ID - public RuleCall getPortIDTerminalRuleCall_0_0_0() { return cPortIDTerminalRuleCall_0_0_0; } - - //"." - public Keyword getFullStopKeyword_0_1() { return cFullStopKeyword_0_1; } - - //signame=ID - public Assignment getSignameAssignment_1() { return cSignameAssignment_1; } - - //ID - public RuleCall getSignameIDTerminalRuleCall_1_0() { return cSignameIDTerminalRuleCall_1_0; } - - //("=" intVal=INT | "=" strVal=STRING)? - public Alternatives getAlternatives_2() { return cAlternatives_2; } - - //"=" intVal=INT - public Group getGroup_2_0() { return cGroup_2_0; } - - //"=" - public Keyword getEqualsSignKeyword_2_0_0() { return cEqualsSignKeyword_2_0_0; } - - //intVal=INT - public Assignment getIntValAssignment_2_0_1() { return cIntValAssignment_2_0_1; } - - //INT - public RuleCall getIntValINTTerminalRuleCall_2_0_1_0() { return cIntValINTTerminalRuleCall_2_0_1_0; } - - //"=" strVal=STRING - public Group getGroup_2_1() { return cGroup_2_1; } - - //"=" - public Keyword getEqualsSignKeyword_2_1_0() { return cEqualsSignKeyword_2_1_0; } - - //strVal=STRING - public Assignment getStrValAssignment_2_1_1() { return cStrValAssignment_2_1_1; } - - //STRING - public RuleCall getStrValSTRINGTerminalRuleCall_2_1_1_0() { return cStrValSTRINGTerminalRuleCall_2_1_1_0; } - } - - public class SourceDeclarationElements extends AbstractParserRuleElementFinder { - private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "SourceDeclaration"); - private final Group cGroup = (Group)rule.eContents().get(1); - private final Assignment cRefAssignment_0 = (Assignment)cGroup.eContents().get(0); - private final CrossReference cRefStateCrossReference_0_0 = (CrossReference)cRefAssignment_0.eContents().get(0); - private final RuleCall cRefStateIDTerminalRuleCall_0_0_1 = (RuleCall)cRefStateCrossReference_0_0.eContents().get(1); - private final Keyword cColonKeyword_1 = (Keyword)cGroup.eContents().get(1); - - //SourceDeclaration: - // - // ref=[State] ":"; - public ParserRule getRule() { return rule; } - - //ref=[State] ":" - public Group getGroup() { return cGroup; } - - //ref=[State] - public Assignment getRefAssignment_0() { return cRefAssignment_0; } - - //[State] - public CrossReference getRefStateCrossReference_0_0() { return cRefStateCrossReference_0_0; } - - //ID - public RuleCall getRefStateIDTerminalRuleCall_0_0_1() { return cRefStateIDTerminalRuleCall_0_0_1; } - - //":" - public Keyword getColonKeyword_1() { return cColonKeyword_1; } - } - - public class DestinationDeclarationElements extends AbstractParserRuleElementFinder { - private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "DestinationDeclaration"); - private final Group cGroup = (Group)rule.eContents().get(1); - private final Keyword cHyphenMinusGreaterThanSignSpaceKeyword_0 = (Keyword)cGroup.eContents().get(0); - private final Assignment cRefAssignment_1 = (Assignment)cGroup.eContents().get(1); - private final CrossReference cRefStateCrossReference_1_0 = (CrossReference)cRefAssignment_1.eContents().get(0); - private final RuleCall cRefStateIDTerminalRuleCall_1_0_1 = (RuleCall)cRefStateCrossReference_1_0.eContents().get(1); - - //DestinationDeclaration: - // - // "-> " ref=[State]; - public ParserRule getRule() { return rule; } - - //"-> " ref=[State] - public Group getGroup() { return cGroup; } - - //"-> " - public Keyword getHyphenMinusGreaterThanSignSpaceKeyword_0() { return cHyphenMinusGreaterThanSignSpaceKeyword_0; } - - //ref=[State] - public Assignment getRefAssignment_1() { return cRefAssignment_1; } - - //[State] - public CrossReference getRefStateCrossReference_1_0() { return cRefStateCrossReference_1_0; } - - //ID - public RuleCall getRefStateIDTerminalRuleCall_1_0_1() { return cRefStateIDTerminalRuleCall_1_0_1; } - } - - public class TransitionDeclarationElements extends AbstractParserRuleElementFinder { - private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "TransitionDeclaration"); - private final Group cGroup = (Group)rule.eContents().get(1); - private final Assignment cSourceAssignment_0 = (Assignment)cGroup.eContents().get(0); - private final RuleCall cSourceSourceDeclarationParserRuleCall_0_0 = (RuleCall)cSourceAssignment_0.eContents().get(0); - private final Keyword cInKeyword_1 = (Keyword)cGroup.eContents().get(1); - private final Assignment cInAssignment_2 = (Assignment)cGroup.eContents().get(2); - private final RuleCall cInSignalDeclarationParserRuleCall_2_0 = (RuleCall)cInAssignment_2.eContents().get(0); - private final Keyword cOutKeyword_3 = (Keyword)cGroup.eContents().get(3); - private final Assignment cOutAssignment_4 = (Assignment)cGroup.eContents().get(4); - private final RuleCall cOutSignalDeclarationParserRuleCall_4_0 = (RuleCall)cOutAssignment_4.eContents().get(0); - private final Assignment cDestinationAssignment_5 = (Assignment)cGroup.eContents().get(5); - private final RuleCall cDestinationDestinationDeclarationParserRuleCall_5_0 = (RuleCall)cDestinationAssignment_5.eContents().get(0); - - //TransitionDeclaration: - // - // source=SourceDeclaration "in:" in+=SignalDeclaration* "out:" out+=SignalDeclaration* - // - // destination=DestinationDeclaration; - public ParserRule getRule() { return rule; } - - //source=SourceDeclaration "in:" in+=SignalDeclaration* "out:" out+=SignalDeclaration* destination=DestinationDeclaration - public Group getGroup() { return cGroup; } - - //source=SourceDeclaration - public Assignment getSourceAssignment_0() { return cSourceAssignment_0; } - - //SourceDeclaration - public RuleCall getSourceSourceDeclarationParserRuleCall_0_0() { return cSourceSourceDeclarationParserRuleCall_0_0; } - - //"in:" - public Keyword getInKeyword_1() { return cInKeyword_1; } - - //in+=SignalDeclaration* - public Assignment getInAssignment_2() { return cInAssignment_2; } - - //SignalDeclaration - public RuleCall getInSignalDeclarationParserRuleCall_2_0() { return cInSignalDeclarationParserRuleCall_2_0; } - - //"out:" - public Keyword getOutKeyword_3() { return cOutKeyword_3; } - - //out+=SignalDeclaration* - public Assignment getOutAssignment_4() { return cOutAssignment_4; } - - //SignalDeclaration - public RuleCall getOutSignalDeclarationParserRuleCall_4_0() { return cOutSignalDeclarationParserRuleCall_4_0; } - - //destination=DestinationDeclaration - public Assignment getDestinationAssignment_5() { return cDestinationAssignment_5; } - - //DestinationDeclaration - public RuleCall getDestinationDestinationDeclarationParserRuleCall_5_0() { return cDestinationDestinationDeclarationParserRuleCall_5_0; } - } - - - private ModelElements pModel; - private TestscriptElements pTestscript; - private StateElements pState; - private StateDeclarationElements pStateDeclaration; - private InitialDeclarationElements pInitialDeclaration; - private LoopsDeclarationElements pLoopsDeclaration; - private SeedDeclarationElements pSeedDeclaration; - private SignalDeclarationElements pSignalDeclaration; - private SourceDeclarationElements pSourceDeclaration; - private DestinationDeclarationElements pDestinationDeclaration; - private TransitionDeclarationElements pTransitionDeclaration; - - private final Grammar grammar; - - private TerminalsGrammarAccess gaTerminals; - - @Inject - public FSMtestGrammarAccess(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.generator.FSMtest".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; - } - - - //Model: - // - // Testscripts+=Testscript*; - public ModelElements getModelAccess() { - return (pModel != null) ? pModel : (pModel = new ModelElements()); - } - - public ParserRule getModelRule() { - return getModelAccess().getRule(); - } - - //Testscript: - // - // "fsmtest" name=ID stateDeclaration=StateDeclaration initialDeclaration=InitialDeclaration - // - // loopsDeclaration=LoopsDeclaration seedDeclaration=SeedDeclaration? transitionDeclarations+=TransitionDeclaration* - // - // ";"; - public TestscriptElements getTestscriptAccess() { - return (pTestscript != null) ? pTestscript : (pTestscript = new TestscriptElements()); - } - - public ParserRule getTestscriptRule() { - return getTestscriptAccess().getRule(); - } - - //State: - // - // name=ID; - public StateElements getStateAccess() { - return (pState != null) ? pState : (pState = new StateElements()); - } - - public ParserRule getStateRule() { - return getStateAccess().getRule(); - } - - //StateDeclaration: - // - // "states:" states+=State ("," states+=State)*; - public StateDeclarationElements getStateDeclarationAccess() { - return (pStateDeclaration != null) ? pStateDeclaration : (pStateDeclaration = new StateDeclarationElements()); - } - - public ParserRule getStateDeclarationRule() { - return getStateDeclarationAccess().getRule(); - } - - //InitialDeclaration: - // - // "initial:" initial=[State]; - public InitialDeclarationElements getInitialDeclarationAccess() { - return (pInitialDeclaration != null) ? pInitialDeclaration : (pInitialDeclaration = new InitialDeclarationElements()); - } - - public ParserRule getInitialDeclarationRule() { - return getInitialDeclarationAccess().getRule(); - } - - //LoopsDeclaration: - // - // "loops:" val=INT; - public LoopsDeclarationElements getLoopsDeclarationAccess() { - return (pLoopsDeclaration != null) ? pLoopsDeclaration : (pLoopsDeclaration = new LoopsDeclarationElements()); - } - - public ParserRule getLoopsDeclarationRule() { - return getLoopsDeclarationAccess().getRule(); - } - - //SeedDeclaration: - // - // "randseed:" val=INT; - public SeedDeclarationElements getSeedDeclarationAccess() { - return (pSeedDeclaration != null) ? pSeedDeclaration : (pSeedDeclaration = new SeedDeclarationElements()); - } - - public ParserRule getSeedDeclarationRule() { - return getSeedDeclarationAccess().getRule(); - } - - //SignalDeclaration: - // - // (port=ID ".")? signame=ID ("=" intVal=INT | "=" strVal=STRING)?; - public SignalDeclarationElements getSignalDeclarationAccess() { - return (pSignalDeclaration != null) ? pSignalDeclaration : (pSignalDeclaration = new SignalDeclarationElements()); - } - - public ParserRule getSignalDeclarationRule() { - return getSignalDeclarationAccess().getRule(); - } - - //SourceDeclaration: - // - // ref=[State] ":"; - public SourceDeclarationElements getSourceDeclarationAccess() { - return (pSourceDeclaration != null) ? pSourceDeclaration : (pSourceDeclaration = new SourceDeclarationElements()); - } - - public ParserRule getSourceDeclarationRule() { - return getSourceDeclarationAccess().getRule(); - } - - //DestinationDeclaration: - // - // "-> " ref=[State]; - public DestinationDeclarationElements getDestinationDeclarationAccess() { - return (pDestinationDeclaration != null) ? pDestinationDeclaration : (pDestinationDeclaration = new DestinationDeclarationElements()); - } - - public ParserRule getDestinationDeclarationRule() { - return getDestinationDeclarationAccess().getRule(); - } - - //TransitionDeclaration: - // - // source=SourceDeclaration "in:" in+=SignalDeclaration* "out:" out+=SignalDeclaration* - // - // destination=DestinationDeclaration; - public TransitionDeclarationElements getTransitionDeclarationAccess() { - return (pTransitionDeclaration != null) ? pTransitionDeclaration : (pTransitionDeclaration = new TransitionDeclarationElements()); - } - - public ParserRule getTransitionDeclarationRule() { - return getTransitionDeclarationAccess().getRule(); - } - - //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.generator.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 FSMtestGrammarAccess extends AbstractGrammarElementFinder {
+
+
+ public class ModelElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Model");
+ private final Assignment cTestscriptsAssignment = (Assignment)rule.eContents().get(1);
+ private final RuleCall cTestscriptsTestscriptParserRuleCall_0 = (RuleCall)cTestscriptsAssignment.eContents().get(0);
+
+ //Model:
+ //
+ // Testscripts+=Testscript*;
+ public ParserRule getRule() { return rule; }
+
+ //Testscripts+=Testscript*
+ public Assignment getTestscriptsAssignment() { return cTestscriptsAssignment; }
+
+ //Testscript
+ public RuleCall getTestscriptsTestscriptParserRuleCall_0() { return cTestscriptsTestscriptParserRuleCall_0; }
+ }
+
+ public class TestscriptElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Testscript");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Keyword cFsmtestKeyword_0 = (Keyword)cGroup.eContents().get(0);
+ private final Assignment cNameAssignment_1 = (Assignment)cGroup.eContents().get(1);
+ private final RuleCall cNameIDTerminalRuleCall_1_0 = (RuleCall)cNameAssignment_1.eContents().get(0);
+ private final Assignment cStateDeclarationAssignment_2 = (Assignment)cGroup.eContents().get(2);
+ private final RuleCall cStateDeclarationStateDeclarationParserRuleCall_2_0 = (RuleCall)cStateDeclarationAssignment_2.eContents().get(0);
+ private final Assignment cInitialDeclarationAssignment_3 = (Assignment)cGroup.eContents().get(3);
+ private final RuleCall cInitialDeclarationInitialDeclarationParserRuleCall_3_0 = (RuleCall)cInitialDeclarationAssignment_3.eContents().get(0);
+ private final Assignment cLoopsDeclarationAssignment_4 = (Assignment)cGroup.eContents().get(4);
+ private final RuleCall cLoopsDeclarationLoopsDeclarationParserRuleCall_4_0 = (RuleCall)cLoopsDeclarationAssignment_4.eContents().get(0);
+ private final Assignment cSeedDeclarationAssignment_5 = (Assignment)cGroup.eContents().get(5);
+ private final RuleCall cSeedDeclarationSeedDeclarationParserRuleCall_5_0 = (RuleCall)cSeedDeclarationAssignment_5.eContents().get(0);
+ private final Assignment cTransitionDeclarationsAssignment_6 = (Assignment)cGroup.eContents().get(6);
+ private final RuleCall cTransitionDeclarationsTransitionDeclarationParserRuleCall_6_0 = (RuleCall)cTransitionDeclarationsAssignment_6.eContents().get(0);
+ private final Keyword cSemicolonKeyword_7 = (Keyword)cGroup.eContents().get(7);
+
+ //Testscript:
+ //
+ // "fsmtest" name=ID stateDeclaration=StateDeclaration initialDeclaration=InitialDeclaration
+ //
+ // loopsDeclaration=LoopsDeclaration seedDeclaration=SeedDeclaration? transitionDeclarations+=TransitionDeclaration*
+ //
+ // ";";
+ public ParserRule getRule() { return rule; }
+
+ //"fsmtest" name=ID stateDeclaration=StateDeclaration initialDeclaration=InitialDeclaration
+ //
+ //loopsDeclaration=LoopsDeclaration seedDeclaration=SeedDeclaration? transitionDeclarations+=TransitionDeclaration* ";"
+ public Group getGroup() { return cGroup; }
+
+ //"fsmtest"
+ public Keyword getFsmtestKeyword_0() { return cFsmtestKeyword_0; }
+
+ //name=ID
+ public Assignment getNameAssignment_1() { return cNameAssignment_1; }
+
+ //ID
+ public RuleCall getNameIDTerminalRuleCall_1_0() { return cNameIDTerminalRuleCall_1_0; }
+
+ //stateDeclaration=StateDeclaration
+ public Assignment getStateDeclarationAssignment_2() { return cStateDeclarationAssignment_2; }
+
+ //StateDeclaration
+ public RuleCall getStateDeclarationStateDeclarationParserRuleCall_2_0() { return cStateDeclarationStateDeclarationParserRuleCall_2_0; }
+
+ //initialDeclaration=InitialDeclaration
+ public Assignment getInitialDeclarationAssignment_3() { return cInitialDeclarationAssignment_3; }
+
+ //InitialDeclaration
+ public RuleCall getInitialDeclarationInitialDeclarationParserRuleCall_3_0() { return cInitialDeclarationInitialDeclarationParserRuleCall_3_0; }
+
+ //loopsDeclaration=LoopsDeclaration
+ public Assignment getLoopsDeclarationAssignment_4() { return cLoopsDeclarationAssignment_4; }
+
+ //LoopsDeclaration
+ public RuleCall getLoopsDeclarationLoopsDeclarationParserRuleCall_4_0() { return cLoopsDeclarationLoopsDeclarationParserRuleCall_4_0; }
+
+ //seedDeclaration=SeedDeclaration?
+ public Assignment getSeedDeclarationAssignment_5() { return cSeedDeclarationAssignment_5; }
+
+ //SeedDeclaration
+ public RuleCall getSeedDeclarationSeedDeclarationParserRuleCall_5_0() { return cSeedDeclarationSeedDeclarationParserRuleCall_5_0; }
+
+ //transitionDeclarations+=TransitionDeclaration*
+ public Assignment getTransitionDeclarationsAssignment_6() { return cTransitionDeclarationsAssignment_6; }
+
+ //TransitionDeclaration
+ public RuleCall getTransitionDeclarationsTransitionDeclarationParserRuleCall_6_0() { return cTransitionDeclarationsTransitionDeclarationParserRuleCall_6_0; }
+
+ //";"
+ public Keyword getSemicolonKeyword_7() { return cSemicolonKeyword_7; }
+ }
+
+ public class StateElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "State");
+ private final Assignment cNameAssignment = (Assignment)rule.eContents().get(1);
+ private final RuleCall cNameIDTerminalRuleCall_0 = (RuleCall)cNameAssignment.eContents().get(0);
+
+ //State:
+ //
+ // name=ID;
+ public ParserRule getRule() { return rule; }
+
+ //name=ID
+ public Assignment getNameAssignment() { return cNameAssignment; }
+
+ //ID
+ public RuleCall getNameIDTerminalRuleCall_0() { return cNameIDTerminalRuleCall_0; }
+ }
+
+ public class StateDeclarationElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "StateDeclaration");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Keyword cStatesKeyword_0 = (Keyword)cGroup.eContents().get(0);
+ private final Assignment cStatesAssignment_1 = (Assignment)cGroup.eContents().get(1);
+ private final RuleCall cStatesStateParserRuleCall_1_0 = (RuleCall)cStatesAssignment_1.eContents().get(0);
+ private final Group cGroup_2 = (Group)cGroup.eContents().get(2);
+ private final Keyword cCommaKeyword_2_0 = (Keyword)cGroup_2.eContents().get(0);
+ private final Assignment cStatesAssignment_2_1 = (Assignment)cGroup_2.eContents().get(1);
+ private final RuleCall cStatesStateParserRuleCall_2_1_0 = (RuleCall)cStatesAssignment_2_1.eContents().get(0);
+
+ //StateDeclaration:
+ //
+ // "states:" states+=State ("," states+=State)*;
+ public ParserRule getRule() { return rule; }
+
+ //"states:" states+=State ("," states+=State)*
+ public Group getGroup() { return cGroup; }
+
+ //"states:"
+ public Keyword getStatesKeyword_0() { return cStatesKeyword_0; }
+
+ //states+=State
+ public Assignment getStatesAssignment_1() { return cStatesAssignment_1; }
+
+ //State
+ public RuleCall getStatesStateParserRuleCall_1_0() { return cStatesStateParserRuleCall_1_0; }
+
+ //("," states+=State)*
+ public Group getGroup_2() { return cGroup_2; }
+
+ //","
+ public Keyword getCommaKeyword_2_0() { return cCommaKeyword_2_0; }
+
+ //states+=State
+ public Assignment getStatesAssignment_2_1() { return cStatesAssignment_2_1; }
+
+ //State
+ public RuleCall getStatesStateParserRuleCall_2_1_0() { return cStatesStateParserRuleCall_2_1_0; }
+ }
+
+ public class InitialDeclarationElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "InitialDeclaration");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Keyword cInitialKeyword_0 = (Keyword)cGroup.eContents().get(0);
+ private final Assignment cInitialAssignment_1 = (Assignment)cGroup.eContents().get(1);
+ private final CrossReference cInitialStateCrossReference_1_0 = (CrossReference)cInitialAssignment_1.eContents().get(0);
+ private final RuleCall cInitialStateIDTerminalRuleCall_1_0_1 = (RuleCall)cInitialStateCrossReference_1_0.eContents().get(1);
+
+ //InitialDeclaration:
+ //
+ // "initial:" initial=[State];
+ public ParserRule getRule() { return rule; }
+
+ //"initial:" initial=[State]
+ public Group getGroup() { return cGroup; }
+
+ //"initial:"
+ public Keyword getInitialKeyword_0() { return cInitialKeyword_0; }
+
+ //initial=[State]
+ public Assignment getInitialAssignment_1() { return cInitialAssignment_1; }
+
+ //[State]
+ public CrossReference getInitialStateCrossReference_1_0() { return cInitialStateCrossReference_1_0; }
+
+ //ID
+ public RuleCall getInitialStateIDTerminalRuleCall_1_0_1() { return cInitialStateIDTerminalRuleCall_1_0_1; }
+ }
+
+ public class LoopsDeclarationElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "LoopsDeclaration");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Keyword cLoopsKeyword_0 = (Keyword)cGroup.eContents().get(0);
+ private final Assignment cValAssignment_1 = (Assignment)cGroup.eContents().get(1);
+ private final RuleCall cValINTTerminalRuleCall_1_0 = (RuleCall)cValAssignment_1.eContents().get(0);
+
+ //LoopsDeclaration:
+ //
+ // "loops:" val=INT;
+ public ParserRule getRule() { return rule; }
+
+ //"loops:" val=INT
+ public Group getGroup() { return cGroup; }
+
+ //"loops:"
+ public Keyword getLoopsKeyword_0() { return cLoopsKeyword_0; }
+
+ //val=INT
+ public Assignment getValAssignment_1() { return cValAssignment_1; }
+
+ //INT
+ public RuleCall getValINTTerminalRuleCall_1_0() { return cValINTTerminalRuleCall_1_0; }
+ }
+
+ public class SeedDeclarationElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "SeedDeclaration");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Keyword cRandseedKeyword_0 = (Keyword)cGroup.eContents().get(0);
+ private final Assignment cValAssignment_1 = (Assignment)cGroup.eContents().get(1);
+ private final RuleCall cValINTTerminalRuleCall_1_0 = (RuleCall)cValAssignment_1.eContents().get(0);
+
+ //SeedDeclaration:
+ //
+ // "randseed:" val=INT;
+ public ParserRule getRule() { return rule; }
+
+ //"randseed:" val=INT
+ public Group getGroup() { return cGroup; }
+
+ //"randseed:"
+ public Keyword getRandseedKeyword_0() { return cRandseedKeyword_0; }
+
+ //val=INT
+ public Assignment getValAssignment_1() { return cValAssignment_1; }
+
+ //INT
+ public RuleCall getValINTTerminalRuleCall_1_0() { return cValINTTerminalRuleCall_1_0; }
+ }
+
+ public class SignalDeclarationElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "SignalDeclaration");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Group cGroup_0 = (Group)cGroup.eContents().get(0);
+ private final Assignment cPortAssignment_0_0 = (Assignment)cGroup_0.eContents().get(0);
+ private final RuleCall cPortIDTerminalRuleCall_0_0_0 = (RuleCall)cPortAssignment_0_0.eContents().get(0);
+ private final Keyword cFullStopKeyword_0_1 = (Keyword)cGroup_0.eContents().get(1);
+ private final Assignment cSignameAssignment_1 = (Assignment)cGroup.eContents().get(1);
+ private final RuleCall cSignameIDTerminalRuleCall_1_0 = (RuleCall)cSignameAssignment_1.eContents().get(0);
+ private final Alternatives cAlternatives_2 = (Alternatives)cGroup.eContents().get(2);
+ private final Group cGroup_2_0 = (Group)cAlternatives_2.eContents().get(0);
+ private final Keyword cEqualsSignKeyword_2_0_0 = (Keyword)cGroup_2_0.eContents().get(0);
+ private final Assignment cIntValAssignment_2_0_1 = (Assignment)cGroup_2_0.eContents().get(1);
+ private final RuleCall cIntValINTTerminalRuleCall_2_0_1_0 = (RuleCall)cIntValAssignment_2_0_1.eContents().get(0);
+ private final Group cGroup_2_1 = (Group)cAlternatives_2.eContents().get(1);
+ private final Keyword cEqualsSignKeyword_2_1_0 = (Keyword)cGroup_2_1.eContents().get(0);
+ private final Assignment cStrValAssignment_2_1_1 = (Assignment)cGroup_2_1.eContents().get(1);
+ private final RuleCall cStrValSTRINGTerminalRuleCall_2_1_1_0 = (RuleCall)cStrValAssignment_2_1_1.eContents().get(0);
+
+ //SignalDeclaration:
+ //
+ // (port=ID ".")? signame=ID ("=" intVal=INT | "=" strVal=STRING)?;
+ public ParserRule getRule() { return rule; }
+
+ //(port=ID ".")? signame=ID ("=" intVal=INT | "=" strVal=STRING)?
+ public Group getGroup() { return cGroup; }
+
+ //(port=ID ".")?
+ public Group getGroup_0() { return cGroup_0; }
+
+ //port=ID
+ public Assignment getPortAssignment_0_0() { return cPortAssignment_0_0; }
+
+ //ID
+ public RuleCall getPortIDTerminalRuleCall_0_0_0() { return cPortIDTerminalRuleCall_0_0_0; }
+
+ //"."
+ public Keyword getFullStopKeyword_0_1() { return cFullStopKeyword_0_1; }
+
+ //signame=ID
+ public Assignment getSignameAssignment_1() { return cSignameAssignment_1; }
+
+ //ID
+ public RuleCall getSignameIDTerminalRuleCall_1_0() { return cSignameIDTerminalRuleCall_1_0; }
+
+ //("=" intVal=INT | "=" strVal=STRING)?
+ public Alternatives getAlternatives_2() { return cAlternatives_2; }
+
+ //"=" intVal=INT
+ public Group getGroup_2_0() { return cGroup_2_0; }
+
+ //"="
+ public Keyword getEqualsSignKeyword_2_0_0() { return cEqualsSignKeyword_2_0_0; }
+
+ //intVal=INT
+ public Assignment getIntValAssignment_2_0_1() { return cIntValAssignment_2_0_1; }
+
+ //INT
+ public RuleCall getIntValINTTerminalRuleCall_2_0_1_0() { return cIntValINTTerminalRuleCall_2_0_1_0; }
+
+ //"=" strVal=STRING
+ public Group getGroup_2_1() { return cGroup_2_1; }
+
+ //"="
+ public Keyword getEqualsSignKeyword_2_1_0() { return cEqualsSignKeyword_2_1_0; }
+
+ //strVal=STRING
+ public Assignment getStrValAssignment_2_1_1() { return cStrValAssignment_2_1_1; }
+
+ //STRING
+ public RuleCall getStrValSTRINGTerminalRuleCall_2_1_1_0() { return cStrValSTRINGTerminalRuleCall_2_1_1_0; }
+ }
+
+ public class SourceDeclarationElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "SourceDeclaration");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Assignment cRefAssignment_0 = (Assignment)cGroup.eContents().get(0);
+ private final CrossReference cRefStateCrossReference_0_0 = (CrossReference)cRefAssignment_0.eContents().get(0);
+ private final RuleCall cRefStateIDTerminalRuleCall_0_0_1 = (RuleCall)cRefStateCrossReference_0_0.eContents().get(1);
+ private final Keyword cColonKeyword_1 = (Keyword)cGroup.eContents().get(1);
+
+ //SourceDeclaration:
+ //
+ // ref=[State] ":";
+ public ParserRule getRule() { return rule; }
+
+ //ref=[State] ":"
+ public Group getGroup() { return cGroup; }
+
+ //ref=[State]
+ public Assignment getRefAssignment_0() { return cRefAssignment_0; }
+
+ //[State]
+ public CrossReference getRefStateCrossReference_0_0() { return cRefStateCrossReference_0_0; }
+
+ //ID
+ public RuleCall getRefStateIDTerminalRuleCall_0_0_1() { return cRefStateIDTerminalRuleCall_0_0_1; }
+
+ //":"
+ public Keyword getColonKeyword_1() { return cColonKeyword_1; }
+ }
+
+ public class DestinationDeclarationElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "DestinationDeclaration");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Keyword cHyphenMinusGreaterThanSignSpaceKeyword_0 = (Keyword)cGroup.eContents().get(0);
+ private final Assignment cRefAssignment_1 = (Assignment)cGroup.eContents().get(1);
+ private final CrossReference cRefStateCrossReference_1_0 = (CrossReference)cRefAssignment_1.eContents().get(0);
+ private final RuleCall cRefStateIDTerminalRuleCall_1_0_1 = (RuleCall)cRefStateCrossReference_1_0.eContents().get(1);
+
+ //DestinationDeclaration:
+ //
+ // "-> " ref=[State];
+ public ParserRule getRule() { return rule; }
+
+ //"-> " ref=[State]
+ public Group getGroup() { return cGroup; }
+
+ //"-> "
+ public Keyword getHyphenMinusGreaterThanSignSpaceKeyword_0() { return cHyphenMinusGreaterThanSignSpaceKeyword_0; }
+
+ //ref=[State]
+ public Assignment getRefAssignment_1() { return cRefAssignment_1; }
+
+ //[State]
+ public CrossReference getRefStateCrossReference_1_0() { return cRefStateCrossReference_1_0; }
+
+ //ID
+ public RuleCall getRefStateIDTerminalRuleCall_1_0_1() { return cRefStateIDTerminalRuleCall_1_0_1; }
+ }
+
+ public class TransitionDeclarationElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "TransitionDeclaration");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Assignment cSourceAssignment_0 = (Assignment)cGroup.eContents().get(0);
+ private final RuleCall cSourceSourceDeclarationParserRuleCall_0_0 = (RuleCall)cSourceAssignment_0.eContents().get(0);
+ private final Keyword cInKeyword_1 = (Keyword)cGroup.eContents().get(1);
+ private final Assignment cInAssignment_2 = (Assignment)cGroup.eContents().get(2);
+ private final RuleCall cInSignalDeclarationParserRuleCall_2_0 = (RuleCall)cInAssignment_2.eContents().get(0);
+ private final Keyword cOutKeyword_3 = (Keyword)cGroup.eContents().get(3);
+ private final Assignment cOutAssignment_4 = (Assignment)cGroup.eContents().get(4);
+ private final RuleCall cOutSignalDeclarationParserRuleCall_4_0 = (RuleCall)cOutAssignment_4.eContents().get(0);
+ private final Assignment cDestinationAssignment_5 = (Assignment)cGroup.eContents().get(5);
+ private final RuleCall cDestinationDestinationDeclarationParserRuleCall_5_0 = (RuleCall)cDestinationAssignment_5.eContents().get(0);
+
+ //TransitionDeclaration:
+ //
+ // source=SourceDeclaration "in:" in+=SignalDeclaration* "out:" out+=SignalDeclaration*
+ //
+ // destination=DestinationDeclaration;
+ public ParserRule getRule() { return rule; }
+
+ //source=SourceDeclaration "in:" in+=SignalDeclaration* "out:" out+=SignalDeclaration* destination=DestinationDeclaration
+ public Group getGroup() { return cGroup; }
+
+ //source=SourceDeclaration
+ public Assignment getSourceAssignment_0() { return cSourceAssignment_0; }
+
+ //SourceDeclaration
+ public RuleCall getSourceSourceDeclarationParserRuleCall_0_0() { return cSourceSourceDeclarationParserRuleCall_0_0; }
+
+ //"in:"
+ public Keyword getInKeyword_1() { return cInKeyword_1; }
+
+ //in+=SignalDeclaration*
+ public Assignment getInAssignment_2() { return cInAssignment_2; }
+
+ //SignalDeclaration
+ public RuleCall getInSignalDeclarationParserRuleCall_2_0() { return cInSignalDeclarationParserRuleCall_2_0; }
+
+ //"out:"
+ public Keyword getOutKeyword_3() { return cOutKeyword_3; }
+
+ //out+=SignalDeclaration*
+ public Assignment getOutAssignment_4() { return cOutAssignment_4; }
+
+ //SignalDeclaration
+ public RuleCall getOutSignalDeclarationParserRuleCall_4_0() { return cOutSignalDeclarationParserRuleCall_4_0; }
+
+ //destination=DestinationDeclaration
+ public Assignment getDestinationAssignment_5() { return cDestinationAssignment_5; }
+
+ //DestinationDeclaration
+ public RuleCall getDestinationDestinationDeclarationParserRuleCall_5_0() { return cDestinationDestinationDeclarationParserRuleCall_5_0; }
+ }
+
+
+ private ModelElements pModel;
+ private TestscriptElements pTestscript;
+ private StateElements pState;
+ private StateDeclarationElements pStateDeclaration;
+ private InitialDeclarationElements pInitialDeclaration;
+ private LoopsDeclarationElements pLoopsDeclaration;
+ private SeedDeclarationElements pSeedDeclaration;
+ private SignalDeclarationElements pSignalDeclaration;
+ private SourceDeclarationElements pSourceDeclaration;
+ private DestinationDeclarationElements pDestinationDeclaration;
+ private TransitionDeclarationElements pTransitionDeclaration;
+
+ private final Grammar grammar;
+
+ private TerminalsGrammarAccess gaTerminals;
+
+ @Inject
+ public FSMtestGrammarAccess(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.generator.FSMtest".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;
+ }
+
+
+ //Model:
+ //
+ // Testscripts+=Testscript*;
+ public ModelElements getModelAccess() {
+ return (pModel != null) ? pModel : (pModel = new ModelElements());
+ }
+
+ public ParserRule getModelRule() {
+ return getModelAccess().getRule();
+ }
+
+ //Testscript:
+ //
+ // "fsmtest" name=ID stateDeclaration=StateDeclaration initialDeclaration=InitialDeclaration
+ //
+ // loopsDeclaration=LoopsDeclaration seedDeclaration=SeedDeclaration? transitionDeclarations+=TransitionDeclaration*
+ //
+ // ";";
+ public TestscriptElements getTestscriptAccess() {
+ return (pTestscript != null) ? pTestscript : (pTestscript = new TestscriptElements());
+ }
+
+ public ParserRule getTestscriptRule() {
+ return getTestscriptAccess().getRule();
+ }
+
+ //State:
+ //
+ // name=ID;
+ public StateElements getStateAccess() {
+ return (pState != null) ? pState : (pState = new StateElements());
+ }
+
+ public ParserRule getStateRule() {
+ return getStateAccess().getRule();
+ }
+
+ //StateDeclaration:
+ //
+ // "states:" states+=State ("," states+=State)*;
+ public StateDeclarationElements getStateDeclarationAccess() {
+ return (pStateDeclaration != null) ? pStateDeclaration : (pStateDeclaration = new StateDeclarationElements());
+ }
+
+ public ParserRule getStateDeclarationRule() {
+ return getStateDeclarationAccess().getRule();
+ }
+
+ //InitialDeclaration:
+ //
+ // "initial:" initial=[State];
+ public InitialDeclarationElements getInitialDeclarationAccess() {
+ return (pInitialDeclaration != null) ? pInitialDeclaration : (pInitialDeclaration = new InitialDeclarationElements());
+ }
+
+ public ParserRule getInitialDeclarationRule() {
+ return getInitialDeclarationAccess().getRule();
+ }
+
+ //LoopsDeclaration:
+ //
+ // "loops:" val=INT;
+ public LoopsDeclarationElements getLoopsDeclarationAccess() {
+ return (pLoopsDeclaration != null) ? pLoopsDeclaration : (pLoopsDeclaration = new LoopsDeclarationElements());
+ }
+
+ public ParserRule getLoopsDeclarationRule() {
+ return getLoopsDeclarationAccess().getRule();
+ }
+
+ //SeedDeclaration:
+ //
+ // "randseed:" val=INT;
+ public SeedDeclarationElements getSeedDeclarationAccess() {
+ return (pSeedDeclaration != null) ? pSeedDeclaration : (pSeedDeclaration = new SeedDeclarationElements());
+ }
+
+ public ParserRule getSeedDeclarationRule() {
+ return getSeedDeclarationAccess().getRule();
+ }
+
+ //SignalDeclaration:
+ //
+ // (port=ID ".")? signame=ID ("=" intVal=INT | "=" strVal=STRING)?;
+ public SignalDeclarationElements getSignalDeclarationAccess() {
+ return (pSignalDeclaration != null) ? pSignalDeclaration : (pSignalDeclaration = new SignalDeclarationElements());
+ }
+
+ public ParserRule getSignalDeclarationRule() {
+ return getSignalDeclarationAccess().getRule();
+ }
+
+ //SourceDeclaration:
+ //
+ // ref=[State] ":";
+ public SourceDeclarationElements getSourceDeclarationAccess() {
+ return (pSourceDeclaration != null) ? pSourceDeclaration : (pSourceDeclaration = new SourceDeclarationElements());
+ }
+
+ public ParserRule getSourceDeclarationRule() {
+ return getSourceDeclarationAccess().getRule();
+ }
+
+ //DestinationDeclaration:
+ //
+ // "-> " ref=[State];
+ public DestinationDeclarationElements getDestinationDeclarationAccess() {
+ return (pDestinationDeclaration != null) ? pDestinationDeclaration : (pDestinationDeclaration = new DestinationDeclarationElements());
+ }
+
+ public ParserRule getDestinationDeclarationRule() {
+ return getDestinationDeclarationAccess().getRule();
+ }
+
+ //TransitionDeclaration:
+ //
+ // source=SourceDeclaration "in:" in+=SignalDeclaration* "out:" out+=SignalDeclaration*
+ //
+ // destination=DestinationDeclaration;
+ public TransitionDeclarationElements getTransitionDeclarationAccess() {
+ return (pTransitionDeclaration != null) ? pTransitionDeclaration : (pTransitionDeclaration = new TransitionDeclarationElements());
+ }
+
+ public ParserRule getTransitionDeclarationRule() {
+ return getTransitionDeclarationAccess().getRule();
+ }
+
+ //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.generator.fsmtest/src-gen/org/eclipse/etrice/generator/validation/AbstractFSMtestJavaValidator.java b/plugins/org.eclipse.etrice.generator.fsmtest/src-gen/org/eclipse/etrice/generator/validation/AbstractFSMtestJavaValidator.java index ec2259d42..21fe3433b 100644 --- a/plugins/org.eclipse.etrice.generator.fsmtest/src-gen/org/eclipse/etrice/generator/validation/AbstractFSMtestJavaValidator.java +++ b/plugins/org.eclipse.etrice.generator.fsmtest/src-gen/org/eclipse/etrice/generator/validation/AbstractFSMtestJavaValidator.java @@ -1,18 +1,18 @@ -package org.eclipse.etrice.generator.validation; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.xtext.validation.AbstractDeclarativeValidator; - -public class AbstractFSMtestJavaValidator extends AbstractDeclarativeValidator { - - @Override - protected List<EPackage> getEPackages() { - List<EPackage> result = new ArrayList<EPackage>(); - result.add(org.eclipse.etrice.generator.fsmtest.FsmtestPackage.eINSTANCE); - return result; - } - -} +package org.eclipse.etrice.generator.validation;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.xtext.validation.AbstractDeclarativeValidator;
+
+public class AbstractFSMtestJavaValidator extends AbstractDeclarativeValidator {
+
+ @Override
+ protected List<EPackage> getEPackages() {
+ List<EPackage> result = new ArrayList<EPackage>();
+ result.add(org.eclipse.etrice.generator.fsmtest.FsmtestPackage.eINSTANCE);
+ return result;
+ }
+
+}
|