mirror of
http://172.16.200.102/MOISE/Pattern-Instanciation-On-System-Engineering-Model.git
synced 2025-11-26 04:17:59 +01:00
Initial commit.
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="src" path="src-gen"/>
|
||||
<classpathentry kind="src" path="xtend-gen"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="org.eclipse.emf.mwe2.launch.Mwe2LaunchConfigurationType">
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/com.irtsaintexupery.xtext.pseim.pattern"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="4"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
|
||||
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
|
||||
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?> <resources> <item path="/com.irtsaintexupery.xtext.pseim.pattern" type="4"/> <item path="/com.irtsaintexupery.xtext.pseim.pattern.ide" type="4"/> <item path="/com.irtsaintexupery.xtext.pseim.pattern.ui" type="4"/> ;</resources>}"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="com.irtsaintexupery.xtext.pseim.GeneratePattern"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.irtsaintexupery.xtext.pseim.pattern"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx512m"/>
|
||||
</launchConfiguration>
|
||||
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="org.eclipse.pde.ui.RuntimeWorkbench">
|
||||
<booleanAttribute key="append.args" value="true"/>
|
||||
<booleanAttribute key="askclear" value="true"/>
|
||||
<booleanAttribute key="automaticAdd" value="true"/>
|
||||
<booleanAttribute key="automaticValidate" value="false"/>
|
||||
<stringAttribute key="bad_container_name" value="/com.irtsaintexupery.xtext.pseim.pattern/.launch/"/>
|
||||
<stringAttribute key="bootstrap" value=""/>
|
||||
<stringAttribute key="checked" value="[NONE]"/>
|
||||
<booleanAttribute key="clearConfig" value="false"/>
|
||||
<booleanAttribute key="clearws" value="false"/>
|
||||
<booleanAttribute key="clearwslog" value="false"/>
|
||||
<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/Launch Runtime Eclipse"/>
|
||||
<booleanAttribute key="default" value="true"/>
|
||||
<booleanAttribute key="includeOptional" value="true"/>
|
||||
<stringAttribute key="location" value="${workspace_loc}/../runtime-EclipseXtext"/>
|
||||
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
|
||||
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
|
||||
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m -Xmx512m"/>
|
||||
<stringAttribute key="pde.version" value="3.3"/>
|
||||
<stringAttribute key="product" value="org.eclipse.platform.ide"/>
|
||||
<booleanAttribute key="show_selected_only" value="false"/>
|
||||
<stringAttribute key="templateConfig" value="${target_home}/configuration/config.ini"/>
|
||||
<booleanAttribute key="tracing" value="false"/>
|
||||
<booleanAttribute key="useDefaultConfig" value="true"/>
|
||||
<booleanAttribute key="useDefaultConfigArea" value="true"/>
|
||||
<booleanAttribute key="useProduct" value="true"/>
|
||||
<booleanAttribute key="usefeatures" value="false"/>
|
||||
</launchConfiguration>
|
||||
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>com.irtsaintexupery.xtext.pseim.pattern</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
@@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
||||
@@ -0,0 +1,7 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
@@ -0,0 +1,26 @@
|
||||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: %pluginName
|
||||
Bundle-Vendor: %providerName
|
||||
Bundle-Version: 1.0.0.qualifier
|
||||
Bundle-SymbolicName: com.irtsaintexupery.xtext.pseim.pattern; singleton:=true
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Require-Bundle: com.irtsaintexupery.pseim,
|
||||
org.eclipse.xtext,
|
||||
org.eclipse.xtext.xbase,
|
||||
org.eclipse.equinox.common;bundle-version="3.5.0",
|
||||
org.eclipse.xtext.xbase.lib,
|
||||
org.antlr.runtime,
|
||||
org.eclipse.xtext.util,
|
||||
org.eclipse.xtend.lib
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||
Export-Package: com.irtsaintexupery.xtext.pseim.serializer,
|
||||
com.irtsaintexupery.xtext.pseim.scoping,
|
||||
com.irtsaintexupery.xtext.pseim.parser.antlr,
|
||||
com.irtsaintexupery.xtext.pseim.formatting2,
|
||||
com.irtsaintexupery.xtext.pseim.services,
|
||||
com.irtsaintexupery.xtext.pseim,
|
||||
com.irtsaintexupery.xtext.pseim.generator,
|
||||
com.irtsaintexupery.xtext.pseim.parser.antlr.internal,
|
||||
com.irtsaintexupery.xtext.pseim.validation
|
||||
Import-Package: org.apache.log4j
|
||||
@@ -0,0 +1,19 @@
|
||||
source.. = src/,\
|
||||
src-gen/,\
|
||||
xtend-gen/
|
||||
bin.includes = .,\
|
||||
META-INF/
|
||||
bin.excludes = **/*.mwe2,\
|
||||
**/*.xtend
|
||||
additional.bundles = org.eclipse.xtext.xbase,\
|
||||
org.eclipse.xtext.common.types,\
|
||||
org.eclipse.xtext.xtext.generator,\
|
||||
org.eclipse.emf.codegen.ecore,\
|
||||
org.eclipse.emf.mwe.utils,\
|
||||
org.eclipse.emf.mwe2.launch,\
|
||||
org.eclipse.emf.mwe2.lib,\
|
||||
org.objectweb.asm,\
|
||||
org.apache.commons.logging,\
|
||||
org.apache.log4j,\
|
||||
com.ibm.icu,\
|
||||
org.eclipse.xtext.generator
|
||||
@@ -0,0 +1,4 @@
|
||||
#
|
||||
|
||||
pluginName = PSEIM Patterns XText
|
||||
providerName = IRT AESE (IRT Saint Exup<75>ry)
|
||||
@@ -0,0 +1,216 @@
|
||||
/*
|
||||
* generated by Xtext 2.12.0
|
||||
*/
|
||||
package com.irtsaintexupery.xtext.pseim;
|
||||
|
||||
import com.google.inject.Binder;
|
||||
import com.google.inject.Provider;
|
||||
import com.google.inject.name.Names;
|
||||
import com.irtsaintexupery.xtext.pseim.formatting2.PatternFormatter;
|
||||
import com.irtsaintexupery.xtext.pseim.generator.PatternGenerator;
|
||||
import com.irtsaintexupery.xtext.pseim.parser.antlr.PatternAntlrTokenFileProvider;
|
||||
import com.irtsaintexupery.xtext.pseim.parser.antlr.PatternParser;
|
||||
import com.irtsaintexupery.xtext.pseim.parser.antlr.internal.InternalPatternLexer;
|
||||
import com.irtsaintexupery.xtext.pseim.scoping.PatternScopeProvider;
|
||||
import com.irtsaintexupery.xtext.pseim.serializer.PatternSemanticSequencer;
|
||||
import com.irtsaintexupery.xtext.pseim.serializer.PatternSyntacticSequencer;
|
||||
import com.irtsaintexupery.xtext.pseim.services.PatternGrammarAccess;
|
||||
import com.irtsaintexupery.xtext.pseim.validation.PatternValidator;
|
||||
import java.util.Properties;
|
||||
import org.eclipse.xtext.Constants;
|
||||
import org.eclipse.xtext.IGrammarAccess;
|
||||
import org.eclipse.xtext.common.services.Ecore2XtextTerminalConverters;
|
||||
import org.eclipse.xtext.conversion.IValueConverterService;
|
||||
import org.eclipse.xtext.formatting2.FormatterPreferenceValuesProvider;
|
||||
import org.eclipse.xtext.formatting2.FormatterPreferences;
|
||||
import org.eclipse.xtext.formatting2.IFormatter2;
|
||||
import org.eclipse.xtext.generator.IGenerator2;
|
||||
import org.eclipse.xtext.naming.DefaultDeclarativeQualifiedNameProvider;
|
||||
import org.eclipse.xtext.naming.IQualifiedNameProvider;
|
||||
import org.eclipse.xtext.parser.IParser;
|
||||
import org.eclipse.xtext.parser.ITokenToStringConverter;
|
||||
import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
|
||||
import org.eclipse.xtext.parser.antlr.AntlrTokenToStringConverter;
|
||||
import org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider;
|
||||
import org.eclipse.xtext.parser.antlr.ITokenDefProvider;
|
||||
import org.eclipse.xtext.parser.antlr.Lexer;
|
||||
import org.eclipse.xtext.parser.antlr.LexerBindings;
|
||||
import org.eclipse.xtext.parser.antlr.LexerProvider;
|
||||
import org.eclipse.xtext.preferences.IPreferenceValuesProvider;
|
||||
import org.eclipse.xtext.resource.IContainer;
|
||||
import org.eclipse.xtext.resource.IResourceDescriptions;
|
||||
import org.eclipse.xtext.resource.containers.IAllContainersState;
|
||||
import org.eclipse.xtext.resource.containers.ResourceSetBasedAllContainersStateProvider;
|
||||
import org.eclipse.xtext.resource.containers.StateBasedContainerManager;
|
||||
import org.eclipse.xtext.resource.impl.ResourceDescriptionsProvider;
|
||||
import org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions;
|
||||
import org.eclipse.xtext.scoping.IGlobalScopeProvider;
|
||||
import org.eclipse.xtext.scoping.IScopeProvider;
|
||||
import org.eclipse.xtext.scoping.IgnoreCaseLinking;
|
||||
import org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider;
|
||||
import org.eclipse.xtext.scoping.impl.DefaultGlobalScopeProvider;
|
||||
import org.eclipse.xtext.scoping.impl.ImportedNamespaceAwareLocalScopeProvider;
|
||||
import org.eclipse.xtext.serializer.ISerializer;
|
||||
import org.eclipse.xtext.serializer.impl.Serializer;
|
||||
import org.eclipse.xtext.serializer.sequencer.ISemanticSequencer;
|
||||
import org.eclipse.xtext.serializer.sequencer.ISyntacticSequencer;
|
||||
import org.eclipse.xtext.service.DefaultRuntimeModule;
|
||||
import org.eclipse.xtext.service.SingletonBinding;
|
||||
|
||||
/**
|
||||
* Manual modifications go to {@link PatternRuntimeModule}.
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public abstract class AbstractPatternRuntimeModule extends DefaultRuntimeModule {
|
||||
|
||||
protected Properties properties = null;
|
||||
|
||||
@Override
|
||||
public void configure(Binder binder) {
|
||||
properties = tryBindProperties(binder, "com/irtsaintexupery/xtext/pseim/Pattern.properties");
|
||||
super.configure(binder);
|
||||
}
|
||||
|
||||
public void configureLanguageName(Binder binder) {
|
||||
binder.bind(String.class).annotatedWith(Names.named(Constants.LANGUAGE_NAME)).toInstance("com.irtsaintexupery.xtext.pseim.Pattern");
|
||||
}
|
||||
|
||||
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("pseimx");
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.grammarAccess.GrammarAccessFragment2
|
||||
public ClassLoader bindClassLoaderToInstance() {
|
||||
return getClass().getClassLoader();
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.grammarAccess.GrammarAccessFragment2
|
||||
public Class<? extends IGrammarAccess> bindIGrammarAccess() {
|
||||
return PatternGrammarAccess.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2
|
||||
public Class<? extends ISemanticSequencer> bindISemanticSequencer() {
|
||||
return PatternSemanticSequencer.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2
|
||||
public Class<? extends ISyntacticSequencer> bindISyntacticSequencer() {
|
||||
return PatternSyntacticSequencer.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2
|
||||
public Class<? extends ISerializer> bindISerializer() {
|
||||
return Serializer.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
|
||||
public Class<? extends IParser> bindIParser() {
|
||||
return PatternParser.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
|
||||
public Class<? extends ITokenToStringConverter> bindITokenToStringConverter() {
|
||||
return AntlrTokenToStringConverter.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
|
||||
public Class<? extends IAntlrTokenFileProvider> bindIAntlrTokenFileProvider() {
|
||||
return PatternAntlrTokenFileProvider.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
|
||||
public Class<? extends Lexer> bindLexer() {
|
||||
return InternalPatternLexer.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
|
||||
public Class<? extends ITokenDefProvider> bindITokenDefProvider() {
|
||||
return AntlrTokenDefProvider.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
|
||||
public Provider<? extends InternalPatternLexer> provideInternalPatternLexer() {
|
||||
return LexerProvider.create(InternalPatternLexer.class);
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
|
||||
public void configureRuntimeLexer(Binder binder) {
|
||||
binder.bind(Lexer.class)
|
||||
.annotatedWith(Names.named(LexerBindings.RUNTIME))
|
||||
.to(InternalPatternLexer.class);
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.validation.ValidatorFragment2
|
||||
@SingletonBinding(eager=true)
|
||||
public Class<? extends PatternValidator> bindPatternValidator() {
|
||||
return PatternValidator.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.scoping.ImportNamespacesScopingFragment2
|
||||
public Class<? extends IScopeProvider> bindIScopeProvider() {
|
||||
return PatternScopeProvider.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.scoping.ImportNamespacesScopingFragment2
|
||||
public void configureIScopeProviderDelegate(Binder binder) {
|
||||
binder.bind(IScopeProvider.class).annotatedWith(Names.named(AbstractDeclarativeScopeProvider.NAMED_DELEGATE)).to(ImportedNamespaceAwareLocalScopeProvider.class);
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.scoping.ImportNamespacesScopingFragment2
|
||||
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
|
||||
return DefaultGlobalScopeProvider.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.scoping.ImportNamespacesScopingFragment2
|
||||
public void configureIgnoreCaseLinking(Binder binder) {
|
||||
binder.bindConstant().annotatedWith(IgnoreCaseLinking.class).to(false);
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.exporting.QualifiedNamesFragment2
|
||||
public Class<? extends IQualifiedNameProvider> bindIQualifiedNameProvider() {
|
||||
return DefaultDeclarativeQualifiedNameProvider.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2
|
||||
public Class<? extends IContainer.Manager> bindIContainer$Manager() {
|
||||
return StateBasedContainerManager.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2
|
||||
public Class<? extends IAllContainersState.Provider> bindIAllContainersState$Provider() {
|
||||
return ResourceSetBasedAllContainersStateProvider.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2
|
||||
public void configureIResourceDescriptions(Binder binder) {
|
||||
binder.bind(IResourceDescriptions.class).to(ResourceSetBasedResourceDescriptions.class);
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2
|
||||
public void configureIResourceDescriptionsPersisted(Binder binder) {
|
||||
binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(ResourceSetBasedResourceDescriptions.class);
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.generator.GeneratorFragment2
|
||||
public Class<? extends IGenerator2> bindIGenerator2() {
|
||||
return PatternGenerator.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.formatting.Formatter2Fragment2
|
||||
public Class<? extends IFormatter2> bindIFormatter2() {
|
||||
return PatternFormatter.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.formatting.Formatter2Fragment2
|
||||
public void configureFormatterPreferences(Binder binder) {
|
||||
binder.bind(IPreferenceValuesProvider.class).annotatedWith(FormatterPreferences.class).to(FormatterPreferenceValuesProvider.class);
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.ecore2xtext.Ecore2XtextValueConverterServiceFragment2
|
||||
public Class<? extends IValueConverterService> bindIValueConverterService() {
|
||||
return Ecore2XtextTerminalConverters.class;
|
||||
}
|
||||
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* generated by Xtext 2.12.0
|
||||
*/
|
||||
package com.irtsaintexupery.xtext.pseim;
|
||||
|
||||
import com.google.inject.Guice;
|
||||
import com.google.inject.Injector;
|
||||
import org.eclipse.emf.ecore.resource.Resource;
|
||||
import org.eclipse.xtext.ISetup;
|
||||
import org.eclipse.xtext.common.TerminalsStandaloneSetup;
|
||||
import org.eclipse.xtext.resource.IResourceFactory;
|
||||
import org.eclipse.xtext.resource.IResourceServiceProvider;
|
||||
|
||||
@SuppressWarnings("all")
|
||||
public class PatternStandaloneSetupGenerated implements ISetup {
|
||||
|
||||
@Override
|
||||
public Injector createInjectorAndDoEMFRegistration() {
|
||||
TerminalsStandaloneSetup.doSetup();
|
||||
|
||||
Injector injector = createInjector();
|
||||
register(injector);
|
||||
return injector;
|
||||
}
|
||||
|
||||
public Injector createInjector() {
|
||||
return Guice.createInjector(new PatternRuntimeModule());
|
||||
}
|
||||
|
||||
public void register(Injector injector) {
|
||||
IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
|
||||
IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
|
||||
|
||||
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("pseimx", resourceFactory);
|
||||
IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("pseimx", serviceProvider);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* generated by Xtext 2.12.0
|
||||
*/
|
||||
package com.irtsaintexupery.xtext.pseim.parser.antlr;
|
||||
|
||||
import java.io.InputStream;
|
||||
import org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider;
|
||||
|
||||
public class PatternAntlrTokenFileProvider implements IAntlrTokenFileProvider {
|
||||
|
||||
@Override
|
||||
public InputStream getAntlrTokenFile() {
|
||||
ClassLoader classLoader = getClass().getClassLoader();
|
||||
return classLoader.getResourceAsStream("com/irtsaintexupery/xtext/pseim/parser/antlr/internal/InternalPattern.tokens");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* generated by Xtext 2.12.0
|
||||
*/
|
||||
package com.irtsaintexupery.xtext.pseim.parser.antlr;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.irtsaintexupery.xtext.pseim.parser.antlr.internal.InternalPatternParser;
|
||||
import com.irtsaintexupery.xtext.pseim.services.PatternGrammarAccess;
|
||||
import org.eclipse.xtext.parser.antlr.AbstractAntlrParser;
|
||||
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
|
||||
|
||||
public class PatternParser extends AbstractAntlrParser {
|
||||
|
||||
@Inject
|
||||
private PatternGrammarAccess grammarAccess;
|
||||
|
||||
@Override
|
||||
protected void setInitialHiddenTokens(XtextTokenStream tokenStream) {
|
||||
tokenStream.setInitialHiddenTokens("RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected InternalPatternParser createParser(XtextTokenStream stream) {
|
||||
return new InternalPatternParser(stream, getGrammarAccess());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getDefaultRuleName() {
|
||||
return "Pattern";
|
||||
}
|
||||
|
||||
public PatternGrammarAccess getGrammarAccess() {
|
||||
return this.grammarAccess;
|
||||
}
|
||||
|
||||
public void setGrammarAccess(PatternGrammarAccess grammarAccess) {
|
||||
this.grammarAccess = grammarAccess;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,751 @@
|
||||
/*
|
||||
* generated by Xtext 2.12.0
|
||||
*/
|
||||
grammar InternalPattern;
|
||||
|
||||
options {
|
||||
superClass=AbstractInternalAntlrParser;
|
||||
}
|
||||
|
||||
@lexer::header {
|
||||
package com.irtsaintexupery.xtext.pseim.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 com.irtsaintexupery.xtext.pseim.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.emf.common.util.Enumerator;
|
||||
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 com.irtsaintexupery.xtext.pseim.services.PatternGrammarAccess;
|
||||
|
||||
}
|
||||
|
||||
@parser::members {
|
||||
|
||||
private PatternGrammarAccess grammarAccess;
|
||||
|
||||
public InternalPatternParser(TokenStream input, PatternGrammarAccess grammarAccess) {
|
||||
this(input);
|
||||
this.grammarAccess = grammarAccess;
|
||||
registerRules(grammarAccess.getGrammar());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getFirstRuleName() {
|
||||
return "Pattern";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected PatternGrammarAccess getGrammarAccess() {
|
||||
return grammarAccess;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@rulecatch {
|
||||
catch (RecognitionException re) {
|
||||
recover(input,re);
|
||||
appendSkippedTokens();
|
||||
}
|
||||
}
|
||||
|
||||
// Entry rule entryRulePattern
|
||||
entryRulePattern returns [EObject current=null]:
|
||||
{ newCompositeNode(grammarAccess.getPatternRule()); }
|
||||
iv_rulePattern=rulePattern
|
||||
{ $current=$iv_rulePattern.current; }
|
||||
EOF;
|
||||
|
||||
// Rule Pattern
|
||||
rulePattern returns [EObject current=null]
|
||||
@init {
|
||||
enterRule();
|
||||
}
|
||||
@after {
|
||||
leaveRule();
|
||||
}:
|
||||
(
|
||||
otherlv_0='pattern'
|
||||
{
|
||||
newLeafNode(otherlv_0, grammarAccess.getPatternAccess().getPatternKeyword_0());
|
||||
}
|
||||
(
|
||||
(
|
||||
lv_name_1_0=RULE_ID
|
||||
{
|
||||
newLeafNode(lv_name_1_0, grammarAccess.getPatternAccess().getNameIDTerminalRuleCall_1_0());
|
||||
}
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElement(grammarAccess.getPatternRule());
|
||||
}
|
||||
setWithLastConsumed(
|
||||
$current,
|
||||
"name",
|
||||
lv_name_1_0,
|
||||
"org.eclipse.xtext.common.Terminals.ID");
|
||||
}
|
||||
)
|
||||
)
|
||||
otherlv_2='('
|
||||
{
|
||||
newLeafNode(otherlv_2, grammarAccess.getPatternAccess().getLeftParenthesisKeyword_2());
|
||||
}
|
||||
(
|
||||
(
|
||||
(
|
||||
{
|
||||
newCompositeNode(grammarAccess.getPatternAccess().getCardinalityElementsCardinalityElementParserRuleCall_3_0_0());
|
||||
}
|
||||
lv_cardinalityElements_3_0=ruleCardinalityElement
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElementForParent(grammarAccess.getPatternRule());
|
||||
}
|
||||
add(
|
||||
$current,
|
||||
"cardinalityElements",
|
||||
lv_cardinalityElements_3_0,
|
||||
"com.irtsaintexupery.xtext.pseim.Pattern.CardinalityElement");
|
||||
afterParserOrEnumRuleCall();
|
||||
}
|
||||
)
|
||||
)
|
||||
(
|
||||
otherlv_4=','
|
||||
{
|
||||
newLeafNode(otherlv_4, grammarAccess.getPatternAccess().getCommaKeyword_3_1_0());
|
||||
}
|
||||
(
|
||||
(
|
||||
{
|
||||
newCompositeNode(grammarAccess.getPatternAccess().getCardinalityElementsCardinalityElementParserRuleCall_3_1_1_0());
|
||||
}
|
||||
lv_cardinalityElements_5_0=ruleCardinalityElement
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElementForParent(grammarAccess.getPatternRule());
|
||||
}
|
||||
add(
|
||||
$current,
|
||||
"cardinalityElements",
|
||||
lv_cardinalityElements_5_0,
|
||||
"com.irtsaintexupery.xtext.pseim.Pattern.CardinalityElement");
|
||||
afterParserOrEnumRuleCall();
|
||||
}
|
||||
)
|
||||
)
|
||||
)*
|
||||
)?
|
||||
otherlv_6=')'
|
||||
{
|
||||
newLeafNode(otherlv_6, grammarAccess.getPatternAccess().getRightParenthesisKeyword_4());
|
||||
}
|
||||
(
|
||||
otherlv_7='{'
|
||||
{
|
||||
newLeafNode(otherlv_7, grammarAccess.getPatternAccess().getLeftCurlyBracketKeyword_5_0());
|
||||
}
|
||||
(
|
||||
(
|
||||
(
|
||||
{
|
||||
newCompositeNode(grammarAccess.getPatternAccess().getModelElementsPatternComponentParserRuleCall_5_1_0_0());
|
||||
}
|
||||
lv_modelElements_8_0=rulePatternComponent
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElementForParent(grammarAccess.getPatternRule());
|
||||
}
|
||||
add(
|
||||
$current,
|
||||
"modelElements",
|
||||
lv_modelElements_8_0,
|
||||
"com.irtsaintexupery.xtext.pseim.Pattern.PatternComponent");
|
||||
afterParserOrEnumRuleCall();
|
||||
}
|
||||
)
|
||||
)
|
||||
|
|
||||
(
|
||||
(
|
||||
{
|
||||
newCompositeNode(grammarAccess.getPatternAccess().getModelElementsPatternLinkParserRuleCall_5_1_1_0());
|
||||
}
|
||||
lv_modelElements_9_0=rulePatternLink
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElementForParent(grammarAccess.getPatternRule());
|
||||
}
|
||||
add(
|
||||
$current,
|
||||
"modelElements",
|
||||
lv_modelElements_9_0,
|
||||
"com.irtsaintexupery.xtext.pseim.Pattern.PatternLink");
|
||||
afterParserOrEnumRuleCall();
|
||||
}
|
||||
)
|
||||
)
|
||||
)*
|
||||
otherlv_10='}'
|
||||
{
|
||||
newLeafNode(otherlv_10, grammarAccess.getPatternAccess().getRightCurlyBracketKeyword_5_2());
|
||||
}
|
||||
)?
|
||||
)
|
||||
;
|
||||
|
||||
// Entry rule entryRulePatternComponent
|
||||
entryRulePatternComponent returns [EObject current=null]:
|
||||
{ newCompositeNode(grammarAccess.getPatternComponentRule()); }
|
||||
iv_rulePatternComponent=rulePatternComponent
|
||||
{ $current=$iv_rulePatternComponent.current; }
|
||||
EOF;
|
||||
|
||||
// Rule PatternComponent
|
||||
rulePatternComponent returns [EObject current=null]
|
||||
@init {
|
||||
enterRule();
|
||||
}
|
||||
@after {
|
||||
leaveRule();
|
||||
}:
|
||||
(
|
||||
otherlv_0='component'
|
||||
{
|
||||
newLeafNode(otherlv_0, grammarAccess.getPatternComponentAccess().getComponentKeyword_0());
|
||||
}
|
||||
(
|
||||
(
|
||||
lv_name_1_0=RULE_ID
|
||||
{
|
||||
newLeafNode(lv_name_1_0, grammarAccess.getPatternComponentAccess().getNameIDTerminalRuleCall_1_0());
|
||||
}
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElement(grammarAccess.getPatternComponentRule());
|
||||
}
|
||||
setWithLastConsumed(
|
||||
$current,
|
||||
"name",
|
||||
lv_name_1_0,
|
||||
"org.eclipse.xtext.common.Terminals.ID");
|
||||
}
|
||||
)
|
||||
)
|
||||
(
|
||||
otherlv_2='['
|
||||
{
|
||||
newLeafNode(otherlv_2, grammarAccess.getPatternComponentAccess().getLeftSquareBracketKeyword_2_0());
|
||||
}
|
||||
(
|
||||
(
|
||||
(
|
||||
lv_multiplicityValue_3_0=RULE_INT
|
||||
{
|
||||
newLeafNode(lv_multiplicityValue_3_0, grammarAccess.getPatternComponentAccess().getMultiplicityValueINTTerminalRuleCall_2_1_0_0());
|
||||
}
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElement(grammarAccess.getPatternComponentRule());
|
||||
}
|
||||
setWithLastConsumed(
|
||||
$current,
|
||||
"multiplicityValue",
|
||||
lv_multiplicityValue_3_0,
|
||||
"org.eclipse.xtext.common.Terminals.INT");
|
||||
}
|
||||
)
|
||||
)
|
||||
|
|
||||
(
|
||||
(
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElement(grammarAccess.getPatternComponentRule());
|
||||
}
|
||||
}
|
||||
otherlv_4=RULE_ID
|
||||
{
|
||||
newLeafNode(otherlv_4, grammarAccess.getPatternComponentAccess().getCardinalityElementCardinalityElementCrossReference_2_1_1_0());
|
||||
}
|
||||
)
|
||||
)
|
||||
)
|
||||
otherlv_5=']'
|
||||
{
|
||||
newLeafNode(otherlv_5, grammarAccess.getPatternComponentAccess().getRightSquareBracketKeyword_2_2());
|
||||
}
|
||||
)?
|
||||
otherlv_6='('
|
||||
{
|
||||
newLeafNode(otherlv_6, grammarAccess.getPatternComponentAccess().getLeftParenthesisKeyword_3());
|
||||
}
|
||||
(
|
||||
(
|
||||
(
|
||||
{
|
||||
newCompositeNode(grammarAccess.getPatternComponentAccess().getContentPatternPortParserRuleCall_4_0_0());
|
||||
}
|
||||
lv_content_7_0=rulePatternPort
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElementForParent(grammarAccess.getPatternComponentRule());
|
||||
}
|
||||
add(
|
||||
$current,
|
||||
"content",
|
||||
lv_content_7_0,
|
||||
"com.irtsaintexupery.xtext.pseim.Pattern.PatternPort");
|
||||
afterParserOrEnumRuleCall();
|
||||
}
|
||||
)
|
||||
)
|
||||
(
|
||||
otherlv_8=','
|
||||
{
|
||||
newLeafNode(otherlv_8, grammarAccess.getPatternComponentAccess().getCommaKeyword_4_1_0());
|
||||
}
|
||||
(
|
||||
(
|
||||
{
|
||||
newCompositeNode(grammarAccess.getPatternComponentAccess().getContentPatternPortParserRuleCall_4_1_1_0());
|
||||
}
|
||||
lv_content_9_0=rulePatternPort
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElementForParent(grammarAccess.getPatternComponentRule());
|
||||
}
|
||||
add(
|
||||
$current,
|
||||
"content",
|
||||
lv_content_9_0,
|
||||
"com.irtsaintexupery.xtext.pseim.Pattern.PatternPort");
|
||||
afterParserOrEnumRuleCall();
|
||||
}
|
||||
)
|
||||
)
|
||||
)*
|
||||
)?
|
||||
otherlv_10=')'
|
||||
{
|
||||
newLeafNode(otherlv_10, grammarAccess.getPatternComponentAccess().getRightParenthesisKeyword_5());
|
||||
}
|
||||
(
|
||||
otherlv_11='{'
|
||||
{
|
||||
newLeafNode(otherlv_11, grammarAccess.getPatternComponentAccess().getLeftCurlyBracketKeyword_6_0());
|
||||
}
|
||||
(
|
||||
(
|
||||
(
|
||||
{
|
||||
newCompositeNode(grammarAccess.getPatternComponentAccess().getContentPatternComponentParserRuleCall_6_1_0_0());
|
||||
}
|
||||
lv_content_12_0=rulePatternComponent
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElementForParent(grammarAccess.getPatternComponentRule());
|
||||
}
|
||||
add(
|
||||
$current,
|
||||
"content",
|
||||
lv_content_12_0,
|
||||
"com.irtsaintexupery.xtext.pseim.Pattern.PatternComponent");
|
||||
afterParserOrEnumRuleCall();
|
||||
}
|
||||
)
|
||||
)
|
||||
|
|
||||
(
|
||||
(
|
||||
{
|
||||
newCompositeNode(grammarAccess.getPatternComponentAccess().getContentPatternLinkParserRuleCall_6_1_1_0());
|
||||
}
|
||||
lv_content_13_0=rulePatternLink
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElementForParent(grammarAccess.getPatternComponentRule());
|
||||
}
|
||||
add(
|
||||
$current,
|
||||
"content",
|
||||
lv_content_13_0,
|
||||
"com.irtsaintexupery.xtext.pseim.Pattern.PatternLink");
|
||||
afterParserOrEnumRuleCall();
|
||||
}
|
||||
)
|
||||
)
|
||||
)*
|
||||
otherlv_14='}'
|
||||
{
|
||||
newLeafNode(otherlv_14, grammarAccess.getPatternComponentAccess().getRightCurlyBracketKeyword_6_2());
|
||||
}
|
||||
)?
|
||||
)
|
||||
;
|
||||
|
||||
// Entry rule entryRulePatternPort
|
||||
entryRulePatternPort returns [EObject current=null]:
|
||||
{ newCompositeNode(grammarAccess.getPatternPortRule()); }
|
||||
iv_rulePatternPort=rulePatternPort
|
||||
{ $current=$iv_rulePatternPort.current; }
|
||||
EOF;
|
||||
|
||||
// Rule PatternPort
|
||||
rulePatternPort returns [EObject current=null]
|
||||
@init {
|
||||
enterRule();
|
||||
}
|
||||
@after {
|
||||
leaveRule();
|
||||
}:
|
||||
(
|
||||
(
|
||||
(
|
||||
{
|
||||
newCompositeNode(grammarAccess.getPatternPortAccess().getDirPatternPortDirectionEnumRuleCall_0_0());
|
||||
}
|
||||
lv_dir_0_0=rulePatternPortDirection
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElementForParent(grammarAccess.getPatternPortRule());
|
||||
}
|
||||
set(
|
||||
$current,
|
||||
"dir",
|
||||
lv_dir_0_0,
|
||||
"com.irtsaintexupery.xtext.pseim.Pattern.PatternPortDirection");
|
||||
afterParserOrEnumRuleCall();
|
||||
}
|
||||
)
|
||||
)
|
||||
(
|
||||
(
|
||||
lv_name_1_0=RULE_ID
|
||||
{
|
||||
newLeafNode(lv_name_1_0, grammarAccess.getPatternPortAccess().getNameIDTerminalRuleCall_1_0());
|
||||
}
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElement(grammarAccess.getPatternPortRule());
|
||||
}
|
||||
setWithLastConsumed(
|
||||
$current,
|
||||
"name",
|
||||
lv_name_1_0,
|
||||
"org.eclipse.xtext.common.Terminals.ID");
|
||||
}
|
||||
)
|
||||
)
|
||||
(
|
||||
otherlv_2='['
|
||||
{
|
||||
newLeafNode(otherlv_2, grammarAccess.getPatternPortAccess().getLeftSquareBracketKeyword_2_0());
|
||||
}
|
||||
(
|
||||
(
|
||||
(
|
||||
lv_multiplicityValue_3_0=RULE_INT
|
||||
{
|
||||
newLeafNode(lv_multiplicityValue_3_0, grammarAccess.getPatternPortAccess().getMultiplicityValueINTTerminalRuleCall_2_1_0_0());
|
||||
}
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElement(grammarAccess.getPatternPortRule());
|
||||
}
|
||||
setWithLastConsumed(
|
||||
$current,
|
||||
"multiplicityValue",
|
||||
lv_multiplicityValue_3_0,
|
||||
"org.eclipse.xtext.common.Terminals.INT");
|
||||
}
|
||||
)
|
||||
)
|
||||
|
|
||||
(
|
||||
(
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElement(grammarAccess.getPatternPortRule());
|
||||
}
|
||||
}
|
||||
otherlv_4=RULE_ID
|
||||
{
|
||||
newLeafNode(otherlv_4, grammarAccess.getPatternPortAccess().getCardinalityElementCardinalityElementCrossReference_2_1_1_0());
|
||||
}
|
||||
)
|
||||
)
|
||||
)
|
||||
otherlv_5=']'
|
||||
{
|
||||
newLeafNode(otherlv_5, grammarAccess.getPatternPortAccess().getRightSquareBracketKeyword_2_2());
|
||||
}
|
||||
)?
|
||||
)
|
||||
;
|
||||
|
||||
// Entry rule entryRuleCardinalityElement
|
||||
entryRuleCardinalityElement returns [EObject current=null]:
|
||||
{ newCompositeNode(grammarAccess.getCardinalityElementRule()); }
|
||||
iv_ruleCardinalityElement=ruleCardinalityElement
|
||||
{ $current=$iv_ruleCardinalityElement.current; }
|
||||
EOF;
|
||||
|
||||
// Rule CardinalityElement
|
||||
ruleCardinalityElement returns [EObject current=null]
|
||||
@init {
|
||||
enterRule();
|
||||
}
|
||||
@after {
|
||||
leaveRule();
|
||||
}:
|
||||
(
|
||||
(
|
||||
lv_name_0_0=RULE_ID
|
||||
{
|
||||
newLeafNode(lv_name_0_0, grammarAccess.getCardinalityElementAccess().getNameIDTerminalRuleCall_0());
|
||||
}
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElement(grammarAccess.getCardinalityElementRule());
|
||||
}
|
||||
setWithLastConsumed(
|
||||
$current,
|
||||
"name",
|
||||
lv_name_0_0,
|
||||
"org.eclipse.xtext.common.Terminals.ID");
|
||||
}
|
||||
)
|
||||
)
|
||||
;
|
||||
|
||||
// Entry rule entryRulePatternLink
|
||||
entryRulePatternLink returns [EObject current=null]:
|
||||
{ newCompositeNode(grammarAccess.getPatternLinkRule()); }
|
||||
iv_rulePatternLink=rulePatternLink
|
||||
{ $current=$iv_rulePatternLink.current; }
|
||||
EOF;
|
||||
|
||||
// Rule PatternLink
|
||||
rulePatternLink returns [EObject current=null]
|
||||
@init {
|
||||
enterRule();
|
||||
}
|
||||
@after {
|
||||
leaveRule();
|
||||
}:
|
||||
(
|
||||
(
|
||||
(
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElement(grammarAccess.getPatternLinkRule());
|
||||
}
|
||||
}
|
||||
{
|
||||
newCompositeNode(grammarAccess.getPatternLinkAccess().getSrcPatternPortCrossReference_0_0());
|
||||
}
|
||||
ruleQualifiedID
|
||||
{
|
||||
afterParserOrEnumRuleCall();
|
||||
}
|
||||
)
|
||||
)
|
||||
(
|
||||
(
|
||||
{
|
||||
newCompositeNode(grammarAccess.getPatternLinkAccess().getLinkTypeLinkTypeEnumRuleCall_1_0());
|
||||
}
|
||||
lv_linkType_1_0=ruleLinkType
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElementForParent(grammarAccess.getPatternLinkRule());
|
||||
}
|
||||
set(
|
||||
$current,
|
||||
"linkType",
|
||||
lv_linkType_1_0,
|
||||
"com.irtsaintexupery.xtext.pseim.Pattern.LinkType");
|
||||
afterParserOrEnumRuleCall();
|
||||
}
|
||||
)
|
||||
)
|
||||
(
|
||||
(
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElement(grammarAccess.getPatternLinkRule());
|
||||
}
|
||||
}
|
||||
{
|
||||
newCompositeNode(grammarAccess.getPatternLinkAccess().getDstPatternPortCrossReference_2_0());
|
||||
}
|
||||
ruleQualifiedID
|
||||
{
|
||||
afterParserOrEnumRuleCall();
|
||||
}
|
||||
)
|
||||
)
|
||||
)
|
||||
;
|
||||
|
||||
// Entry rule entryRuleQualifiedID
|
||||
entryRuleQualifiedID returns [String current=null]:
|
||||
{ newCompositeNode(grammarAccess.getQualifiedIDRule()); }
|
||||
iv_ruleQualifiedID=ruleQualifiedID
|
||||
{ $current=$iv_ruleQualifiedID.current.getText(); }
|
||||
EOF;
|
||||
|
||||
// Rule QualifiedID
|
||||
ruleQualifiedID returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()]
|
||||
@init {
|
||||
enterRule();
|
||||
}
|
||||
@after {
|
||||
leaveRule();
|
||||
}:
|
||||
(
|
||||
this_ID_0=RULE_ID
|
||||
{
|
||||
$current.merge(this_ID_0);
|
||||
}
|
||||
{
|
||||
newLeafNode(this_ID_0, grammarAccess.getQualifiedIDAccess().getIDTerminalRuleCall_0());
|
||||
}
|
||||
(
|
||||
kw='.'
|
||||
{
|
||||
$current.merge(kw);
|
||||
newLeafNode(kw, grammarAccess.getQualifiedIDAccess().getFullStopKeyword_1_0());
|
||||
}
|
||||
this_ID_2=RULE_ID
|
||||
{
|
||||
$current.merge(this_ID_2);
|
||||
}
|
||||
{
|
||||
newLeafNode(this_ID_2, grammarAccess.getQualifiedIDAccess().getIDTerminalRuleCall_1_1());
|
||||
}
|
||||
)*
|
||||
)
|
||||
;
|
||||
|
||||
// Rule PatternPortDirection
|
||||
rulePatternPortDirection returns [Enumerator current=null]
|
||||
@init {
|
||||
enterRule();
|
||||
}
|
||||
@after {
|
||||
leaveRule();
|
||||
}:
|
||||
(
|
||||
(
|
||||
enumLiteral_0='unspec'
|
||||
{
|
||||
$current = grammarAccess.getPatternPortDirectionAccess().getUNSPECIFIEDEnumLiteralDeclaration_0().getEnumLiteral().getInstance();
|
||||
newLeafNode(enumLiteral_0, grammarAccess.getPatternPortDirectionAccess().getUNSPECIFIEDEnumLiteralDeclaration_0());
|
||||
}
|
||||
)
|
||||
|
|
||||
(
|
||||
enumLiteral_1='in'
|
||||
{
|
||||
$current = grammarAccess.getPatternPortDirectionAccess().getINEnumLiteralDeclaration_1().getEnumLiteral().getInstance();
|
||||
newLeafNode(enumLiteral_1, grammarAccess.getPatternPortDirectionAccess().getINEnumLiteralDeclaration_1());
|
||||
}
|
||||
)
|
||||
|
|
||||
(
|
||||
enumLiteral_2='out'
|
||||
{
|
||||
$current = grammarAccess.getPatternPortDirectionAccess().getOUTEnumLiteralDeclaration_2().getEnumLiteral().getInstance();
|
||||
newLeafNode(enumLiteral_2, grammarAccess.getPatternPortDirectionAccess().getOUTEnumLiteralDeclaration_2());
|
||||
}
|
||||
)
|
||||
|
|
||||
(
|
||||
enumLiteral_3='inout'
|
||||
{
|
||||
$current = grammarAccess.getPatternPortDirectionAccess().getINOUTEnumLiteralDeclaration_3().getEnumLiteral().getInstance();
|
||||
newLeafNode(enumLiteral_3, grammarAccess.getPatternPortDirectionAccess().getINOUTEnumLiteralDeclaration_3());
|
||||
}
|
||||
)
|
||||
)
|
||||
;
|
||||
|
||||
// Rule LinkType
|
||||
ruleLinkType returns [Enumerator current=null]
|
||||
@init {
|
||||
enterRule();
|
||||
}
|
||||
@after {
|
||||
leaveRule();
|
||||
}:
|
||||
(
|
||||
(
|
||||
enumLiteral_0='-{Transpose}->'
|
||||
{
|
||||
$current = grammarAccess.getLinkTypeAccess().getTRANSPOSEEnumLiteralDeclaration_0().getEnumLiteral().getInstance();
|
||||
newLeafNode(enumLiteral_0, grammarAccess.getLinkTypeAccess().getTRANSPOSEEnumLiteralDeclaration_0());
|
||||
}
|
||||
)
|
||||
|
|
||||
(
|
||||
enumLiteral_1='-{Identity}->'
|
||||
{
|
||||
$current = grammarAccess.getLinkTypeAccess().getIDENTITYEnumLiteralDeclaration_1().getEnumLiteral().getInstance();
|
||||
newLeafNode(enumLiteral_1, grammarAccess.getLinkTypeAccess().getIDENTITYEnumLiteralDeclaration_1());
|
||||
}
|
||||
)
|
||||
|
|
||||
(
|
||||
enumLiteral_2='-{First}->'
|
||||
{
|
||||
$current = grammarAccess.getLinkTypeAccess().getFIRSTEnumLiteralDeclaration_2().getEnumLiteral().getInstance();
|
||||
newLeafNode(enumLiteral_2, grammarAccess.getLinkTypeAccess().getFIRSTEnumLiteralDeclaration_2());
|
||||
}
|
||||
)
|
||||
|
|
||||
(
|
||||
enumLiteral_3='-{Rotate}->'
|
||||
{
|
||||
$current = grammarAccess.getLinkTypeAccess().getROTATEEnumLiteralDeclaration_3().getEnumLiteral().getInstance();
|
||||
newLeafNode(enumLiteral_3, grammarAccess.getLinkTypeAccess().getROTATEEnumLiteralDeclaration_3());
|
||||
}
|
||||
)
|
||||
|
|
||||
(
|
||||
enumLiteral_4='-{Shift}->'
|
||||
{
|
||||
$current = grammarAccess.getLinkTypeAccess().getSHIFTEnumLiteralDeclaration_4().getEnumLiteral().getInstance();
|
||||
newLeafNode(enumLiteral_4, grammarAccess.getLinkTypeAccess().getSHIFTEnumLiteralDeclaration_4());
|
||||
}
|
||||
)
|
||||
)
|
||||
;
|
||||
|
||||
RULE_ID : '^'? ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*;
|
||||
|
||||
RULE_INT : ('0'..'9')+;
|
||||
|
||||
RULE_STRING : ('"' ('\\' .|~(('\\'|'"')))* '"'|'\'' ('\\' .|~(('\\'|'\'')))* '\'');
|
||||
|
||||
RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )*'*/';
|
||||
|
||||
RULE_SL_COMMENT : '//' ~(('\n'|'\r'))* ('\r'? '\n')?;
|
||||
|
||||
RULE_WS : (' '|'\t'|'\r'|'\n')+;
|
||||
|
||||
RULE_ANY_OTHER : .;
|
||||
@@ -0,0 +1,45 @@
|
||||
'('=12
|
||||
')'=14
|
||||
','=13
|
||||
'-{First}->'=27
|
||||
'-{Identity}->'=26
|
||||
'-{Rotate}->'=28
|
||||
'-{Shift}->'=29
|
||||
'-{Transpose}->'=25
|
||||
'.'=20
|
||||
'['=18
|
||||
']'=19
|
||||
'component'=17
|
||||
'in'=22
|
||||
'inout'=24
|
||||
'out'=23
|
||||
'pattern'=11
|
||||
'unspec'=21
|
||||
'{'=15
|
||||
'}'=16
|
||||
RULE_ANY_OTHER=10
|
||||
RULE_ID=4
|
||||
RULE_INT=5
|
||||
RULE_ML_COMMENT=7
|
||||
RULE_SL_COMMENT=8
|
||||
RULE_STRING=6
|
||||
RULE_WS=9
|
||||
T__11=11
|
||||
T__12=12
|
||||
T__13=13
|
||||
T__14=14
|
||||
T__15=15
|
||||
T__16=16
|
||||
T__17=17
|
||||
T__18=18
|
||||
T__19=19
|
||||
T__20=20
|
||||
T__21=21
|
||||
T__22=22
|
||||
T__23=23
|
||||
T__24=24
|
||||
T__25=25
|
||||
T__26=26
|
||||
T__27=27
|
||||
T__28=28
|
||||
T__29=29
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,9 @@
|
||||
/*
|
||||
* generated by Xtext 2.12.0
|
||||
*/
|
||||
package com.irtsaintexupery.xtext.pseim.scoping;
|
||||
|
||||
import org.eclipse.xtext.scoping.impl.DelegatingScopeProvider;
|
||||
|
||||
public abstract class AbstractPatternScopeProvider extends DelegatingScopeProvider {
|
||||
}
|
||||
@@ -0,0 +1,150 @@
|
||||
/*
|
||||
* generated by Xtext 2.12.0
|
||||
*/
|
||||
package com.irtsaintexupery.xtext.pseim.serializer;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
import org.eclipse.emf.ecore.EPackage;
|
||||
import org.eclipse.xtext.Action;
|
||||
import org.eclipse.xtext.Parameter;
|
||||
import org.eclipse.xtext.ParserRule;
|
||||
import org.eclipse.xtext.serializer.ISerializationContext;
|
||||
import org.eclipse.xtext.serializer.acceptor.SequenceFeeder;
|
||||
import org.eclipse.xtext.serializer.sequencer.AbstractDelegatingSemanticSequencer;
|
||||
import org.eclipse.xtext.serializer.sequencer.ITransientValueService.ValueTransient;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.irtsaintexupery.pseim.pseim.CardinalityElement;
|
||||
import com.irtsaintexupery.pseim.pseim.Pattern;
|
||||
import com.irtsaintexupery.pseim.pseim.PatternComponent;
|
||||
import com.irtsaintexupery.pseim.pseim.PatternLink;
|
||||
import com.irtsaintexupery.pseim.pseim.PatternPort;
|
||||
import com.irtsaintexupery.pseim.pseim.PseimPackage;
|
||||
import com.irtsaintexupery.pseim.seim.SeimPackage;
|
||||
import com.irtsaintexupery.xtext.pseim.services.PatternGrammarAccess;
|
||||
|
||||
@SuppressWarnings("all")
|
||||
public class PatternSemanticSequencer extends AbstractDelegatingSemanticSequencer {
|
||||
|
||||
@Inject
|
||||
private PatternGrammarAccess grammarAccess;
|
||||
|
||||
@Override
|
||||
public void sequence(ISerializationContext context, EObject semanticObject) {
|
||||
EPackage epackage = semanticObject.eClass().getEPackage();
|
||||
ParserRule rule = context.getParserRule();
|
||||
Action action = context.getAssignedAction();
|
||||
Set<Parameter> parameters = context.getEnabledBooleanParameters();
|
||||
if (epackage == PseimPackage.eINSTANCE)
|
||||
switch (semanticObject.eClass().getClassifierID()) {
|
||||
case PseimPackage.CARDINALITY_ELEMENT:
|
||||
sequence_CardinalityElement(context, (CardinalityElement) semanticObject);
|
||||
return;
|
||||
case PseimPackage.PATTERN:
|
||||
sequence_Pattern(context, (Pattern) semanticObject);
|
||||
return;
|
||||
case PseimPackage.PATTERN_COMPONENT:
|
||||
sequence_PatternComponent(context, (PatternComponent) semanticObject);
|
||||
return;
|
||||
case PseimPackage.PATTERN_LINK:
|
||||
sequence_PatternLink(context, (PatternLink) semanticObject);
|
||||
return;
|
||||
case PseimPackage.PATTERN_PORT:
|
||||
sequence_PatternPort(context, (PatternPort) semanticObject);
|
||||
return;
|
||||
}
|
||||
if (errorAcceptor != null)
|
||||
errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
|
||||
}
|
||||
|
||||
/**
|
||||
* Contexts:
|
||||
* CardinalityElement returns CardinalityElement
|
||||
*
|
||||
* Constraint:
|
||||
* name=ID
|
||||
*/
|
||||
protected void sequence_CardinalityElement(ISerializationContext context, CardinalityElement semanticObject) {
|
||||
if (errorAcceptor != null) {
|
||||
if (transientValues.isValueTransient(semanticObject, SeimPackage.Literals.NAMED_ELEMENT__NAME) == ValueTransient.YES)
|
||||
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SeimPackage.Literals.NAMED_ELEMENT__NAME));
|
||||
}
|
||||
SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
|
||||
feeder.accept(grammarAccess.getCardinalityElementAccess().getNameIDTerminalRuleCall_0(), semanticObject.getName());
|
||||
feeder.finish();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Contexts:
|
||||
* PatternComponent returns PatternComponent
|
||||
*
|
||||
* Constraint:
|
||||
* (
|
||||
* name=ID
|
||||
* (multiplicityValue=INT | cardinalityElement=[CardinalityElement|ID])?
|
||||
* (content+=PatternPort content+=PatternPort*)?
|
||||
* content+=PatternComponent?
|
||||
* (content+=PatternLink? content+=PatternComponent?)*
|
||||
* )
|
||||
*/
|
||||
protected void sequence_PatternComponent(ISerializationContext context, PatternComponent semanticObject) {
|
||||
genericSequencer.createSequence(context, semanticObject);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Contexts:
|
||||
* PatternLink returns PatternLink
|
||||
*
|
||||
* Constraint:
|
||||
* (src=[PatternPort|QualifiedID] linkType=LinkType dst=[PatternPort|QualifiedID])
|
||||
*/
|
||||
protected void sequence_PatternLink(ISerializationContext context, PatternLink semanticObject) {
|
||||
if (errorAcceptor != null) {
|
||||
if (transientValues.isValueTransient(semanticObject, SeimPackage.Literals.LINK__SRC) == ValueTransient.YES)
|
||||
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SeimPackage.Literals.LINK__SRC));
|
||||
if (transientValues.isValueTransient(semanticObject, PseimPackage.Literals.PATTERN_LINK__LINK_TYPE) == ValueTransient.YES)
|
||||
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, PseimPackage.Literals.PATTERN_LINK__LINK_TYPE));
|
||||
if (transientValues.isValueTransient(semanticObject, SeimPackage.Literals.LINK__DST) == ValueTransient.YES)
|
||||
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SeimPackage.Literals.LINK__DST));
|
||||
}
|
||||
SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
|
||||
feeder.accept(grammarAccess.getPatternLinkAccess().getSrcPatternPortQualifiedIDParserRuleCall_0_0_1(), semanticObject.eGet(SeimPackage.Literals.LINK__SRC, false));
|
||||
feeder.accept(grammarAccess.getPatternLinkAccess().getLinkTypeLinkTypeEnumRuleCall_1_0(), semanticObject.getLinkType());
|
||||
feeder.accept(grammarAccess.getPatternLinkAccess().getDstPatternPortQualifiedIDParserRuleCall_2_0_1(), semanticObject.eGet(SeimPackage.Literals.LINK__DST, false));
|
||||
feeder.finish();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Contexts:
|
||||
* PatternPort returns PatternPort
|
||||
*
|
||||
* Constraint:
|
||||
* (dir=PatternPortDirection name=ID (multiplicityValue=INT | cardinalityElement=[CardinalityElement|ID])?)
|
||||
*/
|
||||
protected void sequence_PatternPort(ISerializationContext context, PatternPort semanticObject) {
|
||||
genericSequencer.createSequence(context, semanticObject);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Contexts:
|
||||
* Pattern returns Pattern
|
||||
*
|
||||
* Constraint:
|
||||
* (
|
||||
* name=ID
|
||||
* (cardinalityElements+=CardinalityElement cardinalityElements+=CardinalityElement*)?
|
||||
* (modelElements+=PatternComponent | modelElements+=PatternLink)*
|
||||
* )
|
||||
*/
|
||||
protected void sequence_Pattern(ISerializationContext context, Pattern semanticObject) {
|
||||
genericSequencer.createSequence(context, semanticObject);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
/*
|
||||
* generated by Xtext 2.12.0
|
||||
*/
|
||||
package com.irtsaintexupery.xtext.pseim.serializer;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.irtsaintexupery.xtext.pseim.services.PatternGrammarAccess;
|
||||
import java.util.List;
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
import org.eclipse.xtext.IGrammarAccess;
|
||||
import org.eclipse.xtext.RuleCall;
|
||||
import org.eclipse.xtext.nodemodel.INode;
|
||||
import org.eclipse.xtext.serializer.analysis.GrammarAlias.AbstractElementAlias;
|
||||
import org.eclipse.xtext.serializer.analysis.GrammarAlias.GroupAlias;
|
||||
import org.eclipse.xtext.serializer.analysis.GrammarAlias.TokenAlias;
|
||||
import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynNavigable;
|
||||
import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynTransition;
|
||||
import org.eclipse.xtext.serializer.sequencer.AbstractSyntacticSequencer;
|
||||
|
||||
@SuppressWarnings("all")
|
||||
public class PatternSyntacticSequencer extends AbstractSyntacticSequencer {
|
||||
|
||||
protected PatternGrammarAccess grammarAccess;
|
||||
protected AbstractElementAlias match_PatternComponent___LeftCurlyBracketKeyword_6_0_RightCurlyBracketKeyword_6_2__q;
|
||||
protected AbstractElementAlias match_Pattern___LeftCurlyBracketKeyword_5_0_RightCurlyBracketKeyword_5_2__q;
|
||||
|
||||
@Inject
|
||||
protected void init(IGrammarAccess access) {
|
||||
grammarAccess = (PatternGrammarAccess) access;
|
||||
match_PatternComponent___LeftCurlyBracketKeyword_6_0_RightCurlyBracketKeyword_6_2__q = new GroupAlias(false, true, new TokenAlias(false, false, grammarAccess.getPatternComponentAccess().getLeftCurlyBracketKeyword_6_0()), new TokenAlias(false, false, grammarAccess.getPatternComponentAccess().getRightCurlyBracketKeyword_6_2()));
|
||||
match_Pattern___LeftCurlyBracketKeyword_5_0_RightCurlyBracketKeyword_5_2__q = new GroupAlias(false, true, new TokenAlias(false, false, grammarAccess.getPatternAccess().getLeftCurlyBracketKeyword_5_0()), new TokenAlias(false, false, grammarAccess.getPatternAccess().getRightCurlyBracketKeyword_5_2()));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getUnassignedRuleCallToken(EObject semanticObject, RuleCall ruleCall, INode node) {
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void emitUnassignedTokens(EObject semanticObject, ISynTransition transition, INode fromNode, INode toNode) {
|
||||
if (transition.getAmbiguousSyntaxes().isEmpty()) return;
|
||||
List<INode> transitionNodes = collectNodes(fromNode, toNode);
|
||||
for (AbstractElementAlias syntax : transition.getAmbiguousSyntaxes()) {
|
||||
List<INode> syntaxNodes = getNodesFor(transitionNodes, syntax);
|
||||
if (match_PatternComponent___LeftCurlyBracketKeyword_6_0_RightCurlyBracketKeyword_6_2__q.equals(syntax))
|
||||
emit_PatternComponent___LeftCurlyBracketKeyword_6_0_RightCurlyBracketKeyword_6_2__q(semanticObject, getLastNavigableState(), syntaxNodes);
|
||||
else if (match_Pattern___LeftCurlyBracketKeyword_5_0_RightCurlyBracketKeyword_5_2__q.equals(syntax))
|
||||
emit_Pattern___LeftCurlyBracketKeyword_5_0_RightCurlyBracketKeyword_5_2__q(semanticObject, getLastNavigableState(), syntaxNodes);
|
||||
else acceptNodes(getLastNavigableState(), syntaxNodes);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Ambiguous syntax:
|
||||
* ('{' '}')?
|
||||
*
|
||||
* This ambiguous syntax occurs at:
|
||||
* cardinalityElement=[CardinalityElement|ID] ']' '(' ')' (ambiguity) (rule end)
|
||||
* content+=PatternPort ')' (ambiguity) (rule end)
|
||||
* multiplicityValue=INT ']' '(' ')' (ambiguity) (rule end)
|
||||
* name=ID '(' ')' (ambiguity) (rule end)
|
||||
*/
|
||||
protected void emit_PatternComponent___LeftCurlyBracketKeyword_6_0_RightCurlyBracketKeyword_6_2__q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
|
||||
acceptNodes(transition, nodes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Ambiguous syntax:
|
||||
* ('{' '}')?
|
||||
*
|
||||
* This ambiguous syntax occurs at:
|
||||
* cardinalityElements+=CardinalityElement ')' (ambiguity) (rule end)
|
||||
* name=ID '(' ')' (ambiguity) (rule end)
|
||||
*/
|
||||
protected void emit_Pattern___LeftCurlyBracketKeyword_5_0_RightCurlyBracketKeyword_5_2__q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
|
||||
acceptNodes(transition, nodes);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,734 @@
|
||||
/*
|
||||
* generated by Xtext 2.12.0
|
||||
*/
|
||||
package com.irtsaintexupery.xtext.pseim.services;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.Singleton;
|
||||
import java.util.List;
|
||||
import org.eclipse.xtext.Alternatives;
|
||||
import org.eclipse.xtext.Assignment;
|
||||
import org.eclipse.xtext.CrossReference;
|
||||
import org.eclipse.xtext.EnumLiteralDeclaration;
|
||||
import org.eclipse.xtext.EnumRule;
|
||||
import org.eclipse.xtext.Grammar;
|
||||
import org.eclipse.xtext.GrammarUtil;
|
||||
import org.eclipse.xtext.Group;
|
||||
import org.eclipse.xtext.Keyword;
|
||||
import org.eclipse.xtext.ParserRule;
|
||||
import org.eclipse.xtext.RuleCall;
|
||||
import org.eclipse.xtext.TerminalRule;
|
||||
import org.eclipse.xtext.common.services.TerminalsGrammarAccess;
|
||||
import org.eclipse.xtext.service.AbstractElementFinder.AbstractEnumRuleElementFinder;
|
||||
import org.eclipse.xtext.service.AbstractElementFinder.AbstractGrammarElementFinder;
|
||||
import org.eclipse.xtext.service.GrammarProvider;
|
||||
|
||||
@Singleton
|
||||
public class PatternGrammarAccess extends AbstractGrammarElementFinder {
|
||||
|
||||
public class PatternElements extends AbstractParserRuleElementFinder {
|
||||
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.irtsaintexupery.xtext.pseim.Pattern.Pattern");
|
||||
private final Group cGroup = (Group)rule.eContents().get(1);
|
||||
private final Keyword cPatternKeyword_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 Keyword cLeftParenthesisKeyword_2 = (Keyword)cGroup.eContents().get(2);
|
||||
private final Group cGroup_3 = (Group)cGroup.eContents().get(3);
|
||||
private final Assignment cCardinalityElementsAssignment_3_0 = (Assignment)cGroup_3.eContents().get(0);
|
||||
private final RuleCall cCardinalityElementsCardinalityElementParserRuleCall_3_0_0 = (RuleCall)cCardinalityElementsAssignment_3_0.eContents().get(0);
|
||||
private final Group cGroup_3_1 = (Group)cGroup_3.eContents().get(1);
|
||||
private final Keyword cCommaKeyword_3_1_0 = (Keyword)cGroup_3_1.eContents().get(0);
|
||||
private final Assignment cCardinalityElementsAssignment_3_1_1 = (Assignment)cGroup_3_1.eContents().get(1);
|
||||
private final RuleCall cCardinalityElementsCardinalityElementParserRuleCall_3_1_1_0 = (RuleCall)cCardinalityElementsAssignment_3_1_1.eContents().get(0);
|
||||
private final Keyword cRightParenthesisKeyword_4 = (Keyword)cGroup.eContents().get(4);
|
||||
private final Group cGroup_5 = (Group)cGroup.eContents().get(5);
|
||||
private final Keyword cLeftCurlyBracketKeyword_5_0 = (Keyword)cGroup_5.eContents().get(0);
|
||||
private final Alternatives cAlternatives_5_1 = (Alternatives)cGroup_5.eContents().get(1);
|
||||
private final Assignment cModelElementsAssignment_5_1_0 = (Assignment)cAlternatives_5_1.eContents().get(0);
|
||||
private final RuleCall cModelElementsPatternComponentParserRuleCall_5_1_0_0 = (RuleCall)cModelElementsAssignment_5_1_0.eContents().get(0);
|
||||
private final Assignment cModelElementsAssignment_5_1_1 = (Assignment)cAlternatives_5_1.eContents().get(1);
|
||||
private final RuleCall cModelElementsPatternLinkParserRuleCall_5_1_1_0 = (RuleCall)cModelElementsAssignment_5_1_1.eContents().get(0);
|
||||
private final Keyword cRightCurlyBracketKeyword_5_2 = (Keyword)cGroup_5.eContents().get(2);
|
||||
|
||||
//Pattern:
|
||||
// 'pattern' name=ID '(' (cardinalityElements+=CardinalityElement (',' cardinalityElements+=CardinalityElement)*)? ')'
|
||||
// ('{' (modelElements+=PatternComponent | modelElements+=PatternLink)*
|
||||
// '}')?;
|
||||
@Override public ParserRule getRule() { return rule; }
|
||||
|
||||
//'pattern' name=ID '(' (cardinalityElements+=CardinalityElement (',' cardinalityElements+=CardinalityElement)*)? ')' ('{'
|
||||
//(modelElements+=PatternComponent | modelElements+=PatternLink)* '}')?
|
||||
public Group getGroup() { return cGroup; }
|
||||
|
||||
//'pattern'
|
||||
public Keyword getPatternKeyword_0() { return cPatternKeyword_0; }
|
||||
|
||||
//name=ID
|
||||
public Assignment getNameAssignment_1() { return cNameAssignment_1; }
|
||||
|
||||
//ID
|
||||
public RuleCall getNameIDTerminalRuleCall_1_0() { return cNameIDTerminalRuleCall_1_0; }
|
||||
|
||||
//'('
|
||||
public Keyword getLeftParenthesisKeyword_2() { return cLeftParenthesisKeyword_2; }
|
||||
|
||||
//(cardinalityElements+=CardinalityElement (',' cardinalityElements+=CardinalityElement)*)?
|
||||
public Group getGroup_3() { return cGroup_3; }
|
||||
|
||||
//cardinalityElements+=CardinalityElement
|
||||
public Assignment getCardinalityElementsAssignment_3_0() { return cCardinalityElementsAssignment_3_0; }
|
||||
|
||||
//CardinalityElement
|
||||
public RuleCall getCardinalityElementsCardinalityElementParserRuleCall_3_0_0() { return cCardinalityElementsCardinalityElementParserRuleCall_3_0_0; }
|
||||
|
||||
//(',' cardinalityElements+=CardinalityElement)*
|
||||
public Group getGroup_3_1() { return cGroup_3_1; }
|
||||
|
||||
//','
|
||||
public Keyword getCommaKeyword_3_1_0() { return cCommaKeyword_3_1_0; }
|
||||
|
||||
//cardinalityElements+=CardinalityElement
|
||||
public Assignment getCardinalityElementsAssignment_3_1_1() { return cCardinalityElementsAssignment_3_1_1; }
|
||||
|
||||
//CardinalityElement
|
||||
public RuleCall getCardinalityElementsCardinalityElementParserRuleCall_3_1_1_0() { return cCardinalityElementsCardinalityElementParserRuleCall_3_1_1_0; }
|
||||
|
||||
//')'
|
||||
public Keyword getRightParenthesisKeyword_4() { return cRightParenthesisKeyword_4; }
|
||||
|
||||
//('{' (modelElements+=PatternComponent | modelElements+=PatternLink)* '}')?
|
||||
public Group getGroup_5() { return cGroup_5; }
|
||||
|
||||
//'{'
|
||||
public Keyword getLeftCurlyBracketKeyword_5_0() { return cLeftCurlyBracketKeyword_5_0; }
|
||||
|
||||
//(modelElements+=PatternComponent | modelElements+=PatternLink)*
|
||||
public Alternatives getAlternatives_5_1() { return cAlternatives_5_1; }
|
||||
|
||||
//modelElements+=PatternComponent
|
||||
public Assignment getModelElementsAssignment_5_1_0() { return cModelElementsAssignment_5_1_0; }
|
||||
|
||||
//PatternComponent
|
||||
public RuleCall getModelElementsPatternComponentParserRuleCall_5_1_0_0() { return cModelElementsPatternComponentParserRuleCall_5_1_0_0; }
|
||||
|
||||
//modelElements+=PatternLink
|
||||
public Assignment getModelElementsAssignment_5_1_1() { return cModelElementsAssignment_5_1_1; }
|
||||
|
||||
//PatternLink
|
||||
public RuleCall getModelElementsPatternLinkParserRuleCall_5_1_1_0() { return cModelElementsPatternLinkParserRuleCall_5_1_1_0; }
|
||||
|
||||
//'}'
|
||||
public Keyword getRightCurlyBracketKeyword_5_2() { return cRightCurlyBracketKeyword_5_2; }
|
||||
}
|
||||
public class PatternComponentElements extends AbstractParserRuleElementFinder {
|
||||
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.irtsaintexupery.xtext.pseim.Pattern.PatternComponent");
|
||||
private final Group cGroup = (Group)rule.eContents().get(1);
|
||||
private final Keyword cComponentKeyword_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 Group cGroup_2 = (Group)cGroup.eContents().get(2);
|
||||
private final Keyword cLeftSquareBracketKeyword_2_0 = (Keyword)cGroup_2.eContents().get(0);
|
||||
private final Alternatives cAlternatives_2_1 = (Alternatives)cGroup_2.eContents().get(1);
|
||||
private final Assignment cMultiplicityValueAssignment_2_1_0 = (Assignment)cAlternatives_2_1.eContents().get(0);
|
||||
private final RuleCall cMultiplicityValueINTTerminalRuleCall_2_1_0_0 = (RuleCall)cMultiplicityValueAssignment_2_1_0.eContents().get(0);
|
||||
private final Assignment cCardinalityElementAssignment_2_1_1 = (Assignment)cAlternatives_2_1.eContents().get(1);
|
||||
private final CrossReference cCardinalityElementCardinalityElementCrossReference_2_1_1_0 = (CrossReference)cCardinalityElementAssignment_2_1_1.eContents().get(0);
|
||||
private final RuleCall cCardinalityElementCardinalityElementIDTerminalRuleCall_2_1_1_0_1 = (RuleCall)cCardinalityElementCardinalityElementCrossReference_2_1_1_0.eContents().get(1);
|
||||
private final Keyword cRightSquareBracketKeyword_2_2 = (Keyword)cGroup_2.eContents().get(2);
|
||||
private final Keyword cLeftParenthesisKeyword_3 = (Keyword)cGroup.eContents().get(3);
|
||||
private final Group cGroup_4 = (Group)cGroup.eContents().get(4);
|
||||
private final Assignment cContentAssignment_4_0 = (Assignment)cGroup_4.eContents().get(0);
|
||||
private final RuleCall cContentPatternPortParserRuleCall_4_0_0 = (RuleCall)cContentAssignment_4_0.eContents().get(0);
|
||||
private final Group cGroup_4_1 = (Group)cGroup_4.eContents().get(1);
|
||||
private final Keyword cCommaKeyword_4_1_0 = (Keyword)cGroup_4_1.eContents().get(0);
|
||||
private final Assignment cContentAssignment_4_1_1 = (Assignment)cGroup_4_1.eContents().get(1);
|
||||
private final RuleCall cContentPatternPortParserRuleCall_4_1_1_0 = (RuleCall)cContentAssignment_4_1_1.eContents().get(0);
|
||||
private final Keyword cRightParenthesisKeyword_5 = (Keyword)cGroup.eContents().get(5);
|
||||
private final Group cGroup_6 = (Group)cGroup.eContents().get(6);
|
||||
private final Keyword cLeftCurlyBracketKeyword_6_0 = (Keyword)cGroup_6.eContents().get(0);
|
||||
private final Alternatives cAlternatives_6_1 = (Alternatives)cGroup_6.eContents().get(1);
|
||||
private final Assignment cContentAssignment_6_1_0 = (Assignment)cAlternatives_6_1.eContents().get(0);
|
||||
private final RuleCall cContentPatternComponentParserRuleCall_6_1_0_0 = (RuleCall)cContentAssignment_6_1_0.eContents().get(0);
|
||||
private final Assignment cContentAssignment_6_1_1 = (Assignment)cAlternatives_6_1.eContents().get(1);
|
||||
private final RuleCall cContentPatternLinkParserRuleCall_6_1_1_0 = (RuleCall)cContentAssignment_6_1_1.eContents().get(0);
|
||||
private final Keyword cRightCurlyBracketKeyword_6_2 = (Keyword)cGroup_6.eContents().get(2);
|
||||
|
||||
//PatternComponent:
|
||||
// 'component' name=ID ('[' (multiplicityValue=INT | cardinalityElement=[CardinalityElement]) ']')? '('
|
||||
// (content+=PatternPort (',' content+=PatternPort)*)? ')' ('{' (content+=PatternComponent | content+=PatternLink)*
|
||||
// '}')?;
|
||||
@Override public ParserRule getRule() { return rule; }
|
||||
|
||||
//'component' name=ID ('[' (multiplicityValue=INT | cardinalityElement=[CardinalityElement]) ']')? '('
|
||||
//(content+=PatternPort (',' content+=PatternPort)*)? ')' ('{' (content+=PatternComponent | content+=PatternLink)* '}')?
|
||||
public Group getGroup() { return cGroup; }
|
||||
|
||||
//'component'
|
||||
public Keyword getComponentKeyword_0() { return cComponentKeyword_0; }
|
||||
|
||||
//name=ID
|
||||
public Assignment getNameAssignment_1() { return cNameAssignment_1; }
|
||||
|
||||
//ID
|
||||
public RuleCall getNameIDTerminalRuleCall_1_0() { return cNameIDTerminalRuleCall_1_0; }
|
||||
|
||||
//('[' (multiplicityValue=INT | cardinalityElement=[CardinalityElement]) ']')?
|
||||
public Group getGroup_2() { return cGroup_2; }
|
||||
|
||||
//'['
|
||||
public Keyword getLeftSquareBracketKeyword_2_0() { return cLeftSquareBracketKeyword_2_0; }
|
||||
|
||||
//multiplicityValue=INT | cardinalityElement=[CardinalityElement]
|
||||
public Alternatives getAlternatives_2_1() { return cAlternatives_2_1; }
|
||||
|
||||
//multiplicityValue=INT
|
||||
public Assignment getMultiplicityValueAssignment_2_1_0() { return cMultiplicityValueAssignment_2_1_0; }
|
||||
|
||||
//INT
|
||||
public RuleCall getMultiplicityValueINTTerminalRuleCall_2_1_0_0() { return cMultiplicityValueINTTerminalRuleCall_2_1_0_0; }
|
||||
|
||||
//cardinalityElement=[CardinalityElement]
|
||||
public Assignment getCardinalityElementAssignment_2_1_1() { return cCardinalityElementAssignment_2_1_1; }
|
||||
|
||||
//[CardinalityElement]
|
||||
public CrossReference getCardinalityElementCardinalityElementCrossReference_2_1_1_0() { return cCardinalityElementCardinalityElementCrossReference_2_1_1_0; }
|
||||
|
||||
//ID
|
||||
public RuleCall getCardinalityElementCardinalityElementIDTerminalRuleCall_2_1_1_0_1() { return cCardinalityElementCardinalityElementIDTerminalRuleCall_2_1_1_0_1; }
|
||||
|
||||
//']'
|
||||
public Keyword getRightSquareBracketKeyword_2_2() { return cRightSquareBracketKeyword_2_2; }
|
||||
|
||||
//'('
|
||||
public Keyword getLeftParenthesisKeyword_3() { return cLeftParenthesisKeyword_3; }
|
||||
|
||||
//(content+=PatternPort (',' content+=PatternPort)*)?
|
||||
public Group getGroup_4() { return cGroup_4; }
|
||||
|
||||
//content+=PatternPort
|
||||
public Assignment getContentAssignment_4_0() { return cContentAssignment_4_0; }
|
||||
|
||||
//PatternPort
|
||||
public RuleCall getContentPatternPortParserRuleCall_4_0_0() { return cContentPatternPortParserRuleCall_4_0_0; }
|
||||
|
||||
//(',' content+=PatternPort)*
|
||||
public Group getGroup_4_1() { return cGroup_4_1; }
|
||||
|
||||
//','
|
||||
public Keyword getCommaKeyword_4_1_0() { return cCommaKeyword_4_1_0; }
|
||||
|
||||
//content+=PatternPort
|
||||
public Assignment getContentAssignment_4_1_1() { return cContentAssignment_4_1_1; }
|
||||
|
||||
//PatternPort
|
||||
public RuleCall getContentPatternPortParserRuleCall_4_1_1_0() { return cContentPatternPortParserRuleCall_4_1_1_0; }
|
||||
|
||||
//')'
|
||||
public Keyword getRightParenthesisKeyword_5() { return cRightParenthesisKeyword_5; }
|
||||
|
||||
//('{' (content+=PatternComponent | content+=PatternLink)* '}')?
|
||||
public Group getGroup_6() { return cGroup_6; }
|
||||
|
||||
//'{'
|
||||
public Keyword getLeftCurlyBracketKeyword_6_0() { return cLeftCurlyBracketKeyword_6_0; }
|
||||
|
||||
//(content+=PatternComponent | content+=PatternLink)*
|
||||
public Alternatives getAlternatives_6_1() { return cAlternatives_6_1; }
|
||||
|
||||
//content+=PatternComponent
|
||||
public Assignment getContentAssignment_6_1_0() { return cContentAssignment_6_1_0; }
|
||||
|
||||
//PatternComponent
|
||||
public RuleCall getContentPatternComponentParserRuleCall_6_1_0_0() { return cContentPatternComponentParserRuleCall_6_1_0_0; }
|
||||
|
||||
//content+=PatternLink
|
||||
public Assignment getContentAssignment_6_1_1() { return cContentAssignment_6_1_1; }
|
||||
|
||||
//PatternLink
|
||||
public RuleCall getContentPatternLinkParserRuleCall_6_1_1_0() { return cContentPatternLinkParserRuleCall_6_1_1_0; }
|
||||
|
||||
//'}'
|
||||
public Keyword getRightCurlyBracketKeyword_6_2() { return cRightCurlyBracketKeyword_6_2; }
|
||||
}
|
||||
public class PatternPortElements extends AbstractParserRuleElementFinder {
|
||||
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.irtsaintexupery.xtext.pseim.Pattern.PatternPort");
|
||||
private final Group cGroup = (Group)rule.eContents().get(1);
|
||||
private final Assignment cDirAssignment_0 = (Assignment)cGroup.eContents().get(0);
|
||||
private final RuleCall cDirPatternPortDirectionEnumRuleCall_0_0 = (RuleCall)cDirAssignment_0.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 Group cGroup_2 = (Group)cGroup.eContents().get(2);
|
||||
private final Keyword cLeftSquareBracketKeyword_2_0 = (Keyword)cGroup_2.eContents().get(0);
|
||||
private final Alternatives cAlternatives_2_1 = (Alternatives)cGroup_2.eContents().get(1);
|
||||
private final Assignment cMultiplicityValueAssignment_2_1_0 = (Assignment)cAlternatives_2_1.eContents().get(0);
|
||||
private final RuleCall cMultiplicityValueINTTerminalRuleCall_2_1_0_0 = (RuleCall)cMultiplicityValueAssignment_2_1_0.eContents().get(0);
|
||||
private final Assignment cCardinalityElementAssignment_2_1_1 = (Assignment)cAlternatives_2_1.eContents().get(1);
|
||||
private final CrossReference cCardinalityElementCardinalityElementCrossReference_2_1_1_0 = (CrossReference)cCardinalityElementAssignment_2_1_1.eContents().get(0);
|
||||
private final RuleCall cCardinalityElementCardinalityElementIDTerminalRuleCall_2_1_1_0_1 = (RuleCall)cCardinalityElementCardinalityElementCrossReference_2_1_1_0.eContents().get(1);
|
||||
private final Keyword cRightSquareBracketKeyword_2_2 = (Keyword)cGroup_2.eContents().get(2);
|
||||
|
||||
//PatternPort:
|
||||
// dir=PatternPortDirection name=ID ('[' (multiplicityValue=INT | cardinalityElement=[CardinalityElement]) ']')?;
|
||||
@Override public ParserRule getRule() { return rule; }
|
||||
|
||||
//dir=PatternPortDirection name=ID ('[' (multiplicityValue=INT | cardinalityElement=[CardinalityElement]) ']')?
|
||||
public Group getGroup() { return cGroup; }
|
||||
|
||||
//dir=PatternPortDirection
|
||||
public Assignment getDirAssignment_0() { return cDirAssignment_0; }
|
||||
|
||||
//PatternPortDirection
|
||||
public RuleCall getDirPatternPortDirectionEnumRuleCall_0_0() { return cDirPatternPortDirectionEnumRuleCall_0_0; }
|
||||
|
||||
//name=ID
|
||||
public Assignment getNameAssignment_1() { return cNameAssignment_1; }
|
||||
|
||||
//ID
|
||||
public RuleCall getNameIDTerminalRuleCall_1_0() { return cNameIDTerminalRuleCall_1_0; }
|
||||
|
||||
//('[' (multiplicityValue=INT | cardinalityElement=[CardinalityElement]) ']')?
|
||||
public Group getGroup_2() { return cGroup_2; }
|
||||
|
||||
//'['
|
||||
public Keyword getLeftSquareBracketKeyword_2_0() { return cLeftSquareBracketKeyword_2_0; }
|
||||
|
||||
//multiplicityValue=INT | cardinalityElement=[CardinalityElement]
|
||||
public Alternatives getAlternatives_2_1() { return cAlternatives_2_1; }
|
||||
|
||||
//multiplicityValue=INT
|
||||
public Assignment getMultiplicityValueAssignment_2_1_0() { return cMultiplicityValueAssignment_2_1_0; }
|
||||
|
||||
//INT
|
||||
public RuleCall getMultiplicityValueINTTerminalRuleCall_2_1_0_0() { return cMultiplicityValueINTTerminalRuleCall_2_1_0_0; }
|
||||
|
||||
//cardinalityElement=[CardinalityElement]
|
||||
public Assignment getCardinalityElementAssignment_2_1_1() { return cCardinalityElementAssignment_2_1_1; }
|
||||
|
||||
//[CardinalityElement]
|
||||
public CrossReference getCardinalityElementCardinalityElementCrossReference_2_1_1_0() { return cCardinalityElementCardinalityElementCrossReference_2_1_1_0; }
|
||||
|
||||
//ID
|
||||
public RuleCall getCardinalityElementCardinalityElementIDTerminalRuleCall_2_1_1_0_1() { return cCardinalityElementCardinalityElementIDTerminalRuleCall_2_1_1_0_1; }
|
||||
|
||||
//']'
|
||||
public Keyword getRightSquareBracketKeyword_2_2() { return cRightSquareBracketKeyword_2_2; }
|
||||
}
|
||||
public class CardinalityElementElements extends AbstractParserRuleElementFinder {
|
||||
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.irtsaintexupery.xtext.pseim.Pattern.CardinalityElement");
|
||||
private final Assignment cNameAssignment = (Assignment)rule.eContents().get(1);
|
||||
private final RuleCall cNameIDTerminalRuleCall_0 = (RuleCall)cNameAssignment.eContents().get(0);
|
||||
|
||||
//CardinalityElement:
|
||||
// name=ID;
|
||||
@Override public ParserRule getRule() { return rule; }
|
||||
|
||||
//name=ID
|
||||
public Assignment getNameAssignment() { return cNameAssignment; }
|
||||
|
||||
//ID
|
||||
public RuleCall getNameIDTerminalRuleCall_0() { return cNameIDTerminalRuleCall_0; }
|
||||
}
|
||||
public class PatternLinkElements extends AbstractParserRuleElementFinder {
|
||||
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.irtsaintexupery.xtext.pseim.Pattern.PatternLink");
|
||||
private final Group cGroup = (Group)rule.eContents().get(1);
|
||||
private final Assignment cSrcAssignment_0 = (Assignment)cGroup.eContents().get(0);
|
||||
private final CrossReference cSrcPatternPortCrossReference_0_0 = (CrossReference)cSrcAssignment_0.eContents().get(0);
|
||||
private final RuleCall cSrcPatternPortQualifiedIDParserRuleCall_0_0_1 = (RuleCall)cSrcPatternPortCrossReference_0_0.eContents().get(1);
|
||||
private final Assignment cLinkTypeAssignment_1 = (Assignment)cGroup.eContents().get(1);
|
||||
private final RuleCall cLinkTypeLinkTypeEnumRuleCall_1_0 = (RuleCall)cLinkTypeAssignment_1.eContents().get(0);
|
||||
private final Assignment cDstAssignment_2 = (Assignment)cGroup.eContents().get(2);
|
||||
private final CrossReference cDstPatternPortCrossReference_2_0 = (CrossReference)cDstAssignment_2.eContents().get(0);
|
||||
private final RuleCall cDstPatternPortQualifiedIDParserRuleCall_2_0_1 = (RuleCall)cDstPatternPortCrossReference_2_0.eContents().get(1);
|
||||
|
||||
//PatternLink:
|
||||
// src=[PatternPort|QualifiedID] linkType=LinkType dst=[PatternPort|QualifiedID];
|
||||
@Override public ParserRule getRule() { return rule; }
|
||||
|
||||
//src=[PatternPort|QualifiedID] linkType=LinkType dst=[PatternPort|QualifiedID]
|
||||
public Group getGroup() { return cGroup; }
|
||||
|
||||
//src=[PatternPort|QualifiedID]
|
||||
public Assignment getSrcAssignment_0() { return cSrcAssignment_0; }
|
||||
|
||||
//[PatternPort|QualifiedID]
|
||||
public CrossReference getSrcPatternPortCrossReference_0_0() { return cSrcPatternPortCrossReference_0_0; }
|
||||
|
||||
//QualifiedID
|
||||
public RuleCall getSrcPatternPortQualifiedIDParserRuleCall_0_0_1() { return cSrcPatternPortQualifiedIDParserRuleCall_0_0_1; }
|
||||
|
||||
//linkType=LinkType
|
||||
public Assignment getLinkTypeAssignment_1() { return cLinkTypeAssignment_1; }
|
||||
|
||||
//LinkType
|
||||
public RuleCall getLinkTypeLinkTypeEnumRuleCall_1_0() { return cLinkTypeLinkTypeEnumRuleCall_1_0; }
|
||||
|
||||
//dst=[PatternPort|QualifiedID]
|
||||
public Assignment getDstAssignment_2() { return cDstAssignment_2; }
|
||||
|
||||
//[PatternPort|QualifiedID]
|
||||
public CrossReference getDstPatternPortCrossReference_2_0() { return cDstPatternPortCrossReference_2_0; }
|
||||
|
||||
//QualifiedID
|
||||
public RuleCall getDstPatternPortQualifiedIDParserRuleCall_2_0_1() { return cDstPatternPortQualifiedIDParserRuleCall_2_0_1; }
|
||||
}
|
||||
public class QualifiedIDElements extends AbstractParserRuleElementFinder {
|
||||
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.irtsaintexupery.xtext.pseim.Pattern.QualifiedID");
|
||||
private final Group cGroup = (Group)rule.eContents().get(1);
|
||||
private final RuleCall cIDTerminalRuleCall_0 = (RuleCall)cGroup.eContents().get(0);
|
||||
private final Group cGroup_1 = (Group)cGroup.eContents().get(1);
|
||||
private final Keyword cFullStopKeyword_1_0 = (Keyword)cGroup_1.eContents().get(0);
|
||||
private final RuleCall cIDTerminalRuleCall_1_1 = (RuleCall)cGroup_1.eContents().get(1);
|
||||
|
||||
//QualifiedID:
|
||||
// ID ('.' ID)*;
|
||||
@Override public ParserRule getRule() { return rule; }
|
||||
|
||||
//ID ('.' ID)*
|
||||
public Group getGroup() { return cGroup; }
|
||||
|
||||
//ID
|
||||
public RuleCall getIDTerminalRuleCall_0() { return cIDTerminalRuleCall_0; }
|
||||
|
||||
//('.' ID)*
|
||||
public Group getGroup_1() { return cGroup_1; }
|
||||
|
||||
//'.'
|
||||
public Keyword getFullStopKeyword_1_0() { return cFullStopKeyword_1_0; }
|
||||
|
||||
//ID
|
||||
public RuleCall getIDTerminalRuleCall_1_1() { return cIDTerminalRuleCall_1_1; }
|
||||
}
|
||||
|
||||
public class PatternPortDirectionElements extends AbstractEnumRuleElementFinder {
|
||||
private final EnumRule rule = (EnumRule) GrammarUtil.findRuleForName(getGrammar(), "com.irtsaintexupery.xtext.pseim.Pattern.PatternPortDirection");
|
||||
private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1);
|
||||
private final EnumLiteralDeclaration cUNSPECIFIEDEnumLiteralDeclaration_0 = (EnumLiteralDeclaration)cAlternatives.eContents().get(0);
|
||||
private final Keyword cUNSPECIFIEDUnspecKeyword_0_0 = (Keyword)cUNSPECIFIEDEnumLiteralDeclaration_0.eContents().get(0);
|
||||
private final EnumLiteralDeclaration cINEnumLiteralDeclaration_1 = (EnumLiteralDeclaration)cAlternatives.eContents().get(1);
|
||||
private final Keyword cINInKeyword_1_0 = (Keyword)cINEnumLiteralDeclaration_1.eContents().get(0);
|
||||
private final EnumLiteralDeclaration cOUTEnumLiteralDeclaration_2 = (EnumLiteralDeclaration)cAlternatives.eContents().get(2);
|
||||
private final Keyword cOUTOutKeyword_2_0 = (Keyword)cOUTEnumLiteralDeclaration_2.eContents().get(0);
|
||||
private final EnumLiteralDeclaration cINOUTEnumLiteralDeclaration_3 = (EnumLiteralDeclaration)cAlternatives.eContents().get(3);
|
||||
private final Keyword cINOUTInoutKeyword_3_0 = (Keyword)cINOUTEnumLiteralDeclaration_3.eContents().get(0);
|
||||
|
||||
//enum PatternPortDirection:
|
||||
// UNSPECIFIED='unspec' | IN='in' | OUT='out' | INOUT='inout';
|
||||
public EnumRule getRule() { return rule; }
|
||||
|
||||
//UNSPECIFIED='unspec' | IN='in' | OUT='out' | INOUT='inout'
|
||||
public Alternatives getAlternatives() { return cAlternatives; }
|
||||
|
||||
//UNSPECIFIED='unspec'
|
||||
public EnumLiteralDeclaration getUNSPECIFIEDEnumLiteralDeclaration_0() { return cUNSPECIFIEDEnumLiteralDeclaration_0; }
|
||||
|
||||
//'unspec'
|
||||
public Keyword getUNSPECIFIEDUnspecKeyword_0_0() { return cUNSPECIFIEDUnspecKeyword_0_0; }
|
||||
|
||||
//IN='in'
|
||||
public EnumLiteralDeclaration getINEnumLiteralDeclaration_1() { return cINEnumLiteralDeclaration_1; }
|
||||
|
||||
//'in'
|
||||
public Keyword getINInKeyword_1_0() { return cINInKeyword_1_0; }
|
||||
|
||||
//OUT='out'
|
||||
public EnumLiteralDeclaration getOUTEnumLiteralDeclaration_2() { return cOUTEnumLiteralDeclaration_2; }
|
||||
|
||||
//'out'
|
||||
public Keyword getOUTOutKeyword_2_0() { return cOUTOutKeyword_2_0; }
|
||||
|
||||
//INOUT='inout'
|
||||
public EnumLiteralDeclaration getINOUTEnumLiteralDeclaration_3() { return cINOUTEnumLiteralDeclaration_3; }
|
||||
|
||||
//'inout'
|
||||
public Keyword getINOUTInoutKeyword_3_0() { return cINOUTInoutKeyword_3_0; }
|
||||
}
|
||||
public class LinkTypeElements extends AbstractEnumRuleElementFinder {
|
||||
private final EnumRule rule = (EnumRule) GrammarUtil.findRuleForName(getGrammar(), "com.irtsaintexupery.xtext.pseim.Pattern.LinkType");
|
||||
private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1);
|
||||
private final EnumLiteralDeclaration cTRANSPOSEEnumLiteralDeclaration_0 = (EnumLiteralDeclaration)cAlternatives.eContents().get(0);
|
||||
private final Keyword cTRANSPOSETransposeKeyword_0_0 = (Keyword)cTRANSPOSEEnumLiteralDeclaration_0.eContents().get(0);
|
||||
private final EnumLiteralDeclaration cIDENTITYEnumLiteralDeclaration_1 = (EnumLiteralDeclaration)cAlternatives.eContents().get(1);
|
||||
private final Keyword cIDENTITYIdentityKeyword_1_0 = (Keyword)cIDENTITYEnumLiteralDeclaration_1.eContents().get(0);
|
||||
private final EnumLiteralDeclaration cFIRSTEnumLiteralDeclaration_2 = (EnumLiteralDeclaration)cAlternatives.eContents().get(2);
|
||||
private final Keyword cFIRSTFirstKeyword_2_0 = (Keyword)cFIRSTEnumLiteralDeclaration_2.eContents().get(0);
|
||||
private final EnumLiteralDeclaration cROTATEEnumLiteralDeclaration_3 = (EnumLiteralDeclaration)cAlternatives.eContents().get(3);
|
||||
private final Keyword cROTATERotateKeyword_3_0 = (Keyword)cROTATEEnumLiteralDeclaration_3.eContents().get(0);
|
||||
private final EnumLiteralDeclaration cSHIFTEnumLiteralDeclaration_4 = (EnumLiteralDeclaration)cAlternatives.eContents().get(4);
|
||||
private final Keyword cSHIFTShiftKeyword_4_0 = (Keyword)cSHIFTEnumLiteralDeclaration_4.eContents().get(0);
|
||||
|
||||
//enum LinkType:
|
||||
// TRANSPOSE='-{Transpose}->' | IDENTITY='-{Identity}->' | FIRST='-{First}->' | ROTATE='-{Rotate}->' |
|
||||
// SHIFT='-{Shift}->';
|
||||
public EnumRule getRule() { return rule; }
|
||||
|
||||
//TRANSPOSE='-{Transpose}->' | IDENTITY='-{Identity}->' | FIRST='-{First}->' | ROTATE='-{Rotate}->' | SHIFT='-{Shift}->'
|
||||
public Alternatives getAlternatives() { return cAlternatives; }
|
||||
|
||||
//TRANSPOSE='-{Transpose}->'
|
||||
public EnumLiteralDeclaration getTRANSPOSEEnumLiteralDeclaration_0() { return cTRANSPOSEEnumLiteralDeclaration_0; }
|
||||
|
||||
//'-{Transpose}->'
|
||||
public Keyword getTRANSPOSETransposeKeyword_0_0() { return cTRANSPOSETransposeKeyword_0_0; }
|
||||
|
||||
//IDENTITY='-{Identity}->'
|
||||
public EnumLiteralDeclaration getIDENTITYEnumLiteralDeclaration_1() { return cIDENTITYEnumLiteralDeclaration_1; }
|
||||
|
||||
//'-{Identity}->'
|
||||
public Keyword getIDENTITYIdentityKeyword_1_0() { return cIDENTITYIdentityKeyword_1_0; }
|
||||
|
||||
//FIRST='-{First}->'
|
||||
public EnumLiteralDeclaration getFIRSTEnumLiteralDeclaration_2() { return cFIRSTEnumLiteralDeclaration_2; }
|
||||
|
||||
//'-{First}->'
|
||||
public Keyword getFIRSTFirstKeyword_2_0() { return cFIRSTFirstKeyword_2_0; }
|
||||
|
||||
//ROTATE='-{Rotate}->'
|
||||
public EnumLiteralDeclaration getROTATEEnumLiteralDeclaration_3() { return cROTATEEnumLiteralDeclaration_3; }
|
||||
|
||||
//'-{Rotate}->'
|
||||
public Keyword getROTATERotateKeyword_3_0() { return cROTATERotateKeyword_3_0; }
|
||||
|
||||
//SHIFT='-{Shift}->'
|
||||
public EnumLiteralDeclaration getSHIFTEnumLiteralDeclaration_4() { return cSHIFTEnumLiteralDeclaration_4; }
|
||||
|
||||
//'-{Shift}->'
|
||||
public Keyword getSHIFTShiftKeyword_4_0() { return cSHIFTShiftKeyword_4_0; }
|
||||
}
|
||||
public class PortDirectionElements extends AbstractEnumRuleElementFinder {
|
||||
private final EnumRule rule = (EnumRule) GrammarUtil.findRuleForName(getGrammar(), "com.irtsaintexupery.xtext.pseim.Pattern.PortDirection");
|
||||
private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1);
|
||||
private final EnumLiteralDeclaration cUNSPECIFIEDEnumLiteralDeclaration_0 = (EnumLiteralDeclaration)cAlternatives.eContents().get(0);
|
||||
private final Keyword cUNSPECIFIEDUnspecKeyword_0_0 = (Keyword)cUNSPECIFIEDEnumLiteralDeclaration_0.eContents().get(0);
|
||||
private final EnumLiteralDeclaration cINEnumLiteralDeclaration_1 = (EnumLiteralDeclaration)cAlternatives.eContents().get(1);
|
||||
private final Keyword cINInKeyword_1_0 = (Keyword)cINEnumLiteralDeclaration_1.eContents().get(0);
|
||||
private final EnumLiteralDeclaration cOUTEnumLiteralDeclaration_2 = (EnumLiteralDeclaration)cAlternatives.eContents().get(2);
|
||||
private final Keyword cOUTOutKeyword_2_0 = (Keyword)cOUTEnumLiteralDeclaration_2.eContents().get(0);
|
||||
private final EnumLiteralDeclaration cINOUTEnumLiteralDeclaration_3 = (EnumLiteralDeclaration)cAlternatives.eContents().get(3);
|
||||
private final Keyword cINOUTInoutKeyword_3_0 = (Keyword)cINOUTEnumLiteralDeclaration_3.eContents().get(0);
|
||||
|
||||
//enum PortDirection returns seim::PortDirection:
|
||||
// UNSPECIFIED='unspec' | IN='in' | OUT='out' | INOUT='inout';
|
||||
public EnumRule getRule() { return rule; }
|
||||
|
||||
//UNSPECIFIED='unspec' | IN='in' | OUT='out' | INOUT='inout'
|
||||
public Alternatives getAlternatives() { return cAlternatives; }
|
||||
|
||||
//UNSPECIFIED='unspec'
|
||||
public EnumLiteralDeclaration getUNSPECIFIEDEnumLiteralDeclaration_0() { return cUNSPECIFIEDEnumLiteralDeclaration_0; }
|
||||
|
||||
//'unspec'
|
||||
public Keyword getUNSPECIFIEDUnspecKeyword_0_0() { return cUNSPECIFIEDUnspecKeyword_0_0; }
|
||||
|
||||
//IN='in'
|
||||
public EnumLiteralDeclaration getINEnumLiteralDeclaration_1() { return cINEnumLiteralDeclaration_1; }
|
||||
|
||||
//'in'
|
||||
public Keyword getINInKeyword_1_0() { return cINInKeyword_1_0; }
|
||||
|
||||
//OUT='out'
|
||||
public EnumLiteralDeclaration getOUTEnumLiteralDeclaration_2() { return cOUTEnumLiteralDeclaration_2; }
|
||||
|
||||
//'out'
|
||||
public Keyword getOUTOutKeyword_2_0() { return cOUTOutKeyword_2_0; }
|
||||
|
||||
//INOUT='inout'
|
||||
public EnumLiteralDeclaration getINOUTEnumLiteralDeclaration_3() { return cINOUTEnumLiteralDeclaration_3; }
|
||||
|
||||
//'inout'
|
||||
public Keyword getINOUTInoutKeyword_3_0() { return cINOUTInoutKeyword_3_0; }
|
||||
}
|
||||
|
||||
private final PatternElements pPattern;
|
||||
private final PatternComponentElements pPatternComponent;
|
||||
private final PatternPortElements pPatternPort;
|
||||
private final PatternPortDirectionElements ePatternPortDirection;
|
||||
private final CardinalityElementElements pCardinalityElement;
|
||||
private final PatternLinkElements pPatternLink;
|
||||
private final LinkTypeElements eLinkType;
|
||||
private final PortDirectionElements ePortDirection;
|
||||
private final QualifiedIDElements pQualifiedID;
|
||||
|
||||
private final Grammar grammar;
|
||||
|
||||
private final TerminalsGrammarAccess gaTerminals;
|
||||
|
||||
@Inject
|
||||
public PatternGrammarAccess(GrammarProvider grammarProvider,
|
||||
TerminalsGrammarAccess gaTerminals) {
|
||||
this.grammar = internalFindGrammar(grammarProvider);
|
||||
this.gaTerminals = gaTerminals;
|
||||
this.pPattern = new PatternElements();
|
||||
this.pPatternComponent = new PatternComponentElements();
|
||||
this.pPatternPort = new PatternPortElements();
|
||||
this.ePatternPortDirection = new PatternPortDirectionElements();
|
||||
this.pCardinalityElement = new CardinalityElementElements();
|
||||
this.pPatternLink = new PatternLinkElements();
|
||||
this.eLinkType = new LinkTypeElements();
|
||||
this.ePortDirection = new PortDirectionElements();
|
||||
this.pQualifiedID = new QualifiedIDElements();
|
||||
}
|
||||
|
||||
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) {
|
||||
Grammar grammar = grammarProvider.getGrammar(this);
|
||||
while (grammar != null) {
|
||||
if ("com.irtsaintexupery.xtext.pseim.Pattern".equals(grammar.getName())) {
|
||||
return grammar;
|
||||
}
|
||||
List<Grammar> grammars = grammar.getUsedGrammars();
|
||||
if (!grammars.isEmpty()) {
|
||||
grammar = grammars.iterator().next();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return grammar;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Grammar getGrammar() {
|
||||
return grammar;
|
||||
}
|
||||
|
||||
|
||||
public TerminalsGrammarAccess getTerminalsGrammarAccess() {
|
||||
return gaTerminals;
|
||||
}
|
||||
|
||||
|
||||
//Pattern:
|
||||
// 'pattern' name=ID '(' (cardinalityElements+=CardinalityElement (',' cardinalityElements+=CardinalityElement)*)? ')'
|
||||
// ('{' (modelElements+=PatternComponent | modelElements+=PatternLink)*
|
||||
// '}')?;
|
||||
public PatternElements getPatternAccess() {
|
||||
return pPattern;
|
||||
}
|
||||
|
||||
public ParserRule getPatternRule() {
|
||||
return getPatternAccess().getRule();
|
||||
}
|
||||
|
||||
//PatternComponent:
|
||||
// 'component' name=ID ('[' (multiplicityValue=INT | cardinalityElement=[CardinalityElement]) ']')? '('
|
||||
// (content+=PatternPort (',' content+=PatternPort)*)? ')' ('{' (content+=PatternComponent | content+=PatternLink)*
|
||||
// '}')?;
|
||||
public PatternComponentElements getPatternComponentAccess() {
|
||||
return pPatternComponent;
|
||||
}
|
||||
|
||||
public ParserRule getPatternComponentRule() {
|
||||
return getPatternComponentAccess().getRule();
|
||||
}
|
||||
|
||||
//PatternPort:
|
||||
// dir=PatternPortDirection name=ID ('[' (multiplicityValue=INT | cardinalityElement=[CardinalityElement]) ']')?;
|
||||
public PatternPortElements getPatternPortAccess() {
|
||||
return pPatternPort;
|
||||
}
|
||||
|
||||
public ParserRule getPatternPortRule() {
|
||||
return getPatternPortAccess().getRule();
|
||||
}
|
||||
|
||||
//enum PatternPortDirection:
|
||||
// UNSPECIFIED='unspec' | IN='in' | OUT='out' | INOUT='inout';
|
||||
public PatternPortDirectionElements getPatternPortDirectionAccess() {
|
||||
return ePatternPortDirection;
|
||||
}
|
||||
|
||||
public EnumRule getPatternPortDirectionRule() {
|
||||
return getPatternPortDirectionAccess().getRule();
|
||||
}
|
||||
|
||||
//CardinalityElement:
|
||||
// name=ID;
|
||||
public CardinalityElementElements getCardinalityElementAccess() {
|
||||
return pCardinalityElement;
|
||||
}
|
||||
|
||||
public ParserRule getCardinalityElementRule() {
|
||||
return getCardinalityElementAccess().getRule();
|
||||
}
|
||||
|
||||
//PatternLink:
|
||||
// src=[PatternPort|QualifiedID] linkType=LinkType dst=[PatternPort|QualifiedID];
|
||||
public PatternLinkElements getPatternLinkAccess() {
|
||||
return pPatternLink;
|
||||
}
|
||||
|
||||
public ParserRule getPatternLinkRule() {
|
||||
return getPatternLinkAccess().getRule();
|
||||
}
|
||||
|
||||
//enum LinkType:
|
||||
// TRANSPOSE='-{Transpose}->' | IDENTITY='-{Identity}->' | FIRST='-{First}->' | ROTATE='-{Rotate}->' |
|
||||
// SHIFT='-{Shift}->';
|
||||
public LinkTypeElements getLinkTypeAccess() {
|
||||
return eLinkType;
|
||||
}
|
||||
|
||||
public EnumRule getLinkTypeRule() {
|
||||
return getLinkTypeAccess().getRule();
|
||||
}
|
||||
|
||||
//enum PortDirection returns seim::PortDirection:
|
||||
// UNSPECIFIED='unspec' | IN='in' | OUT='out' | INOUT='inout';
|
||||
public PortDirectionElements getPortDirectionAccess() {
|
||||
return ePortDirection;
|
||||
}
|
||||
|
||||
public EnumRule getPortDirectionRule() {
|
||||
return getPortDirectionAccess().getRule();
|
||||
}
|
||||
|
||||
//QualifiedID:
|
||||
// ID ('.' ID)*;
|
||||
public QualifiedIDElements getQualifiedIDAccess() {
|
||||
return pQualifiedID;
|
||||
}
|
||||
|
||||
public ParserRule getQualifiedIDRule() {
|
||||
return getQualifiedIDAccess().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:
|
||||
// '"' ('\\' . | !('\\' | '"'))* '"' | "'" ('\\' . | !('\\' | "'"))* "'";
|
||||
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();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* generated by Xtext 2.12.0
|
||||
*/
|
||||
package com.irtsaintexupery.xtext.pseim.validation;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.eclipse.emf.ecore.EPackage;
|
||||
import org.eclipse.xtext.validation.AbstractDeclarativeValidator;
|
||||
|
||||
public abstract class AbstractPatternValidator extends AbstractDeclarativeValidator {
|
||||
|
||||
@Override
|
||||
protected List<EPackage> getEPackages() {
|
||||
List<EPackage> result = new ArrayList<EPackage>();
|
||||
result.add(EPackage.Registry.INSTANCE.getEPackage("http://www.irt-saintexupery.com/pseim/0.1"));
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
module com.irtsaintexupery.xtext.pseim.GeneratePattern
|
||||
|
||||
import org.eclipse.xtext.xtext.generator.*
|
||||
import org.eclipse.xtext.xtext.generator.model.project.*
|
||||
|
||||
var rootPath = ".."
|
||||
|
||||
Workflow {
|
||||
|
||||
component = XtextGenerator {
|
||||
configuration = {
|
||||
project = StandardProjectConfig {
|
||||
baseName = "com.irtsaintexupery.xtext.pseim.pattern"
|
||||
rootPath = rootPath
|
||||
eclipsePlugin = {
|
||||
enabled = true
|
||||
}
|
||||
createEclipseMetaData = true
|
||||
}
|
||||
code = {
|
||||
encoding = "UTF-8"
|
||||
lineDelimiter = "\r\n"
|
||||
fileHeader = "/*\n * generated by Xtext \${version}\n */"
|
||||
}
|
||||
}
|
||||
language = StandardLanguage {
|
||||
name = "com.irtsaintexupery.xtext.pseim.Pattern"
|
||||
fileExtensions = "pseimx"
|
||||
referencedResource = "platform:/resource/com.irtsaintexupery.modelpattern/model/pseim.genmodel"
|
||||
referencedResource = "platform:/resource/com.irtsaintexupery.modelpattern/model/seim.genmodel"
|
||||
|
||||
fragment = ecore2xtext.Ecore2XtextValueConverterServiceFragment2 auto-inject {}
|
||||
|
||||
formatter = {
|
||||
generateStub = true
|
||||
}
|
||||
|
||||
serializer = {
|
||||
generateStub = false
|
||||
}
|
||||
validator = {
|
||||
// composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
grammar com.irtsaintexupery.xtext.pseim.Pattern with org.eclipse.xtext.common.Terminals
|
||||
|
||||
import "http://www.eclipse.org/emf/2002/Ecore" as ecore
|
||||
import "http://www.irt-saintexupery.com/seim/0.1" as seim
|
||||
import "http://www.irt-saintexupery.com/pseim/0.1"
|
||||
|
||||
Pattern returns Pattern:
|
||||
'pattern' name=ID '(' (cardinalityElements+=CardinalityElement (',' cardinalityElements+=CardinalityElement)*)? ')'
|
||||
('{'
|
||||
(
|
||||
modelElements+=PatternComponent |
|
||||
modelElements+=PatternLink
|
||||
)*
|
||||
'}')?;
|
||||
|
||||
PatternComponent returns PatternComponent:
|
||||
'component' name=ID ('[' (multiplicityValue=INT | cardinalityElement=[CardinalityElement]) ']')? '(' (content+=PatternPort (',' content+=PatternPort)*)? ')'
|
||||
('{'
|
||||
(
|
||||
content+=PatternComponent |
|
||||
content+=PatternLink
|
||||
)*
|
||||
'}')?;
|
||||
|
||||
PatternPort returns PatternPort:
|
||||
dir=PatternPortDirection name=ID ('[' (multiplicityValue=INT | cardinalityElement=[CardinalityElement]) ']')?
|
||||
;
|
||||
|
||||
enum PatternPortDirection returns PatternPortDirection:
|
||||
UNSPECIFIED = 'unspec' | IN = 'in' | OUT = 'out' | INOUT = 'inout';
|
||||
|
||||
CardinalityElement returns CardinalityElement:
|
||||
name=ID
|
||||
;
|
||||
|
||||
PatternLink returns PatternLink:
|
||||
src=[PatternPort|QualifiedID] linkType=LinkType dst=[PatternPort|QualifiedID]
|
||||
;
|
||||
|
||||
enum LinkType returns LinkType:
|
||||
TRANSPOSE = '-{Transpose}->' | IDENTITY = '-{Identity}->' | FIRST = '-{First}->' | ROTATE = '-{Rotate}->' | SHIFT = '-{Shift}->'
|
||||
;
|
||||
|
||||
enum PortDirection returns seim::PortDirection:
|
||||
UNSPECIFIED = 'unspec' | IN = 'in' | OUT = 'out' | INOUT = 'inout'
|
||||
;
|
||||
|
||||
QualifiedID:
|
||||
ID('.'ID)*
|
||||
;
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
* generated by Xtext 2.12.0
|
||||
*/
|
||||
package com.irtsaintexupery.xtext.pseim
|
||||
|
||||
|
||||
/**
|
||||
* Use this class to register components to be used at runtime / without the Equinox extension registry.
|
||||
*/
|
||||
class PatternRuntimeModule extends AbstractPatternRuntimeModule {
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* generated by Xtext 2.12.0
|
||||
*/
|
||||
package com.irtsaintexupery.xtext.pseim
|
||||
|
||||
|
||||
/**
|
||||
* Initialization support for running Xtext languages without Equinox extension registry.
|
||||
*/
|
||||
class PatternStandaloneSetup extends PatternStandaloneSetupGenerated {
|
||||
|
||||
def static void doSetup() {
|
||||
new PatternStandaloneSetup().createInjectorAndDoEMFRegistration()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* generated by Xtext 2.12.0
|
||||
*/
|
||||
package com.irtsaintexupery.xtext.pseim.formatting2
|
||||
|
||||
import com.google.inject.Inject
|
||||
import com.irtsaintexupery.pseim.pseim.CardinalityElement
|
||||
import com.irtsaintexupery.pseim.pseim.Pattern
|
||||
import com.irtsaintexupery.pseim.pseim.PatternComponent
|
||||
import com.irtsaintexupery.pseim.seim.Element
|
||||
import com.irtsaintexupery.pseim.seim.GraphElement
|
||||
import com.irtsaintexupery.xtext.pseim.services.PatternGrammarAccess
|
||||
import org.eclipse.xtext.formatting2.AbstractFormatter2
|
||||
import org.eclipse.xtext.formatting2.IFormattableDocument
|
||||
|
||||
class PatternFormatter extends AbstractFormatter2 {
|
||||
|
||||
@Inject extension PatternGrammarAccess
|
||||
|
||||
def dispatch void format(Pattern pattern, extension IFormattableDocument document) {
|
||||
// TODO: format HiddenRegions around keywords, attributes, cross references, etc.
|
||||
for (CardinalityElement cardinalityElement : pattern.getCardinalityElements()) {
|
||||
cardinalityElement.format;
|
||||
}
|
||||
for (GraphElement graphElement : pattern.getModelElements()) {
|
||||
graphElement.format;
|
||||
}
|
||||
}
|
||||
|
||||
def dispatch void format(PatternComponent patternComponent, extension IFormattableDocument document) {
|
||||
// TODO: format HiddenRegions around keywords, attributes, cross references, etc.
|
||||
for (Element element : patternComponent.getContent()) {
|
||||
element.format;
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: implement for
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* generated by Xtext 2.12.0
|
||||
*/
|
||||
package com.irtsaintexupery.xtext.pseim.generator
|
||||
|
||||
import org.eclipse.emf.ecore.resource.Resource
|
||||
import org.eclipse.xtext.generator.AbstractGenerator
|
||||
import org.eclipse.xtext.generator.IFileSystemAccess2
|
||||
import org.eclipse.xtext.generator.IGeneratorContext
|
||||
|
||||
/**
|
||||
* Generates code from your model files on save.
|
||||
*
|
||||
* See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#code-generation
|
||||
*/
|
||||
class PatternGenerator extends AbstractGenerator {
|
||||
|
||||
override void doGenerate(Resource resource, IFileSystemAccess2 fsa, IGeneratorContext context) {
|
||||
// fsa.generateFile('greetings.txt', 'People to greet: ' +
|
||||
// resource.allContents
|
||||
// .filter(Greeting)
|
||||
// .map[name]
|
||||
// .join(', '))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* generated by Xtext 2.12.0
|
||||
*/
|
||||
package com.irtsaintexupery.xtext.pseim.scoping
|
||||
|
||||
|
||||
/**
|
||||
* This class contains custom scoping description.
|
||||
*
|
||||
* See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#scoping
|
||||
* on how and when to use it.
|
||||
*/
|
||||
class PatternScopeProvider extends AbstractPatternScopeProvider {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* generated by Xtext 2.12.0
|
||||
*/
|
||||
package com.irtsaintexupery.xtext.pseim.validation
|
||||
|
||||
|
||||
/**
|
||||
* This class contains custom validation rules.
|
||||
*
|
||||
* See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#validation
|
||||
*/
|
||||
class PatternValidator extends AbstractPatternValidator {
|
||||
|
||||
// public static val INVALID_NAME = 'invalidName'
|
||||
//
|
||||
// @Check
|
||||
// def checkGreetingStartsWithCapital(Greeting greeting) {
|
||||
// if (!Character.isUpperCase(greeting.name.charAt(0))) {
|
||||
// warning('Name should start with a capital',
|
||||
// PatternPackage.Literals.GREETING__NAME,
|
||||
// INVALID_NAME)
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
/.PatternRuntimeModule.java._trace
|
||||
/.PatternRuntimeModule.xtendbin
|
||||
/.PatternStandaloneSetup.java._trace
|
||||
/.PatternStandaloneSetup.xtendbin
|
||||
/PatternRuntimeModule.java
|
||||
/PatternStandaloneSetup.java
|
||||
@@ -0,0 +1,3 @@
|
||||
/.PatternFormatter.java._trace
|
||||
/.PatternFormatter.xtendbin
|
||||
/PatternFormatter.java
|
||||
@@ -0,0 +1,3 @@
|
||||
/.PatternGenerator.java._trace
|
||||
/.PatternGenerator.xtendbin
|
||||
/PatternGenerator.java
|
||||
@@ -0,0 +1,3 @@
|
||||
/.PatternScopeProvider.java._trace
|
||||
/.PatternScopeProvider.xtendbin
|
||||
/PatternScopeProvider.java
|
||||
@@ -0,0 +1,3 @@
|
||||
/.PatternValidator.java._trace
|
||||
/.PatternValidator.xtendbin
|
||||
/PatternValidator.java
|
||||
Reference in New Issue
Block a user