diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..9bb88d37 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/.DS_Store diff --git a/org.eclipse.triquetrum.commands.api/.classpath b/org.eclipse.triquetrum.commands.api/.classpath new file mode 100644 index 00000000..7f457fa4 --- /dev/null +++ b/org.eclipse.triquetrum.commands.api/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/org.eclipse.triquetrum.commands.api/.project b/org.eclipse.triquetrum.commands.api/.project new file mode 100644 index 00000000..6b0a211b --- /dev/null +++ b/org.eclipse.triquetrum.commands.api/.project @@ -0,0 +1,33 @@ + + + org.eclipse.triquetrum.commands.api + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.pde.ds.core.builder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/org.eclipse.triquetrum.commands.api/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.triquetrum.commands.api/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..0c68a61d --- /dev/null +++ b/org.eclipse.triquetrum.commands.api/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/org.eclipse.triquetrum.commands.api/META-INF/MANIFEST.MF b/org.eclipse.triquetrum.commands.api/META-INF/MANIFEST.MF new file mode 100644 index 00000000..0a604c64 --- /dev/null +++ b/org.eclipse.triquetrum.commands.api/META-INF/MANIFEST.MF @@ -0,0 +1,14 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: TqCL Api +Bundle-SymbolicName: org.eclipse.triquetrum.commands.api +Bundle-Version: 0.1.0.qualifier +Bundle-Activator: org.eclipse.triquetrum.commands.api.TqCLServices +Bundle-Vendor: Eclipse Triquetrum +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.osgi.services;bundle-version="3.5.100" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-ActivationPolicy: lazy +Export-Package: org.eclipse.triquetrum.commands.api, + org.eclipse.triquetrum.commands.api.services +Service-Component: OSGI-INF/librariesProvider.xml diff --git a/org.eclipse.triquetrum.commands.api/OSGI-INF/librariesProvider.xml b/org.eclipse.triquetrum.commands.api/OSGI-INF/librariesProvider.xml new file mode 100644 index 00000000..c5ada845 --- /dev/null +++ b/org.eclipse.triquetrum.commands.api/OSGI-INF/librariesProvider.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/org.eclipse.triquetrum.commands.api/build.properties b/org.eclipse.triquetrum.commands.api/build.properties new file mode 100644 index 00000000..5d4da75f --- /dev/null +++ b/org.eclipse.triquetrum.commands.api/build.properties @@ -0,0 +1,5 @@ +output.. = target/classes/ +bin.includes = META-INF/,\ + .,\ + OSGI-INF/librariesProvider.xml +source.. = src/main/java/ diff --git a/org.eclipse.triquetrum.commands.api/src/main/java/org/eclipse/triquetrum/commands/api/TqCLServices.java b/org.eclipse.triquetrum.commands.api/src/main/java/org/eclipse/triquetrum/commands/api/TqCLServices.java new file mode 100644 index 00000000..0834e1f3 --- /dev/null +++ b/org.eclipse.triquetrum.commands.api/src/main/java/org/eclipse/triquetrum/commands/api/TqCLServices.java @@ -0,0 +1,89 @@ +/******************************************************************************* + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +package org.eclipse.triquetrum.commands.api; + +import java.util.Collection; + +import org.eclipse.triquetrum.commands.api.services.ModelBuilderService; +import org.eclipse.triquetrum.commands.api.services.TqCLLibraryProvider; +import org.eclipse.triquetrum.commands.api.services.impl.TcQLLibraryProviderProxy; +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; +import org.osgi.framework.InvalidSyntaxException; +import org.osgi.framework.ServiceObjects; +import org.osgi.framework.ServiceReference; + +public class TqCLServices implements BundleActivator { + + private static BundleContext context; + + private static TqCLServices instance; + + static BundleContext getContext() { + return context; + } + + /* + * (non-Javadoc) + * + * @see org.osgi.framework.BundleActivator#start(org.osgi.framework. + * BundleContext) + */ + public void start(BundleContext bundleContext) throws Exception { + TqCLServices.context = bundleContext; + instance=this; + } + + /* + * (non-Javadoc) + * + * @see + * org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext bundleContext) throws Exception { + TqCLServices.context = null; + instance=null; + } + + public static TqCLServices getInstance() { + return instance; + } + + @SuppressWarnings("rawtypes") + public ModelBuilderService getModelBuilderService(Class modelClass) { + try { + Collection> serviceReferences = getContext() + .getServiceReferences(ModelBuilderService.class, null); + for (ServiceReference serviceReference : serviceReferences) { + //TODO:Release service when done + ServiceObjects serviceObjects = getContext().getServiceObjects(serviceReference); + ModelBuilderService service = serviceObjects.getService(); + if (service.getSupportedModelClass() == modelClass) { + return service; + } + } + } catch (InvalidSyntaxException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + return null; + } + + public TqCLLibraryProvider getTqclLibraryProvider() + { + ServiceReference serviceReference = getContext().getServiceReference(TcQLLibraryProviderProxy.class); + TcQLLibraryProviderProxy service = getContext().getService(serviceReference); + return service; + } + + +} diff --git a/org.eclipse.triquetrum.commands.api/src/main/java/org/eclipse/triquetrum/commands/api/services/ActorDescriptor.java b/org.eclipse.triquetrum.commands.api/src/main/java/org/eclipse/triquetrum/commands/api/services/ActorDescriptor.java new file mode 100644 index 00000000..62a8d4eb --- /dev/null +++ b/org.eclipse.triquetrum.commands.api/src/main/java/org/eclipse/triquetrum/commands/api/services/ActorDescriptor.java @@ -0,0 +1,28 @@ +package org.eclipse.triquetrum.commands.api.services; + +import java.util.ArrayList; +import java.util.List; + +public class ActorDescriptor extends EntityDescriptor { + + private List ports = new ArrayList<>(); + + public ActorDescriptor(String sourceLibrary,String displayName, String clazz, String icon) { + super(sourceLibrary,displayName, clazz, icon); + } + + @Override + public String getCategory() { + return "Actor"; + } + + public void addPort(PortDescriptor port) + { + ports.add(port); + } + + public List getPorts() { + return ports; + } + +} diff --git a/org.eclipse.triquetrum.commands.api/src/main/java/org/eclipse/triquetrum/commands/api/services/DirectorDescriptor.java b/org.eclipse.triquetrum.commands.api/src/main/java/org/eclipse/triquetrum/commands/api/services/DirectorDescriptor.java new file mode 100644 index 00000000..500a8563 --- /dev/null +++ b/org.eclipse.triquetrum.commands.api/src/main/java/org/eclipse/triquetrum/commands/api/services/DirectorDescriptor.java @@ -0,0 +1,15 @@ +package org.eclipse.triquetrum.commands.api.services; + +public class DirectorDescriptor extends EntityDescriptor { + + public DirectorDescriptor(String sourceLibrary,String displayName, String clazz, String icon) { + super(sourceLibrary,displayName, clazz, icon); + // TODO Auto-generated constructor stub + } + + @Override + public String getCategory() { + return "Director"; + } + +} diff --git a/org.eclipse.triquetrum.commands.api/src/main/java/org/eclipse/triquetrum/commands/api/services/EntityDescriptor.java b/org.eclipse.triquetrum.commands.api/src/main/java/org/eclipse/triquetrum/commands/api/services/EntityDescriptor.java new file mode 100644 index 00000000..ac82d774 --- /dev/null +++ b/org.eclipse.triquetrum.commands.api/src/main/java/org/eclipse/triquetrum/commands/api/services/EntityDescriptor.java @@ -0,0 +1,57 @@ +package org.eclipse.triquetrum.commands.api.services; + +import java.util.ArrayList; +import java.util.List; + +public abstract class EntityDescriptor { + + private String clazz; + + private String displayName; + + private String icon; + + private String sourceLibrary; + + private List parameters = new ArrayList<>(); + + public EntityDescriptor(String sourceLibrary,String displayName, String clazz, String icon) { + super(); + this.sourceLibrary = sourceLibrary; + this.displayName = displayName; + this.clazz = clazz; + this.icon = icon; + } + + + public String getSourceLibrary() { + return sourceLibrary; + } + + public String getClazz() { + return clazz; + } + + public String getDisplayName() { + return displayName; + } + + public String getIcon() { + return icon; + } + + public abstract String getCategory(); + + + public void addParameter(ParameterDescriptor parameter) { + parameters.add(parameter); + } + + + public List getParameters() { + return parameters; + } + + + +} diff --git a/org.eclipse.triquetrum.commands.api/src/main/java/org/eclipse/triquetrum/commands/api/services/ModelBuilderService.java b/org.eclipse.triquetrum.commands.api/src/main/java/org/eclipse/triquetrum/commands/api/services/ModelBuilderService.java new file mode 100644 index 00000000..bf8185e4 --- /dev/null +++ b/org.eclipse.triquetrum.commands.api/src/main/java/org/eclipse/triquetrum/commands/api/services/ModelBuilderService.java @@ -0,0 +1,38 @@ +/******************************************************************************* + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +package org.eclipse.triquetrum.commands.api.services; + +import java.util.Map; + + +public interface ModelBuilderService { + + public Class getSupportedModelClass(); + + public CompositeActor createNewModel(String modelName, String folderPath); + + public boolean insertActor(CompositeActor parent,String actorName,String actorclass,Map parameters); + + public boolean insertDirector(CompositeActor actor,String directorName, String entityClass, Map params); + + public boolean insertPort(Actor actor, String portClass, String entityClass, Map params); + + public boolean insertParameter(Actor actor, String parameterClass, String entityClass, Map params); + + public CompositeActor getParent(Actor actor); + + public Actor getChild(CompositeActor parent, String name); + + public boolean connect(CompositeActor currentActor, String from, String to); + + + +} diff --git a/org.eclipse.triquetrum.commands.api/src/main/java/org/eclipse/triquetrum/commands/api/services/ParameterDescriptor.java b/org.eclipse.triquetrum.commands.api/src/main/java/org/eclipse/triquetrum/commands/api/services/ParameterDescriptor.java new file mode 100644 index 00000000..80703117 --- /dev/null +++ b/org.eclipse.triquetrum.commands.api/src/main/java/org/eclipse/triquetrum/commands/api/services/ParameterDescriptor.java @@ -0,0 +1,26 @@ +package org.eclipse.triquetrum.commands.api.services; + +public class ParameterDescriptor extends EntityDescriptor { + + private String defaultValue=""; + + public ParameterDescriptor(String sourceLibrary,String displayName, String clazz, String icon) { + super(sourceLibrary,displayName, clazz, icon); + } + + @Override + public String getCategory() { + return "Parameter"; + } + + public String getDefaultValue() { + return defaultValue; + } + + public void setDefaultValue(String defaultValue) { + this.defaultValue = defaultValue; + } + + + +} diff --git a/org.eclipse.triquetrum.commands.api/src/main/java/org/eclipse/triquetrum/commands/api/services/PortDescriptor.java b/org.eclipse.triquetrum.commands.api/src/main/java/org/eclipse/triquetrum/commands/api/services/PortDescriptor.java new file mode 100644 index 00000000..ddc215e2 --- /dev/null +++ b/org.eclipse.triquetrum.commands.api/src/main/java/org/eclipse/triquetrum/commands/api/services/PortDescriptor.java @@ -0,0 +1,31 @@ +package org.eclipse.triquetrum.commands.api.services; + +public class PortDescriptor extends EntityDescriptor { + + private boolean input; + + private boolean output; + + + public PortDescriptor(String sourceLibrary,String displayName, String clazz, String icon,boolean input,boolean output) { + super(sourceLibrary,displayName, clazz, icon); + this.input = input; + this.output = output; + } + + @Override + public String getCategory() { + return "Port"; + } + + + + public boolean isInput() { + return input; + } + + public boolean isOutput() { + return output; + } + +} diff --git a/org.eclipse.triquetrum.commands.api/src/main/java/org/eclipse/triquetrum/commands/api/services/TcQLException.java b/org.eclipse.triquetrum.commands.api/src/main/java/org/eclipse/triquetrum/commands/api/services/TcQLException.java new file mode 100644 index 00000000..b38be836 --- /dev/null +++ b/org.eclipse.triquetrum.commands.api/src/main/java/org/eclipse/triquetrum/commands/api/services/TcQLException.java @@ -0,0 +1,20 @@ +/******************************************************************************* + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +package org.eclipse.triquetrum.commands.api.services; + +public class TcQLException extends Exception { + + /** + * + */ + private static final long serialVersionUID = 8072711939052951422L; + +} diff --git a/org.eclipse.triquetrum.commands.api/src/main/java/org/eclipse/triquetrum/commands/api/services/TqCLLibraryException.java b/org.eclipse.triquetrum.commands.api/src/main/java/org/eclipse/triquetrum/commands/api/services/TqCLLibraryException.java new file mode 100644 index 00000000..ef45632e --- /dev/null +++ b/org.eclipse.triquetrum.commands.api/src/main/java/org/eclipse/triquetrum/commands/api/services/TqCLLibraryException.java @@ -0,0 +1,37 @@ +/******************************************************************************* + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +package org.eclipse.triquetrum.commands.api.services; + +public class TqCLLibraryException extends Exception { + + /** + * + */ + private static final long serialVersionUID = -3068348640374298798L; + + public TqCLLibraryException(String message, Throwable cause, boolean enableSuppression, + boolean writableStackTrace) { + super(message, cause, enableSuppression, writableStackTrace); + // TODO Auto-generated constructor stub + } + + public TqCLLibraryException(String message, Throwable cause) { + super(message, cause); + // TODO Auto-generated constructor stub + } + + public TqCLLibraryException(String message) { + super(message); + // TODO Auto-generated constructor stub + } + + +} diff --git a/org.eclipse.triquetrum.commands.api/src/main/java/org/eclipse/triquetrum/commands/api/services/TqCLLibraryProvider.java b/org.eclipse.triquetrum.commands.api/src/main/java/org/eclipse/triquetrum/commands/api/services/TqCLLibraryProvider.java new file mode 100644 index 00000000..ff756483 --- /dev/null +++ b/org.eclipse.triquetrum.commands.api/src/main/java/org/eclipse/triquetrum/commands/api/services/TqCLLibraryProvider.java @@ -0,0 +1,48 @@ +/******************************************************************************* + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +package org.eclipse.triquetrum.commands.api.services; + +import java.util.List; +import java.util.Set; + +public interface TqCLLibraryProvider { + + public List getActors(String library) throws TqCLLibraryException; + + public ActorDescriptor getActor(String library,String actorClass) throws TqCLLibraryException; + + public ActorDescriptor getActor(String actorClass) throws TqCLLibraryException; + + public List getDirectors(String library) throws TqCLLibraryException; + + public DirectorDescriptor getDirector(String directorClass) throws TqCLLibraryException; + + public List getParameterTypes(String library) throws TqCLLibraryException; + + public ParameterDescriptor getParameterType(String parameterClass); + + public List getPortTypes(String library) throws TqCLLibraryException; + + public PortDescriptor getPortType(String portClass) throws TqCLLibraryException; + + public List getActorPorts(String actor) throws TqCLLibraryException; + + public List getActorParameters(String actor) throws TqCLLibraryException; + + public Set getLibraryNames(); + + public boolean hasElement(String element); + + public boolean hasElementInLibrary(String element, String library, String category); + + + +} diff --git a/org.eclipse.triquetrum.commands.api/src/main/java/org/eclipse/triquetrum/commands/api/services/impl/TcQLLibraryProviderProxy.java b/org.eclipse.triquetrum.commands.api/src/main/java/org/eclipse/triquetrum/commands/api/services/impl/TcQLLibraryProviderProxy.java new file mode 100644 index 00000000..f7f67000 --- /dev/null +++ b/org.eclipse.triquetrum.commands.api/src/main/java/org/eclipse/triquetrum/commands/api/services/impl/TcQLLibraryProviderProxy.java @@ -0,0 +1,174 @@ +/******************************************************************************* + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +package org.eclipse.triquetrum.commands.api.services.impl; + +import java.text.MessageFormat; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.eclipse.triquetrum.commands.api.services.ActorDescriptor; +import org.eclipse.triquetrum.commands.api.services.DirectorDescriptor; +import org.eclipse.triquetrum.commands.api.services.EntityDescriptor; +import org.eclipse.triquetrum.commands.api.services.ParameterDescriptor; +import org.eclipse.triquetrum.commands.api.services.PortDescriptor; +import org.eclipse.triquetrum.commands.api.services.TqCLLibraryException; +import org.eclipse.triquetrum.commands.api.services.TqCLLibraryProvider; + +public class TcQLLibraryProviderProxy implements TqCLLibraryProvider { + + private Map libraryProviders = new HashMap<>(); + + + @Override + public List getActors(String library) throws TqCLLibraryException { + checkLibrary(library); + return libraryProviders.get(library).getActors(library); + } + + private void checkLibrary(String library) throws TqCLLibraryException { + if (!libraryProviders.containsKey(library)) { + String message = MessageFormat.format("Library {0} not found", library); + throw new TqCLLibraryException(message); + } + } + + @Override + public List getDirectors(String library) throws TqCLLibraryException { + checkLibrary(library); + return libraryProviders.get(library).getDirectors(library); + } + + @Override + public List getParameterTypes(String library) throws TqCLLibraryException { + checkLibrary(library); + return libraryProviders.get(library).getParameterTypes(library); + } + + @Override + public List getPortTypes(String library) throws TqCLLibraryException { + checkLibrary(library); + return libraryProviders.get(library).getPortTypes(library); + } + + @Override + public List getActorPorts(String actor) throws TqCLLibraryException { + for (TqCLLibraryProvider provider : libraryProviders.values()) { + boolean hasElement = provider.hasElement(actor); + if (hasElement) { + return provider.getActorPorts(actor); + } + } + String message = MessageFormat.format("Actor {0} not found", actor); + throw new TqCLLibraryException(message); + } + + @Override + public List getActorParameters(String actor) throws TqCLLibraryException { + for (TqCLLibraryProvider provider : libraryProviders.values()) { + boolean hasElement = provider.hasElement(actor); + if (hasElement) { + return provider.getActorParameters(actor); + } + } + String message = MessageFormat.format("Actor {0} not found", actor); + throw new TqCLLibraryException(message); + } + + @Override + public Set getLibraryNames() { + return libraryProviders.keySet(); + } + + @Override + public boolean hasElement(String element) { + for (TqCLLibraryProvider libraryProvider : libraryProviders.values()) { + if (libraryProvider.hasElement(element)) { + return true; + } + } + return false; + } + + + public void addLibraryProvider(TqCLLibraryProvider tqCLLibraryProvider) { + Set libraryNames = tqCLLibraryProvider.getLibraryNames(); + for (String library : libraryNames) { + this.libraryProviders.put(library, tqCLLibraryProvider); + } + } + + @Override + public ActorDescriptor getActor(String library, String actorClass) throws TqCLLibraryException { + return this.libraryProviders.get(library).getActor(library, actorClass); + } + + @Override + public ActorDescriptor getActor(String actorClass) throws TqCLLibraryException { + for (TqCLLibraryProvider provider : libraryProviders.values()) { + ActorDescriptor actor = provider.getActor(actorClass); + if(actor!=null) + { + return actor; + } + } + return null; + } + + @Override + public DirectorDescriptor getDirector(String directorClass) throws TqCLLibraryException { + for (TqCLLibraryProvider provider : libraryProviders.values()) { + DirectorDescriptor director = provider.getDirector(directorClass); + if(director!=null) + { + return director; + } + } + return null; + } + @Override + public ParameterDescriptor getParameterType(String parameterClass) { + for (TqCLLibraryProvider provider : libraryProviders.values()) { + ParameterDescriptor parameter = provider.getParameterType(parameterClass); + if(parameter!=null) + { + return parameter; + } + } + return null; + } + + @Override + public boolean hasElementInLibrary(String element, String library,String category) { + for (TqCLLibraryProvider libraryProvider : libraryProviders.values()) { + if (libraryProvider.hasElementInLibrary(element,library,category)) { + return true; + } + } + return false; + } + + @Override + public PortDescriptor getPortType(String portClass) throws TqCLLibraryException { + for (TqCLLibraryProvider provider : libraryProviders.values()) { + PortDescriptor port = provider.getPortType(portClass); + if(port!=null) + { + return port; + } + } + return null; + } + + +} diff --git a/org.eclipse.triquetrum.commands.api/target/.gitignore b/org.eclipse.triquetrum.commands.api/target/.gitignore new file mode 100644 index 00000000..840e7d31 --- /dev/null +++ b/org.eclipse.triquetrum.commands.api/target/.gitignore @@ -0,0 +1 @@ +/classes/ diff --git a/org.eclipse.triquetrum.commands.api/target/classes/org/eclipse/triquetrum/commands/api/TqCLServices.class b/org.eclipse.triquetrum.commands.api/target/classes/org/eclipse/triquetrum/commands/api/TqCLServices.class new file mode 100644 index 00000000..7d2e8c84 Binary files /dev/null and b/org.eclipse.triquetrum.commands.api/target/classes/org/eclipse/triquetrum/commands/api/TqCLServices.class differ diff --git a/org.eclipse.triquetrum.commands.api/target/classes/org/eclipse/triquetrum/commands/api/services/ActorDescriptor.class b/org.eclipse.triquetrum.commands.api/target/classes/org/eclipse/triquetrum/commands/api/services/ActorDescriptor.class new file mode 100644 index 00000000..8b8ac775 Binary files /dev/null and b/org.eclipse.triquetrum.commands.api/target/classes/org/eclipse/triquetrum/commands/api/services/ActorDescriptor.class differ diff --git a/org.eclipse.triquetrum.commands.api/target/classes/org/eclipse/triquetrum/commands/api/services/DirectorDescriptor.class b/org.eclipse.triquetrum.commands.api/target/classes/org/eclipse/triquetrum/commands/api/services/DirectorDescriptor.class new file mode 100644 index 00000000..cc98cee0 Binary files /dev/null and b/org.eclipse.triquetrum.commands.api/target/classes/org/eclipse/triquetrum/commands/api/services/DirectorDescriptor.class differ diff --git a/org.eclipse.triquetrum.commands.api/target/classes/org/eclipse/triquetrum/commands/api/services/EntityDescriptor.class b/org.eclipse.triquetrum.commands.api/target/classes/org/eclipse/triquetrum/commands/api/services/EntityDescriptor.class new file mode 100644 index 00000000..853571a5 Binary files /dev/null and b/org.eclipse.triquetrum.commands.api/target/classes/org/eclipse/triquetrum/commands/api/services/EntityDescriptor.class differ diff --git a/org.eclipse.triquetrum.commands.api/target/classes/org/eclipse/triquetrum/commands/api/services/ModelBuilderService.class b/org.eclipse.triquetrum.commands.api/target/classes/org/eclipse/triquetrum/commands/api/services/ModelBuilderService.class new file mode 100644 index 00000000..e050c854 Binary files /dev/null and b/org.eclipse.triquetrum.commands.api/target/classes/org/eclipse/triquetrum/commands/api/services/ModelBuilderService.class differ diff --git a/org.eclipse.triquetrum.commands.api/target/classes/org/eclipse/triquetrum/commands/api/services/ParameterDescriptor.class b/org.eclipse.triquetrum.commands.api/target/classes/org/eclipse/triquetrum/commands/api/services/ParameterDescriptor.class new file mode 100644 index 00000000..f7db0b23 Binary files /dev/null and b/org.eclipse.triquetrum.commands.api/target/classes/org/eclipse/triquetrum/commands/api/services/ParameterDescriptor.class differ diff --git a/org.eclipse.triquetrum.commands.api/target/classes/org/eclipse/triquetrum/commands/api/services/PortDescriptor.class b/org.eclipse.triquetrum.commands.api/target/classes/org/eclipse/triquetrum/commands/api/services/PortDescriptor.class new file mode 100644 index 00000000..5235e59d Binary files /dev/null and b/org.eclipse.triquetrum.commands.api/target/classes/org/eclipse/triquetrum/commands/api/services/PortDescriptor.class differ diff --git a/org.eclipse.triquetrum.commands.api/target/classes/org/eclipse/triquetrum/commands/api/services/TcQLException.class b/org.eclipse.triquetrum.commands.api/target/classes/org/eclipse/triquetrum/commands/api/services/TcQLException.class new file mode 100644 index 00000000..2deafcf2 Binary files /dev/null and b/org.eclipse.triquetrum.commands.api/target/classes/org/eclipse/triquetrum/commands/api/services/TcQLException.class differ diff --git a/org.eclipse.triquetrum.commands.api/target/classes/org/eclipse/triquetrum/commands/api/services/TqCLLibraryException.class b/org.eclipse.triquetrum.commands.api/target/classes/org/eclipse/triquetrum/commands/api/services/TqCLLibraryException.class new file mode 100644 index 00000000..74731cda Binary files /dev/null and b/org.eclipse.triquetrum.commands.api/target/classes/org/eclipse/triquetrum/commands/api/services/TqCLLibraryException.class differ diff --git a/org.eclipse.triquetrum.commands.api/target/classes/org/eclipse/triquetrum/commands/api/services/TqCLLibraryProvider.class b/org.eclipse.triquetrum.commands.api/target/classes/org/eclipse/triquetrum/commands/api/services/TqCLLibraryProvider.class new file mode 100644 index 00000000..0eef931b Binary files /dev/null and b/org.eclipse.triquetrum.commands.api/target/classes/org/eclipse/triquetrum/commands/api/services/TqCLLibraryProvider.class differ diff --git a/org.eclipse.triquetrum.commands.api/target/classes/org/eclipse/triquetrum/commands/api/services/impl/TcQLLibraryProviderProxy.class b/org.eclipse.triquetrum.commands.api/target/classes/org/eclipse/triquetrum/commands/api/services/impl/TcQLLibraryProviderProxy.class new file mode 100644 index 00000000..b0bc1219 Binary files /dev/null and b/org.eclipse.triquetrum.commands.api/target/classes/org/eclipse/triquetrum/commands/api/services/impl/TcQLLibraryProviderProxy.class differ diff --git a/org.eclipse.triquetrum.commands.xtext.feature/.project b/org.eclipse.triquetrum.commands.xtext.feature/.project new file mode 100644 index 00000000..c20146f4 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.feature/.project @@ -0,0 +1,17 @@ + + + org.eclipse.triquetrum.commands.xtext.feature + + + + + + org.eclipse.pde.FeatureBuilder + + + + + + org.eclipse.pde.FeatureNature + + diff --git a/org.eclipse.triquetrum.commands.xtext.feature/.settings/org.eclipse.core.resources.prefs b/org.eclipse.triquetrum.commands.xtext.feature/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 00000000..99f26c02 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.feature/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/org.eclipse.triquetrum.commands.xtext.feature/build.properties b/org.eclipse.triquetrum.commands.xtext.feature/build.properties new file mode 100644 index 00000000..eebf6378 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.feature/build.properties @@ -0,0 +1,11 @@ +############################################################################### +# Copyright (c) 2016 Totaro Rodolfo +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# Rodolfo Totaro - initial API and implementation and/or initial documentation +############################################################################### +bin.includes = feature.xml diff --git a/org.eclipse.triquetrum.commands.xtext.feature/feature.xml b/org.eclipse.triquetrum.commands.xtext.feature/feature.xml new file mode 100644 index 00000000..e00404fc --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.feature/feature.xml @@ -0,0 +1,34 @@ + + + + + + + + diff --git a/org.eclipse.triquetrum.commands.xtext.ide/.classpath b/org.eclipse.triquetrum.commands.xtext.ide/.classpath new file mode 100644 index 00000000..ad8063a2 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ide/.classpath @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/org.eclipse.triquetrum.commands.xtext.ide/.gitignore b/org.eclipse.triquetrum.commands.xtext.ide/.gitignore new file mode 100644 index 00000000..09e3bc9b --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ide/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/target/ diff --git a/org.eclipse.triquetrum.commands.xtext.ide/.project b/org.eclipse.triquetrum.commands.xtext.ide/.project new file mode 100644 index 00000000..eb73e520 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ide/.project @@ -0,0 +1,34 @@ + + + org.eclipse.triquetrum.commands.xtext.ide + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.xtext.ui.shared.xtextNature + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + diff --git a/org.eclipse.triquetrum.commands.xtext.ide/.settings/org.eclipse.core.resources.prefs b/org.eclipse.triquetrum.commands.xtext.ide/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 00000000..99f26c02 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ide/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/org.eclipse.triquetrum.commands.xtext.ide/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.triquetrum.commands.xtext.ide/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..0c68a61d --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ide/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/org.eclipse.triquetrum.commands.xtext.ide/META-INF/MANIFEST.MF b/org.eclipse.triquetrum.commands.xtext.ide/META-INF/MANIFEST.MF new file mode 100644 index 00000000..2691d852 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ide/META-INF/MANIFEST.MF @@ -0,0 +1,22 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: org.eclipse.triquetrum.commands.xtext.ide +Bundle-SymbolicName: org.eclipse.triquetrum.commands.xtext.ide;singleton:=true +Bundle-Version: 0.0.1.qualifier +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Bundle-ActivationPolicy: lazy +Export-Package: org.eclipse.triquetrum.commands.ide.contentassist.antlr, + org.eclipse.triquetrum.commands.ide.contentassist.antlr.internal +Require-Bundle: org.eclipse.xtext.ide;bundle-version="2.10.0", + org.eclipse.triquetrum.commands.xtext;bundle-version="1.0.0", + org.eclipse.xtext.xbase.ide;bundle-version="2.10.0", + org.eclipse.debug.core;bundle-version="3.10.100", + org.eclipse.debug.ui;bundle-version="3.11.200", + org.eclipse.ui;bundle-version="3.108.0", + org.eclipse.core.runtime;bundle-version="3.12.0", + org.eclipse.ui.console;bundle-version="3.6.200", + org.eclipse.triquetrum.workflow.model;bundle-version="0.1.0", + ptolemy.core;bundle-version="11.0.0", + org.eclipse.triquetrum.workflow.api;bundle-version="0.1.0", + org.eclipse.triquetrum.workflow.editor;bundle-version="0.1.0" + diff --git a/org.eclipse.triquetrum.commands.xtext.ide/build.properties b/org.eclipse.triquetrum.commands.xtext.ide/build.properties new file mode 100644 index 00000000..ff24db62 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ide/build.properties @@ -0,0 +1,16 @@ +############################################################################### +# Copyright (c) 2016 Totaro Rodolfo +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# Rodolfo Totaro - initial API and implementation and/or initial documentation +############################################################################### +source.. = src/,\ + src-gen/,\ + xtend-gen/ +bin.includes = .,\ + META-INF/,\ + plugin.xml diff --git a/org.eclipse.triquetrum.commands.xtext.ide/plugin.xml b/org.eclipse.triquetrum.commands.xtext.ide/plugin.xml new file mode 100644 index 00000000..ca97dd58 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ide/plugin.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.eclipse.triquetrum.commands.xtext.ide/src/main/java-gen/org/eclipse/triquetrum/commands/ide/contentassist/antlr/PartialTqclContentAssistParser.java b/org.eclipse.triquetrum.commands.xtext.ide/src/main/java-gen/org/eclipse/triquetrum/commands/ide/contentassist/antlr/PartialTqclContentAssistParser.java new file mode 100644 index 00000000..82c14443 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ide/src/main/java-gen/org/eclipse/triquetrum/commands/ide/contentassist/antlr/PartialTqclContentAssistParser.java @@ -0,0 +1,43 @@ +/******************************************************************************* + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +package org.eclipse.triquetrum.commands.ide.contentassist.antlr; + +import java.util.Collection; +import java.util.Collections; +import org.eclipse.xtext.AbstractRule; +import org.eclipse.xtext.ide.editor.contentassist.antlr.FollowElement; +import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.AbstractInternalContentAssistParser; +import org.eclipse.xtext.ide.editor.partialEditing.IPartialEditingContentAssistParser; +import org.eclipse.xtext.util.PolymorphicDispatcher; + +public class PartialTqclContentAssistParser extends TqclParser implements IPartialEditingContentAssistParser { + + private AbstractRule rule; + + @Override + public void initializeFor(AbstractRule rule) { + this.rule = rule; + } + + @Override + protected Collection getFollowElements(AbstractInternalContentAssistParser parser) { + if (rule == null || rule.eIsProxy()) + return Collections.emptyList(); + String methodName = "entryRule" + rule.getName(); + PolymorphicDispatcher> dispatcher = + new PolymorphicDispatcher>(methodName, 0, 0, Collections.singletonList(parser)); + dispatcher.invoke(); + return parser.getFollowElements(); + } + +} diff --git a/org.eclipse.triquetrum.commands.xtext.ide/src/main/java-gen/org/eclipse/triquetrum/commands/ide/contentassist/antlr/TqclParser.java b/org.eclipse.triquetrum.commands.xtext.ide/src/main/java-gen/org/eclipse/triquetrum/commands/ide/contentassist/antlr/TqclParser.java new file mode 100644 index 00000000..97b5974b --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ide/src/main/java-gen/org/eclipse/triquetrum/commands/ide/contentassist/antlr/TqclParser.java @@ -0,0 +1,124 @@ +/******************************************************************************* + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +package org.eclipse.triquetrum.commands.ide.contentassist.antlr; + +import com.google.inject.Inject; +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; +import org.antlr.runtime.RecognitionException; +import org.eclipse.triquetrum.commands.ide.contentassist.antlr.internal.InternalTqclParser; +import org.eclipse.triquetrum.commands.services.TqclGrammarAccess; +import org.eclipse.xtext.AbstractElement; +import org.eclipse.xtext.ide.editor.contentassist.antlr.AbstractContentAssistParser; +import org.eclipse.xtext.ide.editor.contentassist.antlr.FollowElement; +import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.AbstractInternalContentAssistParser; + +public class TqclParser extends AbstractContentAssistParser { + + @Inject + private TqclGrammarAccess grammarAccess; + + private Map nameMappings; + + @Override + protected InternalTqclParser createParser() { + InternalTqclParser result = new InternalTqclParser(null); + result.setGrammarAccess(grammarAccess); + return result; + } + + @Override + protected String getRuleName(AbstractElement element) { + if (nameMappings == null) { + nameMappings = new HashMap() { + private static final long serialVersionUID = 1L; + { + put(grammarAccess.getCompositeCommandAccess().getEndAlternatives_2_0(), "rule__CompositeCommand__EndAlternatives_2_0"); + put(grammarAccess.getSimpleCommandAccess().getAlternatives_0(), "rule__SimpleCommand__Alternatives_0"); + put(grammarAccess.getCommandAccess().getAlternatives(), "rule__Command__Alternatives"); + put(grammarAccess.getParameter_idAccess().getAlternatives(), "rule__Parameter_id__Alternatives"); + put(grammarAccess.getNamedObjAccess().getAlternatives(), "rule__NamedObj__Alternatives"); + put(grammarAccess.getCategoryAccess().getAlternatives(), "rule__Category__Alternatives"); + put(grammarAccess.getTriquetrumScriptAccess().getGroup(), "rule__TriquetrumScript__Group__0"); + put(grammarAccess.getCompositeCommandAccess().getGroup(), "rule__CompositeCommand__Group__0"); + put(grammarAccess.getSimpleCommandAccess().getGroup(), "rule__SimpleCommand__Group__0"); + put(grammarAccess.getIncludeAccess().getGroup(), "rule__Include__Group__0"); + put(grammarAccess.getLibraryAccess().getGroup(), "rule__Library__Group__0"); + put(grammarAccess.getInsertAccess().getGroup(), "rule__Insert__Group__0"); + put(grammarAccess.getInsertAccess().getGroup_5(), "rule__Insert__Group_5__0"); + put(grammarAccess.getInsertAccess().getGroup_5_2(), "rule__Insert__Group_5_2__0"); + put(grammarAccess.getSetAccess().getGroup(), "rule__Set__Group__0"); + put(grammarAccess.getConnectAccess().getGroup(), "rule__Connect__Group__0"); + put(grammarAccess.getConnectAccess().getGroup_2(), "rule__Connect__Group_2__0"); + put(grammarAccess.getConnectAccess().getGroup_5(), "rule__Connect__Group_5__0"); + put(grammarAccess.getConnectionPortAccess().getGroup(), "rule__ConnectionPort__Group__0"); + put(grammarAccess.getGoIntoAccess().getGroup(), "rule__GoInto__Group__0"); + put(grammarAccess.getGoOutAccess().getGroup(), "rule__GoOut__Group__0"); + put(grammarAccess.getGoTopAccess().getGroup(), "rule__GoTop__Group__0"); + put(grammarAccess.getParameterAccess().getGroup(), "rule__Parameter__Group__0"); + put(grammarAccess.getTriquetrumScriptAccess().getLibrariesAssignment_0(), "rule__TriquetrumScript__LibrariesAssignment_0"); + put(grammarAccess.getTriquetrumScriptAccess().getCommandsAssignment_1(), "rule__TriquetrumScript__CommandsAssignment_1"); + put(grammarAccess.getCompositeCommandAccess().getStartAssignment_0(), "rule__CompositeCommand__StartAssignment_0"); + put(grammarAccess.getCompositeCommandAccess().getCommandsAssignment_1(), "rule__CompositeCommand__CommandsAssignment_1"); + put(grammarAccess.getCompositeCommandAccess().getEndAssignment_2(), "rule__CompositeCommand__EndAssignment_2"); + put(grammarAccess.getIncludeAccess().getFilenameAssignment_1(), "rule__Include__FilenameAssignment_1"); + put(grammarAccess.getLibraryAccess().getNameAssignment_1(), "rule__Library__NameAssignment_1"); + put(grammarAccess.getInsertAccess().getCategoryAssignment_1(), "rule__Insert__CategoryAssignment_1"); + put(grammarAccess.getInsertAccess().getEntityClassAssignment_2(), "rule__Insert__EntityClassAssignment_2"); + put(grammarAccess.getInsertAccess().getNameAssignment_4(), "rule__Insert__NameAssignment_4"); + put(grammarAccess.getInsertAccess().getParametersAssignment_5_1(), "rule__Insert__ParametersAssignment_5_1"); + put(grammarAccess.getInsertAccess().getParametersAssignment_5_2_1(), "rule__Insert__ParametersAssignment_5_2_1"); + put(grammarAccess.getSetAccess().getParamAssignment_1(), "rule__Set__ParamAssignment_1"); + put(grammarAccess.getConnectAccess().getFromAssignment_1(), "rule__Connect__FromAssignment_1"); + put(grammarAccess.getConnectAccess().getFromAssignment_2_1(), "rule__Connect__FromAssignment_2_1"); + put(grammarAccess.getConnectAccess().getToAssignment_4(), "rule__Connect__ToAssignment_4"); + put(grammarAccess.getConnectAccess().getToAssignment_5_1(), "rule__Connect__ToAssignment_5_1"); + put(grammarAccess.getConnectionPortAccess().getActorAssignment_0(), "rule__ConnectionPort__ActorAssignment_0"); + put(grammarAccess.getConnectionPortAccess().getPortAssignment_2(), "rule__ConnectionPort__PortAssignment_2"); + put(grammarAccess.getGoIntoAccess().getDirectionAssignment_1(), "rule__GoInto__DirectionAssignment_1"); + put(grammarAccess.getGoIntoAccess().getActorAssignment_2(), "rule__GoInto__ActorAssignment_2"); + put(grammarAccess.getGoOutAccess().getDirectionAssignment_1(), "rule__GoOut__DirectionAssignment_1"); + put(grammarAccess.getGoTopAccess().getDirectionAssignment_1(), "rule__GoTop__DirectionAssignment_1"); + put(grammarAccess.getParameterAccess().getIdAssignment_0(), "rule__Parameter__IdAssignment_0"); + put(grammarAccess.getParameterAccess().getValueAssignment_2(), "rule__Parameter__ValueAssignment_2"); + } + }; + } + return nameMappings.get(element); + } + + @Override + protected Collection getFollowElements(AbstractInternalContentAssistParser parser) { + try { + InternalTqclParser typedParser = (InternalTqclParser) parser; + typedParser.entryRuleTriquetrumScript(); + return typedParser.getFollowElements(); + } catch(RecognitionException ex) { + throw new RuntimeException(ex); + } + } + + @Override + protected String[] getInitialHiddenTokens() { + return new String[] { "RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT" }; + } + + public TqclGrammarAccess getGrammarAccess() { + return this.grammarAccess; + } + + public void setGrammarAccess(TqclGrammarAccess grammarAccess) { + this.grammarAccess = grammarAccess; + } +} diff --git a/org.eclipse.triquetrum.commands.xtext.ide/src/main/java-gen/org/eclipse/triquetrum/commands/ide/contentassist/antlr/internal/InternalTqcl.g b/org.eclipse.triquetrum.commands.xtext.ide/src/main/java-gen/org/eclipse/triquetrum/commands/ide/contentassist/antlr/internal/InternalTqcl.g new file mode 100644 index 00000000..ebd14e7f --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ide/src/main/java-gen/org/eclipse/triquetrum/commands/ide/contentassist/antlr/internal/InternalTqcl.g @@ -0,0 +1,2361 @@ +/******************************************************************************* + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +grammar InternalTqcl; + +options { + superClass=AbstractInternalContentAssistParser; +} + +@lexer::header { +package org.eclipse.triquetrum.commands.ide.contentassist.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.ide.editor.contentassist.antlr.internal.Lexer; +} + +@parser::header { +package org.eclipse.triquetrum.commands.ide.contentassist.antlr.internal; + +import java.io.InputStream; +import org.eclipse.xtext.*; +import org.eclipse.xtext.parser.*; +import org.eclipse.xtext.parser.impl.*; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.xtext.parser.antlr.XtextTokenStream; +import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens; +import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.AbstractInternalContentAssistParser; +import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.DFA; +import org.eclipse.triquetrum.commands.services.TqclGrammarAccess; + +} +@parser::members { + private TqclGrammarAccess grammarAccess; + + public void setGrammarAccess(TqclGrammarAccess grammarAccess) { + this.grammarAccess = grammarAccess; + } + + @Override + protected Grammar getGrammar() { + return grammarAccess.getGrammar(); + } + + @Override + protected String getValueForTokenName(String tokenName) { + return tokenName; + } +} + +// Entry rule entryRuleTriquetrumScript +entryRuleTriquetrumScript +: +{ before(grammarAccess.getTriquetrumScriptRule()); } + ruleTriquetrumScript +{ after(grammarAccess.getTriquetrumScriptRule()); } + EOF +; + +// Rule TriquetrumScript +ruleTriquetrumScript + @init { + int stackSize = keepStackSize(); + } + : + ( + { before(grammarAccess.getTriquetrumScriptAccess().getGroup()); } + (rule__TriquetrumScript__Group__0) + { after(grammarAccess.getTriquetrumScriptAccess().getGroup()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +// Entry rule entryRuleCompositeCommand +entryRuleCompositeCommand +: +{ before(grammarAccess.getCompositeCommandRule()); } + ruleCompositeCommand +{ after(grammarAccess.getCompositeCommandRule()); } + EOF +; + +// Rule CompositeCommand +ruleCompositeCommand + @init { + int stackSize = keepStackSize(); + } + : + ( + { before(grammarAccess.getCompositeCommandAccess().getGroup()); } + (rule__CompositeCommand__Group__0) + { after(grammarAccess.getCompositeCommandAccess().getGroup()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +// Entry rule entryRuleSimpleCommand +entryRuleSimpleCommand +: +{ before(grammarAccess.getSimpleCommandRule()); } + ruleSimpleCommand +{ after(grammarAccess.getSimpleCommandRule()); } + EOF +; + +// Rule SimpleCommand +ruleSimpleCommand + @init { + int stackSize = keepStackSize(); + } + : + ( + { before(grammarAccess.getSimpleCommandAccess().getGroup()); } + (rule__SimpleCommand__Group__0) + { after(grammarAccess.getSimpleCommandAccess().getGroup()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +// Entry rule entryRuleCommand +entryRuleCommand +: +{ before(grammarAccess.getCommandRule()); } + ruleCommand +{ after(grammarAccess.getCommandRule()); } + EOF +; + +// Rule Command +ruleCommand + @init { + int stackSize = keepStackSize(); + } + : + ( + { before(grammarAccess.getCommandAccess().getAlternatives()); } + (rule__Command__Alternatives) + { after(grammarAccess.getCommandAccess().getAlternatives()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +// Entry rule entryRuleInclude +entryRuleInclude +: +{ before(grammarAccess.getIncludeRule()); } + ruleInclude +{ after(grammarAccess.getIncludeRule()); } + EOF +; + +// Rule Include +ruleInclude + @init { + int stackSize = keepStackSize(); + } + : + ( + { before(grammarAccess.getIncludeAccess().getGroup()); } + (rule__Include__Group__0) + { after(grammarAccess.getIncludeAccess().getGroup()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +// Entry rule entryRuleLibrary +entryRuleLibrary +: +{ before(grammarAccess.getLibraryRule()); } + ruleLibrary +{ after(grammarAccess.getLibraryRule()); } + EOF +; + +// Rule Library +ruleLibrary + @init { + int stackSize = keepStackSize(); + } + : + ( + { before(grammarAccess.getLibraryAccess().getGroup()); } + (rule__Library__Group__0) + { after(grammarAccess.getLibraryAccess().getGroup()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +// Entry rule entryRuleInsert +entryRuleInsert +: +{ before(grammarAccess.getInsertRule()); } + ruleInsert +{ after(grammarAccess.getInsertRule()); } + EOF +; + +// Rule Insert +ruleInsert + @init { + int stackSize = keepStackSize(); + } + : + ( + { before(grammarAccess.getInsertAccess().getGroup()); } + (rule__Insert__Group__0) + { after(grammarAccess.getInsertAccess().getGroup()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +// Entry rule entryRuleSet +entryRuleSet +: +{ before(grammarAccess.getSetRule()); } + ruleSet +{ after(grammarAccess.getSetRule()); } + EOF +; + +// Rule Set +ruleSet + @init { + int stackSize = keepStackSize(); + } + : + ( + { before(grammarAccess.getSetAccess().getGroup()); } + (rule__Set__Group__0) + { after(grammarAccess.getSetAccess().getGroup()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +// Entry rule entryRuleConnect +entryRuleConnect +: +{ before(grammarAccess.getConnectRule()); } + ruleConnect +{ after(grammarAccess.getConnectRule()); } + EOF +; + +// Rule Connect +ruleConnect + @init { + int stackSize = keepStackSize(); + } + : + ( + { before(grammarAccess.getConnectAccess().getGroup()); } + (rule__Connect__Group__0) + { after(grammarAccess.getConnectAccess().getGroup()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +// Entry rule entryRuleConnectionPort +entryRuleConnectionPort +: +{ before(grammarAccess.getConnectionPortRule()); } + ruleConnectionPort +{ after(grammarAccess.getConnectionPortRule()); } + EOF +; + +// Rule ConnectionPort +ruleConnectionPort + @init { + int stackSize = keepStackSize(); + } + : + ( + { before(grammarAccess.getConnectionPortAccess().getGroup()); } + (rule__ConnectionPort__Group__0) + { after(grammarAccess.getConnectionPortAccess().getGroup()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +// Entry rule entryRuleGoInto +entryRuleGoInto +: +{ before(grammarAccess.getGoIntoRule()); } + ruleGoInto +{ after(grammarAccess.getGoIntoRule()); } + EOF +; + +// Rule GoInto +ruleGoInto + @init { + int stackSize = keepStackSize(); + } + : + ( + { before(grammarAccess.getGoIntoAccess().getGroup()); } + (rule__GoInto__Group__0) + { after(grammarAccess.getGoIntoAccess().getGroup()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +// Entry rule entryRuleGoOut +entryRuleGoOut +: +{ before(grammarAccess.getGoOutRule()); } + ruleGoOut +{ after(grammarAccess.getGoOutRule()); } + EOF +; + +// Rule GoOut +ruleGoOut + @init { + int stackSize = keepStackSize(); + } + : + ( + { before(grammarAccess.getGoOutAccess().getGroup()); } + (rule__GoOut__Group__0) + { after(grammarAccess.getGoOutAccess().getGroup()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +// Entry rule entryRuleGoTop +entryRuleGoTop +: +{ before(grammarAccess.getGoTopRule()); } + ruleGoTop +{ after(grammarAccess.getGoTopRule()); } + EOF +; + +// Rule GoTop +ruleGoTop + @init { + int stackSize = keepStackSize(); + } + : + ( + { before(grammarAccess.getGoTopAccess().getGroup()); } + (rule__GoTop__Group__0) + { after(grammarAccess.getGoTopAccess().getGroup()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +// Entry rule entryRuleParameter +entryRuleParameter +: +{ before(grammarAccess.getParameterRule()); } + ruleParameter +{ after(grammarAccess.getParameterRule()); } + EOF +; + +// Rule Parameter +ruleParameter + @init { + int stackSize = keepStackSize(); + } + : + ( + { before(grammarAccess.getParameterAccess().getGroup()); } + (rule__Parameter__Group__0) + { after(grammarAccess.getParameterAccess().getGroup()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +// Entry rule entryRuleParameter_id +entryRuleParameter_id +: +{ before(grammarAccess.getParameter_idRule()); } + ruleParameter_id +{ after(grammarAccess.getParameter_idRule()); } + EOF +; + +// Rule Parameter_id +ruleParameter_id + @init { + int stackSize = keepStackSize(); + } + : + ( + { before(grammarAccess.getParameter_idAccess().getAlternatives()); } + (rule__Parameter_id__Alternatives) + { after(grammarAccess.getParameter_idAccess().getAlternatives()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +// Entry rule entryRuleNamedObj +entryRuleNamedObj +: +{ before(grammarAccess.getNamedObjRule()); } + ruleNamedObj +{ after(grammarAccess.getNamedObjRule()); } + EOF +; + +// Rule NamedObj +ruleNamedObj + @init { + int stackSize = keepStackSize(); + } + : + ( + { before(grammarAccess.getNamedObjAccess().getAlternatives()); } + (rule__NamedObj__Alternatives) + { after(grammarAccess.getNamedObjAccess().getAlternatives()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +// Rule Category +ruleCategory + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getCategoryAccess().getAlternatives()); } + (rule__Category__Alternatives) + { after(grammarAccess.getCategoryAccess().getAlternatives()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__CompositeCommand__EndAlternatives_2_0 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getCompositeCommandAccess().getEndGoOutParserRuleCall_2_0_0()); } + ruleGoOut + { after(grammarAccess.getCompositeCommandAccess().getEndGoOutParserRuleCall_2_0_0()); } + ) + | + ( + { before(grammarAccess.getCompositeCommandAccess().getEndGoTopParserRuleCall_2_0_1()); } + ruleGoTop + { after(grammarAccess.getCompositeCommandAccess().getEndGoTopParserRuleCall_2_0_1()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__SimpleCommand__Alternatives_0 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getSimpleCommandAccess().getInsertParserRuleCall_0_0()); } + ruleInsert + { after(grammarAccess.getSimpleCommandAccess().getInsertParserRuleCall_0_0()); } + ) + | + ( + { before(grammarAccess.getSimpleCommandAccess().getConnectParserRuleCall_0_1()); } + ruleConnect + { after(grammarAccess.getSimpleCommandAccess().getConnectParserRuleCall_0_1()); } + ) + | + ( + { before(grammarAccess.getSimpleCommandAccess().getSetParserRuleCall_0_2()); } + ruleSet + { after(grammarAccess.getSimpleCommandAccess().getSetParserRuleCall_0_2()); } + ) + | + ( + { before(grammarAccess.getSimpleCommandAccess().getIncludeParserRuleCall_0_3()); } + ruleInclude + { after(grammarAccess.getSimpleCommandAccess().getIncludeParserRuleCall_0_3()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__Command__Alternatives + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getCommandAccess().getSimpleCommandParserRuleCall_0()); } + ruleSimpleCommand + { after(grammarAccess.getCommandAccess().getSimpleCommandParserRuleCall_0()); } + ) + | + ( + { before(grammarAccess.getCommandAccess().getCompositeCommandParserRuleCall_1()); } + ruleCompositeCommand + { after(grammarAccess.getCommandAccess().getCompositeCommandParserRuleCall_1()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__Parameter_id__Alternatives + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getParameter_idAccess().getPARAMETER_NAMETerminalRuleCall_0()); } + RULE_PARAMETER_NAME + { after(grammarAccess.getParameter_idAccess().getPARAMETER_NAMETerminalRuleCall_0()); } + ) + | + ( + { before(grammarAccess.getParameter_idAccess().getSTRINGTerminalRuleCall_1()); } + RULE_STRING + { after(grammarAccess.getParameter_idAccess().getSTRINGTerminalRuleCall_1()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__NamedObj__Alternatives + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getNamedObjAccess().getIDTerminalRuleCall_0()); } + RULE_ID + { after(grammarAccess.getNamedObjAccess().getIDTerminalRuleCall_0()); } + ) + | + ( + { before(grammarAccess.getNamedObjAccess().getSTRINGTerminalRuleCall_1()); } + RULE_STRING + { after(grammarAccess.getNamedObjAccess().getSTRINGTerminalRuleCall_1()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__Category__Alternatives + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getCategoryAccess().getActorEnumLiteralDeclaration_0()); } + ('actor') + { after(grammarAccess.getCategoryAccess().getActorEnumLiteralDeclaration_0()); } + ) + | + ( + { before(grammarAccess.getCategoryAccess().getParameterEnumLiteralDeclaration_1()); } + ('parameter') + { after(grammarAccess.getCategoryAccess().getParameterEnumLiteralDeclaration_1()); } + ) + | + ( + { before(grammarAccess.getCategoryAccess().getPortEnumLiteralDeclaration_2()); } + ('port') + { after(grammarAccess.getCategoryAccess().getPortEnumLiteralDeclaration_2()); } + ) + | + ( + { before(grammarAccess.getCategoryAccess().getDirectorEnumLiteralDeclaration_3()); } + ('director') + { after(grammarAccess.getCategoryAccess().getDirectorEnumLiteralDeclaration_3()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__TriquetrumScript__Group__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__TriquetrumScript__Group__0__Impl + rule__TriquetrumScript__Group__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__TriquetrumScript__Group__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getTriquetrumScriptAccess().getLibrariesAssignment_0()); } + (rule__TriquetrumScript__LibrariesAssignment_0)* + { after(grammarAccess.getTriquetrumScriptAccess().getLibrariesAssignment_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__TriquetrumScript__Group__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__TriquetrumScript__Group__1__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__TriquetrumScript__Group__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getTriquetrumScriptAccess().getCommandsAssignment_1()); } + (rule__TriquetrumScript__CommandsAssignment_1)* + { after(grammarAccess.getTriquetrumScriptAccess().getCommandsAssignment_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__CompositeCommand__Group__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__CompositeCommand__Group__0__Impl + rule__CompositeCommand__Group__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__CompositeCommand__Group__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getCompositeCommandAccess().getStartAssignment_0()); } + (rule__CompositeCommand__StartAssignment_0) + { after(grammarAccess.getCompositeCommandAccess().getStartAssignment_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__CompositeCommand__Group__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__CompositeCommand__Group__1__Impl + rule__CompositeCommand__Group__2 +; +finally { + restoreStackSize(stackSize); +} + +rule__CompositeCommand__Group__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getCompositeCommandAccess().getCommandsAssignment_1()); } + (rule__CompositeCommand__CommandsAssignment_1)* + { after(grammarAccess.getCompositeCommandAccess().getCommandsAssignment_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__CompositeCommand__Group__2 + @init { + int stackSize = keepStackSize(); + } +: + rule__CompositeCommand__Group__2__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__CompositeCommand__Group__2__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getCompositeCommandAccess().getEndAssignment_2()); } + (rule__CompositeCommand__EndAssignment_2) + { after(grammarAccess.getCompositeCommandAccess().getEndAssignment_2()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__SimpleCommand__Group__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__SimpleCommand__Group__0__Impl + rule__SimpleCommand__Group__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__SimpleCommand__Group__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getSimpleCommandAccess().getAlternatives_0()); } + (rule__SimpleCommand__Alternatives_0) + { after(grammarAccess.getSimpleCommandAccess().getAlternatives_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__SimpleCommand__Group__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__SimpleCommand__Group__1__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__SimpleCommand__Group__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getSimpleCommandAccess().getSemicolonKeyword_1()); } + ';' + { after(grammarAccess.getSimpleCommandAccess().getSemicolonKeyword_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__Include__Group__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__Include__Group__0__Impl + rule__Include__Group__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__Include__Group__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getIncludeAccess().getIncludeKeyword_0()); } + 'include' + { after(grammarAccess.getIncludeAccess().getIncludeKeyword_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Include__Group__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__Include__Group__1__Impl + rule__Include__Group__2 +; +finally { + restoreStackSize(stackSize); +} + +rule__Include__Group__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getIncludeAccess().getFilenameAssignment_1()); } + (rule__Include__FilenameAssignment_1) + { after(grammarAccess.getIncludeAccess().getFilenameAssignment_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Include__Group__2 + @init { + int stackSize = keepStackSize(); + } +: + rule__Include__Group__2__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__Include__Group__2__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getIncludeAccess().getSemicolonKeyword_2()); } + ';' + { after(grammarAccess.getIncludeAccess().getSemicolonKeyword_2()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__Library__Group__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__Library__Group__0__Impl + rule__Library__Group__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__Library__Group__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getLibraryAccess().getLibraryKeyword_0()); } + 'library' + { after(grammarAccess.getLibraryAccess().getLibraryKeyword_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Library__Group__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__Library__Group__1__Impl + rule__Library__Group__2 +; +finally { + restoreStackSize(stackSize); +} + +rule__Library__Group__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getLibraryAccess().getNameAssignment_1()); } + (rule__Library__NameAssignment_1) + { after(grammarAccess.getLibraryAccess().getNameAssignment_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Library__Group__2 + @init { + int stackSize = keepStackSize(); + } +: + rule__Library__Group__2__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__Library__Group__2__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getLibraryAccess().getSemicolonKeyword_2()); } + ';' + { after(grammarAccess.getLibraryAccess().getSemicolonKeyword_2()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__Insert__Group__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__Insert__Group__0__Impl + rule__Insert__Group__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__Insert__Group__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getInsertAccess().getInsertKeyword_0()); } + 'insert' + { after(grammarAccess.getInsertAccess().getInsertKeyword_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Insert__Group__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__Insert__Group__1__Impl + rule__Insert__Group__2 +; +finally { + restoreStackSize(stackSize); +} + +rule__Insert__Group__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getInsertAccess().getCategoryAssignment_1()); } + (rule__Insert__CategoryAssignment_1)? + { after(grammarAccess.getInsertAccess().getCategoryAssignment_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Insert__Group__2 + @init { + int stackSize = keepStackSize(); + } +: + rule__Insert__Group__2__Impl + rule__Insert__Group__3 +; +finally { + restoreStackSize(stackSize); +} + +rule__Insert__Group__2__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getInsertAccess().getEntityClassAssignment_2()); } + (rule__Insert__EntityClassAssignment_2) + { after(grammarAccess.getInsertAccess().getEntityClassAssignment_2()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Insert__Group__3 + @init { + int stackSize = keepStackSize(); + } +: + rule__Insert__Group__3__Impl + rule__Insert__Group__4 +; +finally { + restoreStackSize(stackSize); +} + +rule__Insert__Group__3__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getInsertAccess().getAsKeyword_3()); } + 'as' + { after(grammarAccess.getInsertAccess().getAsKeyword_3()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Insert__Group__4 + @init { + int stackSize = keepStackSize(); + } +: + rule__Insert__Group__4__Impl + rule__Insert__Group__5 +; +finally { + restoreStackSize(stackSize); +} + +rule__Insert__Group__4__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getInsertAccess().getNameAssignment_4()); } + (rule__Insert__NameAssignment_4) + { after(grammarAccess.getInsertAccess().getNameAssignment_4()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Insert__Group__5 + @init { + int stackSize = keepStackSize(); + } +: + rule__Insert__Group__5__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__Insert__Group__5__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getInsertAccess().getGroup_5()); } + (rule__Insert__Group_5__0)? + { after(grammarAccess.getInsertAccess().getGroup_5()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__Insert__Group_5__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__Insert__Group_5__0__Impl + rule__Insert__Group_5__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__Insert__Group_5__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getInsertAccess().getWithKeyword_5_0()); } + 'with' + { after(grammarAccess.getInsertAccess().getWithKeyword_5_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Insert__Group_5__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__Insert__Group_5__1__Impl + rule__Insert__Group_5__2 +; +finally { + restoreStackSize(stackSize); +} + +rule__Insert__Group_5__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getInsertAccess().getParametersAssignment_5_1()); } + (rule__Insert__ParametersAssignment_5_1) + { after(grammarAccess.getInsertAccess().getParametersAssignment_5_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Insert__Group_5__2 + @init { + int stackSize = keepStackSize(); + } +: + rule__Insert__Group_5__2__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__Insert__Group_5__2__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getInsertAccess().getGroup_5_2()); } + (rule__Insert__Group_5_2__0)* + { after(grammarAccess.getInsertAccess().getGroup_5_2()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__Insert__Group_5_2__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__Insert__Group_5_2__0__Impl + rule__Insert__Group_5_2__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__Insert__Group_5_2__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getInsertAccess().getCommaKeyword_5_2_0()); } + ',' + { after(grammarAccess.getInsertAccess().getCommaKeyword_5_2_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Insert__Group_5_2__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__Insert__Group_5_2__1__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__Insert__Group_5_2__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getInsertAccess().getParametersAssignment_5_2_1()); } + (rule__Insert__ParametersAssignment_5_2_1) + { after(grammarAccess.getInsertAccess().getParametersAssignment_5_2_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__Set__Group__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__Set__Group__0__Impl + rule__Set__Group__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__Set__Group__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getSetAccess().getSetKeyword_0()); } + 'set' + { after(grammarAccess.getSetAccess().getSetKeyword_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Set__Group__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__Set__Group__1__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__Set__Group__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getSetAccess().getParamAssignment_1()); } + (rule__Set__ParamAssignment_1) + { after(grammarAccess.getSetAccess().getParamAssignment_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__Connect__Group__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__Connect__Group__0__Impl + rule__Connect__Group__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__Connect__Group__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getConnectAccess().getConnectKeyword_0()); } + 'connect' + { after(grammarAccess.getConnectAccess().getConnectKeyword_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Connect__Group__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__Connect__Group__1__Impl + rule__Connect__Group__2 +; +finally { + restoreStackSize(stackSize); +} + +rule__Connect__Group__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getConnectAccess().getFromAssignment_1()); } + (rule__Connect__FromAssignment_1) + { after(grammarAccess.getConnectAccess().getFromAssignment_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Connect__Group__2 + @init { + int stackSize = keepStackSize(); + } +: + rule__Connect__Group__2__Impl + rule__Connect__Group__3 +; +finally { + restoreStackSize(stackSize); +} + +rule__Connect__Group__2__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getConnectAccess().getGroup_2()); } + (rule__Connect__Group_2__0)* + { after(grammarAccess.getConnectAccess().getGroup_2()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Connect__Group__3 + @init { + int stackSize = keepStackSize(); + } +: + rule__Connect__Group__3__Impl + rule__Connect__Group__4 +; +finally { + restoreStackSize(stackSize); +} + +rule__Connect__Group__3__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getConnectAccess().getToKeyword_3()); } + 'to' + { after(grammarAccess.getConnectAccess().getToKeyword_3()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Connect__Group__4 + @init { + int stackSize = keepStackSize(); + } +: + rule__Connect__Group__4__Impl + rule__Connect__Group__5 +; +finally { + restoreStackSize(stackSize); +} + +rule__Connect__Group__4__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getConnectAccess().getToAssignment_4()); } + (rule__Connect__ToAssignment_4) + { after(grammarAccess.getConnectAccess().getToAssignment_4()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Connect__Group__5 + @init { + int stackSize = keepStackSize(); + } +: + rule__Connect__Group__5__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__Connect__Group__5__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getConnectAccess().getGroup_5()); } + (rule__Connect__Group_5__0)* + { after(grammarAccess.getConnectAccess().getGroup_5()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__Connect__Group_2__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__Connect__Group_2__0__Impl + rule__Connect__Group_2__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__Connect__Group_2__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getConnectAccess().getCommaKeyword_2_0()); } + ',' + { after(grammarAccess.getConnectAccess().getCommaKeyword_2_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Connect__Group_2__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__Connect__Group_2__1__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__Connect__Group_2__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getConnectAccess().getFromAssignment_2_1()); } + (rule__Connect__FromAssignment_2_1) + { after(grammarAccess.getConnectAccess().getFromAssignment_2_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__Connect__Group_5__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__Connect__Group_5__0__Impl + rule__Connect__Group_5__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__Connect__Group_5__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getConnectAccess().getCommaKeyword_5_0()); } + ',' + { after(grammarAccess.getConnectAccess().getCommaKeyword_5_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Connect__Group_5__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__Connect__Group_5__1__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__Connect__Group_5__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getConnectAccess().getToAssignment_5_1()); } + (rule__Connect__ToAssignment_5_1) + { after(grammarAccess.getConnectAccess().getToAssignment_5_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__ConnectionPort__Group__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__ConnectionPort__Group__0__Impl + rule__ConnectionPort__Group__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__ConnectionPort__Group__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getConnectionPortAccess().getActorAssignment_0()); } + (rule__ConnectionPort__ActorAssignment_0) + { after(grammarAccess.getConnectionPortAccess().getActorAssignment_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__ConnectionPort__Group__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__ConnectionPort__Group__1__Impl + rule__ConnectionPort__Group__2 +; +finally { + restoreStackSize(stackSize); +} + +rule__ConnectionPort__Group__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getConnectionPortAccess().getFullStopKeyword_1()); } + '.' + { after(grammarAccess.getConnectionPortAccess().getFullStopKeyword_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__ConnectionPort__Group__2 + @init { + int stackSize = keepStackSize(); + } +: + rule__ConnectionPort__Group__2__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__ConnectionPort__Group__2__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getConnectionPortAccess().getPortAssignment_2()); } + (rule__ConnectionPort__PortAssignment_2) + { after(grammarAccess.getConnectionPortAccess().getPortAssignment_2()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__GoInto__Group__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__GoInto__Group__0__Impl + rule__GoInto__Group__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__GoInto__Group__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getGoIntoAccess().getGoKeyword_0()); } + 'go' + { after(grammarAccess.getGoIntoAccess().getGoKeyword_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__GoInto__Group__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__GoInto__Group__1__Impl + rule__GoInto__Group__2 +; +finally { + restoreStackSize(stackSize); +} + +rule__GoInto__Group__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getGoIntoAccess().getDirectionAssignment_1()); } + (rule__GoInto__DirectionAssignment_1) + { after(grammarAccess.getGoIntoAccess().getDirectionAssignment_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__GoInto__Group__2 + @init { + int stackSize = keepStackSize(); + } +: + rule__GoInto__Group__2__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__GoInto__Group__2__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getGoIntoAccess().getActorAssignment_2()); } + (rule__GoInto__ActorAssignment_2) + { after(grammarAccess.getGoIntoAccess().getActorAssignment_2()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__GoOut__Group__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__GoOut__Group__0__Impl + rule__GoOut__Group__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__GoOut__Group__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getGoOutAccess().getGoKeyword_0()); } + 'go' + { after(grammarAccess.getGoOutAccess().getGoKeyword_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__GoOut__Group__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__GoOut__Group__1__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__GoOut__Group__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getGoOutAccess().getDirectionAssignment_1()); } + (rule__GoOut__DirectionAssignment_1) + { after(grammarAccess.getGoOutAccess().getDirectionAssignment_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__GoTop__Group__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__GoTop__Group__0__Impl + rule__GoTop__Group__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__GoTop__Group__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getGoTopAccess().getGoKeyword_0()); } + 'go' + { after(grammarAccess.getGoTopAccess().getGoKeyword_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__GoTop__Group__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__GoTop__Group__1__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__GoTop__Group__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getGoTopAccess().getDirectionAssignment_1()); } + (rule__GoTop__DirectionAssignment_1) + { after(grammarAccess.getGoTopAccess().getDirectionAssignment_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__Parameter__Group__0 + @init { + int stackSize = keepStackSize(); + } +: + rule__Parameter__Group__0__Impl + rule__Parameter__Group__1 +; +finally { + restoreStackSize(stackSize); +} + +rule__Parameter__Group__0__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getParameterAccess().getIdAssignment_0()); } + (rule__Parameter__IdAssignment_0) + { after(grammarAccess.getParameterAccess().getIdAssignment_0()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Parameter__Group__1 + @init { + int stackSize = keepStackSize(); + } +: + rule__Parameter__Group__1__Impl + rule__Parameter__Group__2 +; +finally { + restoreStackSize(stackSize); +} + +rule__Parameter__Group__1__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getParameterAccess().getEqualsSignKeyword_1()); } + '=' + { after(grammarAccess.getParameterAccess().getEqualsSignKeyword_1()); } +) +; +finally { + restoreStackSize(stackSize); +} + +rule__Parameter__Group__2 + @init { + int stackSize = keepStackSize(); + } +: + rule__Parameter__Group__2__Impl +; +finally { + restoreStackSize(stackSize); +} + +rule__Parameter__Group__2__Impl + @init { + int stackSize = keepStackSize(); + } +: +( + { before(grammarAccess.getParameterAccess().getValueAssignment_2()); } + (rule__Parameter__ValueAssignment_2) + { after(grammarAccess.getParameterAccess().getValueAssignment_2()); } +) +; +finally { + restoreStackSize(stackSize); +} + + +rule__TriquetrumScript__LibrariesAssignment_0 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getTriquetrumScriptAccess().getLibrariesLibraryParserRuleCall_0_0()); } + ruleLibrary + { after(grammarAccess.getTriquetrumScriptAccess().getLibrariesLibraryParserRuleCall_0_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__TriquetrumScript__CommandsAssignment_1 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getTriquetrumScriptAccess().getCommandsCommandParserRuleCall_1_0()); } + ruleCommand + { after(grammarAccess.getTriquetrumScriptAccess().getCommandsCommandParserRuleCall_1_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__CompositeCommand__StartAssignment_0 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getCompositeCommandAccess().getStartGoIntoParserRuleCall_0_0()); } + ruleGoInto + { after(grammarAccess.getCompositeCommandAccess().getStartGoIntoParserRuleCall_0_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__CompositeCommand__CommandsAssignment_1 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getCompositeCommandAccess().getCommandsCommandParserRuleCall_1_0()); } + ruleCommand + { after(grammarAccess.getCompositeCommandAccess().getCommandsCommandParserRuleCall_1_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__CompositeCommand__EndAssignment_2 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getCompositeCommandAccess().getEndAlternatives_2_0()); } + (rule__CompositeCommand__EndAlternatives_2_0) + { after(grammarAccess.getCompositeCommandAccess().getEndAlternatives_2_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__Include__FilenameAssignment_1 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getIncludeAccess().getFilenameSTRINGTerminalRuleCall_1_0()); } + RULE_STRING + { after(grammarAccess.getIncludeAccess().getFilenameSTRINGTerminalRuleCall_1_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__Library__NameAssignment_1 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getLibraryAccess().getNameIDTerminalRuleCall_1_0()); } + RULE_ID + { after(grammarAccess.getLibraryAccess().getNameIDTerminalRuleCall_1_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__Insert__CategoryAssignment_1 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getInsertAccess().getCategoryCategoryEnumRuleCall_1_0()); } + ruleCategory + { after(grammarAccess.getInsertAccess().getCategoryCategoryEnumRuleCall_1_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__Insert__EntityClassAssignment_2 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getInsertAccess().getEntityClassENTITY_CLASSTerminalRuleCall_2_0()); } + RULE_ENTITY_CLASS + { after(grammarAccess.getInsertAccess().getEntityClassENTITY_CLASSTerminalRuleCall_2_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__Insert__NameAssignment_4 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getInsertAccess().getNameSTRINGTerminalRuleCall_4_0()); } + RULE_STRING + { after(grammarAccess.getInsertAccess().getNameSTRINGTerminalRuleCall_4_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__Insert__ParametersAssignment_5_1 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getInsertAccess().getParametersParameterParserRuleCall_5_1_0()); } + ruleParameter + { after(grammarAccess.getInsertAccess().getParametersParameterParserRuleCall_5_1_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__Insert__ParametersAssignment_5_2_1 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getInsertAccess().getParametersParameterParserRuleCall_5_2_1_0()); } + ruleParameter + { after(grammarAccess.getInsertAccess().getParametersParameterParserRuleCall_5_2_1_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__Set__ParamAssignment_1 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getSetAccess().getParamParameterParserRuleCall_1_0()); } + ruleParameter + { after(grammarAccess.getSetAccess().getParamParameterParserRuleCall_1_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__Connect__FromAssignment_1 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getConnectAccess().getFromConnectionPortParserRuleCall_1_0()); } + ruleConnectionPort + { after(grammarAccess.getConnectAccess().getFromConnectionPortParserRuleCall_1_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__Connect__FromAssignment_2_1 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getConnectAccess().getFromConnectionPortParserRuleCall_2_1_0()); } + ruleConnectionPort + { after(grammarAccess.getConnectAccess().getFromConnectionPortParserRuleCall_2_1_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__Connect__ToAssignment_4 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getConnectAccess().getToConnectionPortParserRuleCall_4_0()); } + ruleConnectionPort + { after(grammarAccess.getConnectAccess().getToConnectionPortParserRuleCall_4_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__Connect__ToAssignment_5_1 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getConnectAccess().getToConnectionPortParserRuleCall_5_1_0()); } + ruleConnectionPort + { after(grammarAccess.getConnectAccess().getToConnectionPortParserRuleCall_5_1_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__ConnectionPort__ActorAssignment_0 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getConnectionPortAccess().getActorInsertCrossReference_0_0()); } + ( + { before(grammarAccess.getConnectionPortAccess().getActorInsertIDTerminalRuleCall_0_0_1()); } + RULE_ID + { after(grammarAccess.getConnectionPortAccess().getActorInsertIDTerminalRuleCall_0_0_1()); } + ) + { after(grammarAccess.getConnectionPortAccess().getActorInsertCrossReference_0_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__ConnectionPort__PortAssignment_2 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getConnectionPortAccess().getPortNamedObjParserRuleCall_2_0()); } + ruleNamedObj + { after(grammarAccess.getConnectionPortAccess().getPortNamedObjParserRuleCall_2_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__GoInto__DirectionAssignment_1 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getGoIntoAccess().getDirectionIntoKeyword_1_0()); } + ( + { before(grammarAccess.getGoIntoAccess().getDirectionIntoKeyword_1_0()); } + 'into' + { after(grammarAccess.getGoIntoAccess().getDirectionIntoKeyword_1_0()); } + ) + { after(grammarAccess.getGoIntoAccess().getDirectionIntoKeyword_1_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__GoInto__ActorAssignment_2 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getGoIntoAccess().getActorInsertCrossReference_2_0()); } + ( + { before(grammarAccess.getGoIntoAccess().getActorInsertIDTerminalRuleCall_2_0_1()); } + RULE_ID + { after(grammarAccess.getGoIntoAccess().getActorInsertIDTerminalRuleCall_2_0_1()); } + ) + { after(grammarAccess.getGoIntoAccess().getActorInsertCrossReference_2_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__GoOut__DirectionAssignment_1 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getGoOutAccess().getDirectionOutKeyword_1_0()); } + ( + { before(grammarAccess.getGoOutAccess().getDirectionOutKeyword_1_0()); } + 'out' + { after(grammarAccess.getGoOutAccess().getDirectionOutKeyword_1_0()); } + ) + { after(grammarAccess.getGoOutAccess().getDirectionOutKeyword_1_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__GoTop__DirectionAssignment_1 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getGoTopAccess().getDirectionTopKeyword_1_0()); } + ( + { before(grammarAccess.getGoTopAccess().getDirectionTopKeyword_1_0()); } + 'top' + { after(grammarAccess.getGoTopAccess().getDirectionTopKeyword_1_0()); } + ) + { after(grammarAccess.getGoTopAccess().getDirectionTopKeyword_1_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__Parameter__IdAssignment_0 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getParameterAccess().getIdParameter_idParserRuleCall_0_0()); } + ruleParameter_id + { after(grammarAccess.getParameterAccess().getIdParameter_idParserRuleCall_0_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +rule__Parameter__ValueAssignment_2 + @init { + int stackSize = keepStackSize(); + } +: + ( + { before(grammarAccess.getParameterAccess().getValueSTRINGTerminalRuleCall_2_0()); } + RULE_STRING + { after(grammarAccess.getParameterAccess().getValueSTRINGTerminalRuleCall_2_0()); } + ) +; +finally { + restoreStackSize(stackSize); +} + +RULE_PARAMETER_NAME : '$' ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*; + +RULE_ENTITY_CLASS : '<' ( options {greedy=false;} : . )*'>'; + +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 : .; diff --git a/org.eclipse.triquetrum.commands.xtext.ide/src/main/java-gen/org/eclipse/triquetrum/commands/ide/contentassist/antlr/internal/InternalTqcl.tokens b/org.eclipse.triquetrum.commands.xtext.ide/src/main/java-gen/org/eclipse/triquetrum/commands/ide/contentassist/antlr/internal/InternalTqcl.tokens new file mode 100644 index 00000000..ec788d1c --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ide/src/main/java-gen/org/eclipse/triquetrum/commands/ide/contentassist/antlr/internal/InternalTqcl.tokens @@ -0,0 +1,49 @@ +','=23 +'.'=27 +';'=17 +'='=29 +'actor'=13 +'as'=21 +'connect'=25 +'director'=16 +'go'=28 +'include'=18 +'insert'=20 +'into'=30 +'library'=19 +'out'=31 +'parameter'=14 +'port'=15 +'set'=24 +'to'=26 +'top'=32 +'with'=22 +RULE_ANY_OTHER=12 +RULE_ENTITY_CLASS=7 +RULE_ID=6 +RULE_INT=8 +RULE_ML_COMMENT=9 +RULE_PARAMETER_NAME=4 +RULE_SL_COMMENT=10 +RULE_STRING=5 +RULE_WS=11 +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 +T__30=30 +T__31=31 +T__32=32 diff --git a/org.eclipse.triquetrum.commands.xtext.ide/src/main/java-gen/org/eclipse/triquetrum/commands/ide/contentassist/antlr/internal/InternalTqclLexer.java b/org.eclipse.triquetrum.commands.xtext.ide/src/main/java-gen/org/eclipse/triquetrum/commands/ide/contentassist/antlr/internal/InternalTqclLexer.java new file mode 100644 index 00000000..8ed09b3c --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ide/src/main/java-gen/org/eclipse/triquetrum/commands/ide/contentassist/antlr/internal/InternalTqclLexer.java @@ -0,0 +1,1556 @@ +package org.eclipse.triquetrum.commands.ide.contentassist.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.ide.editor.contentassist.antlr.internal.Lexer; + + +import org.antlr.runtime.*; +import java.util.Stack; +import java.util.List; +import java.util.ArrayList; + +@SuppressWarnings("all") +public class InternalTqclLexer extends Lexer { + public static final int RULE_STRING=5; + public static final int RULE_SL_COMMENT=10; + public static final int T__19=19; + public static final int T__15=15; + public static final int T__16=16; + public static final int T__17=17; + public static final int T__18=18; + public static final int T__13=13; + public static final int T__14=14; + public static final int EOF=-1; + public static final int T__30=30; + public static final int T__31=31; + public static final int T__32=32; + public static final int RULE_PARAMETER_NAME=4; + public static final int RULE_ID=6; + public static final int RULE_WS=11; + public static final int RULE_ANY_OTHER=12; + public static final int RULE_ENTITY_CLASS=7; + public static final int T__26=26; + public static final int T__27=27; + public static final int T__28=28; + public static final int RULE_INT=8; + public static final int T__29=29; + public static final int T__22=22; + public static final int RULE_ML_COMMENT=9; + public static final int T__23=23; + public static final int T__24=24; + public static final int T__25=25; + public static final int T__20=20; + public static final int T__21=21; + + // delegates + // delegators + + public InternalTqclLexer() {;} + public InternalTqclLexer(CharStream input) { + this(input, new RecognizerSharedState()); + } + public InternalTqclLexer(CharStream input, RecognizerSharedState state) { + super(input,state); + + } + public String getGrammarFileName() { return "InternalTqcl.g"; } + + // $ANTLR start "T__13" + public final void mT__13() throws RecognitionException { + try { + int _type = T__13; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:11:7: ( 'actor' ) + // InternalTqcl.g:11:9: 'actor' + { + match("actor"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__13" + + // $ANTLR start "T__14" + public final void mT__14() throws RecognitionException { + try { + int _type = T__14; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:12:7: ( 'parameter' ) + // InternalTqcl.g:12:9: 'parameter' + { + match("parameter"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__14" + + // $ANTLR start "T__15" + public final void mT__15() throws RecognitionException { + try { + int _type = T__15; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:13:7: ( 'port' ) + // InternalTqcl.g:13:9: 'port' + { + match("port"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__15" + + // $ANTLR start "T__16" + public final void mT__16() throws RecognitionException { + try { + int _type = T__16; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:14:7: ( 'director' ) + // InternalTqcl.g:14:9: 'director' + { + match("director"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__16" + + // $ANTLR start "T__17" + public final void mT__17() throws RecognitionException { + try { + int _type = T__17; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:15:7: ( ';' ) + // InternalTqcl.g:15:9: ';' + { + match(';'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__17" + + // $ANTLR start "T__18" + public final void mT__18() throws RecognitionException { + try { + int _type = T__18; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:16:7: ( 'include' ) + // InternalTqcl.g:16:9: 'include' + { + match("include"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__18" + + // $ANTLR start "T__19" + public final void mT__19() throws RecognitionException { + try { + int _type = T__19; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:17:7: ( 'library' ) + // InternalTqcl.g:17:9: 'library' + { + match("library"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__19" + + // $ANTLR start "T__20" + public final void mT__20() throws RecognitionException { + try { + int _type = T__20; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:18:7: ( 'insert' ) + // InternalTqcl.g:18:9: 'insert' + { + match("insert"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__20" + + // $ANTLR start "T__21" + public final void mT__21() throws RecognitionException { + try { + int _type = T__21; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:19:7: ( 'as' ) + // InternalTqcl.g:19:9: 'as' + { + match("as"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__21" + + // $ANTLR start "T__22" + public final void mT__22() throws RecognitionException { + try { + int _type = T__22; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:20:7: ( 'with' ) + // InternalTqcl.g:20:9: 'with' + { + match("with"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__22" + + // $ANTLR start "T__23" + public final void mT__23() throws RecognitionException { + try { + int _type = T__23; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:21:7: ( ',' ) + // InternalTqcl.g:21:9: ',' + { + match(','); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__23" + + // $ANTLR start "T__24" + public final void mT__24() throws RecognitionException { + try { + int _type = T__24; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:22:7: ( 'set' ) + // InternalTqcl.g:22:9: 'set' + { + match("set"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__24" + + // $ANTLR start "T__25" + public final void mT__25() throws RecognitionException { + try { + int _type = T__25; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:23:7: ( 'connect' ) + // InternalTqcl.g:23:9: 'connect' + { + match("connect"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__25" + + // $ANTLR start "T__26" + public final void mT__26() throws RecognitionException { + try { + int _type = T__26; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:24:7: ( 'to' ) + // InternalTqcl.g:24:9: 'to' + { + match("to"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__26" + + // $ANTLR start "T__27" + public final void mT__27() throws RecognitionException { + try { + int _type = T__27; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:25:7: ( '.' ) + // InternalTqcl.g:25:9: '.' + { + match('.'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__27" + + // $ANTLR start "T__28" + public final void mT__28() throws RecognitionException { + try { + int _type = T__28; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:26:7: ( 'go' ) + // InternalTqcl.g:26:9: 'go' + { + match("go"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__28" + + // $ANTLR start "T__29" + public final void mT__29() throws RecognitionException { + try { + int _type = T__29; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:27:7: ( '=' ) + // InternalTqcl.g:27:9: '=' + { + match('='); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__29" + + // $ANTLR start "T__30" + public final void mT__30() throws RecognitionException { + try { + int _type = T__30; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:28:7: ( 'into' ) + // InternalTqcl.g:28:9: 'into' + { + match("into"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__30" + + // $ANTLR start "T__31" + public final void mT__31() throws RecognitionException { + try { + int _type = T__31; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:29:7: ( 'out' ) + // InternalTqcl.g:29:9: 'out' + { + match("out"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__31" + + // $ANTLR start "T__32" + public final void mT__32() throws RecognitionException { + try { + int _type = T__32; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:30:7: ( 'top' ) + // InternalTqcl.g:30:9: 'top' + { + match("top"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__32" + + // $ANTLR start "RULE_PARAMETER_NAME" + public final void mRULE_PARAMETER_NAME() throws RecognitionException { + try { + int _type = RULE_PARAMETER_NAME; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:2345:21: ( '$' ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* ) + // InternalTqcl.g:2345:23: '$' ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* + { + match('$'); + if ( (input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + // InternalTqcl.g:2345:51: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* + loop1: + do { + int alt1=2; + int LA1_0 = input.LA(1); + + if ( ((LA1_0>='0' && LA1_0<='9')||(LA1_0>='A' && LA1_0<='Z')||LA1_0=='_'||(LA1_0>='a' && LA1_0<='z')) ) { + alt1=1; + } + + + switch (alt1) { + case 1 : + // InternalTqcl.g: + { + if ( (input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + break loop1; + } + } while (true); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_PARAMETER_NAME" + + // $ANTLR start "RULE_ENTITY_CLASS" + public final void mRULE_ENTITY_CLASS() throws RecognitionException { + try { + int _type = RULE_ENTITY_CLASS; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:2347:19: ( '<' ( options {greedy=false; } : . )* '>' ) + // InternalTqcl.g:2347:21: '<' ( options {greedy=false; } : . )* '>' + { + match('<'); + // InternalTqcl.g:2347:25: ( options {greedy=false; } : . )* + loop2: + do { + int alt2=2; + int LA2_0 = input.LA(1); + + if ( (LA2_0=='>') ) { + alt2=2; + } + else if ( ((LA2_0>='\u0000' && LA2_0<='=')||(LA2_0>='?' && LA2_0<='\uFFFF')) ) { + alt2=1; + } + + + switch (alt2) { + case 1 : + // InternalTqcl.g:2347:53: . + { + matchAny(); + + } + break; + + default : + break loop2; + } + } while (true); + + match('>'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_ENTITY_CLASS" + + // $ANTLR start "RULE_ID" + public final void mRULE_ID() throws RecognitionException { + try { + int _type = RULE_ID; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:2349:9: ( ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* ) + // InternalTqcl.g:2349:11: ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* + { + // InternalTqcl.g:2349:11: ( '^' )? + int alt3=2; + int LA3_0 = input.LA(1); + + if ( (LA3_0=='^') ) { + alt3=1; + } + switch (alt3) { + case 1 : + // InternalTqcl.g:2349:11: '^' + { + match('^'); + + } + break; + + } + + if ( (input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + // InternalTqcl.g:2349:40: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* + loop4: + do { + int alt4=2; + int LA4_0 = input.LA(1); + + if ( ((LA4_0>='0' && LA4_0<='9')||(LA4_0>='A' && LA4_0<='Z')||LA4_0=='_'||(LA4_0>='a' && LA4_0<='z')) ) { + alt4=1; + } + + + switch (alt4) { + case 1 : + // InternalTqcl.g: + { + if ( (input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + break loop4; + } + } while (true); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_ID" + + // $ANTLR start "RULE_INT" + public final void mRULE_INT() throws RecognitionException { + try { + int _type = RULE_INT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:2351:10: ( ( '0' .. '9' )+ ) + // InternalTqcl.g:2351:12: ( '0' .. '9' )+ + { + // InternalTqcl.g:2351:12: ( '0' .. '9' )+ + int cnt5=0; + loop5: + do { + int alt5=2; + int LA5_0 = input.LA(1); + + if ( ((LA5_0>='0' && LA5_0<='9')) ) { + alt5=1; + } + + + switch (alt5) { + case 1 : + // InternalTqcl.g:2351:13: '0' .. '9' + { + matchRange('0','9'); + + } + break; + + default : + if ( cnt5 >= 1 ) break loop5; + EarlyExitException eee = + new EarlyExitException(5, input); + throw eee; + } + cnt5++; + } while (true); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_INT" + + // $ANTLR start "RULE_STRING" + public final void mRULE_STRING() throws RecognitionException { + try { + int _type = RULE_STRING; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:2353:13: ( ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) ) + // InternalTqcl.g:2353:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) + { + // InternalTqcl.g:2353:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) + int alt8=2; + int LA8_0 = input.LA(1); + + if ( (LA8_0=='\"') ) { + alt8=1; + } + else if ( (LA8_0=='\'') ) { + alt8=2; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 8, 0, input); + + throw nvae; + } + switch (alt8) { + case 1 : + // InternalTqcl.g:2353:16: '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' + { + match('\"'); + // InternalTqcl.g:2353:20: ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* + loop6: + do { + int alt6=3; + int LA6_0 = input.LA(1); + + if ( (LA6_0=='\\') ) { + alt6=1; + } + else if ( ((LA6_0>='\u0000' && LA6_0<='!')||(LA6_0>='#' && LA6_0<='[')||(LA6_0>=']' && LA6_0<='\uFFFF')) ) { + alt6=2; + } + + + switch (alt6) { + case 1 : + // InternalTqcl.g:2353:21: '\\\\' . + { + match('\\'); + matchAny(); + + } + break; + case 2 : + // InternalTqcl.g:2353:28: ~ ( ( '\\\\' | '\"' ) ) + { + if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + break loop6; + } + } while (true); + + match('\"'); + + } + break; + case 2 : + // InternalTqcl.g:2353:48: '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' + { + match('\''); + // InternalTqcl.g:2353:53: ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* + loop7: + do { + int alt7=3; + int LA7_0 = input.LA(1); + + if ( (LA7_0=='\\') ) { + alt7=1; + } + else if ( ((LA7_0>='\u0000' && LA7_0<='&')||(LA7_0>='(' && LA7_0<='[')||(LA7_0>=']' && LA7_0<='\uFFFF')) ) { + alt7=2; + } + + + switch (alt7) { + case 1 : + // InternalTqcl.g:2353:54: '\\\\' . + { + match('\\'); + matchAny(); + + } + break; + case 2 : + // InternalTqcl.g:2353:61: ~ ( ( '\\\\' | '\\'' ) ) + { + if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + break loop7; + } + } while (true); + + match('\''); + + } + break; + + } + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_STRING" + + // $ANTLR start "RULE_ML_COMMENT" + public final void mRULE_ML_COMMENT() throws RecognitionException { + try { + int _type = RULE_ML_COMMENT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:2355:17: ( '/*' ( options {greedy=false; } : . )* '*/' ) + // InternalTqcl.g:2355:19: '/*' ( options {greedy=false; } : . )* '*/' + { + match("/*"); + + // InternalTqcl.g:2355:24: ( options {greedy=false; } : . )* + loop9: + do { + int alt9=2; + int LA9_0 = input.LA(1); + + if ( (LA9_0=='*') ) { + int LA9_1 = input.LA(2); + + if ( (LA9_1=='/') ) { + alt9=2; + } + else if ( ((LA9_1>='\u0000' && LA9_1<='.')||(LA9_1>='0' && LA9_1<='\uFFFF')) ) { + alt9=1; + } + + + } + else if ( ((LA9_0>='\u0000' && LA9_0<=')')||(LA9_0>='+' && LA9_0<='\uFFFF')) ) { + alt9=1; + } + + + switch (alt9) { + case 1 : + // InternalTqcl.g:2355:52: . + { + matchAny(); + + } + break; + + default : + break loop9; + } + } while (true); + + match("*/"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_ML_COMMENT" + + // $ANTLR start "RULE_SL_COMMENT" + public final void mRULE_SL_COMMENT() throws RecognitionException { + try { + int _type = RULE_SL_COMMENT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:2357:17: ( '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? ) + // InternalTqcl.g:2357:19: '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? + { + match("//"); + + // InternalTqcl.g:2357:24: (~ ( ( '\\n' | '\\r' ) ) )* + loop10: + do { + int alt10=2; + int LA10_0 = input.LA(1); + + if ( ((LA10_0>='\u0000' && LA10_0<='\t')||(LA10_0>='\u000B' && LA10_0<='\f')||(LA10_0>='\u000E' && LA10_0<='\uFFFF')) ) { + alt10=1; + } + + + switch (alt10) { + case 1 : + // InternalTqcl.g:2357:24: ~ ( ( '\\n' | '\\r' ) ) + { + if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFF') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + break loop10; + } + } while (true); + + // InternalTqcl.g:2357:40: ( ( '\\r' )? '\\n' )? + int alt12=2; + int LA12_0 = input.LA(1); + + if ( (LA12_0=='\n'||LA12_0=='\r') ) { + alt12=1; + } + switch (alt12) { + case 1 : + // InternalTqcl.g:2357:41: ( '\\r' )? '\\n' + { + // InternalTqcl.g:2357:41: ( '\\r' )? + int alt11=2; + int LA11_0 = input.LA(1); + + if ( (LA11_0=='\r') ) { + alt11=1; + } + switch (alt11) { + case 1 : + // InternalTqcl.g:2357:41: '\\r' + { + match('\r'); + + } + break; + + } + + match('\n'); + + } + break; + + } + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_SL_COMMENT" + + // $ANTLR start "RULE_WS" + public final void mRULE_WS() throws RecognitionException { + try { + int _type = RULE_WS; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:2359:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ ) + // InternalTqcl.g:2359:11: ( ' ' | '\\t' | '\\r' | '\\n' )+ + { + // InternalTqcl.g:2359:11: ( ' ' | '\\t' | '\\r' | '\\n' )+ + int cnt13=0; + loop13: + do { + int alt13=2; + int LA13_0 = input.LA(1); + + if ( ((LA13_0>='\t' && LA13_0<='\n')||LA13_0=='\r'||LA13_0==' ') ) { + alt13=1; + } + + + switch (alt13) { + case 1 : + // InternalTqcl.g: + { + if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)=='\r'||input.LA(1)==' ' ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + if ( cnt13 >= 1 ) break loop13; + EarlyExitException eee = + new EarlyExitException(13, input); + throw eee; + } + cnt13++; + } while (true); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_WS" + + // $ANTLR start "RULE_ANY_OTHER" + public final void mRULE_ANY_OTHER() throws RecognitionException { + try { + int _type = RULE_ANY_OTHER; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:2361:16: ( . ) + // InternalTqcl.g:2361:18: . + { + matchAny(); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_ANY_OTHER" + + public void mTokens() throws RecognitionException { + // InternalTqcl.g:1:8: ( T__13 | T__14 | T__15 | T__16 | T__17 | T__18 | T__19 | T__20 | T__21 | T__22 | T__23 | T__24 | T__25 | T__26 | T__27 | T__28 | T__29 | T__30 | T__31 | T__32 | RULE_PARAMETER_NAME | RULE_ENTITY_CLASS | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER ) + int alt14=29; + alt14 = dfa14.predict(input); + switch (alt14) { + case 1 : + // InternalTqcl.g:1:10: T__13 + { + mT__13(); + + } + break; + case 2 : + // InternalTqcl.g:1:16: T__14 + { + mT__14(); + + } + break; + case 3 : + // InternalTqcl.g:1:22: T__15 + { + mT__15(); + + } + break; + case 4 : + // InternalTqcl.g:1:28: T__16 + { + mT__16(); + + } + break; + case 5 : + // InternalTqcl.g:1:34: T__17 + { + mT__17(); + + } + break; + case 6 : + // InternalTqcl.g:1:40: T__18 + { + mT__18(); + + } + break; + case 7 : + // InternalTqcl.g:1:46: T__19 + { + mT__19(); + + } + break; + case 8 : + // InternalTqcl.g:1:52: T__20 + { + mT__20(); + + } + break; + case 9 : + // InternalTqcl.g:1:58: T__21 + { + mT__21(); + + } + break; + case 10 : + // InternalTqcl.g:1:64: T__22 + { + mT__22(); + + } + break; + case 11 : + // InternalTqcl.g:1:70: T__23 + { + mT__23(); + + } + break; + case 12 : + // InternalTqcl.g:1:76: T__24 + { + mT__24(); + + } + break; + case 13 : + // InternalTqcl.g:1:82: T__25 + { + mT__25(); + + } + break; + case 14 : + // InternalTqcl.g:1:88: T__26 + { + mT__26(); + + } + break; + case 15 : + // InternalTqcl.g:1:94: T__27 + { + mT__27(); + + } + break; + case 16 : + // InternalTqcl.g:1:100: T__28 + { + mT__28(); + + } + break; + case 17 : + // InternalTqcl.g:1:106: T__29 + { + mT__29(); + + } + break; + case 18 : + // InternalTqcl.g:1:112: T__30 + { + mT__30(); + + } + break; + case 19 : + // InternalTqcl.g:1:118: T__31 + { + mT__31(); + + } + break; + case 20 : + // InternalTqcl.g:1:124: T__32 + { + mT__32(); + + } + break; + case 21 : + // InternalTqcl.g:1:130: RULE_PARAMETER_NAME + { + mRULE_PARAMETER_NAME(); + + } + break; + case 22 : + // InternalTqcl.g:1:150: RULE_ENTITY_CLASS + { + mRULE_ENTITY_CLASS(); + + } + break; + case 23 : + // InternalTqcl.g:1:168: RULE_ID + { + mRULE_ID(); + + } + break; + case 24 : + // InternalTqcl.g:1:176: RULE_INT + { + mRULE_INT(); + + } + break; + case 25 : + // InternalTqcl.g:1:185: RULE_STRING + { + mRULE_STRING(); + + } + break; + case 26 : + // InternalTqcl.g:1:197: RULE_ML_COMMENT + { + mRULE_ML_COMMENT(); + + } + break; + case 27 : + // InternalTqcl.g:1:213: RULE_SL_COMMENT + { + mRULE_SL_COMMENT(); + + } + break; + case 28 : + // InternalTqcl.g:1:229: RULE_WS + { + mRULE_WS(); + + } + break; + case 29 : + // InternalTqcl.g:1:237: RULE_ANY_OTHER + { + mRULE_ANY_OTHER(); + + } + break; + + } + + } + + + protected DFA14 dfa14 = new DFA14(this); + static final String DFA14_eotS = + "\1\uffff\3\34\1\uffff\3\34\1\uffff\3\34\1\uffff\1\34\1\uffff\1\34\3\31\2\uffff\3\31\2\uffff\1\34\1\64\1\uffff\3\34\1\uffff\3\34\1\uffff\2\34\1\100\1\uffff\1\101\1\uffff\1\34\7\uffff\1\34\1\uffff\10\34\1\114\1\34\1\116\2\uffff\1\117\2\34\1\122\3\34\1\126\1\34\1\130\1\uffff\1\34\2\uffff\1\132\1\34\1\uffff\3\34\1\uffff\1\34\1\uffff\1\34\1\uffff\3\34\1\144\4\34\1\151\1\uffff\1\152\1\153\1\34\1\155\3\uffff\1\156\2\uffff"; + static final String DFA14_eofS = + "\157\uffff"; + static final String DFA14_minS = + "\1\0\1\143\1\141\1\151\1\uffff\1\156\2\151\1\uffff\1\145\2\157\1\uffff\1\157\1\uffff\1\165\1\101\1\0\1\101\2\uffff\2\0\1\52\2\uffff\1\164\1\60\1\uffff\3\162\1\uffff\1\143\1\142\1\164\1\uffff\1\164\1\156\1\60\1\uffff\1\60\1\uffff\1\164\7\uffff\1\157\1\uffff\1\141\1\164\1\145\1\154\1\145\1\157\1\162\1\150\1\60\1\156\1\60\2\uffff\1\60\1\162\1\155\1\60\1\143\1\165\1\162\1\60\1\141\1\60\1\uffff\1\145\2\uffff\1\60\1\145\1\uffff\1\164\1\144\1\164\1\uffff\1\162\1\uffff\1\143\1\uffff\1\164\1\157\1\145\1\60\1\171\1\164\1\145\1\162\1\60\1\uffff\2\60\1\162\1\60\3\uffff\1\60\2\uffff"; + static final String DFA14_maxS = + "\1\uffff\1\163\1\157\1\151\1\uffff\1\156\2\151\1\uffff\1\145\2\157\1\uffff\1\157\1\uffff\1\165\1\172\1\uffff\1\172\2\uffff\2\uffff\1\57\2\uffff\1\164\1\172\1\uffff\3\162\1\uffff\1\164\1\142\1\164\1\uffff\1\164\1\156\1\172\1\uffff\1\172\1\uffff\1\164\7\uffff\1\157\1\uffff\1\141\1\164\1\145\1\154\1\145\1\157\1\162\1\150\1\172\1\156\1\172\2\uffff\1\172\1\162\1\155\1\172\1\143\1\165\1\162\1\172\1\141\1\172\1\uffff\1\145\2\uffff\1\172\1\145\1\uffff\1\164\1\144\1\164\1\uffff\1\162\1\uffff\1\143\1\uffff\1\164\1\157\1\145\1\172\1\171\1\164\1\145\1\162\1\172\1\uffff\2\172\1\162\1\172\3\uffff\1\172\2\uffff"; + static final String DFA14_acceptS = + "\4\uffff\1\5\3\uffff\1\13\3\uffff\1\17\1\uffff\1\21\4\uffff\1\27\1\30\3\uffff\1\34\1\35\2\uffff\1\27\3\uffff\1\5\3\uffff\1\13\3\uffff\1\17\1\uffff\1\21\1\uffff\1\25\1\26\1\30\1\31\1\32\1\33\1\34\1\uffff\1\11\13\uffff\1\16\1\20\12\uffff\1\14\1\uffff\1\24\1\23\2\uffff\1\3\3\uffff\1\22\1\uffff\1\12\1\uffff\1\1\11\uffff\1\10\4\uffff\1\6\1\7\1\15\1\uffff\1\4\1\2"; + static final String DFA14_specialS = + "\1\2\20\uffff\1\1\3\uffff\1\0\1\3\130\uffff}>"; + static final String[] DFA14_transitionS = { + "\11\31\2\30\2\31\1\30\22\31\1\30\1\31\1\25\1\31\1\20\2\31\1\26\4\31\1\10\1\31\1\14\1\27\12\24\1\31\1\4\1\21\1\16\3\31\32\23\3\31\1\22\1\23\1\31\1\1\1\23\1\12\1\3\2\23\1\15\1\23\1\5\2\23\1\6\2\23\1\17\1\2\2\23\1\11\1\13\2\23\1\7\3\23\uff85\31", + "\1\32\17\uffff\1\33", + "\1\35\15\uffff\1\36", + "\1\37", + "", + "\1\41", + "\1\42", + "\1\43", + "", + "\1\45", + "\1\46", + "\1\47", + "", + "\1\51", + "", + "\1\53", + "\32\54\4\uffff\1\54\1\uffff\32\54", + "\0\55", + "\32\34\4\uffff\1\34\1\uffff\32\34", + "", + "", + "\0\57", + "\0\57", + "\1\60\4\uffff\1\61", + "", + "", + "\1\63", + "\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\32\34", + "", + "\1\65", + "\1\66", + "\1\67", + "", + "\1\70\17\uffff\1\71\1\72", + "\1\73", + "\1\74", + "", + "\1\75", + "\1\76", + "\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\17\34\1\77\12\34", + "", + "\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\32\34", + "", + "\1\102", + "", + "", + "", + "", + "", + "", + "", + "\1\103", + "", + "\1\104", + "\1\105", + "\1\106", + "\1\107", + "\1\110", + "\1\111", + "\1\112", + "\1\113", + "\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\32\34", + "\1\115", + "\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\32\34", + "", + "", + "\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\32\34", + "\1\120", + "\1\121", + "\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\32\34", + "\1\123", + "\1\124", + "\1\125", + "\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\32\34", + "\1\127", + "\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\32\34", + "", + "\1\131", + "", + "", + "\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\32\34", + "\1\133", + "", + "\1\134", + "\1\135", + "\1\136", + "", + "\1\137", + "", + "\1\140", + "", + "\1\141", + "\1\142", + "\1\143", + "\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\32\34", + "\1\145", + "\1\146", + "\1\147", + "\1\150", + "\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\32\34", + "", + "\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\32\34", + "\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\32\34", + "\1\154", + "\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\32\34", + "", + "", + "", + "\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\32\34", + "", + "" + }; + + static final short[] DFA14_eot = DFA.unpackEncodedString(DFA14_eotS); + static final short[] DFA14_eof = DFA.unpackEncodedString(DFA14_eofS); + static final char[] DFA14_min = DFA.unpackEncodedStringToUnsignedChars(DFA14_minS); + static final char[] DFA14_max = DFA.unpackEncodedStringToUnsignedChars(DFA14_maxS); + static final short[] DFA14_accept = DFA.unpackEncodedString(DFA14_acceptS); + static final short[] DFA14_special = DFA.unpackEncodedString(DFA14_specialS); + static final short[][] DFA14_transition; + + static { + int numStates = DFA14_transitionS.length; + DFA14_transition = new short[numStates][]; + for (int i=0; i='\u0000' && LA14_21<='\uFFFF')) ) {s = 47;} + + else s = 25; + + if ( s>=0 ) return s; + break; + case 1 : + int LA14_17 = input.LA(1); + + s = -1; + if ( ((LA14_17>='\u0000' && LA14_17<='\uFFFF')) ) {s = 45;} + + else s = 25; + + if ( s>=0 ) return s; + break; + case 2 : + int LA14_0 = input.LA(1); + + s = -1; + if ( (LA14_0=='a') ) {s = 1;} + + else if ( (LA14_0=='p') ) {s = 2;} + + else if ( (LA14_0=='d') ) {s = 3;} + + else if ( (LA14_0==';') ) {s = 4;} + + else if ( (LA14_0=='i') ) {s = 5;} + + else if ( (LA14_0=='l') ) {s = 6;} + + else if ( (LA14_0=='w') ) {s = 7;} + + else if ( (LA14_0==',') ) {s = 8;} + + else if ( (LA14_0=='s') ) {s = 9;} + + else if ( (LA14_0=='c') ) {s = 10;} + + else if ( (LA14_0=='t') ) {s = 11;} + + else if ( (LA14_0=='.') ) {s = 12;} + + else if ( (LA14_0=='g') ) {s = 13;} + + else if ( (LA14_0=='=') ) {s = 14;} + + else if ( (LA14_0=='o') ) {s = 15;} + + else if ( (LA14_0=='$') ) {s = 16;} + + else if ( (LA14_0=='<') ) {s = 17;} + + else if ( (LA14_0=='^') ) {s = 18;} + + else if ( ((LA14_0>='A' && LA14_0<='Z')||LA14_0=='_'||LA14_0=='b'||(LA14_0>='e' && LA14_0<='f')||LA14_0=='h'||(LA14_0>='j' && LA14_0<='k')||(LA14_0>='m' && LA14_0<='n')||(LA14_0>='q' && LA14_0<='r')||(LA14_0>='u' && LA14_0<='v')||(LA14_0>='x' && LA14_0<='z')) ) {s = 19;} + + else if ( ((LA14_0>='0' && LA14_0<='9')) ) {s = 20;} + + else if ( (LA14_0=='\"') ) {s = 21;} + + else if ( (LA14_0=='\'') ) {s = 22;} + + else if ( (LA14_0=='/') ) {s = 23;} + + else if ( ((LA14_0>='\t' && LA14_0<='\n')||LA14_0=='\r'||LA14_0==' ') ) {s = 24;} + + else if ( ((LA14_0>='\u0000' && LA14_0<='\b')||(LA14_0>='\u000B' && LA14_0<='\f')||(LA14_0>='\u000E' && LA14_0<='\u001F')||LA14_0=='!'||LA14_0=='#'||(LA14_0>='%' && LA14_0<='&')||(LA14_0>='(' && LA14_0<='+')||LA14_0=='-'||LA14_0==':'||(LA14_0>='>' && LA14_0<='@')||(LA14_0>='[' && LA14_0<=']')||LA14_0=='`'||(LA14_0>='{' && LA14_0<='\uFFFF')) ) {s = 25;} + + if ( s>=0 ) return s; + break; + case 3 : + int LA14_22 = input.LA(1); + + s = -1; + if ( ((LA14_22>='\u0000' && LA14_22<='\uFFFF')) ) {s = 47;} + + else s = 25; + + if ( s>=0 ) return s; + break; + } + NoViableAltException nvae = + new NoViableAltException(getDescription(), 14, _s, input); + error(nvae); + throw nvae; + } + } + + +} \ No newline at end of file diff --git a/org.eclipse.triquetrum.commands.xtext.ide/src/main/java-gen/org/eclipse/triquetrum/commands/ide/contentassist/antlr/internal/InternalTqclParser.java b/org.eclipse.triquetrum.commands.xtext.ide/src/main/java-gen/org/eclipse/triquetrum/commands/ide/contentassist/antlr/internal/InternalTqclParser.java new file mode 100644 index 00000000..66558d80 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ide/src/main/java-gen/org/eclipse/triquetrum/commands/ide/contentassist/antlr/internal/InternalTqclParser.java @@ -0,0 +1,7050 @@ +package org.eclipse.triquetrum.commands.ide.contentassist.antlr.internal; + +import java.io.InputStream; +import org.eclipse.xtext.*; +import org.eclipse.xtext.parser.*; +import org.eclipse.xtext.parser.impl.*; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.xtext.parser.antlr.XtextTokenStream; +import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens; +import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.AbstractInternalContentAssistParser; +import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.DFA; +import org.eclipse.triquetrum.commands.services.TqclGrammarAccess; + + + +import org.antlr.runtime.*; +import java.util.Stack; +import java.util.List; +import java.util.ArrayList; + +/******************************************************************************* + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +@SuppressWarnings("all") +public class InternalTqclParser extends AbstractInternalContentAssistParser { + public static final String[] tokenNames = new String[] { + "", "", "", "", "RULE_PARAMETER_NAME", "RULE_STRING", "RULE_ID", "RULE_ENTITY_CLASS", "RULE_INT", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS", "RULE_ANY_OTHER", "'actor'", "'parameter'", "'port'", "'director'", "';'", "'include'", "'library'", "'insert'", "'as'", "'with'", "','", "'set'", "'connect'", "'to'", "'.'", "'go'", "'='", "'into'", "'out'", "'top'" + }; + public static final int RULE_STRING=5; + public static final int RULE_SL_COMMENT=10; + public static final int T__19=19; + public static final int T__15=15; + public static final int T__16=16; + public static final int T__17=17; + public static final int T__18=18; + public static final int T__13=13; + public static final int T__14=14; + public static final int EOF=-1; + public static final int T__30=30; + public static final int T__31=31; + public static final int T__32=32; + public static final int RULE_PARAMETER_NAME=4; + public static final int RULE_ID=6; + public static final int RULE_WS=11; + public static final int RULE_ANY_OTHER=12; + public static final int RULE_ENTITY_CLASS=7; + public static final int T__26=26; + public static final int T__27=27; + public static final int T__28=28; + public static final int RULE_INT=8; + public static final int T__29=29; + public static final int T__22=22; + public static final int RULE_ML_COMMENT=9; + public static final int T__23=23; + public static final int T__24=24; + public static final int T__25=25; + public static final int T__20=20; + public static final int T__21=21; + + // delegates + // delegators + + + public InternalTqclParser(TokenStream input) { + this(input, new RecognizerSharedState()); + } + public InternalTqclParser(TokenStream input, RecognizerSharedState state) { + super(input, state); + + } + + + public String[] getTokenNames() { return InternalTqclParser.tokenNames; } + public String getGrammarFileName() { return "InternalTqcl.g"; } + + + private TqclGrammarAccess grammarAccess; + + public void setGrammarAccess(TqclGrammarAccess grammarAccess) { + this.grammarAccess = grammarAccess; + } + + @Override + protected Grammar getGrammar() { + return grammarAccess.getGrammar(); + } + + @Override + protected String getValueForTokenName(String tokenName) { + return tokenName; + } + + + + // $ANTLR start "entryRuleTriquetrumScript" + // InternalTqcl.g:62:1: entryRuleTriquetrumScript : ruleTriquetrumScript EOF ; + public final void entryRuleTriquetrumScript() throws RecognitionException { + try { + // InternalTqcl.g:63:1: ( ruleTriquetrumScript EOF ) + // InternalTqcl.g:64:1: ruleTriquetrumScript EOF + { + before(grammarAccess.getTriquetrumScriptRule()); + pushFollow(FOLLOW_1); + ruleTriquetrumScript(); + + state._fsp--; + + after(grammarAccess.getTriquetrumScriptRule()); + match(input,EOF,FOLLOW_2); + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + } + return ; + } + // $ANTLR end "entryRuleTriquetrumScript" + + + // $ANTLR start "ruleTriquetrumScript" + // InternalTqcl.g:71:1: ruleTriquetrumScript : ( ( rule__TriquetrumScript__Group__0 ) ) ; + public final void ruleTriquetrumScript() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:75:2: ( ( ( rule__TriquetrumScript__Group__0 ) ) ) + // InternalTqcl.g:76:2: ( ( rule__TriquetrumScript__Group__0 ) ) + { + // InternalTqcl.g:76:2: ( ( rule__TriquetrumScript__Group__0 ) ) + // InternalTqcl.g:77:3: ( rule__TriquetrumScript__Group__0 ) + { + before(grammarAccess.getTriquetrumScriptAccess().getGroup()); + // InternalTqcl.g:78:3: ( rule__TriquetrumScript__Group__0 ) + // InternalTqcl.g:78:4: rule__TriquetrumScript__Group__0 + { + pushFollow(FOLLOW_2); + rule__TriquetrumScript__Group__0(); + + state._fsp--; + + + } + + after(grammarAccess.getTriquetrumScriptAccess().getGroup()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleTriquetrumScript" + + + // $ANTLR start "entryRuleCompositeCommand" + // InternalTqcl.g:87:1: entryRuleCompositeCommand : ruleCompositeCommand EOF ; + public final void entryRuleCompositeCommand() throws RecognitionException { + try { + // InternalTqcl.g:88:1: ( ruleCompositeCommand EOF ) + // InternalTqcl.g:89:1: ruleCompositeCommand EOF + { + before(grammarAccess.getCompositeCommandRule()); + pushFollow(FOLLOW_1); + ruleCompositeCommand(); + + state._fsp--; + + after(grammarAccess.getCompositeCommandRule()); + match(input,EOF,FOLLOW_2); + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + } + return ; + } + // $ANTLR end "entryRuleCompositeCommand" + + + // $ANTLR start "ruleCompositeCommand" + // InternalTqcl.g:96:1: ruleCompositeCommand : ( ( rule__CompositeCommand__Group__0 ) ) ; + public final void ruleCompositeCommand() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:100:2: ( ( ( rule__CompositeCommand__Group__0 ) ) ) + // InternalTqcl.g:101:2: ( ( rule__CompositeCommand__Group__0 ) ) + { + // InternalTqcl.g:101:2: ( ( rule__CompositeCommand__Group__0 ) ) + // InternalTqcl.g:102:3: ( rule__CompositeCommand__Group__0 ) + { + before(grammarAccess.getCompositeCommandAccess().getGroup()); + // InternalTqcl.g:103:3: ( rule__CompositeCommand__Group__0 ) + // InternalTqcl.g:103:4: rule__CompositeCommand__Group__0 + { + pushFollow(FOLLOW_2); + rule__CompositeCommand__Group__0(); + + state._fsp--; + + + } + + after(grammarAccess.getCompositeCommandAccess().getGroup()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleCompositeCommand" + + + // $ANTLR start "entryRuleSimpleCommand" + // InternalTqcl.g:112:1: entryRuleSimpleCommand : ruleSimpleCommand EOF ; + public final void entryRuleSimpleCommand() throws RecognitionException { + try { + // InternalTqcl.g:113:1: ( ruleSimpleCommand EOF ) + // InternalTqcl.g:114:1: ruleSimpleCommand EOF + { + before(grammarAccess.getSimpleCommandRule()); + pushFollow(FOLLOW_1); + ruleSimpleCommand(); + + state._fsp--; + + after(grammarAccess.getSimpleCommandRule()); + match(input,EOF,FOLLOW_2); + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + } + return ; + } + // $ANTLR end "entryRuleSimpleCommand" + + + // $ANTLR start "ruleSimpleCommand" + // InternalTqcl.g:121:1: ruleSimpleCommand : ( ( rule__SimpleCommand__Group__0 ) ) ; + public final void ruleSimpleCommand() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:125:2: ( ( ( rule__SimpleCommand__Group__0 ) ) ) + // InternalTqcl.g:126:2: ( ( rule__SimpleCommand__Group__0 ) ) + { + // InternalTqcl.g:126:2: ( ( rule__SimpleCommand__Group__0 ) ) + // InternalTqcl.g:127:3: ( rule__SimpleCommand__Group__0 ) + { + before(grammarAccess.getSimpleCommandAccess().getGroup()); + // InternalTqcl.g:128:3: ( rule__SimpleCommand__Group__0 ) + // InternalTqcl.g:128:4: rule__SimpleCommand__Group__0 + { + pushFollow(FOLLOW_2); + rule__SimpleCommand__Group__0(); + + state._fsp--; + + + } + + after(grammarAccess.getSimpleCommandAccess().getGroup()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleSimpleCommand" + + + // $ANTLR start "entryRuleCommand" + // InternalTqcl.g:137:1: entryRuleCommand : ruleCommand EOF ; + public final void entryRuleCommand() throws RecognitionException { + try { + // InternalTqcl.g:138:1: ( ruleCommand EOF ) + // InternalTqcl.g:139:1: ruleCommand EOF + { + before(grammarAccess.getCommandRule()); + pushFollow(FOLLOW_1); + ruleCommand(); + + state._fsp--; + + after(grammarAccess.getCommandRule()); + match(input,EOF,FOLLOW_2); + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + } + return ; + } + // $ANTLR end "entryRuleCommand" + + + // $ANTLR start "ruleCommand" + // InternalTqcl.g:146:1: ruleCommand : ( ( rule__Command__Alternatives ) ) ; + public final void ruleCommand() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:150:2: ( ( ( rule__Command__Alternatives ) ) ) + // InternalTqcl.g:151:2: ( ( rule__Command__Alternatives ) ) + { + // InternalTqcl.g:151:2: ( ( rule__Command__Alternatives ) ) + // InternalTqcl.g:152:3: ( rule__Command__Alternatives ) + { + before(grammarAccess.getCommandAccess().getAlternatives()); + // InternalTqcl.g:153:3: ( rule__Command__Alternatives ) + // InternalTqcl.g:153:4: rule__Command__Alternatives + { + pushFollow(FOLLOW_2); + rule__Command__Alternatives(); + + state._fsp--; + + + } + + after(grammarAccess.getCommandAccess().getAlternatives()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleCommand" + + + // $ANTLR start "entryRuleInclude" + // InternalTqcl.g:162:1: entryRuleInclude : ruleInclude EOF ; + public final void entryRuleInclude() throws RecognitionException { + try { + // InternalTqcl.g:163:1: ( ruleInclude EOF ) + // InternalTqcl.g:164:1: ruleInclude EOF + { + before(grammarAccess.getIncludeRule()); + pushFollow(FOLLOW_1); + ruleInclude(); + + state._fsp--; + + after(grammarAccess.getIncludeRule()); + match(input,EOF,FOLLOW_2); + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + } + return ; + } + // $ANTLR end "entryRuleInclude" + + + // $ANTLR start "ruleInclude" + // InternalTqcl.g:171:1: ruleInclude : ( ( rule__Include__Group__0 ) ) ; + public final void ruleInclude() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:175:2: ( ( ( rule__Include__Group__0 ) ) ) + // InternalTqcl.g:176:2: ( ( rule__Include__Group__0 ) ) + { + // InternalTqcl.g:176:2: ( ( rule__Include__Group__0 ) ) + // InternalTqcl.g:177:3: ( rule__Include__Group__0 ) + { + before(grammarAccess.getIncludeAccess().getGroup()); + // InternalTqcl.g:178:3: ( rule__Include__Group__0 ) + // InternalTqcl.g:178:4: rule__Include__Group__0 + { + pushFollow(FOLLOW_2); + rule__Include__Group__0(); + + state._fsp--; + + + } + + after(grammarAccess.getIncludeAccess().getGroup()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleInclude" + + + // $ANTLR start "entryRuleLibrary" + // InternalTqcl.g:187:1: entryRuleLibrary : ruleLibrary EOF ; + public final void entryRuleLibrary() throws RecognitionException { + try { + // InternalTqcl.g:188:1: ( ruleLibrary EOF ) + // InternalTqcl.g:189:1: ruleLibrary EOF + { + before(grammarAccess.getLibraryRule()); + pushFollow(FOLLOW_1); + ruleLibrary(); + + state._fsp--; + + after(grammarAccess.getLibraryRule()); + match(input,EOF,FOLLOW_2); + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + } + return ; + } + // $ANTLR end "entryRuleLibrary" + + + // $ANTLR start "ruleLibrary" + // InternalTqcl.g:196:1: ruleLibrary : ( ( rule__Library__Group__0 ) ) ; + public final void ruleLibrary() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:200:2: ( ( ( rule__Library__Group__0 ) ) ) + // InternalTqcl.g:201:2: ( ( rule__Library__Group__0 ) ) + { + // InternalTqcl.g:201:2: ( ( rule__Library__Group__0 ) ) + // InternalTqcl.g:202:3: ( rule__Library__Group__0 ) + { + before(grammarAccess.getLibraryAccess().getGroup()); + // InternalTqcl.g:203:3: ( rule__Library__Group__0 ) + // InternalTqcl.g:203:4: rule__Library__Group__0 + { + pushFollow(FOLLOW_2); + rule__Library__Group__0(); + + state._fsp--; + + + } + + after(grammarAccess.getLibraryAccess().getGroup()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleLibrary" + + + // $ANTLR start "entryRuleInsert" + // InternalTqcl.g:212:1: entryRuleInsert : ruleInsert EOF ; + public final void entryRuleInsert() throws RecognitionException { + try { + // InternalTqcl.g:213:1: ( ruleInsert EOF ) + // InternalTqcl.g:214:1: ruleInsert EOF + { + before(grammarAccess.getInsertRule()); + pushFollow(FOLLOW_1); + ruleInsert(); + + state._fsp--; + + after(grammarAccess.getInsertRule()); + match(input,EOF,FOLLOW_2); + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + } + return ; + } + // $ANTLR end "entryRuleInsert" + + + // $ANTLR start "ruleInsert" + // InternalTqcl.g:221:1: ruleInsert : ( ( rule__Insert__Group__0 ) ) ; + public final void ruleInsert() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:225:2: ( ( ( rule__Insert__Group__0 ) ) ) + // InternalTqcl.g:226:2: ( ( rule__Insert__Group__0 ) ) + { + // InternalTqcl.g:226:2: ( ( rule__Insert__Group__0 ) ) + // InternalTqcl.g:227:3: ( rule__Insert__Group__0 ) + { + before(grammarAccess.getInsertAccess().getGroup()); + // InternalTqcl.g:228:3: ( rule__Insert__Group__0 ) + // InternalTqcl.g:228:4: rule__Insert__Group__0 + { + pushFollow(FOLLOW_2); + rule__Insert__Group__0(); + + state._fsp--; + + + } + + after(grammarAccess.getInsertAccess().getGroup()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleInsert" + + + // $ANTLR start "entryRuleSet" + // InternalTqcl.g:237:1: entryRuleSet : ruleSet EOF ; + public final void entryRuleSet() throws RecognitionException { + try { + // InternalTqcl.g:238:1: ( ruleSet EOF ) + // InternalTqcl.g:239:1: ruleSet EOF + { + before(grammarAccess.getSetRule()); + pushFollow(FOLLOW_1); + ruleSet(); + + state._fsp--; + + after(grammarAccess.getSetRule()); + match(input,EOF,FOLLOW_2); + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + } + return ; + } + // $ANTLR end "entryRuleSet" + + + // $ANTLR start "ruleSet" + // InternalTqcl.g:246:1: ruleSet : ( ( rule__Set__Group__0 ) ) ; + public final void ruleSet() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:250:2: ( ( ( rule__Set__Group__0 ) ) ) + // InternalTqcl.g:251:2: ( ( rule__Set__Group__0 ) ) + { + // InternalTqcl.g:251:2: ( ( rule__Set__Group__0 ) ) + // InternalTqcl.g:252:3: ( rule__Set__Group__0 ) + { + before(grammarAccess.getSetAccess().getGroup()); + // InternalTqcl.g:253:3: ( rule__Set__Group__0 ) + // InternalTqcl.g:253:4: rule__Set__Group__0 + { + pushFollow(FOLLOW_2); + rule__Set__Group__0(); + + state._fsp--; + + + } + + after(grammarAccess.getSetAccess().getGroup()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleSet" + + + // $ANTLR start "entryRuleConnect" + // InternalTqcl.g:262:1: entryRuleConnect : ruleConnect EOF ; + public final void entryRuleConnect() throws RecognitionException { + try { + // InternalTqcl.g:263:1: ( ruleConnect EOF ) + // InternalTqcl.g:264:1: ruleConnect EOF + { + before(grammarAccess.getConnectRule()); + pushFollow(FOLLOW_1); + ruleConnect(); + + state._fsp--; + + after(grammarAccess.getConnectRule()); + match(input,EOF,FOLLOW_2); + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + } + return ; + } + // $ANTLR end "entryRuleConnect" + + + // $ANTLR start "ruleConnect" + // InternalTqcl.g:271:1: ruleConnect : ( ( rule__Connect__Group__0 ) ) ; + public final void ruleConnect() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:275:2: ( ( ( rule__Connect__Group__0 ) ) ) + // InternalTqcl.g:276:2: ( ( rule__Connect__Group__0 ) ) + { + // InternalTqcl.g:276:2: ( ( rule__Connect__Group__0 ) ) + // InternalTqcl.g:277:3: ( rule__Connect__Group__0 ) + { + before(grammarAccess.getConnectAccess().getGroup()); + // InternalTqcl.g:278:3: ( rule__Connect__Group__0 ) + // InternalTqcl.g:278:4: rule__Connect__Group__0 + { + pushFollow(FOLLOW_2); + rule__Connect__Group__0(); + + state._fsp--; + + + } + + after(grammarAccess.getConnectAccess().getGroup()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleConnect" + + + // $ANTLR start "entryRuleConnectionPort" + // InternalTqcl.g:287:1: entryRuleConnectionPort : ruleConnectionPort EOF ; + public final void entryRuleConnectionPort() throws RecognitionException { + try { + // InternalTqcl.g:288:1: ( ruleConnectionPort EOF ) + // InternalTqcl.g:289:1: ruleConnectionPort EOF + { + before(grammarAccess.getConnectionPortRule()); + pushFollow(FOLLOW_1); + ruleConnectionPort(); + + state._fsp--; + + after(grammarAccess.getConnectionPortRule()); + match(input,EOF,FOLLOW_2); + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + } + return ; + } + // $ANTLR end "entryRuleConnectionPort" + + + // $ANTLR start "ruleConnectionPort" + // InternalTqcl.g:296:1: ruleConnectionPort : ( ( rule__ConnectionPort__Group__0 ) ) ; + public final void ruleConnectionPort() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:300:2: ( ( ( rule__ConnectionPort__Group__0 ) ) ) + // InternalTqcl.g:301:2: ( ( rule__ConnectionPort__Group__0 ) ) + { + // InternalTqcl.g:301:2: ( ( rule__ConnectionPort__Group__0 ) ) + // InternalTqcl.g:302:3: ( rule__ConnectionPort__Group__0 ) + { + before(grammarAccess.getConnectionPortAccess().getGroup()); + // InternalTqcl.g:303:3: ( rule__ConnectionPort__Group__0 ) + // InternalTqcl.g:303:4: rule__ConnectionPort__Group__0 + { + pushFollow(FOLLOW_2); + rule__ConnectionPort__Group__0(); + + state._fsp--; + + + } + + after(grammarAccess.getConnectionPortAccess().getGroup()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleConnectionPort" + + + // $ANTLR start "entryRuleGoInto" + // InternalTqcl.g:312:1: entryRuleGoInto : ruleGoInto EOF ; + public final void entryRuleGoInto() throws RecognitionException { + try { + // InternalTqcl.g:313:1: ( ruleGoInto EOF ) + // InternalTqcl.g:314:1: ruleGoInto EOF + { + before(grammarAccess.getGoIntoRule()); + pushFollow(FOLLOW_1); + ruleGoInto(); + + state._fsp--; + + after(grammarAccess.getGoIntoRule()); + match(input,EOF,FOLLOW_2); + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + } + return ; + } + // $ANTLR end "entryRuleGoInto" + + + // $ANTLR start "ruleGoInto" + // InternalTqcl.g:321:1: ruleGoInto : ( ( rule__GoInto__Group__0 ) ) ; + public final void ruleGoInto() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:325:2: ( ( ( rule__GoInto__Group__0 ) ) ) + // InternalTqcl.g:326:2: ( ( rule__GoInto__Group__0 ) ) + { + // InternalTqcl.g:326:2: ( ( rule__GoInto__Group__0 ) ) + // InternalTqcl.g:327:3: ( rule__GoInto__Group__0 ) + { + before(grammarAccess.getGoIntoAccess().getGroup()); + // InternalTqcl.g:328:3: ( rule__GoInto__Group__0 ) + // InternalTqcl.g:328:4: rule__GoInto__Group__0 + { + pushFollow(FOLLOW_2); + rule__GoInto__Group__0(); + + state._fsp--; + + + } + + after(grammarAccess.getGoIntoAccess().getGroup()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleGoInto" + + + // $ANTLR start "entryRuleGoOut" + // InternalTqcl.g:337:1: entryRuleGoOut : ruleGoOut EOF ; + public final void entryRuleGoOut() throws RecognitionException { + try { + // InternalTqcl.g:338:1: ( ruleGoOut EOF ) + // InternalTqcl.g:339:1: ruleGoOut EOF + { + before(grammarAccess.getGoOutRule()); + pushFollow(FOLLOW_1); + ruleGoOut(); + + state._fsp--; + + after(grammarAccess.getGoOutRule()); + match(input,EOF,FOLLOW_2); + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + } + return ; + } + // $ANTLR end "entryRuleGoOut" + + + // $ANTLR start "ruleGoOut" + // InternalTqcl.g:346:1: ruleGoOut : ( ( rule__GoOut__Group__0 ) ) ; + public final void ruleGoOut() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:350:2: ( ( ( rule__GoOut__Group__0 ) ) ) + // InternalTqcl.g:351:2: ( ( rule__GoOut__Group__0 ) ) + { + // InternalTqcl.g:351:2: ( ( rule__GoOut__Group__0 ) ) + // InternalTqcl.g:352:3: ( rule__GoOut__Group__0 ) + { + before(grammarAccess.getGoOutAccess().getGroup()); + // InternalTqcl.g:353:3: ( rule__GoOut__Group__0 ) + // InternalTqcl.g:353:4: rule__GoOut__Group__0 + { + pushFollow(FOLLOW_2); + rule__GoOut__Group__0(); + + state._fsp--; + + + } + + after(grammarAccess.getGoOutAccess().getGroup()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleGoOut" + + + // $ANTLR start "entryRuleGoTop" + // InternalTqcl.g:362:1: entryRuleGoTop : ruleGoTop EOF ; + public final void entryRuleGoTop() throws RecognitionException { + try { + // InternalTqcl.g:363:1: ( ruleGoTop EOF ) + // InternalTqcl.g:364:1: ruleGoTop EOF + { + before(grammarAccess.getGoTopRule()); + pushFollow(FOLLOW_1); + ruleGoTop(); + + state._fsp--; + + after(grammarAccess.getGoTopRule()); + match(input,EOF,FOLLOW_2); + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + } + return ; + } + // $ANTLR end "entryRuleGoTop" + + + // $ANTLR start "ruleGoTop" + // InternalTqcl.g:371:1: ruleGoTop : ( ( rule__GoTop__Group__0 ) ) ; + public final void ruleGoTop() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:375:2: ( ( ( rule__GoTop__Group__0 ) ) ) + // InternalTqcl.g:376:2: ( ( rule__GoTop__Group__0 ) ) + { + // InternalTqcl.g:376:2: ( ( rule__GoTop__Group__0 ) ) + // InternalTqcl.g:377:3: ( rule__GoTop__Group__0 ) + { + before(grammarAccess.getGoTopAccess().getGroup()); + // InternalTqcl.g:378:3: ( rule__GoTop__Group__0 ) + // InternalTqcl.g:378:4: rule__GoTop__Group__0 + { + pushFollow(FOLLOW_2); + rule__GoTop__Group__0(); + + state._fsp--; + + + } + + after(grammarAccess.getGoTopAccess().getGroup()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleGoTop" + + + // $ANTLR start "entryRuleParameter" + // InternalTqcl.g:387:1: entryRuleParameter : ruleParameter EOF ; + public final void entryRuleParameter() throws RecognitionException { + try { + // InternalTqcl.g:388:1: ( ruleParameter EOF ) + // InternalTqcl.g:389:1: ruleParameter EOF + { + before(grammarAccess.getParameterRule()); + pushFollow(FOLLOW_1); + ruleParameter(); + + state._fsp--; + + after(grammarAccess.getParameterRule()); + match(input,EOF,FOLLOW_2); + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + } + return ; + } + // $ANTLR end "entryRuleParameter" + + + // $ANTLR start "ruleParameter" + // InternalTqcl.g:396:1: ruleParameter : ( ( rule__Parameter__Group__0 ) ) ; + public final void ruleParameter() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:400:2: ( ( ( rule__Parameter__Group__0 ) ) ) + // InternalTqcl.g:401:2: ( ( rule__Parameter__Group__0 ) ) + { + // InternalTqcl.g:401:2: ( ( rule__Parameter__Group__0 ) ) + // InternalTqcl.g:402:3: ( rule__Parameter__Group__0 ) + { + before(grammarAccess.getParameterAccess().getGroup()); + // InternalTqcl.g:403:3: ( rule__Parameter__Group__0 ) + // InternalTqcl.g:403:4: rule__Parameter__Group__0 + { + pushFollow(FOLLOW_2); + rule__Parameter__Group__0(); + + state._fsp--; + + + } + + after(grammarAccess.getParameterAccess().getGroup()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleParameter" + + + // $ANTLR start "entryRuleParameter_id" + // InternalTqcl.g:412:1: entryRuleParameter_id : ruleParameter_id EOF ; + public final void entryRuleParameter_id() throws RecognitionException { + try { + // InternalTqcl.g:413:1: ( ruleParameter_id EOF ) + // InternalTqcl.g:414:1: ruleParameter_id EOF + { + before(grammarAccess.getParameter_idRule()); + pushFollow(FOLLOW_1); + ruleParameter_id(); + + state._fsp--; + + after(grammarAccess.getParameter_idRule()); + match(input,EOF,FOLLOW_2); + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + } + return ; + } + // $ANTLR end "entryRuleParameter_id" + + + // $ANTLR start "ruleParameter_id" + // InternalTqcl.g:421:1: ruleParameter_id : ( ( rule__Parameter_id__Alternatives ) ) ; + public final void ruleParameter_id() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:425:2: ( ( ( rule__Parameter_id__Alternatives ) ) ) + // InternalTqcl.g:426:2: ( ( rule__Parameter_id__Alternatives ) ) + { + // InternalTqcl.g:426:2: ( ( rule__Parameter_id__Alternatives ) ) + // InternalTqcl.g:427:3: ( rule__Parameter_id__Alternatives ) + { + before(grammarAccess.getParameter_idAccess().getAlternatives()); + // InternalTqcl.g:428:3: ( rule__Parameter_id__Alternatives ) + // InternalTqcl.g:428:4: rule__Parameter_id__Alternatives + { + pushFollow(FOLLOW_2); + rule__Parameter_id__Alternatives(); + + state._fsp--; + + + } + + after(grammarAccess.getParameter_idAccess().getAlternatives()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleParameter_id" + + + // $ANTLR start "entryRuleNamedObj" + // InternalTqcl.g:437:1: entryRuleNamedObj : ruleNamedObj EOF ; + public final void entryRuleNamedObj() throws RecognitionException { + try { + // InternalTqcl.g:438:1: ( ruleNamedObj EOF ) + // InternalTqcl.g:439:1: ruleNamedObj EOF + { + before(grammarAccess.getNamedObjRule()); + pushFollow(FOLLOW_1); + ruleNamedObj(); + + state._fsp--; + + after(grammarAccess.getNamedObjRule()); + match(input,EOF,FOLLOW_2); + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + } + return ; + } + // $ANTLR end "entryRuleNamedObj" + + + // $ANTLR start "ruleNamedObj" + // InternalTqcl.g:446:1: ruleNamedObj : ( ( rule__NamedObj__Alternatives ) ) ; + public final void ruleNamedObj() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:450:2: ( ( ( rule__NamedObj__Alternatives ) ) ) + // InternalTqcl.g:451:2: ( ( rule__NamedObj__Alternatives ) ) + { + // InternalTqcl.g:451:2: ( ( rule__NamedObj__Alternatives ) ) + // InternalTqcl.g:452:3: ( rule__NamedObj__Alternatives ) + { + before(grammarAccess.getNamedObjAccess().getAlternatives()); + // InternalTqcl.g:453:3: ( rule__NamedObj__Alternatives ) + // InternalTqcl.g:453:4: rule__NamedObj__Alternatives + { + pushFollow(FOLLOW_2); + rule__NamedObj__Alternatives(); + + state._fsp--; + + + } + + after(grammarAccess.getNamedObjAccess().getAlternatives()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleNamedObj" + + + // $ANTLR start "ruleCategory" + // InternalTqcl.g:462:1: ruleCategory : ( ( rule__Category__Alternatives ) ) ; + public final void ruleCategory() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:466:1: ( ( ( rule__Category__Alternatives ) ) ) + // InternalTqcl.g:467:2: ( ( rule__Category__Alternatives ) ) + { + // InternalTqcl.g:467:2: ( ( rule__Category__Alternatives ) ) + // InternalTqcl.g:468:3: ( rule__Category__Alternatives ) + { + before(grammarAccess.getCategoryAccess().getAlternatives()); + // InternalTqcl.g:469:3: ( rule__Category__Alternatives ) + // InternalTqcl.g:469:4: rule__Category__Alternatives + { + pushFollow(FOLLOW_2); + rule__Category__Alternatives(); + + state._fsp--; + + + } + + after(grammarAccess.getCategoryAccess().getAlternatives()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "ruleCategory" + + + // $ANTLR start "rule__CompositeCommand__EndAlternatives_2_0" + // InternalTqcl.g:477:1: rule__CompositeCommand__EndAlternatives_2_0 : ( ( ruleGoOut ) | ( ruleGoTop ) ); + public final void rule__CompositeCommand__EndAlternatives_2_0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:481:1: ( ( ruleGoOut ) | ( ruleGoTop ) ) + int alt1=2; + int LA1_0 = input.LA(1); + + if ( (LA1_0==28) ) { + int LA1_1 = input.LA(2); + + if ( (LA1_1==32) ) { + alt1=2; + } + else if ( (LA1_1==31) ) { + alt1=1; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 1, 1, input); + + throw nvae; + } + } + else { + NoViableAltException nvae = + new NoViableAltException("", 1, 0, input); + + throw nvae; + } + switch (alt1) { + case 1 : + // InternalTqcl.g:482:2: ( ruleGoOut ) + { + // InternalTqcl.g:482:2: ( ruleGoOut ) + // InternalTqcl.g:483:3: ruleGoOut + { + before(grammarAccess.getCompositeCommandAccess().getEndGoOutParserRuleCall_2_0_0()); + pushFollow(FOLLOW_2); + ruleGoOut(); + + state._fsp--; + + after(grammarAccess.getCompositeCommandAccess().getEndGoOutParserRuleCall_2_0_0()); + + } + + + } + break; + case 2 : + // InternalTqcl.g:488:2: ( ruleGoTop ) + { + // InternalTqcl.g:488:2: ( ruleGoTop ) + // InternalTqcl.g:489:3: ruleGoTop + { + before(grammarAccess.getCompositeCommandAccess().getEndGoTopParserRuleCall_2_0_1()); + pushFollow(FOLLOW_2); + ruleGoTop(); + + state._fsp--; + + after(grammarAccess.getCompositeCommandAccess().getEndGoTopParserRuleCall_2_0_1()); + + } + + + } + break; + + } + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__CompositeCommand__EndAlternatives_2_0" + + + // $ANTLR start "rule__SimpleCommand__Alternatives_0" + // InternalTqcl.g:498:1: rule__SimpleCommand__Alternatives_0 : ( ( ruleInsert ) | ( ruleConnect ) | ( ruleSet ) | ( ruleInclude ) ); + public final void rule__SimpleCommand__Alternatives_0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:502:1: ( ( ruleInsert ) | ( ruleConnect ) | ( ruleSet ) | ( ruleInclude ) ) + int alt2=4; + switch ( input.LA(1) ) { + case 20: + { + alt2=1; + } + break; + case 25: + { + alt2=2; + } + break; + case 24: + { + alt2=3; + } + break; + case 18: + { + alt2=4; + } + break; + default: + NoViableAltException nvae = + new NoViableAltException("", 2, 0, input); + + throw nvae; + } + + switch (alt2) { + case 1 : + // InternalTqcl.g:503:2: ( ruleInsert ) + { + // InternalTqcl.g:503:2: ( ruleInsert ) + // InternalTqcl.g:504:3: ruleInsert + { + before(grammarAccess.getSimpleCommandAccess().getInsertParserRuleCall_0_0()); + pushFollow(FOLLOW_2); + ruleInsert(); + + state._fsp--; + + after(grammarAccess.getSimpleCommandAccess().getInsertParserRuleCall_0_0()); + + } + + + } + break; + case 2 : + // InternalTqcl.g:509:2: ( ruleConnect ) + { + // InternalTqcl.g:509:2: ( ruleConnect ) + // InternalTqcl.g:510:3: ruleConnect + { + before(grammarAccess.getSimpleCommandAccess().getConnectParserRuleCall_0_1()); + pushFollow(FOLLOW_2); + ruleConnect(); + + state._fsp--; + + after(grammarAccess.getSimpleCommandAccess().getConnectParserRuleCall_0_1()); + + } + + + } + break; + case 3 : + // InternalTqcl.g:515:2: ( ruleSet ) + { + // InternalTqcl.g:515:2: ( ruleSet ) + // InternalTqcl.g:516:3: ruleSet + { + before(grammarAccess.getSimpleCommandAccess().getSetParserRuleCall_0_2()); + pushFollow(FOLLOW_2); + ruleSet(); + + state._fsp--; + + after(grammarAccess.getSimpleCommandAccess().getSetParserRuleCall_0_2()); + + } + + + } + break; + case 4 : + // InternalTqcl.g:521:2: ( ruleInclude ) + { + // InternalTqcl.g:521:2: ( ruleInclude ) + // InternalTqcl.g:522:3: ruleInclude + { + before(grammarAccess.getSimpleCommandAccess().getIncludeParserRuleCall_0_3()); + pushFollow(FOLLOW_2); + ruleInclude(); + + state._fsp--; + + after(grammarAccess.getSimpleCommandAccess().getIncludeParserRuleCall_0_3()); + + } + + + } + break; + + } + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__SimpleCommand__Alternatives_0" + + + // $ANTLR start "rule__Command__Alternatives" + // InternalTqcl.g:531:1: rule__Command__Alternatives : ( ( ruleSimpleCommand ) | ( ruleCompositeCommand ) ); + public final void rule__Command__Alternatives() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:535:1: ( ( ruleSimpleCommand ) | ( ruleCompositeCommand ) ) + int alt3=2; + int LA3_0 = input.LA(1); + + if ( (LA3_0==18||LA3_0==20||(LA3_0>=24 && LA3_0<=25)) ) { + alt3=1; + } + else if ( (LA3_0==28) ) { + alt3=2; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 3, 0, input); + + throw nvae; + } + switch (alt3) { + case 1 : + // InternalTqcl.g:536:2: ( ruleSimpleCommand ) + { + // InternalTqcl.g:536:2: ( ruleSimpleCommand ) + // InternalTqcl.g:537:3: ruleSimpleCommand + { + before(grammarAccess.getCommandAccess().getSimpleCommandParserRuleCall_0()); + pushFollow(FOLLOW_2); + ruleSimpleCommand(); + + state._fsp--; + + after(grammarAccess.getCommandAccess().getSimpleCommandParserRuleCall_0()); + + } + + + } + break; + case 2 : + // InternalTqcl.g:542:2: ( ruleCompositeCommand ) + { + // InternalTqcl.g:542:2: ( ruleCompositeCommand ) + // InternalTqcl.g:543:3: ruleCompositeCommand + { + before(grammarAccess.getCommandAccess().getCompositeCommandParserRuleCall_1()); + pushFollow(FOLLOW_2); + ruleCompositeCommand(); + + state._fsp--; + + after(grammarAccess.getCommandAccess().getCompositeCommandParserRuleCall_1()); + + } + + + } + break; + + } + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Command__Alternatives" + + + // $ANTLR start "rule__Parameter_id__Alternatives" + // InternalTqcl.g:552:1: rule__Parameter_id__Alternatives : ( ( RULE_PARAMETER_NAME ) | ( RULE_STRING ) ); + public final void rule__Parameter_id__Alternatives() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:556:1: ( ( RULE_PARAMETER_NAME ) | ( RULE_STRING ) ) + int alt4=2; + int LA4_0 = input.LA(1); + + if ( (LA4_0==RULE_PARAMETER_NAME) ) { + alt4=1; + } + else if ( (LA4_0==RULE_STRING) ) { + alt4=2; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 4, 0, input); + + throw nvae; + } + switch (alt4) { + case 1 : + // InternalTqcl.g:557:2: ( RULE_PARAMETER_NAME ) + { + // InternalTqcl.g:557:2: ( RULE_PARAMETER_NAME ) + // InternalTqcl.g:558:3: RULE_PARAMETER_NAME + { + before(grammarAccess.getParameter_idAccess().getPARAMETER_NAMETerminalRuleCall_0()); + match(input,RULE_PARAMETER_NAME,FOLLOW_2); + after(grammarAccess.getParameter_idAccess().getPARAMETER_NAMETerminalRuleCall_0()); + + } + + + } + break; + case 2 : + // InternalTqcl.g:563:2: ( RULE_STRING ) + { + // InternalTqcl.g:563:2: ( RULE_STRING ) + // InternalTqcl.g:564:3: RULE_STRING + { + before(grammarAccess.getParameter_idAccess().getSTRINGTerminalRuleCall_1()); + match(input,RULE_STRING,FOLLOW_2); + after(grammarAccess.getParameter_idAccess().getSTRINGTerminalRuleCall_1()); + + } + + + } + break; + + } + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Parameter_id__Alternatives" + + + // $ANTLR start "rule__NamedObj__Alternatives" + // InternalTqcl.g:573:1: rule__NamedObj__Alternatives : ( ( RULE_ID ) | ( RULE_STRING ) ); + public final void rule__NamedObj__Alternatives() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:577:1: ( ( RULE_ID ) | ( RULE_STRING ) ) + int alt5=2; + int LA5_0 = input.LA(1); + + if ( (LA5_0==RULE_ID) ) { + alt5=1; + } + else if ( (LA5_0==RULE_STRING) ) { + alt5=2; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 5, 0, input); + + throw nvae; + } + switch (alt5) { + case 1 : + // InternalTqcl.g:578:2: ( RULE_ID ) + { + // InternalTqcl.g:578:2: ( RULE_ID ) + // InternalTqcl.g:579:3: RULE_ID + { + before(grammarAccess.getNamedObjAccess().getIDTerminalRuleCall_0()); + match(input,RULE_ID,FOLLOW_2); + after(grammarAccess.getNamedObjAccess().getIDTerminalRuleCall_0()); + + } + + + } + break; + case 2 : + // InternalTqcl.g:584:2: ( RULE_STRING ) + { + // InternalTqcl.g:584:2: ( RULE_STRING ) + // InternalTqcl.g:585:3: RULE_STRING + { + before(grammarAccess.getNamedObjAccess().getSTRINGTerminalRuleCall_1()); + match(input,RULE_STRING,FOLLOW_2); + after(grammarAccess.getNamedObjAccess().getSTRINGTerminalRuleCall_1()); + + } + + + } + break; + + } + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__NamedObj__Alternatives" + + + // $ANTLR start "rule__Category__Alternatives" + // InternalTqcl.g:594:1: rule__Category__Alternatives : ( ( ( 'actor' ) ) | ( ( 'parameter' ) ) | ( ( 'port' ) ) | ( ( 'director' ) ) ); + public final void rule__Category__Alternatives() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:598:1: ( ( ( 'actor' ) ) | ( ( 'parameter' ) ) | ( ( 'port' ) ) | ( ( 'director' ) ) ) + int alt6=4; + switch ( input.LA(1) ) { + case 13: + { + alt6=1; + } + break; + case 14: + { + alt6=2; + } + break; + case 15: + { + alt6=3; + } + break; + case 16: + { + alt6=4; + } + break; + default: + NoViableAltException nvae = + new NoViableAltException("", 6, 0, input); + + throw nvae; + } + + switch (alt6) { + case 1 : + // InternalTqcl.g:599:2: ( ( 'actor' ) ) + { + // InternalTqcl.g:599:2: ( ( 'actor' ) ) + // InternalTqcl.g:600:3: ( 'actor' ) + { + before(grammarAccess.getCategoryAccess().getActorEnumLiteralDeclaration_0()); + // InternalTqcl.g:601:3: ( 'actor' ) + // InternalTqcl.g:601:4: 'actor' + { + match(input,13,FOLLOW_2); + + } + + after(grammarAccess.getCategoryAccess().getActorEnumLiteralDeclaration_0()); + + } + + + } + break; + case 2 : + // InternalTqcl.g:605:2: ( ( 'parameter' ) ) + { + // InternalTqcl.g:605:2: ( ( 'parameter' ) ) + // InternalTqcl.g:606:3: ( 'parameter' ) + { + before(grammarAccess.getCategoryAccess().getParameterEnumLiteralDeclaration_1()); + // InternalTqcl.g:607:3: ( 'parameter' ) + // InternalTqcl.g:607:4: 'parameter' + { + match(input,14,FOLLOW_2); + + } + + after(grammarAccess.getCategoryAccess().getParameterEnumLiteralDeclaration_1()); + + } + + + } + break; + case 3 : + // InternalTqcl.g:611:2: ( ( 'port' ) ) + { + // InternalTqcl.g:611:2: ( ( 'port' ) ) + // InternalTqcl.g:612:3: ( 'port' ) + { + before(grammarAccess.getCategoryAccess().getPortEnumLiteralDeclaration_2()); + // InternalTqcl.g:613:3: ( 'port' ) + // InternalTqcl.g:613:4: 'port' + { + match(input,15,FOLLOW_2); + + } + + after(grammarAccess.getCategoryAccess().getPortEnumLiteralDeclaration_2()); + + } + + + } + break; + case 4 : + // InternalTqcl.g:617:2: ( ( 'director' ) ) + { + // InternalTqcl.g:617:2: ( ( 'director' ) ) + // InternalTqcl.g:618:3: ( 'director' ) + { + before(grammarAccess.getCategoryAccess().getDirectorEnumLiteralDeclaration_3()); + // InternalTqcl.g:619:3: ( 'director' ) + // InternalTqcl.g:619:4: 'director' + { + match(input,16,FOLLOW_2); + + } + + after(grammarAccess.getCategoryAccess().getDirectorEnumLiteralDeclaration_3()); + + } + + + } + break; + + } + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Category__Alternatives" + + + // $ANTLR start "rule__TriquetrumScript__Group__0" + // InternalTqcl.g:627:1: rule__TriquetrumScript__Group__0 : rule__TriquetrumScript__Group__0__Impl rule__TriquetrumScript__Group__1 ; + public final void rule__TriquetrumScript__Group__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:631:1: ( rule__TriquetrumScript__Group__0__Impl rule__TriquetrumScript__Group__1 ) + // InternalTqcl.g:632:2: rule__TriquetrumScript__Group__0__Impl rule__TriquetrumScript__Group__1 + { + pushFollow(FOLLOW_3); + rule__TriquetrumScript__Group__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__TriquetrumScript__Group__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__TriquetrumScript__Group__0" + + + // $ANTLR start "rule__TriquetrumScript__Group__0__Impl" + // InternalTqcl.g:639:1: rule__TriquetrumScript__Group__0__Impl : ( ( rule__TriquetrumScript__LibrariesAssignment_0 )* ) ; + public final void rule__TriquetrumScript__Group__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:643:1: ( ( ( rule__TriquetrumScript__LibrariesAssignment_0 )* ) ) + // InternalTqcl.g:644:1: ( ( rule__TriquetrumScript__LibrariesAssignment_0 )* ) + { + // InternalTqcl.g:644:1: ( ( rule__TriquetrumScript__LibrariesAssignment_0 )* ) + // InternalTqcl.g:645:2: ( rule__TriquetrumScript__LibrariesAssignment_0 )* + { + before(grammarAccess.getTriquetrumScriptAccess().getLibrariesAssignment_0()); + // InternalTqcl.g:646:2: ( rule__TriquetrumScript__LibrariesAssignment_0 )* + loop7: + do { + int alt7=2; + int LA7_0 = input.LA(1); + + if ( (LA7_0==19) ) { + alt7=1; + } + + + switch (alt7) { + case 1 : + // InternalTqcl.g:646:3: rule__TriquetrumScript__LibrariesAssignment_0 + { + pushFollow(FOLLOW_4); + rule__TriquetrumScript__LibrariesAssignment_0(); + + state._fsp--; + + + } + break; + + default : + break loop7; + } + } while (true); + + after(grammarAccess.getTriquetrumScriptAccess().getLibrariesAssignment_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__TriquetrumScript__Group__0__Impl" + + + // $ANTLR start "rule__TriquetrumScript__Group__1" + // InternalTqcl.g:654:1: rule__TriquetrumScript__Group__1 : rule__TriquetrumScript__Group__1__Impl ; + public final void rule__TriquetrumScript__Group__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:658:1: ( rule__TriquetrumScript__Group__1__Impl ) + // InternalTqcl.g:659:2: rule__TriquetrumScript__Group__1__Impl + { + pushFollow(FOLLOW_2); + rule__TriquetrumScript__Group__1__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__TriquetrumScript__Group__1" + + + // $ANTLR start "rule__TriquetrumScript__Group__1__Impl" + // InternalTqcl.g:665:1: rule__TriquetrumScript__Group__1__Impl : ( ( rule__TriquetrumScript__CommandsAssignment_1 )* ) ; + public final void rule__TriquetrumScript__Group__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:669:1: ( ( ( rule__TriquetrumScript__CommandsAssignment_1 )* ) ) + // InternalTqcl.g:670:1: ( ( rule__TriquetrumScript__CommandsAssignment_1 )* ) + { + // InternalTqcl.g:670:1: ( ( rule__TriquetrumScript__CommandsAssignment_1 )* ) + // InternalTqcl.g:671:2: ( rule__TriquetrumScript__CommandsAssignment_1 )* + { + before(grammarAccess.getTriquetrumScriptAccess().getCommandsAssignment_1()); + // InternalTqcl.g:672:2: ( rule__TriquetrumScript__CommandsAssignment_1 )* + loop8: + do { + int alt8=2; + int LA8_0 = input.LA(1); + + if ( (LA8_0==18||LA8_0==20||(LA8_0>=24 && LA8_0<=25)||LA8_0==28) ) { + alt8=1; + } + + + switch (alt8) { + case 1 : + // InternalTqcl.g:672:3: rule__TriquetrumScript__CommandsAssignment_1 + { + pushFollow(FOLLOW_5); + rule__TriquetrumScript__CommandsAssignment_1(); + + state._fsp--; + + + } + break; + + default : + break loop8; + } + } while (true); + + after(grammarAccess.getTriquetrumScriptAccess().getCommandsAssignment_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__TriquetrumScript__Group__1__Impl" + + + // $ANTLR start "rule__CompositeCommand__Group__0" + // InternalTqcl.g:681:1: rule__CompositeCommand__Group__0 : rule__CompositeCommand__Group__0__Impl rule__CompositeCommand__Group__1 ; + public final void rule__CompositeCommand__Group__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:685:1: ( rule__CompositeCommand__Group__0__Impl rule__CompositeCommand__Group__1 ) + // InternalTqcl.g:686:2: rule__CompositeCommand__Group__0__Impl rule__CompositeCommand__Group__1 + { + pushFollow(FOLLOW_3); + rule__CompositeCommand__Group__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__CompositeCommand__Group__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__CompositeCommand__Group__0" + + + // $ANTLR start "rule__CompositeCommand__Group__0__Impl" + // InternalTqcl.g:693:1: rule__CompositeCommand__Group__0__Impl : ( ( rule__CompositeCommand__StartAssignment_0 ) ) ; + public final void rule__CompositeCommand__Group__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:697:1: ( ( ( rule__CompositeCommand__StartAssignment_0 ) ) ) + // InternalTqcl.g:698:1: ( ( rule__CompositeCommand__StartAssignment_0 ) ) + { + // InternalTqcl.g:698:1: ( ( rule__CompositeCommand__StartAssignment_0 ) ) + // InternalTqcl.g:699:2: ( rule__CompositeCommand__StartAssignment_0 ) + { + before(grammarAccess.getCompositeCommandAccess().getStartAssignment_0()); + // InternalTqcl.g:700:2: ( rule__CompositeCommand__StartAssignment_0 ) + // InternalTqcl.g:700:3: rule__CompositeCommand__StartAssignment_0 + { + pushFollow(FOLLOW_2); + rule__CompositeCommand__StartAssignment_0(); + + state._fsp--; + + + } + + after(grammarAccess.getCompositeCommandAccess().getStartAssignment_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__CompositeCommand__Group__0__Impl" + + + // $ANTLR start "rule__CompositeCommand__Group__1" + // InternalTqcl.g:708:1: rule__CompositeCommand__Group__1 : rule__CompositeCommand__Group__1__Impl rule__CompositeCommand__Group__2 ; + public final void rule__CompositeCommand__Group__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:712:1: ( rule__CompositeCommand__Group__1__Impl rule__CompositeCommand__Group__2 ) + // InternalTqcl.g:713:2: rule__CompositeCommand__Group__1__Impl rule__CompositeCommand__Group__2 + { + pushFollow(FOLLOW_3); + rule__CompositeCommand__Group__1__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__CompositeCommand__Group__2(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__CompositeCommand__Group__1" + + + // $ANTLR start "rule__CompositeCommand__Group__1__Impl" + // InternalTqcl.g:720:1: rule__CompositeCommand__Group__1__Impl : ( ( rule__CompositeCommand__CommandsAssignment_1 )* ) ; + public final void rule__CompositeCommand__Group__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:724:1: ( ( ( rule__CompositeCommand__CommandsAssignment_1 )* ) ) + // InternalTqcl.g:725:1: ( ( rule__CompositeCommand__CommandsAssignment_1 )* ) + { + // InternalTqcl.g:725:1: ( ( rule__CompositeCommand__CommandsAssignment_1 )* ) + // InternalTqcl.g:726:2: ( rule__CompositeCommand__CommandsAssignment_1 )* + { + before(grammarAccess.getCompositeCommandAccess().getCommandsAssignment_1()); + // InternalTqcl.g:727:2: ( rule__CompositeCommand__CommandsAssignment_1 )* + loop9: + do { + int alt9=2; + int LA9_0 = input.LA(1); + + if ( (LA9_0==28) ) { + int LA9_1 = input.LA(2); + + if ( (LA9_1==30) ) { + alt9=1; + } + + + } + else if ( (LA9_0==18||LA9_0==20||(LA9_0>=24 && LA9_0<=25)) ) { + alt9=1; + } + + + switch (alt9) { + case 1 : + // InternalTqcl.g:727:3: rule__CompositeCommand__CommandsAssignment_1 + { + pushFollow(FOLLOW_5); + rule__CompositeCommand__CommandsAssignment_1(); + + state._fsp--; + + + } + break; + + default : + break loop9; + } + } while (true); + + after(grammarAccess.getCompositeCommandAccess().getCommandsAssignment_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__CompositeCommand__Group__1__Impl" + + + // $ANTLR start "rule__CompositeCommand__Group__2" + // InternalTqcl.g:735:1: rule__CompositeCommand__Group__2 : rule__CompositeCommand__Group__2__Impl ; + public final void rule__CompositeCommand__Group__2() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:739:1: ( rule__CompositeCommand__Group__2__Impl ) + // InternalTqcl.g:740:2: rule__CompositeCommand__Group__2__Impl + { + pushFollow(FOLLOW_2); + rule__CompositeCommand__Group__2__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__CompositeCommand__Group__2" + + + // $ANTLR start "rule__CompositeCommand__Group__2__Impl" + // InternalTqcl.g:746:1: rule__CompositeCommand__Group__2__Impl : ( ( rule__CompositeCommand__EndAssignment_2 ) ) ; + public final void rule__CompositeCommand__Group__2__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:750:1: ( ( ( rule__CompositeCommand__EndAssignment_2 ) ) ) + // InternalTqcl.g:751:1: ( ( rule__CompositeCommand__EndAssignment_2 ) ) + { + // InternalTqcl.g:751:1: ( ( rule__CompositeCommand__EndAssignment_2 ) ) + // InternalTqcl.g:752:2: ( rule__CompositeCommand__EndAssignment_2 ) + { + before(grammarAccess.getCompositeCommandAccess().getEndAssignment_2()); + // InternalTqcl.g:753:2: ( rule__CompositeCommand__EndAssignment_2 ) + // InternalTqcl.g:753:3: rule__CompositeCommand__EndAssignment_2 + { + pushFollow(FOLLOW_2); + rule__CompositeCommand__EndAssignment_2(); + + state._fsp--; + + + } + + after(grammarAccess.getCompositeCommandAccess().getEndAssignment_2()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__CompositeCommand__Group__2__Impl" + + + // $ANTLR start "rule__SimpleCommand__Group__0" + // InternalTqcl.g:762:1: rule__SimpleCommand__Group__0 : rule__SimpleCommand__Group__0__Impl rule__SimpleCommand__Group__1 ; + public final void rule__SimpleCommand__Group__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:766:1: ( rule__SimpleCommand__Group__0__Impl rule__SimpleCommand__Group__1 ) + // InternalTqcl.g:767:2: rule__SimpleCommand__Group__0__Impl rule__SimpleCommand__Group__1 + { + pushFollow(FOLLOW_6); + rule__SimpleCommand__Group__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__SimpleCommand__Group__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__SimpleCommand__Group__0" + + + // $ANTLR start "rule__SimpleCommand__Group__0__Impl" + // InternalTqcl.g:774:1: rule__SimpleCommand__Group__0__Impl : ( ( rule__SimpleCommand__Alternatives_0 ) ) ; + public final void rule__SimpleCommand__Group__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:778:1: ( ( ( rule__SimpleCommand__Alternatives_0 ) ) ) + // InternalTqcl.g:779:1: ( ( rule__SimpleCommand__Alternatives_0 ) ) + { + // InternalTqcl.g:779:1: ( ( rule__SimpleCommand__Alternatives_0 ) ) + // InternalTqcl.g:780:2: ( rule__SimpleCommand__Alternatives_0 ) + { + before(grammarAccess.getSimpleCommandAccess().getAlternatives_0()); + // InternalTqcl.g:781:2: ( rule__SimpleCommand__Alternatives_0 ) + // InternalTqcl.g:781:3: rule__SimpleCommand__Alternatives_0 + { + pushFollow(FOLLOW_2); + rule__SimpleCommand__Alternatives_0(); + + state._fsp--; + + + } + + after(grammarAccess.getSimpleCommandAccess().getAlternatives_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__SimpleCommand__Group__0__Impl" + + + // $ANTLR start "rule__SimpleCommand__Group__1" + // InternalTqcl.g:789:1: rule__SimpleCommand__Group__1 : rule__SimpleCommand__Group__1__Impl ; + public final void rule__SimpleCommand__Group__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:793:1: ( rule__SimpleCommand__Group__1__Impl ) + // InternalTqcl.g:794:2: rule__SimpleCommand__Group__1__Impl + { + pushFollow(FOLLOW_2); + rule__SimpleCommand__Group__1__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__SimpleCommand__Group__1" + + + // $ANTLR start "rule__SimpleCommand__Group__1__Impl" + // InternalTqcl.g:800:1: rule__SimpleCommand__Group__1__Impl : ( ';' ) ; + public final void rule__SimpleCommand__Group__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:804:1: ( ( ';' ) ) + // InternalTqcl.g:805:1: ( ';' ) + { + // InternalTqcl.g:805:1: ( ';' ) + // InternalTqcl.g:806:2: ';' + { + before(grammarAccess.getSimpleCommandAccess().getSemicolonKeyword_1()); + match(input,17,FOLLOW_2); + after(grammarAccess.getSimpleCommandAccess().getSemicolonKeyword_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__SimpleCommand__Group__1__Impl" + + + // $ANTLR start "rule__Include__Group__0" + // InternalTqcl.g:816:1: rule__Include__Group__0 : rule__Include__Group__0__Impl rule__Include__Group__1 ; + public final void rule__Include__Group__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:820:1: ( rule__Include__Group__0__Impl rule__Include__Group__1 ) + // InternalTqcl.g:821:2: rule__Include__Group__0__Impl rule__Include__Group__1 + { + pushFollow(FOLLOW_7); + rule__Include__Group__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Include__Group__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Include__Group__0" + + + // $ANTLR start "rule__Include__Group__0__Impl" + // InternalTqcl.g:828:1: rule__Include__Group__0__Impl : ( 'include' ) ; + public final void rule__Include__Group__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:832:1: ( ( 'include' ) ) + // InternalTqcl.g:833:1: ( 'include' ) + { + // InternalTqcl.g:833:1: ( 'include' ) + // InternalTqcl.g:834:2: 'include' + { + before(grammarAccess.getIncludeAccess().getIncludeKeyword_0()); + match(input,18,FOLLOW_2); + after(grammarAccess.getIncludeAccess().getIncludeKeyword_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Include__Group__0__Impl" + + + // $ANTLR start "rule__Include__Group__1" + // InternalTqcl.g:843:1: rule__Include__Group__1 : rule__Include__Group__1__Impl rule__Include__Group__2 ; + public final void rule__Include__Group__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:847:1: ( rule__Include__Group__1__Impl rule__Include__Group__2 ) + // InternalTqcl.g:848:2: rule__Include__Group__1__Impl rule__Include__Group__2 + { + pushFollow(FOLLOW_6); + rule__Include__Group__1__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Include__Group__2(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Include__Group__1" + + + // $ANTLR start "rule__Include__Group__1__Impl" + // InternalTqcl.g:855:1: rule__Include__Group__1__Impl : ( ( rule__Include__FilenameAssignment_1 ) ) ; + public final void rule__Include__Group__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:859:1: ( ( ( rule__Include__FilenameAssignment_1 ) ) ) + // InternalTqcl.g:860:1: ( ( rule__Include__FilenameAssignment_1 ) ) + { + // InternalTqcl.g:860:1: ( ( rule__Include__FilenameAssignment_1 ) ) + // InternalTqcl.g:861:2: ( rule__Include__FilenameAssignment_1 ) + { + before(grammarAccess.getIncludeAccess().getFilenameAssignment_1()); + // InternalTqcl.g:862:2: ( rule__Include__FilenameAssignment_1 ) + // InternalTqcl.g:862:3: rule__Include__FilenameAssignment_1 + { + pushFollow(FOLLOW_2); + rule__Include__FilenameAssignment_1(); + + state._fsp--; + + + } + + after(grammarAccess.getIncludeAccess().getFilenameAssignment_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Include__Group__1__Impl" + + + // $ANTLR start "rule__Include__Group__2" + // InternalTqcl.g:870:1: rule__Include__Group__2 : rule__Include__Group__2__Impl ; + public final void rule__Include__Group__2() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:874:1: ( rule__Include__Group__2__Impl ) + // InternalTqcl.g:875:2: rule__Include__Group__2__Impl + { + pushFollow(FOLLOW_2); + rule__Include__Group__2__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Include__Group__2" + + + // $ANTLR start "rule__Include__Group__2__Impl" + // InternalTqcl.g:881:1: rule__Include__Group__2__Impl : ( ';' ) ; + public final void rule__Include__Group__2__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:885:1: ( ( ';' ) ) + // InternalTqcl.g:886:1: ( ';' ) + { + // InternalTqcl.g:886:1: ( ';' ) + // InternalTqcl.g:887:2: ';' + { + before(grammarAccess.getIncludeAccess().getSemicolonKeyword_2()); + match(input,17,FOLLOW_2); + after(grammarAccess.getIncludeAccess().getSemicolonKeyword_2()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Include__Group__2__Impl" + + + // $ANTLR start "rule__Library__Group__0" + // InternalTqcl.g:897:1: rule__Library__Group__0 : rule__Library__Group__0__Impl rule__Library__Group__1 ; + public final void rule__Library__Group__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:901:1: ( rule__Library__Group__0__Impl rule__Library__Group__1 ) + // InternalTqcl.g:902:2: rule__Library__Group__0__Impl rule__Library__Group__1 + { + pushFollow(FOLLOW_8); + rule__Library__Group__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Library__Group__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Library__Group__0" + + + // $ANTLR start "rule__Library__Group__0__Impl" + // InternalTqcl.g:909:1: rule__Library__Group__0__Impl : ( 'library' ) ; + public final void rule__Library__Group__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:913:1: ( ( 'library' ) ) + // InternalTqcl.g:914:1: ( 'library' ) + { + // InternalTqcl.g:914:1: ( 'library' ) + // InternalTqcl.g:915:2: 'library' + { + before(grammarAccess.getLibraryAccess().getLibraryKeyword_0()); + match(input,19,FOLLOW_2); + after(grammarAccess.getLibraryAccess().getLibraryKeyword_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Library__Group__0__Impl" + + + // $ANTLR start "rule__Library__Group__1" + // InternalTqcl.g:924:1: rule__Library__Group__1 : rule__Library__Group__1__Impl rule__Library__Group__2 ; + public final void rule__Library__Group__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:928:1: ( rule__Library__Group__1__Impl rule__Library__Group__2 ) + // InternalTqcl.g:929:2: rule__Library__Group__1__Impl rule__Library__Group__2 + { + pushFollow(FOLLOW_6); + rule__Library__Group__1__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Library__Group__2(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Library__Group__1" + + + // $ANTLR start "rule__Library__Group__1__Impl" + // InternalTqcl.g:936:1: rule__Library__Group__1__Impl : ( ( rule__Library__NameAssignment_1 ) ) ; + public final void rule__Library__Group__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:940:1: ( ( ( rule__Library__NameAssignment_1 ) ) ) + // InternalTqcl.g:941:1: ( ( rule__Library__NameAssignment_1 ) ) + { + // InternalTqcl.g:941:1: ( ( rule__Library__NameAssignment_1 ) ) + // InternalTqcl.g:942:2: ( rule__Library__NameAssignment_1 ) + { + before(grammarAccess.getLibraryAccess().getNameAssignment_1()); + // InternalTqcl.g:943:2: ( rule__Library__NameAssignment_1 ) + // InternalTqcl.g:943:3: rule__Library__NameAssignment_1 + { + pushFollow(FOLLOW_2); + rule__Library__NameAssignment_1(); + + state._fsp--; + + + } + + after(grammarAccess.getLibraryAccess().getNameAssignment_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Library__Group__1__Impl" + + + // $ANTLR start "rule__Library__Group__2" + // InternalTqcl.g:951:1: rule__Library__Group__2 : rule__Library__Group__2__Impl ; + public final void rule__Library__Group__2() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:955:1: ( rule__Library__Group__2__Impl ) + // InternalTqcl.g:956:2: rule__Library__Group__2__Impl + { + pushFollow(FOLLOW_2); + rule__Library__Group__2__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Library__Group__2" + + + // $ANTLR start "rule__Library__Group__2__Impl" + // InternalTqcl.g:962:1: rule__Library__Group__2__Impl : ( ';' ) ; + public final void rule__Library__Group__2__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:966:1: ( ( ';' ) ) + // InternalTqcl.g:967:1: ( ';' ) + { + // InternalTqcl.g:967:1: ( ';' ) + // InternalTqcl.g:968:2: ';' + { + before(grammarAccess.getLibraryAccess().getSemicolonKeyword_2()); + match(input,17,FOLLOW_2); + after(grammarAccess.getLibraryAccess().getSemicolonKeyword_2()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Library__Group__2__Impl" + + + // $ANTLR start "rule__Insert__Group__0" + // InternalTqcl.g:978:1: rule__Insert__Group__0 : rule__Insert__Group__0__Impl rule__Insert__Group__1 ; + public final void rule__Insert__Group__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:982:1: ( rule__Insert__Group__0__Impl rule__Insert__Group__1 ) + // InternalTqcl.g:983:2: rule__Insert__Group__0__Impl rule__Insert__Group__1 + { + pushFollow(FOLLOW_9); + rule__Insert__Group__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Insert__Group__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Insert__Group__0" + + + // $ANTLR start "rule__Insert__Group__0__Impl" + // InternalTqcl.g:990:1: rule__Insert__Group__0__Impl : ( 'insert' ) ; + public final void rule__Insert__Group__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:994:1: ( ( 'insert' ) ) + // InternalTqcl.g:995:1: ( 'insert' ) + { + // InternalTqcl.g:995:1: ( 'insert' ) + // InternalTqcl.g:996:2: 'insert' + { + before(grammarAccess.getInsertAccess().getInsertKeyword_0()); + match(input,20,FOLLOW_2); + after(grammarAccess.getInsertAccess().getInsertKeyword_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Insert__Group__0__Impl" + + + // $ANTLR start "rule__Insert__Group__1" + // InternalTqcl.g:1005:1: rule__Insert__Group__1 : rule__Insert__Group__1__Impl rule__Insert__Group__2 ; + public final void rule__Insert__Group__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1009:1: ( rule__Insert__Group__1__Impl rule__Insert__Group__2 ) + // InternalTqcl.g:1010:2: rule__Insert__Group__1__Impl rule__Insert__Group__2 + { + pushFollow(FOLLOW_9); + rule__Insert__Group__1__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Insert__Group__2(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Insert__Group__1" + + + // $ANTLR start "rule__Insert__Group__1__Impl" + // InternalTqcl.g:1017:1: rule__Insert__Group__1__Impl : ( ( rule__Insert__CategoryAssignment_1 )? ) ; + public final void rule__Insert__Group__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1021:1: ( ( ( rule__Insert__CategoryAssignment_1 )? ) ) + // InternalTqcl.g:1022:1: ( ( rule__Insert__CategoryAssignment_1 )? ) + { + // InternalTqcl.g:1022:1: ( ( rule__Insert__CategoryAssignment_1 )? ) + // InternalTqcl.g:1023:2: ( rule__Insert__CategoryAssignment_1 )? + { + before(grammarAccess.getInsertAccess().getCategoryAssignment_1()); + // InternalTqcl.g:1024:2: ( rule__Insert__CategoryAssignment_1 )? + int alt10=2; + int LA10_0 = input.LA(1); + + if ( ((LA10_0>=13 && LA10_0<=16)) ) { + alt10=1; + } + switch (alt10) { + case 1 : + // InternalTqcl.g:1024:3: rule__Insert__CategoryAssignment_1 + { + pushFollow(FOLLOW_2); + rule__Insert__CategoryAssignment_1(); + + state._fsp--; + + + } + break; + + } + + after(grammarAccess.getInsertAccess().getCategoryAssignment_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Insert__Group__1__Impl" + + + // $ANTLR start "rule__Insert__Group__2" + // InternalTqcl.g:1032:1: rule__Insert__Group__2 : rule__Insert__Group__2__Impl rule__Insert__Group__3 ; + public final void rule__Insert__Group__2() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1036:1: ( rule__Insert__Group__2__Impl rule__Insert__Group__3 ) + // InternalTqcl.g:1037:2: rule__Insert__Group__2__Impl rule__Insert__Group__3 + { + pushFollow(FOLLOW_10); + rule__Insert__Group__2__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Insert__Group__3(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Insert__Group__2" + + + // $ANTLR start "rule__Insert__Group__2__Impl" + // InternalTqcl.g:1044:1: rule__Insert__Group__2__Impl : ( ( rule__Insert__EntityClassAssignment_2 ) ) ; + public final void rule__Insert__Group__2__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1048:1: ( ( ( rule__Insert__EntityClassAssignment_2 ) ) ) + // InternalTqcl.g:1049:1: ( ( rule__Insert__EntityClassAssignment_2 ) ) + { + // InternalTqcl.g:1049:1: ( ( rule__Insert__EntityClassAssignment_2 ) ) + // InternalTqcl.g:1050:2: ( rule__Insert__EntityClassAssignment_2 ) + { + before(grammarAccess.getInsertAccess().getEntityClassAssignment_2()); + // InternalTqcl.g:1051:2: ( rule__Insert__EntityClassAssignment_2 ) + // InternalTqcl.g:1051:3: rule__Insert__EntityClassAssignment_2 + { + pushFollow(FOLLOW_2); + rule__Insert__EntityClassAssignment_2(); + + state._fsp--; + + + } + + after(grammarAccess.getInsertAccess().getEntityClassAssignment_2()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Insert__Group__2__Impl" + + + // $ANTLR start "rule__Insert__Group__3" + // InternalTqcl.g:1059:1: rule__Insert__Group__3 : rule__Insert__Group__3__Impl rule__Insert__Group__4 ; + public final void rule__Insert__Group__3() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1063:1: ( rule__Insert__Group__3__Impl rule__Insert__Group__4 ) + // InternalTqcl.g:1064:2: rule__Insert__Group__3__Impl rule__Insert__Group__4 + { + pushFollow(FOLLOW_7); + rule__Insert__Group__3__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Insert__Group__4(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Insert__Group__3" + + + // $ANTLR start "rule__Insert__Group__3__Impl" + // InternalTqcl.g:1071:1: rule__Insert__Group__3__Impl : ( 'as' ) ; + public final void rule__Insert__Group__3__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1075:1: ( ( 'as' ) ) + // InternalTqcl.g:1076:1: ( 'as' ) + { + // InternalTqcl.g:1076:1: ( 'as' ) + // InternalTqcl.g:1077:2: 'as' + { + before(grammarAccess.getInsertAccess().getAsKeyword_3()); + match(input,21,FOLLOW_2); + after(grammarAccess.getInsertAccess().getAsKeyword_3()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Insert__Group__3__Impl" + + + // $ANTLR start "rule__Insert__Group__4" + // InternalTqcl.g:1086:1: rule__Insert__Group__4 : rule__Insert__Group__4__Impl rule__Insert__Group__5 ; + public final void rule__Insert__Group__4() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1090:1: ( rule__Insert__Group__4__Impl rule__Insert__Group__5 ) + // InternalTqcl.g:1091:2: rule__Insert__Group__4__Impl rule__Insert__Group__5 + { + pushFollow(FOLLOW_11); + rule__Insert__Group__4__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Insert__Group__5(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Insert__Group__4" + + + // $ANTLR start "rule__Insert__Group__4__Impl" + // InternalTqcl.g:1098:1: rule__Insert__Group__4__Impl : ( ( rule__Insert__NameAssignment_4 ) ) ; + public final void rule__Insert__Group__4__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1102:1: ( ( ( rule__Insert__NameAssignment_4 ) ) ) + // InternalTqcl.g:1103:1: ( ( rule__Insert__NameAssignment_4 ) ) + { + // InternalTqcl.g:1103:1: ( ( rule__Insert__NameAssignment_4 ) ) + // InternalTqcl.g:1104:2: ( rule__Insert__NameAssignment_4 ) + { + before(grammarAccess.getInsertAccess().getNameAssignment_4()); + // InternalTqcl.g:1105:2: ( rule__Insert__NameAssignment_4 ) + // InternalTqcl.g:1105:3: rule__Insert__NameAssignment_4 + { + pushFollow(FOLLOW_2); + rule__Insert__NameAssignment_4(); + + state._fsp--; + + + } + + after(grammarAccess.getInsertAccess().getNameAssignment_4()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Insert__Group__4__Impl" + + + // $ANTLR start "rule__Insert__Group__5" + // InternalTqcl.g:1113:1: rule__Insert__Group__5 : rule__Insert__Group__5__Impl ; + public final void rule__Insert__Group__5() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1117:1: ( rule__Insert__Group__5__Impl ) + // InternalTqcl.g:1118:2: rule__Insert__Group__5__Impl + { + pushFollow(FOLLOW_2); + rule__Insert__Group__5__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Insert__Group__5" + + + // $ANTLR start "rule__Insert__Group__5__Impl" + // InternalTqcl.g:1124:1: rule__Insert__Group__5__Impl : ( ( rule__Insert__Group_5__0 )? ) ; + public final void rule__Insert__Group__5__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1128:1: ( ( ( rule__Insert__Group_5__0 )? ) ) + // InternalTqcl.g:1129:1: ( ( rule__Insert__Group_5__0 )? ) + { + // InternalTqcl.g:1129:1: ( ( rule__Insert__Group_5__0 )? ) + // InternalTqcl.g:1130:2: ( rule__Insert__Group_5__0 )? + { + before(grammarAccess.getInsertAccess().getGroup_5()); + // InternalTqcl.g:1131:2: ( rule__Insert__Group_5__0 )? + int alt11=2; + int LA11_0 = input.LA(1); + + if ( (LA11_0==22) ) { + alt11=1; + } + switch (alt11) { + case 1 : + // InternalTqcl.g:1131:3: rule__Insert__Group_5__0 + { + pushFollow(FOLLOW_2); + rule__Insert__Group_5__0(); + + state._fsp--; + + + } + break; + + } + + after(grammarAccess.getInsertAccess().getGroup_5()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Insert__Group__5__Impl" + + + // $ANTLR start "rule__Insert__Group_5__0" + // InternalTqcl.g:1140:1: rule__Insert__Group_5__0 : rule__Insert__Group_5__0__Impl rule__Insert__Group_5__1 ; + public final void rule__Insert__Group_5__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1144:1: ( rule__Insert__Group_5__0__Impl rule__Insert__Group_5__1 ) + // InternalTqcl.g:1145:2: rule__Insert__Group_5__0__Impl rule__Insert__Group_5__1 + { + pushFollow(FOLLOW_12); + rule__Insert__Group_5__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Insert__Group_5__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Insert__Group_5__0" + + + // $ANTLR start "rule__Insert__Group_5__0__Impl" + // InternalTqcl.g:1152:1: rule__Insert__Group_5__0__Impl : ( 'with' ) ; + public final void rule__Insert__Group_5__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1156:1: ( ( 'with' ) ) + // InternalTqcl.g:1157:1: ( 'with' ) + { + // InternalTqcl.g:1157:1: ( 'with' ) + // InternalTqcl.g:1158:2: 'with' + { + before(grammarAccess.getInsertAccess().getWithKeyword_5_0()); + match(input,22,FOLLOW_2); + after(grammarAccess.getInsertAccess().getWithKeyword_5_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Insert__Group_5__0__Impl" + + + // $ANTLR start "rule__Insert__Group_5__1" + // InternalTqcl.g:1167:1: rule__Insert__Group_5__1 : rule__Insert__Group_5__1__Impl rule__Insert__Group_5__2 ; + public final void rule__Insert__Group_5__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1171:1: ( rule__Insert__Group_5__1__Impl rule__Insert__Group_5__2 ) + // InternalTqcl.g:1172:2: rule__Insert__Group_5__1__Impl rule__Insert__Group_5__2 + { + pushFollow(FOLLOW_13); + rule__Insert__Group_5__1__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Insert__Group_5__2(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Insert__Group_5__1" + + + // $ANTLR start "rule__Insert__Group_5__1__Impl" + // InternalTqcl.g:1179:1: rule__Insert__Group_5__1__Impl : ( ( rule__Insert__ParametersAssignment_5_1 ) ) ; + public final void rule__Insert__Group_5__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1183:1: ( ( ( rule__Insert__ParametersAssignment_5_1 ) ) ) + // InternalTqcl.g:1184:1: ( ( rule__Insert__ParametersAssignment_5_1 ) ) + { + // InternalTqcl.g:1184:1: ( ( rule__Insert__ParametersAssignment_5_1 ) ) + // InternalTqcl.g:1185:2: ( rule__Insert__ParametersAssignment_5_1 ) + { + before(grammarAccess.getInsertAccess().getParametersAssignment_5_1()); + // InternalTqcl.g:1186:2: ( rule__Insert__ParametersAssignment_5_1 ) + // InternalTqcl.g:1186:3: rule__Insert__ParametersAssignment_5_1 + { + pushFollow(FOLLOW_2); + rule__Insert__ParametersAssignment_5_1(); + + state._fsp--; + + + } + + after(grammarAccess.getInsertAccess().getParametersAssignment_5_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Insert__Group_5__1__Impl" + + + // $ANTLR start "rule__Insert__Group_5__2" + // InternalTqcl.g:1194:1: rule__Insert__Group_5__2 : rule__Insert__Group_5__2__Impl ; + public final void rule__Insert__Group_5__2() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1198:1: ( rule__Insert__Group_5__2__Impl ) + // InternalTqcl.g:1199:2: rule__Insert__Group_5__2__Impl + { + pushFollow(FOLLOW_2); + rule__Insert__Group_5__2__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Insert__Group_5__2" + + + // $ANTLR start "rule__Insert__Group_5__2__Impl" + // InternalTqcl.g:1205:1: rule__Insert__Group_5__2__Impl : ( ( rule__Insert__Group_5_2__0 )* ) ; + public final void rule__Insert__Group_5__2__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1209:1: ( ( ( rule__Insert__Group_5_2__0 )* ) ) + // InternalTqcl.g:1210:1: ( ( rule__Insert__Group_5_2__0 )* ) + { + // InternalTqcl.g:1210:1: ( ( rule__Insert__Group_5_2__0 )* ) + // InternalTqcl.g:1211:2: ( rule__Insert__Group_5_2__0 )* + { + before(grammarAccess.getInsertAccess().getGroup_5_2()); + // InternalTqcl.g:1212:2: ( rule__Insert__Group_5_2__0 )* + loop12: + do { + int alt12=2; + int LA12_0 = input.LA(1); + + if ( (LA12_0==23) ) { + alt12=1; + } + + + switch (alt12) { + case 1 : + // InternalTqcl.g:1212:3: rule__Insert__Group_5_2__0 + { + pushFollow(FOLLOW_14); + rule__Insert__Group_5_2__0(); + + state._fsp--; + + + } + break; + + default : + break loop12; + } + } while (true); + + after(grammarAccess.getInsertAccess().getGroup_5_2()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Insert__Group_5__2__Impl" + + + // $ANTLR start "rule__Insert__Group_5_2__0" + // InternalTqcl.g:1221:1: rule__Insert__Group_5_2__0 : rule__Insert__Group_5_2__0__Impl rule__Insert__Group_5_2__1 ; + public final void rule__Insert__Group_5_2__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1225:1: ( rule__Insert__Group_5_2__0__Impl rule__Insert__Group_5_2__1 ) + // InternalTqcl.g:1226:2: rule__Insert__Group_5_2__0__Impl rule__Insert__Group_5_2__1 + { + pushFollow(FOLLOW_12); + rule__Insert__Group_5_2__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Insert__Group_5_2__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Insert__Group_5_2__0" + + + // $ANTLR start "rule__Insert__Group_5_2__0__Impl" + // InternalTqcl.g:1233:1: rule__Insert__Group_5_2__0__Impl : ( ',' ) ; + public final void rule__Insert__Group_5_2__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1237:1: ( ( ',' ) ) + // InternalTqcl.g:1238:1: ( ',' ) + { + // InternalTqcl.g:1238:1: ( ',' ) + // InternalTqcl.g:1239:2: ',' + { + before(grammarAccess.getInsertAccess().getCommaKeyword_5_2_0()); + match(input,23,FOLLOW_2); + after(grammarAccess.getInsertAccess().getCommaKeyword_5_2_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Insert__Group_5_2__0__Impl" + + + // $ANTLR start "rule__Insert__Group_5_2__1" + // InternalTqcl.g:1248:1: rule__Insert__Group_5_2__1 : rule__Insert__Group_5_2__1__Impl ; + public final void rule__Insert__Group_5_2__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1252:1: ( rule__Insert__Group_5_2__1__Impl ) + // InternalTqcl.g:1253:2: rule__Insert__Group_5_2__1__Impl + { + pushFollow(FOLLOW_2); + rule__Insert__Group_5_2__1__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Insert__Group_5_2__1" + + + // $ANTLR start "rule__Insert__Group_5_2__1__Impl" + // InternalTqcl.g:1259:1: rule__Insert__Group_5_2__1__Impl : ( ( rule__Insert__ParametersAssignment_5_2_1 ) ) ; + public final void rule__Insert__Group_5_2__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1263:1: ( ( ( rule__Insert__ParametersAssignment_5_2_1 ) ) ) + // InternalTqcl.g:1264:1: ( ( rule__Insert__ParametersAssignment_5_2_1 ) ) + { + // InternalTqcl.g:1264:1: ( ( rule__Insert__ParametersAssignment_5_2_1 ) ) + // InternalTqcl.g:1265:2: ( rule__Insert__ParametersAssignment_5_2_1 ) + { + before(grammarAccess.getInsertAccess().getParametersAssignment_5_2_1()); + // InternalTqcl.g:1266:2: ( rule__Insert__ParametersAssignment_5_2_1 ) + // InternalTqcl.g:1266:3: rule__Insert__ParametersAssignment_5_2_1 + { + pushFollow(FOLLOW_2); + rule__Insert__ParametersAssignment_5_2_1(); + + state._fsp--; + + + } + + after(grammarAccess.getInsertAccess().getParametersAssignment_5_2_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Insert__Group_5_2__1__Impl" + + + // $ANTLR start "rule__Set__Group__0" + // InternalTqcl.g:1275:1: rule__Set__Group__0 : rule__Set__Group__0__Impl rule__Set__Group__1 ; + public final void rule__Set__Group__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1279:1: ( rule__Set__Group__0__Impl rule__Set__Group__1 ) + // InternalTqcl.g:1280:2: rule__Set__Group__0__Impl rule__Set__Group__1 + { + pushFollow(FOLLOW_12); + rule__Set__Group__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Set__Group__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Set__Group__0" + + + // $ANTLR start "rule__Set__Group__0__Impl" + // InternalTqcl.g:1287:1: rule__Set__Group__0__Impl : ( 'set' ) ; + public final void rule__Set__Group__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1291:1: ( ( 'set' ) ) + // InternalTqcl.g:1292:1: ( 'set' ) + { + // InternalTqcl.g:1292:1: ( 'set' ) + // InternalTqcl.g:1293:2: 'set' + { + before(grammarAccess.getSetAccess().getSetKeyword_0()); + match(input,24,FOLLOW_2); + after(grammarAccess.getSetAccess().getSetKeyword_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Set__Group__0__Impl" + + + // $ANTLR start "rule__Set__Group__1" + // InternalTqcl.g:1302:1: rule__Set__Group__1 : rule__Set__Group__1__Impl ; + public final void rule__Set__Group__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1306:1: ( rule__Set__Group__1__Impl ) + // InternalTqcl.g:1307:2: rule__Set__Group__1__Impl + { + pushFollow(FOLLOW_2); + rule__Set__Group__1__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Set__Group__1" + + + // $ANTLR start "rule__Set__Group__1__Impl" + // InternalTqcl.g:1313:1: rule__Set__Group__1__Impl : ( ( rule__Set__ParamAssignment_1 ) ) ; + public final void rule__Set__Group__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1317:1: ( ( ( rule__Set__ParamAssignment_1 ) ) ) + // InternalTqcl.g:1318:1: ( ( rule__Set__ParamAssignment_1 ) ) + { + // InternalTqcl.g:1318:1: ( ( rule__Set__ParamAssignment_1 ) ) + // InternalTqcl.g:1319:2: ( rule__Set__ParamAssignment_1 ) + { + before(grammarAccess.getSetAccess().getParamAssignment_1()); + // InternalTqcl.g:1320:2: ( rule__Set__ParamAssignment_1 ) + // InternalTqcl.g:1320:3: rule__Set__ParamAssignment_1 + { + pushFollow(FOLLOW_2); + rule__Set__ParamAssignment_1(); + + state._fsp--; + + + } + + after(grammarAccess.getSetAccess().getParamAssignment_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Set__Group__1__Impl" + + + // $ANTLR start "rule__Connect__Group__0" + // InternalTqcl.g:1329:1: rule__Connect__Group__0 : rule__Connect__Group__0__Impl rule__Connect__Group__1 ; + public final void rule__Connect__Group__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1333:1: ( rule__Connect__Group__0__Impl rule__Connect__Group__1 ) + // InternalTqcl.g:1334:2: rule__Connect__Group__0__Impl rule__Connect__Group__1 + { + pushFollow(FOLLOW_8); + rule__Connect__Group__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Connect__Group__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Connect__Group__0" + + + // $ANTLR start "rule__Connect__Group__0__Impl" + // InternalTqcl.g:1341:1: rule__Connect__Group__0__Impl : ( 'connect' ) ; + public final void rule__Connect__Group__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1345:1: ( ( 'connect' ) ) + // InternalTqcl.g:1346:1: ( 'connect' ) + { + // InternalTqcl.g:1346:1: ( 'connect' ) + // InternalTqcl.g:1347:2: 'connect' + { + before(grammarAccess.getConnectAccess().getConnectKeyword_0()); + match(input,25,FOLLOW_2); + after(grammarAccess.getConnectAccess().getConnectKeyword_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Connect__Group__0__Impl" + + + // $ANTLR start "rule__Connect__Group__1" + // InternalTqcl.g:1356:1: rule__Connect__Group__1 : rule__Connect__Group__1__Impl rule__Connect__Group__2 ; + public final void rule__Connect__Group__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1360:1: ( rule__Connect__Group__1__Impl rule__Connect__Group__2 ) + // InternalTqcl.g:1361:2: rule__Connect__Group__1__Impl rule__Connect__Group__2 + { + pushFollow(FOLLOW_15); + rule__Connect__Group__1__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Connect__Group__2(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Connect__Group__1" + + + // $ANTLR start "rule__Connect__Group__1__Impl" + // InternalTqcl.g:1368:1: rule__Connect__Group__1__Impl : ( ( rule__Connect__FromAssignment_1 ) ) ; + public final void rule__Connect__Group__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1372:1: ( ( ( rule__Connect__FromAssignment_1 ) ) ) + // InternalTqcl.g:1373:1: ( ( rule__Connect__FromAssignment_1 ) ) + { + // InternalTqcl.g:1373:1: ( ( rule__Connect__FromAssignment_1 ) ) + // InternalTqcl.g:1374:2: ( rule__Connect__FromAssignment_1 ) + { + before(grammarAccess.getConnectAccess().getFromAssignment_1()); + // InternalTqcl.g:1375:2: ( rule__Connect__FromAssignment_1 ) + // InternalTqcl.g:1375:3: rule__Connect__FromAssignment_1 + { + pushFollow(FOLLOW_2); + rule__Connect__FromAssignment_1(); + + state._fsp--; + + + } + + after(grammarAccess.getConnectAccess().getFromAssignment_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Connect__Group__1__Impl" + + + // $ANTLR start "rule__Connect__Group__2" + // InternalTqcl.g:1383:1: rule__Connect__Group__2 : rule__Connect__Group__2__Impl rule__Connect__Group__3 ; + public final void rule__Connect__Group__2() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1387:1: ( rule__Connect__Group__2__Impl rule__Connect__Group__3 ) + // InternalTqcl.g:1388:2: rule__Connect__Group__2__Impl rule__Connect__Group__3 + { + pushFollow(FOLLOW_15); + rule__Connect__Group__2__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Connect__Group__3(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Connect__Group__2" + + + // $ANTLR start "rule__Connect__Group__2__Impl" + // InternalTqcl.g:1395:1: rule__Connect__Group__2__Impl : ( ( rule__Connect__Group_2__0 )* ) ; + public final void rule__Connect__Group__2__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1399:1: ( ( ( rule__Connect__Group_2__0 )* ) ) + // InternalTqcl.g:1400:1: ( ( rule__Connect__Group_2__0 )* ) + { + // InternalTqcl.g:1400:1: ( ( rule__Connect__Group_2__0 )* ) + // InternalTqcl.g:1401:2: ( rule__Connect__Group_2__0 )* + { + before(grammarAccess.getConnectAccess().getGroup_2()); + // InternalTqcl.g:1402:2: ( rule__Connect__Group_2__0 )* + loop13: + do { + int alt13=2; + int LA13_0 = input.LA(1); + + if ( (LA13_0==23) ) { + alt13=1; + } + + + switch (alt13) { + case 1 : + // InternalTqcl.g:1402:3: rule__Connect__Group_2__0 + { + pushFollow(FOLLOW_14); + rule__Connect__Group_2__0(); + + state._fsp--; + + + } + break; + + default : + break loop13; + } + } while (true); + + after(grammarAccess.getConnectAccess().getGroup_2()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Connect__Group__2__Impl" + + + // $ANTLR start "rule__Connect__Group__3" + // InternalTqcl.g:1410:1: rule__Connect__Group__3 : rule__Connect__Group__3__Impl rule__Connect__Group__4 ; + public final void rule__Connect__Group__3() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1414:1: ( rule__Connect__Group__3__Impl rule__Connect__Group__4 ) + // InternalTqcl.g:1415:2: rule__Connect__Group__3__Impl rule__Connect__Group__4 + { + pushFollow(FOLLOW_8); + rule__Connect__Group__3__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Connect__Group__4(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Connect__Group__3" + + + // $ANTLR start "rule__Connect__Group__3__Impl" + // InternalTqcl.g:1422:1: rule__Connect__Group__3__Impl : ( 'to' ) ; + public final void rule__Connect__Group__3__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1426:1: ( ( 'to' ) ) + // InternalTqcl.g:1427:1: ( 'to' ) + { + // InternalTqcl.g:1427:1: ( 'to' ) + // InternalTqcl.g:1428:2: 'to' + { + before(grammarAccess.getConnectAccess().getToKeyword_3()); + match(input,26,FOLLOW_2); + after(grammarAccess.getConnectAccess().getToKeyword_3()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Connect__Group__3__Impl" + + + // $ANTLR start "rule__Connect__Group__4" + // InternalTqcl.g:1437:1: rule__Connect__Group__4 : rule__Connect__Group__4__Impl rule__Connect__Group__5 ; + public final void rule__Connect__Group__4() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1441:1: ( rule__Connect__Group__4__Impl rule__Connect__Group__5 ) + // InternalTqcl.g:1442:2: rule__Connect__Group__4__Impl rule__Connect__Group__5 + { + pushFollow(FOLLOW_13); + rule__Connect__Group__4__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Connect__Group__5(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Connect__Group__4" + + + // $ANTLR start "rule__Connect__Group__4__Impl" + // InternalTqcl.g:1449:1: rule__Connect__Group__4__Impl : ( ( rule__Connect__ToAssignment_4 ) ) ; + public final void rule__Connect__Group__4__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1453:1: ( ( ( rule__Connect__ToAssignment_4 ) ) ) + // InternalTqcl.g:1454:1: ( ( rule__Connect__ToAssignment_4 ) ) + { + // InternalTqcl.g:1454:1: ( ( rule__Connect__ToAssignment_4 ) ) + // InternalTqcl.g:1455:2: ( rule__Connect__ToAssignment_4 ) + { + before(grammarAccess.getConnectAccess().getToAssignment_4()); + // InternalTqcl.g:1456:2: ( rule__Connect__ToAssignment_4 ) + // InternalTqcl.g:1456:3: rule__Connect__ToAssignment_4 + { + pushFollow(FOLLOW_2); + rule__Connect__ToAssignment_4(); + + state._fsp--; + + + } + + after(grammarAccess.getConnectAccess().getToAssignment_4()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Connect__Group__4__Impl" + + + // $ANTLR start "rule__Connect__Group__5" + // InternalTqcl.g:1464:1: rule__Connect__Group__5 : rule__Connect__Group__5__Impl ; + public final void rule__Connect__Group__5() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1468:1: ( rule__Connect__Group__5__Impl ) + // InternalTqcl.g:1469:2: rule__Connect__Group__5__Impl + { + pushFollow(FOLLOW_2); + rule__Connect__Group__5__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Connect__Group__5" + + + // $ANTLR start "rule__Connect__Group__5__Impl" + // InternalTqcl.g:1475:1: rule__Connect__Group__5__Impl : ( ( rule__Connect__Group_5__0 )* ) ; + public final void rule__Connect__Group__5__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1479:1: ( ( ( rule__Connect__Group_5__0 )* ) ) + // InternalTqcl.g:1480:1: ( ( rule__Connect__Group_5__0 )* ) + { + // InternalTqcl.g:1480:1: ( ( rule__Connect__Group_5__0 )* ) + // InternalTqcl.g:1481:2: ( rule__Connect__Group_5__0 )* + { + before(grammarAccess.getConnectAccess().getGroup_5()); + // InternalTqcl.g:1482:2: ( rule__Connect__Group_5__0 )* + loop14: + do { + int alt14=2; + int LA14_0 = input.LA(1); + + if ( (LA14_0==23) ) { + alt14=1; + } + + + switch (alt14) { + case 1 : + // InternalTqcl.g:1482:3: rule__Connect__Group_5__0 + { + pushFollow(FOLLOW_14); + rule__Connect__Group_5__0(); + + state._fsp--; + + + } + break; + + default : + break loop14; + } + } while (true); + + after(grammarAccess.getConnectAccess().getGroup_5()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Connect__Group__5__Impl" + + + // $ANTLR start "rule__Connect__Group_2__0" + // InternalTqcl.g:1491:1: rule__Connect__Group_2__0 : rule__Connect__Group_2__0__Impl rule__Connect__Group_2__1 ; + public final void rule__Connect__Group_2__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1495:1: ( rule__Connect__Group_2__0__Impl rule__Connect__Group_2__1 ) + // InternalTqcl.g:1496:2: rule__Connect__Group_2__0__Impl rule__Connect__Group_2__1 + { + pushFollow(FOLLOW_8); + rule__Connect__Group_2__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Connect__Group_2__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Connect__Group_2__0" + + + // $ANTLR start "rule__Connect__Group_2__0__Impl" + // InternalTqcl.g:1503:1: rule__Connect__Group_2__0__Impl : ( ',' ) ; + public final void rule__Connect__Group_2__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1507:1: ( ( ',' ) ) + // InternalTqcl.g:1508:1: ( ',' ) + { + // InternalTqcl.g:1508:1: ( ',' ) + // InternalTqcl.g:1509:2: ',' + { + before(grammarAccess.getConnectAccess().getCommaKeyword_2_0()); + match(input,23,FOLLOW_2); + after(grammarAccess.getConnectAccess().getCommaKeyword_2_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Connect__Group_2__0__Impl" + + + // $ANTLR start "rule__Connect__Group_2__1" + // InternalTqcl.g:1518:1: rule__Connect__Group_2__1 : rule__Connect__Group_2__1__Impl ; + public final void rule__Connect__Group_2__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1522:1: ( rule__Connect__Group_2__1__Impl ) + // InternalTqcl.g:1523:2: rule__Connect__Group_2__1__Impl + { + pushFollow(FOLLOW_2); + rule__Connect__Group_2__1__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Connect__Group_2__1" + + + // $ANTLR start "rule__Connect__Group_2__1__Impl" + // InternalTqcl.g:1529:1: rule__Connect__Group_2__1__Impl : ( ( rule__Connect__FromAssignment_2_1 ) ) ; + public final void rule__Connect__Group_2__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1533:1: ( ( ( rule__Connect__FromAssignment_2_1 ) ) ) + // InternalTqcl.g:1534:1: ( ( rule__Connect__FromAssignment_2_1 ) ) + { + // InternalTqcl.g:1534:1: ( ( rule__Connect__FromAssignment_2_1 ) ) + // InternalTqcl.g:1535:2: ( rule__Connect__FromAssignment_2_1 ) + { + before(grammarAccess.getConnectAccess().getFromAssignment_2_1()); + // InternalTqcl.g:1536:2: ( rule__Connect__FromAssignment_2_1 ) + // InternalTqcl.g:1536:3: rule__Connect__FromAssignment_2_1 + { + pushFollow(FOLLOW_2); + rule__Connect__FromAssignment_2_1(); + + state._fsp--; + + + } + + after(grammarAccess.getConnectAccess().getFromAssignment_2_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Connect__Group_2__1__Impl" + + + // $ANTLR start "rule__Connect__Group_5__0" + // InternalTqcl.g:1545:1: rule__Connect__Group_5__0 : rule__Connect__Group_5__0__Impl rule__Connect__Group_5__1 ; + public final void rule__Connect__Group_5__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1549:1: ( rule__Connect__Group_5__0__Impl rule__Connect__Group_5__1 ) + // InternalTqcl.g:1550:2: rule__Connect__Group_5__0__Impl rule__Connect__Group_5__1 + { + pushFollow(FOLLOW_8); + rule__Connect__Group_5__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Connect__Group_5__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Connect__Group_5__0" + + + // $ANTLR start "rule__Connect__Group_5__0__Impl" + // InternalTqcl.g:1557:1: rule__Connect__Group_5__0__Impl : ( ',' ) ; + public final void rule__Connect__Group_5__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1561:1: ( ( ',' ) ) + // InternalTqcl.g:1562:1: ( ',' ) + { + // InternalTqcl.g:1562:1: ( ',' ) + // InternalTqcl.g:1563:2: ',' + { + before(grammarAccess.getConnectAccess().getCommaKeyword_5_0()); + match(input,23,FOLLOW_2); + after(grammarAccess.getConnectAccess().getCommaKeyword_5_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Connect__Group_5__0__Impl" + + + // $ANTLR start "rule__Connect__Group_5__1" + // InternalTqcl.g:1572:1: rule__Connect__Group_5__1 : rule__Connect__Group_5__1__Impl ; + public final void rule__Connect__Group_5__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1576:1: ( rule__Connect__Group_5__1__Impl ) + // InternalTqcl.g:1577:2: rule__Connect__Group_5__1__Impl + { + pushFollow(FOLLOW_2); + rule__Connect__Group_5__1__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Connect__Group_5__1" + + + // $ANTLR start "rule__Connect__Group_5__1__Impl" + // InternalTqcl.g:1583:1: rule__Connect__Group_5__1__Impl : ( ( rule__Connect__ToAssignment_5_1 ) ) ; + public final void rule__Connect__Group_5__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1587:1: ( ( ( rule__Connect__ToAssignment_5_1 ) ) ) + // InternalTqcl.g:1588:1: ( ( rule__Connect__ToAssignment_5_1 ) ) + { + // InternalTqcl.g:1588:1: ( ( rule__Connect__ToAssignment_5_1 ) ) + // InternalTqcl.g:1589:2: ( rule__Connect__ToAssignment_5_1 ) + { + before(grammarAccess.getConnectAccess().getToAssignment_5_1()); + // InternalTqcl.g:1590:2: ( rule__Connect__ToAssignment_5_1 ) + // InternalTqcl.g:1590:3: rule__Connect__ToAssignment_5_1 + { + pushFollow(FOLLOW_2); + rule__Connect__ToAssignment_5_1(); + + state._fsp--; + + + } + + after(grammarAccess.getConnectAccess().getToAssignment_5_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Connect__Group_5__1__Impl" + + + // $ANTLR start "rule__ConnectionPort__Group__0" + // InternalTqcl.g:1599:1: rule__ConnectionPort__Group__0 : rule__ConnectionPort__Group__0__Impl rule__ConnectionPort__Group__1 ; + public final void rule__ConnectionPort__Group__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1603:1: ( rule__ConnectionPort__Group__0__Impl rule__ConnectionPort__Group__1 ) + // InternalTqcl.g:1604:2: rule__ConnectionPort__Group__0__Impl rule__ConnectionPort__Group__1 + { + pushFollow(FOLLOW_16); + rule__ConnectionPort__Group__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__ConnectionPort__Group__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ConnectionPort__Group__0" + + + // $ANTLR start "rule__ConnectionPort__Group__0__Impl" + // InternalTqcl.g:1611:1: rule__ConnectionPort__Group__0__Impl : ( ( rule__ConnectionPort__ActorAssignment_0 ) ) ; + public final void rule__ConnectionPort__Group__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1615:1: ( ( ( rule__ConnectionPort__ActorAssignment_0 ) ) ) + // InternalTqcl.g:1616:1: ( ( rule__ConnectionPort__ActorAssignment_0 ) ) + { + // InternalTqcl.g:1616:1: ( ( rule__ConnectionPort__ActorAssignment_0 ) ) + // InternalTqcl.g:1617:2: ( rule__ConnectionPort__ActorAssignment_0 ) + { + before(grammarAccess.getConnectionPortAccess().getActorAssignment_0()); + // InternalTqcl.g:1618:2: ( rule__ConnectionPort__ActorAssignment_0 ) + // InternalTqcl.g:1618:3: rule__ConnectionPort__ActorAssignment_0 + { + pushFollow(FOLLOW_2); + rule__ConnectionPort__ActorAssignment_0(); + + state._fsp--; + + + } + + after(grammarAccess.getConnectionPortAccess().getActorAssignment_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ConnectionPort__Group__0__Impl" + + + // $ANTLR start "rule__ConnectionPort__Group__1" + // InternalTqcl.g:1626:1: rule__ConnectionPort__Group__1 : rule__ConnectionPort__Group__1__Impl rule__ConnectionPort__Group__2 ; + public final void rule__ConnectionPort__Group__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1630:1: ( rule__ConnectionPort__Group__1__Impl rule__ConnectionPort__Group__2 ) + // InternalTqcl.g:1631:2: rule__ConnectionPort__Group__1__Impl rule__ConnectionPort__Group__2 + { + pushFollow(FOLLOW_17); + rule__ConnectionPort__Group__1__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__ConnectionPort__Group__2(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ConnectionPort__Group__1" + + + // $ANTLR start "rule__ConnectionPort__Group__1__Impl" + // InternalTqcl.g:1638:1: rule__ConnectionPort__Group__1__Impl : ( '.' ) ; + public final void rule__ConnectionPort__Group__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1642:1: ( ( '.' ) ) + // InternalTqcl.g:1643:1: ( '.' ) + { + // InternalTqcl.g:1643:1: ( '.' ) + // InternalTqcl.g:1644:2: '.' + { + before(grammarAccess.getConnectionPortAccess().getFullStopKeyword_1()); + match(input,27,FOLLOW_2); + after(grammarAccess.getConnectionPortAccess().getFullStopKeyword_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ConnectionPort__Group__1__Impl" + + + // $ANTLR start "rule__ConnectionPort__Group__2" + // InternalTqcl.g:1653:1: rule__ConnectionPort__Group__2 : rule__ConnectionPort__Group__2__Impl ; + public final void rule__ConnectionPort__Group__2() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1657:1: ( rule__ConnectionPort__Group__2__Impl ) + // InternalTqcl.g:1658:2: rule__ConnectionPort__Group__2__Impl + { + pushFollow(FOLLOW_2); + rule__ConnectionPort__Group__2__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ConnectionPort__Group__2" + + + // $ANTLR start "rule__ConnectionPort__Group__2__Impl" + // InternalTqcl.g:1664:1: rule__ConnectionPort__Group__2__Impl : ( ( rule__ConnectionPort__PortAssignment_2 ) ) ; + public final void rule__ConnectionPort__Group__2__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1668:1: ( ( ( rule__ConnectionPort__PortAssignment_2 ) ) ) + // InternalTqcl.g:1669:1: ( ( rule__ConnectionPort__PortAssignment_2 ) ) + { + // InternalTqcl.g:1669:1: ( ( rule__ConnectionPort__PortAssignment_2 ) ) + // InternalTqcl.g:1670:2: ( rule__ConnectionPort__PortAssignment_2 ) + { + before(grammarAccess.getConnectionPortAccess().getPortAssignment_2()); + // InternalTqcl.g:1671:2: ( rule__ConnectionPort__PortAssignment_2 ) + // InternalTqcl.g:1671:3: rule__ConnectionPort__PortAssignment_2 + { + pushFollow(FOLLOW_2); + rule__ConnectionPort__PortAssignment_2(); + + state._fsp--; + + + } + + after(grammarAccess.getConnectionPortAccess().getPortAssignment_2()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ConnectionPort__Group__2__Impl" + + + // $ANTLR start "rule__GoInto__Group__0" + // InternalTqcl.g:1680:1: rule__GoInto__Group__0 : rule__GoInto__Group__0__Impl rule__GoInto__Group__1 ; + public final void rule__GoInto__Group__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1684:1: ( rule__GoInto__Group__0__Impl rule__GoInto__Group__1 ) + // InternalTqcl.g:1685:2: rule__GoInto__Group__0__Impl rule__GoInto__Group__1 + { + pushFollow(FOLLOW_18); + rule__GoInto__Group__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__GoInto__Group__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__GoInto__Group__0" + + + // $ANTLR start "rule__GoInto__Group__0__Impl" + // InternalTqcl.g:1692:1: rule__GoInto__Group__0__Impl : ( 'go' ) ; + public final void rule__GoInto__Group__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1696:1: ( ( 'go' ) ) + // InternalTqcl.g:1697:1: ( 'go' ) + { + // InternalTqcl.g:1697:1: ( 'go' ) + // InternalTqcl.g:1698:2: 'go' + { + before(grammarAccess.getGoIntoAccess().getGoKeyword_0()); + match(input,28,FOLLOW_2); + after(grammarAccess.getGoIntoAccess().getGoKeyword_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__GoInto__Group__0__Impl" + + + // $ANTLR start "rule__GoInto__Group__1" + // InternalTqcl.g:1707:1: rule__GoInto__Group__1 : rule__GoInto__Group__1__Impl rule__GoInto__Group__2 ; + public final void rule__GoInto__Group__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1711:1: ( rule__GoInto__Group__1__Impl rule__GoInto__Group__2 ) + // InternalTqcl.g:1712:2: rule__GoInto__Group__1__Impl rule__GoInto__Group__2 + { + pushFollow(FOLLOW_8); + rule__GoInto__Group__1__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__GoInto__Group__2(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__GoInto__Group__1" + + + // $ANTLR start "rule__GoInto__Group__1__Impl" + // InternalTqcl.g:1719:1: rule__GoInto__Group__1__Impl : ( ( rule__GoInto__DirectionAssignment_1 ) ) ; + public final void rule__GoInto__Group__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1723:1: ( ( ( rule__GoInto__DirectionAssignment_1 ) ) ) + // InternalTqcl.g:1724:1: ( ( rule__GoInto__DirectionAssignment_1 ) ) + { + // InternalTqcl.g:1724:1: ( ( rule__GoInto__DirectionAssignment_1 ) ) + // InternalTqcl.g:1725:2: ( rule__GoInto__DirectionAssignment_1 ) + { + before(grammarAccess.getGoIntoAccess().getDirectionAssignment_1()); + // InternalTqcl.g:1726:2: ( rule__GoInto__DirectionAssignment_1 ) + // InternalTqcl.g:1726:3: rule__GoInto__DirectionAssignment_1 + { + pushFollow(FOLLOW_2); + rule__GoInto__DirectionAssignment_1(); + + state._fsp--; + + + } + + after(grammarAccess.getGoIntoAccess().getDirectionAssignment_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__GoInto__Group__1__Impl" + + + // $ANTLR start "rule__GoInto__Group__2" + // InternalTqcl.g:1734:1: rule__GoInto__Group__2 : rule__GoInto__Group__2__Impl ; + public final void rule__GoInto__Group__2() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1738:1: ( rule__GoInto__Group__2__Impl ) + // InternalTqcl.g:1739:2: rule__GoInto__Group__2__Impl + { + pushFollow(FOLLOW_2); + rule__GoInto__Group__2__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__GoInto__Group__2" + + + // $ANTLR start "rule__GoInto__Group__2__Impl" + // InternalTqcl.g:1745:1: rule__GoInto__Group__2__Impl : ( ( rule__GoInto__ActorAssignment_2 ) ) ; + public final void rule__GoInto__Group__2__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1749:1: ( ( ( rule__GoInto__ActorAssignment_2 ) ) ) + // InternalTqcl.g:1750:1: ( ( rule__GoInto__ActorAssignment_2 ) ) + { + // InternalTqcl.g:1750:1: ( ( rule__GoInto__ActorAssignment_2 ) ) + // InternalTqcl.g:1751:2: ( rule__GoInto__ActorAssignment_2 ) + { + before(grammarAccess.getGoIntoAccess().getActorAssignment_2()); + // InternalTqcl.g:1752:2: ( rule__GoInto__ActorAssignment_2 ) + // InternalTqcl.g:1752:3: rule__GoInto__ActorAssignment_2 + { + pushFollow(FOLLOW_2); + rule__GoInto__ActorAssignment_2(); + + state._fsp--; + + + } + + after(grammarAccess.getGoIntoAccess().getActorAssignment_2()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__GoInto__Group__2__Impl" + + + // $ANTLR start "rule__GoOut__Group__0" + // InternalTqcl.g:1761:1: rule__GoOut__Group__0 : rule__GoOut__Group__0__Impl rule__GoOut__Group__1 ; + public final void rule__GoOut__Group__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1765:1: ( rule__GoOut__Group__0__Impl rule__GoOut__Group__1 ) + // InternalTqcl.g:1766:2: rule__GoOut__Group__0__Impl rule__GoOut__Group__1 + { + pushFollow(FOLLOW_19); + rule__GoOut__Group__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__GoOut__Group__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__GoOut__Group__0" + + + // $ANTLR start "rule__GoOut__Group__0__Impl" + // InternalTqcl.g:1773:1: rule__GoOut__Group__0__Impl : ( 'go' ) ; + public final void rule__GoOut__Group__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1777:1: ( ( 'go' ) ) + // InternalTqcl.g:1778:1: ( 'go' ) + { + // InternalTqcl.g:1778:1: ( 'go' ) + // InternalTqcl.g:1779:2: 'go' + { + before(grammarAccess.getGoOutAccess().getGoKeyword_0()); + match(input,28,FOLLOW_2); + after(grammarAccess.getGoOutAccess().getGoKeyword_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__GoOut__Group__0__Impl" + + + // $ANTLR start "rule__GoOut__Group__1" + // InternalTqcl.g:1788:1: rule__GoOut__Group__1 : rule__GoOut__Group__1__Impl ; + public final void rule__GoOut__Group__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1792:1: ( rule__GoOut__Group__1__Impl ) + // InternalTqcl.g:1793:2: rule__GoOut__Group__1__Impl + { + pushFollow(FOLLOW_2); + rule__GoOut__Group__1__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__GoOut__Group__1" + + + // $ANTLR start "rule__GoOut__Group__1__Impl" + // InternalTqcl.g:1799:1: rule__GoOut__Group__1__Impl : ( ( rule__GoOut__DirectionAssignment_1 ) ) ; + public final void rule__GoOut__Group__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1803:1: ( ( ( rule__GoOut__DirectionAssignment_1 ) ) ) + // InternalTqcl.g:1804:1: ( ( rule__GoOut__DirectionAssignment_1 ) ) + { + // InternalTqcl.g:1804:1: ( ( rule__GoOut__DirectionAssignment_1 ) ) + // InternalTqcl.g:1805:2: ( rule__GoOut__DirectionAssignment_1 ) + { + before(grammarAccess.getGoOutAccess().getDirectionAssignment_1()); + // InternalTqcl.g:1806:2: ( rule__GoOut__DirectionAssignment_1 ) + // InternalTqcl.g:1806:3: rule__GoOut__DirectionAssignment_1 + { + pushFollow(FOLLOW_2); + rule__GoOut__DirectionAssignment_1(); + + state._fsp--; + + + } + + after(grammarAccess.getGoOutAccess().getDirectionAssignment_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__GoOut__Group__1__Impl" + + + // $ANTLR start "rule__GoTop__Group__0" + // InternalTqcl.g:1815:1: rule__GoTop__Group__0 : rule__GoTop__Group__0__Impl rule__GoTop__Group__1 ; + public final void rule__GoTop__Group__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1819:1: ( rule__GoTop__Group__0__Impl rule__GoTop__Group__1 ) + // InternalTqcl.g:1820:2: rule__GoTop__Group__0__Impl rule__GoTop__Group__1 + { + pushFollow(FOLLOW_20); + rule__GoTop__Group__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__GoTop__Group__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__GoTop__Group__0" + + + // $ANTLR start "rule__GoTop__Group__0__Impl" + // InternalTqcl.g:1827:1: rule__GoTop__Group__0__Impl : ( 'go' ) ; + public final void rule__GoTop__Group__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1831:1: ( ( 'go' ) ) + // InternalTqcl.g:1832:1: ( 'go' ) + { + // InternalTqcl.g:1832:1: ( 'go' ) + // InternalTqcl.g:1833:2: 'go' + { + before(grammarAccess.getGoTopAccess().getGoKeyword_0()); + match(input,28,FOLLOW_2); + after(grammarAccess.getGoTopAccess().getGoKeyword_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__GoTop__Group__0__Impl" + + + // $ANTLR start "rule__GoTop__Group__1" + // InternalTqcl.g:1842:1: rule__GoTop__Group__1 : rule__GoTop__Group__1__Impl ; + public final void rule__GoTop__Group__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1846:1: ( rule__GoTop__Group__1__Impl ) + // InternalTqcl.g:1847:2: rule__GoTop__Group__1__Impl + { + pushFollow(FOLLOW_2); + rule__GoTop__Group__1__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__GoTop__Group__1" + + + // $ANTLR start "rule__GoTop__Group__1__Impl" + // InternalTqcl.g:1853:1: rule__GoTop__Group__1__Impl : ( ( rule__GoTop__DirectionAssignment_1 ) ) ; + public final void rule__GoTop__Group__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1857:1: ( ( ( rule__GoTop__DirectionAssignment_1 ) ) ) + // InternalTqcl.g:1858:1: ( ( rule__GoTop__DirectionAssignment_1 ) ) + { + // InternalTqcl.g:1858:1: ( ( rule__GoTop__DirectionAssignment_1 ) ) + // InternalTqcl.g:1859:2: ( rule__GoTop__DirectionAssignment_1 ) + { + before(grammarAccess.getGoTopAccess().getDirectionAssignment_1()); + // InternalTqcl.g:1860:2: ( rule__GoTop__DirectionAssignment_1 ) + // InternalTqcl.g:1860:3: rule__GoTop__DirectionAssignment_1 + { + pushFollow(FOLLOW_2); + rule__GoTop__DirectionAssignment_1(); + + state._fsp--; + + + } + + after(grammarAccess.getGoTopAccess().getDirectionAssignment_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__GoTop__Group__1__Impl" + + + // $ANTLR start "rule__Parameter__Group__0" + // InternalTqcl.g:1869:1: rule__Parameter__Group__0 : rule__Parameter__Group__0__Impl rule__Parameter__Group__1 ; + public final void rule__Parameter__Group__0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1873:1: ( rule__Parameter__Group__0__Impl rule__Parameter__Group__1 ) + // InternalTqcl.g:1874:2: rule__Parameter__Group__0__Impl rule__Parameter__Group__1 + { + pushFollow(FOLLOW_21); + rule__Parameter__Group__0__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Parameter__Group__1(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Parameter__Group__0" + + + // $ANTLR start "rule__Parameter__Group__0__Impl" + // InternalTqcl.g:1881:1: rule__Parameter__Group__0__Impl : ( ( rule__Parameter__IdAssignment_0 ) ) ; + public final void rule__Parameter__Group__0__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1885:1: ( ( ( rule__Parameter__IdAssignment_0 ) ) ) + // InternalTqcl.g:1886:1: ( ( rule__Parameter__IdAssignment_0 ) ) + { + // InternalTqcl.g:1886:1: ( ( rule__Parameter__IdAssignment_0 ) ) + // InternalTqcl.g:1887:2: ( rule__Parameter__IdAssignment_0 ) + { + before(grammarAccess.getParameterAccess().getIdAssignment_0()); + // InternalTqcl.g:1888:2: ( rule__Parameter__IdAssignment_0 ) + // InternalTqcl.g:1888:3: rule__Parameter__IdAssignment_0 + { + pushFollow(FOLLOW_2); + rule__Parameter__IdAssignment_0(); + + state._fsp--; + + + } + + after(grammarAccess.getParameterAccess().getIdAssignment_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Parameter__Group__0__Impl" + + + // $ANTLR start "rule__Parameter__Group__1" + // InternalTqcl.g:1896:1: rule__Parameter__Group__1 : rule__Parameter__Group__1__Impl rule__Parameter__Group__2 ; + public final void rule__Parameter__Group__1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1900:1: ( rule__Parameter__Group__1__Impl rule__Parameter__Group__2 ) + // InternalTqcl.g:1901:2: rule__Parameter__Group__1__Impl rule__Parameter__Group__2 + { + pushFollow(FOLLOW_7); + rule__Parameter__Group__1__Impl(); + + state._fsp--; + + pushFollow(FOLLOW_2); + rule__Parameter__Group__2(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Parameter__Group__1" + + + // $ANTLR start "rule__Parameter__Group__1__Impl" + // InternalTqcl.g:1908:1: rule__Parameter__Group__1__Impl : ( '=' ) ; + public final void rule__Parameter__Group__1__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1912:1: ( ( '=' ) ) + // InternalTqcl.g:1913:1: ( '=' ) + { + // InternalTqcl.g:1913:1: ( '=' ) + // InternalTqcl.g:1914:2: '=' + { + before(grammarAccess.getParameterAccess().getEqualsSignKeyword_1()); + match(input,29,FOLLOW_2); + after(grammarAccess.getParameterAccess().getEqualsSignKeyword_1()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Parameter__Group__1__Impl" + + + // $ANTLR start "rule__Parameter__Group__2" + // InternalTqcl.g:1923:1: rule__Parameter__Group__2 : rule__Parameter__Group__2__Impl ; + public final void rule__Parameter__Group__2() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1927:1: ( rule__Parameter__Group__2__Impl ) + // InternalTqcl.g:1928:2: rule__Parameter__Group__2__Impl + { + pushFollow(FOLLOW_2); + rule__Parameter__Group__2__Impl(); + + state._fsp--; + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Parameter__Group__2" + + + // $ANTLR start "rule__Parameter__Group__2__Impl" + // InternalTqcl.g:1934:1: rule__Parameter__Group__2__Impl : ( ( rule__Parameter__ValueAssignment_2 ) ) ; + public final void rule__Parameter__Group__2__Impl() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1938:1: ( ( ( rule__Parameter__ValueAssignment_2 ) ) ) + // InternalTqcl.g:1939:1: ( ( rule__Parameter__ValueAssignment_2 ) ) + { + // InternalTqcl.g:1939:1: ( ( rule__Parameter__ValueAssignment_2 ) ) + // InternalTqcl.g:1940:2: ( rule__Parameter__ValueAssignment_2 ) + { + before(grammarAccess.getParameterAccess().getValueAssignment_2()); + // InternalTqcl.g:1941:2: ( rule__Parameter__ValueAssignment_2 ) + // InternalTqcl.g:1941:3: rule__Parameter__ValueAssignment_2 + { + pushFollow(FOLLOW_2); + rule__Parameter__ValueAssignment_2(); + + state._fsp--; + + + } + + after(grammarAccess.getParameterAccess().getValueAssignment_2()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Parameter__Group__2__Impl" + + + // $ANTLR start "rule__TriquetrumScript__LibrariesAssignment_0" + // InternalTqcl.g:1950:1: rule__TriquetrumScript__LibrariesAssignment_0 : ( ruleLibrary ) ; + public final void rule__TriquetrumScript__LibrariesAssignment_0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1954:1: ( ( ruleLibrary ) ) + // InternalTqcl.g:1955:2: ( ruleLibrary ) + { + // InternalTqcl.g:1955:2: ( ruleLibrary ) + // InternalTqcl.g:1956:3: ruleLibrary + { + before(grammarAccess.getTriquetrumScriptAccess().getLibrariesLibraryParserRuleCall_0_0()); + pushFollow(FOLLOW_2); + ruleLibrary(); + + state._fsp--; + + after(grammarAccess.getTriquetrumScriptAccess().getLibrariesLibraryParserRuleCall_0_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__TriquetrumScript__LibrariesAssignment_0" + + + // $ANTLR start "rule__TriquetrumScript__CommandsAssignment_1" + // InternalTqcl.g:1965:1: rule__TriquetrumScript__CommandsAssignment_1 : ( ruleCommand ) ; + public final void rule__TriquetrumScript__CommandsAssignment_1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1969:1: ( ( ruleCommand ) ) + // InternalTqcl.g:1970:2: ( ruleCommand ) + { + // InternalTqcl.g:1970:2: ( ruleCommand ) + // InternalTqcl.g:1971:3: ruleCommand + { + before(grammarAccess.getTriquetrumScriptAccess().getCommandsCommandParserRuleCall_1_0()); + pushFollow(FOLLOW_2); + ruleCommand(); + + state._fsp--; + + after(grammarAccess.getTriquetrumScriptAccess().getCommandsCommandParserRuleCall_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__TriquetrumScript__CommandsAssignment_1" + + + // $ANTLR start "rule__CompositeCommand__StartAssignment_0" + // InternalTqcl.g:1980:1: rule__CompositeCommand__StartAssignment_0 : ( ruleGoInto ) ; + public final void rule__CompositeCommand__StartAssignment_0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1984:1: ( ( ruleGoInto ) ) + // InternalTqcl.g:1985:2: ( ruleGoInto ) + { + // InternalTqcl.g:1985:2: ( ruleGoInto ) + // InternalTqcl.g:1986:3: ruleGoInto + { + before(grammarAccess.getCompositeCommandAccess().getStartGoIntoParserRuleCall_0_0()); + pushFollow(FOLLOW_2); + ruleGoInto(); + + state._fsp--; + + after(grammarAccess.getCompositeCommandAccess().getStartGoIntoParserRuleCall_0_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__CompositeCommand__StartAssignment_0" + + + // $ANTLR start "rule__CompositeCommand__CommandsAssignment_1" + // InternalTqcl.g:1995:1: rule__CompositeCommand__CommandsAssignment_1 : ( ruleCommand ) ; + public final void rule__CompositeCommand__CommandsAssignment_1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:1999:1: ( ( ruleCommand ) ) + // InternalTqcl.g:2000:2: ( ruleCommand ) + { + // InternalTqcl.g:2000:2: ( ruleCommand ) + // InternalTqcl.g:2001:3: ruleCommand + { + before(grammarAccess.getCompositeCommandAccess().getCommandsCommandParserRuleCall_1_0()); + pushFollow(FOLLOW_2); + ruleCommand(); + + state._fsp--; + + after(grammarAccess.getCompositeCommandAccess().getCommandsCommandParserRuleCall_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__CompositeCommand__CommandsAssignment_1" + + + // $ANTLR start "rule__CompositeCommand__EndAssignment_2" + // InternalTqcl.g:2010:1: rule__CompositeCommand__EndAssignment_2 : ( ( rule__CompositeCommand__EndAlternatives_2_0 ) ) ; + public final void rule__CompositeCommand__EndAssignment_2() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:2014:1: ( ( ( rule__CompositeCommand__EndAlternatives_2_0 ) ) ) + // InternalTqcl.g:2015:2: ( ( rule__CompositeCommand__EndAlternatives_2_0 ) ) + { + // InternalTqcl.g:2015:2: ( ( rule__CompositeCommand__EndAlternatives_2_0 ) ) + // InternalTqcl.g:2016:3: ( rule__CompositeCommand__EndAlternatives_2_0 ) + { + before(grammarAccess.getCompositeCommandAccess().getEndAlternatives_2_0()); + // InternalTqcl.g:2017:3: ( rule__CompositeCommand__EndAlternatives_2_0 ) + // InternalTqcl.g:2017:4: rule__CompositeCommand__EndAlternatives_2_0 + { + pushFollow(FOLLOW_2); + rule__CompositeCommand__EndAlternatives_2_0(); + + state._fsp--; + + + } + + after(grammarAccess.getCompositeCommandAccess().getEndAlternatives_2_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__CompositeCommand__EndAssignment_2" + + + // $ANTLR start "rule__Include__FilenameAssignment_1" + // InternalTqcl.g:2025:1: rule__Include__FilenameAssignment_1 : ( RULE_STRING ) ; + public final void rule__Include__FilenameAssignment_1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:2029:1: ( ( RULE_STRING ) ) + // InternalTqcl.g:2030:2: ( RULE_STRING ) + { + // InternalTqcl.g:2030:2: ( RULE_STRING ) + // InternalTqcl.g:2031:3: RULE_STRING + { + before(grammarAccess.getIncludeAccess().getFilenameSTRINGTerminalRuleCall_1_0()); + match(input,RULE_STRING,FOLLOW_2); + after(grammarAccess.getIncludeAccess().getFilenameSTRINGTerminalRuleCall_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Include__FilenameAssignment_1" + + + // $ANTLR start "rule__Library__NameAssignment_1" + // InternalTqcl.g:2040:1: rule__Library__NameAssignment_1 : ( RULE_ID ) ; + public final void rule__Library__NameAssignment_1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:2044:1: ( ( RULE_ID ) ) + // InternalTqcl.g:2045:2: ( RULE_ID ) + { + // InternalTqcl.g:2045:2: ( RULE_ID ) + // InternalTqcl.g:2046:3: RULE_ID + { + before(grammarAccess.getLibraryAccess().getNameIDTerminalRuleCall_1_0()); + match(input,RULE_ID,FOLLOW_2); + after(grammarAccess.getLibraryAccess().getNameIDTerminalRuleCall_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Library__NameAssignment_1" + + + // $ANTLR start "rule__Insert__CategoryAssignment_1" + // InternalTqcl.g:2055:1: rule__Insert__CategoryAssignment_1 : ( ruleCategory ) ; + public final void rule__Insert__CategoryAssignment_1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:2059:1: ( ( ruleCategory ) ) + // InternalTqcl.g:2060:2: ( ruleCategory ) + { + // InternalTqcl.g:2060:2: ( ruleCategory ) + // InternalTqcl.g:2061:3: ruleCategory + { + before(grammarAccess.getInsertAccess().getCategoryCategoryEnumRuleCall_1_0()); + pushFollow(FOLLOW_2); + ruleCategory(); + + state._fsp--; + + after(grammarAccess.getInsertAccess().getCategoryCategoryEnumRuleCall_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Insert__CategoryAssignment_1" + + + // $ANTLR start "rule__Insert__EntityClassAssignment_2" + // InternalTqcl.g:2070:1: rule__Insert__EntityClassAssignment_2 : ( RULE_ENTITY_CLASS ) ; + public final void rule__Insert__EntityClassAssignment_2() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:2074:1: ( ( RULE_ENTITY_CLASS ) ) + // InternalTqcl.g:2075:2: ( RULE_ENTITY_CLASS ) + { + // InternalTqcl.g:2075:2: ( RULE_ENTITY_CLASS ) + // InternalTqcl.g:2076:3: RULE_ENTITY_CLASS + { + before(grammarAccess.getInsertAccess().getEntityClassENTITY_CLASSTerminalRuleCall_2_0()); + match(input,RULE_ENTITY_CLASS,FOLLOW_2); + after(grammarAccess.getInsertAccess().getEntityClassENTITY_CLASSTerminalRuleCall_2_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Insert__EntityClassAssignment_2" + + + // $ANTLR start "rule__Insert__NameAssignment_4" + // InternalTqcl.g:2085:1: rule__Insert__NameAssignment_4 : ( RULE_STRING ) ; + public final void rule__Insert__NameAssignment_4() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:2089:1: ( ( RULE_STRING ) ) + // InternalTqcl.g:2090:2: ( RULE_STRING ) + { + // InternalTqcl.g:2090:2: ( RULE_STRING ) + // InternalTqcl.g:2091:3: RULE_STRING + { + before(grammarAccess.getInsertAccess().getNameSTRINGTerminalRuleCall_4_0()); + match(input,RULE_STRING,FOLLOW_2); + after(grammarAccess.getInsertAccess().getNameSTRINGTerminalRuleCall_4_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Insert__NameAssignment_4" + + + // $ANTLR start "rule__Insert__ParametersAssignment_5_1" + // InternalTqcl.g:2100:1: rule__Insert__ParametersAssignment_5_1 : ( ruleParameter ) ; + public final void rule__Insert__ParametersAssignment_5_1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:2104:1: ( ( ruleParameter ) ) + // InternalTqcl.g:2105:2: ( ruleParameter ) + { + // InternalTqcl.g:2105:2: ( ruleParameter ) + // InternalTqcl.g:2106:3: ruleParameter + { + before(grammarAccess.getInsertAccess().getParametersParameterParserRuleCall_5_1_0()); + pushFollow(FOLLOW_2); + ruleParameter(); + + state._fsp--; + + after(grammarAccess.getInsertAccess().getParametersParameterParserRuleCall_5_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Insert__ParametersAssignment_5_1" + + + // $ANTLR start "rule__Insert__ParametersAssignment_5_2_1" + // InternalTqcl.g:2115:1: rule__Insert__ParametersAssignment_5_2_1 : ( ruleParameter ) ; + public final void rule__Insert__ParametersAssignment_5_2_1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:2119:1: ( ( ruleParameter ) ) + // InternalTqcl.g:2120:2: ( ruleParameter ) + { + // InternalTqcl.g:2120:2: ( ruleParameter ) + // InternalTqcl.g:2121:3: ruleParameter + { + before(grammarAccess.getInsertAccess().getParametersParameterParserRuleCall_5_2_1_0()); + pushFollow(FOLLOW_2); + ruleParameter(); + + state._fsp--; + + after(grammarAccess.getInsertAccess().getParametersParameterParserRuleCall_5_2_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Insert__ParametersAssignment_5_2_1" + + + // $ANTLR start "rule__Set__ParamAssignment_1" + // InternalTqcl.g:2130:1: rule__Set__ParamAssignment_1 : ( ruleParameter ) ; + public final void rule__Set__ParamAssignment_1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:2134:1: ( ( ruleParameter ) ) + // InternalTqcl.g:2135:2: ( ruleParameter ) + { + // InternalTqcl.g:2135:2: ( ruleParameter ) + // InternalTqcl.g:2136:3: ruleParameter + { + before(grammarAccess.getSetAccess().getParamParameterParserRuleCall_1_0()); + pushFollow(FOLLOW_2); + ruleParameter(); + + state._fsp--; + + after(grammarAccess.getSetAccess().getParamParameterParserRuleCall_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Set__ParamAssignment_1" + + + // $ANTLR start "rule__Connect__FromAssignment_1" + // InternalTqcl.g:2145:1: rule__Connect__FromAssignment_1 : ( ruleConnectionPort ) ; + public final void rule__Connect__FromAssignment_1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:2149:1: ( ( ruleConnectionPort ) ) + // InternalTqcl.g:2150:2: ( ruleConnectionPort ) + { + // InternalTqcl.g:2150:2: ( ruleConnectionPort ) + // InternalTqcl.g:2151:3: ruleConnectionPort + { + before(grammarAccess.getConnectAccess().getFromConnectionPortParserRuleCall_1_0()); + pushFollow(FOLLOW_2); + ruleConnectionPort(); + + state._fsp--; + + after(grammarAccess.getConnectAccess().getFromConnectionPortParserRuleCall_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Connect__FromAssignment_1" + + + // $ANTLR start "rule__Connect__FromAssignment_2_1" + // InternalTqcl.g:2160:1: rule__Connect__FromAssignment_2_1 : ( ruleConnectionPort ) ; + public final void rule__Connect__FromAssignment_2_1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:2164:1: ( ( ruleConnectionPort ) ) + // InternalTqcl.g:2165:2: ( ruleConnectionPort ) + { + // InternalTqcl.g:2165:2: ( ruleConnectionPort ) + // InternalTqcl.g:2166:3: ruleConnectionPort + { + before(grammarAccess.getConnectAccess().getFromConnectionPortParserRuleCall_2_1_0()); + pushFollow(FOLLOW_2); + ruleConnectionPort(); + + state._fsp--; + + after(grammarAccess.getConnectAccess().getFromConnectionPortParserRuleCall_2_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Connect__FromAssignment_2_1" + + + // $ANTLR start "rule__Connect__ToAssignment_4" + // InternalTqcl.g:2175:1: rule__Connect__ToAssignment_4 : ( ruleConnectionPort ) ; + public final void rule__Connect__ToAssignment_4() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:2179:1: ( ( ruleConnectionPort ) ) + // InternalTqcl.g:2180:2: ( ruleConnectionPort ) + { + // InternalTqcl.g:2180:2: ( ruleConnectionPort ) + // InternalTqcl.g:2181:3: ruleConnectionPort + { + before(grammarAccess.getConnectAccess().getToConnectionPortParserRuleCall_4_0()); + pushFollow(FOLLOW_2); + ruleConnectionPort(); + + state._fsp--; + + after(grammarAccess.getConnectAccess().getToConnectionPortParserRuleCall_4_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Connect__ToAssignment_4" + + + // $ANTLR start "rule__Connect__ToAssignment_5_1" + // InternalTqcl.g:2190:1: rule__Connect__ToAssignment_5_1 : ( ruleConnectionPort ) ; + public final void rule__Connect__ToAssignment_5_1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:2194:1: ( ( ruleConnectionPort ) ) + // InternalTqcl.g:2195:2: ( ruleConnectionPort ) + { + // InternalTqcl.g:2195:2: ( ruleConnectionPort ) + // InternalTqcl.g:2196:3: ruleConnectionPort + { + before(grammarAccess.getConnectAccess().getToConnectionPortParserRuleCall_5_1_0()); + pushFollow(FOLLOW_2); + ruleConnectionPort(); + + state._fsp--; + + after(grammarAccess.getConnectAccess().getToConnectionPortParserRuleCall_5_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Connect__ToAssignment_5_1" + + + // $ANTLR start "rule__ConnectionPort__ActorAssignment_0" + // InternalTqcl.g:2205:1: rule__ConnectionPort__ActorAssignment_0 : ( ( RULE_ID ) ) ; + public final void rule__ConnectionPort__ActorAssignment_0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:2209:1: ( ( ( RULE_ID ) ) ) + // InternalTqcl.g:2210:2: ( ( RULE_ID ) ) + { + // InternalTqcl.g:2210:2: ( ( RULE_ID ) ) + // InternalTqcl.g:2211:3: ( RULE_ID ) + { + before(grammarAccess.getConnectionPortAccess().getActorInsertCrossReference_0_0()); + // InternalTqcl.g:2212:3: ( RULE_ID ) + // InternalTqcl.g:2213:4: RULE_ID + { + before(grammarAccess.getConnectionPortAccess().getActorInsertIDTerminalRuleCall_0_0_1()); + match(input,RULE_ID,FOLLOW_2); + after(grammarAccess.getConnectionPortAccess().getActorInsertIDTerminalRuleCall_0_0_1()); + + } + + after(grammarAccess.getConnectionPortAccess().getActorInsertCrossReference_0_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ConnectionPort__ActorAssignment_0" + + + // $ANTLR start "rule__ConnectionPort__PortAssignment_2" + // InternalTqcl.g:2224:1: rule__ConnectionPort__PortAssignment_2 : ( ruleNamedObj ) ; + public final void rule__ConnectionPort__PortAssignment_2() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:2228:1: ( ( ruleNamedObj ) ) + // InternalTqcl.g:2229:2: ( ruleNamedObj ) + { + // InternalTqcl.g:2229:2: ( ruleNamedObj ) + // InternalTqcl.g:2230:3: ruleNamedObj + { + before(grammarAccess.getConnectionPortAccess().getPortNamedObjParserRuleCall_2_0()); + pushFollow(FOLLOW_2); + ruleNamedObj(); + + state._fsp--; + + after(grammarAccess.getConnectionPortAccess().getPortNamedObjParserRuleCall_2_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__ConnectionPort__PortAssignment_2" + + + // $ANTLR start "rule__GoInto__DirectionAssignment_1" + // InternalTqcl.g:2239:1: rule__GoInto__DirectionAssignment_1 : ( ( 'into' ) ) ; + public final void rule__GoInto__DirectionAssignment_1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:2243:1: ( ( ( 'into' ) ) ) + // InternalTqcl.g:2244:2: ( ( 'into' ) ) + { + // InternalTqcl.g:2244:2: ( ( 'into' ) ) + // InternalTqcl.g:2245:3: ( 'into' ) + { + before(grammarAccess.getGoIntoAccess().getDirectionIntoKeyword_1_0()); + // InternalTqcl.g:2246:3: ( 'into' ) + // InternalTqcl.g:2247:4: 'into' + { + before(grammarAccess.getGoIntoAccess().getDirectionIntoKeyword_1_0()); + match(input,30,FOLLOW_2); + after(grammarAccess.getGoIntoAccess().getDirectionIntoKeyword_1_0()); + + } + + after(grammarAccess.getGoIntoAccess().getDirectionIntoKeyword_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__GoInto__DirectionAssignment_1" + + + // $ANTLR start "rule__GoInto__ActorAssignment_2" + // InternalTqcl.g:2258:1: rule__GoInto__ActorAssignment_2 : ( ( RULE_ID ) ) ; + public final void rule__GoInto__ActorAssignment_2() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:2262:1: ( ( ( RULE_ID ) ) ) + // InternalTqcl.g:2263:2: ( ( RULE_ID ) ) + { + // InternalTqcl.g:2263:2: ( ( RULE_ID ) ) + // InternalTqcl.g:2264:3: ( RULE_ID ) + { + before(grammarAccess.getGoIntoAccess().getActorInsertCrossReference_2_0()); + // InternalTqcl.g:2265:3: ( RULE_ID ) + // InternalTqcl.g:2266:4: RULE_ID + { + before(grammarAccess.getGoIntoAccess().getActorInsertIDTerminalRuleCall_2_0_1()); + match(input,RULE_ID,FOLLOW_2); + after(grammarAccess.getGoIntoAccess().getActorInsertIDTerminalRuleCall_2_0_1()); + + } + + after(grammarAccess.getGoIntoAccess().getActorInsertCrossReference_2_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__GoInto__ActorAssignment_2" + + + // $ANTLR start "rule__GoOut__DirectionAssignment_1" + // InternalTqcl.g:2277:1: rule__GoOut__DirectionAssignment_1 : ( ( 'out' ) ) ; + public final void rule__GoOut__DirectionAssignment_1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:2281:1: ( ( ( 'out' ) ) ) + // InternalTqcl.g:2282:2: ( ( 'out' ) ) + { + // InternalTqcl.g:2282:2: ( ( 'out' ) ) + // InternalTqcl.g:2283:3: ( 'out' ) + { + before(grammarAccess.getGoOutAccess().getDirectionOutKeyword_1_0()); + // InternalTqcl.g:2284:3: ( 'out' ) + // InternalTqcl.g:2285:4: 'out' + { + before(grammarAccess.getGoOutAccess().getDirectionOutKeyword_1_0()); + match(input,31,FOLLOW_2); + after(grammarAccess.getGoOutAccess().getDirectionOutKeyword_1_0()); + + } + + after(grammarAccess.getGoOutAccess().getDirectionOutKeyword_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__GoOut__DirectionAssignment_1" + + + // $ANTLR start "rule__GoTop__DirectionAssignment_1" + // InternalTqcl.g:2296:1: rule__GoTop__DirectionAssignment_1 : ( ( 'top' ) ) ; + public final void rule__GoTop__DirectionAssignment_1() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:2300:1: ( ( ( 'top' ) ) ) + // InternalTqcl.g:2301:2: ( ( 'top' ) ) + { + // InternalTqcl.g:2301:2: ( ( 'top' ) ) + // InternalTqcl.g:2302:3: ( 'top' ) + { + before(grammarAccess.getGoTopAccess().getDirectionTopKeyword_1_0()); + // InternalTqcl.g:2303:3: ( 'top' ) + // InternalTqcl.g:2304:4: 'top' + { + before(grammarAccess.getGoTopAccess().getDirectionTopKeyword_1_0()); + match(input,32,FOLLOW_2); + after(grammarAccess.getGoTopAccess().getDirectionTopKeyword_1_0()); + + } + + after(grammarAccess.getGoTopAccess().getDirectionTopKeyword_1_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__GoTop__DirectionAssignment_1" + + + // $ANTLR start "rule__Parameter__IdAssignment_0" + // InternalTqcl.g:2315:1: rule__Parameter__IdAssignment_0 : ( ruleParameter_id ) ; + public final void rule__Parameter__IdAssignment_0() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:2319:1: ( ( ruleParameter_id ) ) + // InternalTqcl.g:2320:2: ( ruleParameter_id ) + { + // InternalTqcl.g:2320:2: ( ruleParameter_id ) + // InternalTqcl.g:2321:3: ruleParameter_id + { + before(grammarAccess.getParameterAccess().getIdParameter_idParserRuleCall_0_0()); + pushFollow(FOLLOW_2); + ruleParameter_id(); + + state._fsp--; + + after(grammarAccess.getParameterAccess().getIdParameter_idParserRuleCall_0_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Parameter__IdAssignment_0" + + + // $ANTLR start "rule__Parameter__ValueAssignment_2" + // InternalTqcl.g:2330:1: rule__Parameter__ValueAssignment_2 : ( RULE_STRING ) ; + public final void rule__Parameter__ValueAssignment_2() throws RecognitionException { + + int stackSize = keepStackSize(); + + try { + // InternalTqcl.g:2334:1: ( ( RULE_STRING ) ) + // InternalTqcl.g:2335:2: ( RULE_STRING ) + { + // InternalTqcl.g:2335:2: ( RULE_STRING ) + // InternalTqcl.g:2336:3: RULE_STRING + { + before(grammarAccess.getParameterAccess().getValueSTRINGTerminalRuleCall_2_0()); + match(input,RULE_STRING,FOLLOW_2); + after(grammarAccess.getParameterAccess().getValueSTRINGTerminalRuleCall_2_0()); + + } + + + } + + } + catch (RecognitionException re) { + reportError(re); + recover(input,re); + } + finally { + + restoreStackSize(stackSize); + + } + return ; + } + // $ANTLR end "rule__Parameter__ValueAssignment_2" + + // Delegated rules + + + + + public static final BitSet FOLLOW_1 = new BitSet(new long[]{0x0000000000000000L}); + public static final BitSet FOLLOW_2 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_3 = new BitSet(new long[]{0x0000000013140000L}); + public static final BitSet FOLLOW_4 = new BitSet(new long[]{0x0000000000080002L}); + public static final BitSet FOLLOW_5 = new BitSet(new long[]{0x0000000013140002L}); + public static final BitSet FOLLOW_6 = new BitSet(new long[]{0x0000000000020000L}); + public static final BitSet FOLLOW_7 = new BitSet(new long[]{0x0000000000000020L}); + public static final BitSet FOLLOW_8 = new BitSet(new long[]{0x0000000000000040L}); + public static final BitSet FOLLOW_9 = new BitSet(new long[]{0x000000000001E080L}); + public static final BitSet FOLLOW_10 = new BitSet(new long[]{0x0000000000200000L}); + public static final BitSet FOLLOW_11 = new BitSet(new long[]{0x0000000000400000L}); + public static final BitSet FOLLOW_12 = new BitSet(new long[]{0x0000000000000030L}); + public static final BitSet FOLLOW_13 = new BitSet(new long[]{0x0000000000800000L}); + public static final BitSet FOLLOW_14 = new BitSet(new long[]{0x0000000000800002L}); + public static final BitSet FOLLOW_15 = new BitSet(new long[]{0x0000000004800000L}); + public static final BitSet FOLLOW_16 = new BitSet(new long[]{0x0000000008000000L}); + public static final BitSet FOLLOW_17 = new BitSet(new long[]{0x0000000000000060L}); + public static final BitSet FOLLOW_18 = new BitSet(new long[]{0x0000000040000000L}); + public static final BitSet FOLLOW_19 = new BitSet(new long[]{0x0000000080000000L}); + public static final BitSet FOLLOW_20 = new BitSet(new long[]{0x0000000100000000L}); + public static final BitSet FOLLOW_21 = new BitSet(new long[]{0x0000000020000000L}); + +} \ No newline at end of file diff --git a/org.eclipse.triquetrum.commands.xtext.ide/src/main/java/org/eclipse/triquetrum/commands/xtext/ide/TqCLLaunchShortcut.java b/org.eclipse.triquetrum.commands.xtext.ide/src/main/java/org/eclipse/triquetrum/commands/xtext/ide/TqCLLaunchShortcut.java new file mode 100644 index 00000000..31ecab6a --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ide/src/main/java/org/eclipse/triquetrum/commands/xtext/ide/TqCLLaunchShortcut.java @@ -0,0 +1,64 @@ +/******************************************************************************* + * Copyright (c) 2017 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +package org.eclipse.triquetrum.commands.xtext.ide; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.debug.ui.ILaunchShortcut; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.triquetrum.commands.interpreter.TqclInterpreter; +import org.eclipse.ui.IEditorInput; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.console.ConsolePlugin; +import org.eclipse.ui.console.IConsole; +import org.eclipse.ui.console.IConsoleManager; +import org.eclipse.ui.console.MessageConsole; +import org.eclipse.ui.console.MessageConsoleStream; + + +//TODO: TqCL Macro launcher +public class TqCLLaunchShortcut implements ILaunchShortcut { + + @Override + public void launch(ISelection selection, String mode) { + Object firstElement = ((IStructuredSelection) selection).getFirstElement(); + if (firstElement instanceof IFile) { + try { + IFile file = (IFile) firstElement; + java.net.URI rawLocationURI = file.getRawLocationURI(); + + IConsoleManager consoleManager = ConsolePlugin.getDefault().getConsoleManager(); + MessageConsole messageConsole = new MessageConsole(file.getName(), "TqCL", null, false); + consoleManager.addConsoles(new IConsole[]{messageConsole}); + MessageConsoleStream newMessageStream = messageConsole.newMessageStream(); +// newMessageStream + + TqclInterpreter interpreter = new TqclInterpreter(); + interpreter.interpret(file.getName(),file.getContents(), file.getParent().getLocationURI(),org.eclipse.triquetrum.workflow.model.CompositeActor.class); + } catch (CoreException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + } + + @Override + public void launch(IEditorPart editor, String mode) { + // TODO Auto-generated method stub + IEditorInput firstElement = editor.getEditorInput(); + if (firstElement instanceof IFile) { + IFile file = (IFile) firstElement; + + } + } + +} diff --git a/org.eclipse.triquetrum.commands.xtext.ide/src/main/java/org/eclipse/triquetrum/commands/xtext/ide/TqCLPtolemyLaunchShortcut.java b/org.eclipse.triquetrum.commands.xtext.ide/src/main/java/org/eclipse/triquetrum/commands/xtext/ide/TqCLPtolemyLaunchShortcut.java new file mode 100644 index 00000000..a08e47e1 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ide/src/main/java/org/eclipse/triquetrum/commands/xtext/ide/TqCLPtolemyLaunchShortcut.java @@ -0,0 +1,83 @@ +/******************************************************************************* + * Copyright (c) 2017 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +package org.eclipse.triquetrum.commands.xtext.ide; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.debug.ui.ILaunchShortcut; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.triquetrum.commands.interpreter.TqclInterpreter; +import org.eclipse.triquetrum.workflow.WorkflowExecutionService; +import org.eclipse.triquetrum.workflow.WorkflowExecutionService.StartMode; +import org.eclipse.triquetrum.workflow.editor.TriqEditorPlugin; +import org.eclipse.ui.IEditorInput; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.console.ConsolePlugin; +import org.eclipse.ui.console.IConsole; +import org.eclipse.ui.console.IConsoleManager; +import org.eclipse.ui.console.MessageConsole; + +import ptolemy.actor.CompositeActor; + +/** + * Launcher to create and start a ptolemy model + * + * @author rtotaro + * + */ +public class TqCLPtolemyLaunchShortcut implements ILaunchShortcut { + + /* (non-Javadoc) + * @see org.eclipse.debug.ui.ILaunchShortcut#launch(org.eclipse.jface.viewers.ISelection, java.lang.String) + */ + @SuppressWarnings({ "rawtypes", "unchecked" }) + @Override + public void launch(ISelection selection, String mode) { + Object firstElement = ((IStructuredSelection) selection).getFirstElement(); + if (firstElement instanceof IFile) { + try { + IFile file = (IFile) firstElement; + + IConsoleManager consoleManager = ConsolePlugin.getDefault().getConsoleManager(); + MessageConsole messageConsole = new MessageConsole(file.getName(), "TqCL", null, false); + consoleManager.addConsoles(new IConsole[] { messageConsole }); + + TqclInterpreter interpreter = new TqclInterpreter(); + CompositeActor model = (CompositeActor) interpreter.interpret(file.getName(), file.getContents(), + file.getParent().getLocationURI(), CompositeActor.class); + + + //workflow service could be exposed by a different plugin; not workflow editor + WorkflowExecutionService executionService = TriqEditorPlugin.getDefault().getWorkflowExecutionService(); + executionService.start(StartMode.RUN, model, null, null, null); + + } catch (CoreException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + } + + /* (non-Javadoc) + * @see org.eclipse.debug.ui.ILaunchShortcut#launch(org.eclipse.ui.IEditorPart, java.lang.String) + */ + @Override + public void launch(IEditorPart editor, String mode) { + // TODO Auto-generated method stub + IEditorInput firstElement = editor.getEditorInput(); + if (firstElement instanceof IFile) { + IFile file = (IFile) firstElement; + + } + } + +} diff --git a/org.eclipse.triquetrum.commands.xtext.tests/.classpath b/org.eclipse.triquetrum.commands.xtext.tests/.classpath new file mode 100644 index 00000000..38e2c7d5 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.tests/.classpath @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/org.eclipse.triquetrum.commands.xtext.tests/.gitignore b/org.eclipse.triquetrum.commands.xtext.tests/.gitignore new file mode 100644 index 00000000..b83d2226 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.tests/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/org.eclipse.triquetrum.commands.xtext.tests/.project b/org.eclipse.triquetrum.commands.xtext.tests/.project new file mode 100644 index 00000000..203fa507 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.tests/.project @@ -0,0 +1,34 @@ + + + org.eclipse.triquetrum.commands.xtext.tests + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.xtext.ui.shared.xtextNature + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + diff --git a/org.eclipse.triquetrum.commands.xtext.tests/.settings/org.eclipse.core.resources.prefs b/org.eclipse.triquetrum.commands.xtext.tests/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 00000000..99f26c02 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.tests/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/org.eclipse.triquetrum.commands.xtext.tests/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.triquetrum.commands.xtext.tests/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..0c68a61d --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.tests/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/org.eclipse.triquetrum.commands.xtext.tests/META-INF/MANIFEST.MF b/org.eclipse.triquetrum.commands.xtext.tests/META-INF/MANIFEST.MF new file mode 100644 index 00000000..9407d542 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.tests/META-INF/MANIFEST.MF @@ -0,0 +1,22 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: org.eclipse.triquetrum.commands.xtext.tests +Bundle-Vendor: My Company +Bundle-Version: 1.0.0.qualifier +Bundle-SymbolicName: org.eclipse.triquetrum.commands.xtext.tests; singleton:=true +Bundle-ActivationPolicy: lazy +Require-Bundle: org.eclipse.triquetrum.commands.xtext, + org.junit;bundle-version="4.7.0", + org.eclipse.xtext.junit4, + org.eclipse.xtext.xbase.junit, + org.eclipse.xtext.xbase.lib, + org.objectweb.asm;bundle-version="[5.0.1,6.0.0)";resolution:=optional +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Import-Package: org.hamcrest.core, + org.junit;version="4.5.0", + org.junit.runners.model;version="4.5.0", + org.junit.runner;version="4.5.0", + org.junit.runners;version="4.5.0", + org.junit.runner.manipulation;version="4.5.0", + org.junit.runner.notification;version="4.5.0" +Export-Package: org.eclipse.triquetrum.commands.tests diff --git a/org.eclipse.triquetrum.commands.xtext.tests/build.properties b/org.eclipse.triquetrum.commands.xtext.tests/build.properties new file mode 100644 index 00000000..d211e779 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.tests/build.properties @@ -0,0 +1,15 @@ +############################################################################### +# Copyright (c) 2016 Totaro Rodolfo +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# Rodolfo Totaro - initial API and implementation and/or initial documentation +############################################################################### +source.. = src/,\ + src-gen/,\ + xtend-gen/ +bin.includes = .,\ + META-INF/ diff --git a/org.eclipse.triquetrum.commands.xtext.tests/src/test/java-gen/org/eclipse/triquetrum/commands/tests/TqclInjectorProvider.java b/org.eclipse.triquetrum.commands.xtext.tests/src/test/java-gen/org/eclipse/triquetrum/commands/tests/TqclInjectorProvider.java new file mode 100644 index 00000000..d940656a --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.tests/src/test/java-gen/org/eclipse/triquetrum/commands/tests/TqclInjectorProvider.java @@ -0,0 +1,75 @@ +/******************************************************************************* + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +package org.eclipse.triquetrum.commands.tests; + +import com.google.inject.Guice; +import com.google.inject.Injector; +import org.eclipse.triquetrum.commands.TqclRuntimeModule; +import org.eclipse.triquetrum.commands.TqclStandaloneSetup; +import org.eclipse.xtext.junit4.GlobalRegistries; +import org.eclipse.xtext.junit4.GlobalRegistries.GlobalStateMemento; +import org.eclipse.xtext.junit4.IInjectorProvider; +import org.eclipse.xtext.junit4.IRegistryConfigurator; + +public class TqclInjectorProvider implements IInjectorProvider, IRegistryConfigurator { + + protected GlobalStateMemento stateBeforeInjectorCreation; + protected GlobalStateMemento stateAfterInjectorCreation; + protected Injector injector; + + static { + GlobalRegistries.initializeDefaults(); + } + + @Override + public Injector getInjector() { + if (injector == null) { + stateBeforeInjectorCreation = GlobalRegistries.makeCopyOfGlobalState(); + this.injector = internalCreateInjector(); + stateAfterInjectorCreation = GlobalRegistries.makeCopyOfGlobalState(); + } + return injector; + } + + protected Injector internalCreateInjector() { + return new TqclStandaloneSetup() { + @Override + public Injector createInjector() { + return Guice.createInjector(createRuntimeModule()); + } + }.createInjectorAndDoEMFRegistration(); + } + + protected TqclRuntimeModule createRuntimeModule() { + // make it work also with Maven/Tycho and OSGI + // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=493672 + return new TqclRuntimeModule() { + @Override + public ClassLoader bindClassLoaderToInstance() { + return TqclInjectorProvider.class + .getClassLoader(); + } + }; + } + + @Override + public void restoreRegistry() { + stateBeforeInjectorCreation.restoreGlobalState(); + } + + @Override + public void setupRegistry() { + getInjector(); + stateAfterInjectorCreation.restoreGlobalState(); + } +} diff --git a/org.eclipse.triquetrum.commands.xtext.tests/src/test/java/org/eclipse/triquetrum/commands/tests/TqclParsingTest.xtend b/org.eclipse.triquetrum.commands.xtext.tests/src/test/java/org/eclipse/triquetrum/commands/tests/TqclParsingTest.xtend new file mode 100644 index 00000000..ba58d1f1 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.tests/src/test/java/org/eclipse/triquetrum/commands/tests/TqclParsingTest.xtend @@ -0,0 +1,30 @@ +/* + * generated by Xtext 2.10.0 + */ +package org.eclipse.triquetrum.commands.tests + +import com.google.inject.Inject +import org.eclipse.triquetrum.commands.tqcl.TriquetrumScript +import org.eclipse.xtext.junit4.InjectWith +import org.eclipse.xtext.junit4.XtextRunner +import org.eclipse.xtext.junit4.util.ParseHelper +import org.junit.Assert +import org.junit.Test +import org.junit.runner.RunWith + +@RunWith(XtextRunner) +@InjectWith(TqclInjectorProvider) +class TqclParsingTest{ + + @Inject + ParseHelper parseHelper + + @Test + def void loadModel() { + val result = parseHelper.parse(''' + Hello Xtext! + ''') + Assert.assertNotNull(result) + } + +} diff --git a/org.eclipse.triquetrum.commands.xtext.tests/src/test/xtend-gen/org/eclipse/triquetrum/commands/tests/.TqclParsingTest.xtendbin b/org.eclipse.triquetrum.commands.xtext.tests/src/test/xtend-gen/org/eclipse/triquetrum/commands/tests/.TqclParsingTest.xtendbin new file mode 100644 index 00000000..b1c9bd37 Binary files /dev/null and b/org.eclipse.triquetrum.commands.xtext.tests/src/test/xtend-gen/org/eclipse/triquetrum/commands/tests/.TqclParsingTest.xtendbin differ diff --git a/org.eclipse.triquetrum.commands.xtext.tests/src/test/xtend-gen/org/eclipse/triquetrum/commands/tests/.gitignore b/org.eclipse.triquetrum.commands.xtext.tests/src/test/xtend-gen/org/eclipse/triquetrum/commands/tests/.gitignore new file mode 100644 index 00000000..9373a401 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.tests/src/test/xtend-gen/org/eclipse/triquetrum/commands/tests/.gitignore @@ -0,0 +1,3 @@ +/.TqclParsingTest.java._trace +/.TqclParsingTest.xtendbin +/TqclParsingTest.java diff --git a/org.eclipse.triquetrum.commands.xtext.tests/src/test/xtend-gen/org/eclipse/triquetrum/commands/tests/TqclParsingTest.java b/org.eclipse.triquetrum.commands.xtext.tests/src/test/xtend-gen/org/eclipse/triquetrum/commands/tests/TqclParsingTest.java new file mode 100644 index 00000000..1001b4aa --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.tests/src/test/xtend-gen/org/eclipse/triquetrum/commands/tests/TqclParsingTest.java @@ -0,0 +1,37 @@ +/** + * generated by Xtext 2.10.0 + */ +package org.eclipse.triquetrum.commands.tests; + +import com.google.inject.Inject; +import org.eclipse.triquetrum.commands.tests.TqclInjectorProvider; +import org.eclipse.triquetrum.commands.tqcl.TriquetrumScript; +import org.eclipse.xtend2.lib.StringConcatenation; +import org.eclipse.xtext.junit4.InjectWith; +import org.eclipse.xtext.junit4.XtextRunner; +import org.eclipse.xtext.junit4.util.ParseHelper; +import org.eclipse.xtext.xbase.lib.Exceptions; +import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; + +@RunWith(XtextRunner.class) +@InjectWith(TqclInjectorProvider.class) +@SuppressWarnings("all") +public class TqclParsingTest { + @Inject + private ParseHelper parseHelper; + + @Test + public void loadModel() { + try { + StringConcatenation _builder = new StringConcatenation(); + _builder.append("Hello Xtext!"); + _builder.newLine(); + final TriquetrumScript result = this.parseHelper.parse(_builder); + Assert.assertNotNull(result); + } catch (Throwable _e) { + throw Exceptions.sneakyThrow(_e); + } + } +} diff --git a/org.eclipse.triquetrum.commands.xtext.ui.tests/.classpath b/org.eclipse.triquetrum.commands.xtext.ui.tests/.classpath new file mode 100644 index 00000000..323b07b3 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ui.tests/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/org.eclipse.triquetrum.commands.xtext.ui.tests/.gitignore b/org.eclipse.triquetrum.commands.xtext.ui.tests/.gitignore new file mode 100644 index 00000000..b83d2226 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ui.tests/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/org.eclipse.triquetrum.commands.xtext.ui.tests/.project b/org.eclipse.triquetrum.commands.xtext.ui.tests/.project new file mode 100644 index 00000000..63aade09 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ui.tests/.project @@ -0,0 +1,34 @@ + + + org.eclipse.triquetrum.commands.xtext.ui.tests + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.xtext.ui.shared.xtextNature + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + diff --git a/org.eclipse.triquetrum.commands.xtext.ui.tests/.settings/org.eclipse.core.resources.prefs b/org.eclipse.triquetrum.commands.xtext.ui.tests/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 00000000..99f26c02 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ui.tests/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/org.eclipse.triquetrum.commands.xtext.ui.tests/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.triquetrum.commands.xtext.ui.tests/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..0c68a61d --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ui.tests/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/org.eclipse.triquetrum.commands.xtext.ui.tests/META-INF/MANIFEST.MF b/org.eclipse.triquetrum.commands.xtext.ui.tests/META-INF/MANIFEST.MF new file mode 100644 index 00000000..5208612f --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ui.tests/META-INF/MANIFEST.MF @@ -0,0 +1,21 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: org.eclipse.triquetrum.commands.xtext.ui.tests +Bundle-Vendor: My Company +Bundle-Version: 1.0.0.qualifier +Bundle-SymbolicName: org.eclipse.triquetrum.commands.xtext.ui.tests; singleton:=true +Bundle-ActivationPolicy: lazy +Require-Bundle: org.eclipse.triquetrum.commands.xtext.ui, + org.junit;bundle-version="4.7.0", + org.eclipse.xtext.junit4, + org.eclipse.xtext.xbase.junit, + org.eclipse.core.runtime, + org.eclipse.ui.workbench;resolution:=optional +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Import-Package: org.hamcrest.core, + org.junit;version="4.5.0", + org.junit.runners.model;version="4.5.0", + org.junit.runner;version="4.5.0", + org.junit.runners;version="4.5.0", + org.junit.runner.manipulation;version="4.5.0", + org.junit.runner.notification;version="4.5.0" diff --git a/org.eclipse.triquetrum.commands.xtext.ui.tests/build.properties b/org.eclipse.triquetrum.commands.xtext.ui.tests/build.properties new file mode 100644 index 00000000..d211e779 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ui.tests/build.properties @@ -0,0 +1,15 @@ +############################################################################### +# Copyright (c) 2016 Totaro Rodolfo +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# Rodolfo Totaro - initial API and implementation and/or initial documentation +############################################################################### +source.. = src/,\ + src-gen/,\ + xtend-gen/ +bin.includes = .,\ + META-INF/ diff --git a/org.eclipse.triquetrum.commands.xtext.ui/.classpath b/org.eclipse.triquetrum.commands.xtext.ui/.classpath new file mode 100644 index 00000000..9ef1c151 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ui/.classpath @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/org.eclipse.triquetrum.commands.xtext.ui/.gitignore b/org.eclipse.triquetrum.commands.xtext.ui/.gitignore new file mode 100644 index 00000000..b83d2226 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ui/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/org.eclipse.triquetrum.commands.xtext.ui/.project b/org.eclipse.triquetrum.commands.xtext.ui/.project new file mode 100644 index 00000000..6cb42272 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ui/.project @@ -0,0 +1,34 @@ + + + org.eclipse.triquetrum.commands.xtext.ui + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.xtext.ui.shared.xtextNature + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + diff --git a/org.eclipse.triquetrum.commands.xtext.ui/.settings/org.eclipse.core.resources.prefs b/org.eclipse.triquetrum.commands.xtext.ui/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 00000000..99f26c02 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ui/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/org.eclipse.triquetrum.commands.xtext.ui/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.triquetrum.commands.xtext.ui/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..0c68a61d --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ui/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/org.eclipse.triquetrum.commands.xtext.ui/META-INF/MANIFEST.MF b/org.eclipse.triquetrum.commands.xtext.ui/META-INF/MANIFEST.MF new file mode 100644 index 00000000..6c3850f0 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ui/META-INF/MANIFEST.MF @@ -0,0 +1,34 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: org.eclipse.triquetrum.commands.xtext.ui +Bundle-Vendor: My Company +Bundle-Version: 1.0.0.qualifier +Bundle-SymbolicName: org.eclipse.triquetrum.commands.xtext.ui; singleton:=true +Bundle-ActivationPolicy: lazy +Require-Bundle: org.eclipse.triquetrum.commands.xtext, + org.eclipse.triquetrum.commands.xtext.ide, + org.eclipse.xtext.ui, + org.eclipse.xtext.ui.shared, + org.eclipse.xtext.ui.codetemplates.ui, + org.eclipse.ui.editors;bundle-version="3.5.0", + org.eclipse.ui.ide;bundle-version="3.5.0", + org.eclipse.ui, + org.eclipse.compare, + org.eclipse.xtext.builder, + org.eclipse.xtend.lib;resolution:=optional, + org.eclipse.xtext.xbase.lib, + org.eclipse.xtext.xbase.ui, + org.eclipse.xtext.common.types.ui, + org.eclipse.triquetrum.workflow.editor;bundle-version="0.1.0", + org.eclipse.graphiti;bundle-version="0.13.0", + org.eclipse.triquetrum.workflow.model;bundle-version="0.1.0", + ptolemy.core;bundle-version="11.0.0", + org.ptolemy.commons;bundle-version="11.0.0", + org.eclipse.triquetrum.commands.api +Import-Package: org.apache.commons.lang;version="2.6.0", + org.apache.log4j +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-Activator: org.eclipse.triquetrum.commands.xtext.ui.internal.XtextActivator +Export-Package: org.eclipse.triquetrum.commands.ui.contentassist, + org.eclipse.triquetrum.commands.xtext.ui.internal, + org.eclipse.triquetrum.commands.ui.quickfix diff --git a/org.eclipse.triquetrum.commands.xtext.ui/build.properties b/org.eclipse.triquetrum.commands.xtext.ui/build.properties new file mode 100644 index 00000000..ff24db62 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ui/build.properties @@ -0,0 +1,16 @@ +############################################################################### +# Copyright (c) 2016 Totaro Rodolfo +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# Rodolfo Totaro - initial API and implementation and/or initial documentation +############################################################################### +source.. = src/,\ + src-gen/,\ + xtend-gen/ +bin.includes = .,\ + META-INF/,\ + plugin.xml diff --git a/org.eclipse.triquetrum.commands.xtext.ui/plugin.xml b/org.eclipse.triquetrum.commands.xtext.ui/plugin.xml new file mode 100644 index 00000000..23121916 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ui/plugin.xml @@ -0,0 +1,421 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.eclipse.triquetrum.commands.xtext.ui/plugin.xml_gen b/org.eclipse.triquetrum.commands.xtext.ui/plugin.xml_gen new file mode 100644 index 00000000..46075264 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ui/plugin.xml_gen @@ -0,0 +1,410 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.eclipse.triquetrum.commands.xtext.ui/src/main/java-gen/org/eclipse/triquetrum/commands/ui/AbstractTqclUiModule.java b/org.eclipse.triquetrum.commands.xtext.ui/src/main/java-gen/org/eclipse/triquetrum/commands/ui/AbstractTqclUiModule.java new file mode 100644 index 00000000..b640d320 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ui/src/main/java-gen/org/eclipse/triquetrum/commands/ui/AbstractTqclUiModule.java @@ -0,0 +1,289 @@ +/******************************************************************************* + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +package org.eclipse.triquetrum.commands.ui; + +import com.google.inject.Binder; +import com.google.inject.Provider; +import com.google.inject.name.Names; +import org.eclipse.compare.IViewerCreator; +import org.eclipse.core.resources.IWorkspaceRoot; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.jface.viewers.ILabelProvider; +import org.eclipse.triquetrum.commands.ide.contentassist.antlr.PartialTqclContentAssistParser; +import org.eclipse.triquetrum.commands.ide.contentassist.antlr.TqclParser; +import org.eclipse.triquetrum.commands.ide.contentassist.antlr.internal.InternalTqclLexer; +import org.eclipse.triquetrum.commands.ui.contentassist.TqclProposalProvider; +import org.eclipse.triquetrum.commands.ui.labeling.TqclDescriptionLabelProvider; +import org.eclipse.triquetrum.commands.ui.labeling.TqclLabelProvider; +import org.eclipse.triquetrum.commands.ui.outline.TqclOutlineTreeProvider; +import org.eclipse.triquetrum.commands.ui.quickfix.TqclQuickfixProvider; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.eclipse.xtext.builder.BuilderParticipant; +import org.eclipse.xtext.builder.EclipseOutputConfigurationProvider; +import org.eclipse.xtext.builder.IXtextBuilderParticipant; +import org.eclipse.xtext.builder.builderState.IBuilderState; +import org.eclipse.xtext.builder.clustering.CurrentDescriptions; +import org.eclipse.xtext.builder.impl.PersistentDataAwareDirtyResource; +import org.eclipse.xtext.builder.nature.NatureAddingEditorCallback; +import org.eclipse.xtext.builder.preferences.BuilderPreferenceAccess; +import org.eclipse.xtext.generator.IContextualOutputConfigurationProvider; +import org.eclipse.xtext.ide.LexerIdeBindings; +import org.eclipse.xtext.ide.editor.contentassist.antlr.IContentAssistParser; +import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.Lexer; +import org.eclipse.xtext.ide.editor.partialEditing.IPartialEditingContentAssistParser; +import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider; +import org.eclipse.xtext.parser.antlr.ITokenDefProvider; +import org.eclipse.xtext.parser.antlr.LexerProvider; +import org.eclipse.xtext.resource.IResourceDescriptions; +import org.eclipse.xtext.resource.containers.IAllContainersState; +import org.eclipse.xtext.resource.impl.ResourceDescriptionsProvider; +import org.eclipse.xtext.service.SingletonBinding; +import org.eclipse.xtext.ui.DefaultUiModule; +import org.eclipse.xtext.ui.codetemplates.ui.AccessibleCodetemplatesActivator; +import org.eclipse.xtext.ui.codetemplates.ui.partialEditing.IPartialEditingContentAssistContextFactory; +import org.eclipse.xtext.ui.codetemplates.ui.partialEditing.PartialEditingContentAssistContextFactory; +import org.eclipse.xtext.ui.codetemplates.ui.preferences.AdvancedTemplatesPreferencePage; +import org.eclipse.xtext.ui.codetemplates.ui.preferences.TemplatesLanguageConfiguration; +import org.eclipse.xtext.ui.codetemplates.ui.registry.LanguageRegistrar; +import org.eclipse.xtext.ui.codetemplates.ui.registry.LanguageRegistry; +import org.eclipse.xtext.ui.compare.DefaultViewerCreator; +import org.eclipse.xtext.ui.editor.DocumentBasedDirtyResource; +import org.eclipse.xtext.ui.editor.IXtextEditorCallback; +import org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext; +import org.eclipse.xtext.ui.editor.contentassist.FQNPrefixMatcher; +import org.eclipse.xtext.ui.editor.contentassist.IContentProposalProvider; +import org.eclipse.xtext.ui.editor.contentassist.IProposalConflictHelper; +import org.eclipse.xtext.ui.editor.contentassist.PrefixMatcher; +import org.eclipse.xtext.ui.editor.contentassist.antlr.AntlrProposalConflictHelper; +import org.eclipse.xtext.ui.editor.contentassist.antlr.DelegatingContentAssistContextFactory; +import org.eclipse.xtext.ui.editor.outline.IOutlineTreeProvider; +import org.eclipse.xtext.ui.editor.outline.impl.IOutlineTreeStructureProvider; +import org.eclipse.xtext.ui.editor.preferences.IPreferenceStoreInitializer; +import org.eclipse.xtext.ui.editor.quickfix.IssueResolutionProvider; +import org.eclipse.xtext.ui.editor.templates.XtextTemplatePreferencePage; +import org.eclipse.xtext.ui.refactoring.IDependentElementsCalculator; +import org.eclipse.xtext.ui.refactoring.IReferenceUpdater; +import org.eclipse.xtext.ui.refactoring.IRenameRefactoringProvider; +import org.eclipse.xtext.ui.refactoring.IRenameStrategy; +import org.eclipse.xtext.ui.refactoring.impl.DefaultDependentElementsCalculator; +import org.eclipse.xtext.ui.refactoring.impl.DefaultReferenceUpdater; +import org.eclipse.xtext.ui.refactoring.impl.DefaultRenameRefactoringProvider; +import org.eclipse.xtext.ui.refactoring.impl.DefaultRenameStrategy; +import org.eclipse.xtext.ui.refactoring.ui.DefaultRenameSupport; +import org.eclipse.xtext.ui.refactoring.ui.IRenameSupport; +import org.eclipse.xtext.ui.refactoring.ui.RefactoringPreferences; +import org.eclipse.xtext.ui.resource.ResourceServiceDescriptionLabelProvider; +import org.eclipse.xtext.ui.shared.Access; + +/** + * Manual modifications go to {@link TqclUiModule}. + */ +@SuppressWarnings("all") +public abstract class AbstractTqclUiModule extends DefaultUiModule { + + public AbstractTqclUiModule(AbstractUIPlugin plugin) { + super(plugin); + } + + // contributed by org.eclipse.xtext.xtext.generator.ImplicitFragment + public Provider provideIAllContainersState() { + return Access.getJavaProjectsState(); + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public Class bindIProposalConflictHelper() { + return AntlrProposalConflictHelper.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public void configureContentAssistLexer(Binder binder) { + binder.bind(Lexer.class) + .annotatedWith(Names.named(LexerIdeBindings.CONTENT_ASSIST)) + .to(InternalTqclLexer.class); + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public void configureHighlightingLexer(Binder binder) { + binder.bind(org.eclipse.xtext.parser.antlr.Lexer.class) + .annotatedWith(Names.named(LexerIdeBindings.HIGHLIGHTING)) + .to(org.eclipse.triquetrum.commands.parser.antlr.internal.InternalTqclLexer.class); + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public void configureHighlightingTokenDefProvider(Binder binder) { + binder.bind(ITokenDefProvider.class) + .annotatedWith(Names.named(LexerIdeBindings.HIGHLIGHTING)) + .to(AntlrTokenDefProvider.class); + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public Class bindContentAssistContext$Factory() { + return DelegatingContentAssistContextFactory.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public Class bindIContentAssistParser() { + return TqclParser.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public void configureContentAssistLexerProvider(Binder binder) { + binder.bind(InternalTqclLexer.class).toProvider(LexerProvider.create(InternalTqclLexer.class)); + } + + // contributed by org.eclipse.xtext.xtext.generator.exporting.QualifiedNamesFragment2 + public Class bindPrefixMatcher() { + return FQNPrefixMatcher.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.exporting.QualifiedNamesFragment2 + public Class bindIDependentElementsCalculator() { + return DefaultDependentElementsCalculator.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2 + public void configureIResourceDescriptionsBuilderScope(Binder binder) { + binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE)).to(CurrentDescriptions.ResourceSetAware.class); + } + + // contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2 + public Class bindIXtextEditorCallback() { + return NatureAddingEditorCallback.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2 + public Class bindIContextualOutputConfigurationProvider() { + return EclipseOutputConfigurationProvider.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(IBuilderState.class); + } + + // contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2 + public Class bindDocumentBasedDirtyResource() { + return PersistentDataAwareDirtyResource.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.generator.GeneratorFragment2 + public Class bindIXtextBuilderParticipant() { + return BuilderParticipant.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.generator.GeneratorFragment2 + public IWorkspaceRoot bindIWorkspaceRootToInstance() { + return ResourcesPlugin.getWorkspace().getRoot(); + } + + // contributed by org.eclipse.xtext.xtext.generator.generator.GeneratorFragment2 + public void configureBuilderPreferenceStoreInitializer(Binder binder) { + binder.bind(IPreferenceStoreInitializer.class) + .annotatedWith(Names.named("builderPreferenceInitializer")) + .to(BuilderPreferenceAccess.Initializer.class); + } + + // contributed by org.eclipse.xtext.xtext.generator.ui.labeling.LabelProviderFragment2 + public Class bindILabelProvider() { + return TqclLabelProvider.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.ui.labeling.LabelProviderFragment2 + public void configureResourceUIServiceLabelProvider(Binder binder) { + binder.bind(ILabelProvider.class).annotatedWith(ResourceServiceDescriptionLabelProvider.class).to(TqclDescriptionLabelProvider.class); + } + + // contributed by org.eclipse.xtext.xtext.generator.ui.outline.OutlineTreeProviderFragment2 + public Class bindIOutlineTreeProvider() { + return TqclOutlineTreeProvider.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.ui.outline.OutlineTreeProviderFragment2 + public Class bindIOutlineTreeStructureProvider() { + return TqclOutlineTreeProvider.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.ui.quickfix.QuickfixProviderFragment2 + public Class bindIssueResolutionProvider() { + return TqclQuickfixProvider.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.ui.contentAssist.ContentAssistFragment2 + public Class bindIContentProposalProvider() { + return TqclProposalProvider.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2 + public Class bindIRenameStrategy() { + return DefaultRenameStrategy.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2 + public Class bindIReferenceUpdater() { + return DefaultReferenceUpdater.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2 + public void configureIPreferenceStoreInitializer(Binder binder) { + binder.bind(IPreferenceStoreInitializer.class) + .annotatedWith(Names.named("RefactoringPreferences")) + .to(RefactoringPreferences.Initializer.class); + } + + // contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2 + public Class bindIRenameRefactoringProvider() { + return DefaultRenameRefactoringProvider.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2 + public Class bindIRenameSupport$Factory() { + return DefaultRenameSupport.Factory.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.ui.templates.CodetemplatesGeneratorFragment2 + public Provider provideTemplatesLanguageConfiguration() { + return AccessibleCodetemplatesActivator.getTemplatesLanguageConfigurationProvider(); + } + + // contributed by org.eclipse.xtext.xtext.generator.ui.templates.CodetemplatesGeneratorFragment2 + public Provider provideLanguageRegistry() { + return AccessibleCodetemplatesActivator.getLanguageRegistry(); + } + + // contributed by org.eclipse.xtext.xtext.generator.ui.templates.CodetemplatesGeneratorFragment2 + @SingletonBinding(eager=true) + public Class bindLanguageRegistrar() { + return LanguageRegistrar.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.ui.templates.CodetemplatesGeneratorFragment2 + public Class bindXtextTemplatePreferencePage() { + return AdvancedTemplatesPreferencePage.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.ui.templates.CodetemplatesGeneratorFragment2 + public Class bindIPartialEditingContentAssistParser() { + return PartialTqclContentAssistParser.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.ui.templates.CodetemplatesGeneratorFragment2 + public Class bindIPartialEditingContentAssistContextFactory() { + return PartialEditingContentAssistContextFactory.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.ui.compare.CompareFragment2 + public Class bindIViewerCreator() { + return DefaultViewerCreator.class; + } + +} diff --git a/org.eclipse.triquetrum.commands.xtext.ui/src/main/java-gen/org/eclipse/triquetrum/commands/ui/TqclExecutableExtensionFactory.java b/org.eclipse.triquetrum.commands.xtext.ui/src/main/java-gen/org/eclipse/triquetrum/commands/ui/TqclExecutableExtensionFactory.java new file mode 100644 index 00000000..4f371032 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ui/src/main/java-gen/org/eclipse/triquetrum/commands/ui/TqclExecutableExtensionFactory.java @@ -0,0 +1,36 @@ +/******************************************************************************* + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +package org.eclipse.triquetrum.commands.ui; + +import com.google.inject.Injector; +import org.eclipse.triquetrum.commands.xtext.ui.internal.XtextActivator; +import org.eclipse.xtext.ui.guice.AbstractGuiceAwareExecutableExtensionFactory; +import org.osgi.framework.Bundle; + +/** + * This class was generated. Customizations should only happen in a newly + * introduced subclass. + */ +public class TqclExecutableExtensionFactory extends AbstractGuiceAwareExecutableExtensionFactory { + + @Override + protected Bundle getBundle() { + return XtextActivator.getInstance().getBundle(); + } + + @Override + protected Injector getInjector() { + return XtextActivator.getInstance().getInjector(XtextActivator.ORG_ECLIPSE_TRIQUETRUM_COMMANDS_TQCL); + } + +} diff --git a/org.eclipse.triquetrum.commands.xtext.ui/src/main/java-gen/org/eclipse/triquetrum/commands/ui/contentassist/AbstractTqclProposalProvider.java b/org.eclipse.triquetrum.commands.xtext.ui/src/main/java-gen/org/eclipse/triquetrum/commands/ui/contentassist/AbstractTqclProposalProvider.java new file mode 100644 index 00000000..8a06ba9e --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ui/src/main/java-gen/org/eclipse/triquetrum/commands/ui/contentassist/AbstractTqclProposalProvider.java @@ -0,0 +1,156 @@ +/******************************************************************************* + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +package org.eclipse.triquetrum.commands.ui.contentassist; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.xtext.Alternatives; +import org.eclipse.xtext.Assignment; +import org.eclipse.xtext.CrossReference; +import org.eclipse.xtext.RuleCall; +import org.eclipse.xtext.common.ui.contentassist.TerminalsProposalProvider; +import org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext; +import org.eclipse.xtext.ui.editor.contentassist.ICompletionProposalAcceptor; + +/** + * Represents a generated, default implementation of superclass {@link TerminalsProposalProvider}. + * Methods are dynamically dispatched on the first parameter, i.e., you can override them + * with a more concrete subtype. + */ +public abstract class AbstractTqclProposalProvider extends TerminalsProposalProvider { + + public void completeTriquetrumScript_Libraries(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); + } + public void completeTriquetrumScript_Commands(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); + } + public void completeCompositeCommand_Start(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); + } + public void completeCompositeCommand_Commands(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); + } + public void completeCompositeCommand_End(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(0)), context, acceptor); + completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(1)), context, acceptor); + } + public void completeInclude_Filename(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); + } + public void completeLibrary_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); + } + public void completeInsert_Category(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); + } + public void completeInsert_EntityClass(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); + } + public void completeInsert_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); + } + public void completeInsert_Parameters(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); + } + public void completeSet_Param(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); + } + public void completeConnect_From(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); + } + public void completeConnect_To(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); + } + public void completeConnectionPort_Actor(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + lookupCrossReference(((CrossReference)assignment.getTerminal()), context, acceptor); + } + public void completeConnectionPort_Port(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); + } + public void completeGoInto_Direction(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + // subclasses may override + } + public void completeGoInto_Actor(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + lookupCrossReference(((CrossReference)assignment.getTerminal()), context, acceptor); + } + public void completeGoOut_Direction(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + // subclasses may override + } + public void completeGoTop_Direction(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + // subclasses may override + } + public void completeParameter_Id(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); + } + public void completeParameter_Value(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); + } + + public void complete_TriquetrumScript(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + // subclasses may override + } + public void complete_CompositeCommand(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + // subclasses may override + } + public void complete_SimpleCommand(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + // subclasses may override + } + public void complete_Command(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + // subclasses may override + } + public void complete_Include(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + // subclasses may override + } + public void complete_Library(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + // subclasses may override + } + public void complete_Insert(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + // subclasses may override + } + public void complete_Set(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + // subclasses may override + } + public void complete_Connect(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + // subclasses may override + } + public void complete_ConnectionPort(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + // subclasses may override + } + public void complete_GoInto(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + // subclasses may override + } + public void complete_GoOut(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + // subclasses may override + } + public void complete_GoTop(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + // subclasses may override + } + public void complete_Category(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + // subclasses may override + } + public void complete_Parameter(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + // subclasses may override + } + public void complete_Parameter_id(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + // subclasses may override + } + public void complete_PARAMETER_NAME(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + // subclasses may override + } + public void complete_NamedObj(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + // subclasses may override + } + public void complete_ENTITY_CLASS(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { + // subclasses may override + } +} diff --git a/org.eclipse.triquetrum.commands.xtext.ui/src/main/java-gen/org/eclipse/triquetrum/commands/xtext/ui/internal/XtextActivator.java b/org.eclipse.triquetrum.commands.xtext.ui/src/main/java-gen/org/eclipse/triquetrum/commands/xtext/ui/internal/XtextActivator.java new file mode 100644 index 00000000..238de703 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ui/src/main/java-gen/org/eclipse/triquetrum/commands/xtext/ui/internal/XtextActivator.java @@ -0,0 +1,102 @@ +/******************************************************************************* + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +package org.eclipse.triquetrum.commands.xtext.ui.internal; + +import com.google.common.collect.Maps; +import com.google.inject.Guice; +import com.google.inject.Injector; +import com.google.inject.Module; +import java.util.Collections; +import java.util.Map; +import org.apache.log4j.Logger; +import org.eclipse.triquetrum.commands.TqclRuntimeModule; +import org.eclipse.triquetrum.commands.ui.TqclUiModule; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.eclipse.xtext.ui.shared.SharedStateModule; +import org.eclipse.xtext.util.Modules2; +import org.osgi.framework.BundleContext; + +/** + * This class was generated. Customizations should only happen in a newly + * introduced subclass. + */ +public class XtextActivator extends AbstractUIPlugin { + + public static final String ORG_ECLIPSE_TRIQUETRUM_COMMANDS_TQCL = "org.eclipse.triquetrum.commands.Tqcl"; + + private static final Logger logger = Logger.getLogger(XtextActivator.class); + + private static XtextActivator INSTANCE; + + private Map injectors = Collections.synchronizedMap(Maps. newHashMapWithExpectedSize(1)); + + @Override + public void start(BundleContext context) throws Exception { + super.start(context); + INSTANCE = this; + } + + @Override + public void stop(BundleContext context) throws Exception { + injectors.clear(); + INSTANCE = null; + super.stop(context); + } + + public static XtextActivator getInstance() { + return INSTANCE; + } + + public Injector getInjector(String language) { + synchronized (injectors) { + Injector injector = injectors.get(language); + if (injector == null) { + injectors.put(language, injector = createInjector(language)); + } + return injector; + } + } + + protected Injector createInjector(String language) { + try { + Module runtimeModule = getRuntimeModule(language); + Module sharedStateModule = getSharedStateModule(); + Module uiModule = getUiModule(language); + Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule); + return Guice.createInjector(mergedModule); + } catch (Exception e) { + logger.error("Failed to create injector for " + language); + logger.error(e.getMessage(), e); + throw new RuntimeException("Failed to create injector for " + language, e); + } + } + + protected Module getRuntimeModule(String grammar) { + if (ORG_ECLIPSE_TRIQUETRUM_COMMANDS_TQCL.equals(grammar)) { + return new TqclRuntimeModule(); + } + throw new IllegalArgumentException(grammar); + } + + protected Module getUiModule(String grammar) { + if (ORG_ECLIPSE_TRIQUETRUM_COMMANDS_TQCL.equals(grammar)) { + return new TqclUiModule(this); + } + throw new IllegalArgumentException(grammar); + } + + protected Module getSharedStateModule() { + return new SharedStateModule(); + } + +} diff --git a/org.eclipse.triquetrum.commands.xtext.ui/src/main/java/org/eclipse/triquetrum/commands/ui/TqclUiModule.java b/org.eclipse.triquetrum.commands.xtext.ui/src/main/java/org/eclipse/triquetrum/commands/ui/TqclUiModule.java new file mode 100644 index 00000000..03e9238a --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ui/src/main/java/org/eclipse/triquetrum/commands/ui/TqclUiModule.java @@ -0,0 +1,23 @@ +/******************************************************************************* + * Copyright (c) 2017 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +package org.eclipse.triquetrum.commands.ui; + +import org.eclipse.ui.plugin.AbstractUIPlugin; + +/** + * Use this class to register components to be used within the Eclipse IDE. + */ +public class TqclUiModule extends AbstractTqclUiModule { + + public TqclUiModule(AbstractUIPlugin plugin) { + super(plugin); + } +} diff --git a/org.eclipse.triquetrum.commands.xtext.ui/src/main/java/org/eclipse/triquetrum/commands/ui/contentassist/TqclProposalProvider.java b/org.eclipse.triquetrum.commands.xtext.ui/src/main/java/org/eclipse/triquetrum/commands/ui/contentassist/TqclProposalProvider.java new file mode 100644 index 00000000..28310387 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ui/src/main/java/org/eclipse/triquetrum/commands/ui/contentassist/TqclProposalProvider.java @@ -0,0 +1,278 @@ +/******************************************************************************* + * Copyright (c) 2017 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +/* + * generated by Xtext 2.10.0 + */ +package org.eclipse.triquetrum.commands.ui.contentassist; + +import java.text.MessageFormat; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.apache.commons.lang.StringUtils; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.jface.text.contentassist.ICompletionProposal; +import org.eclipse.triquetrum.commands.api.TqCLServices; +import org.eclipse.triquetrum.commands.api.services.ActorDescriptor; +import org.eclipse.triquetrum.commands.api.services.DirectorDescriptor; +import org.eclipse.triquetrum.commands.api.services.EntityDescriptor; +import org.eclipse.triquetrum.commands.api.services.ParameterDescriptor; +import org.eclipse.triquetrum.commands.api.services.PortDescriptor; +import org.eclipse.triquetrum.commands.api.services.TqCLLibraryException; +import org.eclipse.triquetrum.commands.api.services.TqCLLibraryProvider; +import org.eclipse.triquetrum.commands.tqcl.Category; +import org.eclipse.triquetrum.commands.tqcl.Command; +import org.eclipse.triquetrum.commands.tqcl.CompositeCommand; +import org.eclipse.triquetrum.commands.tqcl.Connect; +import org.eclipse.triquetrum.commands.tqcl.ConnectionPort; +import org.eclipse.triquetrum.commands.tqcl.Insert; +import org.eclipse.triquetrum.commands.tqcl.Library; +import org.eclipse.triquetrum.commands.tqcl.Parameter; +import org.eclipse.triquetrum.commands.tqcl.TqclPackage; +import org.eclipse.triquetrum.commands.tqcl.TriquetrumScript; +import org.eclipse.triquetrum.commands.validation.TqCLUtils; +import org.eclipse.xtext.Assignment; +import org.eclipse.xtext.EcoreUtil2; +import org.eclipse.xtext.RuleCall; +import org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext; +import org.eclipse.xtext.ui.editor.contentassist.ICompletionProposalAcceptor; + +import com.google.common.base.Function; +import com.google.common.base.Predicate; +import com.google.common.base.Predicates; +import com.google.common.collect.Collections2; +import com.google.inject.Guice; + +/** + * See + * https://www.eclipse.org/Xtext/documentation/304_ide_concepts.html#content-assist + * on how to customize the content assistant. + */ +public class TqclProposalProvider extends AbstractTqclProposalProvider { + + @Override + public void completeLibrary_Name(EObject model, Assignment assignment, ContentAssistContext context, + ICompletionProposalAcceptor acceptor) { + super.completeLibrary_Name(model, assignment, context, acceptor); + TqCLLibraryProvider tqclLibraryProvider = TqCLServices.getInstance().getTqclLibraryProvider(); + Set libraryNames = tqclLibraryProvider.getLibraryNames(); + for (String string : libraryNames) { + ICompletionProposal completionProposal = createCompletionProposal(string, string, null, context); + acceptor.accept(completionProposal); + } + } + + @Override + @SuppressWarnings({ "rawtypes", "unchecked" }) + public void completeInsert_EntityClass(EObject model, Assignment assignment, ContentAssistContext context, + ICompletionProposalAcceptor acceptor) { + super.completeInsert_EntityClass(model, assignment, context, acceptor); + Map entityDescriptorsMap = new HashMap<>(); + if (model instanceof Insert) { + try { + + Insert insert = (Insert) model; + EList alreadySetParameters = insert.getParameters(); + + List libraries = EcoreUtil2.getAllContentsOfType(EcoreUtil2.getRootContainer(insert), + Library.class); + + Category category = insert.getCategory(); + List descriptors = new ArrayList<>(); + if (libraries == null) { + return; + } + if (insert.getCategory() == null) { + category = Category.ACTOR; + } + TqCLLibraryProvider tcqlLibraryProvider = TqCLServices.getInstance().getTqclLibraryProvider(); + for (Library library : libraries) { + switch (category) { + case ACTOR: + List actorDescriptors = tcqlLibraryProvider.getActors(library.getName()); + for (EntityDescriptor actorDescriptor : actorDescriptors) { + entityDescriptorsMap.put(actorDescriptor.getClazz(), actorDescriptor); + } + descriptors.addAll((List) actorDescriptors); + break; + + case DIRECTOR: + List directors = tcqlLibraryProvider.getDirectors(library.getName()); + for (DirectorDescriptor directorDescriptor : directors) { + entityDescriptorsMap.put(directorDescriptor.getClazz(), directorDescriptor); + } + descriptors.addAll((List) directors); + break; + + case PARAMETER: + List parameters = tcqlLibraryProvider.getParameterTypes(library.getName()); + for (ParameterDescriptor parameterDescriptor : parameters) { + entityDescriptorsMap.put(parameterDescriptor.getClazz(), parameterDescriptor); + } + descriptors.addAll((List) parameters); + break; + case PORT: + List ports = tcqlLibraryProvider.getPortTypes(library.getName()); + for (PortDescriptor portDescriptor : ports) { + entityDescriptorsMap.put(portDescriptor.getClazz(), portDescriptor); + } + descriptors.addAll((List) ports); + break; + default: + break; + } + } + + for (EntityDescriptor key : descriptors) { + ICompletionProposal completionProposal = createCompletionProposal('<' + key.getClazz() + "> as ", + key.getClazz(), null, context); + acceptor.accept(completionProposal); + } + } catch (TqCLLibraryException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + } + + @Override + public void completeInsert_Name(EObject model, Assignment assignment, ContentAssistContext context, + ICompletionProposalAcceptor acceptor) { + + if (model instanceof Insert) { + Insert insert = (Insert) model; + String qualifiedName = insert.getEntityClass(); + String name = StringUtils.substringAfterLast(qualifiedName, "."); + name = name.replaceAll("<", ""); + name = name.replaceAll(">", ""); + ICompletionProposal completionProposal = createCompletionProposal('"' + name + '"', name, null, context); + acceptor.accept(completionProposal); + } + } + + @Override + public void completeConnectionPort_Port(EObject model, Assignment assignment, ContentAssistContext context, + ICompletionProposalAcceptor acceptor) { + super.completeConnectionPort_Port(model, assignment, context, acceptor); + if (model instanceof ConnectionPort) { + ConnectionPort connectionPort = (ConnectionPort) model; + Insert actor = connectionPort.getActor(); + boolean input = false; + boolean output = false; + if(model.eContainmentFeature().getName().equals(TqclPackage.Literals.CONNECT__FROM.getName())) + { + input=false; + output=true; + } + if(model.eContainmentFeature().getName().equals(TqclPackage.Literals.CONNECT__TO.getName())) + { + input=true; + output=false; + } + + List actorPorts = TqCLUtils.getActorInsertPorts(actor,input,output); + for (PortDescriptor portDescriptor : actorPorts) { + ICompletionProposal completionProposal = createCompletionProposal(portDescriptor.getDisplayName(), + context); + acceptor.accept(completionProposal); + } + + } + + } + + + + @Override + public void completeInsert_Parameters(EObject model, Assignment assignment, ContentAssistContext context, + ICompletionProposalAcceptor acceptor) { + if (model instanceof Insert) { + Insert insert = (Insert) model; + Category category = TqCLUtils.getCategory((Insert) insert); + String entityClass = insert.getEntityClass(); + + try { + TqCLLibraryProvider tqclLibraryProvider = TqCLServices.getInstance().getTqclLibraryProvider(); + EntityDescriptor entityDescriptor = null; + switch (category) { + case ACTOR: + entityDescriptor = tqclLibraryProvider.getActor(TqCLUtils.cleanEntityName(entityClass)); + break; + case DIRECTOR: + entityDescriptor = tqclLibraryProvider.getDirector(TqCLUtils.cleanEntityName(entityClass)); + break; + + case PARAMETER: + entityDescriptor = tqclLibraryProvider.getParameterType(TqCLUtils.cleanEntityName(entityClass)); + break; + case PORT: + entityDescriptor = tqclLibraryProvider.getPortType(TqCLUtils.cleanEntityName(entityClass)); + break; + + default: + break; + } + + if (entityDescriptor == null) { + return; + } + + List parameters = entityDescriptor.getParameters(); + final Collection alreadyParameterSetNames = Collections2.transform(insert.getParameters(), + new Function() { + + @Override + public String apply(Parameter parameter) { + if (parameter != null && parameter.getId() != null) { + return TqCLUtils.cleanParameterName(parameter.getId()); + } else { + return null; + } + } + }); + + Collection filteredParameters = Collections2.filter(parameters, + new Predicate() { + @Override + public boolean apply(ParameterDescriptor entityDescriptor) { + return !alreadyParameterSetNames.contains(entityDescriptor.getDisplayName()); + } + }); + + for (ParameterDescriptor parameterDescriptor : filteredParameters) { + String displayName = parameterDescriptor.getDisplayName(); + String proposal = ""; + if (displayName.contains(" ")) { + proposal = "\"" + displayName + "\""; + } else { + proposal = MessageFormat.format("${0}=\"{1}\"", displayName, + parameterDescriptor.getDefaultValue()); + } + String description = displayName + "(default=" + parameterDescriptor.getDefaultValue() + ")"; + + ICompletionProposal completionProposal = createCompletionProposal(proposal, description, null, + context); + acceptor.accept(completionProposal); + } + } catch (TqCLLibraryException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + } + } + +} diff --git a/org.eclipse.triquetrum.commands.xtext.ui/src/main/java/org/eclipse/triquetrum/commands/ui/editor/TriquetrumCommandEditor.java b/org.eclipse.triquetrum.commands.xtext.ui/src/main/java/org/eclipse/triquetrum/commands/ui/editor/TriquetrumCommandEditor.java new file mode 100644 index 00000000..5b0d518f --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ui/src/main/java/org/eclipse/triquetrum/commands/ui/editor/TriquetrumCommandEditor.java @@ -0,0 +1,42 @@ +/******************************************************************************* + * Copyright (c) 2017 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +package org.eclipse.triquetrum.commands.ui.editor; + +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.KeyAdapter; +import org.eclipse.swt.events.KeyEvent; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.xtext.ui.editor.XtextEditor; +import org.eclipse.xtext.ui.editor.model.IXtextDocument; + +public class TriquetrumCommandEditor extends XtextEditor { + + @Override + public void createPartControl(Composite parent) { + super.createPartControl(parent); + getSourceViewer().getTextWidget().addKeyListener(new KeyAdapter() { + + @Override + public void keyPressed(KeyEvent e) { + + if(((e.stateMask & SWT.CTRL) == SWT.CTRL) && (e.keyCode == SWT.CR)) + { + IXtextDocument document = getDocument(); + + + } + + } + }); + + } + +} diff --git a/org.eclipse.triquetrum.commands.xtext.ui/src/main/java/org/eclipse/triquetrum/commands/ui/labeling/TqclDescriptionLabelProvider.xtend b/org.eclipse.triquetrum.commands.xtext.ui/src/main/java/org/eclipse/triquetrum/commands/ui/labeling/TqclDescriptionLabelProvider.xtend new file mode 100644 index 00000000..63ca922c --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ui/src/main/java/org/eclipse/triquetrum/commands/ui/labeling/TqclDescriptionLabelProvider.xtend @@ -0,0 +1,24 @@ +/* + * generated by Xtext 2.10.0 + */ +package org.eclipse.triquetrum.commands.ui.labeling + +import org.eclipse.xtext.ui.label.DefaultDescriptionLabelProvider + +/** + * Provides labels for IEObjectDescriptions and IResourceDescriptions. + * + * See https://www.eclipse.org/Xtext/documentation/304_ide_concepts.html#label-provider + */ +class TqclDescriptionLabelProvider extends DefaultDescriptionLabelProvider { + + // Labels and icons can be computed like this: + +// override text(IEObjectDescription ele) { +// ele.name.toString +// } +// +// override image(IEObjectDescription ele) { +// ele.EClass.name + '.gif' +// } +} diff --git a/org.eclipse.triquetrum.commands.xtext.ui/src/main/java/org/eclipse/triquetrum/commands/ui/labeling/TqclLabelProvider.xtend b/org.eclipse.triquetrum.commands.xtext.ui/src/main/java/org/eclipse/triquetrum/commands/ui/labeling/TqclLabelProvider.xtend new file mode 100644 index 00000000..7b342ac0 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ui/src/main/java/org/eclipse/triquetrum/commands/ui/labeling/TqclLabelProvider.xtend @@ -0,0 +1,31 @@ +/* + * generated by Xtext 2.10.0 + */ +package org.eclipse.triquetrum.commands.ui.labeling + +import com.google.inject.Inject +import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider +import org.eclipse.xtext.ui.label.DefaultEObjectLabelProvider + +/** + * Provides labels for EObjects. + * + * See https://www.eclipse.org/Xtext/documentation/304_ide_concepts.html#label-provider + */ +class TqclLabelProvider extends DefaultEObjectLabelProvider { + + @Inject + new(AdapterFactoryLabelProvider delegate) { + super(delegate); + } + + // Labels and icons can be computed like this: + +// def text(Greeting ele) { +// 'A greeting to ' + ele.name +// } +// +// def image(Greeting ele) { +// 'Greeting.gif' +// } +} diff --git a/org.eclipse.triquetrum.commands.xtext.ui/src/main/java/org/eclipse/triquetrum/commands/ui/outline/TqclOutlineTreeProvider.xtend b/org.eclipse.triquetrum.commands.xtext.ui/src/main/java/org/eclipse/triquetrum/commands/ui/outline/TqclOutlineTreeProvider.xtend new file mode 100644 index 00000000..3d6e437b --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ui/src/main/java/org/eclipse/triquetrum/commands/ui/outline/TqclOutlineTreeProvider.xtend @@ -0,0 +1,15 @@ +/* + * generated by Xtext 2.10.0 + */ +package org.eclipse.triquetrum.commands.ui.outline + +import org.eclipse.xtext.ui.editor.outline.impl.DefaultOutlineTreeProvider + +/** + * Customization of the default outline structure. + * + * See https://www.eclipse.org/Xtext/documentation/304_ide_concepts.html#outline + */ +class TqclOutlineTreeProvider extends DefaultOutlineTreeProvider { + +} diff --git a/org.eclipse.triquetrum.commands.xtext.ui/src/main/java/org/eclipse/triquetrum/commands/ui/quickfix/TqclQuickfixProvider.xtend b/org.eclipse.triquetrum.commands.xtext.ui/src/main/java/org/eclipse/triquetrum/commands/ui/quickfix/TqclQuickfixProvider.xtend new file mode 100644 index 00000000..2f42a9e7 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ui/src/main/java/org/eclipse/triquetrum/commands/ui/quickfix/TqclQuickfixProvider.xtend @@ -0,0 +1,24 @@ +/* + * generated by Xtext 2.10.0 + */ +package org.eclipse.triquetrum.commands.ui.quickfix + +import org.eclipse.xtext.xbase.ui.quickfix.XtypeQuickfixProvider + +/** + * Custom quickfixes. + * + * See https://www.eclipse.org/Xtext/documentation/310_eclipse_support.html#quick-fixes + */ +class TqclQuickfixProvider extends XtypeQuickfixProvider { + +// @Fix(TqclValidator.INVALID_NAME) +// def capitalizeName(Issue issue, IssueResolutionAcceptor acceptor) { +// acceptor.accept(issue, 'Capitalize name', 'Capitalize the name.', 'upcase.png') [ +// context | +// val xtextDocument = context.xtextDocument +// val firstLetter = xtextDocument.get(issue.offset, 1) +// xtextDocument.replace(issue.offset, 1, firstLetter.toUpperCase) +// ] +// } +} diff --git a/org.eclipse.triquetrum.commands.xtext.ui/src/main/xtend-gen/org/eclipse/triquetrum/commands/ui/.gitignore b/org.eclipse.triquetrum.commands.xtext.ui/src/main/xtend-gen/org/eclipse/triquetrum/commands/ui/.gitignore new file mode 100644 index 00000000..3c4489fe --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ui/src/main/xtend-gen/org/eclipse/triquetrum/commands/ui/.gitignore @@ -0,0 +1,3 @@ +/.TqclUiModule.java._trace +/.TqclUiModule.xtendbin +/TqclUiModule.java diff --git a/org.eclipse.triquetrum.commands.xtext.ui/src/main/xtend-gen/org/eclipse/triquetrum/commands/ui/contentassist/.gitignore b/org.eclipse.triquetrum.commands.xtext.ui/src/main/xtend-gen/org/eclipse/triquetrum/commands/ui/contentassist/.gitignore new file mode 100644 index 00000000..71b08f9a --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ui/src/main/xtend-gen/org/eclipse/triquetrum/commands/ui/contentassist/.gitignore @@ -0,0 +1 @@ +/.TqclProposalProvider.java._trace diff --git a/org.eclipse.triquetrum.commands.xtext.ui/src/main/xtend-gen/org/eclipse/triquetrum/commands/ui/labeling/.TqclDescriptionLabelProvider.xtendbin b/org.eclipse.triquetrum.commands.xtext.ui/src/main/xtend-gen/org/eclipse/triquetrum/commands/ui/labeling/.TqclDescriptionLabelProvider.xtendbin new file mode 100644 index 00000000..c2577c95 Binary files /dev/null and b/org.eclipse.triquetrum.commands.xtext.ui/src/main/xtend-gen/org/eclipse/triquetrum/commands/ui/labeling/.TqclDescriptionLabelProvider.xtendbin differ diff --git a/org.eclipse.triquetrum.commands.xtext.ui/src/main/xtend-gen/org/eclipse/triquetrum/commands/ui/labeling/.TqclLabelProvider.xtendbin b/org.eclipse.triquetrum.commands.xtext.ui/src/main/xtend-gen/org/eclipse/triquetrum/commands/ui/labeling/.TqclLabelProvider.xtendbin new file mode 100644 index 00000000..c833d803 Binary files /dev/null and b/org.eclipse.triquetrum.commands.xtext.ui/src/main/xtend-gen/org/eclipse/triquetrum/commands/ui/labeling/.TqclLabelProvider.xtendbin differ diff --git a/org.eclipse.triquetrum.commands.xtext.ui/src/main/xtend-gen/org/eclipse/triquetrum/commands/ui/labeling/.gitignore b/org.eclipse.triquetrum.commands.xtext.ui/src/main/xtend-gen/org/eclipse/triquetrum/commands/ui/labeling/.gitignore new file mode 100644 index 00000000..b1d2ebdc --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ui/src/main/xtend-gen/org/eclipse/triquetrum/commands/ui/labeling/.gitignore @@ -0,0 +1,6 @@ +/.TqclDescriptionLabelProvider.java._trace +/.TqclLabelProvider.java._trace +/.TqclDescriptionLabelProvider.xtendbin +/.TqclLabelProvider.xtendbin +/TqclDescriptionLabelProvider.java +/TqclLabelProvider.java diff --git a/org.eclipse.triquetrum.commands.xtext.ui/src/main/xtend-gen/org/eclipse/triquetrum/commands/ui/labeling/TqclDescriptionLabelProvider.java b/org.eclipse.triquetrum.commands.xtext.ui/src/main/xtend-gen/org/eclipse/triquetrum/commands/ui/labeling/TqclDescriptionLabelProvider.java new file mode 100644 index 00000000..5872381b --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ui/src/main/xtend-gen/org/eclipse/triquetrum/commands/ui/labeling/TqclDescriptionLabelProvider.java @@ -0,0 +1,15 @@ +/** + * generated by Xtext 2.10.0 + */ +package org.eclipse.triquetrum.commands.ui.labeling; + +import org.eclipse.xtext.ui.label.DefaultDescriptionLabelProvider; + +/** + * Provides labels for IEObjectDescriptions and IResourceDescriptions. + * + * See https://www.eclipse.org/Xtext/documentation/304_ide_concepts.html#label-provider + */ +@SuppressWarnings("all") +public class TqclDescriptionLabelProvider extends DefaultDescriptionLabelProvider { +} diff --git a/org.eclipse.triquetrum.commands.xtext.ui/src/main/xtend-gen/org/eclipse/triquetrum/commands/ui/labeling/TqclLabelProvider.java b/org.eclipse.triquetrum.commands.xtext.ui/src/main/xtend-gen/org/eclipse/triquetrum/commands/ui/labeling/TqclLabelProvider.java new file mode 100644 index 00000000..3b4d8ad4 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ui/src/main/xtend-gen/org/eclipse/triquetrum/commands/ui/labeling/TqclLabelProvider.java @@ -0,0 +1,21 @@ +/** + * generated by Xtext 2.10.0 + */ +package org.eclipse.triquetrum.commands.ui.labeling; + +import com.google.inject.Inject; +import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider; +import org.eclipse.xtext.ui.label.DefaultEObjectLabelProvider; + +/** + * Provides labels for EObjects. + * + * See https://www.eclipse.org/Xtext/documentation/304_ide_concepts.html#label-provider + */ +@SuppressWarnings("all") +public class TqclLabelProvider extends DefaultEObjectLabelProvider { + @Inject + public TqclLabelProvider(final AdapterFactoryLabelProvider delegate) { + super(delegate); + } +} diff --git a/org.eclipse.triquetrum.commands.xtext.ui/src/main/xtend-gen/org/eclipse/triquetrum/commands/ui/outline/.TqclOutlineTreeProvider.xtendbin b/org.eclipse.triquetrum.commands.xtext.ui/src/main/xtend-gen/org/eclipse/triquetrum/commands/ui/outline/.TqclOutlineTreeProvider.xtendbin new file mode 100644 index 00000000..cd9ad1ef Binary files /dev/null and b/org.eclipse.triquetrum.commands.xtext.ui/src/main/xtend-gen/org/eclipse/triquetrum/commands/ui/outline/.TqclOutlineTreeProvider.xtendbin differ diff --git a/org.eclipse.triquetrum.commands.xtext.ui/src/main/xtend-gen/org/eclipse/triquetrum/commands/ui/outline/.gitignore b/org.eclipse.triquetrum.commands.xtext.ui/src/main/xtend-gen/org/eclipse/triquetrum/commands/ui/outline/.gitignore new file mode 100644 index 00000000..7b89ba54 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ui/src/main/xtend-gen/org/eclipse/triquetrum/commands/ui/outline/.gitignore @@ -0,0 +1,3 @@ +/.TqclOutlineTreeProvider.java._trace +/.TqclOutlineTreeProvider.xtendbin +/TqclOutlineTreeProvider.java diff --git a/org.eclipse.triquetrum.commands.xtext.ui/src/main/xtend-gen/org/eclipse/triquetrum/commands/ui/outline/TqclOutlineTreeProvider.java b/org.eclipse.triquetrum.commands.xtext.ui/src/main/xtend-gen/org/eclipse/triquetrum/commands/ui/outline/TqclOutlineTreeProvider.java new file mode 100644 index 00000000..4d33389a --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ui/src/main/xtend-gen/org/eclipse/triquetrum/commands/ui/outline/TqclOutlineTreeProvider.java @@ -0,0 +1,15 @@ +/** + * generated by Xtext 2.10.0 + */ +package org.eclipse.triquetrum.commands.ui.outline; + +import org.eclipse.xtext.ui.editor.outline.impl.DefaultOutlineTreeProvider; + +/** + * Customization of the default outline structure. + * + * See https://www.eclipse.org/Xtext/documentation/304_ide_concepts.html#outline + */ +@SuppressWarnings("all") +public class TqclOutlineTreeProvider extends DefaultOutlineTreeProvider { +} diff --git a/org.eclipse.triquetrum.commands.xtext.ui/src/main/xtend-gen/org/eclipse/triquetrum/commands/ui/quickfix/.TqclQuickfixProvider.xtendbin b/org.eclipse.triquetrum.commands.xtext.ui/src/main/xtend-gen/org/eclipse/triquetrum/commands/ui/quickfix/.TqclQuickfixProvider.xtendbin new file mode 100644 index 00000000..8aaa596c Binary files /dev/null and b/org.eclipse.triquetrum.commands.xtext.ui/src/main/xtend-gen/org/eclipse/triquetrum/commands/ui/quickfix/.TqclQuickfixProvider.xtendbin differ diff --git a/org.eclipse.triquetrum.commands.xtext.ui/src/main/xtend-gen/org/eclipse/triquetrum/commands/ui/quickfix/.gitignore b/org.eclipse.triquetrum.commands.xtext.ui/src/main/xtend-gen/org/eclipse/triquetrum/commands/ui/quickfix/.gitignore new file mode 100644 index 00000000..75408ad9 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ui/src/main/xtend-gen/org/eclipse/triquetrum/commands/ui/quickfix/.gitignore @@ -0,0 +1,3 @@ +/.TqclQuickfixProvider.java._trace +/.TqclQuickfixProvider.xtendbin +/TqclQuickfixProvider.java diff --git a/org.eclipse.triquetrum.commands.xtext.ui/src/main/xtend-gen/org/eclipse/triquetrum/commands/ui/quickfix/TqclQuickfixProvider.java b/org.eclipse.triquetrum.commands.xtext.ui/src/main/xtend-gen/org/eclipse/triquetrum/commands/ui/quickfix/TqclQuickfixProvider.java new file mode 100644 index 00000000..d4a16223 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext.ui/src/main/xtend-gen/org/eclipse/triquetrum/commands/ui/quickfix/TqclQuickfixProvider.java @@ -0,0 +1,15 @@ +/** + * generated by Xtext 2.10.0 + */ +package org.eclipse.triquetrum.commands.ui.quickfix; + +import org.eclipse.xtext.xbase.ui.quickfix.XtypeQuickfixProvider; + +/** + * Custom quickfixes. + * + * See https://www.eclipse.org/Xtext/documentation/310_eclipse_support.html#quick-fixes + */ +@SuppressWarnings("all") +public class TqclQuickfixProvider extends XtypeQuickfixProvider { +} diff --git a/org.eclipse.triquetrum.commands.xtext/.antlr-generator-3.2.0-patch.jar b/org.eclipse.triquetrum.commands.xtext/.antlr-generator-3.2.0-patch.jar new file mode 100644 index 00000000..90516fd7 Binary files /dev/null and b/org.eclipse.triquetrum.commands.xtext/.antlr-generator-3.2.0-patch.jar differ diff --git a/org.eclipse.triquetrum.commands.xtext/.classpath b/org.eclipse.triquetrum.commands.xtext/.classpath new file mode 100644 index 00000000..544c9ad9 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/.classpath @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/org.eclipse.triquetrum.commands.xtext/.gitignore b/org.eclipse.triquetrum.commands.xtext/.gitignore new file mode 100644 index 00000000..0eb3ad08 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/.gitignore @@ -0,0 +1,2 @@ +/.DS_Store +/target/ diff --git a/org.eclipse.triquetrum.commands.xtext/.project b/org.eclipse.triquetrum.commands.xtext/.project new file mode 100644 index 00000000..d1460bf8 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/.project @@ -0,0 +1,34 @@ + + + org.eclipse.triquetrum.commands.xtext + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.xtext.ui.shared.xtextNature + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + diff --git a/org.eclipse.triquetrum.commands.xtext/.settings/org.eclipse.core.resources.prefs b/org.eclipse.triquetrum.commands.xtext/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 00000000..99f26c02 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/org.eclipse.triquetrum.commands.xtext/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.triquetrum.commands.xtext/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..0c68a61d --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/org.eclipse.triquetrum.commands.xtext/META-INF/MANIFEST.MF b/org.eclipse.triquetrum.commands.xtext/META-INF/MANIFEST.MF new file mode 100644 index 00000000..2860bbd3 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/META-INF/MANIFEST.MF @@ -0,0 +1,45 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: org.eclipse.triquetrum.commands.xtext +Bundle-Version: 1.0.0.qualifier +Bundle-SymbolicName: org.eclipse.triquetrum.commands.xtext; singleton:=true +Bundle-ActivationPolicy: lazy +Require-Bundle: org.eclipse.xtext, + org.eclipse.xtext.xbase, + org.eclipse.equinox.common;bundle-version="3.5.0", + org.eclipse.emf.ecore, + org.eclipse.xtext.xbase.lib, + org.antlr.runtime, + org.eclipse.xtext.util, + org.eclipse.xtend.lib, + org.eclipse.emf.common, + org.eclipse.xtext.common.types, + org.objectweb.asm;bundle-version="[5.0.1,6.0.0)";resolution:=optional, + org.eclipse.xtext.xbase.ui, + org.eclipse.xtext.ui, + org.eclipse.xtext.generator;bundle-version="2.10.0", + org.ptolemy.commons;bundle-version="11.0.0", + ptolemy.core;bundle-version="11.0.0", + org.eclipse.triquetrum.workflow.model, + org.eclipse.graphiti;bundle-version="0.13.0", + org.eclipse.triquetrum.workflow.editor, + org.eclipse.graphiti.ui;bundle-version="0.13.0", + org.eclipse.emf.transaction;bundle-version="1.9.0", + org.eclipse.triquetrum.commands.api +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Import-Package: org.apache.commons.lang;version="2.6.0", + org.apache.log4j, + org.slf4j;version="1.7.2" +Export-Package: org.eclipse.triquetrum.commands, + org.eclipse.triquetrum.commands.generator, + org.eclipse.triquetrum.commands.interpreter, + org.eclipse.triquetrum.commands.parser.antlr, + org.eclipse.triquetrum.commands.parser.antlr.internal, + org.eclipse.triquetrum.commands.scoping, + org.eclipse.triquetrum.commands.serializer, + org.eclipse.triquetrum.commands.services, + org.eclipse.triquetrum.commands.tqcl, + org.eclipse.triquetrum.commands.tqcl.impl, + org.eclipse.triquetrum.commands.tqcl.util, + org.eclipse.triquetrum.commands.validation +Bundle-Vendor: Eclipse Triquetrum diff --git a/org.eclipse.triquetrum.commands.xtext/build.properties b/org.eclipse.triquetrum.commands.xtext/build.properties new file mode 100644 index 00000000..4d1ea971 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/build.properties @@ -0,0 +1,28 @@ +############################################################################### +# Copyright (c) 2016 Totaro Rodolfo +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# Rodolfo Totaro - initial API and implementation and/or initial documentation +############################################################################### +source.. = src/,\ + src-gen/,\ + xtend-gen/ +bin.includes = model/generated/,\ + .,\ + META-INF/,\ + plugin.xml +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 diff --git a/org.eclipse.triquetrum.commands.xtext/model/generated/Tqcl.ecore b/org.eclipse.triquetrum.commands.xtext/model/generated/Tqcl.ecore new file mode 100644 index 00000000..06fe05ae --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/model/generated/Tqcl.ecore @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.eclipse.triquetrum.commands.xtext/model/generated/Tqcl.genmodel b/org.eclipse.triquetrum.commands.xtext/model/generated/Tqcl.genmodel new file mode 100644 index 00000000..52a8a8b1 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/model/generated/Tqcl.genmodel @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.eclipse.triquetrum.commands.xtext/plugin.xml b/org.eclipse.triquetrum.commands.xtext/plugin.xml new file mode 100644 index 00000000..17841050 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/plugin.xml @@ -0,0 +1,21 @@ + + + + + + + + + diff --git a/org.eclipse.triquetrum.commands.xtext/plugin.xml_gen b/org.eclipse.triquetrum.commands.xtext/plugin.xml_gen new file mode 100644 index 00000000..49dc1f50 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/plugin.xml_gen @@ -0,0 +1,10 @@ + + + + + + + diff --git a/org.eclipse.triquetrum.commands.xtext/src/.gitignore b/org.eclipse.triquetrum.commands.xtext/src/.gitignore new file mode 100644 index 00000000..9bb88d37 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/.gitignore @@ -0,0 +1 @@ +/.DS_Store diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/AbstractTqclRuntimeModule.java b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/AbstractTqclRuntimeModule.java new file mode 100644 index 00000000..b7f4e71f --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/AbstractTqclRuntimeModule.java @@ -0,0 +1,203 @@ +/******************************************************************************* + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +package org.eclipse.triquetrum.commands; + +import com.google.inject.Binder; +import com.google.inject.Provider; +import com.google.inject.name.Names; +import java.util.Properties; +import org.eclipse.triquetrum.commands.generator.TqclGenerator; +import org.eclipse.triquetrum.commands.parser.antlr.TqclAntlrTokenFileProvider; +import org.eclipse.triquetrum.commands.parser.antlr.TqclParser; +import org.eclipse.triquetrum.commands.parser.antlr.internal.InternalTqclLexer; +import org.eclipse.triquetrum.commands.scoping.TqclScopeProvider; +import org.eclipse.triquetrum.commands.serializer.TqclSemanticSequencer; +import org.eclipse.triquetrum.commands.serializer.TqclSyntacticSequencer; +import org.eclipse.triquetrum.commands.services.TqclGrammarAccess; +import org.eclipse.triquetrum.commands.validation.TqclValidator; +import org.eclipse.xtext.Constants; +import org.eclipse.xtext.IGrammarAccess; +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.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 TqclRuntimeModule}. + */ +@SuppressWarnings("all") +public abstract class AbstractTqclRuntimeModule extends DefaultRuntimeModule { + + protected Properties properties = null; + + @Override + public void configure(Binder binder) { + properties = tryBindProperties(binder, "org/eclipse/triquetrum/commands/Tqcl.properties"); + super.configure(binder); + } + + public void configureLanguageName(Binder binder) { + binder.bind(String.class).annotatedWith(Names.named(Constants.LANGUAGE_NAME)).toInstance("org.eclipse.triquetrum.commands.Tqcl"); + } + + 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("tqcl"); + } + + // 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 bindIGrammarAccess() { + return TqclGrammarAccess.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2 + public Class bindISemanticSequencer() { + return TqclSemanticSequencer.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2 + public Class bindISyntacticSequencer() { + return TqclSyntacticSequencer.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2 + public Class bindISerializer() { + return Serializer.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public Class bindIParser() { + return TqclParser.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public Class bindITokenToStringConverter() { + return AntlrTokenToStringConverter.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public Class bindIAntlrTokenFileProvider() { + return TqclAntlrTokenFileProvider.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public Class bindLexer() { + return InternalTqclLexer.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public Class bindITokenDefProvider() { + return AntlrTokenDefProvider.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public Provider provideInternalTqclLexer() { + return LexerProvider.create(InternalTqclLexer.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(InternalTqclLexer.class); + } + + // contributed by org.eclipse.xtext.xtext.generator.validation.ValidatorFragment2 + @SingletonBinding(eager=true) + public Class bindTqclValidator() { + return TqclValidator.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.scoping.ImportNamespacesScopingFragment2 + public Class bindIScopeProvider() { + return TqclScopeProvider.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 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 bindIQualifiedNameProvider() { + return DefaultDeclarativeQualifiedNameProvider.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2 + public Class bindIContainer$Manager() { + return StateBasedContainerManager.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2 + public Class 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 bindIGenerator2() { + return TqclGenerator.class; + } + +} diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/Tqcl.xtextbin b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/Tqcl.xtextbin new file mode 100644 index 00000000..e9307f4d Binary files /dev/null and b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/Tqcl.xtextbin differ diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/TqclStandaloneSetupGenerated.java b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/TqclStandaloneSetupGenerated.java new file mode 100644 index 00000000..4e54a746 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/TqclStandaloneSetupGenerated.java @@ -0,0 +1,51 @@ +/******************************************************************************* + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +package org.eclipse.triquetrum.commands; + +import com.google.inject.Guice; +import com.google.inject.Injector; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.triquetrum.commands.tqcl.TqclPackage; +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 TqclStandaloneSetupGenerated implements ISetup { + + @Override + public Injector createInjectorAndDoEMFRegistration() { + TerminalsStandaloneSetup.doSetup(); + + Injector injector = createInjector(); + register(injector); + return injector; + } + + public Injector createInjector() { + return Guice.createInjector(new TqclRuntimeModule()); + } + + public void register(Injector injector) { + if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/triquetrum/commands/Tqcl")) { + EPackage.Registry.INSTANCE.put("http://www.eclipse.org/triquetrum/commands/Tqcl", TqclPackage.eINSTANCE); + } + IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class); + IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class); + + Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("tqcl", resourceFactory); + IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("tqcl", serviceProvider); + } +} diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/parser/antlr/TqclAntlrTokenFileProvider.java b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/parser/antlr/TqclAntlrTokenFileProvider.java new file mode 100644 index 00000000..8e1fa8cb --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/parser/antlr/TqclAntlrTokenFileProvider.java @@ -0,0 +1,25 @@ +/******************************************************************************* + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +package org.eclipse.triquetrum.commands.parser.antlr; + +import java.io.InputStream; +import org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider; + +public class TqclAntlrTokenFileProvider implements IAntlrTokenFileProvider { + + @Override + public InputStream getAntlrTokenFile() { + ClassLoader classLoader = getClass().getClassLoader(); + return classLoader.getResourceAsStream("org/eclipse/triquetrum/commands/parser/antlr/internal/InternalTqcl.tokens"); + } +} diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/parser/antlr/TqclParser.java b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/parser/antlr/TqclParser.java new file mode 100644 index 00000000..77de5ba9 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/parser/antlr/TqclParser.java @@ -0,0 +1,49 @@ +/******************************************************************************* + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +package org.eclipse.triquetrum.commands.parser.antlr; + +import com.google.inject.Inject; +import org.eclipse.triquetrum.commands.parser.antlr.internal.InternalTqclParser; +import org.eclipse.triquetrum.commands.services.TqclGrammarAccess; +import org.eclipse.xtext.parser.antlr.AbstractAntlrParser; +import org.eclipse.xtext.parser.antlr.XtextTokenStream; + +public class TqclParser extends AbstractAntlrParser { + + @Inject + private TqclGrammarAccess grammarAccess; + + @Override + protected void setInitialHiddenTokens(XtextTokenStream tokenStream) { + tokenStream.setInitialHiddenTokens("RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT"); + } + + + @Override + protected InternalTqclParser createParser(XtextTokenStream stream) { + return new InternalTqclParser(stream, getGrammarAccess()); + } + + @Override + protected String getDefaultRuleName() { + return "TriquetrumScript"; + } + + public TqclGrammarAccess getGrammarAccess() { + return this.grammarAccess; + } + + public void setGrammarAccess(TqclGrammarAccess grammarAccess) { + this.grammarAccess = grammarAccess; + } +} diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/parser/antlr/internal/InternalTqcl.g b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/parser/antlr/internal/InternalTqcl.g new file mode 100644 index 00000000..7d0b788b --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/parser/antlr/internal/InternalTqcl.g @@ -0,0 +1,1065 @@ +/******************************************************************************* + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +grammar InternalTqcl; + +options { + superClass=AbstractInternalAntlrParser; +} + +@lexer::header { +package org.eclipse.triquetrum.commands.parser.antlr.internal; + +// Hack: Use our own Lexer superclass by means of import. +// Currently there is no other way to specify the superclass for the lexer. +import org.eclipse.xtext.parser.antlr.Lexer; +} + +@parser::header { +package org.eclipse.triquetrum.commands.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 org.eclipse.triquetrum.commands.services.TqclGrammarAccess; + +} + +@parser::members { + + private TqclGrammarAccess grammarAccess; + + public InternalTqclParser(TokenStream input, TqclGrammarAccess grammarAccess) { + this(input); + this.grammarAccess = grammarAccess; + registerRules(grammarAccess.getGrammar()); + } + + @Override + protected String getFirstRuleName() { + return "TriquetrumScript"; + } + + @Override + protected TqclGrammarAccess getGrammarAccess() { + return grammarAccess; + } + +} + +@rulecatch { + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } +} + +// Entry rule entryRuleTriquetrumScript +entryRuleTriquetrumScript returns [EObject current=null]: + { newCompositeNode(grammarAccess.getTriquetrumScriptRule()); } + iv_ruleTriquetrumScript=ruleTriquetrumScript + { $current=$iv_ruleTriquetrumScript.current; } + EOF; + +// Rule TriquetrumScript +ruleTriquetrumScript returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + ( + { + newCompositeNode(grammarAccess.getTriquetrumScriptAccess().getLibrariesLibraryParserRuleCall_0_0()); + } + lv_libraries_0_0=ruleLibrary + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getTriquetrumScriptRule()); + } + add( + $current, + "libraries", + lv_libraries_0_0, + "org.eclipse.triquetrum.commands.Tqcl.Library"); + afterParserOrEnumRuleCall(); + } + ) + )* + ( + ( + { + newCompositeNode(grammarAccess.getTriquetrumScriptAccess().getCommandsCommandParserRuleCall_1_0()); + } + lv_commands_1_0=ruleCommand + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getTriquetrumScriptRule()); + } + add( + $current, + "commands", + lv_commands_1_0, + "org.eclipse.triquetrum.commands.Tqcl.Command"); + afterParserOrEnumRuleCall(); + } + ) + )* + ) +; + +// Entry rule entryRuleCompositeCommand +entryRuleCompositeCommand returns [EObject current=null]: + { newCompositeNode(grammarAccess.getCompositeCommandRule()); } + iv_ruleCompositeCommand=ruleCompositeCommand + { $current=$iv_ruleCompositeCommand.current; } + EOF; + +// Rule CompositeCommand +ruleCompositeCommand returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + ( + { + newCompositeNode(grammarAccess.getCompositeCommandAccess().getStartGoIntoParserRuleCall_0_0()); + } + lv_start_0_0=ruleGoInto + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getCompositeCommandRule()); + } + set( + $current, + "start", + lv_start_0_0, + "org.eclipse.triquetrum.commands.Tqcl.GoInto"); + afterParserOrEnumRuleCall(); + } + ) + ) + ( + ( + { + newCompositeNode(grammarAccess.getCompositeCommandAccess().getCommandsCommandParserRuleCall_1_0()); + } + lv_commands_1_0=ruleCommand + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getCompositeCommandRule()); + } + add( + $current, + "commands", + lv_commands_1_0, + "org.eclipse.triquetrum.commands.Tqcl.Command"); + afterParserOrEnumRuleCall(); + } + ) + )* + ( + ( + ( + { + newCompositeNode(grammarAccess.getCompositeCommandAccess().getEndGoOutParserRuleCall_2_0_0()); + } + lv_end_2_1=ruleGoOut + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getCompositeCommandRule()); + } + set( + $current, + "end", + lv_end_2_1, + "org.eclipse.triquetrum.commands.Tqcl.GoOut"); + afterParserOrEnumRuleCall(); + } + | + { + newCompositeNode(grammarAccess.getCompositeCommandAccess().getEndGoTopParserRuleCall_2_0_1()); + } + lv_end_2_2=ruleGoTop + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getCompositeCommandRule()); + } + set( + $current, + "end", + lv_end_2_2, + "org.eclipse.triquetrum.commands.Tqcl.GoTop"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) + ) +; + +// Entry rule entryRuleSimpleCommand +entryRuleSimpleCommand returns [EObject current=null]: + { newCompositeNode(grammarAccess.getSimpleCommandRule()); } + iv_ruleSimpleCommand=ruleSimpleCommand + { $current=$iv_ruleSimpleCommand.current; } + EOF; + +// Rule SimpleCommand +ruleSimpleCommand returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + { + newCompositeNode(grammarAccess.getSimpleCommandAccess().getInsertParserRuleCall_0_0()); + } + this_Insert_0=ruleInsert + { + $current = $this_Insert_0.current; + afterParserOrEnumRuleCall(); + } + | + { + newCompositeNode(grammarAccess.getSimpleCommandAccess().getConnectParserRuleCall_0_1()); + } + this_Connect_1=ruleConnect + { + $current = $this_Connect_1.current; + afterParserOrEnumRuleCall(); + } + | + { + newCompositeNode(grammarAccess.getSimpleCommandAccess().getSetParserRuleCall_0_2()); + } + this_Set_2=ruleSet + { + $current = $this_Set_2.current; + afterParserOrEnumRuleCall(); + } + | + { + newCompositeNode(grammarAccess.getSimpleCommandAccess().getIncludeParserRuleCall_0_3()); + } + this_Include_3=ruleInclude + { + $current = $this_Include_3.current; + afterParserOrEnumRuleCall(); + } + ) + otherlv_4=';' + { + newLeafNode(otherlv_4, grammarAccess.getSimpleCommandAccess().getSemicolonKeyword_1()); + } + ) +; + +// Entry rule entryRuleCommand +entryRuleCommand returns [EObject current=null]: + { newCompositeNode(grammarAccess.getCommandRule()); } + iv_ruleCommand=ruleCommand + { $current=$iv_ruleCommand.current; } + EOF; + +// Rule Command +ruleCommand returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + { + newCompositeNode(grammarAccess.getCommandAccess().getSimpleCommandParserRuleCall_0()); + } + this_SimpleCommand_0=ruleSimpleCommand + { + $current = $this_SimpleCommand_0.current; + afterParserOrEnumRuleCall(); + } + | + { + newCompositeNode(grammarAccess.getCommandAccess().getCompositeCommandParserRuleCall_1()); + } + this_CompositeCommand_1=ruleCompositeCommand + { + $current = $this_CompositeCommand_1.current; + afterParserOrEnumRuleCall(); + } + ) +; + +// Entry rule entryRuleInclude +entryRuleInclude returns [EObject current=null]: + { newCompositeNode(grammarAccess.getIncludeRule()); } + iv_ruleInclude=ruleInclude + { $current=$iv_ruleInclude.current; } + EOF; + +// Rule Include +ruleInclude returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + otherlv_0='include' + { + newLeafNode(otherlv_0, grammarAccess.getIncludeAccess().getIncludeKeyword_0()); + } + ( + ( + lv_filename_1_0=RULE_STRING + { + newLeafNode(lv_filename_1_0, grammarAccess.getIncludeAccess().getFilenameSTRINGTerminalRuleCall_1_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getIncludeRule()); + } + setWithLastConsumed( + $current, + "filename", + lv_filename_1_0, + "org.eclipse.xtext.common.Terminals.STRING"); + } + ) + ) + otherlv_2=';' + { + newLeafNode(otherlv_2, grammarAccess.getIncludeAccess().getSemicolonKeyword_2()); + } + ) +; + +// Entry rule entryRuleLibrary +entryRuleLibrary returns [EObject current=null]: + { newCompositeNode(grammarAccess.getLibraryRule()); } + iv_ruleLibrary=ruleLibrary + { $current=$iv_ruleLibrary.current; } + EOF; + +// Rule Library +ruleLibrary returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + otherlv_0='library' + { + newLeafNode(otherlv_0, grammarAccess.getLibraryAccess().getLibraryKeyword_0()); + } + ( + ( + lv_name_1_0=RULE_ID + { + newLeafNode(lv_name_1_0, grammarAccess.getLibraryAccess().getNameIDTerminalRuleCall_1_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getLibraryRule()); + } + setWithLastConsumed( + $current, + "name", + lv_name_1_0, + "org.eclipse.xtext.common.Terminals.ID"); + } + ) + ) + otherlv_2=';' + { + newLeafNode(otherlv_2, grammarAccess.getLibraryAccess().getSemicolonKeyword_2()); + } + ) +; + +// Entry rule entryRuleInsert +entryRuleInsert returns [EObject current=null]: + { newCompositeNode(grammarAccess.getInsertRule()); } + iv_ruleInsert=ruleInsert + { $current=$iv_ruleInsert.current; } + EOF; + +// Rule Insert +ruleInsert returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + otherlv_0='insert' + { + newLeafNode(otherlv_0, grammarAccess.getInsertAccess().getInsertKeyword_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getInsertAccess().getCategoryCategoryEnumRuleCall_1_0()); + } + lv_category_1_0=ruleCategory + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getInsertRule()); + } + set( + $current, + "category", + lv_category_1_0, + "org.eclipse.triquetrum.commands.Tqcl.Category"); + afterParserOrEnumRuleCall(); + } + ) + )? + ( + ( + lv_entityClass_2_0=RULE_ENTITY_CLASS + { + newLeafNode(lv_entityClass_2_0, grammarAccess.getInsertAccess().getEntityClassENTITY_CLASSTerminalRuleCall_2_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getInsertRule()); + } + setWithLastConsumed( + $current, + "entityClass", + lv_entityClass_2_0, + "org.eclipse.triquetrum.commands.Tqcl.ENTITY_CLASS"); + } + ) + ) + otherlv_3='as' + { + newLeafNode(otherlv_3, grammarAccess.getInsertAccess().getAsKeyword_3()); + } + ( + ( + lv_name_4_0=RULE_STRING + { + newLeafNode(lv_name_4_0, grammarAccess.getInsertAccess().getNameSTRINGTerminalRuleCall_4_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getInsertRule()); + } + setWithLastConsumed( + $current, + "name", + lv_name_4_0, + "org.eclipse.xtext.common.Terminals.STRING"); + } + ) + ) + ( + otherlv_5='with' + { + newLeafNode(otherlv_5, grammarAccess.getInsertAccess().getWithKeyword_5_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getInsertAccess().getParametersParameterParserRuleCall_5_1_0()); + } + lv_parameters_6_0=ruleParameter + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getInsertRule()); + } + add( + $current, + "parameters", + lv_parameters_6_0, + "org.eclipse.triquetrum.commands.Tqcl.Parameter"); + afterParserOrEnumRuleCall(); + } + ) + ) + ( + otherlv_7=',' + { + newLeafNode(otherlv_7, grammarAccess.getInsertAccess().getCommaKeyword_5_2_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getInsertAccess().getParametersParameterParserRuleCall_5_2_1_0()); + } + lv_parameters_8_0=ruleParameter + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getInsertRule()); + } + add( + $current, + "parameters", + lv_parameters_8_0, + "org.eclipse.triquetrum.commands.Tqcl.Parameter"); + afterParserOrEnumRuleCall(); + } + ) + ) + )* + )? + ) +; + +// Entry rule entryRuleSet +entryRuleSet returns [EObject current=null]: + { newCompositeNode(grammarAccess.getSetRule()); } + iv_ruleSet=ruleSet + { $current=$iv_ruleSet.current; } + EOF; + +// Rule Set +ruleSet returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + otherlv_0='set' + { + newLeafNode(otherlv_0, grammarAccess.getSetAccess().getSetKeyword_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getSetAccess().getParamParameterParserRuleCall_1_0()); + } + lv_param_1_0=ruleParameter + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getSetRule()); + } + set( + $current, + "param", + lv_param_1_0, + "org.eclipse.triquetrum.commands.Tqcl.Parameter"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) +; + +// Entry rule entryRuleConnect +entryRuleConnect returns [EObject current=null]: + { newCompositeNode(grammarAccess.getConnectRule()); } + iv_ruleConnect=ruleConnect + { $current=$iv_ruleConnect.current; } + EOF; + +// Rule Connect +ruleConnect returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + otherlv_0='connect' + { + newLeafNode(otherlv_0, grammarAccess.getConnectAccess().getConnectKeyword_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getConnectAccess().getFromConnectionPortParserRuleCall_1_0()); + } + lv_from_1_0=ruleConnectionPort + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getConnectRule()); + } + add( + $current, + "from", + lv_from_1_0, + "org.eclipse.triquetrum.commands.Tqcl.ConnectionPort"); + afterParserOrEnumRuleCall(); + } + ) + ) + ( + otherlv_2=',' + { + newLeafNode(otherlv_2, grammarAccess.getConnectAccess().getCommaKeyword_2_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getConnectAccess().getFromConnectionPortParserRuleCall_2_1_0()); + } + lv_from_3_0=ruleConnectionPort + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getConnectRule()); + } + add( + $current, + "from", + lv_from_3_0, + "org.eclipse.triquetrum.commands.Tqcl.ConnectionPort"); + afterParserOrEnumRuleCall(); + } + ) + ) + )* + otherlv_4='to' + { + newLeafNode(otherlv_4, grammarAccess.getConnectAccess().getToKeyword_3()); + } + ( + ( + { + newCompositeNode(grammarAccess.getConnectAccess().getToConnectionPortParserRuleCall_4_0()); + } + lv_to_5_0=ruleConnectionPort + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getConnectRule()); + } + add( + $current, + "to", + lv_to_5_0, + "org.eclipse.triquetrum.commands.Tqcl.ConnectionPort"); + afterParserOrEnumRuleCall(); + } + ) + ) + ( + otherlv_6=',' + { + newLeafNode(otherlv_6, grammarAccess.getConnectAccess().getCommaKeyword_5_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getConnectAccess().getToConnectionPortParserRuleCall_5_1_0()); + } + lv_to_7_0=ruleConnectionPort + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getConnectRule()); + } + add( + $current, + "to", + lv_to_7_0, + "org.eclipse.triquetrum.commands.Tqcl.ConnectionPort"); + afterParserOrEnumRuleCall(); + } + ) + ) + )* + ) +; + +// Entry rule entryRuleConnectionPort +entryRuleConnectionPort returns [EObject current=null]: + { newCompositeNode(grammarAccess.getConnectionPortRule()); } + iv_ruleConnectionPort=ruleConnectionPort + { $current=$iv_ruleConnectionPort.current; } + EOF; + +// Rule ConnectionPort +ruleConnectionPort returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + ( + { + if ($current==null) { + $current = createModelElement(grammarAccess.getConnectionPortRule()); + } + } + otherlv_0=RULE_ID + { + newLeafNode(otherlv_0, grammarAccess.getConnectionPortAccess().getActorInsertCrossReference_0_0()); + } + ) + ) + otherlv_1='.' + { + newLeafNode(otherlv_1, grammarAccess.getConnectionPortAccess().getFullStopKeyword_1()); + } + ( + ( + { + newCompositeNode(grammarAccess.getConnectionPortAccess().getPortNamedObjParserRuleCall_2_0()); + } + lv_port_2_0=ruleNamedObj + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getConnectionPortRule()); + } + set( + $current, + "port", + lv_port_2_0, + "org.eclipse.triquetrum.commands.Tqcl.NamedObj"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) +; + +// Entry rule entryRuleGoInto +entryRuleGoInto returns [EObject current=null]: + { newCompositeNode(grammarAccess.getGoIntoRule()); } + iv_ruleGoInto=ruleGoInto + { $current=$iv_ruleGoInto.current; } + EOF; + +// Rule GoInto +ruleGoInto returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + otherlv_0='go' + { + newLeafNode(otherlv_0, grammarAccess.getGoIntoAccess().getGoKeyword_0()); + } + ( + ( + lv_direction_1_0='into' + { + newLeafNode(lv_direction_1_0, grammarAccess.getGoIntoAccess().getDirectionIntoKeyword_1_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getGoIntoRule()); + } + setWithLastConsumed($current, "direction", lv_direction_1_0, "into"); + } + ) + ) + ( + ( + { + if ($current==null) { + $current = createModelElement(grammarAccess.getGoIntoRule()); + } + } + otherlv_2=RULE_ID + { + newLeafNode(otherlv_2, grammarAccess.getGoIntoAccess().getActorInsertCrossReference_2_0()); + } + ) + ) + ) +; + +// Entry rule entryRuleGoOut +entryRuleGoOut returns [EObject current=null]: + { newCompositeNode(grammarAccess.getGoOutRule()); } + iv_ruleGoOut=ruleGoOut + { $current=$iv_ruleGoOut.current; } + EOF; + +// Rule GoOut +ruleGoOut returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + otherlv_0='go' + { + newLeafNode(otherlv_0, grammarAccess.getGoOutAccess().getGoKeyword_0()); + } + ( + ( + lv_direction_1_0='out' + { + newLeafNode(lv_direction_1_0, grammarAccess.getGoOutAccess().getDirectionOutKeyword_1_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getGoOutRule()); + } + setWithLastConsumed($current, "direction", lv_direction_1_0, "out"); + } + ) + ) + ) +; + +// Entry rule entryRuleGoTop +entryRuleGoTop returns [EObject current=null]: + { newCompositeNode(grammarAccess.getGoTopRule()); } + iv_ruleGoTop=ruleGoTop + { $current=$iv_ruleGoTop.current; } + EOF; + +// Rule GoTop +ruleGoTop returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + otherlv_0='go' + { + newLeafNode(otherlv_0, grammarAccess.getGoTopAccess().getGoKeyword_0()); + } + ( + ( + lv_direction_1_0='top' + { + newLeafNode(lv_direction_1_0, grammarAccess.getGoTopAccess().getDirectionTopKeyword_1_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getGoTopRule()); + } + setWithLastConsumed($current, "direction", lv_direction_1_0, "top"); + } + ) + ) + ) +; + +// Entry rule entryRuleParameter +entryRuleParameter returns [EObject current=null]: + { newCompositeNode(grammarAccess.getParameterRule()); } + iv_ruleParameter=ruleParameter + { $current=$iv_ruleParameter.current; } + EOF; + +// Rule Parameter +ruleParameter returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + ( + { + newCompositeNode(grammarAccess.getParameterAccess().getIdParameter_idParserRuleCall_0_0()); + } + lv_id_0_0=ruleParameter_id + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getParameterRule()); + } + set( + $current, + "id", + lv_id_0_0, + "org.eclipse.triquetrum.commands.Tqcl.Parameter_id"); + afterParserOrEnumRuleCall(); + } + ) + ) + otherlv_1='=' + { + newLeafNode(otherlv_1, grammarAccess.getParameterAccess().getEqualsSignKeyword_1()); + } + ( + ( + lv_value_2_0=RULE_STRING + { + newLeafNode(lv_value_2_0, grammarAccess.getParameterAccess().getValueSTRINGTerminalRuleCall_2_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getParameterRule()); + } + setWithLastConsumed( + $current, + "value", + lv_value_2_0, + "org.eclipse.xtext.common.Terminals.STRING"); + } + ) + ) + ) +; + +// Entry rule entryRuleParameter_id +entryRuleParameter_id returns [String current=null]: + { newCompositeNode(grammarAccess.getParameter_idRule()); } + iv_ruleParameter_id=ruleParameter_id + { $current=$iv_ruleParameter_id.current.getText(); } + EOF; + +// Rule Parameter_id +ruleParameter_id returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + this_PARAMETER_NAME_0=RULE_PARAMETER_NAME + { + $current.merge(this_PARAMETER_NAME_0); + } + { + newLeafNode(this_PARAMETER_NAME_0, grammarAccess.getParameter_idAccess().getPARAMETER_NAMETerminalRuleCall_0()); + } + | + this_STRING_1=RULE_STRING + { + $current.merge(this_STRING_1); + } + { + newLeafNode(this_STRING_1, grammarAccess.getParameter_idAccess().getSTRINGTerminalRuleCall_1()); + } + ) +; + +// Entry rule entryRuleNamedObj +entryRuleNamedObj returns [String current=null]: + { newCompositeNode(grammarAccess.getNamedObjRule()); } + iv_ruleNamedObj=ruleNamedObj + { $current=$iv_ruleNamedObj.current.getText(); } + EOF; + +// Rule NamedObj +ruleNamedObj returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + this_ID_0=RULE_ID + { + $current.merge(this_ID_0); + } + { + newLeafNode(this_ID_0, grammarAccess.getNamedObjAccess().getIDTerminalRuleCall_0()); + } + | + this_STRING_1=RULE_STRING + { + $current.merge(this_STRING_1); + } + { + newLeafNode(this_STRING_1, grammarAccess.getNamedObjAccess().getSTRINGTerminalRuleCall_1()); + } + ) +; + +// Rule Category +ruleCategory returns [Enumerator current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + enumLiteral_0='actor' + { + $current = grammarAccess.getCategoryAccess().getActorEnumLiteralDeclaration_0().getEnumLiteral().getInstance(); + newLeafNode(enumLiteral_0, grammarAccess.getCategoryAccess().getActorEnumLiteralDeclaration_0()); + } + ) + | + ( + enumLiteral_1='parameter' + { + $current = grammarAccess.getCategoryAccess().getParameterEnumLiteralDeclaration_1().getEnumLiteral().getInstance(); + newLeafNode(enumLiteral_1, grammarAccess.getCategoryAccess().getParameterEnumLiteralDeclaration_1()); + } + ) + | + ( + enumLiteral_2='port' + { + $current = grammarAccess.getCategoryAccess().getPortEnumLiteralDeclaration_2().getEnumLiteral().getInstance(); + newLeafNode(enumLiteral_2, grammarAccess.getCategoryAccess().getPortEnumLiteralDeclaration_2()); + } + ) + | + ( + enumLiteral_3='director' + { + $current = grammarAccess.getCategoryAccess().getDirectorEnumLiteralDeclaration_3().getEnumLiteral().getInstance(); + newLeafNode(enumLiteral_3, grammarAccess.getCategoryAccess().getDirectorEnumLiteralDeclaration_3()); + } + ) + ) +; + +RULE_PARAMETER_NAME : '$' ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*; + +RULE_ENTITY_CLASS : '<' ( options {greedy=false;} : . )*'>'; + +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 : .; diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/parser/antlr/internal/InternalTqcl.tokens b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/parser/antlr/internal/InternalTqcl.tokens new file mode 100644 index 00000000..17c928af --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/parser/antlr/internal/InternalTqcl.tokens @@ -0,0 +1,49 @@ +','=19 +'.'=23 +';'=13 +'='=28 +'actor'=29 +'as'=17 +'connect'=21 +'director'=32 +'go'=24 +'include'=14 +'insert'=16 +'into'=25 +'library'=15 +'out'=26 +'parameter'=30 +'port'=31 +'set'=20 +'to'=22 +'top'=27 +'with'=18 +RULE_ANY_OTHER=12 +RULE_ENTITY_CLASS=6 +RULE_ID=5 +RULE_INT=8 +RULE_ML_COMMENT=9 +RULE_PARAMETER_NAME=7 +RULE_SL_COMMENT=10 +RULE_STRING=4 +RULE_WS=11 +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 +T__30=30 +T__31=31 +T__32=32 diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/parser/antlr/internal/InternalTqclLexer.java b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/parser/antlr/internal/InternalTqclLexer.java new file mode 100644 index 00000000..670a0b89 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/parser/antlr/internal/InternalTqclLexer.java @@ -0,0 +1,1556 @@ +package org.eclipse.triquetrum.commands.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; + + +import org.antlr.runtime.*; +import java.util.Stack; +import java.util.List; +import java.util.ArrayList; + +@SuppressWarnings("all") +public class InternalTqclLexer extends Lexer { + public static final int RULE_STRING=4; + public static final int RULE_SL_COMMENT=10; + public static final int T__19=19; + public static final int T__15=15; + public static final int T__16=16; + public static final int T__17=17; + public static final int T__18=18; + public static final int T__13=13; + public static final int T__14=14; + public static final int EOF=-1; + public static final int T__30=30; + public static final int T__31=31; + public static final int T__32=32; + public static final int RULE_ID=5; + public static final int RULE_PARAMETER_NAME=7; + public static final int RULE_WS=11; + public static final int RULE_ANY_OTHER=12; + public static final int RULE_ENTITY_CLASS=6; + public static final int T__26=26; + public static final int T__27=27; + public static final int T__28=28; + public static final int RULE_INT=8; + public static final int T__29=29; + public static final int T__22=22; + public static final int RULE_ML_COMMENT=9; + public static final int T__23=23; + public static final int T__24=24; + public static final int T__25=25; + public static final int T__20=20; + public static final int T__21=21; + + // delegates + // delegators + + public InternalTqclLexer() {;} + public InternalTqclLexer(CharStream input) { + this(input, new RecognizerSharedState()); + } + public InternalTqclLexer(CharStream input, RecognizerSharedState state) { + super(input,state); + + } + public String getGrammarFileName() { return "InternalTqcl.g"; } + + // $ANTLR start "T__13" + public final void mT__13() throws RecognitionException { + try { + int _type = T__13; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:11:7: ( ';' ) + // InternalTqcl.g:11:9: ';' + { + match(';'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__13" + + // $ANTLR start "T__14" + public final void mT__14() throws RecognitionException { + try { + int _type = T__14; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:12:7: ( 'include' ) + // InternalTqcl.g:12:9: 'include' + { + match("include"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__14" + + // $ANTLR start "T__15" + public final void mT__15() throws RecognitionException { + try { + int _type = T__15; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:13:7: ( 'library' ) + // InternalTqcl.g:13:9: 'library' + { + match("library"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__15" + + // $ANTLR start "T__16" + public final void mT__16() throws RecognitionException { + try { + int _type = T__16; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:14:7: ( 'insert' ) + // InternalTqcl.g:14:9: 'insert' + { + match("insert"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__16" + + // $ANTLR start "T__17" + public final void mT__17() throws RecognitionException { + try { + int _type = T__17; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:15:7: ( 'as' ) + // InternalTqcl.g:15:9: 'as' + { + match("as"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__17" + + // $ANTLR start "T__18" + public final void mT__18() throws RecognitionException { + try { + int _type = T__18; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:16:7: ( 'with' ) + // InternalTqcl.g:16:9: 'with' + { + match("with"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__18" + + // $ANTLR start "T__19" + public final void mT__19() throws RecognitionException { + try { + int _type = T__19; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:17:7: ( ',' ) + // InternalTqcl.g:17:9: ',' + { + match(','); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__19" + + // $ANTLR start "T__20" + public final void mT__20() throws RecognitionException { + try { + int _type = T__20; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:18:7: ( 'set' ) + // InternalTqcl.g:18:9: 'set' + { + match("set"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__20" + + // $ANTLR start "T__21" + public final void mT__21() throws RecognitionException { + try { + int _type = T__21; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:19:7: ( 'connect' ) + // InternalTqcl.g:19:9: 'connect' + { + match("connect"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__21" + + // $ANTLR start "T__22" + public final void mT__22() throws RecognitionException { + try { + int _type = T__22; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:20:7: ( 'to' ) + // InternalTqcl.g:20:9: 'to' + { + match("to"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__22" + + // $ANTLR start "T__23" + public final void mT__23() throws RecognitionException { + try { + int _type = T__23; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:21:7: ( '.' ) + // InternalTqcl.g:21:9: '.' + { + match('.'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__23" + + // $ANTLR start "T__24" + public final void mT__24() throws RecognitionException { + try { + int _type = T__24; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:22:7: ( 'go' ) + // InternalTqcl.g:22:9: 'go' + { + match("go"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__24" + + // $ANTLR start "T__25" + public final void mT__25() throws RecognitionException { + try { + int _type = T__25; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:23:7: ( 'into' ) + // InternalTqcl.g:23:9: 'into' + { + match("into"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__25" + + // $ANTLR start "T__26" + public final void mT__26() throws RecognitionException { + try { + int _type = T__26; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:24:7: ( 'out' ) + // InternalTqcl.g:24:9: 'out' + { + match("out"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__26" + + // $ANTLR start "T__27" + public final void mT__27() throws RecognitionException { + try { + int _type = T__27; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:25:7: ( 'top' ) + // InternalTqcl.g:25:9: 'top' + { + match("top"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__27" + + // $ANTLR start "T__28" + public final void mT__28() throws RecognitionException { + try { + int _type = T__28; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:26:7: ( '=' ) + // InternalTqcl.g:26:9: '=' + { + match('='); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__28" + + // $ANTLR start "T__29" + public final void mT__29() throws RecognitionException { + try { + int _type = T__29; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:27:7: ( 'actor' ) + // InternalTqcl.g:27:9: 'actor' + { + match("actor"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__29" + + // $ANTLR start "T__30" + public final void mT__30() throws RecognitionException { + try { + int _type = T__30; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:28:7: ( 'parameter' ) + // InternalTqcl.g:28:9: 'parameter' + { + match("parameter"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__30" + + // $ANTLR start "T__31" + public final void mT__31() throws RecognitionException { + try { + int _type = T__31; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:29:7: ( 'port' ) + // InternalTqcl.g:29:9: 'port' + { + match("port"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__31" + + // $ANTLR start "T__32" + public final void mT__32() throws RecognitionException { + try { + int _type = T__32; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:30:7: ( 'director' ) + // InternalTqcl.g:30:9: 'director' + { + match("director"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "T__32" + + // $ANTLR start "RULE_PARAMETER_NAME" + public final void mRULE_PARAMETER_NAME() throws RecognitionException { + try { + int _type = RULE_PARAMETER_NAME; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:1049:21: ( '$' ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* ) + // InternalTqcl.g:1049:23: '$' ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* + { + match('$'); + if ( (input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + // InternalTqcl.g:1049:51: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* + loop1: + do { + int alt1=2; + int LA1_0 = input.LA(1); + + if ( ((LA1_0>='0' && LA1_0<='9')||(LA1_0>='A' && LA1_0<='Z')||LA1_0=='_'||(LA1_0>='a' && LA1_0<='z')) ) { + alt1=1; + } + + + switch (alt1) { + case 1 : + // InternalTqcl.g: + { + if ( (input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + break loop1; + } + } while (true); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_PARAMETER_NAME" + + // $ANTLR start "RULE_ENTITY_CLASS" + public final void mRULE_ENTITY_CLASS() throws RecognitionException { + try { + int _type = RULE_ENTITY_CLASS; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:1051:19: ( '<' ( options {greedy=false; } : . )* '>' ) + // InternalTqcl.g:1051:21: '<' ( options {greedy=false; } : . )* '>' + { + match('<'); + // InternalTqcl.g:1051:25: ( options {greedy=false; } : . )* + loop2: + do { + int alt2=2; + int LA2_0 = input.LA(1); + + if ( (LA2_0=='>') ) { + alt2=2; + } + else if ( ((LA2_0>='\u0000' && LA2_0<='=')||(LA2_0>='?' && LA2_0<='\uFFFF')) ) { + alt2=1; + } + + + switch (alt2) { + case 1 : + // InternalTqcl.g:1051:53: . + { + matchAny(); + + } + break; + + default : + break loop2; + } + } while (true); + + match('>'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_ENTITY_CLASS" + + // $ANTLR start "RULE_ID" + public final void mRULE_ID() throws RecognitionException { + try { + int _type = RULE_ID; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:1053:9: ( ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* ) + // InternalTqcl.g:1053:11: ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* + { + // InternalTqcl.g:1053:11: ( '^' )? + int alt3=2; + int LA3_0 = input.LA(1); + + if ( (LA3_0=='^') ) { + alt3=1; + } + switch (alt3) { + case 1 : + // InternalTqcl.g:1053:11: '^' + { + match('^'); + + } + break; + + } + + if ( (input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + // InternalTqcl.g:1053:40: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* + loop4: + do { + int alt4=2; + int LA4_0 = input.LA(1); + + if ( ((LA4_0>='0' && LA4_0<='9')||(LA4_0>='A' && LA4_0<='Z')||LA4_0=='_'||(LA4_0>='a' && LA4_0<='z')) ) { + alt4=1; + } + + + switch (alt4) { + case 1 : + // InternalTqcl.g: + { + if ( (input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + break loop4; + } + } while (true); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_ID" + + // $ANTLR start "RULE_INT" + public final void mRULE_INT() throws RecognitionException { + try { + int _type = RULE_INT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:1055:10: ( ( '0' .. '9' )+ ) + // InternalTqcl.g:1055:12: ( '0' .. '9' )+ + { + // InternalTqcl.g:1055:12: ( '0' .. '9' )+ + int cnt5=0; + loop5: + do { + int alt5=2; + int LA5_0 = input.LA(1); + + if ( ((LA5_0>='0' && LA5_0<='9')) ) { + alt5=1; + } + + + switch (alt5) { + case 1 : + // InternalTqcl.g:1055:13: '0' .. '9' + { + matchRange('0','9'); + + } + break; + + default : + if ( cnt5 >= 1 ) break loop5; + EarlyExitException eee = + new EarlyExitException(5, input); + throw eee; + } + cnt5++; + } while (true); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_INT" + + // $ANTLR start "RULE_STRING" + public final void mRULE_STRING() throws RecognitionException { + try { + int _type = RULE_STRING; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:1057:13: ( ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) ) + // InternalTqcl.g:1057:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) + { + // InternalTqcl.g:1057:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) + int alt8=2; + int LA8_0 = input.LA(1); + + if ( (LA8_0=='\"') ) { + alt8=1; + } + else if ( (LA8_0=='\'') ) { + alt8=2; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 8, 0, input); + + throw nvae; + } + switch (alt8) { + case 1 : + // InternalTqcl.g:1057:16: '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' + { + match('\"'); + // InternalTqcl.g:1057:20: ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* + loop6: + do { + int alt6=3; + int LA6_0 = input.LA(1); + + if ( (LA6_0=='\\') ) { + alt6=1; + } + else if ( ((LA6_0>='\u0000' && LA6_0<='!')||(LA6_0>='#' && LA6_0<='[')||(LA6_0>=']' && LA6_0<='\uFFFF')) ) { + alt6=2; + } + + + switch (alt6) { + case 1 : + // InternalTqcl.g:1057:21: '\\\\' . + { + match('\\'); + matchAny(); + + } + break; + case 2 : + // InternalTqcl.g:1057:28: ~ ( ( '\\\\' | '\"' ) ) + { + if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + break loop6; + } + } while (true); + + match('\"'); + + } + break; + case 2 : + // InternalTqcl.g:1057:48: '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' + { + match('\''); + // InternalTqcl.g:1057:53: ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* + loop7: + do { + int alt7=3; + int LA7_0 = input.LA(1); + + if ( (LA7_0=='\\') ) { + alt7=1; + } + else if ( ((LA7_0>='\u0000' && LA7_0<='&')||(LA7_0>='(' && LA7_0<='[')||(LA7_0>=']' && LA7_0<='\uFFFF')) ) { + alt7=2; + } + + + switch (alt7) { + case 1 : + // InternalTqcl.g:1057:54: '\\\\' . + { + match('\\'); + matchAny(); + + } + break; + case 2 : + // InternalTqcl.g:1057:61: ~ ( ( '\\\\' | '\\'' ) ) + { + if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + break loop7; + } + } while (true); + + match('\''); + + } + break; + + } + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_STRING" + + // $ANTLR start "RULE_ML_COMMENT" + public final void mRULE_ML_COMMENT() throws RecognitionException { + try { + int _type = RULE_ML_COMMENT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:1059:17: ( '/*' ( options {greedy=false; } : . )* '*/' ) + // InternalTqcl.g:1059:19: '/*' ( options {greedy=false; } : . )* '*/' + { + match("/*"); + + // InternalTqcl.g:1059:24: ( options {greedy=false; } : . )* + loop9: + do { + int alt9=2; + int LA9_0 = input.LA(1); + + if ( (LA9_0=='*') ) { + int LA9_1 = input.LA(2); + + if ( (LA9_1=='/') ) { + alt9=2; + } + else if ( ((LA9_1>='\u0000' && LA9_1<='.')||(LA9_1>='0' && LA9_1<='\uFFFF')) ) { + alt9=1; + } + + + } + else if ( ((LA9_0>='\u0000' && LA9_0<=')')||(LA9_0>='+' && LA9_0<='\uFFFF')) ) { + alt9=1; + } + + + switch (alt9) { + case 1 : + // InternalTqcl.g:1059:52: . + { + matchAny(); + + } + break; + + default : + break loop9; + } + } while (true); + + match("*/"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_ML_COMMENT" + + // $ANTLR start "RULE_SL_COMMENT" + public final void mRULE_SL_COMMENT() throws RecognitionException { + try { + int _type = RULE_SL_COMMENT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:1061:17: ( '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? ) + // InternalTqcl.g:1061:19: '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? + { + match("//"); + + // InternalTqcl.g:1061:24: (~ ( ( '\\n' | '\\r' ) ) )* + loop10: + do { + int alt10=2; + int LA10_0 = input.LA(1); + + if ( ((LA10_0>='\u0000' && LA10_0<='\t')||(LA10_0>='\u000B' && LA10_0<='\f')||(LA10_0>='\u000E' && LA10_0<='\uFFFF')) ) { + alt10=1; + } + + + switch (alt10) { + case 1 : + // InternalTqcl.g:1061:24: ~ ( ( '\\n' | '\\r' ) ) + { + if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFF') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + break loop10; + } + } while (true); + + // InternalTqcl.g:1061:40: ( ( '\\r' )? '\\n' )? + int alt12=2; + int LA12_0 = input.LA(1); + + if ( (LA12_0=='\n'||LA12_0=='\r') ) { + alt12=1; + } + switch (alt12) { + case 1 : + // InternalTqcl.g:1061:41: ( '\\r' )? '\\n' + { + // InternalTqcl.g:1061:41: ( '\\r' )? + int alt11=2; + int LA11_0 = input.LA(1); + + if ( (LA11_0=='\r') ) { + alt11=1; + } + switch (alt11) { + case 1 : + // InternalTqcl.g:1061:41: '\\r' + { + match('\r'); + + } + break; + + } + + match('\n'); + + } + break; + + } + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_SL_COMMENT" + + // $ANTLR start "RULE_WS" + public final void mRULE_WS() throws RecognitionException { + try { + int _type = RULE_WS; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:1063:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ ) + // InternalTqcl.g:1063:11: ( ' ' | '\\t' | '\\r' | '\\n' )+ + { + // InternalTqcl.g:1063:11: ( ' ' | '\\t' | '\\r' | '\\n' )+ + int cnt13=0; + loop13: + do { + int alt13=2; + int LA13_0 = input.LA(1); + + if ( ((LA13_0>='\t' && LA13_0<='\n')||LA13_0=='\r'||LA13_0==' ') ) { + alt13=1; + } + + + switch (alt13) { + case 1 : + // InternalTqcl.g: + { + if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)=='\r'||input.LA(1)==' ' ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + if ( cnt13 >= 1 ) break loop13; + EarlyExitException eee = + new EarlyExitException(13, input); + throw eee; + } + cnt13++; + } while (true); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_WS" + + // $ANTLR start "RULE_ANY_OTHER" + public final void mRULE_ANY_OTHER() throws RecognitionException { + try { + int _type = RULE_ANY_OTHER; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalTqcl.g:1065:16: ( . ) + // InternalTqcl.g:1065:18: . + { + matchAny(); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_ANY_OTHER" + + public void mTokens() throws RecognitionException { + // InternalTqcl.g:1:8: ( T__13 | T__14 | T__15 | T__16 | T__17 | T__18 | T__19 | T__20 | T__21 | T__22 | T__23 | T__24 | T__25 | T__26 | T__27 | T__28 | T__29 | T__30 | T__31 | T__32 | RULE_PARAMETER_NAME | RULE_ENTITY_CLASS | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER ) + int alt14=29; + alt14 = dfa14.predict(input); + switch (alt14) { + case 1 : + // InternalTqcl.g:1:10: T__13 + { + mT__13(); + + } + break; + case 2 : + // InternalTqcl.g:1:16: T__14 + { + mT__14(); + + } + break; + case 3 : + // InternalTqcl.g:1:22: T__15 + { + mT__15(); + + } + break; + case 4 : + // InternalTqcl.g:1:28: T__16 + { + mT__16(); + + } + break; + case 5 : + // InternalTqcl.g:1:34: T__17 + { + mT__17(); + + } + break; + case 6 : + // InternalTqcl.g:1:40: T__18 + { + mT__18(); + + } + break; + case 7 : + // InternalTqcl.g:1:46: T__19 + { + mT__19(); + + } + break; + case 8 : + // InternalTqcl.g:1:52: T__20 + { + mT__20(); + + } + break; + case 9 : + // InternalTqcl.g:1:58: T__21 + { + mT__21(); + + } + break; + case 10 : + // InternalTqcl.g:1:64: T__22 + { + mT__22(); + + } + break; + case 11 : + // InternalTqcl.g:1:70: T__23 + { + mT__23(); + + } + break; + case 12 : + // InternalTqcl.g:1:76: T__24 + { + mT__24(); + + } + break; + case 13 : + // InternalTqcl.g:1:82: T__25 + { + mT__25(); + + } + break; + case 14 : + // InternalTqcl.g:1:88: T__26 + { + mT__26(); + + } + break; + case 15 : + // InternalTqcl.g:1:94: T__27 + { + mT__27(); + + } + break; + case 16 : + // InternalTqcl.g:1:100: T__28 + { + mT__28(); + + } + break; + case 17 : + // InternalTqcl.g:1:106: T__29 + { + mT__29(); + + } + break; + case 18 : + // InternalTqcl.g:1:112: T__30 + { + mT__30(); + + } + break; + case 19 : + // InternalTqcl.g:1:118: T__31 + { + mT__31(); + + } + break; + case 20 : + // InternalTqcl.g:1:124: T__32 + { + mT__32(); + + } + break; + case 21 : + // InternalTqcl.g:1:130: RULE_PARAMETER_NAME + { + mRULE_PARAMETER_NAME(); + + } + break; + case 22 : + // InternalTqcl.g:1:150: RULE_ENTITY_CLASS + { + mRULE_ENTITY_CLASS(); + + } + break; + case 23 : + // InternalTqcl.g:1:168: RULE_ID + { + mRULE_ID(); + + } + break; + case 24 : + // InternalTqcl.g:1:176: RULE_INT + { + mRULE_INT(); + + } + break; + case 25 : + // InternalTqcl.g:1:185: RULE_STRING + { + mRULE_STRING(); + + } + break; + case 26 : + // InternalTqcl.g:1:197: RULE_ML_COMMENT + { + mRULE_ML_COMMENT(); + + } + break; + case 27 : + // InternalTqcl.g:1:213: RULE_SL_COMMENT + { + mRULE_SL_COMMENT(); + + } + break; + case 28 : + // InternalTqcl.g:1:229: RULE_WS + { + mRULE_WS(); + + } + break; + case 29 : + // InternalTqcl.g:1:237: RULE_ANY_OTHER + { + mRULE_ANY_OTHER(); + + } + break; + + } + + } + + + protected DFA14 dfa14 = new DFA14(this); + static final String DFA14_eotS = + "\2\uffff\4\34\1\uffff\3\34\1\uffff\2\34\1\uffff\2\34\3\31\2\uffff\3\31\3\uffff\1\34\1\uffff\1\34\1\67\2\34\1\uffff\2\34\1\75\1\uffff\1\76\1\34\1\uffff\3\34\7\uffff\4\34\1\uffff\2\34\1\111\1\34\1\113\2\uffff\1\114\5\34\1\122\2\34\1\125\1\uffff\1\34\2\uffff\1\34\1\130\3\34\1\uffff\1\34\1\135\1\uffff\2\34\1\uffff\2\34\1\142\1\34\1\uffff\3\34\1\147\1\uffff\1\150\1\151\2\34\3\uffff\1\34\1\155\1\156\2\uffff"; + static final String DFA14_eofS = + "\157\uffff"; + static final String DFA14_minS = + "\1\0\1\uffff\1\156\1\151\1\143\1\151\1\uffff\1\145\2\157\1\uffff\1\157\1\165\1\uffff\1\141\1\151\1\101\1\0\1\101\2\uffff\2\0\1\52\3\uffff\1\143\1\uffff\1\142\1\60\2\164\1\uffff\1\164\1\156\1\60\1\uffff\1\60\1\164\1\uffff\3\162\7\uffff\1\154\1\145\1\157\1\162\1\uffff\1\157\1\150\1\60\1\156\1\60\2\uffff\1\60\1\141\1\164\1\145\1\165\1\162\1\60\1\141\1\162\1\60\1\uffff\1\145\2\uffff\1\155\1\60\1\143\1\144\1\164\1\uffff\1\162\1\60\1\uffff\1\143\1\145\1\uffff\1\164\1\145\1\60\1\171\1\uffff\2\164\1\157\1\60\1\uffff\2\60\1\145\1\162\3\uffff\1\162\2\60\2\uffff"; + static final String DFA14_maxS = + "\1\uffff\1\uffff\1\156\1\151\1\163\1\151\1\uffff\1\145\2\157\1\uffff\1\157\1\165\1\uffff\1\157\1\151\1\172\1\uffff\1\172\2\uffff\2\uffff\1\57\3\uffff\1\164\1\uffff\1\142\1\172\2\164\1\uffff\1\164\1\156\1\172\1\uffff\1\172\1\164\1\uffff\3\162\7\uffff\1\154\1\145\1\157\1\162\1\uffff\1\157\1\150\1\172\1\156\1\172\2\uffff\1\172\1\141\1\164\1\145\1\165\1\162\1\172\1\141\1\162\1\172\1\uffff\1\145\2\uffff\1\155\1\172\1\143\1\144\1\164\1\uffff\1\162\1\172\1\uffff\1\143\1\145\1\uffff\1\164\1\145\1\172\1\171\1\uffff\2\164\1\157\1\172\1\uffff\2\172\1\145\1\162\3\uffff\1\162\2\172\2\uffff"; + static final String DFA14_acceptS = + "\1\uffff\1\1\4\uffff\1\7\3\uffff\1\13\2\uffff\1\20\5\uffff\1\27\1\30\3\uffff\1\34\1\35\1\1\1\uffff\1\27\4\uffff\1\7\3\uffff\1\13\2\uffff\1\20\3\uffff\1\25\1\26\1\30\1\31\1\32\1\33\1\34\4\uffff\1\5\5\uffff\1\12\1\14\12\uffff\1\10\1\uffff\1\17\1\16\5\uffff\1\15\2\uffff\1\6\2\uffff\1\23\4\uffff\1\21\4\uffff\1\4\4\uffff\1\2\1\3\1\11\3\uffff\1\24\1\22"; + static final String DFA14_specialS = + "\1\2\20\uffff\1\1\3\uffff\1\0\1\3\130\uffff}>"; + static final String[] DFA14_transitionS = { + "\11\31\2\30\2\31\1\30\22\31\1\30\1\31\1\25\1\31\1\20\2\31\1\26\4\31\1\6\1\31\1\12\1\27\12\24\1\31\1\1\1\21\1\15\3\31\32\23\3\31\1\22\1\23\1\31\1\4\1\23\1\10\1\17\2\23\1\13\1\23\1\2\2\23\1\3\2\23\1\14\1\16\2\23\1\7\1\11\2\23\1\5\3\23\uff85\31", + "", + "\1\33", + "\1\35", + "\1\37\17\uffff\1\36", + "\1\40", + "", + "\1\42", + "\1\43", + "\1\44", + "", + "\1\46", + "\1\47", + "", + "\1\51\15\uffff\1\52", + "\1\53", + "\32\54\4\uffff\1\54\1\uffff\32\54", + "\0\55", + "\32\34\4\uffff\1\34\1\uffff\32\34", + "", + "", + "\0\57", + "\0\57", + "\1\60\4\uffff\1\61", + "", + "", + "", + "\1\63\17\uffff\1\64\1\65", + "", + "\1\66", + "\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\32\34", + "\1\70", + "\1\71", + "", + "\1\72", + "\1\73", + "\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\17\34\1\74\12\34", + "", + "\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\32\34", + "\1\77", + "", + "\1\100", + "\1\101", + "\1\102", + "", + "", + "", + "", + "", + "", + "", + "\1\103", + "\1\104", + "\1\105", + "\1\106", + "", + "\1\107", + "\1\110", + "\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\32\34", + "\1\112", + "\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\32\34", + "", + "", + "\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\32\34", + "\1\115", + "\1\116", + "\1\117", + "\1\120", + "\1\121", + "\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\32\34", + "\1\123", + "\1\124", + "\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\32\34", + "", + "\1\126", + "", + "", + "\1\127", + "\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\32\34", + "\1\131", + "\1\132", + "\1\133", + "", + "\1\134", + "\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\32\34", + "", + "\1\136", + "\1\137", + "", + "\1\140", + "\1\141", + "\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\32\34", + "\1\143", + "", + "\1\144", + "\1\145", + "\1\146", + "\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\32\34", + "", + "\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\32\34", + "\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\32\34", + "\1\152", + "\1\153", + "", + "", + "", + "\1\154", + "\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\32\34", + "\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\32\34", + "", + "" + }; + + static final short[] DFA14_eot = DFA.unpackEncodedString(DFA14_eotS); + static final short[] DFA14_eof = DFA.unpackEncodedString(DFA14_eofS); + static final char[] DFA14_min = DFA.unpackEncodedStringToUnsignedChars(DFA14_minS); + static final char[] DFA14_max = DFA.unpackEncodedStringToUnsignedChars(DFA14_maxS); + static final short[] DFA14_accept = DFA.unpackEncodedString(DFA14_acceptS); + static final short[] DFA14_special = DFA.unpackEncodedString(DFA14_specialS); + static final short[][] DFA14_transition; + + static { + int numStates = DFA14_transitionS.length; + DFA14_transition = new short[numStates][]; + for (int i=0; i='\u0000' && LA14_21<='\uFFFF')) ) {s = 47;} + + else s = 25; + + if ( s>=0 ) return s; + break; + case 1 : + int LA14_17 = input.LA(1); + + s = -1; + if ( ((LA14_17>='\u0000' && LA14_17<='\uFFFF')) ) {s = 45;} + + else s = 25; + + if ( s>=0 ) return s; + break; + case 2 : + int LA14_0 = input.LA(1); + + s = -1; + if ( (LA14_0==';') ) {s = 1;} + + else if ( (LA14_0=='i') ) {s = 2;} + + else if ( (LA14_0=='l') ) {s = 3;} + + else if ( (LA14_0=='a') ) {s = 4;} + + else if ( (LA14_0=='w') ) {s = 5;} + + else if ( (LA14_0==',') ) {s = 6;} + + else if ( (LA14_0=='s') ) {s = 7;} + + else if ( (LA14_0=='c') ) {s = 8;} + + else if ( (LA14_0=='t') ) {s = 9;} + + else if ( (LA14_0=='.') ) {s = 10;} + + else if ( (LA14_0=='g') ) {s = 11;} + + else if ( (LA14_0=='o') ) {s = 12;} + + else if ( (LA14_0=='=') ) {s = 13;} + + else if ( (LA14_0=='p') ) {s = 14;} + + else if ( (LA14_0=='d') ) {s = 15;} + + else if ( (LA14_0=='$') ) {s = 16;} + + else if ( (LA14_0=='<') ) {s = 17;} + + else if ( (LA14_0=='^') ) {s = 18;} + + else if ( ((LA14_0>='A' && LA14_0<='Z')||LA14_0=='_'||LA14_0=='b'||(LA14_0>='e' && LA14_0<='f')||LA14_0=='h'||(LA14_0>='j' && LA14_0<='k')||(LA14_0>='m' && LA14_0<='n')||(LA14_0>='q' && LA14_0<='r')||(LA14_0>='u' && LA14_0<='v')||(LA14_0>='x' && LA14_0<='z')) ) {s = 19;} + + else if ( ((LA14_0>='0' && LA14_0<='9')) ) {s = 20;} + + else if ( (LA14_0=='\"') ) {s = 21;} + + else if ( (LA14_0=='\'') ) {s = 22;} + + else if ( (LA14_0=='/') ) {s = 23;} + + else if ( ((LA14_0>='\t' && LA14_0<='\n')||LA14_0=='\r'||LA14_0==' ') ) {s = 24;} + + else if ( ((LA14_0>='\u0000' && LA14_0<='\b')||(LA14_0>='\u000B' && LA14_0<='\f')||(LA14_0>='\u000E' && LA14_0<='\u001F')||LA14_0=='!'||LA14_0=='#'||(LA14_0>='%' && LA14_0<='&')||(LA14_0>='(' && LA14_0<='+')||LA14_0=='-'||LA14_0==':'||(LA14_0>='>' && LA14_0<='@')||(LA14_0>='[' && LA14_0<=']')||LA14_0=='`'||(LA14_0>='{' && LA14_0<='\uFFFF')) ) {s = 25;} + + if ( s>=0 ) return s; + break; + case 3 : + int LA14_22 = input.LA(1); + + s = -1; + if ( ((LA14_22>='\u0000' && LA14_22<='\uFFFF')) ) {s = 47;} + + else s = 25; + + if ( s>=0 ) return s; + break; + } + NoViableAltException nvae = + new NoViableAltException(getDescription(), 14, _s, input); + error(nvae); + throw nvae; + } + } + + +} \ No newline at end of file diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/parser/antlr/internal/InternalTqclParser.java b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/parser/antlr/internal/InternalTqclParser.java new file mode 100644 index 00000000..1726ff55 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/parser/antlr/internal/InternalTqclParser.java @@ -0,0 +1,2773 @@ +package org.eclipse.triquetrum.commands.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 org.eclipse.triquetrum.commands.services.TqclGrammarAccess; + + + +import org.antlr.runtime.*; +import java.util.Stack; +import java.util.List; +import java.util.ArrayList; + +/******************************************************************************* + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +@SuppressWarnings("all") +public class InternalTqclParser extends AbstractInternalAntlrParser { + public static final String[] tokenNames = new String[] { + "", "", "", "", "RULE_STRING", "RULE_ID", "RULE_ENTITY_CLASS", "RULE_PARAMETER_NAME", "RULE_INT", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS", "RULE_ANY_OTHER", "';'", "'include'", "'library'", "'insert'", "'as'", "'with'", "','", "'set'", "'connect'", "'to'", "'.'", "'go'", "'into'", "'out'", "'top'", "'='", "'actor'", "'parameter'", "'port'", "'director'" + }; + public static final int RULE_STRING=4; + public static final int RULE_SL_COMMENT=10; + public static final int T__19=19; + public static final int T__15=15; + public static final int T__16=16; + public static final int T__17=17; + public static final int T__18=18; + public static final int T__13=13; + public static final int T__14=14; + public static final int EOF=-1; + public static final int T__30=30; + public static final int T__31=31; + public static final int T__32=32; + public static final int RULE_ID=5; + public static final int RULE_PARAMETER_NAME=7; + public static final int RULE_WS=11; + public static final int RULE_ANY_OTHER=12; + public static final int RULE_ENTITY_CLASS=6; + public static final int T__26=26; + public static final int T__27=27; + public static final int T__28=28; + public static final int RULE_INT=8; + public static final int T__29=29; + public static final int T__22=22; + public static final int RULE_ML_COMMENT=9; + public static final int T__23=23; + public static final int T__24=24; + public static final int T__25=25; + public static final int T__20=20; + public static final int T__21=21; + + // delegates + // delegators + + + public InternalTqclParser(TokenStream input) { + this(input, new RecognizerSharedState()); + } + public InternalTqclParser(TokenStream input, RecognizerSharedState state) { + super(input, state); + + } + + + public String[] getTokenNames() { return InternalTqclParser.tokenNames; } + public String getGrammarFileName() { return "InternalTqcl.g"; } + + + + private TqclGrammarAccess grammarAccess; + + public InternalTqclParser(TokenStream input, TqclGrammarAccess grammarAccess) { + this(input); + this.grammarAccess = grammarAccess; + registerRules(grammarAccess.getGrammar()); + } + + @Override + protected String getFirstRuleName() { + return "TriquetrumScript"; + } + + @Override + protected TqclGrammarAccess getGrammarAccess() { + return grammarAccess; + } + + + + + // $ANTLR start "entryRuleTriquetrumScript" + // InternalTqcl.g:74:1: entryRuleTriquetrumScript returns [EObject current=null] : iv_ruleTriquetrumScript= ruleTriquetrumScript EOF ; + public final EObject entryRuleTriquetrumScript() throws RecognitionException { + EObject current = null; + + EObject iv_ruleTriquetrumScript = null; + + + try { + // InternalTqcl.g:74:57: (iv_ruleTriquetrumScript= ruleTriquetrumScript EOF ) + // InternalTqcl.g:75:2: iv_ruleTriquetrumScript= ruleTriquetrumScript EOF + { + newCompositeNode(grammarAccess.getTriquetrumScriptRule()); + pushFollow(FOLLOW_1); + iv_ruleTriquetrumScript=ruleTriquetrumScript(); + + state._fsp--; + + current =iv_ruleTriquetrumScript; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleTriquetrumScript" + + + // $ANTLR start "ruleTriquetrumScript" + // InternalTqcl.g:81:1: ruleTriquetrumScript returns [EObject current=null] : ( ( (lv_libraries_0_0= ruleLibrary ) )* ( (lv_commands_1_0= ruleCommand ) )* ) ; + public final EObject ruleTriquetrumScript() throws RecognitionException { + EObject current = null; + + EObject lv_libraries_0_0 = null; + + EObject lv_commands_1_0 = null; + + + + enterRule(); + + try { + // InternalTqcl.g:87:2: ( ( ( (lv_libraries_0_0= ruleLibrary ) )* ( (lv_commands_1_0= ruleCommand ) )* ) ) + // InternalTqcl.g:88:2: ( ( (lv_libraries_0_0= ruleLibrary ) )* ( (lv_commands_1_0= ruleCommand ) )* ) + { + // InternalTqcl.g:88:2: ( ( (lv_libraries_0_0= ruleLibrary ) )* ( (lv_commands_1_0= ruleCommand ) )* ) + // InternalTqcl.g:89:3: ( (lv_libraries_0_0= ruleLibrary ) )* ( (lv_commands_1_0= ruleCommand ) )* + { + // InternalTqcl.g:89:3: ( (lv_libraries_0_0= ruleLibrary ) )* + loop1: + do { + int alt1=2; + int LA1_0 = input.LA(1); + + if ( (LA1_0==15) ) { + alt1=1; + } + + + switch (alt1) { + case 1 : + // InternalTqcl.g:90:4: (lv_libraries_0_0= ruleLibrary ) + { + // InternalTqcl.g:90:4: (lv_libraries_0_0= ruleLibrary ) + // InternalTqcl.g:91:5: lv_libraries_0_0= ruleLibrary + { + + newCompositeNode(grammarAccess.getTriquetrumScriptAccess().getLibrariesLibraryParserRuleCall_0_0()); + + pushFollow(FOLLOW_3); + lv_libraries_0_0=ruleLibrary(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getTriquetrumScriptRule()); + } + add( + current, + "libraries", + lv_libraries_0_0, + "org.eclipse.triquetrum.commands.Tqcl.Library"); + afterParserOrEnumRuleCall(); + + + } + + + } + break; + + default : + break loop1; + } + } while (true); + + // InternalTqcl.g:108:3: ( (lv_commands_1_0= ruleCommand ) )* + loop2: + do { + int alt2=2; + int LA2_0 = input.LA(1); + + if ( (LA2_0==14||LA2_0==16||(LA2_0>=20 && LA2_0<=21)||LA2_0==24) ) { + alt2=1; + } + + + switch (alt2) { + case 1 : + // InternalTqcl.g:109:4: (lv_commands_1_0= ruleCommand ) + { + // InternalTqcl.g:109:4: (lv_commands_1_0= ruleCommand ) + // InternalTqcl.g:110:5: lv_commands_1_0= ruleCommand + { + + newCompositeNode(grammarAccess.getTriquetrumScriptAccess().getCommandsCommandParserRuleCall_1_0()); + + pushFollow(FOLLOW_4); + lv_commands_1_0=ruleCommand(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getTriquetrumScriptRule()); + } + add( + current, + "commands", + lv_commands_1_0, + "org.eclipse.triquetrum.commands.Tqcl.Command"); + afterParserOrEnumRuleCall(); + + + } + + + } + break; + + default : + break loop2; + } + } while (true); + + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleTriquetrumScript" + + + // $ANTLR start "entryRuleCompositeCommand" + // InternalTqcl.g:131:1: entryRuleCompositeCommand returns [EObject current=null] : iv_ruleCompositeCommand= ruleCompositeCommand EOF ; + public final EObject entryRuleCompositeCommand() throws RecognitionException { + EObject current = null; + + EObject iv_ruleCompositeCommand = null; + + + try { + // InternalTqcl.g:131:57: (iv_ruleCompositeCommand= ruleCompositeCommand EOF ) + // InternalTqcl.g:132:2: iv_ruleCompositeCommand= ruleCompositeCommand EOF + { + newCompositeNode(grammarAccess.getCompositeCommandRule()); + pushFollow(FOLLOW_1); + iv_ruleCompositeCommand=ruleCompositeCommand(); + + state._fsp--; + + current =iv_ruleCompositeCommand; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleCompositeCommand" + + + // $ANTLR start "ruleCompositeCommand" + // InternalTqcl.g:138:1: ruleCompositeCommand returns [EObject current=null] : ( ( (lv_start_0_0= ruleGoInto ) ) ( (lv_commands_1_0= ruleCommand ) )* ( ( (lv_end_2_1= ruleGoOut | lv_end_2_2= ruleGoTop ) ) ) ) ; + public final EObject ruleCompositeCommand() throws RecognitionException { + EObject current = null; + + EObject lv_start_0_0 = null; + + EObject lv_commands_1_0 = null; + + EObject lv_end_2_1 = null; + + EObject lv_end_2_2 = null; + + + + enterRule(); + + try { + // InternalTqcl.g:144:2: ( ( ( (lv_start_0_0= ruleGoInto ) ) ( (lv_commands_1_0= ruleCommand ) )* ( ( (lv_end_2_1= ruleGoOut | lv_end_2_2= ruleGoTop ) ) ) ) ) + // InternalTqcl.g:145:2: ( ( (lv_start_0_0= ruleGoInto ) ) ( (lv_commands_1_0= ruleCommand ) )* ( ( (lv_end_2_1= ruleGoOut | lv_end_2_2= ruleGoTop ) ) ) ) + { + // InternalTqcl.g:145:2: ( ( (lv_start_0_0= ruleGoInto ) ) ( (lv_commands_1_0= ruleCommand ) )* ( ( (lv_end_2_1= ruleGoOut | lv_end_2_2= ruleGoTop ) ) ) ) + // InternalTqcl.g:146:3: ( (lv_start_0_0= ruleGoInto ) ) ( (lv_commands_1_0= ruleCommand ) )* ( ( (lv_end_2_1= ruleGoOut | lv_end_2_2= ruleGoTop ) ) ) + { + // InternalTqcl.g:146:3: ( (lv_start_0_0= ruleGoInto ) ) + // InternalTqcl.g:147:4: (lv_start_0_0= ruleGoInto ) + { + // InternalTqcl.g:147:4: (lv_start_0_0= ruleGoInto ) + // InternalTqcl.g:148:5: lv_start_0_0= ruleGoInto + { + + newCompositeNode(grammarAccess.getCompositeCommandAccess().getStartGoIntoParserRuleCall_0_0()); + + pushFollow(FOLLOW_5); + lv_start_0_0=ruleGoInto(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getCompositeCommandRule()); + } + set( + current, + "start", + lv_start_0_0, + "org.eclipse.triquetrum.commands.Tqcl.GoInto"); + afterParserOrEnumRuleCall(); + + + } + + + } + + // InternalTqcl.g:165:3: ( (lv_commands_1_0= ruleCommand ) )* + loop3: + do { + int alt3=2; + int LA3_0 = input.LA(1); + + if ( (LA3_0==24) ) { + int LA3_1 = input.LA(2); + + if ( (LA3_1==25) ) { + alt3=1; + } + + + } + else if ( (LA3_0==14||LA3_0==16||(LA3_0>=20 && LA3_0<=21)) ) { + alt3=1; + } + + + switch (alt3) { + case 1 : + // InternalTqcl.g:166:4: (lv_commands_1_0= ruleCommand ) + { + // InternalTqcl.g:166:4: (lv_commands_1_0= ruleCommand ) + // InternalTqcl.g:167:5: lv_commands_1_0= ruleCommand + { + + newCompositeNode(grammarAccess.getCompositeCommandAccess().getCommandsCommandParserRuleCall_1_0()); + + pushFollow(FOLLOW_5); + lv_commands_1_0=ruleCommand(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getCompositeCommandRule()); + } + add( + current, + "commands", + lv_commands_1_0, + "org.eclipse.triquetrum.commands.Tqcl.Command"); + afterParserOrEnumRuleCall(); + + + } + + + } + break; + + default : + break loop3; + } + } while (true); + + // InternalTqcl.g:184:3: ( ( (lv_end_2_1= ruleGoOut | lv_end_2_2= ruleGoTop ) ) ) + // InternalTqcl.g:185:4: ( (lv_end_2_1= ruleGoOut | lv_end_2_2= ruleGoTop ) ) + { + // InternalTqcl.g:185:4: ( (lv_end_2_1= ruleGoOut | lv_end_2_2= ruleGoTop ) ) + // InternalTqcl.g:186:5: (lv_end_2_1= ruleGoOut | lv_end_2_2= ruleGoTop ) + { + // InternalTqcl.g:186:5: (lv_end_2_1= ruleGoOut | lv_end_2_2= ruleGoTop ) + int alt4=2; + int LA4_0 = input.LA(1); + + if ( (LA4_0==24) ) { + int LA4_1 = input.LA(2); + + if ( (LA4_1==27) ) { + alt4=2; + } + else if ( (LA4_1==26) ) { + alt4=1; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 4, 1, input); + + throw nvae; + } + } + else { + NoViableAltException nvae = + new NoViableAltException("", 4, 0, input); + + throw nvae; + } + switch (alt4) { + case 1 : + // InternalTqcl.g:187:6: lv_end_2_1= ruleGoOut + { + + newCompositeNode(grammarAccess.getCompositeCommandAccess().getEndGoOutParserRuleCall_2_0_0()); + + pushFollow(FOLLOW_2); + lv_end_2_1=ruleGoOut(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getCompositeCommandRule()); + } + set( + current, + "end", + lv_end_2_1, + "org.eclipse.triquetrum.commands.Tqcl.GoOut"); + afterParserOrEnumRuleCall(); + + + } + break; + case 2 : + // InternalTqcl.g:203:6: lv_end_2_2= ruleGoTop + { + + newCompositeNode(grammarAccess.getCompositeCommandAccess().getEndGoTopParserRuleCall_2_0_1()); + + pushFollow(FOLLOW_2); + lv_end_2_2=ruleGoTop(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getCompositeCommandRule()); + } + set( + current, + "end", + lv_end_2_2, + "org.eclipse.triquetrum.commands.Tqcl.GoTop"); + afterParserOrEnumRuleCall(); + + + } + break; + + } + + + } + + + } + + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleCompositeCommand" + + + // $ANTLR start "entryRuleSimpleCommand" + // InternalTqcl.g:225:1: entryRuleSimpleCommand returns [EObject current=null] : iv_ruleSimpleCommand= ruleSimpleCommand EOF ; + public final EObject entryRuleSimpleCommand() throws RecognitionException { + EObject current = null; + + EObject iv_ruleSimpleCommand = null; + + + try { + // InternalTqcl.g:225:54: (iv_ruleSimpleCommand= ruleSimpleCommand EOF ) + // InternalTqcl.g:226:2: iv_ruleSimpleCommand= ruleSimpleCommand EOF + { + newCompositeNode(grammarAccess.getSimpleCommandRule()); + pushFollow(FOLLOW_1); + iv_ruleSimpleCommand=ruleSimpleCommand(); + + state._fsp--; + + current =iv_ruleSimpleCommand; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleSimpleCommand" + + + // $ANTLR start "ruleSimpleCommand" + // InternalTqcl.g:232:1: ruleSimpleCommand returns [EObject current=null] : ( (this_Insert_0= ruleInsert | this_Connect_1= ruleConnect | this_Set_2= ruleSet | this_Include_3= ruleInclude ) otherlv_4= ';' ) ; + public final EObject ruleSimpleCommand() throws RecognitionException { + EObject current = null; + + Token otherlv_4=null; + EObject this_Insert_0 = null; + + EObject this_Connect_1 = null; + + EObject this_Set_2 = null; + + EObject this_Include_3 = null; + + + + enterRule(); + + try { + // InternalTqcl.g:238:2: ( ( (this_Insert_0= ruleInsert | this_Connect_1= ruleConnect | this_Set_2= ruleSet | this_Include_3= ruleInclude ) otherlv_4= ';' ) ) + // InternalTqcl.g:239:2: ( (this_Insert_0= ruleInsert | this_Connect_1= ruleConnect | this_Set_2= ruleSet | this_Include_3= ruleInclude ) otherlv_4= ';' ) + { + // InternalTqcl.g:239:2: ( (this_Insert_0= ruleInsert | this_Connect_1= ruleConnect | this_Set_2= ruleSet | this_Include_3= ruleInclude ) otherlv_4= ';' ) + // InternalTqcl.g:240:3: (this_Insert_0= ruleInsert | this_Connect_1= ruleConnect | this_Set_2= ruleSet | this_Include_3= ruleInclude ) otherlv_4= ';' + { + // InternalTqcl.g:240:3: (this_Insert_0= ruleInsert | this_Connect_1= ruleConnect | this_Set_2= ruleSet | this_Include_3= ruleInclude ) + int alt5=4; + switch ( input.LA(1) ) { + case 16: + { + alt5=1; + } + break; + case 21: + { + alt5=2; + } + break; + case 20: + { + alt5=3; + } + break; + case 14: + { + alt5=4; + } + break; + default: + NoViableAltException nvae = + new NoViableAltException("", 5, 0, input); + + throw nvae; + } + + switch (alt5) { + case 1 : + // InternalTqcl.g:241:4: this_Insert_0= ruleInsert + { + + newCompositeNode(grammarAccess.getSimpleCommandAccess().getInsertParserRuleCall_0_0()); + + pushFollow(FOLLOW_6); + this_Insert_0=ruleInsert(); + + state._fsp--; + + + current = this_Insert_0; + afterParserOrEnumRuleCall(); + + + } + break; + case 2 : + // InternalTqcl.g:250:4: this_Connect_1= ruleConnect + { + + newCompositeNode(grammarAccess.getSimpleCommandAccess().getConnectParserRuleCall_0_1()); + + pushFollow(FOLLOW_6); + this_Connect_1=ruleConnect(); + + state._fsp--; + + + current = this_Connect_1; + afterParserOrEnumRuleCall(); + + + } + break; + case 3 : + // InternalTqcl.g:259:4: this_Set_2= ruleSet + { + + newCompositeNode(grammarAccess.getSimpleCommandAccess().getSetParserRuleCall_0_2()); + + pushFollow(FOLLOW_6); + this_Set_2=ruleSet(); + + state._fsp--; + + + current = this_Set_2; + afterParserOrEnumRuleCall(); + + + } + break; + case 4 : + // InternalTqcl.g:268:4: this_Include_3= ruleInclude + { + + newCompositeNode(grammarAccess.getSimpleCommandAccess().getIncludeParserRuleCall_0_3()); + + pushFollow(FOLLOW_6); + this_Include_3=ruleInclude(); + + state._fsp--; + + + current = this_Include_3; + afterParserOrEnumRuleCall(); + + + } + break; + + } + + otherlv_4=(Token)match(input,13,FOLLOW_2); + + newLeafNode(otherlv_4, grammarAccess.getSimpleCommandAccess().getSemicolonKeyword_1()); + + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleSimpleCommand" + + + // $ANTLR start "entryRuleCommand" + // InternalTqcl.g:285:1: entryRuleCommand returns [EObject current=null] : iv_ruleCommand= ruleCommand EOF ; + public final EObject entryRuleCommand() throws RecognitionException { + EObject current = null; + + EObject iv_ruleCommand = null; + + + try { + // InternalTqcl.g:285:48: (iv_ruleCommand= ruleCommand EOF ) + // InternalTqcl.g:286:2: iv_ruleCommand= ruleCommand EOF + { + newCompositeNode(grammarAccess.getCommandRule()); + pushFollow(FOLLOW_1); + iv_ruleCommand=ruleCommand(); + + state._fsp--; + + current =iv_ruleCommand; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleCommand" + + + // $ANTLR start "ruleCommand" + // InternalTqcl.g:292:1: ruleCommand returns [EObject current=null] : (this_SimpleCommand_0= ruleSimpleCommand | this_CompositeCommand_1= ruleCompositeCommand ) ; + public final EObject ruleCommand() throws RecognitionException { + EObject current = null; + + EObject this_SimpleCommand_0 = null; + + EObject this_CompositeCommand_1 = null; + + + + enterRule(); + + try { + // InternalTqcl.g:298:2: ( (this_SimpleCommand_0= ruleSimpleCommand | this_CompositeCommand_1= ruleCompositeCommand ) ) + // InternalTqcl.g:299:2: (this_SimpleCommand_0= ruleSimpleCommand | this_CompositeCommand_1= ruleCompositeCommand ) + { + // InternalTqcl.g:299:2: (this_SimpleCommand_0= ruleSimpleCommand | this_CompositeCommand_1= ruleCompositeCommand ) + int alt6=2; + int LA6_0 = input.LA(1); + + if ( (LA6_0==14||LA6_0==16||(LA6_0>=20 && LA6_0<=21)) ) { + alt6=1; + } + else if ( (LA6_0==24) ) { + alt6=2; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 6, 0, input); + + throw nvae; + } + switch (alt6) { + case 1 : + // InternalTqcl.g:300:3: this_SimpleCommand_0= ruleSimpleCommand + { + + newCompositeNode(grammarAccess.getCommandAccess().getSimpleCommandParserRuleCall_0()); + + pushFollow(FOLLOW_2); + this_SimpleCommand_0=ruleSimpleCommand(); + + state._fsp--; + + + current = this_SimpleCommand_0; + afterParserOrEnumRuleCall(); + + + } + break; + case 2 : + // InternalTqcl.g:309:3: this_CompositeCommand_1= ruleCompositeCommand + { + + newCompositeNode(grammarAccess.getCommandAccess().getCompositeCommandParserRuleCall_1()); + + pushFollow(FOLLOW_2); + this_CompositeCommand_1=ruleCompositeCommand(); + + state._fsp--; + + + current = this_CompositeCommand_1; + afterParserOrEnumRuleCall(); + + + } + break; + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleCommand" + + + // $ANTLR start "entryRuleInclude" + // InternalTqcl.g:321:1: entryRuleInclude returns [EObject current=null] : iv_ruleInclude= ruleInclude EOF ; + public final EObject entryRuleInclude() throws RecognitionException { + EObject current = null; + + EObject iv_ruleInclude = null; + + + try { + // InternalTqcl.g:321:48: (iv_ruleInclude= ruleInclude EOF ) + // InternalTqcl.g:322:2: iv_ruleInclude= ruleInclude EOF + { + newCompositeNode(grammarAccess.getIncludeRule()); + pushFollow(FOLLOW_1); + iv_ruleInclude=ruleInclude(); + + state._fsp--; + + current =iv_ruleInclude; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleInclude" + + + // $ANTLR start "ruleInclude" + // InternalTqcl.g:328:1: ruleInclude returns [EObject current=null] : (otherlv_0= 'include' ( (lv_filename_1_0= RULE_STRING ) ) otherlv_2= ';' ) ; + public final EObject ruleInclude() throws RecognitionException { + EObject current = null; + + Token otherlv_0=null; + Token lv_filename_1_0=null; + Token otherlv_2=null; + + + enterRule(); + + try { + // InternalTqcl.g:334:2: ( (otherlv_0= 'include' ( (lv_filename_1_0= RULE_STRING ) ) otherlv_2= ';' ) ) + // InternalTqcl.g:335:2: (otherlv_0= 'include' ( (lv_filename_1_0= RULE_STRING ) ) otherlv_2= ';' ) + { + // InternalTqcl.g:335:2: (otherlv_0= 'include' ( (lv_filename_1_0= RULE_STRING ) ) otherlv_2= ';' ) + // InternalTqcl.g:336:3: otherlv_0= 'include' ( (lv_filename_1_0= RULE_STRING ) ) otherlv_2= ';' + { + otherlv_0=(Token)match(input,14,FOLLOW_7); + + newLeafNode(otherlv_0, grammarAccess.getIncludeAccess().getIncludeKeyword_0()); + + // InternalTqcl.g:340:3: ( (lv_filename_1_0= RULE_STRING ) ) + // InternalTqcl.g:341:4: (lv_filename_1_0= RULE_STRING ) + { + // InternalTqcl.g:341:4: (lv_filename_1_0= RULE_STRING ) + // InternalTqcl.g:342:5: lv_filename_1_0= RULE_STRING + { + lv_filename_1_0=(Token)match(input,RULE_STRING,FOLLOW_6); + + newLeafNode(lv_filename_1_0, grammarAccess.getIncludeAccess().getFilenameSTRINGTerminalRuleCall_1_0()); + + + if (current==null) { + current = createModelElement(grammarAccess.getIncludeRule()); + } + setWithLastConsumed( + current, + "filename", + lv_filename_1_0, + "org.eclipse.xtext.common.Terminals.STRING"); + + + } + + + } + + otherlv_2=(Token)match(input,13,FOLLOW_2); + + newLeafNode(otherlv_2, grammarAccess.getIncludeAccess().getSemicolonKeyword_2()); + + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleInclude" + + + // $ANTLR start "entryRuleLibrary" + // InternalTqcl.g:366:1: entryRuleLibrary returns [EObject current=null] : iv_ruleLibrary= ruleLibrary EOF ; + public final EObject entryRuleLibrary() throws RecognitionException { + EObject current = null; + + EObject iv_ruleLibrary = null; + + + try { + // InternalTqcl.g:366:48: (iv_ruleLibrary= ruleLibrary EOF ) + // InternalTqcl.g:367:2: iv_ruleLibrary= ruleLibrary EOF + { + newCompositeNode(grammarAccess.getLibraryRule()); + pushFollow(FOLLOW_1); + iv_ruleLibrary=ruleLibrary(); + + state._fsp--; + + current =iv_ruleLibrary; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleLibrary" + + + // $ANTLR start "ruleLibrary" + // InternalTqcl.g:373:1: ruleLibrary returns [EObject current=null] : (otherlv_0= 'library' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= ';' ) ; + public final EObject ruleLibrary() throws RecognitionException { + EObject current = null; + + Token otherlv_0=null; + Token lv_name_1_0=null; + Token otherlv_2=null; + + + enterRule(); + + try { + // InternalTqcl.g:379:2: ( (otherlv_0= 'library' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= ';' ) ) + // InternalTqcl.g:380:2: (otherlv_0= 'library' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= ';' ) + { + // InternalTqcl.g:380:2: (otherlv_0= 'library' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= ';' ) + // InternalTqcl.g:381:3: otherlv_0= 'library' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= ';' + { + otherlv_0=(Token)match(input,15,FOLLOW_8); + + newLeafNode(otherlv_0, grammarAccess.getLibraryAccess().getLibraryKeyword_0()); + + // InternalTqcl.g:385:3: ( (lv_name_1_0= RULE_ID ) ) + // InternalTqcl.g:386:4: (lv_name_1_0= RULE_ID ) + { + // InternalTqcl.g:386:4: (lv_name_1_0= RULE_ID ) + // InternalTqcl.g:387:5: lv_name_1_0= RULE_ID + { + lv_name_1_0=(Token)match(input,RULE_ID,FOLLOW_6); + + newLeafNode(lv_name_1_0, grammarAccess.getLibraryAccess().getNameIDTerminalRuleCall_1_0()); + + + if (current==null) { + current = createModelElement(grammarAccess.getLibraryRule()); + } + setWithLastConsumed( + current, + "name", + lv_name_1_0, + "org.eclipse.xtext.common.Terminals.ID"); + + + } + + + } + + otherlv_2=(Token)match(input,13,FOLLOW_2); + + newLeafNode(otherlv_2, grammarAccess.getLibraryAccess().getSemicolonKeyword_2()); + + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleLibrary" + + + // $ANTLR start "entryRuleInsert" + // InternalTqcl.g:411:1: entryRuleInsert returns [EObject current=null] : iv_ruleInsert= ruleInsert EOF ; + public final EObject entryRuleInsert() throws RecognitionException { + EObject current = null; + + EObject iv_ruleInsert = null; + + + try { + // InternalTqcl.g:411:47: (iv_ruleInsert= ruleInsert EOF ) + // InternalTqcl.g:412:2: iv_ruleInsert= ruleInsert EOF + { + newCompositeNode(grammarAccess.getInsertRule()); + pushFollow(FOLLOW_1); + iv_ruleInsert=ruleInsert(); + + state._fsp--; + + current =iv_ruleInsert; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleInsert" + + + // $ANTLR start "ruleInsert" + // InternalTqcl.g:418:1: ruleInsert returns [EObject current=null] : (otherlv_0= 'insert' ( (lv_category_1_0= ruleCategory ) )? ( (lv_entityClass_2_0= RULE_ENTITY_CLASS ) ) otherlv_3= 'as' ( (lv_name_4_0= RULE_STRING ) ) (otherlv_5= 'with' ( (lv_parameters_6_0= ruleParameter ) ) (otherlv_7= ',' ( (lv_parameters_8_0= ruleParameter ) ) )* )? ) ; + public final EObject ruleInsert() throws RecognitionException { + EObject current = null; + + Token otherlv_0=null; + Token lv_entityClass_2_0=null; + Token otherlv_3=null; + Token lv_name_4_0=null; + Token otherlv_5=null; + Token otherlv_7=null; + Enumerator lv_category_1_0 = null; + + EObject lv_parameters_6_0 = null; + + EObject lv_parameters_8_0 = null; + + + + enterRule(); + + try { + // InternalTqcl.g:424:2: ( (otherlv_0= 'insert' ( (lv_category_1_0= ruleCategory ) )? ( (lv_entityClass_2_0= RULE_ENTITY_CLASS ) ) otherlv_3= 'as' ( (lv_name_4_0= RULE_STRING ) ) (otherlv_5= 'with' ( (lv_parameters_6_0= ruleParameter ) ) (otherlv_7= ',' ( (lv_parameters_8_0= ruleParameter ) ) )* )? ) ) + // InternalTqcl.g:425:2: (otherlv_0= 'insert' ( (lv_category_1_0= ruleCategory ) )? ( (lv_entityClass_2_0= RULE_ENTITY_CLASS ) ) otherlv_3= 'as' ( (lv_name_4_0= RULE_STRING ) ) (otherlv_5= 'with' ( (lv_parameters_6_0= ruleParameter ) ) (otherlv_7= ',' ( (lv_parameters_8_0= ruleParameter ) ) )* )? ) + { + // InternalTqcl.g:425:2: (otherlv_0= 'insert' ( (lv_category_1_0= ruleCategory ) )? ( (lv_entityClass_2_0= RULE_ENTITY_CLASS ) ) otherlv_3= 'as' ( (lv_name_4_0= RULE_STRING ) ) (otherlv_5= 'with' ( (lv_parameters_6_0= ruleParameter ) ) (otherlv_7= ',' ( (lv_parameters_8_0= ruleParameter ) ) )* )? ) + // InternalTqcl.g:426:3: otherlv_0= 'insert' ( (lv_category_1_0= ruleCategory ) )? ( (lv_entityClass_2_0= RULE_ENTITY_CLASS ) ) otherlv_3= 'as' ( (lv_name_4_0= RULE_STRING ) ) (otherlv_5= 'with' ( (lv_parameters_6_0= ruleParameter ) ) (otherlv_7= ',' ( (lv_parameters_8_0= ruleParameter ) ) )* )? + { + otherlv_0=(Token)match(input,16,FOLLOW_9); + + newLeafNode(otherlv_0, grammarAccess.getInsertAccess().getInsertKeyword_0()); + + // InternalTqcl.g:430:3: ( (lv_category_1_0= ruleCategory ) )? + int alt7=2; + int LA7_0 = input.LA(1); + + if ( ((LA7_0>=29 && LA7_0<=32)) ) { + alt7=1; + } + switch (alt7) { + case 1 : + // InternalTqcl.g:431:4: (lv_category_1_0= ruleCategory ) + { + // InternalTqcl.g:431:4: (lv_category_1_0= ruleCategory ) + // InternalTqcl.g:432:5: lv_category_1_0= ruleCategory + { + + newCompositeNode(grammarAccess.getInsertAccess().getCategoryCategoryEnumRuleCall_1_0()); + + pushFollow(FOLLOW_10); + lv_category_1_0=ruleCategory(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getInsertRule()); + } + set( + current, + "category", + lv_category_1_0, + "org.eclipse.triquetrum.commands.Tqcl.Category"); + afterParserOrEnumRuleCall(); + + + } + + + } + break; + + } + + // InternalTqcl.g:449:3: ( (lv_entityClass_2_0= RULE_ENTITY_CLASS ) ) + // InternalTqcl.g:450:4: (lv_entityClass_2_0= RULE_ENTITY_CLASS ) + { + // InternalTqcl.g:450:4: (lv_entityClass_2_0= RULE_ENTITY_CLASS ) + // InternalTqcl.g:451:5: lv_entityClass_2_0= RULE_ENTITY_CLASS + { + lv_entityClass_2_0=(Token)match(input,RULE_ENTITY_CLASS,FOLLOW_11); + + newLeafNode(lv_entityClass_2_0, grammarAccess.getInsertAccess().getEntityClassENTITY_CLASSTerminalRuleCall_2_0()); + + + if (current==null) { + current = createModelElement(grammarAccess.getInsertRule()); + } + setWithLastConsumed( + current, + "entityClass", + lv_entityClass_2_0, + "org.eclipse.triquetrum.commands.Tqcl.ENTITY_CLASS"); + + + } + + + } + + otherlv_3=(Token)match(input,17,FOLLOW_7); + + newLeafNode(otherlv_3, grammarAccess.getInsertAccess().getAsKeyword_3()); + + // InternalTqcl.g:471:3: ( (lv_name_4_0= RULE_STRING ) ) + // InternalTqcl.g:472:4: (lv_name_4_0= RULE_STRING ) + { + // InternalTqcl.g:472:4: (lv_name_4_0= RULE_STRING ) + // InternalTqcl.g:473:5: lv_name_4_0= RULE_STRING + { + lv_name_4_0=(Token)match(input,RULE_STRING,FOLLOW_12); + + newLeafNode(lv_name_4_0, grammarAccess.getInsertAccess().getNameSTRINGTerminalRuleCall_4_0()); + + + if (current==null) { + current = createModelElement(grammarAccess.getInsertRule()); + } + setWithLastConsumed( + current, + "name", + lv_name_4_0, + "org.eclipse.xtext.common.Terminals.STRING"); + + + } + + + } + + // InternalTqcl.g:489:3: (otherlv_5= 'with' ( (lv_parameters_6_0= ruleParameter ) ) (otherlv_7= ',' ( (lv_parameters_8_0= ruleParameter ) ) )* )? + int alt9=2; + int LA9_0 = input.LA(1); + + if ( (LA9_0==18) ) { + alt9=1; + } + switch (alt9) { + case 1 : + // InternalTqcl.g:490:4: otherlv_5= 'with' ( (lv_parameters_6_0= ruleParameter ) ) (otherlv_7= ',' ( (lv_parameters_8_0= ruleParameter ) ) )* + { + otherlv_5=(Token)match(input,18,FOLLOW_13); + + newLeafNode(otherlv_5, grammarAccess.getInsertAccess().getWithKeyword_5_0()); + + // InternalTqcl.g:494:4: ( (lv_parameters_6_0= ruleParameter ) ) + // InternalTqcl.g:495:5: (lv_parameters_6_0= ruleParameter ) + { + // InternalTqcl.g:495:5: (lv_parameters_6_0= ruleParameter ) + // InternalTqcl.g:496:6: lv_parameters_6_0= ruleParameter + { + + newCompositeNode(grammarAccess.getInsertAccess().getParametersParameterParserRuleCall_5_1_0()); + + pushFollow(FOLLOW_14); + lv_parameters_6_0=ruleParameter(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getInsertRule()); + } + add( + current, + "parameters", + lv_parameters_6_0, + "org.eclipse.triquetrum.commands.Tqcl.Parameter"); + afterParserOrEnumRuleCall(); + + + } + + + } + + // InternalTqcl.g:513:4: (otherlv_7= ',' ( (lv_parameters_8_0= ruleParameter ) ) )* + loop8: + do { + int alt8=2; + int LA8_0 = input.LA(1); + + if ( (LA8_0==19) ) { + alt8=1; + } + + + switch (alt8) { + case 1 : + // InternalTqcl.g:514:5: otherlv_7= ',' ( (lv_parameters_8_0= ruleParameter ) ) + { + otherlv_7=(Token)match(input,19,FOLLOW_13); + + newLeafNode(otherlv_7, grammarAccess.getInsertAccess().getCommaKeyword_5_2_0()); + + // InternalTqcl.g:518:5: ( (lv_parameters_8_0= ruleParameter ) ) + // InternalTqcl.g:519:6: (lv_parameters_8_0= ruleParameter ) + { + // InternalTqcl.g:519:6: (lv_parameters_8_0= ruleParameter ) + // InternalTqcl.g:520:7: lv_parameters_8_0= ruleParameter + { + + newCompositeNode(grammarAccess.getInsertAccess().getParametersParameterParserRuleCall_5_2_1_0()); + + pushFollow(FOLLOW_14); + lv_parameters_8_0=ruleParameter(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getInsertRule()); + } + add( + current, + "parameters", + lv_parameters_8_0, + "org.eclipse.triquetrum.commands.Tqcl.Parameter"); + afterParserOrEnumRuleCall(); + + + } + + + } + + + } + break; + + default : + break loop8; + } + } while (true); + + + } + break; + + } + + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleInsert" + + + // $ANTLR start "entryRuleSet" + // InternalTqcl.g:543:1: entryRuleSet returns [EObject current=null] : iv_ruleSet= ruleSet EOF ; + public final EObject entryRuleSet() throws RecognitionException { + EObject current = null; + + EObject iv_ruleSet = null; + + + try { + // InternalTqcl.g:543:44: (iv_ruleSet= ruleSet EOF ) + // InternalTqcl.g:544:2: iv_ruleSet= ruleSet EOF + { + newCompositeNode(grammarAccess.getSetRule()); + pushFollow(FOLLOW_1); + iv_ruleSet=ruleSet(); + + state._fsp--; + + current =iv_ruleSet; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleSet" + + + // $ANTLR start "ruleSet" + // InternalTqcl.g:550:1: ruleSet returns [EObject current=null] : (otherlv_0= 'set' ( (lv_param_1_0= ruleParameter ) ) ) ; + public final EObject ruleSet() throws RecognitionException { + EObject current = null; + + Token otherlv_0=null; + EObject lv_param_1_0 = null; + + + + enterRule(); + + try { + // InternalTqcl.g:556:2: ( (otherlv_0= 'set' ( (lv_param_1_0= ruleParameter ) ) ) ) + // InternalTqcl.g:557:2: (otherlv_0= 'set' ( (lv_param_1_0= ruleParameter ) ) ) + { + // InternalTqcl.g:557:2: (otherlv_0= 'set' ( (lv_param_1_0= ruleParameter ) ) ) + // InternalTqcl.g:558:3: otherlv_0= 'set' ( (lv_param_1_0= ruleParameter ) ) + { + otherlv_0=(Token)match(input,20,FOLLOW_13); + + newLeafNode(otherlv_0, grammarAccess.getSetAccess().getSetKeyword_0()); + + // InternalTqcl.g:562:3: ( (lv_param_1_0= ruleParameter ) ) + // InternalTqcl.g:563:4: (lv_param_1_0= ruleParameter ) + { + // InternalTqcl.g:563:4: (lv_param_1_0= ruleParameter ) + // InternalTqcl.g:564:5: lv_param_1_0= ruleParameter + { + + newCompositeNode(grammarAccess.getSetAccess().getParamParameterParserRuleCall_1_0()); + + pushFollow(FOLLOW_2); + lv_param_1_0=ruleParameter(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getSetRule()); + } + set( + current, + "param", + lv_param_1_0, + "org.eclipse.triquetrum.commands.Tqcl.Parameter"); + afterParserOrEnumRuleCall(); + + + } + + + } + + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleSet" + + + // $ANTLR start "entryRuleConnect" + // InternalTqcl.g:585:1: entryRuleConnect returns [EObject current=null] : iv_ruleConnect= ruleConnect EOF ; + public final EObject entryRuleConnect() throws RecognitionException { + EObject current = null; + + EObject iv_ruleConnect = null; + + + try { + // InternalTqcl.g:585:48: (iv_ruleConnect= ruleConnect EOF ) + // InternalTqcl.g:586:2: iv_ruleConnect= ruleConnect EOF + { + newCompositeNode(grammarAccess.getConnectRule()); + pushFollow(FOLLOW_1); + iv_ruleConnect=ruleConnect(); + + state._fsp--; + + current =iv_ruleConnect; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleConnect" + + + // $ANTLR start "ruleConnect" + // InternalTqcl.g:592:1: ruleConnect returns [EObject current=null] : (otherlv_0= 'connect' ( (lv_from_1_0= ruleConnectionPort ) ) (otherlv_2= ',' ( (lv_from_3_0= ruleConnectionPort ) ) )* otherlv_4= 'to' ( (lv_to_5_0= ruleConnectionPort ) ) (otherlv_6= ',' ( (lv_to_7_0= ruleConnectionPort ) ) )* ) ; + public final EObject ruleConnect() throws RecognitionException { + EObject current = null; + + Token otherlv_0=null; + Token otherlv_2=null; + Token otherlv_4=null; + Token otherlv_6=null; + EObject lv_from_1_0 = null; + + EObject lv_from_3_0 = null; + + EObject lv_to_5_0 = null; + + EObject lv_to_7_0 = null; + + + + enterRule(); + + try { + // InternalTqcl.g:598:2: ( (otherlv_0= 'connect' ( (lv_from_1_0= ruleConnectionPort ) ) (otherlv_2= ',' ( (lv_from_3_0= ruleConnectionPort ) ) )* otherlv_4= 'to' ( (lv_to_5_0= ruleConnectionPort ) ) (otherlv_6= ',' ( (lv_to_7_0= ruleConnectionPort ) ) )* ) ) + // InternalTqcl.g:599:2: (otherlv_0= 'connect' ( (lv_from_1_0= ruleConnectionPort ) ) (otherlv_2= ',' ( (lv_from_3_0= ruleConnectionPort ) ) )* otherlv_4= 'to' ( (lv_to_5_0= ruleConnectionPort ) ) (otherlv_6= ',' ( (lv_to_7_0= ruleConnectionPort ) ) )* ) + { + // InternalTqcl.g:599:2: (otherlv_0= 'connect' ( (lv_from_1_0= ruleConnectionPort ) ) (otherlv_2= ',' ( (lv_from_3_0= ruleConnectionPort ) ) )* otherlv_4= 'to' ( (lv_to_5_0= ruleConnectionPort ) ) (otherlv_6= ',' ( (lv_to_7_0= ruleConnectionPort ) ) )* ) + // InternalTqcl.g:600:3: otherlv_0= 'connect' ( (lv_from_1_0= ruleConnectionPort ) ) (otherlv_2= ',' ( (lv_from_3_0= ruleConnectionPort ) ) )* otherlv_4= 'to' ( (lv_to_5_0= ruleConnectionPort ) ) (otherlv_6= ',' ( (lv_to_7_0= ruleConnectionPort ) ) )* + { + otherlv_0=(Token)match(input,21,FOLLOW_8); + + newLeafNode(otherlv_0, grammarAccess.getConnectAccess().getConnectKeyword_0()); + + // InternalTqcl.g:604:3: ( (lv_from_1_0= ruleConnectionPort ) ) + // InternalTqcl.g:605:4: (lv_from_1_0= ruleConnectionPort ) + { + // InternalTqcl.g:605:4: (lv_from_1_0= ruleConnectionPort ) + // InternalTqcl.g:606:5: lv_from_1_0= ruleConnectionPort + { + + newCompositeNode(grammarAccess.getConnectAccess().getFromConnectionPortParserRuleCall_1_0()); + + pushFollow(FOLLOW_15); + lv_from_1_0=ruleConnectionPort(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getConnectRule()); + } + add( + current, + "from", + lv_from_1_0, + "org.eclipse.triquetrum.commands.Tqcl.ConnectionPort"); + afterParserOrEnumRuleCall(); + + + } + + + } + + // InternalTqcl.g:623:3: (otherlv_2= ',' ( (lv_from_3_0= ruleConnectionPort ) ) )* + loop10: + do { + int alt10=2; + int LA10_0 = input.LA(1); + + if ( (LA10_0==19) ) { + alt10=1; + } + + + switch (alt10) { + case 1 : + // InternalTqcl.g:624:4: otherlv_2= ',' ( (lv_from_3_0= ruleConnectionPort ) ) + { + otherlv_2=(Token)match(input,19,FOLLOW_8); + + newLeafNode(otherlv_2, grammarAccess.getConnectAccess().getCommaKeyword_2_0()); + + // InternalTqcl.g:628:4: ( (lv_from_3_0= ruleConnectionPort ) ) + // InternalTqcl.g:629:5: (lv_from_3_0= ruleConnectionPort ) + { + // InternalTqcl.g:629:5: (lv_from_3_0= ruleConnectionPort ) + // InternalTqcl.g:630:6: lv_from_3_0= ruleConnectionPort + { + + newCompositeNode(grammarAccess.getConnectAccess().getFromConnectionPortParserRuleCall_2_1_0()); + + pushFollow(FOLLOW_15); + lv_from_3_0=ruleConnectionPort(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getConnectRule()); + } + add( + current, + "from", + lv_from_3_0, + "org.eclipse.triquetrum.commands.Tqcl.ConnectionPort"); + afterParserOrEnumRuleCall(); + + + } + + + } + + + } + break; + + default : + break loop10; + } + } while (true); + + otherlv_4=(Token)match(input,22,FOLLOW_8); + + newLeafNode(otherlv_4, grammarAccess.getConnectAccess().getToKeyword_3()); + + // InternalTqcl.g:652:3: ( (lv_to_5_0= ruleConnectionPort ) ) + // InternalTqcl.g:653:4: (lv_to_5_0= ruleConnectionPort ) + { + // InternalTqcl.g:653:4: (lv_to_5_0= ruleConnectionPort ) + // InternalTqcl.g:654:5: lv_to_5_0= ruleConnectionPort + { + + newCompositeNode(grammarAccess.getConnectAccess().getToConnectionPortParserRuleCall_4_0()); + + pushFollow(FOLLOW_14); + lv_to_5_0=ruleConnectionPort(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getConnectRule()); + } + add( + current, + "to", + lv_to_5_0, + "org.eclipse.triquetrum.commands.Tqcl.ConnectionPort"); + afterParserOrEnumRuleCall(); + + + } + + + } + + // InternalTqcl.g:671:3: (otherlv_6= ',' ( (lv_to_7_0= ruleConnectionPort ) ) )* + loop11: + do { + int alt11=2; + int LA11_0 = input.LA(1); + + if ( (LA11_0==19) ) { + alt11=1; + } + + + switch (alt11) { + case 1 : + // InternalTqcl.g:672:4: otherlv_6= ',' ( (lv_to_7_0= ruleConnectionPort ) ) + { + otherlv_6=(Token)match(input,19,FOLLOW_8); + + newLeafNode(otherlv_6, grammarAccess.getConnectAccess().getCommaKeyword_5_0()); + + // InternalTqcl.g:676:4: ( (lv_to_7_0= ruleConnectionPort ) ) + // InternalTqcl.g:677:5: (lv_to_7_0= ruleConnectionPort ) + { + // InternalTqcl.g:677:5: (lv_to_7_0= ruleConnectionPort ) + // InternalTqcl.g:678:6: lv_to_7_0= ruleConnectionPort + { + + newCompositeNode(grammarAccess.getConnectAccess().getToConnectionPortParserRuleCall_5_1_0()); + + pushFollow(FOLLOW_14); + lv_to_7_0=ruleConnectionPort(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getConnectRule()); + } + add( + current, + "to", + lv_to_7_0, + "org.eclipse.triquetrum.commands.Tqcl.ConnectionPort"); + afterParserOrEnumRuleCall(); + + + } + + + } + + + } + break; + + default : + break loop11; + } + } while (true); + + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleConnect" + + + // $ANTLR start "entryRuleConnectionPort" + // InternalTqcl.g:700:1: entryRuleConnectionPort returns [EObject current=null] : iv_ruleConnectionPort= ruleConnectionPort EOF ; + public final EObject entryRuleConnectionPort() throws RecognitionException { + EObject current = null; + + EObject iv_ruleConnectionPort = null; + + + try { + // InternalTqcl.g:700:55: (iv_ruleConnectionPort= ruleConnectionPort EOF ) + // InternalTqcl.g:701:2: iv_ruleConnectionPort= ruleConnectionPort EOF + { + newCompositeNode(grammarAccess.getConnectionPortRule()); + pushFollow(FOLLOW_1); + iv_ruleConnectionPort=ruleConnectionPort(); + + state._fsp--; + + current =iv_ruleConnectionPort; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleConnectionPort" + + + // $ANTLR start "ruleConnectionPort" + // InternalTqcl.g:707:1: ruleConnectionPort returns [EObject current=null] : ( ( (otherlv_0= RULE_ID ) ) otherlv_1= '.' ( (lv_port_2_0= ruleNamedObj ) ) ) ; + public final EObject ruleConnectionPort() throws RecognitionException { + EObject current = null; + + Token otherlv_0=null; + Token otherlv_1=null; + AntlrDatatypeRuleToken lv_port_2_0 = null; + + + + enterRule(); + + try { + // InternalTqcl.g:713:2: ( ( ( (otherlv_0= RULE_ID ) ) otherlv_1= '.' ( (lv_port_2_0= ruleNamedObj ) ) ) ) + // InternalTqcl.g:714:2: ( ( (otherlv_0= RULE_ID ) ) otherlv_1= '.' ( (lv_port_2_0= ruleNamedObj ) ) ) + { + // InternalTqcl.g:714:2: ( ( (otherlv_0= RULE_ID ) ) otherlv_1= '.' ( (lv_port_2_0= ruleNamedObj ) ) ) + // InternalTqcl.g:715:3: ( (otherlv_0= RULE_ID ) ) otherlv_1= '.' ( (lv_port_2_0= ruleNamedObj ) ) + { + // InternalTqcl.g:715:3: ( (otherlv_0= RULE_ID ) ) + // InternalTqcl.g:716:4: (otherlv_0= RULE_ID ) + { + // InternalTqcl.g:716:4: (otherlv_0= RULE_ID ) + // InternalTqcl.g:717:5: otherlv_0= RULE_ID + { + + if (current==null) { + current = createModelElement(grammarAccess.getConnectionPortRule()); + } + + otherlv_0=(Token)match(input,RULE_ID,FOLLOW_16); + + newLeafNode(otherlv_0, grammarAccess.getConnectionPortAccess().getActorInsertCrossReference_0_0()); + + + } + + + } + + otherlv_1=(Token)match(input,23,FOLLOW_17); + + newLeafNode(otherlv_1, grammarAccess.getConnectionPortAccess().getFullStopKeyword_1()); + + // InternalTqcl.g:732:3: ( (lv_port_2_0= ruleNamedObj ) ) + // InternalTqcl.g:733:4: (lv_port_2_0= ruleNamedObj ) + { + // InternalTqcl.g:733:4: (lv_port_2_0= ruleNamedObj ) + // InternalTqcl.g:734:5: lv_port_2_0= ruleNamedObj + { + + newCompositeNode(grammarAccess.getConnectionPortAccess().getPortNamedObjParserRuleCall_2_0()); + + pushFollow(FOLLOW_2); + lv_port_2_0=ruleNamedObj(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getConnectionPortRule()); + } + set( + current, + "port", + lv_port_2_0, + "org.eclipse.triquetrum.commands.Tqcl.NamedObj"); + afterParserOrEnumRuleCall(); + + + } + + + } + + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleConnectionPort" + + + // $ANTLR start "entryRuleGoInto" + // InternalTqcl.g:755:1: entryRuleGoInto returns [EObject current=null] : iv_ruleGoInto= ruleGoInto EOF ; + public final EObject entryRuleGoInto() throws RecognitionException { + EObject current = null; + + EObject iv_ruleGoInto = null; + + + try { + // InternalTqcl.g:755:47: (iv_ruleGoInto= ruleGoInto EOF ) + // InternalTqcl.g:756:2: iv_ruleGoInto= ruleGoInto EOF + { + newCompositeNode(grammarAccess.getGoIntoRule()); + pushFollow(FOLLOW_1); + iv_ruleGoInto=ruleGoInto(); + + state._fsp--; + + current =iv_ruleGoInto; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleGoInto" + + + // $ANTLR start "ruleGoInto" + // InternalTqcl.g:762:1: ruleGoInto returns [EObject current=null] : (otherlv_0= 'go' ( (lv_direction_1_0= 'into' ) ) ( (otherlv_2= RULE_ID ) ) ) ; + public final EObject ruleGoInto() throws RecognitionException { + EObject current = null; + + Token otherlv_0=null; + Token lv_direction_1_0=null; + Token otherlv_2=null; + + + enterRule(); + + try { + // InternalTqcl.g:768:2: ( (otherlv_0= 'go' ( (lv_direction_1_0= 'into' ) ) ( (otherlv_2= RULE_ID ) ) ) ) + // InternalTqcl.g:769:2: (otherlv_0= 'go' ( (lv_direction_1_0= 'into' ) ) ( (otherlv_2= RULE_ID ) ) ) + { + // InternalTqcl.g:769:2: (otherlv_0= 'go' ( (lv_direction_1_0= 'into' ) ) ( (otherlv_2= RULE_ID ) ) ) + // InternalTqcl.g:770:3: otherlv_0= 'go' ( (lv_direction_1_0= 'into' ) ) ( (otherlv_2= RULE_ID ) ) + { + otherlv_0=(Token)match(input,24,FOLLOW_18); + + newLeafNode(otherlv_0, grammarAccess.getGoIntoAccess().getGoKeyword_0()); + + // InternalTqcl.g:774:3: ( (lv_direction_1_0= 'into' ) ) + // InternalTqcl.g:775:4: (lv_direction_1_0= 'into' ) + { + // InternalTqcl.g:775:4: (lv_direction_1_0= 'into' ) + // InternalTqcl.g:776:5: lv_direction_1_0= 'into' + { + lv_direction_1_0=(Token)match(input,25,FOLLOW_8); + + newLeafNode(lv_direction_1_0, grammarAccess.getGoIntoAccess().getDirectionIntoKeyword_1_0()); + + + if (current==null) { + current = createModelElement(grammarAccess.getGoIntoRule()); + } + setWithLastConsumed(current, "direction", lv_direction_1_0, "into"); + + + } + + + } + + // InternalTqcl.g:788:3: ( (otherlv_2= RULE_ID ) ) + // InternalTqcl.g:789:4: (otherlv_2= RULE_ID ) + { + // InternalTqcl.g:789:4: (otherlv_2= RULE_ID ) + // InternalTqcl.g:790:5: otherlv_2= RULE_ID + { + + if (current==null) { + current = createModelElement(grammarAccess.getGoIntoRule()); + } + + otherlv_2=(Token)match(input,RULE_ID,FOLLOW_2); + + newLeafNode(otherlv_2, grammarAccess.getGoIntoAccess().getActorInsertCrossReference_2_0()); + + + } + + + } + + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleGoInto" + + + // $ANTLR start "entryRuleGoOut" + // InternalTqcl.g:805:1: entryRuleGoOut returns [EObject current=null] : iv_ruleGoOut= ruleGoOut EOF ; + public final EObject entryRuleGoOut() throws RecognitionException { + EObject current = null; + + EObject iv_ruleGoOut = null; + + + try { + // InternalTqcl.g:805:46: (iv_ruleGoOut= ruleGoOut EOF ) + // InternalTqcl.g:806:2: iv_ruleGoOut= ruleGoOut EOF + { + newCompositeNode(grammarAccess.getGoOutRule()); + pushFollow(FOLLOW_1); + iv_ruleGoOut=ruleGoOut(); + + state._fsp--; + + current =iv_ruleGoOut; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleGoOut" + + + // $ANTLR start "ruleGoOut" + // InternalTqcl.g:812:1: ruleGoOut returns [EObject current=null] : (otherlv_0= 'go' ( (lv_direction_1_0= 'out' ) ) ) ; + public final EObject ruleGoOut() throws RecognitionException { + EObject current = null; + + Token otherlv_0=null; + Token lv_direction_1_0=null; + + + enterRule(); + + try { + // InternalTqcl.g:818:2: ( (otherlv_0= 'go' ( (lv_direction_1_0= 'out' ) ) ) ) + // InternalTqcl.g:819:2: (otherlv_0= 'go' ( (lv_direction_1_0= 'out' ) ) ) + { + // InternalTqcl.g:819:2: (otherlv_0= 'go' ( (lv_direction_1_0= 'out' ) ) ) + // InternalTqcl.g:820:3: otherlv_0= 'go' ( (lv_direction_1_0= 'out' ) ) + { + otherlv_0=(Token)match(input,24,FOLLOW_19); + + newLeafNode(otherlv_0, grammarAccess.getGoOutAccess().getGoKeyword_0()); + + // InternalTqcl.g:824:3: ( (lv_direction_1_0= 'out' ) ) + // InternalTqcl.g:825:4: (lv_direction_1_0= 'out' ) + { + // InternalTqcl.g:825:4: (lv_direction_1_0= 'out' ) + // InternalTqcl.g:826:5: lv_direction_1_0= 'out' + { + lv_direction_1_0=(Token)match(input,26,FOLLOW_2); + + newLeafNode(lv_direction_1_0, grammarAccess.getGoOutAccess().getDirectionOutKeyword_1_0()); + + + if (current==null) { + current = createModelElement(grammarAccess.getGoOutRule()); + } + setWithLastConsumed(current, "direction", lv_direction_1_0, "out"); + + + } + + + } + + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleGoOut" + + + // $ANTLR start "entryRuleGoTop" + // InternalTqcl.g:842:1: entryRuleGoTop returns [EObject current=null] : iv_ruleGoTop= ruleGoTop EOF ; + public final EObject entryRuleGoTop() throws RecognitionException { + EObject current = null; + + EObject iv_ruleGoTop = null; + + + try { + // InternalTqcl.g:842:46: (iv_ruleGoTop= ruleGoTop EOF ) + // InternalTqcl.g:843:2: iv_ruleGoTop= ruleGoTop EOF + { + newCompositeNode(grammarAccess.getGoTopRule()); + pushFollow(FOLLOW_1); + iv_ruleGoTop=ruleGoTop(); + + state._fsp--; + + current =iv_ruleGoTop; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleGoTop" + + + // $ANTLR start "ruleGoTop" + // InternalTqcl.g:849:1: ruleGoTop returns [EObject current=null] : (otherlv_0= 'go' ( (lv_direction_1_0= 'top' ) ) ) ; + public final EObject ruleGoTop() throws RecognitionException { + EObject current = null; + + Token otherlv_0=null; + Token lv_direction_1_0=null; + + + enterRule(); + + try { + // InternalTqcl.g:855:2: ( (otherlv_0= 'go' ( (lv_direction_1_0= 'top' ) ) ) ) + // InternalTqcl.g:856:2: (otherlv_0= 'go' ( (lv_direction_1_0= 'top' ) ) ) + { + // InternalTqcl.g:856:2: (otherlv_0= 'go' ( (lv_direction_1_0= 'top' ) ) ) + // InternalTqcl.g:857:3: otherlv_0= 'go' ( (lv_direction_1_0= 'top' ) ) + { + otherlv_0=(Token)match(input,24,FOLLOW_20); + + newLeafNode(otherlv_0, grammarAccess.getGoTopAccess().getGoKeyword_0()); + + // InternalTqcl.g:861:3: ( (lv_direction_1_0= 'top' ) ) + // InternalTqcl.g:862:4: (lv_direction_1_0= 'top' ) + { + // InternalTqcl.g:862:4: (lv_direction_1_0= 'top' ) + // InternalTqcl.g:863:5: lv_direction_1_0= 'top' + { + lv_direction_1_0=(Token)match(input,27,FOLLOW_2); + + newLeafNode(lv_direction_1_0, grammarAccess.getGoTopAccess().getDirectionTopKeyword_1_0()); + + + if (current==null) { + current = createModelElement(grammarAccess.getGoTopRule()); + } + setWithLastConsumed(current, "direction", lv_direction_1_0, "top"); + + + } + + + } + + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleGoTop" + + + // $ANTLR start "entryRuleParameter" + // InternalTqcl.g:879:1: entryRuleParameter returns [EObject current=null] : iv_ruleParameter= ruleParameter EOF ; + public final EObject entryRuleParameter() throws RecognitionException { + EObject current = null; + + EObject iv_ruleParameter = null; + + + try { + // InternalTqcl.g:879:50: (iv_ruleParameter= ruleParameter EOF ) + // InternalTqcl.g:880:2: iv_ruleParameter= ruleParameter EOF + { + newCompositeNode(grammarAccess.getParameterRule()); + pushFollow(FOLLOW_1); + iv_ruleParameter=ruleParameter(); + + state._fsp--; + + current =iv_ruleParameter; + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleParameter" + + + // $ANTLR start "ruleParameter" + // InternalTqcl.g:886:1: ruleParameter returns [EObject current=null] : ( ( (lv_id_0_0= ruleParameter_id ) ) otherlv_1= '=' ( (lv_value_2_0= RULE_STRING ) ) ) ; + public final EObject ruleParameter() throws RecognitionException { + EObject current = null; + + Token otherlv_1=null; + Token lv_value_2_0=null; + AntlrDatatypeRuleToken lv_id_0_0 = null; + + + + enterRule(); + + try { + // InternalTqcl.g:892:2: ( ( ( (lv_id_0_0= ruleParameter_id ) ) otherlv_1= '=' ( (lv_value_2_0= RULE_STRING ) ) ) ) + // InternalTqcl.g:893:2: ( ( (lv_id_0_0= ruleParameter_id ) ) otherlv_1= '=' ( (lv_value_2_0= RULE_STRING ) ) ) + { + // InternalTqcl.g:893:2: ( ( (lv_id_0_0= ruleParameter_id ) ) otherlv_1= '=' ( (lv_value_2_0= RULE_STRING ) ) ) + // InternalTqcl.g:894:3: ( (lv_id_0_0= ruleParameter_id ) ) otherlv_1= '=' ( (lv_value_2_0= RULE_STRING ) ) + { + // InternalTqcl.g:894:3: ( (lv_id_0_0= ruleParameter_id ) ) + // InternalTqcl.g:895:4: (lv_id_0_0= ruleParameter_id ) + { + // InternalTqcl.g:895:4: (lv_id_0_0= ruleParameter_id ) + // InternalTqcl.g:896:5: lv_id_0_0= ruleParameter_id + { + + newCompositeNode(grammarAccess.getParameterAccess().getIdParameter_idParserRuleCall_0_0()); + + pushFollow(FOLLOW_21); + lv_id_0_0=ruleParameter_id(); + + state._fsp--; + + + if (current==null) { + current = createModelElementForParent(grammarAccess.getParameterRule()); + } + set( + current, + "id", + lv_id_0_0, + "org.eclipse.triquetrum.commands.Tqcl.Parameter_id"); + afterParserOrEnumRuleCall(); + + + } + + + } + + otherlv_1=(Token)match(input,28,FOLLOW_7); + + newLeafNode(otherlv_1, grammarAccess.getParameterAccess().getEqualsSignKeyword_1()); + + // InternalTqcl.g:917:3: ( (lv_value_2_0= RULE_STRING ) ) + // InternalTqcl.g:918:4: (lv_value_2_0= RULE_STRING ) + { + // InternalTqcl.g:918:4: (lv_value_2_0= RULE_STRING ) + // InternalTqcl.g:919:5: lv_value_2_0= RULE_STRING + { + lv_value_2_0=(Token)match(input,RULE_STRING,FOLLOW_2); + + newLeafNode(lv_value_2_0, grammarAccess.getParameterAccess().getValueSTRINGTerminalRuleCall_2_0()); + + + if (current==null) { + current = createModelElement(grammarAccess.getParameterRule()); + } + setWithLastConsumed( + current, + "value", + lv_value_2_0, + "org.eclipse.xtext.common.Terminals.STRING"); + + + } + + + } + + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleParameter" + + + // $ANTLR start "entryRuleParameter_id" + // InternalTqcl.g:939:1: entryRuleParameter_id returns [String current=null] : iv_ruleParameter_id= ruleParameter_id EOF ; + public final String entryRuleParameter_id() throws RecognitionException { + String current = null; + + AntlrDatatypeRuleToken iv_ruleParameter_id = null; + + + try { + // InternalTqcl.g:939:52: (iv_ruleParameter_id= ruleParameter_id EOF ) + // InternalTqcl.g:940:2: iv_ruleParameter_id= ruleParameter_id EOF + { + newCompositeNode(grammarAccess.getParameter_idRule()); + pushFollow(FOLLOW_1); + iv_ruleParameter_id=ruleParameter_id(); + + state._fsp--; + + current =iv_ruleParameter_id.getText(); + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleParameter_id" + + + // $ANTLR start "ruleParameter_id" + // InternalTqcl.g:946:1: ruleParameter_id returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_PARAMETER_NAME_0= RULE_PARAMETER_NAME | this_STRING_1= RULE_STRING ) ; + public final AntlrDatatypeRuleToken ruleParameter_id() throws RecognitionException { + AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken(); + + Token this_PARAMETER_NAME_0=null; + Token this_STRING_1=null; + + + enterRule(); + + try { + // InternalTqcl.g:952:2: ( (this_PARAMETER_NAME_0= RULE_PARAMETER_NAME | this_STRING_1= RULE_STRING ) ) + // InternalTqcl.g:953:2: (this_PARAMETER_NAME_0= RULE_PARAMETER_NAME | this_STRING_1= RULE_STRING ) + { + // InternalTqcl.g:953:2: (this_PARAMETER_NAME_0= RULE_PARAMETER_NAME | this_STRING_1= RULE_STRING ) + int alt12=2; + int LA12_0 = input.LA(1); + + if ( (LA12_0==RULE_PARAMETER_NAME) ) { + alt12=1; + } + else if ( (LA12_0==RULE_STRING) ) { + alt12=2; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 12, 0, input); + + throw nvae; + } + switch (alt12) { + case 1 : + // InternalTqcl.g:954:3: this_PARAMETER_NAME_0= RULE_PARAMETER_NAME + { + this_PARAMETER_NAME_0=(Token)match(input,RULE_PARAMETER_NAME,FOLLOW_2); + + current.merge(this_PARAMETER_NAME_0); + + + newLeafNode(this_PARAMETER_NAME_0, grammarAccess.getParameter_idAccess().getPARAMETER_NAMETerminalRuleCall_0()); + + + } + break; + case 2 : + // InternalTqcl.g:962:3: this_STRING_1= RULE_STRING + { + this_STRING_1=(Token)match(input,RULE_STRING,FOLLOW_2); + + current.merge(this_STRING_1); + + + newLeafNode(this_STRING_1, grammarAccess.getParameter_idAccess().getSTRINGTerminalRuleCall_1()); + + + } + break; + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleParameter_id" + + + // $ANTLR start "entryRuleNamedObj" + // InternalTqcl.g:973:1: entryRuleNamedObj returns [String current=null] : iv_ruleNamedObj= ruleNamedObj EOF ; + public final String entryRuleNamedObj() throws RecognitionException { + String current = null; + + AntlrDatatypeRuleToken iv_ruleNamedObj = null; + + + try { + // InternalTqcl.g:973:48: (iv_ruleNamedObj= ruleNamedObj EOF ) + // InternalTqcl.g:974:2: iv_ruleNamedObj= ruleNamedObj EOF + { + newCompositeNode(grammarAccess.getNamedObjRule()); + pushFollow(FOLLOW_1); + iv_ruleNamedObj=ruleNamedObj(); + + state._fsp--; + + current =iv_ruleNamedObj.getText(); + match(input,EOF,FOLLOW_2); + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleNamedObj" + + + // $ANTLR start "ruleNamedObj" + // InternalTqcl.g:980:1: ruleNamedObj returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_ID_0= RULE_ID | this_STRING_1= RULE_STRING ) ; + public final AntlrDatatypeRuleToken ruleNamedObj() throws RecognitionException { + AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken(); + + Token this_ID_0=null; + Token this_STRING_1=null; + + + enterRule(); + + try { + // InternalTqcl.g:986:2: ( (this_ID_0= RULE_ID | this_STRING_1= RULE_STRING ) ) + // InternalTqcl.g:987:2: (this_ID_0= RULE_ID | this_STRING_1= RULE_STRING ) + { + // InternalTqcl.g:987:2: (this_ID_0= RULE_ID | this_STRING_1= RULE_STRING ) + int alt13=2; + int LA13_0 = input.LA(1); + + if ( (LA13_0==RULE_ID) ) { + alt13=1; + } + else if ( (LA13_0==RULE_STRING) ) { + alt13=2; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 13, 0, input); + + throw nvae; + } + switch (alt13) { + case 1 : + // InternalTqcl.g:988:3: this_ID_0= RULE_ID + { + this_ID_0=(Token)match(input,RULE_ID,FOLLOW_2); + + current.merge(this_ID_0); + + + newLeafNode(this_ID_0, grammarAccess.getNamedObjAccess().getIDTerminalRuleCall_0()); + + + } + break; + case 2 : + // InternalTqcl.g:996:3: this_STRING_1= RULE_STRING + { + this_STRING_1=(Token)match(input,RULE_STRING,FOLLOW_2); + + current.merge(this_STRING_1); + + + newLeafNode(this_STRING_1, grammarAccess.getNamedObjAccess().getSTRINGTerminalRuleCall_1()); + + + } + break; + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleNamedObj" + + + // $ANTLR start "ruleCategory" + // InternalTqcl.g:1007:1: ruleCategory returns [Enumerator current=null] : ( (enumLiteral_0= 'actor' ) | (enumLiteral_1= 'parameter' ) | (enumLiteral_2= 'port' ) | (enumLiteral_3= 'director' ) ) ; + public final Enumerator ruleCategory() throws RecognitionException { + Enumerator current = null; + + Token enumLiteral_0=null; + Token enumLiteral_1=null; + Token enumLiteral_2=null; + Token enumLiteral_3=null; + + + enterRule(); + + try { + // InternalTqcl.g:1013:2: ( ( (enumLiteral_0= 'actor' ) | (enumLiteral_1= 'parameter' ) | (enumLiteral_2= 'port' ) | (enumLiteral_3= 'director' ) ) ) + // InternalTqcl.g:1014:2: ( (enumLiteral_0= 'actor' ) | (enumLiteral_1= 'parameter' ) | (enumLiteral_2= 'port' ) | (enumLiteral_3= 'director' ) ) + { + // InternalTqcl.g:1014:2: ( (enumLiteral_0= 'actor' ) | (enumLiteral_1= 'parameter' ) | (enumLiteral_2= 'port' ) | (enumLiteral_3= 'director' ) ) + int alt14=4; + switch ( input.LA(1) ) { + case 29: + { + alt14=1; + } + break; + case 30: + { + alt14=2; + } + break; + case 31: + { + alt14=3; + } + break; + case 32: + { + alt14=4; + } + break; + default: + NoViableAltException nvae = + new NoViableAltException("", 14, 0, input); + + throw nvae; + } + + switch (alt14) { + case 1 : + // InternalTqcl.g:1015:3: (enumLiteral_0= 'actor' ) + { + // InternalTqcl.g:1015:3: (enumLiteral_0= 'actor' ) + // InternalTqcl.g:1016:4: enumLiteral_0= 'actor' + { + enumLiteral_0=(Token)match(input,29,FOLLOW_2); + + current = grammarAccess.getCategoryAccess().getActorEnumLiteralDeclaration_0().getEnumLiteral().getInstance(); + newLeafNode(enumLiteral_0, grammarAccess.getCategoryAccess().getActorEnumLiteralDeclaration_0()); + + + } + + + } + break; + case 2 : + // InternalTqcl.g:1023:3: (enumLiteral_1= 'parameter' ) + { + // InternalTqcl.g:1023:3: (enumLiteral_1= 'parameter' ) + // InternalTqcl.g:1024:4: enumLiteral_1= 'parameter' + { + enumLiteral_1=(Token)match(input,30,FOLLOW_2); + + current = grammarAccess.getCategoryAccess().getParameterEnumLiteralDeclaration_1().getEnumLiteral().getInstance(); + newLeafNode(enumLiteral_1, grammarAccess.getCategoryAccess().getParameterEnumLiteralDeclaration_1()); + + + } + + + } + break; + case 3 : + // InternalTqcl.g:1031:3: (enumLiteral_2= 'port' ) + { + // InternalTqcl.g:1031:3: (enumLiteral_2= 'port' ) + // InternalTqcl.g:1032:4: enumLiteral_2= 'port' + { + enumLiteral_2=(Token)match(input,31,FOLLOW_2); + + current = grammarAccess.getCategoryAccess().getPortEnumLiteralDeclaration_2().getEnumLiteral().getInstance(); + newLeafNode(enumLiteral_2, grammarAccess.getCategoryAccess().getPortEnumLiteralDeclaration_2()); + + + } + + + } + break; + case 4 : + // InternalTqcl.g:1039:3: (enumLiteral_3= 'director' ) + { + // InternalTqcl.g:1039:3: (enumLiteral_3= 'director' ) + // InternalTqcl.g:1040:4: enumLiteral_3= 'director' + { + enumLiteral_3=(Token)match(input,32,FOLLOW_2); + + current = grammarAccess.getCategoryAccess().getDirectorEnumLiteralDeclaration_3().getEnumLiteral().getInstance(); + newLeafNode(enumLiteral_3, grammarAccess.getCategoryAccess().getDirectorEnumLiteralDeclaration_3()); + + + } + + + } + break; + + } + + + } + + + leaveRule(); + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleCategory" + + // Delegated rules + + + + + public static final BitSet FOLLOW_1 = new BitSet(new long[]{0x0000000000000000L}); + public static final BitSet FOLLOW_2 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_3 = new BitSet(new long[]{0x000000000131C002L}); + public static final BitSet FOLLOW_4 = new BitSet(new long[]{0x0000000001314002L}); + public static final BitSet FOLLOW_5 = new BitSet(new long[]{0x0000000001314000L}); + public static final BitSet FOLLOW_6 = new BitSet(new long[]{0x0000000000002000L}); + public static final BitSet FOLLOW_7 = new BitSet(new long[]{0x0000000000000010L}); + public static final BitSet FOLLOW_8 = new BitSet(new long[]{0x0000000000000020L}); + public static final BitSet FOLLOW_9 = new BitSet(new long[]{0x00000001E0000040L}); + public static final BitSet FOLLOW_10 = new BitSet(new long[]{0x0000000000000040L}); + public static final BitSet FOLLOW_11 = new BitSet(new long[]{0x0000000000020000L}); + public static final BitSet FOLLOW_12 = new BitSet(new long[]{0x0000000000040002L}); + public static final BitSet FOLLOW_13 = new BitSet(new long[]{0x0000000000000090L}); + public static final BitSet FOLLOW_14 = new BitSet(new long[]{0x0000000000080002L}); + public static final BitSet FOLLOW_15 = new BitSet(new long[]{0x0000000000480000L}); + public static final BitSet FOLLOW_16 = new BitSet(new long[]{0x0000000000800000L}); + public static final BitSet FOLLOW_17 = new BitSet(new long[]{0x0000000000000030L}); + public static final BitSet FOLLOW_18 = new BitSet(new long[]{0x0000000002000000L}); + public static final BitSet FOLLOW_19 = new BitSet(new long[]{0x0000000004000000L}); + public static final BitSet FOLLOW_20 = new BitSet(new long[]{0x0000000008000000L}); + public static final BitSet FOLLOW_21 = new BitSet(new long[]{0x0000000010000000L}); + +} \ No newline at end of file diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/scoping/AbstractTqclScopeProvider.java b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/scoping/AbstractTqclScopeProvider.java new file mode 100644 index 00000000..869b7f26 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/scoping/AbstractTqclScopeProvider.java @@ -0,0 +1,18 @@ +/******************************************************************************* + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +package org.eclipse.triquetrum.commands.scoping; + +import org.eclipse.xtext.scoping.impl.DelegatingScopeProvider; + +public abstract class AbstractTqclScopeProvider extends DelegatingScopeProvider { +} diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/serializer/AbstractTqclSemanticSequencer.java b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/serializer/AbstractTqclSemanticSequencer.java new file mode 100644 index 00000000..49494117 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/serializer/AbstractTqclSemanticSequencer.java @@ -0,0 +1,307 @@ +/******************************************************************************* + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +package org.eclipse.triquetrum.commands.serializer; + +import com.google.inject.Inject; +import java.util.Set; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.triquetrum.commands.services.TqclGrammarAccess; +import org.eclipse.triquetrum.commands.tqcl.CompositeCommand; +import org.eclipse.triquetrum.commands.tqcl.Connect; +import org.eclipse.triquetrum.commands.tqcl.ConnectionPort; +import org.eclipse.triquetrum.commands.tqcl.Go; +import org.eclipse.triquetrum.commands.tqcl.Include; +import org.eclipse.triquetrum.commands.tqcl.Insert; +import org.eclipse.triquetrum.commands.tqcl.Library; +import org.eclipse.triquetrum.commands.tqcl.TqclPackage; +import org.eclipse.triquetrum.commands.tqcl.TriquetrumScript; +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; + +@SuppressWarnings("all") +public abstract class AbstractTqclSemanticSequencer extends AbstractDelegatingSemanticSequencer { + + @Inject + private TqclGrammarAccess grammarAccess; + + @Override + public void sequence(ISerializationContext context, EObject semanticObject) { + EPackage epackage = semanticObject.eClass().getEPackage(); + ParserRule rule = context.getParserRule(); + Action action = context.getAssignedAction(); + Set parameters = context.getEnabledBooleanParameters(); + if (epackage == TqclPackage.eINSTANCE) + switch (semanticObject.eClass().getClassifierID()) { + case TqclPackage.COMPOSITE_COMMAND: + sequence_CompositeCommand(context, (CompositeCommand) semanticObject); + return; + case TqclPackage.CONNECT: + sequence_Connect(context, (Connect) semanticObject); + return; + case TqclPackage.CONNECTION_PORT: + sequence_ConnectionPort(context, (ConnectionPort) semanticObject); + return; + case TqclPackage.GO: + if (rule == grammarAccess.getGoIntoRule()) { + sequence_GoInto(context, (Go) semanticObject); + return; + } + else if (rule == grammarAccess.getGoOutRule()) { + sequence_GoOut(context, (Go) semanticObject); + return; + } + else if (rule == grammarAccess.getGoTopRule()) { + sequence_GoTop(context, (Go) semanticObject); + return; + } + else break; + case TqclPackage.INCLUDE: + sequence_Include(context, (Include) semanticObject); + return; + case TqclPackage.INSERT: + sequence_Insert(context, (Insert) semanticObject); + return; + case TqclPackage.LIBRARY: + sequence_Library(context, (Library) semanticObject); + return; + case TqclPackage.PARAMETER: + sequence_Parameter(context, (org.eclipse.triquetrum.commands.tqcl.Parameter) semanticObject); + return; + case TqclPackage.SET: + sequence_Set(context, (org.eclipse.triquetrum.commands.tqcl.Set) semanticObject); + return; + case TqclPackage.TRIQUETRUM_SCRIPT: + sequence_TriquetrumScript(context, (TriquetrumScript) semanticObject); + return; + } + if (errorAcceptor != null) + errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context)); + } + + /** + * Contexts: + * CompositeCommand returns CompositeCommand + * Command returns CompositeCommand + * + * Constraint: + * (start=GoInto commands+=Command* (end=GoOut | end=GoTop)) + */ + protected void sequence_CompositeCommand(ISerializationContext context, CompositeCommand semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * SimpleCommand returns Connect + * Command returns Connect + * Connect returns Connect + * + * Constraint: + * (from+=ConnectionPort from+=ConnectionPort* to+=ConnectionPort to+=ConnectionPort*) + */ + protected void sequence_Connect(ISerializationContext context, Connect semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * ConnectionPort returns ConnectionPort + * + * Constraint: + * (actor=[Insert|ID] port=NamedObj) + */ + protected void sequence_ConnectionPort(ISerializationContext context, ConnectionPort semanticObject) { + if (errorAcceptor != null) { + if (transientValues.isValueTransient(semanticObject, TqclPackage.Literals.CONNECTION_PORT__ACTOR) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, TqclPackage.Literals.CONNECTION_PORT__ACTOR)); + if (transientValues.isValueTransient(semanticObject, TqclPackage.Literals.CONNECTION_PORT__PORT) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, TqclPackage.Literals.CONNECTION_PORT__PORT)); + } + SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); + feeder.accept(grammarAccess.getConnectionPortAccess().getActorInsertIDTerminalRuleCall_0_0_1(), semanticObject.getActor()); + feeder.accept(grammarAccess.getConnectionPortAccess().getPortNamedObjParserRuleCall_2_0(), semanticObject.getPort()); + feeder.finish(); + } + + + /** + * Contexts: + * GoInto returns Go + * + * Constraint: + * (direction='into' actor=[Insert|ID]) + */ + protected void sequence_GoInto(ISerializationContext context, Go semanticObject) { + if (errorAcceptor != null) { + if (transientValues.isValueTransient(semanticObject, TqclPackage.Literals.GO__DIRECTION) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, TqclPackage.Literals.GO__DIRECTION)); + if (transientValues.isValueTransient(semanticObject, TqclPackage.Literals.GO__ACTOR) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, TqclPackage.Literals.GO__ACTOR)); + } + SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); + feeder.accept(grammarAccess.getGoIntoAccess().getDirectionIntoKeyword_1_0(), semanticObject.getDirection()); + feeder.accept(grammarAccess.getGoIntoAccess().getActorInsertIDTerminalRuleCall_2_0_1(), semanticObject.getActor()); + feeder.finish(); + } + + + /** + * Contexts: + * GoOut returns Go + * + * Constraint: + * direction='out' + */ + protected void sequence_GoOut(ISerializationContext context, Go semanticObject) { + if (errorAcceptor != null) { + if (transientValues.isValueTransient(semanticObject, TqclPackage.Literals.GO__DIRECTION) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, TqclPackage.Literals.GO__DIRECTION)); + } + SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); + feeder.accept(grammarAccess.getGoOutAccess().getDirectionOutKeyword_1_0(), semanticObject.getDirection()); + feeder.finish(); + } + + + /** + * Contexts: + * GoTop returns Go + * + * Constraint: + * direction='top' + */ + protected void sequence_GoTop(ISerializationContext context, Go semanticObject) { + if (errorAcceptor != null) { + if (transientValues.isValueTransient(semanticObject, TqclPackage.Literals.GO__DIRECTION) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, TqclPackage.Literals.GO__DIRECTION)); + } + SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); + feeder.accept(grammarAccess.getGoTopAccess().getDirectionTopKeyword_1_0(), semanticObject.getDirection()); + feeder.finish(); + } + + + /** + * Contexts: + * SimpleCommand returns Include + * Command returns Include + * Include returns Include + * + * Constraint: + * filename=STRING + */ + protected void sequence_Include(ISerializationContext context, Include semanticObject) { + if (errorAcceptor != null) { + if (transientValues.isValueTransient(semanticObject, TqclPackage.Literals.INCLUDE__FILENAME) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, TqclPackage.Literals.INCLUDE__FILENAME)); + } + SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); + feeder.accept(grammarAccess.getIncludeAccess().getFilenameSTRINGTerminalRuleCall_1_0(), semanticObject.getFilename()); + feeder.finish(); + } + + + /** + * Contexts: + * SimpleCommand returns Insert + * Command returns Insert + * Insert returns Insert + * + * Constraint: + * (category=Category? entityClass=ENTITY_CLASS name=STRING (parameters+=Parameter parameters+=Parameter*)?) + */ + protected void sequence_Insert(ISerializationContext context, Insert semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * Library returns Library + * + * Constraint: + * name=ID + */ + protected void sequence_Library(ISerializationContext context, Library semanticObject) { + if (errorAcceptor != null) { + if (transientValues.isValueTransient(semanticObject, TqclPackage.Literals.LIBRARY__NAME) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, TqclPackage.Literals.LIBRARY__NAME)); + } + SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); + feeder.accept(grammarAccess.getLibraryAccess().getNameIDTerminalRuleCall_1_0(), semanticObject.getName()); + feeder.finish(); + } + + + /** + * Contexts: + * Parameter returns Parameter + * + * Constraint: + * (id=Parameter_id value=STRING) + */ + protected void sequence_Parameter(ISerializationContext context, org.eclipse.triquetrum.commands.tqcl.Parameter semanticObject) { + if (errorAcceptor != null) { + if (transientValues.isValueTransient(semanticObject, TqclPackage.Literals.PARAMETER__ID) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, TqclPackage.Literals.PARAMETER__ID)); + if (transientValues.isValueTransient(semanticObject, TqclPackage.Literals.PARAMETER__VALUE) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, TqclPackage.Literals.PARAMETER__VALUE)); + } + SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); + feeder.accept(grammarAccess.getParameterAccess().getIdParameter_idParserRuleCall_0_0(), semanticObject.getId()); + feeder.accept(grammarAccess.getParameterAccess().getValueSTRINGTerminalRuleCall_2_0(), semanticObject.getValue()); + feeder.finish(); + } + + + /** + * Contexts: + * SimpleCommand returns Set + * Command returns Set + * Set returns Set + * + * Constraint: + * param=Parameter + */ + protected void sequence_Set(ISerializationContext context, org.eclipse.triquetrum.commands.tqcl.Set semanticObject) { + if (errorAcceptor != null) { + if (transientValues.isValueTransient(semanticObject, TqclPackage.Literals.SET__PARAM) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, TqclPackage.Literals.SET__PARAM)); + } + SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); + feeder.accept(grammarAccess.getSetAccess().getParamParameterParserRuleCall_1_0(), semanticObject.getParam()); + feeder.finish(); + } + + + /** + * Contexts: + * TriquetrumScript returns TriquetrumScript + * + * Constraint: + * ((libraries+=Library+ commands+=Command+) | commands+=Command+)? + */ + protected void sequence_TriquetrumScript(ISerializationContext context, TriquetrumScript semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + +} diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/serializer/AbstractTqclSyntacticSequencer.java b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/serializer/AbstractTqclSyntacticSequencer.java new file mode 100644 index 00000000..5417b48b --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/serializer/AbstractTqclSyntacticSequencer.java @@ -0,0 +1,52 @@ +/******************************************************************************* + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +package org.eclipse.triquetrum.commands.serializer; + +import com.google.inject.Inject; +import java.util.List; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.triquetrum.commands.services.TqclGrammarAccess; +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.ISyntacticSequencerPDAProvider.ISynTransition; +import org.eclipse.xtext.serializer.sequencer.AbstractSyntacticSequencer; + +@SuppressWarnings("all") +public abstract class AbstractTqclSyntacticSequencer extends AbstractSyntacticSequencer { + + protected TqclGrammarAccess grammarAccess; + + @Inject + protected void init(IGrammarAccess access) { + grammarAccess = (TqclGrammarAccess) access; + } + + @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 transitionNodes = collectNodes(fromNode, toNode); + for (AbstractElementAlias syntax : transition.getAmbiguousSyntaxes()) { + List syntaxNodes = getNodesFor(transitionNodes, syntax); + acceptNodes(getLastNavigableState(), syntaxNodes); + } + } + +} diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/services/TqclGrammarAccess.java b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/services/TqclGrammarAccess.java new file mode 100644 index 00000000..d8a11c8c --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/services/TqclGrammarAccess.java @@ -0,0 +1,917 @@ +/******************************************************************************* + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +package org.eclipse.triquetrum.commands.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 TqclGrammarAccess extends AbstractGrammarElementFinder { + + public class TriquetrumScriptElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.triquetrum.commands.Tqcl.TriquetrumScript"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Assignment cLibrariesAssignment_0 = (Assignment)cGroup.eContents().get(0); + private final RuleCall cLibrariesLibraryParserRuleCall_0_0 = (RuleCall)cLibrariesAssignment_0.eContents().get(0); + private final Assignment cCommandsAssignment_1 = (Assignment)cGroup.eContents().get(1); + private final RuleCall cCommandsCommandParserRuleCall_1_0 = (RuleCall)cCommandsAssignment_1.eContents().get(0); + + //TriquetrumScript: + // libraries+=Library* + // commands+=Command*; + @Override public ParserRule getRule() { return rule; } + + //libraries+=Library* commands+=Command* + public Group getGroup() { return cGroup; } + + //libraries+=Library* + public Assignment getLibrariesAssignment_0() { return cLibrariesAssignment_0; } + + //Library + public RuleCall getLibrariesLibraryParserRuleCall_0_0() { return cLibrariesLibraryParserRuleCall_0_0; } + + //commands+=Command* + public Assignment getCommandsAssignment_1() { return cCommandsAssignment_1; } + + //Command + public RuleCall getCommandsCommandParserRuleCall_1_0() { return cCommandsCommandParserRuleCall_1_0; } + } + public class CompositeCommandElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.triquetrum.commands.Tqcl.CompositeCommand"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Assignment cStartAssignment_0 = (Assignment)cGroup.eContents().get(0); + private final RuleCall cStartGoIntoParserRuleCall_0_0 = (RuleCall)cStartAssignment_0.eContents().get(0); + private final Assignment cCommandsAssignment_1 = (Assignment)cGroup.eContents().get(1); + private final RuleCall cCommandsCommandParserRuleCall_1_0 = (RuleCall)cCommandsAssignment_1.eContents().get(0); + private final Assignment cEndAssignment_2 = (Assignment)cGroup.eContents().get(2); + private final Alternatives cEndAlternatives_2_0 = (Alternatives)cEndAssignment_2.eContents().get(0); + private final RuleCall cEndGoOutParserRuleCall_2_0_0 = (RuleCall)cEndAlternatives_2_0.eContents().get(0); + private final RuleCall cEndGoTopParserRuleCall_2_0_1 = (RuleCall)cEndAlternatives_2_0.eContents().get(1); + + //CompositeCommand: + // start=GoInto commands+=Command* end=(GoOut | GoTop); + @Override public ParserRule getRule() { return rule; } + + //start=GoInto commands+=Command* end=(GoOut | GoTop) + public Group getGroup() { return cGroup; } + + //start=GoInto + public Assignment getStartAssignment_0() { return cStartAssignment_0; } + + //GoInto + public RuleCall getStartGoIntoParserRuleCall_0_0() { return cStartGoIntoParserRuleCall_0_0; } + + //commands+=Command* + public Assignment getCommandsAssignment_1() { return cCommandsAssignment_1; } + + //Command + public RuleCall getCommandsCommandParserRuleCall_1_0() { return cCommandsCommandParserRuleCall_1_0; } + + //end=(GoOut | GoTop) + public Assignment getEndAssignment_2() { return cEndAssignment_2; } + + //(GoOut | GoTop) + public Alternatives getEndAlternatives_2_0() { return cEndAlternatives_2_0; } + + //GoOut + public RuleCall getEndGoOutParserRuleCall_2_0_0() { return cEndGoOutParserRuleCall_2_0_0; } + + //GoTop + public RuleCall getEndGoTopParserRuleCall_2_0_1() { return cEndGoTopParserRuleCall_2_0_1; } + } + public class SimpleCommandElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.triquetrum.commands.Tqcl.SimpleCommand"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Alternatives cAlternatives_0 = (Alternatives)cGroup.eContents().get(0); + private final RuleCall cInsertParserRuleCall_0_0 = (RuleCall)cAlternatives_0.eContents().get(0); + private final RuleCall cConnectParserRuleCall_0_1 = (RuleCall)cAlternatives_0.eContents().get(1); + private final RuleCall cSetParserRuleCall_0_2 = (RuleCall)cAlternatives_0.eContents().get(2); + private final RuleCall cIncludeParserRuleCall_0_3 = (RuleCall)cAlternatives_0.eContents().get(3); + private final Keyword cSemicolonKeyword_1 = (Keyword)cGroup.eContents().get(1); + + //SimpleCommand Command: + // (Insert | Connect | Set | Include) ";" + @Override public ParserRule getRule() { return rule; } + + //(Insert | Connect | Set | Include) ";" + public Group getGroup() { return cGroup; } + + //(Insert | Connect | Set | Include) + public Alternatives getAlternatives_0() { return cAlternatives_0; } + + //Insert + public RuleCall getInsertParserRuleCall_0_0() { return cInsertParserRuleCall_0_0; } + + //Connect + public RuleCall getConnectParserRuleCall_0_1() { return cConnectParserRuleCall_0_1; } + + //Set + public RuleCall getSetParserRuleCall_0_2() { return cSetParserRuleCall_0_2; } + + //Include + public RuleCall getIncludeParserRuleCall_0_3() { return cIncludeParserRuleCall_0_3; } + + //";" + public Keyword getSemicolonKeyword_1() { return cSemicolonKeyword_1; } + } + public class CommandElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.triquetrum.commands.Tqcl.Command"); + private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); + private final RuleCall cSimpleCommandParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0); + private final RuleCall cCompositeCommandParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1); + + //Command: + // SimpleCommand | CompositeCommand; + @Override public ParserRule getRule() { return rule; } + + //SimpleCommand | CompositeCommand + public Alternatives getAlternatives() { return cAlternatives; } + + //SimpleCommand + public RuleCall getSimpleCommandParserRuleCall_0() { return cSimpleCommandParserRuleCall_0; } + + //CompositeCommand + public RuleCall getCompositeCommandParserRuleCall_1() { return cCompositeCommandParserRuleCall_1; } + } + public class IncludeElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.triquetrum.commands.Tqcl.Include"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Keyword cIncludeKeyword_0 = (Keyword)cGroup.eContents().get(0); + private final Assignment cFilenameAssignment_1 = (Assignment)cGroup.eContents().get(1); + private final RuleCall cFilenameSTRINGTerminalRuleCall_1_0 = (RuleCall)cFilenameAssignment_1.eContents().get(0); + private final Keyword cSemicolonKeyword_2 = (Keyword)cGroup.eContents().get(2); + + //Include: + // "include" filename=STRING ";"; + @Override public ParserRule getRule() { return rule; } + + //"include" filename=STRING ";" + public Group getGroup() { return cGroup; } + + //"include" + public Keyword getIncludeKeyword_0() { return cIncludeKeyword_0; } + + //filename=STRING + public Assignment getFilenameAssignment_1() { return cFilenameAssignment_1; } + + //STRING + public RuleCall getFilenameSTRINGTerminalRuleCall_1_0() { return cFilenameSTRINGTerminalRuleCall_1_0; } + + //";" + public Keyword getSemicolonKeyword_2() { return cSemicolonKeyword_2; } + } + public class LibraryElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.triquetrum.commands.Tqcl.Library"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Keyword cLibraryKeyword_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 cSemicolonKeyword_2 = (Keyword)cGroup.eContents().get(2); + + //Library: + // "library" name=ID ";"; + @Override public ParserRule getRule() { return rule; } + + //"library" name=ID ";" + public Group getGroup() { return cGroup; } + + //"library" + public Keyword getLibraryKeyword_0() { return cLibraryKeyword_0; } + + //name=ID + public Assignment getNameAssignment_1() { return cNameAssignment_1; } + + //ID + public RuleCall getNameIDTerminalRuleCall_1_0() { return cNameIDTerminalRuleCall_1_0; } + + //";" + public Keyword getSemicolonKeyword_2() { return cSemicolonKeyword_2; } + } + public class InsertElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.triquetrum.commands.Tqcl.Insert"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Keyword cInsertKeyword_0 = (Keyword)cGroup.eContents().get(0); + private final Assignment cCategoryAssignment_1 = (Assignment)cGroup.eContents().get(1); + private final RuleCall cCategoryCategoryEnumRuleCall_1_0 = (RuleCall)cCategoryAssignment_1.eContents().get(0); + private final Assignment cEntityClassAssignment_2 = (Assignment)cGroup.eContents().get(2); + private final RuleCall cEntityClassENTITY_CLASSTerminalRuleCall_2_0 = (RuleCall)cEntityClassAssignment_2.eContents().get(0); + private final Keyword cAsKeyword_3 = (Keyword)cGroup.eContents().get(3); + private final Assignment cNameAssignment_4 = (Assignment)cGroup.eContents().get(4); + private final RuleCall cNameSTRINGTerminalRuleCall_4_0 = (RuleCall)cNameAssignment_4.eContents().get(0); + private final Group cGroup_5 = (Group)cGroup.eContents().get(5); + private final Keyword cWithKeyword_5_0 = (Keyword)cGroup_5.eContents().get(0); + private final Assignment cParametersAssignment_5_1 = (Assignment)cGroup_5.eContents().get(1); + private final RuleCall cParametersParameterParserRuleCall_5_1_0 = (RuleCall)cParametersAssignment_5_1.eContents().get(0); + private final Group cGroup_5_2 = (Group)cGroup_5.eContents().get(2); + private final Keyword cCommaKeyword_5_2_0 = (Keyword)cGroup_5_2.eContents().get(0); + private final Assignment cParametersAssignment_5_2_1 = (Assignment)cGroup_5_2.eContents().get(1); + private final RuleCall cParametersParameterParserRuleCall_5_2_1_0 = (RuleCall)cParametersAssignment_5_2_1.eContents().get(0); + + //Insert: + // "insert" category=Category? entityClass=ENTITY_CLASS 'as' name=STRING ("with" parameters+=Parameter ("," + // parameters+=Parameter)*)?; + @Override public ParserRule getRule() { return rule; } + + //"insert" category=Category? entityClass=ENTITY_CLASS 'as' name=STRING ("with" parameters+=Parameter ("," + //parameters+=Parameter)*)? + public Group getGroup() { return cGroup; } + + //"insert" + public Keyword getInsertKeyword_0() { return cInsertKeyword_0; } + + //category=Category? + public Assignment getCategoryAssignment_1() { return cCategoryAssignment_1; } + + //Category + public RuleCall getCategoryCategoryEnumRuleCall_1_0() { return cCategoryCategoryEnumRuleCall_1_0; } + + //entityClass=ENTITY_CLASS + public Assignment getEntityClassAssignment_2() { return cEntityClassAssignment_2; } + + //ENTITY_CLASS + public RuleCall getEntityClassENTITY_CLASSTerminalRuleCall_2_0() { return cEntityClassENTITY_CLASSTerminalRuleCall_2_0; } + + //'as' + public Keyword getAsKeyword_3() { return cAsKeyword_3; } + + //name=STRING + public Assignment getNameAssignment_4() { return cNameAssignment_4; } + + //STRING + public RuleCall getNameSTRINGTerminalRuleCall_4_0() { return cNameSTRINGTerminalRuleCall_4_0; } + + //("with" parameters+=Parameter ("," parameters+=Parameter)*)? + public Group getGroup_5() { return cGroup_5; } + + //"with" + public Keyword getWithKeyword_5_0() { return cWithKeyword_5_0; } + + //parameters+=Parameter + public Assignment getParametersAssignment_5_1() { return cParametersAssignment_5_1; } + + //Parameter + public RuleCall getParametersParameterParserRuleCall_5_1_0() { return cParametersParameterParserRuleCall_5_1_0; } + + //("," parameters+=Parameter)* + public Group getGroup_5_2() { return cGroup_5_2; } + + //"," + public Keyword getCommaKeyword_5_2_0() { return cCommaKeyword_5_2_0; } + + //parameters+=Parameter + public Assignment getParametersAssignment_5_2_1() { return cParametersAssignment_5_2_1; } + + //Parameter + public RuleCall getParametersParameterParserRuleCall_5_2_1_0() { return cParametersParameterParserRuleCall_5_2_1_0; } + } + public class SetElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.triquetrum.commands.Tqcl.Set"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Keyword cSetKeyword_0 = (Keyword)cGroup.eContents().get(0); + private final Assignment cParamAssignment_1 = (Assignment)cGroup.eContents().get(1); + private final RuleCall cParamParameterParserRuleCall_1_0 = (RuleCall)cParamAssignment_1.eContents().get(0); + + //Set: + // "set" param=Parameter; + @Override public ParserRule getRule() { return rule; } + + //"set" param=Parameter + public Group getGroup() { return cGroup; } + + //"set" + public Keyword getSetKeyword_0() { return cSetKeyword_0; } + + //param=Parameter + public Assignment getParamAssignment_1() { return cParamAssignment_1; } + + //Parameter + public RuleCall getParamParameterParserRuleCall_1_0() { return cParamParameterParserRuleCall_1_0; } + } + public class ConnectElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.triquetrum.commands.Tqcl.Connect"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Keyword cConnectKeyword_0 = (Keyword)cGroup.eContents().get(0); + private final Assignment cFromAssignment_1 = (Assignment)cGroup.eContents().get(1); + private final RuleCall cFromConnectionPortParserRuleCall_1_0 = (RuleCall)cFromAssignment_1.eContents().get(0); + private final Group cGroup_2 = (Group)cGroup.eContents().get(2); + private final Keyword cCommaKeyword_2_0 = (Keyword)cGroup_2.eContents().get(0); + private final Assignment cFromAssignment_2_1 = (Assignment)cGroup_2.eContents().get(1); + private final RuleCall cFromConnectionPortParserRuleCall_2_1_0 = (RuleCall)cFromAssignment_2_1.eContents().get(0); + private final Keyword cToKeyword_3 = (Keyword)cGroup.eContents().get(3); + private final Assignment cToAssignment_4 = (Assignment)cGroup.eContents().get(4); + private final RuleCall cToConnectionPortParserRuleCall_4_0 = (RuleCall)cToAssignment_4.eContents().get(0); + private final Group cGroup_5 = (Group)cGroup.eContents().get(5); + private final Keyword cCommaKeyword_5_0 = (Keyword)cGroup_5.eContents().get(0); + private final Assignment cToAssignment_5_1 = (Assignment)cGroup_5.eContents().get(1); + private final RuleCall cToConnectionPortParserRuleCall_5_1_0 = (RuleCall)cToAssignment_5_1.eContents().get(0); + + //Connect: + // "connect" from+=ConnectionPort (',' from+=ConnectionPort)* "to" to+=ConnectionPort (',' to+=ConnectionPort)*; + @Override public ParserRule getRule() { return rule; } + + //"connect" from+=ConnectionPort (',' from+=ConnectionPort)* "to" to+=ConnectionPort (',' to+=ConnectionPort)* + public Group getGroup() { return cGroup; } + + //"connect" + public Keyword getConnectKeyword_0() { return cConnectKeyword_0; } + + //from+=ConnectionPort + public Assignment getFromAssignment_1() { return cFromAssignment_1; } + + //ConnectionPort + public RuleCall getFromConnectionPortParserRuleCall_1_0() { return cFromConnectionPortParserRuleCall_1_0; } + + //(',' from+=ConnectionPort)* + public Group getGroup_2() { return cGroup_2; } + + //',' + public Keyword getCommaKeyword_2_0() { return cCommaKeyword_2_0; } + + //from+=ConnectionPort + public Assignment getFromAssignment_2_1() { return cFromAssignment_2_1; } + + //ConnectionPort + public RuleCall getFromConnectionPortParserRuleCall_2_1_0() { return cFromConnectionPortParserRuleCall_2_1_0; } + + //"to" + public Keyword getToKeyword_3() { return cToKeyword_3; } + + //to+=ConnectionPort + public Assignment getToAssignment_4() { return cToAssignment_4; } + + //ConnectionPort + public RuleCall getToConnectionPortParserRuleCall_4_0() { return cToConnectionPortParserRuleCall_4_0; } + + //(',' to+=ConnectionPort)* + public Group getGroup_5() { return cGroup_5; } + + //',' + public Keyword getCommaKeyword_5_0() { return cCommaKeyword_5_0; } + + //to+=ConnectionPort + public Assignment getToAssignment_5_1() { return cToAssignment_5_1; } + + //ConnectionPort + public RuleCall getToConnectionPortParserRuleCall_5_1_0() { return cToConnectionPortParserRuleCall_5_1_0; } + } + public class ConnectionPortElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.triquetrum.commands.Tqcl.ConnectionPort"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Assignment cActorAssignment_0 = (Assignment)cGroup.eContents().get(0); + private final CrossReference cActorInsertCrossReference_0_0 = (CrossReference)cActorAssignment_0.eContents().get(0); + private final RuleCall cActorInsertIDTerminalRuleCall_0_0_1 = (RuleCall)cActorInsertCrossReference_0_0.eContents().get(1); + private final Keyword cFullStopKeyword_1 = (Keyword)cGroup.eContents().get(1); + private final Assignment cPortAssignment_2 = (Assignment)cGroup.eContents().get(2); + private final RuleCall cPortNamedObjParserRuleCall_2_0 = (RuleCall)cPortAssignment_2.eContents().get(0); + + //ConnectionPort: + // actor=[Insert] '.' port=NamedObj; + @Override public ParserRule getRule() { return rule; } + + //actor=[Insert] '.' port=NamedObj + public Group getGroup() { return cGroup; } + + //actor=[Insert] + public Assignment getActorAssignment_0() { return cActorAssignment_0; } + + //[Insert] + public CrossReference getActorInsertCrossReference_0_0() { return cActorInsertCrossReference_0_0; } + + //ID + public RuleCall getActorInsertIDTerminalRuleCall_0_0_1() { return cActorInsertIDTerminalRuleCall_0_0_1; } + + //'.' + public Keyword getFullStopKeyword_1() { return cFullStopKeyword_1; } + + //port=NamedObj + public Assignment getPortAssignment_2() { return cPortAssignment_2; } + + //NamedObj + public RuleCall getPortNamedObjParserRuleCall_2_0() { return cPortNamedObjParserRuleCall_2_0; } + } + public class GoIntoElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.triquetrum.commands.Tqcl.GoInto"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Keyword cGoKeyword_0 = (Keyword)cGroup.eContents().get(0); + private final Assignment cDirectionAssignment_1 = (Assignment)cGroup.eContents().get(1); + private final Keyword cDirectionIntoKeyword_1_0 = (Keyword)cDirectionAssignment_1.eContents().get(0); + private final Assignment cActorAssignment_2 = (Assignment)cGroup.eContents().get(2); + private final CrossReference cActorInsertCrossReference_2_0 = (CrossReference)cActorAssignment_2.eContents().get(0); + private final RuleCall cActorInsertIDTerminalRuleCall_2_0_1 = (RuleCall)cActorInsertCrossReference_2_0.eContents().get(1); + + //GoInto Go: + // "go" direction="into" actor=[Insert] + @Override public ParserRule getRule() { return rule; } + + //"go" direction="into" actor=[Insert] + public Group getGroup() { return cGroup; } + + //"go" + public Keyword getGoKeyword_0() { return cGoKeyword_0; } + + //direction="into" + public Assignment getDirectionAssignment_1() { return cDirectionAssignment_1; } + + //"into" + public Keyword getDirectionIntoKeyword_1_0() { return cDirectionIntoKeyword_1_0; } + + //actor=[Insert] + public Assignment getActorAssignment_2() { return cActorAssignment_2; } + + //[Insert] + public CrossReference getActorInsertCrossReference_2_0() { return cActorInsertCrossReference_2_0; } + + //ID + public RuleCall getActorInsertIDTerminalRuleCall_2_0_1() { return cActorInsertIDTerminalRuleCall_2_0_1; } + } + public class GoOutElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.triquetrum.commands.Tqcl.GoOut"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Keyword cGoKeyword_0 = (Keyword)cGroup.eContents().get(0); + private final Assignment cDirectionAssignment_1 = (Assignment)cGroup.eContents().get(1); + private final Keyword cDirectionOutKeyword_1_0 = (Keyword)cDirectionAssignment_1.eContents().get(0); + + //GoOut Go: + // "go" direction="out" + @Override public ParserRule getRule() { return rule; } + + //"go" direction="out" + public Group getGroup() { return cGroup; } + + //"go" + public Keyword getGoKeyword_0() { return cGoKeyword_0; } + + //direction="out" + public Assignment getDirectionAssignment_1() { return cDirectionAssignment_1; } + + //"out" + public Keyword getDirectionOutKeyword_1_0() { return cDirectionOutKeyword_1_0; } + } + public class GoTopElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.triquetrum.commands.Tqcl.GoTop"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Keyword cGoKeyword_0 = (Keyword)cGroup.eContents().get(0); + private final Assignment cDirectionAssignment_1 = (Assignment)cGroup.eContents().get(1); + private final Keyword cDirectionTopKeyword_1_0 = (Keyword)cDirectionAssignment_1.eContents().get(0); + + //GoTop Go: + // "go" direction="top" + @Override public ParserRule getRule() { return rule; } + + //"go" direction="top" + public Group getGroup() { return cGroup; } + + //"go" + public Keyword getGoKeyword_0() { return cGoKeyword_0; } + + //direction="top" + public Assignment getDirectionAssignment_1() { return cDirectionAssignment_1; } + + //"top" + public Keyword getDirectionTopKeyword_1_0() { return cDirectionTopKeyword_1_0; } + } + public class ParameterElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.triquetrum.commands.Tqcl.Parameter"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Assignment cIdAssignment_0 = (Assignment)cGroup.eContents().get(0); + private final RuleCall cIdParameter_idParserRuleCall_0_0 = (RuleCall)cIdAssignment_0.eContents().get(0); + private final Keyword cEqualsSignKeyword_1 = (Keyword)cGroup.eContents().get(1); + private final Assignment cValueAssignment_2 = (Assignment)cGroup.eContents().get(2); + private final RuleCall cValueSTRINGTerminalRuleCall_2_0 = (RuleCall)cValueAssignment_2.eContents().get(0); + + //Parameter: + // id=Parameter_id "=" value=STRING; + @Override public ParserRule getRule() { return rule; } + + //id=Parameter_id "=" value=STRING + public Group getGroup() { return cGroup; } + + //id=Parameter_id + public Assignment getIdAssignment_0() { return cIdAssignment_0; } + + //Parameter_id + public RuleCall getIdParameter_idParserRuleCall_0_0() { return cIdParameter_idParserRuleCall_0_0; } + + //"=" + public Keyword getEqualsSignKeyword_1() { return cEqualsSignKeyword_1; } + + //value=STRING + public Assignment getValueAssignment_2() { return cValueAssignment_2; } + + //STRING + public RuleCall getValueSTRINGTerminalRuleCall_2_0() { return cValueSTRINGTerminalRuleCall_2_0; } + } + public class Parameter_idElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.triquetrum.commands.Tqcl.Parameter_id"); + private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); + private final RuleCall cPARAMETER_NAMETerminalRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0); + private final RuleCall cSTRINGTerminalRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1); + + //Parameter_id: + // PARAMETER_NAME | STRING; + @Override public ParserRule getRule() { return rule; } + + //PARAMETER_NAME | STRING + public Alternatives getAlternatives() { return cAlternatives; } + + //PARAMETER_NAME + public RuleCall getPARAMETER_NAMETerminalRuleCall_0() { return cPARAMETER_NAMETerminalRuleCall_0; } + + //STRING + public RuleCall getSTRINGTerminalRuleCall_1() { return cSTRINGTerminalRuleCall_1; } + } + public class NamedObjElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.triquetrum.commands.Tqcl.NamedObj"); + private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); + private final RuleCall cIDTerminalRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0); + private final RuleCall cSTRINGTerminalRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1); + + //NamedObj: + // ID | STRING; + @Override public ParserRule getRule() { return rule; } + + //ID | STRING + public Alternatives getAlternatives() { return cAlternatives; } + + //ID + public RuleCall getIDTerminalRuleCall_0() { return cIDTerminalRuleCall_0; } + + //STRING + public RuleCall getSTRINGTerminalRuleCall_1() { return cSTRINGTerminalRuleCall_1; } + } + + public class CategoryElements extends AbstractEnumRuleElementFinder { + private final EnumRule rule = (EnumRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.triquetrum.commands.Tqcl.Category"); + private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); + private final EnumLiteralDeclaration cActorEnumLiteralDeclaration_0 = (EnumLiteralDeclaration)cAlternatives.eContents().get(0); + private final Keyword cActorActorKeyword_0_0 = (Keyword)cActorEnumLiteralDeclaration_0.eContents().get(0); + private final EnumLiteralDeclaration cParameterEnumLiteralDeclaration_1 = (EnumLiteralDeclaration)cAlternatives.eContents().get(1); + private final Keyword cParameterParameterKeyword_1_0 = (Keyword)cParameterEnumLiteralDeclaration_1.eContents().get(0); + private final EnumLiteralDeclaration cPortEnumLiteralDeclaration_2 = (EnumLiteralDeclaration)cAlternatives.eContents().get(2); + private final Keyword cPortPortKeyword_2_0 = (Keyword)cPortEnumLiteralDeclaration_2.eContents().get(0); + private final EnumLiteralDeclaration cDirectorEnumLiteralDeclaration_3 = (EnumLiteralDeclaration)cAlternatives.eContents().get(3); + private final Keyword cDirectorDirectorKeyword_3_0 = (Keyword)cDirectorEnumLiteralDeclaration_3.eContents().get(0); + + //enum Category: + // actor | parameter | port | director; + public EnumRule getRule() { return rule; } + + //actor | parameter | port | director + public Alternatives getAlternatives() { return cAlternatives; } + + //actor + public EnumLiteralDeclaration getActorEnumLiteralDeclaration_0() { return cActorEnumLiteralDeclaration_0; } + + //"actor" + public Keyword getActorActorKeyword_0_0() { return cActorActorKeyword_0_0; } + + //parameter + public EnumLiteralDeclaration getParameterEnumLiteralDeclaration_1() { return cParameterEnumLiteralDeclaration_1; } + + //"parameter" + public Keyword getParameterParameterKeyword_1_0() { return cParameterParameterKeyword_1_0; } + + //port + public EnumLiteralDeclaration getPortEnumLiteralDeclaration_2() { return cPortEnumLiteralDeclaration_2; } + + //"port" + public Keyword getPortPortKeyword_2_0() { return cPortPortKeyword_2_0; } + + //director + public EnumLiteralDeclaration getDirectorEnumLiteralDeclaration_3() { return cDirectorEnumLiteralDeclaration_3; } + + //"director" + public Keyword getDirectorDirectorKeyword_3_0() { return cDirectorDirectorKeyword_3_0; } + } + + private final TriquetrumScriptElements pTriquetrumScript; + private final CompositeCommandElements pCompositeCommand; + private final SimpleCommandElements pSimpleCommand; + private final CommandElements pCommand; + private final IncludeElements pInclude; + private final LibraryElements pLibrary; + private final InsertElements pInsert; + private final SetElements pSet; + private final ConnectElements pConnect; + private final ConnectionPortElements pConnectionPort; + private final GoIntoElements pGoInto; + private final GoOutElements pGoOut; + private final GoTopElements pGoTop; + private final CategoryElements eCategory; + private final ParameterElements pParameter; + private final Parameter_idElements pParameter_id; + private final TerminalRule tPARAMETER_NAME; + private final NamedObjElements pNamedObj; + private final TerminalRule tENTITY_CLASS; + + private final Grammar grammar; + + private final TerminalsGrammarAccess gaTerminals; + + @Inject + public TqclGrammarAccess(GrammarProvider grammarProvider, + TerminalsGrammarAccess gaTerminals) { + this.grammar = internalFindGrammar(grammarProvider); + this.gaTerminals = gaTerminals; + this.pTriquetrumScript = new TriquetrumScriptElements(); + this.pCompositeCommand = new CompositeCommandElements(); + this.pSimpleCommand = new SimpleCommandElements(); + this.pCommand = new CommandElements(); + this.pInclude = new IncludeElements(); + this.pLibrary = new LibraryElements(); + this.pInsert = new InsertElements(); + this.pSet = new SetElements(); + this.pConnect = new ConnectElements(); + this.pConnectionPort = new ConnectionPortElements(); + this.pGoInto = new GoIntoElements(); + this.pGoOut = new GoOutElements(); + this.pGoTop = new GoTopElements(); + this.eCategory = new CategoryElements(); + this.pParameter = new ParameterElements(); + this.pParameter_id = new Parameter_idElements(); + this.tPARAMETER_NAME = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.triquetrum.commands.Tqcl.PARAMETER_NAME"); + this.pNamedObj = new NamedObjElements(); + this.tENTITY_CLASS = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.triquetrum.commands.Tqcl.ENTITY_CLASS"); + } + + protected Grammar internalFindGrammar(GrammarProvider grammarProvider) { + Grammar grammar = grammarProvider.getGrammar(this); + while (grammar != null) { + if ("org.eclipse.triquetrum.commands.Tqcl".equals(grammar.getName())) { + return grammar; + } + List 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; + } + + + //TriquetrumScript: + // libraries+=Library* + // commands+=Command*; + public TriquetrumScriptElements getTriquetrumScriptAccess() { + return pTriquetrumScript; + } + + public ParserRule getTriquetrumScriptRule() { + return getTriquetrumScriptAccess().getRule(); + } + + //CompositeCommand: + // start=GoInto commands+=Command* end=(GoOut | GoTop); + public CompositeCommandElements getCompositeCommandAccess() { + return pCompositeCommand; + } + + public ParserRule getCompositeCommandRule() { + return getCompositeCommandAccess().getRule(); + } + + //SimpleCommand Command: + // (Insert | Connect | Set | Include) ";" + public SimpleCommandElements getSimpleCommandAccess() { + return pSimpleCommand; + } + + public ParserRule getSimpleCommandRule() { + return getSimpleCommandAccess().getRule(); + } + + //Command: + // SimpleCommand | CompositeCommand; + public CommandElements getCommandAccess() { + return pCommand; + } + + public ParserRule getCommandRule() { + return getCommandAccess().getRule(); + } + + //Include: + // "include" filename=STRING ";"; + public IncludeElements getIncludeAccess() { + return pInclude; + } + + public ParserRule getIncludeRule() { + return getIncludeAccess().getRule(); + } + + //Library: + // "library" name=ID ";"; + public LibraryElements getLibraryAccess() { + return pLibrary; + } + + public ParserRule getLibraryRule() { + return getLibraryAccess().getRule(); + } + + //Insert: + // "insert" category=Category? entityClass=ENTITY_CLASS 'as' name=STRING ("with" parameters+=Parameter ("," + // parameters+=Parameter)*)?; + public InsertElements getInsertAccess() { + return pInsert; + } + + public ParserRule getInsertRule() { + return getInsertAccess().getRule(); + } + + //Set: + // "set" param=Parameter; + public SetElements getSetAccess() { + return pSet; + } + + public ParserRule getSetRule() { + return getSetAccess().getRule(); + } + + //Connect: + // "connect" from+=ConnectionPort (',' from+=ConnectionPort)* "to" to+=ConnectionPort (',' to+=ConnectionPort)*; + public ConnectElements getConnectAccess() { + return pConnect; + } + + public ParserRule getConnectRule() { + return getConnectAccess().getRule(); + } + + //ConnectionPort: + // actor=[Insert] '.' port=NamedObj; + public ConnectionPortElements getConnectionPortAccess() { + return pConnectionPort; + } + + public ParserRule getConnectionPortRule() { + return getConnectionPortAccess().getRule(); + } + + //GoInto Go: + // "go" direction="into" actor=[Insert] + public GoIntoElements getGoIntoAccess() { + return pGoInto; + } + + public ParserRule getGoIntoRule() { + return getGoIntoAccess().getRule(); + } + + //GoOut Go: + // "go" direction="out" + public GoOutElements getGoOutAccess() { + return pGoOut; + } + + public ParserRule getGoOutRule() { + return getGoOutAccess().getRule(); + } + + //GoTop Go: + // "go" direction="top" + public GoTopElements getGoTopAccess() { + return pGoTop; + } + + public ParserRule getGoTopRule() { + return getGoTopAccess().getRule(); + } + + //enum Category: + // actor | parameter | port | director; + public CategoryElements getCategoryAccess() { + return eCategory; + } + + public EnumRule getCategoryRule() { + return getCategoryAccess().getRule(); + } + + //Parameter: + // id=Parameter_id "=" value=STRING; + public ParameterElements getParameterAccess() { + return pParameter; + } + + public ParserRule getParameterRule() { + return getParameterAccess().getRule(); + } + + //Parameter_id: + // PARAMETER_NAME | STRING; + public Parameter_idElements getParameter_idAccess() { + return pParameter_id; + } + + public ParserRule getParameter_idRule() { + return getParameter_idAccess().getRule(); + } + + //terminal PARAMETER_NAME: + // '$' ('a'..'z' | 'A'..'Z' | '_') ('a'..'z' | 'A'..'Z' | '_' | '0'..'9')*; + public TerminalRule getPARAMETER_NAMERule() { + return tPARAMETER_NAME; + } + + //NamedObj: + // ID | STRING; + public NamedObjElements getNamedObjAccess() { + return pNamedObj; + } + + public ParserRule getNamedObjRule() { + return getNamedObjAccess().getRule(); + } + + //terminal ENTITY_CLASS: + // '<'->'>'; + public TerminalRule getENTITY_CLASSRule() { + return tENTITY_CLASS; + } + + //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(); + } +} diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/Category.java b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/Category.java new file mode 100644 index 00000000..c2da3934 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/Category.java @@ -0,0 +1,295 @@ +/** + * ****************************************************************************** + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + * ****************************************************************************** + */ +package org.eclipse.triquetrum.commands.tqcl; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * + * A representation of the literals of the enumeration 'Category', + * and utility methods for working with them. + * + * @see org.eclipse.triquetrum.commands.tqcl.TqclPackage#getCategory() + * @model + * @generated + */ +public enum Category implements Enumerator +{ + /** + * The 'Actor' literal object. + * + * + * @see #ACTOR_VALUE + * @generated + * @ordered + */ + ACTOR(0, "actor", "actor"), + + /** + * The 'Parameter' literal object. + * + * + * @see #PARAMETER_VALUE + * @generated + * @ordered + */ + PARAMETER(1, "parameter", "parameter"), + + /** + * The 'Port' literal object. + * + * + * @see #PORT_VALUE + * @generated + * @ordered + */ + PORT(2, "port", "port"), + + /** + * The 'Director' literal object. + * + * + * @see #DIRECTOR_VALUE + * @generated + * @ordered + */ + DIRECTOR(3, "director", "director"); + + /** + * The 'Actor' literal value. + * + *

+ * If the meaning of 'Actor' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #ACTOR + * @model name="actor" + * @generated + * @ordered + */ + public static final int ACTOR_VALUE = 0; + + /** + * The 'Parameter' literal value. + * + *

+ * If the meaning of 'Parameter' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #PARAMETER + * @model name="parameter" + * @generated + * @ordered + */ + public static final int PARAMETER_VALUE = 1; + + /** + * The 'Port' literal value. + * + *

+ * If the meaning of 'Port' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #PORT + * @model name="port" + * @generated + * @ordered + */ + public static final int PORT_VALUE = 2; + + /** + * The 'Director' literal value. + * + *

+ * If the meaning of 'Director' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #DIRECTOR + * @model name="director" + * @generated + * @ordered + */ + public static final int DIRECTOR_VALUE = 3; + + /** + * An array of all the 'Category' enumerators. + * + * + * @generated + */ + private static final Category[] VALUES_ARRAY = + new Category[] + { + ACTOR, + PARAMETER, + PORT, + DIRECTOR, + }; + + /** + * A public read-only list of all the 'Category' enumerators. + * + * + * @generated + */ + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the 'Category' literal with the specified literal value. + * + * + * @param literal the literal. + * @return the matching enumerator or null. + * @generated + */ + public static Category get(String literal) + { + for (int i = 0; i < VALUES_ARRAY.length; ++i) + { + Category result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) + { + return result; + } + } + return null; + } + + /** + * Returns the 'Category' literal with the specified name. + * + * + * @param name the name. + * @return the matching enumerator or null. + * @generated + */ + public static Category getByName(String name) + { + for (int i = 0; i < VALUES_ARRAY.length; ++i) + { + Category result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) + { + return result; + } + } + return null; + } + + /** + * Returns the 'Category' literal with the specified integer value. + * + * + * @param value the integer value. + * @return the matching enumerator or null. + * @generated + */ + public static Category get(int value) + { + switch (value) + { + case ACTOR_VALUE: return ACTOR; + case PARAMETER_VALUE: return PARAMETER; + case PORT_VALUE: return PORT; + case DIRECTOR_VALUE: return DIRECTOR; + } + return null; + } + + /** + * + * + * @generated + */ + private final int value; + + /** + * + * + * @generated + */ + private final String name; + + /** + * + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * + * + * @generated + */ + private Category(int value, String name, String literal) + { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * + * + * @generated + */ + public int getValue() + { + return value; + } + + /** + * + * + * @generated + */ + public String getName() + { + return name; + } + + /** + * + * + * @generated + */ + public String getLiteral() + { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * + * + * @generated + */ + @Override + public String toString() + { + return literal; + } + +} //Category diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/Command.java b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/Command.java new file mode 100644 index 00000000..15663df9 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/Command.java @@ -0,0 +1,31 @@ +/** + * ****************************************************************************** + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + * ****************************************************************************** + */ +package org.eclipse.triquetrum.commands.tqcl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Command'. + * + * + * + * @see org.eclipse.triquetrum.commands.tqcl.TqclPackage#getCommand() + * @model + * @generated + */ +public interface Command extends EObject +{ +} // Command diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/CompositeCommand.java b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/CompositeCommand.java new file mode 100644 index 00000000..ee997a2d --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/CompositeCommand.java @@ -0,0 +1,107 @@ +/** + * ****************************************************************************** + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + * ****************************************************************************** + */ +package org.eclipse.triquetrum.commands.tqcl; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Composite Command'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.triquetrum.commands.tqcl.CompositeCommand#getStart Start}
  • + *
  • {@link org.eclipse.triquetrum.commands.tqcl.CompositeCommand#getCommands Commands}
  • + *
  • {@link org.eclipse.triquetrum.commands.tqcl.CompositeCommand#getEnd End}
  • + *
+ * + * @see org.eclipse.triquetrum.commands.tqcl.TqclPackage#getCompositeCommand() + * @model + * @generated + */ +public interface CompositeCommand extends Command +{ + /** + * Returns the value of the 'Start' containment reference. + * + *

+ * If the meaning of the 'Start' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Start' containment reference. + * @see #setStart(Go) + * @see org.eclipse.triquetrum.commands.tqcl.TqclPackage#getCompositeCommand_Start() + * @model containment="true" + * @generated + */ + Go getStart(); + + /** + * Sets the value of the '{@link org.eclipse.triquetrum.commands.tqcl.CompositeCommand#getStart Start}' containment reference. + * + * + * @param value the new value of the 'Start' containment reference. + * @see #getStart() + * @generated + */ + void setStart(Go value); + + /** + * Returns the value of the 'Commands' containment reference list. + * The list contents are of type {@link org.eclipse.triquetrum.commands.tqcl.Command}. + * + *

+ * If the meaning of the 'Commands' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Commands' containment reference list. + * @see org.eclipse.triquetrum.commands.tqcl.TqclPackage#getCompositeCommand_Commands() + * @model containment="true" + * @generated + */ + EList getCommands(); + + /** + * Returns the value of the 'End' containment reference. + * + *

+ * If the meaning of the 'End' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'End' containment reference. + * @see #setEnd(Go) + * @see org.eclipse.triquetrum.commands.tqcl.TqclPackage#getCompositeCommand_End() + * @model containment="true" + * @generated + */ + Go getEnd(); + + /** + * Sets the value of the '{@link org.eclipse.triquetrum.commands.tqcl.CompositeCommand#getEnd End}' containment reference. + * + * + * @param value the new value of the 'End' containment reference. + * @see #getEnd() + * @generated + */ + void setEnd(Go value); + +} // CompositeCommand diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/Connect.java b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/Connect.java new file mode 100644 index 00000000..af016bbc --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/Connect.java @@ -0,0 +1,70 @@ +/** + * ****************************************************************************** + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + * ****************************************************************************** + */ +package org.eclipse.triquetrum.commands.tqcl; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Connect'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.triquetrum.commands.tqcl.Connect#getFrom From}
  • + *
  • {@link org.eclipse.triquetrum.commands.tqcl.Connect#getTo To}
  • + *
+ * + * @see org.eclipse.triquetrum.commands.tqcl.TqclPackage#getConnect() + * @model + * @generated + */ +public interface Connect extends Command +{ + /** + * Returns the value of the 'From' containment reference list. + * The list contents are of type {@link org.eclipse.triquetrum.commands.tqcl.ConnectionPort}. + * + *

+ * If the meaning of the 'From' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'From' containment reference list. + * @see org.eclipse.triquetrum.commands.tqcl.TqclPackage#getConnect_From() + * @model containment="true" + * @generated + */ + EList getFrom(); + + /** + * Returns the value of the 'To' containment reference list. + * The list contents are of type {@link org.eclipse.triquetrum.commands.tqcl.ConnectionPort}. + * + *

+ * If the meaning of the 'To' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'To' containment reference list. + * @see org.eclipse.triquetrum.commands.tqcl.TqclPackage#getConnect_To() + * @model containment="true" + * @generated + */ + EList getTo(); + +} // Connect diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/ConnectionPort.java b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/ConnectionPort.java new file mode 100644 index 00000000..5f62acda --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/ConnectionPort.java @@ -0,0 +1,90 @@ +/** + * ****************************************************************************** + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + * ****************************************************************************** + */ +package org.eclipse.triquetrum.commands.tqcl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Connection Port'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.triquetrum.commands.tqcl.ConnectionPort#getActor Actor}
  • + *
  • {@link org.eclipse.triquetrum.commands.tqcl.ConnectionPort#getPort Port}
  • + *
+ * + * @see org.eclipse.triquetrum.commands.tqcl.TqclPackage#getConnectionPort() + * @model + * @generated + */ +public interface ConnectionPort extends EObject +{ + /** + * Returns the value of the 'Actor' reference. + * + *

+ * If the meaning of the 'Actor' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Actor' reference. + * @see #setActor(Insert) + * @see org.eclipse.triquetrum.commands.tqcl.TqclPackage#getConnectionPort_Actor() + * @model + * @generated + */ + Insert getActor(); + + /** + * Sets the value of the '{@link org.eclipse.triquetrum.commands.tqcl.ConnectionPort#getActor Actor}' reference. + * + * + * @param value the new value of the 'Actor' reference. + * @see #getActor() + * @generated + */ + void setActor(Insert value); + + /** + * Returns the value of the 'Port' attribute. + * + *

+ * If the meaning of the 'Port' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Port' attribute. + * @see #setPort(String) + * @see org.eclipse.triquetrum.commands.tqcl.TqclPackage#getConnectionPort_Port() + * @model + * @generated + */ + String getPort(); + + /** + * Sets the value of the '{@link org.eclipse.triquetrum.commands.tqcl.ConnectionPort#getPort Port}' attribute. + * + * + * @param value the new value of the 'Port' attribute. + * @see #getPort() + * @generated + */ + void setPort(String value); + +} // ConnectionPort diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/Go.java b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/Go.java new file mode 100644 index 00000000..a9180113 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/Go.java @@ -0,0 +1,90 @@ +/** + * ****************************************************************************** + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + * ****************************************************************************** + */ +package org.eclipse.triquetrum.commands.tqcl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Go'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.triquetrum.commands.tqcl.Go#getDirection Direction}
  • + *
  • {@link org.eclipse.triquetrum.commands.tqcl.Go#getActor Actor}
  • + *
+ * + * @see org.eclipse.triquetrum.commands.tqcl.TqclPackage#getGo() + * @model + * @generated + */ +public interface Go extends EObject +{ + /** + * Returns the value of the 'Direction' attribute. + * + *

+ * If the meaning of the 'Direction' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Direction' attribute. + * @see #setDirection(String) + * @see org.eclipse.triquetrum.commands.tqcl.TqclPackage#getGo_Direction() + * @model + * @generated + */ + String getDirection(); + + /** + * Sets the value of the '{@link org.eclipse.triquetrum.commands.tqcl.Go#getDirection Direction}' attribute. + * + * + * @param value the new value of the 'Direction' attribute. + * @see #getDirection() + * @generated + */ + void setDirection(String value); + + /** + * Returns the value of the 'Actor' reference. + * + *

+ * If the meaning of the 'Actor' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Actor' reference. + * @see #setActor(Insert) + * @see org.eclipse.triquetrum.commands.tqcl.TqclPackage#getGo_Actor() + * @model + * @generated + */ + Insert getActor(); + + /** + * Sets the value of the '{@link org.eclipse.triquetrum.commands.tqcl.Go#getActor Actor}' reference. + * + * + * @param value the new value of the 'Actor' reference. + * @see #getActor() + * @generated + */ + void setActor(Insert value); + +} // Go diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/Include.java b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/Include.java new file mode 100644 index 00000000..2efeb8b4 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/Include.java @@ -0,0 +1,62 @@ +/** + * ****************************************************************************** + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + * ****************************************************************************** + */ +package org.eclipse.triquetrum.commands.tqcl; + + +/** + * + * A representation of the model object 'Include'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.triquetrum.commands.tqcl.Include#getFilename Filename}
  • + *
+ * + * @see org.eclipse.triquetrum.commands.tqcl.TqclPackage#getInclude() + * @model + * @generated + */ +public interface Include extends Command +{ + /** + * Returns the value of the 'Filename' attribute. + * + *

+ * If the meaning of the 'Filename' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Filename' attribute. + * @see #setFilename(String) + * @see org.eclipse.triquetrum.commands.tqcl.TqclPackage#getInclude_Filename() + * @model + * @generated + */ + String getFilename(); + + /** + * Sets the value of the '{@link org.eclipse.triquetrum.commands.tqcl.Include#getFilename Filename}' attribute. + * + * + * @param value the new value of the 'Filename' attribute. + * @see #getFilename() + * @generated + */ + void setFilename(String value); + +} // Include diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/Insert.java b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/Insert.java new file mode 100644 index 00000000..d0ed2fa2 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/Insert.java @@ -0,0 +1,137 @@ +/** + * ****************************************************************************** + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + * ****************************************************************************** + */ +package org.eclipse.triquetrum.commands.tqcl; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Insert'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.triquetrum.commands.tqcl.Insert#getCategory Category}
  • + *
  • {@link org.eclipse.triquetrum.commands.tqcl.Insert#getEntityClass Entity Class}
  • + *
  • {@link org.eclipse.triquetrum.commands.tqcl.Insert#getName Name}
  • + *
  • {@link org.eclipse.triquetrum.commands.tqcl.Insert#getParameters Parameters}
  • + *
+ * + * @see org.eclipse.triquetrum.commands.tqcl.TqclPackage#getInsert() + * @model + * @generated + */ +public interface Insert extends Command +{ + /** + * Returns the value of the 'Category' attribute. + * The literals are from the enumeration {@link org.eclipse.triquetrum.commands.tqcl.Category}. + * + *

+ * If the meaning of the 'Category' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Category' attribute. + * @see org.eclipse.triquetrum.commands.tqcl.Category + * @see #setCategory(Category) + * @see org.eclipse.triquetrum.commands.tqcl.TqclPackage#getInsert_Category() + * @model + * @generated + */ + Category getCategory(); + + /** + * Sets the value of the '{@link org.eclipse.triquetrum.commands.tqcl.Insert#getCategory Category}' attribute. + * + * + * @param value the new value of the 'Category' attribute. + * @see org.eclipse.triquetrum.commands.tqcl.Category + * @see #getCategory() + * @generated + */ + void setCategory(Category value); + + /** + * Returns the value of the 'Entity Class' attribute. + * + *

+ * If the meaning of the 'Entity Class' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Entity Class' attribute. + * @see #setEntityClass(String) + * @see org.eclipse.triquetrum.commands.tqcl.TqclPackage#getInsert_EntityClass() + * @model + * @generated + */ + String getEntityClass(); + + /** + * Sets the value of the '{@link org.eclipse.triquetrum.commands.tqcl.Insert#getEntityClass Entity Class}' attribute. + * + * + * @param value the new value of the 'Entity Class' attribute. + * @see #getEntityClass() + * @generated + */ + void setEntityClass(String value); + + /** + * Returns the value of the 'Name' attribute. + * + *

+ * If the meaning of the 'Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see org.eclipse.triquetrum.commands.tqcl.TqclPackage#getInsert_Name() + * @model + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.eclipse.triquetrum.commands.tqcl.Insert#getName Name}' attribute. + * + * + * @param value the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the 'Parameters' containment reference list. + * The list contents are of type {@link org.eclipse.triquetrum.commands.tqcl.Parameter}. + * + *

+ * If the meaning of the 'Parameters' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Parameters' containment reference list. + * @see org.eclipse.triquetrum.commands.tqcl.TqclPackage#getInsert_Parameters() + * @model containment="true" + * @generated + */ + EList getParameters(); + +} // Insert diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/Library.java b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/Library.java new file mode 100644 index 00000000..c0d52569 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/Library.java @@ -0,0 +1,63 @@ +/** + * ****************************************************************************** + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + * ****************************************************************************** + */ +package org.eclipse.triquetrum.commands.tqcl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Library'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.triquetrum.commands.tqcl.Library#getName Name}
  • + *
+ * + * @see org.eclipse.triquetrum.commands.tqcl.TqclPackage#getLibrary() + * @model + * @generated + */ +public interface Library extends EObject +{ + /** + * Returns the value of the 'Name' attribute. + * + *

+ * If the meaning of the 'Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see org.eclipse.triquetrum.commands.tqcl.TqclPackage#getLibrary_Name() + * @model + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.eclipse.triquetrum.commands.tqcl.Library#getName Name}' attribute. + * + * + * @param value the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + +} // Library diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/Parameter.java b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/Parameter.java new file mode 100644 index 00000000..696250e8 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/Parameter.java @@ -0,0 +1,90 @@ +/** + * ****************************************************************************** + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + * ****************************************************************************** + */ +package org.eclipse.triquetrum.commands.tqcl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Parameter'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.triquetrum.commands.tqcl.Parameter#getId Id}
  • + *
  • {@link org.eclipse.triquetrum.commands.tqcl.Parameter#getValue Value}
  • + *
+ * + * @see org.eclipse.triquetrum.commands.tqcl.TqclPackage#getParameter() + * @model + * @generated + */ +public interface Parameter extends EObject +{ + /** + * Returns the value of the 'Id' attribute. + * + *

+ * If the meaning of the 'Id' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Id' attribute. + * @see #setId(String) + * @see org.eclipse.triquetrum.commands.tqcl.TqclPackage#getParameter_Id() + * @model + * @generated + */ + String getId(); + + /** + * Sets the value of the '{@link org.eclipse.triquetrum.commands.tqcl.Parameter#getId Id}' attribute. + * + * + * @param value the new value of the 'Id' attribute. + * @see #getId() + * @generated + */ + void setId(String value); + + /** + * Returns the value of the 'Value' attribute. + * + *

+ * If the meaning of the 'Value' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Value' attribute. + * @see #setValue(String) + * @see org.eclipse.triquetrum.commands.tqcl.TqclPackage#getParameter_Value() + * @model + * @generated + */ + String getValue(); + + /** + * Sets the value of the '{@link org.eclipse.triquetrum.commands.tqcl.Parameter#getValue Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #getValue() + * @generated + */ + void setValue(String value); + +} // Parameter diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/Set.java b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/Set.java new file mode 100644 index 00000000..0c11353e --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/Set.java @@ -0,0 +1,62 @@ +/** + * ****************************************************************************** + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + * ****************************************************************************** + */ +package org.eclipse.triquetrum.commands.tqcl; + + +/** + * + * A representation of the model object 'Set'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.triquetrum.commands.tqcl.Set#getParam Param}
  • + *
+ * + * @see org.eclipse.triquetrum.commands.tqcl.TqclPackage#getSet() + * @model + * @generated + */ +public interface Set extends Command +{ + /** + * Returns the value of the 'Param' containment reference. + * + *

+ * If the meaning of the 'Param' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Param' containment reference. + * @see #setParam(Parameter) + * @see org.eclipse.triquetrum.commands.tqcl.TqclPackage#getSet_Param() + * @model containment="true" + * @generated + */ + Parameter getParam(); + + /** + * Sets the value of the '{@link org.eclipse.triquetrum.commands.tqcl.Set#getParam Param}' containment reference. + * + * + * @param value the new value of the 'Param' containment reference. + * @see #getParam() + * @generated + */ + void setParam(Parameter value); + +} // Set diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/TqclFactory.java b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/TqclFactory.java new file mode 100644 index 00000000..35cbae8d --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/TqclFactory.java @@ -0,0 +1,145 @@ +/** + * ****************************************************************************** + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + * ****************************************************************************** + */ +package org.eclipse.triquetrum.commands.tqcl; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.eclipse.triquetrum.commands.tqcl.TqclPackage + * @generated + */ +public interface TqclFactory extends EFactory +{ + /** + * The singleton instance of the factory. + * + * + * @generated + */ + TqclFactory eINSTANCE = org.eclipse.triquetrum.commands.tqcl.impl.TqclFactoryImpl.init(); + + /** + * Returns a new object of class 'Triquetrum Script'. + * + * + * @return a new object of class 'Triquetrum Script'. + * @generated + */ + TriquetrumScript createTriquetrumScript(); + + /** + * Returns a new object of class 'Composite Command'. + * + * + * @return a new object of class 'Composite Command'. + * @generated + */ + CompositeCommand createCompositeCommand(); + + /** + * Returns a new object of class 'Command'. + * + * + * @return a new object of class 'Command'. + * @generated + */ + Command createCommand(); + + /** + * Returns a new object of class 'Include'. + * + * + * @return a new object of class 'Include'. + * @generated + */ + Include createInclude(); + + /** + * Returns a new object of class 'Library'. + * + * + * @return a new object of class 'Library'. + * @generated + */ + Library createLibrary(); + + /** + * Returns a new object of class 'Insert'. + * + * + * @return a new object of class 'Insert'. + * @generated + */ + Insert createInsert(); + + /** + * Returns a new object of class 'Set'. + * + * + * @return a new object of class 'Set'. + * @generated + */ + Set createSet(); + + /** + * Returns a new object of class 'Connect'. + * + * + * @return a new object of class 'Connect'. + * @generated + */ + Connect createConnect(); + + /** + * Returns a new object of class 'Connection Port'. + * + * + * @return a new object of class 'Connection Port'. + * @generated + */ + ConnectionPort createConnectionPort(); + + /** + * Returns a new object of class 'Go'. + * + * + * @return a new object of class 'Go'. + * @generated + */ + Go createGo(); + + /** + * Returns a new object of class 'Parameter'. + * + * + * @return a new object of class 'Parameter'. + * @generated + */ + Parameter createParameter(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + TqclPackage getTqclPackage(); + +} //TqclFactory diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/TqclPackage.java b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/TqclPackage.java new file mode 100644 index 00000000..09595662 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/TqclPackage.java @@ -0,0 +1,1117 @@ +/** + * ****************************************************************************** + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + * ****************************************************************************** + */ +package org.eclipse.triquetrum.commands.tqcl; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.eclipse.triquetrum.commands.tqcl.TqclFactory + * @model kind="package" + * @generated + */ +public interface TqclPackage extends EPackage +{ + /** + * The package name. + * + * + * @generated + */ + String eNAME = "tqcl"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "http://www.eclipse.org/triquetrum/commands/Tqcl"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "tqcl"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + TqclPackage eINSTANCE = org.eclipse.triquetrum.commands.tqcl.impl.TqclPackageImpl.init(); + + /** + * The meta object id for the '{@link org.eclipse.triquetrum.commands.tqcl.impl.TriquetrumScriptImpl Triquetrum Script}' class. + * + * + * @see org.eclipse.triquetrum.commands.tqcl.impl.TriquetrumScriptImpl + * @see org.eclipse.triquetrum.commands.tqcl.impl.TqclPackageImpl#getTriquetrumScript() + * @generated + */ + int TRIQUETRUM_SCRIPT = 0; + + /** + * The feature id for the 'Libraries' containment reference list. + * + * + * @generated + * @ordered + */ + int TRIQUETRUM_SCRIPT__LIBRARIES = 0; + + /** + * The feature id for the 'Commands' containment reference list. + * + * + * @generated + * @ordered + */ + int TRIQUETRUM_SCRIPT__COMMANDS = 1; + + /** + * The number of structural features of the 'Triquetrum Script' class. + * + * + * @generated + * @ordered + */ + int TRIQUETRUM_SCRIPT_FEATURE_COUNT = 2; + + /** + * The meta object id for the '{@link org.eclipse.triquetrum.commands.tqcl.impl.CommandImpl Command}' class. + * + * + * @see org.eclipse.triquetrum.commands.tqcl.impl.CommandImpl + * @see org.eclipse.triquetrum.commands.tqcl.impl.TqclPackageImpl#getCommand() + * @generated + */ + int COMMAND = 2; + + /** + * The number of structural features of the 'Command' class. + * + * + * @generated + * @ordered + */ + int COMMAND_FEATURE_COUNT = 0; + + /** + * The meta object id for the '{@link org.eclipse.triquetrum.commands.tqcl.impl.CompositeCommandImpl Composite Command}' class. + * + * + * @see org.eclipse.triquetrum.commands.tqcl.impl.CompositeCommandImpl + * @see org.eclipse.triquetrum.commands.tqcl.impl.TqclPackageImpl#getCompositeCommand() + * @generated + */ + int COMPOSITE_COMMAND = 1; + + /** + * The feature id for the 'Start' containment reference. + * + * + * @generated + * @ordered + */ + int COMPOSITE_COMMAND__START = COMMAND_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Commands' containment reference list. + * + * + * @generated + * @ordered + */ + int COMPOSITE_COMMAND__COMMANDS = COMMAND_FEATURE_COUNT + 1; + + /** + * The feature id for the 'End' containment reference. + * + * + * @generated + * @ordered + */ + int COMPOSITE_COMMAND__END = COMMAND_FEATURE_COUNT + 2; + + /** + * The number of structural features of the 'Composite Command' class. + * + * + * @generated + * @ordered + */ + int COMPOSITE_COMMAND_FEATURE_COUNT = COMMAND_FEATURE_COUNT + 3; + + /** + * The meta object id for the '{@link org.eclipse.triquetrum.commands.tqcl.impl.IncludeImpl Include}' class. + * + * + * @see org.eclipse.triquetrum.commands.tqcl.impl.IncludeImpl + * @see org.eclipse.triquetrum.commands.tqcl.impl.TqclPackageImpl#getInclude() + * @generated + */ + int INCLUDE = 3; + + /** + * The feature id for the 'Filename' attribute. + * + * + * @generated + * @ordered + */ + int INCLUDE__FILENAME = COMMAND_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Include' class. + * + * + * @generated + * @ordered + */ + int INCLUDE_FEATURE_COUNT = COMMAND_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link org.eclipse.triquetrum.commands.tqcl.impl.LibraryImpl Library}' class. + * + * + * @see org.eclipse.triquetrum.commands.tqcl.impl.LibraryImpl + * @see org.eclipse.triquetrum.commands.tqcl.impl.TqclPackageImpl#getLibrary() + * @generated + */ + int LIBRARY = 4; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int LIBRARY__NAME = 0; + + /** + * The number of structural features of the 'Library' class. + * + * + * @generated + * @ordered + */ + int LIBRARY_FEATURE_COUNT = 1; + + /** + * The meta object id for the '{@link org.eclipse.triquetrum.commands.tqcl.impl.InsertImpl Insert}' class. + * + * + * @see org.eclipse.triquetrum.commands.tqcl.impl.InsertImpl + * @see org.eclipse.triquetrum.commands.tqcl.impl.TqclPackageImpl#getInsert() + * @generated + */ + int INSERT = 5; + + /** + * The feature id for the 'Category' attribute. + * + * + * @generated + * @ordered + */ + int INSERT__CATEGORY = COMMAND_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Entity Class' attribute. + * + * + * @generated + * @ordered + */ + int INSERT__ENTITY_CLASS = COMMAND_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int INSERT__NAME = COMMAND_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Parameters' containment reference list. + * + * + * @generated + * @ordered + */ + int INSERT__PARAMETERS = COMMAND_FEATURE_COUNT + 3; + + /** + * The number of structural features of the 'Insert' class. + * + * + * @generated + * @ordered + */ + int INSERT_FEATURE_COUNT = COMMAND_FEATURE_COUNT + 4; + + /** + * The meta object id for the '{@link org.eclipse.triquetrum.commands.tqcl.impl.SetImpl Set}' class. + * + * + * @see org.eclipse.triquetrum.commands.tqcl.impl.SetImpl + * @see org.eclipse.triquetrum.commands.tqcl.impl.TqclPackageImpl#getSet() + * @generated + */ + int SET = 6; + + /** + * The feature id for the 'Param' containment reference. + * + * + * @generated + * @ordered + */ + int SET__PARAM = COMMAND_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Set' class. + * + * + * @generated + * @ordered + */ + int SET_FEATURE_COUNT = COMMAND_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link org.eclipse.triquetrum.commands.tqcl.impl.ConnectImpl Connect}' class. + * + * + * @see org.eclipse.triquetrum.commands.tqcl.impl.ConnectImpl + * @see org.eclipse.triquetrum.commands.tqcl.impl.TqclPackageImpl#getConnect() + * @generated + */ + int CONNECT = 7; + + /** + * The feature id for the 'From' containment reference list. + * + * + * @generated + * @ordered + */ + int CONNECT__FROM = COMMAND_FEATURE_COUNT + 0; + + /** + * The feature id for the 'To' containment reference list. + * + * + * @generated + * @ordered + */ + int CONNECT__TO = COMMAND_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Connect' class. + * + * + * @generated + * @ordered + */ + int CONNECT_FEATURE_COUNT = COMMAND_FEATURE_COUNT + 2; + + /** + * The meta object id for the '{@link org.eclipse.triquetrum.commands.tqcl.impl.ConnectionPortImpl Connection Port}' class. + * + * + * @see org.eclipse.triquetrum.commands.tqcl.impl.ConnectionPortImpl + * @see org.eclipse.triquetrum.commands.tqcl.impl.TqclPackageImpl#getConnectionPort() + * @generated + */ + int CONNECTION_PORT = 8; + + /** + * The feature id for the 'Actor' reference. + * + * + * @generated + * @ordered + */ + int CONNECTION_PORT__ACTOR = 0; + + /** + * The feature id for the 'Port' attribute. + * + * + * @generated + * @ordered + */ + int CONNECTION_PORT__PORT = 1; + + /** + * The number of structural features of the 'Connection Port' class. + * + * + * @generated + * @ordered + */ + int CONNECTION_PORT_FEATURE_COUNT = 2; + + /** + * The meta object id for the '{@link org.eclipse.triquetrum.commands.tqcl.impl.GoImpl Go}' class. + * + * + * @see org.eclipse.triquetrum.commands.tqcl.impl.GoImpl + * @see org.eclipse.triquetrum.commands.tqcl.impl.TqclPackageImpl#getGo() + * @generated + */ + int GO = 9; + + /** + * The feature id for the 'Direction' attribute. + * + * + * @generated + * @ordered + */ + int GO__DIRECTION = 0; + + /** + * The feature id for the 'Actor' reference. + * + * + * @generated + * @ordered + */ + int GO__ACTOR = 1; + + /** + * The number of structural features of the 'Go' class. + * + * + * @generated + * @ordered + */ + int GO_FEATURE_COUNT = 2; + + /** + * The meta object id for the '{@link org.eclipse.triquetrum.commands.tqcl.impl.ParameterImpl Parameter}' class. + * + * + * @see org.eclipse.triquetrum.commands.tqcl.impl.ParameterImpl + * @see org.eclipse.triquetrum.commands.tqcl.impl.TqclPackageImpl#getParameter() + * @generated + */ + int PARAMETER = 10; + + /** + * The feature id for the 'Id' attribute. + * + * + * @generated + * @ordered + */ + int PARAMETER__ID = 0; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int PARAMETER__VALUE = 1; + + /** + * The number of structural features of the 'Parameter' class. + * + * + * @generated + * @ordered + */ + int PARAMETER_FEATURE_COUNT = 2; + + /** + * The meta object id for the '{@link org.eclipse.triquetrum.commands.tqcl.Category Category}' enum. + * + * + * @see org.eclipse.triquetrum.commands.tqcl.Category + * @see org.eclipse.triquetrum.commands.tqcl.impl.TqclPackageImpl#getCategory() + * @generated + */ + int CATEGORY = 11; + + + /** + * Returns the meta object for class '{@link org.eclipse.triquetrum.commands.tqcl.TriquetrumScript Triquetrum Script}'. + * + * + * @return the meta object for class 'Triquetrum Script'. + * @see org.eclipse.triquetrum.commands.tqcl.TriquetrumScript + * @generated + */ + EClass getTriquetrumScript(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.triquetrum.commands.tqcl.TriquetrumScript#getLibraries Libraries}'. + * + * + * @return the meta object for the containment reference list 'Libraries'. + * @see org.eclipse.triquetrum.commands.tqcl.TriquetrumScript#getLibraries() + * @see #getTriquetrumScript() + * @generated + */ + EReference getTriquetrumScript_Libraries(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.triquetrum.commands.tqcl.TriquetrumScript#getCommands Commands}'. + * + * + * @return the meta object for the containment reference list 'Commands'. + * @see org.eclipse.triquetrum.commands.tqcl.TriquetrumScript#getCommands() + * @see #getTriquetrumScript() + * @generated + */ + EReference getTriquetrumScript_Commands(); + + /** + * Returns the meta object for class '{@link org.eclipse.triquetrum.commands.tqcl.CompositeCommand Composite Command}'. + * + * + * @return the meta object for class 'Composite Command'. + * @see org.eclipse.triquetrum.commands.tqcl.CompositeCommand + * @generated + */ + EClass getCompositeCommand(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.triquetrum.commands.tqcl.CompositeCommand#getStart Start}'. + * + * + * @return the meta object for the containment reference 'Start'. + * @see org.eclipse.triquetrum.commands.tqcl.CompositeCommand#getStart() + * @see #getCompositeCommand() + * @generated + */ + EReference getCompositeCommand_Start(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.triquetrum.commands.tqcl.CompositeCommand#getCommands Commands}'. + * + * + * @return the meta object for the containment reference list 'Commands'. + * @see org.eclipse.triquetrum.commands.tqcl.CompositeCommand#getCommands() + * @see #getCompositeCommand() + * @generated + */ + EReference getCompositeCommand_Commands(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.triquetrum.commands.tqcl.CompositeCommand#getEnd End}'. + * + * + * @return the meta object for the containment reference 'End'. + * @see org.eclipse.triquetrum.commands.tqcl.CompositeCommand#getEnd() + * @see #getCompositeCommand() + * @generated + */ + EReference getCompositeCommand_End(); + + /** + * Returns the meta object for class '{@link org.eclipse.triquetrum.commands.tqcl.Command Command}'. + * + * + * @return the meta object for class 'Command'. + * @see org.eclipse.triquetrum.commands.tqcl.Command + * @generated + */ + EClass getCommand(); + + /** + * Returns the meta object for class '{@link org.eclipse.triquetrum.commands.tqcl.Include Include}'. + * + * + * @return the meta object for class 'Include'. + * @see org.eclipse.triquetrum.commands.tqcl.Include + * @generated + */ + EClass getInclude(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.triquetrum.commands.tqcl.Include#getFilename Filename}'. + * + * + * @return the meta object for the attribute 'Filename'. + * @see org.eclipse.triquetrum.commands.tqcl.Include#getFilename() + * @see #getInclude() + * @generated + */ + EAttribute getInclude_Filename(); + + /** + * Returns the meta object for class '{@link org.eclipse.triquetrum.commands.tqcl.Library Library}'. + * + * + * @return the meta object for class 'Library'. + * @see org.eclipse.triquetrum.commands.tqcl.Library + * @generated + */ + EClass getLibrary(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.triquetrum.commands.tqcl.Library#getName Name}'. + * + * + * @return the meta object for the attribute 'Name'. + * @see org.eclipse.triquetrum.commands.tqcl.Library#getName() + * @see #getLibrary() + * @generated + */ + EAttribute getLibrary_Name(); + + /** + * Returns the meta object for class '{@link org.eclipse.triquetrum.commands.tqcl.Insert Insert}'. + * + * + * @return the meta object for class 'Insert'. + * @see org.eclipse.triquetrum.commands.tqcl.Insert + * @generated + */ + EClass getInsert(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.triquetrum.commands.tqcl.Insert#getCategory Category}'. + * + * + * @return the meta object for the attribute 'Category'. + * @see org.eclipse.triquetrum.commands.tqcl.Insert#getCategory() + * @see #getInsert() + * @generated + */ + EAttribute getInsert_Category(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.triquetrum.commands.tqcl.Insert#getEntityClass Entity Class}'. + * + * + * @return the meta object for the attribute 'Entity Class'. + * @see org.eclipse.triquetrum.commands.tqcl.Insert#getEntityClass() + * @see #getInsert() + * @generated + */ + EAttribute getInsert_EntityClass(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.triquetrum.commands.tqcl.Insert#getName Name}'. + * + * + * @return the meta object for the attribute 'Name'. + * @see org.eclipse.triquetrum.commands.tqcl.Insert#getName() + * @see #getInsert() + * @generated + */ + EAttribute getInsert_Name(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.triquetrum.commands.tqcl.Insert#getParameters Parameters}'. + * + * + * @return the meta object for the containment reference list 'Parameters'. + * @see org.eclipse.triquetrum.commands.tqcl.Insert#getParameters() + * @see #getInsert() + * @generated + */ + EReference getInsert_Parameters(); + + /** + * Returns the meta object for class '{@link org.eclipse.triquetrum.commands.tqcl.Set Set}'. + * + * + * @return the meta object for class 'Set'. + * @see org.eclipse.triquetrum.commands.tqcl.Set + * @generated + */ + EClass getSet(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.triquetrum.commands.tqcl.Set#getParam Param}'. + * + * + * @return the meta object for the containment reference 'Param'. + * @see org.eclipse.triquetrum.commands.tqcl.Set#getParam() + * @see #getSet() + * @generated + */ + EReference getSet_Param(); + + /** + * Returns the meta object for class '{@link org.eclipse.triquetrum.commands.tqcl.Connect Connect}'. + * + * + * @return the meta object for class 'Connect'. + * @see org.eclipse.triquetrum.commands.tqcl.Connect + * @generated + */ + EClass getConnect(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.triquetrum.commands.tqcl.Connect#getFrom From}'. + * + * + * @return the meta object for the containment reference list 'From'. + * @see org.eclipse.triquetrum.commands.tqcl.Connect#getFrom() + * @see #getConnect() + * @generated + */ + EReference getConnect_From(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.triquetrum.commands.tqcl.Connect#getTo To}'. + * + * + * @return the meta object for the containment reference list 'To'. + * @see org.eclipse.triquetrum.commands.tqcl.Connect#getTo() + * @see #getConnect() + * @generated + */ + EReference getConnect_To(); + + /** + * Returns the meta object for class '{@link org.eclipse.triquetrum.commands.tqcl.ConnectionPort Connection Port}'. + * + * + * @return the meta object for class 'Connection Port'. + * @see org.eclipse.triquetrum.commands.tqcl.ConnectionPort + * @generated + */ + EClass getConnectionPort(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.triquetrum.commands.tqcl.ConnectionPort#getActor Actor}'. + * + * + * @return the meta object for the reference 'Actor'. + * @see org.eclipse.triquetrum.commands.tqcl.ConnectionPort#getActor() + * @see #getConnectionPort() + * @generated + */ + EReference getConnectionPort_Actor(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.triquetrum.commands.tqcl.ConnectionPort#getPort Port}'. + * + * + * @return the meta object for the attribute 'Port'. + * @see org.eclipse.triquetrum.commands.tqcl.ConnectionPort#getPort() + * @see #getConnectionPort() + * @generated + */ + EAttribute getConnectionPort_Port(); + + /** + * Returns the meta object for class '{@link org.eclipse.triquetrum.commands.tqcl.Go Go}'. + * + * + * @return the meta object for class 'Go'. + * @see org.eclipse.triquetrum.commands.tqcl.Go + * @generated + */ + EClass getGo(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.triquetrum.commands.tqcl.Go#getDirection Direction}'. + * + * + * @return the meta object for the attribute 'Direction'. + * @see org.eclipse.triquetrum.commands.tqcl.Go#getDirection() + * @see #getGo() + * @generated + */ + EAttribute getGo_Direction(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.triquetrum.commands.tqcl.Go#getActor Actor}'. + * + * + * @return the meta object for the reference 'Actor'. + * @see org.eclipse.triquetrum.commands.tqcl.Go#getActor() + * @see #getGo() + * @generated + */ + EReference getGo_Actor(); + + /** + * Returns the meta object for class '{@link org.eclipse.triquetrum.commands.tqcl.Parameter Parameter}'. + * + * + * @return the meta object for class 'Parameter'. + * @see org.eclipse.triquetrum.commands.tqcl.Parameter + * @generated + */ + EClass getParameter(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.triquetrum.commands.tqcl.Parameter#getId Id}'. + * + * + * @return the meta object for the attribute 'Id'. + * @see org.eclipse.triquetrum.commands.tqcl.Parameter#getId() + * @see #getParameter() + * @generated + */ + EAttribute getParameter_Id(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.triquetrum.commands.tqcl.Parameter#getValue Value}'. + * + * + * @return the meta object for the attribute 'Value'. + * @see org.eclipse.triquetrum.commands.tqcl.Parameter#getValue() + * @see #getParameter() + * @generated + */ + EAttribute getParameter_Value(); + + /** + * Returns the meta object for enum '{@link org.eclipse.triquetrum.commands.tqcl.Category Category}'. + * + * + * @return the meta object for enum 'Category'. + * @see org.eclipse.triquetrum.commands.tqcl.Category + * @generated + */ + EEnum getCategory(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + TqclFactory getTqclFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals + { + /** + * The meta object literal for the '{@link org.eclipse.triquetrum.commands.tqcl.impl.TriquetrumScriptImpl Triquetrum Script}' class. + * + * + * @see org.eclipse.triquetrum.commands.tqcl.impl.TriquetrumScriptImpl + * @see org.eclipse.triquetrum.commands.tqcl.impl.TqclPackageImpl#getTriquetrumScript() + * @generated + */ + EClass TRIQUETRUM_SCRIPT = eINSTANCE.getTriquetrumScript(); + + /** + * The meta object literal for the 'Libraries' containment reference list feature. + * + * + * @generated + */ + EReference TRIQUETRUM_SCRIPT__LIBRARIES = eINSTANCE.getTriquetrumScript_Libraries(); + + /** + * The meta object literal for the 'Commands' containment reference list feature. + * + * + * @generated + */ + EReference TRIQUETRUM_SCRIPT__COMMANDS = eINSTANCE.getTriquetrumScript_Commands(); + + /** + * The meta object literal for the '{@link org.eclipse.triquetrum.commands.tqcl.impl.CompositeCommandImpl Composite Command}' class. + * + * + * @see org.eclipse.triquetrum.commands.tqcl.impl.CompositeCommandImpl + * @see org.eclipse.triquetrum.commands.tqcl.impl.TqclPackageImpl#getCompositeCommand() + * @generated + */ + EClass COMPOSITE_COMMAND = eINSTANCE.getCompositeCommand(); + + /** + * The meta object literal for the 'Start' containment reference feature. + * + * + * @generated + */ + EReference COMPOSITE_COMMAND__START = eINSTANCE.getCompositeCommand_Start(); + + /** + * The meta object literal for the 'Commands' containment reference list feature. + * + * + * @generated + */ + EReference COMPOSITE_COMMAND__COMMANDS = eINSTANCE.getCompositeCommand_Commands(); + + /** + * The meta object literal for the 'End' containment reference feature. + * + * + * @generated + */ + EReference COMPOSITE_COMMAND__END = eINSTANCE.getCompositeCommand_End(); + + /** + * The meta object literal for the '{@link org.eclipse.triquetrum.commands.tqcl.impl.CommandImpl Command}' class. + * + * + * @see org.eclipse.triquetrum.commands.tqcl.impl.CommandImpl + * @see org.eclipse.triquetrum.commands.tqcl.impl.TqclPackageImpl#getCommand() + * @generated + */ + EClass COMMAND = eINSTANCE.getCommand(); + + /** + * The meta object literal for the '{@link org.eclipse.triquetrum.commands.tqcl.impl.IncludeImpl Include}' class. + * + * + * @see org.eclipse.triquetrum.commands.tqcl.impl.IncludeImpl + * @see org.eclipse.triquetrum.commands.tqcl.impl.TqclPackageImpl#getInclude() + * @generated + */ + EClass INCLUDE = eINSTANCE.getInclude(); + + /** + * The meta object literal for the 'Filename' attribute feature. + * + * + * @generated + */ + EAttribute INCLUDE__FILENAME = eINSTANCE.getInclude_Filename(); + + /** + * The meta object literal for the '{@link org.eclipse.triquetrum.commands.tqcl.impl.LibraryImpl Library}' class. + * + * + * @see org.eclipse.triquetrum.commands.tqcl.impl.LibraryImpl + * @see org.eclipse.triquetrum.commands.tqcl.impl.TqclPackageImpl#getLibrary() + * @generated + */ + EClass LIBRARY = eINSTANCE.getLibrary(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * + * @generated + */ + EAttribute LIBRARY__NAME = eINSTANCE.getLibrary_Name(); + + /** + * The meta object literal for the '{@link org.eclipse.triquetrum.commands.tqcl.impl.InsertImpl Insert}' class. + * + * + * @see org.eclipse.triquetrum.commands.tqcl.impl.InsertImpl + * @see org.eclipse.triquetrum.commands.tqcl.impl.TqclPackageImpl#getInsert() + * @generated + */ + EClass INSERT = eINSTANCE.getInsert(); + + /** + * The meta object literal for the 'Category' attribute feature. + * + * + * @generated + */ + EAttribute INSERT__CATEGORY = eINSTANCE.getInsert_Category(); + + /** + * The meta object literal for the 'Entity Class' attribute feature. + * + * + * @generated + */ + EAttribute INSERT__ENTITY_CLASS = eINSTANCE.getInsert_EntityClass(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * + * @generated + */ + EAttribute INSERT__NAME = eINSTANCE.getInsert_Name(); + + /** + * The meta object literal for the 'Parameters' containment reference list feature. + * + * + * @generated + */ + EReference INSERT__PARAMETERS = eINSTANCE.getInsert_Parameters(); + + /** + * The meta object literal for the '{@link org.eclipse.triquetrum.commands.tqcl.impl.SetImpl Set}' class. + * + * + * @see org.eclipse.triquetrum.commands.tqcl.impl.SetImpl + * @see org.eclipse.triquetrum.commands.tqcl.impl.TqclPackageImpl#getSet() + * @generated + */ + EClass SET = eINSTANCE.getSet(); + + /** + * The meta object literal for the 'Param' containment reference feature. + * + * + * @generated + */ + EReference SET__PARAM = eINSTANCE.getSet_Param(); + + /** + * The meta object literal for the '{@link org.eclipse.triquetrum.commands.tqcl.impl.ConnectImpl Connect}' class. + * + * + * @see org.eclipse.triquetrum.commands.tqcl.impl.ConnectImpl + * @see org.eclipse.triquetrum.commands.tqcl.impl.TqclPackageImpl#getConnect() + * @generated + */ + EClass CONNECT = eINSTANCE.getConnect(); + + /** + * The meta object literal for the 'From' containment reference list feature. + * + * + * @generated + */ + EReference CONNECT__FROM = eINSTANCE.getConnect_From(); + + /** + * The meta object literal for the 'To' containment reference list feature. + * + * + * @generated + */ + EReference CONNECT__TO = eINSTANCE.getConnect_To(); + + /** + * The meta object literal for the '{@link org.eclipse.triquetrum.commands.tqcl.impl.ConnectionPortImpl Connection Port}' class. + * + * + * @see org.eclipse.triquetrum.commands.tqcl.impl.ConnectionPortImpl + * @see org.eclipse.triquetrum.commands.tqcl.impl.TqclPackageImpl#getConnectionPort() + * @generated + */ + EClass CONNECTION_PORT = eINSTANCE.getConnectionPort(); + + /** + * The meta object literal for the 'Actor' reference feature. + * + * + * @generated + */ + EReference CONNECTION_PORT__ACTOR = eINSTANCE.getConnectionPort_Actor(); + + /** + * The meta object literal for the 'Port' attribute feature. + * + * + * @generated + */ + EAttribute CONNECTION_PORT__PORT = eINSTANCE.getConnectionPort_Port(); + + /** + * The meta object literal for the '{@link org.eclipse.triquetrum.commands.tqcl.impl.GoImpl Go}' class. + * + * + * @see org.eclipse.triquetrum.commands.tqcl.impl.GoImpl + * @see org.eclipse.triquetrum.commands.tqcl.impl.TqclPackageImpl#getGo() + * @generated + */ + EClass GO = eINSTANCE.getGo(); + + /** + * The meta object literal for the 'Direction' attribute feature. + * + * + * @generated + */ + EAttribute GO__DIRECTION = eINSTANCE.getGo_Direction(); + + /** + * The meta object literal for the 'Actor' reference feature. + * + * + * @generated + */ + EReference GO__ACTOR = eINSTANCE.getGo_Actor(); + + /** + * The meta object literal for the '{@link org.eclipse.triquetrum.commands.tqcl.impl.ParameterImpl Parameter}' class. + * + * + * @see org.eclipse.triquetrum.commands.tqcl.impl.ParameterImpl + * @see org.eclipse.triquetrum.commands.tqcl.impl.TqclPackageImpl#getParameter() + * @generated + */ + EClass PARAMETER = eINSTANCE.getParameter(); + + /** + * The meta object literal for the 'Id' attribute feature. + * + * + * @generated + */ + EAttribute PARAMETER__ID = eINSTANCE.getParameter_Id(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute PARAMETER__VALUE = eINSTANCE.getParameter_Value(); + + /** + * The meta object literal for the '{@link org.eclipse.triquetrum.commands.tqcl.Category Category}' enum. + * + * + * @see org.eclipse.triquetrum.commands.tqcl.Category + * @see org.eclipse.triquetrum.commands.tqcl.impl.TqclPackageImpl#getCategory() + * @generated + */ + EEnum CATEGORY = eINSTANCE.getCategory(); + + } + +} //TqclPackage diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/TriquetrumScript.java b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/TriquetrumScript.java new file mode 100644 index 00000000..33d1ce73 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/TriquetrumScript.java @@ -0,0 +1,72 @@ +/** + * ****************************************************************************** + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + * ****************************************************************************** + */ +package org.eclipse.triquetrum.commands.tqcl; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Triquetrum Script'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.triquetrum.commands.tqcl.TriquetrumScript#getLibraries Libraries}
  • + *
  • {@link org.eclipse.triquetrum.commands.tqcl.TriquetrumScript#getCommands Commands}
  • + *
+ * + * @see org.eclipse.triquetrum.commands.tqcl.TqclPackage#getTriquetrumScript() + * @model + * @generated + */ +public interface TriquetrumScript extends EObject +{ + /** + * Returns the value of the 'Libraries' containment reference list. + * The list contents are of type {@link org.eclipse.triquetrum.commands.tqcl.Library}. + * + *

+ * If the meaning of the 'Libraries' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Libraries' containment reference list. + * @see org.eclipse.triquetrum.commands.tqcl.TqclPackage#getTriquetrumScript_Libraries() + * @model containment="true" + * @generated + */ + EList getLibraries(); + + /** + * Returns the value of the 'Commands' containment reference list. + * The list contents are of type {@link org.eclipse.triquetrum.commands.tqcl.Command}. + * + *

+ * If the meaning of the 'Commands' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Commands' containment reference list. + * @see org.eclipse.triquetrum.commands.tqcl.TqclPackage#getTriquetrumScript_Commands() + * @model containment="true" + * @generated + */ + EList getCommands(); + +} // TriquetrumScript diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/impl/CommandImpl.java b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/impl/CommandImpl.java new file mode 100644 index 00000000..532dac1f --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/impl/CommandImpl.java @@ -0,0 +1,54 @@ +/** + * ****************************************************************************** + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + * ****************************************************************************** + */ +package org.eclipse.triquetrum.commands.tqcl.impl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.triquetrum.commands.tqcl.Command; +import org.eclipse.triquetrum.commands.tqcl.TqclPackage; + +/** + * + * An implementation of the model object 'Command'. + * + * + * @generated + */ +public class CommandImpl extends MinimalEObjectImpl.Container implements Command +{ + /** + * + * + * @generated + */ + protected CommandImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return TqclPackage.Literals.COMMAND; + } + +} //CommandImpl diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/impl/CompositeCommandImpl.java b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/impl/CompositeCommandImpl.java new file mode 100644 index 00000000..e26fa36a --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/impl/CompositeCommandImpl.java @@ -0,0 +1,323 @@ +/** + * ****************************************************************************** + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + * ****************************************************************************** + */ +package org.eclipse.triquetrum.commands.tqcl.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.triquetrum.commands.tqcl.Command; +import org.eclipse.triquetrum.commands.tqcl.CompositeCommand; +import org.eclipse.triquetrum.commands.tqcl.Go; +import org.eclipse.triquetrum.commands.tqcl.TqclPackage; + +/** + * + * An implementation of the model object 'Composite Command'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.triquetrum.commands.tqcl.impl.CompositeCommandImpl#getStart Start}
  • + *
  • {@link org.eclipse.triquetrum.commands.tqcl.impl.CompositeCommandImpl#getCommands Commands}
  • + *
  • {@link org.eclipse.triquetrum.commands.tqcl.impl.CompositeCommandImpl#getEnd End}
  • + *
+ * + * @generated + */ +public class CompositeCommandImpl extends CommandImpl implements CompositeCommand +{ + /** + * The cached value of the '{@link #getStart() Start}' containment reference. + * + * + * @see #getStart() + * @generated + * @ordered + */ + protected Go start; + + /** + * The cached value of the '{@link #getCommands() Commands}' containment reference list. + * + * + * @see #getCommands() + * @generated + * @ordered + */ + protected EList commands; + + /** + * The cached value of the '{@link #getEnd() End}' containment reference. + * + * + * @see #getEnd() + * @generated + * @ordered + */ + protected Go end; + + /** + * + * + * @generated + */ + protected CompositeCommandImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return TqclPackage.Literals.COMPOSITE_COMMAND; + } + + /** + * + * + * @generated + */ + public Go getStart() + { + return start; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetStart(Go newStart, NotificationChain msgs) + { + Go oldStart = start; + start = newStart; + if (eNotificationRequired()) + { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TqclPackage.COMPOSITE_COMMAND__START, oldStart, newStart); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setStart(Go newStart) + { + if (newStart != start) + { + NotificationChain msgs = null; + if (start != null) + msgs = ((InternalEObject)start).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - TqclPackage.COMPOSITE_COMMAND__START, null, msgs); + if (newStart != null) + msgs = ((InternalEObject)newStart).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - TqclPackage.COMPOSITE_COMMAND__START, null, msgs); + msgs = basicSetStart(newStart, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TqclPackage.COMPOSITE_COMMAND__START, newStart, newStart)); + } + + /** + * + * + * @generated + */ + public EList getCommands() + { + if (commands == null) + { + commands = new EObjectContainmentEList(Command.class, this, TqclPackage.COMPOSITE_COMMAND__COMMANDS); + } + return commands; + } + + /** + * + * + * @generated + */ + public Go getEnd() + { + return end; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetEnd(Go newEnd, NotificationChain msgs) + { + Go oldEnd = end; + end = newEnd; + if (eNotificationRequired()) + { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TqclPackage.COMPOSITE_COMMAND__END, oldEnd, newEnd); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setEnd(Go newEnd) + { + if (newEnd != end) + { + NotificationChain msgs = null; + if (end != null) + msgs = ((InternalEObject)end).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - TqclPackage.COMPOSITE_COMMAND__END, null, msgs); + if (newEnd != null) + msgs = ((InternalEObject)newEnd).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - TqclPackage.COMPOSITE_COMMAND__END, null, msgs); + msgs = basicSetEnd(newEnd, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TqclPackage.COMPOSITE_COMMAND__END, newEnd, newEnd)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case TqclPackage.COMPOSITE_COMMAND__START: + return basicSetStart(null, msgs); + case TqclPackage.COMPOSITE_COMMAND__COMMANDS: + return ((InternalEList)getCommands()).basicRemove(otherEnd, msgs); + case TqclPackage.COMPOSITE_COMMAND__END: + return basicSetEnd(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case TqclPackage.COMPOSITE_COMMAND__START: + return getStart(); + case TqclPackage.COMPOSITE_COMMAND__COMMANDS: + return getCommands(); + case TqclPackage.COMPOSITE_COMMAND__END: + return getEnd(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case TqclPackage.COMPOSITE_COMMAND__START: + setStart((Go)newValue); + return; + case TqclPackage.COMPOSITE_COMMAND__COMMANDS: + getCommands().clear(); + getCommands().addAll((Collection)newValue); + return; + case TqclPackage.COMPOSITE_COMMAND__END: + setEnd((Go)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case TqclPackage.COMPOSITE_COMMAND__START: + setStart((Go)null); + return; + case TqclPackage.COMPOSITE_COMMAND__COMMANDS: + getCommands().clear(); + return; + case TqclPackage.COMPOSITE_COMMAND__END: + setEnd((Go)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case TqclPackage.COMPOSITE_COMMAND__START: + return start != null; + case TqclPackage.COMPOSITE_COMMAND__COMMANDS: + return commands != null && !commands.isEmpty(); + case TqclPackage.COMPOSITE_COMMAND__END: + return end != null; + } + return super.eIsSet(featureID); + } + +} //CompositeCommandImpl diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/impl/ConnectImpl.java b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/impl/ConnectImpl.java new file mode 100644 index 00000000..f2901773 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/impl/ConnectImpl.java @@ -0,0 +1,215 @@ +/** + * ****************************************************************************** + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + * ****************************************************************************** + */ +package org.eclipse.triquetrum.commands.tqcl.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.triquetrum.commands.tqcl.Connect; +import org.eclipse.triquetrum.commands.tqcl.ConnectionPort; +import org.eclipse.triquetrum.commands.tqcl.TqclPackage; + +/** + * + * An implementation of the model object 'Connect'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.triquetrum.commands.tqcl.impl.ConnectImpl#getFrom From}
  • + *
  • {@link org.eclipse.triquetrum.commands.tqcl.impl.ConnectImpl#getTo To}
  • + *
+ * + * @generated + */ +public class ConnectImpl extends CommandImpl implements Connect +{ + /** + * The cached value of the '{@link #getFrom() From}' containment reference list. + * + * + * @see #getFrom() + * @generated + * @ordered + */ + protected EList from; + + /** + * The cached value of the '{@link #getTo() To}' containment reference list. + * + * + * @see #getTo() + * @generated + * @ordered + */ + protected EList to; + + /** + * + * + * @generated + */ + protected ConnectImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return TqclPackage.Literals.CONNECT; + } + + /** + * + * + * @generated + */ + public EList getFrom() + { + if (from == null) + { + from = new EObjectContainmentEList(ConnectionPort.class, this, TqclPackage.CONNECT__FROM); + } + return from; + } + + /** + * + * + * @generated + */ + public EList getTo() + { + if (to == null) + { + to = new EObjectContainmentEList(ConnectionPort.class, this, TqclPackage.CONNECT__TO); + } + return to; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case TqclPackage.CONNECT__FROM: + return ((InternalEList)getFrom()).basicRemove(otherEnd, msgs); + case TqclPackage.CONNECT__TO: + return ((InternalEList)getTo()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case TqclPackage.CONNECT__FROM: + return getFrom(); + case TqclPackage.CONNECT__TO: + return getTo(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case TqclPackage.CONNECT__FROM: + getFrom().clear(); + getFrom().addAll((Collection)newValue); + return; + case TqclPackage.CONNECT__TO: + getTo().clear(); + getTo().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case TqclPackage.CONNECT__FROM: + getFrom().clear(); + return; + case TqclPackage.CONNECT__TO: + getTo().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case TqclPackage.CONNECT__FROM: + return from != null && !from.isEmpty(); + case TqclPackage.CONNECT__TO: + return to != null && !to.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //ConnectImpl diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/impl/ConnectionPortImpl.java b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/impl/ConnectionPortImpl.java new file mode 100644 index 00000000..a89ab201 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/impl/ConnectionPortImpl.java @@ -0,0 +1,256 @@ +/** + * ****************************************************************************** + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + * ****************************************************************************** + */ +package org.eclipse.triquetrum.commands.tqcl.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.triquetrum.commands.tqcl.ConnectionPort; +import org.eclipse.triquetrum.commands.tqcl.Insert; +import org.eclipse.triquetrum.commands.tqcl.TqclPackage; + +/** + * + * An implementation of the model object 'Connection Port'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.triquetrum.commands.tqcl.impl.ConnectionPortImpl#getActor Actor}
  • + *
  • {@link org.eclipse.triquetrum.commands.tqcl.impl.ConnectionPortImpl#getPort Port}
  • + *
+ * + * @generated + */ +public class ConnectionPortImpl extends MinimalEObjectImpl.Container implements ConnectionPort +{ + /** + * The cached value of the '{@link #getActor() Actor}' reference. + * + * + * @see #getActor() + * @generated + * @ordered + */ + protected Insert actor; + + /** + * The default value of the '{@link #getPort() Port}' attribute. + * + * + * @see #getPort() + * @generated + * @ordered + */ + protected static final String PORT_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPort() Port}' attribute. + * + * + * @see #getPort() + * @generated + * @ordered + */ + protected String port = PORT_EDEFAULT; + + /** + * + * + * @generated + */ + protected ConnectionPortImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return TqclPackage.Literals.CONNECTION_PORT; + } + + /** + * + * + * @generated + */ + public Insert getActor() + { + if (actor != null && actor.eIsProxy()) + { + InternalEObject oldActor = (InternalEObject)actor; + actor = (Insert)eResolveProxy(oldActor); + if (actor != oldActor) + { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, TqclPackage.CONNECTION_PORT__ACTOR, oldActor, actor)); + } + } + return actor; + } + + /** + * + * + * @generated + */ + public Insert basicGetActor() + { + return actor; + } + + /** + * + * + * @generated + */ + public void setActor(Insert newActor) + { + Insert oldActor = actor; + actor = newActor; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TqclPackage.CONNECTION_PORT__ACTOR, oldActor, actor)); + } + + /** + * + * + * @generated + */ + public String getPort() + { + return port; + } + + /** + * + * + * @generated + */ + public void setPort(String newPort) + { + String oldPort = port; + port = newPort; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TqclPackage.CONNECTION_PORT__PORT, oldPort, port)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case TqclPackage.CONNECTION_PORT__ACTOR: + if (resolve) return getActor(); + return basicGetActor(); + case TqclPackage.CONNECTION_PORT__PORT: + return getPort(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case TqclPackage.CONNECTION_PORT__ACTOR: + setActor((Insert)newValue); + return; + case TqclPackage.CONNECTION_PORT__PORT: + setPort((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case TqclPackage.CONNECTION_PORT__ACTOR: + setActor((Insert)null); + return; + case TqclPackage.CONNECTION_PORT__PORT: + setPort(PORT_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case TqclPackage.CONNECTION_PORT__ACTOR: + return actor != null; + case TqclPackage.CONNECTION_PORT__PORT: + return PORT_EDEFAULT == null ? port != null : !PORT_EDEFAULT.equals(port); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (port: "); + result.append(port); + result.append(')'); + return result.toString(); + } + +} //ConnectionPortImpl diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/impl/GoImpl.java b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/impl/GoImpl.java new file mode 100644 index 00000000..b98c7696 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/impl/GoImpl.java @@ -0,0 +1,256 @@ +/** + * ****************************************************************************** + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + * ****************************************************************************** + */ +package org.eclipse.triquetrum.commands.tqcl.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.triquetrum.commands.tqcl.Go; +import org.eclipse.triquetrum.commands.tqcl.Insert; +import org.eclipse.triquetrum.commands.tqcl.TqclPackage; + +/** + * + * An implementation of the model object 'Go'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.triquetrum.commands.tqcl.impl.GoImpl#getDirection Direction}
  • + *
  • {@link org.eclipse.triquetrum.commands.tqcl.impl.GoImpl#getActor Actor}
  • + *
+ * + * @generated + */ +public class GoImpl extends MinimalEObjectImpl.Container implements Go +{ + /** + * The default value of the '{@link #getDirection() Direction}' attribute. + * + * + * @see #getDirection() + * @generated + * @ordered + */ + protected static final String DIRECTION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDirection() Direction}' attribute. + * + * + * @see #getDirection() + * @generated + * @ordered + */ + protected String direction = DIRECTION_EDEFAULT; + + /** + * The cached value of the '{@link #getActor() Actor}' reference. + * + * + * @see #getActor() + * @generated + * @ordered + */ + protected Insert actor; + + /** + * + * + * @generated + */ + protected GoImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return TqclPackage.Literals.GO; + } + + /** + * + * + * @generated + */ + public String getDirection() + { + return direction; + } + + /** + * + * + * @generated + */ + public void setDirection(String newDirection) + { + String oldDirection = direction; + direction = newDirection; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TqclPackage.GO__DIRECTION, oldDirection, direction)); + } + + /** + * + * + * @generated + */ + public Insert getActor() + { + if (actor != null && actor.eIsProxy()) + { + InternalEObject oldActor = (InternalEObject)actor; + actor = (Insert)eResolveProxy(oldActor); + if (actor != oldActor) + { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, TqclPackage.GO__ACTOR, oldActor, actor)); + } + } + return actor; + } + + /** + * + * + * @generated + */ + public Insert basicGetActor() + { + return actor; + } + + /** + * + * + * @generated + */ + public void setActor(Insert newActor) + { + Insert oldActor = actor; + actor = newActor; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TqclPackage.GO__ACTOR, oldActor, actor)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case TqclPackage.GO__DIRECTION: + return getDirection(); + case TqclPackage.GO__ACTOR: + if (resolve) return getActor(); + return basicGetActor(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case TqclPackage.GO__DIRECTION: + setDirection((String)newValue); + return; + case TqclPackage.GO__ACTOR: + setActor((Insert)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case TqclPackage.GO__DIRECTION: + setDirection(DIRECTION_EDEFAULT); + return; + case TqclPackage.GO__ACTOR: + setActor((Insert)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case TqclPackage.GO__DIRECTION: + return DIRECTION_EDEFAULT == null ? direction != null : !DIRECTION_EDEFAULT.equals(direction); + case TqclPackage.GO__ACTOR: + return actor != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (direction: "); + result.append(direction); + result.append(')'); + return result.toString(); + } + +} //GoImpl diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/impl/IncludeImpl.java b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/impl/IncludeImpl.java new file mode 100644 index 00000000..e6b4d516 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/impl/IncludeImpl.java @@ -0,0 +1,188 @@ +/** + * ****************************************************************************** + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + * ****************************************************************************** + */ +package org.eclipse.triquetrum.commands.tqcl.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.triquetrum.commands.tqcl.Include; +import org.eclipse.triquetrum.commands.tqcl.TqclPackage; + +/** + * + * An implementation of the model object 'Include'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.triquetrum.commands.tqcl.impl.IncludeImpl#getFilename Filename}
  • + *
+ * + * @generated + */ +public class IncludeImpl extends CommandImpl implements Include +{ + /** + * The default value of the '{@link #getFilename() Filename}' attribute. + * + * + * @see #getFilename() + * @generated + * @ordered + */ + protected static final String FILENAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getFilename() Filename}' attribute. + * + * + * @see #getFilename() + * @generated + * @ordered + */ + protected String filename = FILENAME_EDEFAULT; + + /** + * + * + * @generated + */ + protected IncludeImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return TqclPackage.Literals.INCLUDE; + } + + /** + * + * + * @generated + */ + public String getFilename() + { + return filename; + } + + /** + * + * + * @generated + */ + public void setFilename(String newFilename) + { + String oldFilename = filename; + filename = newFilename; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TqclPackage.INCLUDE__FILENAME, oldFilename, filename)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case TqclPackage.INCLUDE__FILENAME: + return getFilename(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case TqclPackage.INCLUDE__FILENAME: + setFilename((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case TqclPackage.INCLUDE__FILENAME: + setFilename(FILENAME_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case TqclPackage.INCLUDE__FILENAME: + return FILENAME_EDEFAULT == null ? filename != null : !FILENAME_EDEFAULT.equals(filename); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (filename: "); + result.append(filename); + result.append(')'); + return result.toString(); + } + +} //IncludeImpl diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/impl/InsertImpl.java b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/impl/InsertImpl.java new file mode 100644 index 00000000..3ad6a6e5 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/impl/InsertImpl.java @@ -0,0 +1,364 @@ +/** + * ****************************************************************************** + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + * ****************************************************************************** + */ +package org.eclipse.triquetrum.commands.tqcl.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.triquetrum.commands.tqcl.Category; +import org.eclipse.triquetrum.commands.tqcl.Insert; +import org.eclipse.triquetrum.commands.tqcl.Parameter; +import org.eclipse.triquetrum.commands.tqcl.TqclPackage; + +/** + * + * An implementation of the model object 'Insert'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.triquetrum.commands.tqcl.impl.InsertImpl#getCategory Category}
  • + *
  • {@link org.eclipse.triquetrum.commands.tqcl.impl.InsertImpl#getEntityClass Entity Class}
  • + *
  • {@link org.eclipse.triquetrum.commands.tqcl.impl.InsertImpl#getName Name}
  • + *
  • {@link org.eclipse.triquetrum.commands.tqcl.impl.InsertImpl#getParameters Parameters}
  • + *
+ * + * @generated + */ +public class InsertImpl extends CommandImpl implements Insert +{ + /** + * The default value of the '{@link #getCategory() Category}' attribute. + * + * + * @see #getCategory() + * @generated + * @ordered + */ + protected static final Category CATEGORY_EDEFAULT = Category.ACTOR; + + /** + * The cached value of the '{@link #getCategory() Category}' attribute. + * + * + * @see #getCategory() + * @generated + * @ordered + */ + protected Category category = CATEGORY_EDEFAULT; + + /** + * The default value of the '{@link #getEntityClass() Entity Class}' attribute. + * + * + * @see #getEntityClass() + * @generated + * @ordered + */ + protected static final String ENTITY_CLASS_EDEFAULT = null; + + /** + * The cached value of the '{@link #getEntityClass() Entity Class}' attribute. + * + * + * @see #getEntityClass() + * @generated + * @ordered + */ + protected String entityClass = ENTITY_CLASS_EDEFAULT; + + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * The cached value of the '{@link #getParameters() Parameters}' containment reference list. + * + * + * @see #getParameters() + * @generated + * @ordered + */ + protected EList parameters; + + /** + * + * + * @generated + */ + protected InsertImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return TqclPackage.Literals.INSERT; + } + + /** + * + * + * @generated + */ + public Category getCategory() + { + return category; + } + + /** + * + * + * @generated + */ + public void setCategory(Category newCategory) + { + Category oldCategory = category; + category = newCategory == null ? CATEGORY_EDEFAULT : newCategory; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TqclPackage.INSERT__CATEGORY, oldCategory, category)); + } + + /** + * + * + * @generated + */ + public String getEntityClass() + { + return entityClass; + } + + /** + * + * + * @generated + */ + public void setEntityClass(String newEntityClass) + { + String oldEntityClass = entityClass; + entityClass = newEntityClass; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TqclPackage.INSERT__ENTITY_CLASS, oldEntityClass, entityClass)); + } + + /** + * + * + * @generated + */ + public String getName() + { + return name; + } + + /** + * + * + * @generated + */ + public void setName(String newName) + { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TqclPackage.INSERT__NAME, oldName, name)); + } + + /** + * + * + * @generated + */ + public EList getParameters() + { + if (parameters == null) + { + parameters = new EObjectContainmentEList(Parameter.class, this, TqclPackage.INSERT__PARAMETERS); + } + return parameters; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case TqclPackage.INSERT__PARAMETERS: + return ((InternalEList)getParameters()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case TqclPackage.INSERT__CATEGORY: + return getCategory(); + case TqclPackage.INSERT__ENTITY_CLASS: + return getEntityClass(); + case TqclPackage.INSERT__NAME: + return getName(); + case TqclPackage.INSERT__PARAMETERS: + return getParameters(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case TqclPackage.INSERT__CATEGORY: + setCategory((Category)newValue); + return; + case TqclPackage.INSERT__ENTITY_CLASS: + setEntityClass((String)newValue); + return; + case TqclPackage.INSERT__NAME: + setName((String)newValue); + return; + case TqclPackage.INSERT__PARAMETERS: + getParameters().clear(); + getParameters().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case TqclPackage.INSERT__CATEGORY: + setCategory(CATEGORY_EDEFAULT); + return; + case TqclPackage.INSERT__ENTITY_CLASS: + setEntityClass(ENTITY_CLASS_EDEFAULT); + return; + case TqclPackage.INSERT__NAME: + setName(NAME_EDEFAULT); + return; + case TqclPackage.INSERT__PARAMETERS: + getParameters().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case TqclPackage.INSERT__CATEGORY: + return category != CATEGORY_EDEFAULT; + case TqclPackage.INSERT__ENTITY_CLASS: + return ENTITY_CLASS_EDEFAULT == null ? entityClass != null : !ENTITY_CLASS_EDEFAULT.equals(entityClass); + case TqclPackage.INSERT__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case TqclPackage.INSERT__PARAMETERS: + return parameters != null && !parameters.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (category: "); + result.append(category); + result.append(", entityClass: "); + result.append(entityClass); + result.append(", name: "); + result.append(name); + result.append(')'); + return result.toString(); + } + +} //InsertImpl diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/impl/LibraryImpl.java b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/impl/LibraryImpl.java new file mode 100644 index 00000000..8c0525f4 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/impl/LibraryImpl.java @@ -0,0 +1,189 @@ +/** + * ****************************************************************************** + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + * ****************************************************************************** + */ +package org.eclipse.triquetrum.commands.tqcl.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.triquetrum.commands.tqcl.Library; +import org.eclipse.triquetrum.commands.tqcl.TqclPackage; + +/** + * + * An implementation of the model object 'Library'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.triquetrum.commands.tqcl.impl.LibraryImpl#getName Name}
  • + *
+ * + * @generated + */ +public class LibraryImpl extends MinimalEObjectImpl.Container implements Library +{ + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * + * + * @generated + */ + protected LibraryImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return TqclPackage.Literals.LIBRARY; + } + + /** + * + * + * @generated + */ + public String getName() + { + return name; + } + + /** + * + * + * @generated + */ + public void setName(String newName) + { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TqclPackage.LIBRARY__NAME, oldName, name)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case TqclPackage.LIBRARY__NAME: + return getName(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case TqclPackage.LIBRARY__NAME: + setName((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case TqclPackage.LIBRARY__NAME: + setName(NAME_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case TqclPackage.LIBRARY__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: "); + result.append(name); + result.append(')'); + return result.toString(); + } + +} //LibraryImpl diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/impl/ParameterImpl.java b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/impl/ParameterImpl.java new file mode 100644 index 00000000..5bc1333a --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/impl/ParameterImpl.java @@ -0,0 +1,245 @@ +/** + * ****************************************************************************** + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + * ****************************************************************************** + */ +package org.eclipse.triquetrum.commands.tqcl.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.triquetrum.commands.tqcl.Parameter; +import org.eclipse.triquetrum.commands.tqcl.TqclPackage; + +/** + * + * An implementation of the model object 'Parameter'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.triquetrum.commands.tqcl.impl.ParameterImpl#getId Id}
  • + *
  • {@link org.eclipse.triquetrum.commands.tqcl.impl.ParameterImpl#getValue Value}
  • + *
+ * + * @generated + */ +public class ParameterImpl extends MinimalEObjectImpl.Container implements Parameter +{ + /** + * The default value of the '{@link #getId() Id}' attribute. + * + * + * @see #getId() + * @generated + * @ordered + */ + protected static final String ID_EDEFAULT = null; + + /** + * The cached value of the '{@link #getId() Id}' attribute. + * + * + * @see #getId() + * @generated + * @ordered + */ + protected String id = ID_EDEFAULT; + + /** + * The default value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final String VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected String value = VALUE_EDEFAULT; + + /** + * + * + * @generated + */ + protected ParameterImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return TqclPackage.Literals.PARAMETER; + } + + /** + * + * + * @generated + */ + public String getId() + { + return id; + } + + /** + * + * + * @generated + */ + public void setId(String newId) + { + String oldId = id; + id = newId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TqclPackage.PARAMETER__ID, oldId, id)); + } + + /** + * + * + * @generated + */ + public String getValue() + { + return value; + } + + /** + * + * + * @generated + */ + public void setValue(String newValue) + { + String oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TqclPackage.PARAMETER__VALUE, oldValue, value)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case TqclPackage.PARAMETER__ID: + return getId(); + case TqclPackage.PARAMETER__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case TqclPackage.PARAMETER__ID: + setId((String)newValue); + return; + case TqclPackage.PARAMETER__VALUE: + setValue((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case TqclPackage.PARAMETER__ID: + setId(ID_EDEFAULT); + return; + case TqclPackage.PARAMETER__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case TqclPackage.PARAMETER__ID: + return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id); + case TqclPackage.PARAMETER__VALUE: + return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (id: "); + result.append(id); + result.append(", value: "); + result.append(value); + result.append(')'); + return result.toString(); + } + +} //ParameterImpl diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/impl/SetImpl.java b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/impl/SetImpl.java new file mode 100644 index 00000000..cbf39c56 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/impl/SetImpl.java @@ -0,0 +1,205 @@ +/** + * ****************************************************************************** + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + * ****************************************************************************** + */ +package org.eclipse.triquetrum.commands.tqcl.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.triquetrum.commands.tqcl.Parameter; +import org.eclipse.triquetrum.commands.tqcl.Set; +import org.eclipse.triquetrum.commands.tqcl.TqclPackage; + +/** + * + * An implementation of the model object 'Set'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.triquetrum.commands.tqcl.impl.SetImpl#getParam Param}
  • + *
+ * + * @generated + */ +public class SetImpl extends CommandImpl implements Set +{ + /** + * The cached value of the '{@link #getParam() Param}' containment reference. + * + * + * @see #getParam() + * @generated + * @ordered + */ + protected Parameter param; + + /** + * + * + * @generated + */ + protected SetImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return TqclPackage.Literals.SET; + } + + /** + * + * + * @generated + */ + public Parameter getParam() + { + return param; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetParam(Parameter newParam, NotificationChain msgs) + { + Parameter oldParam = param; + param = newParam; + if (eNotificationRequired()) + { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TqclPackage.SET__PARAM, oldParam, newParam); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setParam(Parameter newParam) + { + if (newParam != param) + { + NotificationChain msgs = null; + if (param != null) + msgs = ((InternalEObject)param).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - TqclPackage.SET__PARAM, null, msgs); + if (newParam != null) + msgs = ((InternalEObject)newParam).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - TqclPackage.SET__PARAM, null, msgs); + msgs = basicSetParam(newParam, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TqclPackage.SET__PARAM, newParam, newParam)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case TqclPackage.SET__PARAM: + return basicSetParam(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case TqclPackage.SET__PARAM: + return getParam(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case TqclPackage.SET__PARAM: + setParam((Parameter)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case TqclPackage.SET__PARAM: + setParam((Parameter)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case TqclPackage.SET__PARAM: + return param != null; + } + return super.eIsSet(featureID); + } + +} //SetImpl diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/impl/TqclFactoryImpl.java b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/impl/TqclFactoryImpl.java new file mode 100644 index 00000000..124ae4c7 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/impl/TqclFactoryImpl.java @@ -0,0 +1,295 @@ +/** + * ****************************************************************************** + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + * ****************************************************************************** + */ +package org.eclipse.triquetrum.commands.tqcl.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +import org.eclipse.triquetrum.commands.tqcl.*; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class TqclFactoryImpl extends EFactoryImpl implements TqclFactory +{ + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static TqclFactory init() + { + try + { + TqclFactory theTqclFactory = (TqclFactory)EPackage.Registry.INSTANCE.getEFactory(TqclPackage.eNS_URI); + if (theTqclFactory != null) + { + return theTqclFactory; + } + } + catch (Exception exception) + { + EcorePlugin.INSTANCE.log(exception); + } + return new TqclFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public TqclFactoryImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) + { + switch (eClass.getClassifierID()) + { + case TqclPackage.TRIQUETRUM_SCRIPT: return createTriquetrumScript(); + case TqclPackage.COMPOSITE_COMMAND: return createCompositeCommand(); + case TqclPackage.COMMAND: return createCommand(); + case TqclPackage.INCLUDE: return createInclude(); + case TqclPackage.LIBRARY: return createLibrary(); + case TqclPackage.INSERT: return createInsert(); + case TqclPackage.SET: return createSet(); + case TqclPackage.CONNECT: return createConnect(); + case TqclPackage.CONNECTION_PORT: return createConnectionPort(); + case TqclPackage.GO: return createGo(); + case TqclPackage.PARAMETER: return createParameter(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + @Override + public Object createFromString(EDataType eDataType, String initialValue) + { + switch (eDataType.getClassifierID()) + { + case TqclPackage.CATEGORY: + return createCategoryFromString(eDataType, initialValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + @Override + public String convertToString(EDataType eDataType, Object instanceValue) + { + switch (eDataType.getClassifierID()) + { + case TqclPackage.CATEGORY: + return convertCategoryToString(eDataType, instanceValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public TriquetrumScript createTriquetrumScript() + { + TriquetrumScriptImpl triquetrumScript = new TriquetrumScriptImpl(); + return triquetrumScript; + } + + /** + * + * + * @generated + */ + public CompositeCommand createCompositeCommand() + { + CompositeCommandImpl compositeCommand = new CompositeCommandImpl(); + return compositeCommand; + } + + /** + * + * + * @generated + */ + public Command createCommand() + { + CommandImpl command = new CommandImpl(); + return command; + } + + /** + * + * + * @generated + */ + public Include createInclude() + { + IncludeImpl include = new IncludeImpl(); + return include; + } + + /** + * + * + * @generated + */ + public Library createLibrary() + { + LibraryImpl library = new LibraryImpl(); + return library; + } + + /** + * + * + * @generated + */ + public Insert createInsert() + { + InsertImpl insert = new InsertImpl(); + return insert; + } + + /** + * + * + * @generated + */ + public Set createSet() + { + SetImpl set = new SetImpl(); + return set; + } + + /** + * + * + * @generated + */ + public Connect createConnect() + { + ConnectImpl connect = new ConnectImpl(); + return connect; + } + + /** + * + * + * @generated + */ + public ConnectionPort createConnectionPort() + { + ConnectionPortImpl connectionPort = new ConnectionPortImpl(); + return connectionPort; + } + + /** + * + * + * @generated + */ + public Go createGo() + { + GoImpl go = new GoImpl(); + return go; + } + + /** + * + * + * @generated + */ + public Parameter createParameter() + { + ParameterImpl parameter = new ParameterImpl(); + return parameter; + } + + /** + * + * + * @generated + */ + public Category createCategoryFromString(EDataType eDataType, String initialValue) + { + Category result = Category.get(initialValue); + if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + return result; + } + + /** + * + * + * @generated + */ + public String convertCategoryToString(EDataType eDataType, Object instanceValue) + { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * + * + * @generated + */ + public TqclPackage getTqclPackage() + { + return (TqclPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static TqclPackage getPackage() + { + return TqclPackage.eINSTANCE; + } + +} //TqclFactoryImpl diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/impl/TqclPackageImpl.java b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/impl/TqclPackageImpl.java new file mode 100644 index 00000000..ea6cdef2 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/impl/TqclPackageImpl.java @@ -0,0 +1,680 @@ +/** + * ****************************************************************************** + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + * ****************************************************************************** + */ +package org.eclipse.triquetrum.commands.tqcl.impl; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +import org.eclipse.triquetrum.commands.tqcl.Category; +import org.eclipse.triquetrum.commands.tqcl.Command; +import org.eclipse.triquetrum.commands.tqcl.CompositeCommand; +import org.eclipse.triquetrum.commands.tqcl.Connect; +import org.eclipse.triquetrum.commands.tqcl.ConnectionPort; +import org.eclipse.triquetrum.commands.tqcl.Go; +import org.eclipse.triquetrum.commands.tqcl.Include; +import org.eclipse.triquetrum.commands.tqcl.Insert; +import org.eclipse.triquetrum.commands.tqcl.Library; +import org.eclipse.triquetrum.commands.tqcl.Parameter; +import org.eclipse.triquetrum.commands.tqcl.Set; +import org.eclipse.triquetrum.commands.tqcl.TqclFactory; +import org.eclipse.triquetrum.commands.tqcl.TqclPackage; +import org.eclipse.triquetrum.commands.tqcl.TriquetrumScript; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class TqclPackageImpl extends EPackageImpl implements TqclPackage +{ + /** + * + * + * @generated + */ + private EClass triquetrumScriptEClass = null; + + /** + * + * + * @generated + */ + private EClass compositeCommandEClass = null; + + /** + * + * + * @generated + */ + private EClass commandEClass = null; + + /** + * + * + * @generated + */ + private EClass includeEClass = null; + + /** + * + * + * @generated + */ + private EClass libraryEClass = null; + + /** + * + * + * @generated + */ + private EClass insertEClass = null; + + /** + * + * + * @generated + */ + private EClass setEClass = null; + + /** + * + * + * @generated + */ + private EClass connectEClass = null; + + /** + * + * + * @generated + */ + private EClass connectionPortEClass = null; + + /** + * + * + * @generated + */ + private EClass goEClass = null; + + /** + * + * + * @generated + */ + private EClass parameterEClass = null; + + /** + * + * + * @generated + */ + private EEnum categoryEEnum = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.eclipse.triquetrum.commands.tqcl.TqclPackage#eNS_URI + * @see #init() + * @generated + */ + private TqclPackageImpl() + { + super(eNS_URI, TqclFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link TqclPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static TqclPackage init() + { + if (isInited) return (TqclPackage)EPackage.Registry.INSTANCE.getEPackage(TqclPackage.eNS_URI); + + // Obtain or create and register package + TqclPackageImpl theTqclPackage = (TqclPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof TqclPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new TqclPackageImpl()); + + isInited = true; + + // Create package meta-data objects + theTqclPackage.createPackageContents(); + + // Initialize created meta-data + theTqclPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theTqclPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(TqclPackage.eNS_URI, theTqclPackage); + return theTqclPackage; + } + + /** + * + * + * @generated + */ + public EClass getTriquetrumScript() + { + return triquetrumScriptEClass; + } + + /** + * + * + * @generated + */ + public EReference getTriquetrumScript_Libraries() + { + return (EReference)triquetrumScriptEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getTriquetrumScript_Commands() + { + return (EReference)triquetrumScriptEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getCompositeCommand() + { + return compositeCommandEClass; + } + + /** + * + * + * @generated + */ + public EReference getCompositeCommand_Start() + { + return (EReference)compositeCommandEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getCompositeCommand_Commands() + { + return (EReference)compositeCommandEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getCompositeCommand_End() + { + return (EReference)compositeCommandEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getCommand() + { + return commandEClass; + } + + /** + * + * + * @generated + */ + public EClass getInclude() + { + return includeEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getInclude_Filename() + { + return (EAttribute)includeEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getLibrary() + { + return libraryEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getLibrary_Name() + { + return (EAttribute)libraryEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getInsert() + { + return insertEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getInsert_Category() + { + return (EAttribute)insertEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getInsert_EntityClass() + { + return (EAttribute)insertEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getInsert_Name() + { + return (EAttribute)insertEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getInsert_Parameters() + { + return (EReference)insertEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EClass getSet() + { + return setEClass; + } + + /** + * + * + * @generated + */ + public EReference getSet_Param() + { + return (EReference)setEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getConnect() + { + return connectEClass; + } + + /** + * + * + * @generated + */ + public EReference getConnect_From() + { + return (EReference)connectEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getConnect_To() + { + return (EReference)connectEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getConnectionPort() + { + return connectionPortEClass; + } + + /** + * + * + * @generated + */ + public EReference getConnectionPort_Actor() + { + return (EReference)connectionPortEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getConnectionPort_Port() + { + return (EAttribute)connectionPortEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getGo() + { + return goEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getGo_Direction() + { + return (EAttribute)goEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getGo_Actor() + { + return (EReference)goEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getParameter() + { + return parameterEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getParameter_Id() + { + return (EAttribute)parameterEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getParameter_Value() + { + return (EAttribute)parameterEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EEnum getCategory() + { + return categoryEEnum; + } + + /** + * + * + * @generated + */ + public TqclFactory getTqclFactory() + { + return (TqclFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() + { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + triquetrumScriptEClass = createEClass(TRIQUETRUM_SCRIPT); + createEReference(triquetrumScriptEClass, TRIQUETRUM_SCRIPT__LIBRARIES); + createEReference(triquetrumScriptEClass, TRIQUETRUM_SCRIPT__COMMANDS); + + compositeCommandEClass = createEClass(COMPOSITE_COMMAND); + createEReference(compositeCommandEClass, COMPOSITE_COMMAND__START); + createEReference(compositeCommandEClass, COMPOSITE_COMMAND__COMMANDS); + createEReference(compositeCommandEClass, COMPOSITE_COMMAND__END); + + commandEClass = createEClass(COMMAND); + + includeEClass = createEClass(INCLUDE); + createEAttribute(includeEClass, INCLUDE__FILENAME); + + libraryEClass = createEClass(LIBRARY); + createEAttribute(libraryEClass, LIBRARY__NAME); + + insertEClass = createEClass(INSERT); + createEAttribute(insertEClass, INSERT__CATEGORY); + createEAttribute(insertEClass, INSERT__ENTITY_CLASS); + createEAttribute(insertEClass, INSERT__NAME); + createEReference(insertEClass, INSERT__PARAMETERS); + + setEClass = createEClass(SET); + createEReference(setEClass, SET__PARAM); + + connectEClass = createEClass(CONNECT); + createEReference(connectEClass, CONNECT__FROM); + createEReference(connectEClass, CONNECT__TO); + + connectionPortEClass = createEClass(CONNECTION_PORT); + createEReference(connectionPortEClass, CONNECTION_PORT__ACTOR); + createEAttribute(connectionPortEClass, CONNECTION_PORT__PORT); + + goEClass = createEClass(GO); + createEAttribute(goEClass, GO__DIRECTION); + createEReference(goEClass, GO__ACTOR); + + parameterEClass = createEClass(PARAMETER); + createEAttribute(parameterEClass, PARAMETER__ID); + createEAttribute(parameterEClass, PARAMETER__VALUE); + + // Create enums + categoryEEnum = createEEnum(CATEGORY); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() + { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + compositeCommandEClass.getESuperTypes().add(this.getCommand()); + includeEClass.getESuperTypes().add(this.getCommand()); + insertEClass.getESuperTypes().add(this.getCommand()); + setEClass.getESuperTypes().add(this.getCommand()); + connectEClass.getESuperTypes().add(this.getCommand()); + + // Initialize classes and features; add operations and parameters + initEClass(triquetrumScriptEClass, TriquetrumScript.class, "TriquetrumScript", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getTriquetrumScript_Libraries(), this.getLibrary(), null, "libraries", null, 0, -1, TriquetrumScript.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getTriquetrumScript_Commands(), this.getCommand(), null, "commands", null, 0, -1, TriquetrumScript.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(compositeCommandEClass, CompositeCommand.class, "CompositeCommand", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getCompositeCommand_Start(), this.getGo(), null, "start", null, 0, 1, CompositeCommand.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCompositeCommand_Commands(), this.getCommand(), null, "commands", null, 0, -1, CompositeCommand.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCompositeCommand_End(), this.getGo(), null, "end", null, 0, 1, CompositeCommand.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(commandEClass, Command.class, "Command", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(includeEClass, Include.class, "Include", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getInclude_Filename(), ecorePackage.getEString(), "filename", null, 0, 1, Include.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(libraryEClass, Library.class, "Library", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getLibrary_Name(), ecorePackage.getEString(), "name", null, 0, 1, Library.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(insertEClass, Insert.class, "Insert", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getInsert_Category(), this.getCategory(), "category", null, 0, 1, Insert.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getInsert_EntityClass(), ecorePackage.getEString(), "entityClass", null, 0, 1, Insert.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getInsert_Name(), ecorePackage.getEString(), "name", null, 0, 1, Insert.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getInsert_Parameters(), this.getParameter(), null, "parameters", null, 0, -1, Insert.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(setEClass, Set.class, "Set", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getSet_Param(), this.getParameter(), null, "param", null, 0, 1, Set.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(connectEClass, Connect.class, "Connect", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getConnect_From(), this.getConnectionPort(), null, "from", null, 0, -1, Connect.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getConnect_To(), this.getConnectionPort(), null, "to", null, 0, -1, Connect.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(connectionPortEClass, ConnectionPort.class, "ConnectionPort", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getConnectionPort_Actor(), this.getInsert(), null, "actor", null, 0, 1, ConnectionPort.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getConnectionPort_Port(), ecorePackage.getEString(), "port", null, 0, 1, ConnectionPort.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(goEClass, Go.class, "Go", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getGo_Direction(), ecorePackage.getEString(), "direction", null, 0, 1, Go.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getGo_Actor(), this.getInsert(), null, "actor", null, 0, 1, Go.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(parameterEClass, Parameter.class, "Parameter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getParameter_Id(), ecorePackage.getEString(), "id", null, 0, 1, Parameter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getParameter_Value(), ecorePackage.getEString(), "value", null, 0, 1, Parameter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Initialize enums and add enum literals + initEEnum(categoryEEnum, Category.class, "Category"); + addEEnumLiteral(categoryEEnum, Category.ACTOR); + addEEnumLiteral(categoryEEnum, Category.PARAMETER); + addEEnumLiteral(categoryEEnum, Category.PORT); + addEEnumLiteral(categoryEEnum, Category.DIRECTOR); + + // Create resource + createResource(eNS_URI); + } + +} //TqclPackageImpl diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/impl/TriquetrumScriptImpl.java b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/impl/TriquetrumScriptImpl.java new file mode 100644 index 00000000..a805ca0d --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/impl/TriquetrumScriptImpl.java @@ -0,0 +1,218 @@ +/** + * ****************************************************************************** + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + * ****************************************************************************** + */ +package org.eclipse.triquetrum.commands.tqcl.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.triquetrum.commands.tqcl.Command; +import org.eclipse.triquetrum.commands.tqcl.Library; +import org.eclipse.triquetrum.commands.tqcl.TqclPackage; +import org.eclipse.triquetrum.commands.tqcl.TriquetrumScript; + +/** + * + * An implementation of the model object 'Triquetrum Script'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.triquetrum.commands.tqcl.impl.TriquetrumScriptImpl#getLibraries Libraries}
  • + *
  • {@link org.eclipse.triquetrum.commands.tqcl.impl.TriquetrumScriptImpl#getCommands Commands}
  • + *
+ * + * @generated + */ +public class TriquetrumScriptImpl extends MinimalEObjectImpl.Container implements TriquetrumScript +{ + /** + * The cached value of the '{@link #getLibraries() Libraries}' containment reference list. + * + * + * @see #getLibraries() + * @generated + * @ordered + */ + protected EList libraries; + + /** + * The cached value of the '{@link #getCommands() Commands}' containment reference list. + * + * + * @see #getCommands() + * @generated + * @ordered + */ + protected EList commands; + + /** + * + * + * @generated + */ + protected TriquetrumScriptImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return TqclPackage.Literals.TRIQUETRUM_SCRIPT; + } + + /** + * + * + * @generated + */ + public EList getLibraries() + { + if (libraries == null) + { + libraries = new EObjectContainmentEList(Library.class, this, TqclPackage.TRIQUETRUM_SCRIPT__LIBRARIES); + } + return libraries; + } + + /** + * + * + * @generated + */ + public EList getCommands() + { + if (commands == null) + { + commands = new EObjectContainmentEList(Command.class, this, TqclPackage.TRIQUETRUM_SCRIPT__COMMANDS); + } + return commands; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case TqclPackage.TRIQUETRUM_SCRIPT__LIBRARIES: + return ((InternalEList)getLibraries()).basicRemove(otherEnd, msgs); + case TqclPackage.TRIQUETRUM_SCRIPT__COMMANDS: + return ((InternalEList)getCommands()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case TqclPackage.TRIQUETRUM_SCRIPT__LIBRARIES: + return getLibraries(); + case TqclPackage.TRIQUETRUM_SCRIPT__COMMANDS: + return getCommands(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case TqclPackage.TRIQUETRUM_SCRIPT__LIBRARIES: + getLibraries().clear(); + getLibraries().addAll((Collection)newValue); + return; + case TqclPackage.TRIQUETRUM_SCRIPT__COMMANDS: + getCommands().clear(); + getCommands().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case TqclPackage.TRIQUETRUM_SCRIPT__LIBRARIES: + getLibraries().clear(); + return; + case TqclPackage.TRIQUETRUM_SCRIPT__COMMANDS: + getCommands().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case TqclPackage.TRIQUETRUM_SCRIPT__LIBRARIES: + return libraries != null && !libraries.isEmpty(); + case TqclPackage.TRIQUETRUM_SCRIPT__COMMANDS: + return commands != null && !commands.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //TriquetrumScriptImpl diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/util/TqclAdapterFactory.java b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/util/TqclAdapterFactory.java new file mode 100644 index 00000000..003f941b --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/util/TqclAdapterFactory.java @@ -0,0 +1,344 @@ +/** + * ****************************************************************************** + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + * ****************************************************************************** + */ +package org.eclipse.triquetrum.commands.tqcl.util; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.triquetrum.commands.tqcl.*; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.eclipse.triquetrum.commands.tqcl.TqclPackage + * @generated + */ +public class TqclAdapterFactory extends AdapterFactoryImpl +{ + /** + * The cached model package. + * + * + * @generated + */ + protected static TqclPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public TqclAdapterFactory() + { + if (modelPackage == null) + { + modelPackage = TqclPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) + { + if (object == modelPackage) + { + return true; + } + if (object instanceof EObject) + { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected TqclSwitch modelSwitch = + new TqclSwitch() + { + @Override + public Adapter caseTriquetrumScript(TriquetrumScript object) + { + return createTriquetrumScriptAdapter(); + } + @Override + public Adapter caseCompositeCommand(CompositeCommand object) + { + return createCompositeCommandAdapter(); + } + @Override + public Adapter caseCommand(Command object) + { + return createCommandAdapter(); + } + @Override + public Adapter caseInclude(Include object) + { + return createIncludeAdapter(); + } + @Override + public Adapter caseLibrary(Library object) + { + return createLibraryAdapter(); + } + @Override + public Adapter caseInsert(Insert object) + { + return createInsertAdapter(); + } + @Override + public Adapter caseSet(Set object) + { + return createSetAdapter(); + } + @Override + public Adapter caseConnect(Connect object) + { + return createConnectAdapter(); + } + @Override + public Adapter caseConnectionPort(ConnectionPort object) + { + return createConnectionPortAdapter(); + } + @Override + public Adapter caseGo(Go object) + { + return createGoAdapter(); + } + @Override + public Adapter caseParameter(Parameter object) + { + return createParameterAdapter(); + } + @Override + public Adapter defaultCase(EObject object) + { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) + { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.triquetrum.commands.tqcl.TriquetrumScript Triquetrum Script}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.triquetrum.commands.tqcl.TriquetrumScript + * @generated + */ + public Adapter createTriquetrumScriptAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.triquetrum.commands.tqcl.CompositeCommand Composite Command}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.triquetrum.commands.tqcl.CompositeCommand + * @generated + */ + public Adapter createCompositeCommandAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.triquetrum.commands.tqcl.Command Command}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.triquetrum.commands.tqcl.Command + * @generated + */ + public Adapter createCommandAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.triquetrum.commands.tqcl.Include Include}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.triquetrum.commands.tqcl.Include + * @generated + */ + public Adapter createIncludeAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.triquetrum.commands.tqcl.Library Library}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.triquetrum.commands.tqcl.Library + * @generated + */ + public Adapter createLibraryAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.triquetrum.commands.tqcl.Insert Insert}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.triquetrum.commands.tqcl.Insert + * @generated + */ + public Adapter createInsertAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.triquetrum.commands.tqcl.Set Set}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.triquetrum.commands.tqcl.Set + * @generated + */ + public Adapter createSetAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.triquetrum.commands.tqcl.Connect Connect}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.triquetrum.commands.tqcl.Connect + * @generated + */ + public Adapter createConnectAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.triquetrum.commands.tqcl.ConnectionPort Connection Port}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.triquetrum.commands.tqcl.ConnectionPort + * @generated + */ + public Adapter createConnectionPortAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.triquetrum.commands.tqcl.Go Go}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.triquetrum.commands.tqcl.Go + * @generated + */ + public Adapter createGoAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.triquetrum.commands.tqcl.Parameter Parameter}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.triquetrum.commands.tqcl.Parameter + * @generated + */ + public Adapter createParameterAdapter() + { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() + { + return null; + } + +} //TqclAdapterFactory diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/util/TqclSwitch.java b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/util/TqclSwitch.java new file mode 100644 index 00000000..1a61a44e --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/tqcl/util/TqclSwitch.java @@ -0,0 +1,366 @@ +/** + * ****************************************************************************** + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + * ****************************************************************************** + */ +package org.eclipse.triquetrum.commands.tqcl.util; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +import org.eclipse.triquetrum.commands.tqcl.*; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.eclipse.triquetrum.commands.tqcl.TqclPackage + * @generated + */ +public class TqclSwitch extends Switch +{ + /** + * The cached model package + * + * + * @generated + */ + protected static TqclPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public TqclSwitch() + { + if (modelPackage == null) + { + modelPackage = TqclPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @param ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) + { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) + { + switch (classifierID) + { + case TqclPackage.TRIQUETRUM_SCRIPT: + { + TriquetrumScript triquetrumScript = (TriquetrumScript)theEObject; + T result = caseTriquetrumScript(triquetrumScript); + if (result == null) result = defaultCase(theEObject); + return result; + } + case TqclPackage.COMPOSITE_COMMAND: + { + CompositeCommand compositeCommand = (CompositeCommand)theEObject; + T result = caseCompositeCommand(compositeCommand); + if (result == null) result = caseCommand(compositeCommand); + if (result == null) result = defaultCase(theEObject); + return result; + } + case TqclPackage.COMMAND: + { + Command command = (Command)theEObject; + T result = caseCommand(command); + if (result == null) result = defaultCase(theEObject); + return result; + } + case TqclPackage.INCLUDE: + { + Include include = (Include)theEObject; + T result = caseInclude(include); + if (result == null) result = caseCommand(include); + if (result == null) result = defaultCase(theEObject); + return result; + } + case TqclPackage.LIBRARY: + { + Library library = (Library)theEObject; + T result = caseLibrary(library); + if (result == null) result = defaultCase(theEObject); + return result; + } + case TqclPackage.INSERT: + { + Insert insert = (Insert)theEObject; + T result = caseInsert(insert); + if (result == null) result = caseCommand(insert); + if (result == null) result = defaultCase(theEObject); + return result; + } + case TqclPackage.SET: + { + Set set = (Set)theEObject; + T result = caseSet(set); + if (result == null) result = caseCommand(set); + if (result == null) result = defaultCase(theEObject); + return result; + } + case TqclPackage.CONNECT: + { + Connect connect = (Connect)theEObject; + T result = caseConnect(connect); + if (result == null) result = caseCommand(connect); + if (result == null) result = defaultCase(theEObject); + return result; + } + case TqclPackage.CONNECTION_PORT: + { + ConnectionPort connectionPort = (ConnectionPort)theEObject; + T result = caseConnectionPort(connectionPort); + if (result == null) result = defaultCase(theEObject); + return result; + } + case TqclPackage.GO: + { + Go go = (Go)theEObject; + T result = caseGo(go); + if (result == null) result = defaultCase(theEObject); + return result; + } + case TqclPackage.PARAMETER: + { + Parameter parameter = (Parameter)theEObject; + T result = caseParameter(parameter); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Triquetrum Script'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Triquetrum Script'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseTriquetrumScript(TriquetrumScript object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Composite Command'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Composite Command'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCompositeCommand(CompositeCommand object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Command'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Command'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCommand(Command object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Include'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Include'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseInclude(Include object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Library'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Library'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseLibrary(Library object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Insert'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Insert'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseInsert(Insert object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Set'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Set'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSet(Set object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Connect'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Connect'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseConnect(Connect object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Connection Port'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Connection Port'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseConnectionPort(ConnectionPort object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Go'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Go'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGo(Go object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Parameter'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Parameter'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseParameter(Parameter object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) + { + return null; + } + +} //TqclSwitch diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/validation/AbstractTqclValidator.java b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/validation/AbstractTqclValidator.java new file mode 100644 index 00000000..d435aef1 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/validation/AbstractTqclValidator.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext 2.10.0 + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +package org.eclipse.triquetrum.commands.validation; + +import java.util.ArrayList; +import java.util.List; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.xtext.validation.AbstractDeclarativeValidator; + +public abstract class AbstractTqclValidator extends AbstractDeclarativeValidator { + + @Override + protected List getEPackages() { + List result = new ArrayList(); + result.add(org.eclipse.triquetrum.commands.tqcl.TqclPackage.eINSTANCE); + return result; + } + +} diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/GenerateTqcl.mwe2 b/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/GenerateTqcl.mwe2 new file mode 100644 index 00000000..b1ee122b --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/GenerateTqcl.mwe2 @@ -0,0 +1,132 @@ +module org.eclipse.triquetrum.commands.GenerateTqcl + +import org.eclipse.xtext.xtext.generator.* +import org.eclipse.xtext.xtext.generator.model.project.* + +var rootPath = ".." +var basename = "org.eclipse.triquetrum.commands.xtext" + +Workflow { + +// component = org.eclipse.emf.mwe.utils.DirectoryCleaner +// { +// directory = "" +// } + + bean = org.eclipse.emf.mwe.utils.StandaloneSetup + { + platformUri = "${rootPath}" + scanClassPath = true + registerGeneratedEPackage = "org.eclipse.triquetrum.workflow.model.TriqPackage" + registerGenModelFile = "platform:/resource/org.eclipse.triquetrum.workflow.model/model/triquetrum.genmodel" + } + component = XtextGenerator { + cleaner = { + enabled = true + + } + + configuration = { + project = StandardProjectConfig { + baseName = "${basename}" + rootPath = rootPath + runtimeTest = { + name ="${basename}.tests" + enabled = true + src = "../${basename}.tests/src/test/java" + srcGen = "../${basename}.tests/src/test/java-gen" + } + runtime = { + src = "src/main/java" + srcGen = "src/main/java-gen" + } + eclipsePlugin = { + name ="${basename}.ui" + enabled = true + src = "../${basename}.ui/src/main/java" + srcGen = "../${basename}.ui/src/main/java-gen" + } + + eclipsePluginTest = { + name ="${basename}.ui.tests" + enabled = false + src = "../${basename}.ui.tests/src/test/java" + srcGen = "../${basename}.ui.tests/src/test/java-gen" + } + genericIde = { + enabled = true + name ="${basename}.ide" + src = "../${basename}.ide/src/main/java" + srcGen = "../${basename}.ide/src/main/java-gen" + } + + createEclipseMetaData = true + + + } + + code = { + encoding = "UTF-8" + fileHeader = "/******************************************************************************* + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * generated by Xtext \${version} + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/" + } + } + + + + language = StandardLanguage { + name = "org.eclipse.triquetrum.commands.Tqcl" + fileExtensions = "tqcl" + emfGenerator = { + javaModelDirectory = "org.eclipse.triquetrum.commands.xtext/src/main/java-gen" + + } + + referencedResource ="platform:/resource/org.eclipse.triquetrum.workflow.model/model/triquetrum.genmodel" + + + + generator = generator.GeneratorFragment2 { + generateStub = true + generateXtendStub = false + } + + serializer = { + generateStub = true + generateXtendStub = false + } + + validator = { + // composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator" + generateStub = true + generateXtendStub = false + } + + scopeProvider = { + generateStub = true + generateXtendStub = false + } + + generateXtendStubs = false + + contentAssist= + { + generateStub=true + generateXtendStub=false + } + + + + } + } +} diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/Tqcl.xtext b/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/Tqcl.xtext new file mode 100644 index 00000000..1e1a509a --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/Tqcl.xtext @@ -0,0 +1,91 @@ +grammar org.eclipse.triquetrum.commands.Tqcl with org.eclipse.xtext.common.Terminals + +generate tqcl "http://www.eclipse.org/triquetrum/commands/Tqcl" + +TriquetrumScript: + libraries+=Library* + commands+=Command* +; + +CompositeCommand: + start = GoInto commands+=Command* (end = (GoOut|GoTop)) +; + +SimpleCommand returns Command: + (Insert|Connect|Set|Include)";" +; + +Command returns Command: + SimpleCommand|CompositeCommand +; + + + +Include: + "include" filename=STRING ";" +; + +Library: + "library" name=ID ";" +; + + +Insert: + "insert" (category=Category)? entityClass=ENTITY_CLASS 'as' name=STRING ("with" parameters+=(Parameter) ("," parameters+=Parameter)*)? ; + +Set: + "set" param = Parameter +; + +Connect: + "connect" from+=ConnectionPort(',' from+=ConnectionPort)* "to" to+=ConnectionPort(',' to+=ConnectionPort)*; + +ConnectionPort: + actor=[Insert] '.' port=NamedObj; + +GoInto returns Go: + "go" direction="into" actor = [Insert] +; + + +GoOut returns Go: + "go" direction="out" +; + +GoTop returns Go: + "go" direction="top" +; + +enum Category: + actor | parameter | port | director; + +Parameter: + id=Parameter_id "=" value=STRING; + +Parameter_id: + PARAMETER_NAME|STRING +; + +terminal PARAMETER_NAME: + '$'('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')* +; + +NamedObj: + (ID | STRING) + ; + +terminal ENTITY_CLASS: + ('<'->'>') +; + + +//terminal fragment ESCAPED_CHAR: +// '\\' ('n'|'t'|'r'|'\\'); + +//terminal ENTITY_INSTANCE_NAME: '^'?('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9'|ESCAPED_CHAR)*; + + + + + + diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/TqclRuntimeModule.java b/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/TqclRuntimeModule.java new file mode 100644 index 00000000..29535b3a --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/TqclRuntimeModule.java @@ -0,0 +1,24 @@ +/******************************************************************************* + * Copyright (c) 2017 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +package org.eclipse.triquetrum.commands; + +import org.eclipse.xtext.naming.IQualifiedNameProvider; + +/** + * Use this class to register components to be used at runtime / without the Equinox extension registry. + */ +public class TqclRuntimeModule extends AbstractTqclRuntimeModule { + + @Override + public Class bindIQualifiedNameProvider() { + return org.eclipse.triquetrum.commands.scoping.TqclQualifiedNameProvider.class; + } +} diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/TqclStandaloneSetup.java b/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/TqclStandaloneSetup.java new file mode 100644 index 00000000..15c686bc --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/TqclStandaloneSetup.java @@ -0,0 +1,22 @@ +/******************************************************************************* + * Copyright (c) 2017 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +package org.eclipse.triquetrum.commands; + + +/** + * Initialization support for running Xtext languages without Equinox extension registry. + */ +public class TqclStandaloneSetup extends TqclStandaloneSetupGenerated { + + public static void doSetup() { + new TqclStandaloneSetup().createInjectorAndDoEMFRegistration(); + } +} diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/generator/TqclGenerator.java b/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/generator/TqclGenerator.java new file mode 100644 index 00000000..380f3ed5 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/generator/TqclGenerator.java @@ -0,0 +1,35 @@ +/******************************************************************************* + * Copyright (c) 2017 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +/* + * generated by Xtext 2.10.0 + */ +package org.eclipse.triquetrum.commands.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 + */ +public class TqclGenerator extends AbstractGenerator { + + @Override + public void doGenerate(Resource arg0, IFileSystemAccess2 arg1, IGeneratorContext arg2) { + // TODO Auto-generated method stub + + } + +} \ No newline at end of file diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/interpreter/CompositeCommandInterpreterComponent.java b/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/interpreter/CompositeCommandInterpreterComponent.java new file mode 100644 index 00000000..2c5416c6 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/interpreter/CompositeCommandInterpreterComponent.java @@ -0,0 +1,58 @@ +/******************************************************************************* + * Copyright (c) 2017 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +package org.eclipse.triquetrum.commands.interpreter; + +import java.util.Arrays; +import java.util.List; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.triquetrum.commands.tqcl.Command; +import org.eclipse.triquetrum.commands.tqcl.CompositeCommand; +import org.eclipse.triquetrum.commands.tqcl.Go; +import org.eclipse.triquetrum.commands.tqcl.TqclPackage; + +/** + * Interpreter component for {@link CompositeCommand} + * @author rtotaro + */ +public class CompositeCommandInterpreterComponent implements TqclInterpreterComponent { + + /* (non-Javadoc) + * @see org.eclipse.triquetrum.commands.interpreter.TqclInterpreterComponent#interpret(org.eclipse.emf.ecore.EObject, org.eclipse.triquetrum.commands.interpreter.InterpretContext) + */ + @SuppressWarnings({ "rawtypes", "unchecked" }) + @Override + public void interpret(EObject element, InterpretContext context) { + if (element instanceof CompositeCommand) { + CompositeCommand compositeCommand = (CompositeCommand) element; + context.getInterpreter().interpret(compositeCommand.getStart(),context); + for (Command command : compositeCommand.getCommands()) { + context.getInterpreter().interpret(command,context); + } + Go end = compositeCommand.getEnd(); + if(end!=null) + { + context.getInterpreter().interpret(end,context); + } + } + + } + + /* (non-Javadoc) + * @see org.eclipse.triquetrum.commands.interpreter.TqclInterpreterComponent#intepretedEClasses() + */ + @Override + public List intepretedEClasses() { + return Arrays.asList(TqclPackage.Literals.COMPOSITE_COMMAND); + } + +} diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/interpreter/ConnectInterpreterComponent.java b/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/interpreter/ConnectInterpreterComponent.java new file mode 100644 index 00000000..cf8303aa --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/interpreter/ConnectInterpreterComponent.java @@ -0,0 +1,66 @@ +/******************************************************************************* + * Copyright (c) 2017 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +package org.eclipse.triquetrum.commands.interpreter; + +import java.util.Arrays; +import java.util.List; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.triquetrum.commands.tqcl.CompositeCommand; +import org.eclipse.triquetrum.commands.tqcl.Connect; +import org.eclipse.triquetrum.commands.tqcl.ConnectionPort; +import org.eclipse.triquetrum.commands.tqcl.TqclPackage; + +/** + * Interpreter component for {@link Connect} + * @author rtotaro + */ +public class ConnectInterpreterComponent implements TqclInterpreterComponent { + + /* (non-Javadoc) + * @see org.eclipse.triquetrum.commands.interpreter.TqclInterpreterComponent#interpret(org.eclipse.emf.ecore.EObject, org.eclipse.triquetrum.commands.interpreter.InterpretContext) + */ + @Override + public void interpret(EObject element, InterpretContext context) { + if (element instanceof Connect) { + Connect connect = (Connect) element; + EList from = connect.getFrom(); + EList to = connect.getTo(); + for (ConnectionPort connectionPortFrom : from) { + for (ConnectionPort connectionPortTo : to) { + context.getModelBuilderService().connect(context.getCurrentActor(),createPortPath(connectionPortFrom),createPortPath(connectionPortTo)); + } + } + + } + + } + + /** + * @param port + * @return + */ + private String createPortPath(ConnectionPort port) { + return port.getActor().getName()+"."+port.getPort(); + } + + /* (non-Javadoc) + * @see org.eclipse.triquetrum.commands.interpreter.TqclInterpreterComponent#intepretedEClasses() + */ + @Override + public List intepretedEClasses() { + return Arrays.asList(TqclPackage.Literals.CONNECT); + } + +} + diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/interpreter/GoInterpreterComponent.java b/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/interpreter/GoInterpreterComponent.java new file mode 100644 index 00000000..cb38bce8 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/interpreter/GoInterpreterComponent.java @@ -0,0 +1,64 @@ +/******************************************************************************* + * Copyright (c) 2017 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +package org.eclipse.triquetrum.commands.interpreter; + +import java.util.Arrays; +import java.util.List; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.triquetrum.commands.tqcl.CompositeCommand; +import org.eclipse.triquetrum.commands.tqcl.Go; +import org.eclipse.triquetrum.commands.tqcl.Insert; +import org.eclipse.triquetrum.commands.tqcl.TqclPackage; + +/** + * Interpreter component for {@link Go} + * @author rtotaro + */ +public class GoInterpreterComponent implements TqclInterpreterComponent { + + /* (non-Javadoc) + * @see org.eclipse.triquetrum.commands.interpreter.TqclInterpreterComponent#interpret(org.eclipse.emf.ecore.EObject, org.eclipse.triquetrum.commands.interpreter.InterpretContext) + */ + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public void interpret(EObject element, InterpretContext context) { + if (element instanceof Go) { + Go go = (Go) element; + String direction = go.getDirection(); + + switch (direction) { + case "into": + Insert actor = go.getActor(); + String name = actor.getName(); + context.setCurrentActor(context.getModelBuilderService().getChild(context.getCurrentActor(),name)); + break; + case "out": + context.setCurrentActor(context.getModelBuilderService().getParent(context.getCurrentActor())); + break; + + default: + break; + } + } + } + + /* (non-Javadoc) + * @see org.eclipse.triquetrum.commands.interpreter.TqclInterpreterComponent#intepretedEClasses() + */ + @Override + public List intepretedEClasses() { + return Arrays.asList(TqclPackage.Literals.GO); + } + +} + diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/interpreter/InsertInterpreterComponent.java b/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/interpreter/InsertInterpreterComponent.java new file mode 100644 index 00000000..16c0cd14 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/interpreter/InsertInterpreterComponent.java @@ -0,0 +1,80 @@ +/******************************************************************************* + * Copyright (c) 2017 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +package org.eclipse.triquetrum.commands.interpreter; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.triquetrum.commands.api.services.TcQLException; +import org.eclipse.triquetrum.commands.tqcl.Category; +import org.eclipse.triquetrum.commands.tqcl.CompositeCommand; +import org.eclipse.triquetrum.commands.tqcl.Insert; +import org.eclipse.triquetrum.commands.tqcl.Parameter; +import org.eclipse.triquetrum.commands.tqcl.TqclPackage; +import org.eclipse.triquetrum.commands.validation.TqCLUtils; + +/** + * Interpreter component for {@link Insert} + * @author rtotaro + */ +public class InsertInterpreterComponent implements TqclInterpreterComponent { + + /* (non-Javadoc) + * @see org.eclipse.triquetrum.commands.interpreter.TqclInterpreterComponent#interpret(org.eclipse.emf.ecore.EObject, org.eclipse.triquetrum.commands.interpreter.InterpretContext) + */ + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public void interpret(EObject element, InterpretContext context) { + if (element instanceof Insert) { + Insert insert = (Insert) element; + Category category = insert.getCategory(); + String entityClass = TqCLUtils.cleanEntityClassName(insert.getEntityClass()); + String name = insert.getName(); + Map params = extractParameterMap(insert); + switch (category) { + case ACTOR: + context.getModelBuilderService().insertActor(context.getCurrentActor(), name, entityClass, params); + break; + case DIRECTOR: + context.getModelBuilderService().insertDirector(context.getCurrentActor(), name, entityClass, params); + break; + case PARAMETER: + context.getModelBuilderService().insertParameter(context.getCurrentActor(), name, entityClass, params); + break; + case PORT: + context.getModelBuilderService().insertPort(context.getCurrentActor(), name, entityClass, params); + break; + } + + } + } + + private Map extractParameterMap(Insert insert) { + Map params = new HashMap<>(); + for (Parameter parameter : insert.getParameters()) { + params.put(TqCLUtils.cleanParameterName(parameter.getId()), parameter.getValue()); + } + return params; + } + + /* (non-Javadoc) + * @see org.eclipse.triquetrum.commands.interpreter.TqclInterpreterComponent#intepretedEClasses() + */ + @Override + public List intepretedEClasses() { + return Arrays.asList(TqclPackage.Literals.INSERT); + } + +} diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/interpreter/InterpretContext.java b/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/interpreter/InterpretContext.java new file mode 100644 index 00000000..ca9f5e86 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/interpreter/InterpretContext.java @@ -0,0 +1,71 @@ +/******************************************************************************* + * Copyright (c) 2017 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +package org.eclipse.triquetrum.commands.interpreter; + +import org.eclipse.triquetrum.commands.api.services.ModelBuilderService; + + +/** + * Object that contains the result of interpretation + * + * @author rtotaro + * + * @param class used to represent the composite actor + * @param class used to represent the simple actor + */ +public class InterpretContext { + + private ModelBuilderService modelBuilderService; + + private TqclInterpreter interpreter; + + private CompositeActor model; + + private Actor currentActor; + + /** + * @param interpreter is used by interpreter component + * @param model root of the model to interpret + * @param modelBuilderService is used to build the model + */ + public InterpretContext(TqclInterpreter interpreter,CompositeActor model,ModelBuilderService modelBuilderService) { + super(); + this.interpreter = interpreter; + this.model = model; + this.currentActor = (Actor) model; + this.modelBuilderService = modelBuilderService; + } + + public TqclInterpreter getInterpreter() { + return interpreter; + } + + public ModelBuilderService getModelBuilderService() { + return modelBuilderService; + } + public CompositeActor getModel() { + return model; + } + + public Actor getCurrentActor() { + return currentActor; + } + + /** + * Is used to set the current level in the actor hierarchy + * Could be also a simple actor for adding ports or parameters + * @param currentActor + */ + public void setCurrentActor(Actor currentActor) { + this.currentActor = currentActor; + } + +} diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/interpreter/TqclInterpreter.java b/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/interpreter/TqclInterpreter.java new file mode 100644 index 00000000..d4ec7ab8 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/interpreter/TqclInterpreter.java @@ -0,0 +1,132 @@ +/******************************************************************************* + * Copyright (c) 2017 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +package org.eclipse.triquetrum.commands.interpreter; + +import java.io.IOException; +import java.io.InputStream; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; + +import org.apache.commons.lang.StringUtils; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.triquetrum.commands.TqclStandaloneSetup; +import org.eclipse.triquetrum.commands.api.TqCLServices; +import org.eclipse.triquetrum.commands.api.services.ModelBuilderService; +import org.eclipse.xtext.linking.lazy.LazyLinkingResource; +import org.eclipse.xtext.nodemodel.INode; +import org.eclipse.xtext.parser.IParseResult; +import org.eclipse.xtext.resource.IResourceFactory; +import org.eclipse.xtext.resource.XtextResource; +import org.eclipse.xtext.util.CancelIndicator; +import org.eclipse.xtext.validation.IConcreteSyntaxDiagnosticProvider.IConcreteSyntaxDiagnostic; +import org.eclipse.xtext.validation.IConcreteSyntaxValidator.IDiagnosticAcceptor; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.google.inject.Injector; + +import ptolemy.util.StringUtilities; + +/** + * The TqCL interpreter, the type of the result is related to the {@link ModelBuilderService} set in the {@link InterpretContext} + * @author rtotaro + * + * @param class used to represent the composite actor + * @param class used to represent the simple acto + */ +public class TqclInterpreter { + + private static Map components = new HashMap<>(); + private final static Logger LOGGER = LoggerFactory.getLogger(TqclInterpreter.class); + + static + { + addComponent(new TriquetrumScriptInterpreterComponent()); + addComponent(new InsertInterpreterComponent()); + addComponent(new GoInterpreterComponent()); + addComponent(new CompositeCommandInterpreterComponent()); + addComponent(new ConnectInterpreterComponent()); + } + + + + private static void addComponent(TqclInterpreterComponent component){ + for (EClass eClass : component.intepretedEClasses()) { + components.put(eClass, component); + } + } + + /** + * Interpreter the TqCL script + * + * @param modelName the name of the result model + * @param script to interpret + * @param uri parent directory of the script + * @param modelClass result class, is used to select the right {@link ModelBuilderService} + * @return + */ + public CompositeActor interpret(String modelName,InputStream script, java.net.URI uri,Class modelClass) { + try { + Injector injector = new TqclStandaloneSetup().createInjectorAndDoEMFRegistration(); + IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class); + + XtextResource resource = (XtextResource) resourceFactory.createResource(URI.createURI(uri.getPath()+"/"+modelName)); + resource.load(script, null); + IParseResult parseResult = resource.getParseResult(); + + if(parseResult.hasSyntaxErrors()){ + Iterable syntaxErrors = parseResult.getSyntaxErrors(); + //TODO: log them + } + + if (resource instanceof LazyLinkingResource) { + LazyLinkingResource lazyLinkingResource = (LazyLinkingResource) resource; + lazyLinkingResource.resolveLazyCrossReferences(CancelIndicator.NullImpl); + } + else + { + EcoreUtil.resolveAll(resource); + } + EObject root = parseResult.getRootASTElement(); + + resource.getConcreteSyntaxValidator().validateRecursive(root, new IDiagnosticAcceptor() + { + @Override + public void accept(IConcreteSyntaxDiagnostic arg0) { + // TODO Auto-generated method stub + + } + }, Collections.EMPTY_MAP); + + ModelBuilderService modelBuilderService = TqCLServices.getInstance().getModelBuilderService(modelClass); + CompositeActor model = modelBuilderService.createNewModel(StringUtils.removeEnd(modelName, ".tqcl"), uri.toString()); + + interpret(root, new InterpretContext(this,model,modelBuilderService)); + + return model; + + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + return null; + } + + void interpret(EObject element, InterpretContext context) + { + components.get(element.eClass()).interpret(element, context); + } +} diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/interpreter/TqclInterpreterComponent.java b/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/interpreter/TqclInterpreterComponent.java new file mode 100644 index 00000000..fec368f7 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/interpreter/TqclInterpreterComponent.java @@ -0,0 +1,44 @@ +/******************************************************************************* + * Copyright (c) 2017 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +package org.eclipse.triquetrum.commands.interpreter; + +import java.util.List; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; + +/** + * Interface implements by interpreter components. Each component interpret one + * or more syntax structure + * + * @author rtotaro + * + */ +public interface TqclInterpreterComponent { + + /** + * Interpret the element adding result to the context + * + * @param element + * @param context + */ + @SuppressWarnings("rawtypes") + void interpret(EObject element, InterpretContext context); + + /** + * Interpreted EClasses, this information is used to choose which component + * call during interpretation. An EClass can be interpreted by only one + * component + * + * @return the list of interpreted classes + */ + List intepretedEClasses(); +} diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/interpreter/TriquetrumScriptInterpreterComponent.java b/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/interpreter/TriquetrumScriptInterpreterComponent.java new file mode 100644 index 00000000..783652e8 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/interpreter/TriquetrumScriptInterpreterComponent.java @@ -0,0 +1,48 @@ +/******************************************************************************* + * Copyright (c) 2017 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +package org.eclipse.triquetrum.commands.interpreter; + +import java.util.Arrays; +import java.util.List; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.triquetrum.commands.tqcl.Command; +import org.eclipse.triquetrum.commands.tqcl.TqclPackage; +import org.eclipse.triquetrum.commands.tqcl.TriquetrumScript; + +/** + * Interpreter component for {@link TriquetrumScript} + * @author rtotaro + * + */ +public class TriquetrumScriptInterpreterComponent implements TqclInterpreterComponent { + + @SuppressWarnings({ "rawtypes", "unchecked" }) + @Override + public void interpret(EObject element, InterpretContext context) { + if (element instanceof TriquetrumScript) { + TriquetrumScript script = (TriquetrumScript) element; + EList commands = script.getCommands(); + + for (Command command : commands) { + context.getInterpreter().interpret(command, context); + } + } + } + + @Override + public List intepretedEClasses() { + return Arrays.asList(TqclPackage.Literals.TRIQUETRUM_SCRIPT); + } + +} diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/scoping/TqclQualifiedNameProvider.java b/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/scoping/TqclQualifiedNameProvider.java new file mode 100644 index 00000000..45040acc --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/scoping/TqclQualifiedNameProvider.java @@ -0,0 +1,38 @@ +/******************************************************************************* + * Copyright (c) 2017 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +package org.eclipse.triquetrum.commands.scoping; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.triquetrum.commands.tqcl.Insert; +import org.eclipse.triquetrum.commands.validation.TqCLUtils; +import org.eclipse.xtext.naming.DefaultDeclarativeQualifiedNameProvider; +import org.eclipse.xtext.naming.QualifiedName; + +public class TqclQualifiedNameProvider extends DefaultDeclarativeQualifiedNameProvider { + + @Override + public QualifiedName apply(EObject eObject) { +// if (eObject instanceof Insert) { +// return getFullyQualifiedName(eObject); +// } + return super.apply(eObject); + } + + @Override + public QualifiedName getFullyQualifiedName(EObject eObject) { +// if (eObject instanceof Insert) { +// Insert insert = (Insert) eObject; +// return QualifiedName.create(TqCLUtils.cleanEntityName(insert.getName())); +// } + return super.getFullyQualifiedName(eObject); + } + +} diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/scoping/TqclScopeProvider.java b/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/scoping/TqclScopeProvider.java new file mode 100644 index 00000000..92cbdf01 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/scoping/TqclScopeProvider.java @@ -0,0 +1,79 @@ +/******************************************************************************* + * Copyright (c) 2017 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +/* + * generated by Xtext 2.10.0 + */ +package org.eclipse.triquetrum.commands.scoping; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.triquetrum.commands.tqcl.Category; +import org.eclipse.triquetrum.commands.tqcl.Connect; +import org.eclipse.triquetrum.commands.tqcl.Go; +import org.eclipse.triquetrum.commands.tqcl.Insert; +import org.eclipse.triquetrum.commands.tqcl.TqclPackage; +import org.eclipse.xtext.EcoreUtil2; +import org.eclipse.xtext.resource.IEObjectDescription; +import org.eclipse.xtext.scoping.IScope; +import org.eclipse.xtext.scoping.Scopes; +import org.eclipse.xtext.scoping.impl.FilteringScope; + +import com.google.common.base.Predicate; + +/** + * 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. + */ +public class TqclScopeProvider extends AbstractTqclScopeProvider { + + private Predicate actorInsertPredicate = new Predicate() { + + @Override + public boolean apply(IEObjectDescription objectDescription) { + EObject eObjectOrProxy = objectDescription.getEObjectOrProxy(); + if (eObjectOrProxy instanceof Insert) { + Insert insert = (Insert) eObjectOrProxy; + return Category.ACTOR.equals(insert.getCategory()); + } + return false; + } + }; + + /* (non-Javadoc) + * @see org.eclipse.xtext.scoping.impl.DelegatingScopeProvider#getScope(org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EReference) + */ + @Override + public IScope getScope(EObject context, EReference reference) { + if (context instanceof Go && reference == TqclPackage.Literals.GO__ACTOR) { + EObject eContainer = context.eContainer().eContainer(); + Iterable candidates = EcoreUtil2.getAllContentsOfType(eContainer, Insert.class); + IScope scope = Scopes.scopeFor(candidates); + return new FilteringScope(scope, actorInsertPredicate); + } + if (context instanceof Connect && reference == TqclPackage.Literals.CONNECTION_PORT__ACTOR) { + // Collect a list of candidates by going through the model + // EcoreUtil2 provides useful functionality to do that + // For example searching for all elements within the root Object's + // tree + EObject rootElement = context.eContainer(); + Iterable candidates = EcoreUtil2.getAllContentsOfType(rootElement, Insert.class); + // Create IEObjectDescriptions and puts them into an IScope instance + IScope scope = Scopes.scopeFor(candidates); + return new FilteringScope(scope, actorInsertPredicate); + + } + return super.getScope(context, reference); + } + +} diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/serializer/TqclSemanticSequencer.java b/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/serializer/TqclSemanticSequencer.java new file mode 100644 index 00000000..e2d37c3d --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/serializer/TqclSemanticSequencer.java @@ -0,0 +1,18 @@ +/******************************************************************************* + * Copyright (c) 2017 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +/* + * generated by Xtext 2.10.0 + */ +package org.eclipse.triquetrum.commands.serializer; + + +public class TqclSemanticSequencer extends AbstractTqclSemanticSequencer { +} diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/serializer/TqclSyntacticSequencer.java b/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/serializer/TqclSyntacticSequencer.java new file mode 100644 index 00000000..379d7d12 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/serializer/TqclSyntacticSequencer.java @@ -0,0 +1,18 @@ +/******************************************************************************* + * Copyright (c) 2017 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +/* + * generated by Xtext 2.10.0 + */ +package org.eclipse.triquetrum.commands.serializer; + + +public class TqclSyntacticSequencer extends AbstractTqclSyntacticSequencer { +} diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/validation/TqCLUtils.java b/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/validation/TqCLUtils.java new file mode 100644 index 00000000..5c31db67 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/validation/TqCLUtils.java @@ -0,0 +1,139 @@ +/******************************************************************************* + * Copyright (c) 2017 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +package org.eclipse.triquetrum.commands.validation; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.triquetrum.commands.api.TqCLServices; +import org.eclipse.triquetrum.commands.api.services.PortDescriptor; +import org.eclipse.triquetrum.commands.api.services.TqCLLibraryException; +import org.eclipse.triquetrum.commands.tqcl.Category; +import org.eclipse.triquetrum.commands.tqcl.Command; +import org.eclipse.triquetrum.commands.tqcl.CompositeCommand; +import org.eclipse.triquetrum.commands.tqcl.Insert; +import org.eclipse.triquetrum.commands.tqcl.Parameter; +import org.eclipse.xtext.EcoreUtil2; + +import com.google.common.base.Predicate; +import com.google.common.collect.Collections2; + +/** + * Utils class to clean qualified name used in tqcl and create valid name for ptolemy models + * @author rtotaro + * + */ +public class TqCLUtils { + + public static String cleanEntityName(String entityClass) { + return entityClass.substring(1, entityClass.lastIndexOf('>')); + } + + public static Category getCategory(Insert insert) { + Category category = insert.getCategory(); + if (category == null) { + category = Category.ACTOR; + } + return category; + } + + public static String cleanParameterName(String id) { + + if (id.startsWith("$")) { + return id.substring(1); + } else if (id.startsWith("\"")) { + return id.substring(1, id.lastIndexOf('"')); + } + + // TODO : throw exception??? + return null; + } + + public static String createEditorEntityName(String entityName) { + return entityName.contains(" ") ? ("\"" + entityName + "\"") : entityName; + + } + + public static String getParameterValueByName(Insert insert, String parameterName) { + EList parameters = insert.getParameters(); + for (Parameter parameter : parameters) { + if (parameterName.equals(cleanParameterName(parameter.getId()))) { + return parameter.getValue(); + } + } + + return null; + } + + public static List getActorInsertPorts(Insert actor,final boolean input,final boolean output) { + String actorClass = actor.getEntityClass(); + List actorPorts = new ArrayList<>(); + try { + List candidateLibraryPorts = TqCLServices.getInstance().getTqclLibraryProvider() + .getActorPorts(TqCLUtils.cleanEntityName(actorClass)); + + actorPorts.addAll(Collections2.filter(candidateLibraryPorts,new Predicate() { + @Override + public boolean apply(PortDescriptor candidatePort) { + return (candidatePort.isInput()&&input)||(candidatePort.isOutput()&&output); + } + })); + + fillDeclaredPorts(actor, actorPorts,input,output); + + + } catch (TqCLLibraryException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return actorPorts; + } + + private static void fillDeclaredPorts(Insert actor, List actorPorts, boolean input, boolean output) { + EObject actorContainer = actor.eContainer(); + List compositeCommands = EcoreUtil2.getAllContentsOfType(actorContainer, + CompositeCommand.class); + Collection filteredCompositeCommand = Collections2.filter(compositeCommands, + new Predicate() { + @Override + public boolean apply(CompositeCommand compositeCommand) { + return compositeCommand.getStart().getActor().getName().equals(actor.getName()); + } + }); + + for (CompositeCommand compositeCommand : filteredCompositeCommand) { + EList commands = compositeCommand.getCommands(); + for (Command command : commands) { + if (command instanceof Insert) { + Insert insert = (Insert) command; + if (Category.PORT.equals(insert.getCategory())) { + Boolean inputPort = Boolean.parseBoolean(TqCLUtils.getParameterValueByName(insert, "input")); + Boolean outputPort = Boolean.parseBoolean(TqCLUtils.getParameterValueByName(insert, "output")); + + if ((input && inputPort) || (output && outputPort)) { + actorPorts.add(new PortDescriptor("script", insert.getName(), + TqCLUtils.cleanEntityName(insert.getEntityClass()), null,inputPort,outputPort)); + } + } + + } + } + } + } + + public static String cleanEntityClassName(String entityClass) { + return entityClass.substring(1, entityClass.lastIndexOf('>')); + } + +} diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/validation/TqclValidator.java b/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/validation/TqclValidator.java new file mode 100644 index 00000000..d66339c6 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/java/org/eclipse/triquetrum/commands/validation/TqclValidator.java @@ -0,0 +1,221 @@ +/******************************************************************************* + * Copyright (c) 2017 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +/* + * generated by Xtext 2.10.0 + */ +package org.eclipse.triquetrum.commands.validation; + +import java.text.MessageFormat; +import java.util.Collection; +import java.util.List; +import java.util.Set; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.common.util.TreeIterator; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.triquetrum.commands.api.TqCLServices; +import org.eclipse.triquetrum.commands.api.services.EntityDescriptor; +import org.eclipse.triquetrum.commands.api.services.ParameterDescriptor; +import org.eclipse.triquetrum.commands.api.services.PortDescriptor; +import org.eclipse.triquetrum.commands.api.services.TqCLLibraryException; +import org.eclipse.triquetrum.commands.api.services.TqCLLibraryProvider; +import org.eclipse.triquetrum.commands.tqcl.Category; +import org.eclipse.triquetrum.commands.tqcl.Connect; +import org.eclipse.triquetrum.commands.tqcl.ConnectionPort; +import org.eclipse.triquetrum.commands.tqcl.Insert; +import org.eclipse.triquetrum.commands.tqcl.Library; +import org.eclipse.triquetrum.commands.tqcl.Parameter; +import org.eclipse.triquetrum.commands.tqcl.TqclPackage; +import org.eclipse.xtext.EcoreUtil2; +import org.eclipse.xtext.validation.Check; + +import com.google.common.base.Function; +import com.google.common.collect.Collections2; + +/** + * This class contains custom validation rules. + * + * See + * https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#validation + */ +public class TqclValidator extends AbstractTqclValidator { + + public static final String INVALID_ENTITY_CLASS = "invalidEntityClass"; + + public static final String INVALID_LIBRARY = "invalidLibrary"; + + public static final String INVALID_PARAMETER = "invalidParameter"; + + public static final String DUPLICATED_ENTITY_NAME = "duplicatedEntityName"; + + public static final String INVALID_PORT_NAME = "invalidPortName"; + + /** + * Check that the library is supported by a {@link TqCLLibraryProvider} + * @param library + */ + @Check + public void checkLibrary(Library library) { + String name = library.getName(); + Set libraryNames = TqCLServices.getInstance().getTqclLibraryProvider().getLibraryNames(); + if (!libraryNames.contains(name)) { + warning("Invalid Library Name", TqclPackage.Literals.LIBRARY__NAME, INVALID_LIBRARY); + } + } + + /** + * Check that entity exists in the imported libraries + * @param library + */ + @Check + public void checkEntityInLibrary(Insert insert) { + String entityClass = TqCLUtils.cleanEntityClassName(insert.getEntityClass()); + List libraries = EcoreUtil2.getAllContentsOfType(EcoreUtil2.getRootContainer(insert), Library.class); + for (Library library : libraries) { + String libraryName = library.getName(); + TqCLLibraryProvider tqclLibraryProvider = TqCLServices.getInstance().getTqclLibraryProvider(); + if (tqclLibraryProvider.hasElementInLibrary(entityClass, libraryName, insert.getCategory().getName())) { + return; + } + + } + String message = MessageFormat.format("Entity class {0} not found in imported library", entityClass); + error(message, TqclPackage.Literals.INSERT__ENTITY_CLASS, INVALID_ENTITY_CLASS); + } + + /** + * Check that the name used for model element is an unique identifier + * @param insert + */ + @Check + public void checkNameUnique(Insert insert) { + String name = insert.getName(); + EObject rootContainer = EcoreUtil2.getRootContainer(insert); + TreeIterator eAllContents = rootContainer.eAllContents(); + while (eAllContents.hasNext()) { + EObject eObject = (EObject) eAllContents.next(); + if (eObject instanceof Insert) { + Insert otherInsert = (Insert) eObject; + if (otherInsert != insert) { + if (otherInsert.getName().equals(name)) { + error("Duplicated entity name", TqclPackage.Literals.INSERT__NAME, DUPLICATED_ENTITY_NAME); + } + } + + } + } + } + + /** + * Check that the ports to connect already exist in the model + * @param connectionPort + */ + @Check + public void checkConnectionPortName(ConnectionPort connectionPort) { + String featureName = connectionPort.eContainmentFeature().getName(); + if(featureName.equals(TqclPackage.Literals.CONNECT__FROM.getName())) + { + checkPortName(connectionPort,false,true); + + } + if(featureName.equals(TqclPackage.Literals.CONNECT__TO.getName())) + { + checkPortName(connectionPort,true,false); + } + + } + + private void checkPortName(ConnectionPort connectionPort,boolean input,boolean output) { + List actorInsertPorts = TqCLUtils.getActorInsertPorts(connectionPort.getActor(), input, + output); + Collection portNames = Collections2.transform(actorInsertPorts, + new Function() { + @Override + public String apply(PortDescriptor portDescriptor) { + return portDescriptor.getDisplayName(); + } + }); + + String portToCheck = connectionPort.getPort(); + if (!portNames.contains(portToCheck)) { + if(input) + { + error("Invalid input port name", TqclPackage.Literals.CONNECTION_PORT__PORT, INVALID_PORT_NAME); + } + else if(output) + { + error("Invalid output port name", TqclPackage.Literals.CONNECTION_PORT__PORT, INVALID_PORT_NAME); + } + else + { + error("Invalidport name", TqclPackage.Literals.CONNECTION_PORT__PORT, INVALID_PORT_NAME); + } + } + } + + /** + * Check that the used parameter exists for the inserted actor + * @param insert + */ + @Check + public void checkEntityParameters(Insert insert) { + TqCLLibraryProvider tqclLibraryProvider = TqCLServices.getInstance().getTqclLibraryProvider(); + EList eContents = insert.eContainer().eContents(); + for (EObject eObject : eContents) { + if (eObject instanceof Library) { + Library library = (Library) eObject; + try { + Category category = TqCLUtils.getCategory(insert); + String entityClass = insert.getEntityClass(); + EntityDescriptor entityDescriptor = null; + switch (category) { + case ACTOR: + entityDescriptor = tqclLibraryProvider.getActor(TqCLUtils.cleanEntityName(entityClass)); + break; + case DIRECTOR: + entityDescriptor = tqclLibraryProvider.getDirector(TqCLUtils.cleanEntityName(entityClass)); + break; + case PARAMETER: + entityDescriptor = tqclLibraryProvider.getParameterType(TqCLUtils.cleanEntityName(entityClass)); + break; + + default: + break; + } + + if (entityDescriptor != null) { + List parameters = entityDescriptor.getParameters(); + EList tqclParameters = insert.getParameters(); + for (Parameter tqclParameter : tqclParameters) { + boolean found = false; + for (ParameterDescriptor parameterDescriptor : parameters) { + if (parameterDescriptor.getDisplayName() + .equals(TqCLUtils.cleanParameterName(tqclParameter.getId()))) { + found = true; + break; + } + } + if (!found) { + String message = MessageFormat.format("Invalid parameter name {0} for actor {1}", + tqclParameter.getId(), entityDescriptor.getClazz()); + error(message, tqclParameter, TqclPackage.Literals.PARAMETER__ID, INVALID_PARAMETER); + } + } + } + } catch (TqCLLibraryException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + } + } + +} diff --git a/org.eclipse.triquetrum.commands.xtext/src/main/xtend-gen/org/eclipse/triquetrum/commands/.gitignore b/org.eclipse.triquetrum.commands.xtext/src/main/xtend-gen/org/eclipse/triquetrum/commands/.gitignore new file mode 100644 index 00000000..8d5e73b3 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/main/xtend-gen/org/eclipse/triquetrum/commands/.gitignore @@ -0,0 +1,6 @@ +/.TqclRuntimeModule.java._trace +/.TqclStandaloneSetup.java._trace +/.TqclRuntimeModule.xtendbin +/.TqclStandaloneSetup.xtendbin +/TqclRuntimeModule.java +/TqclStandaloneSetup.java diff --git a/org.eclipse.triquetrum.commands.xtext/src/test/java-gen/org/eclipse/triquetrum/commands/tests/TqclInjectorProvider.java b/org.eclipse.triquetrum.commands.xtext/src/test/java-gen/org/eclipse/triquetrum/commands/tests/TqclInjectorProvider.java new file mode 100644 index 00000000..f46cf301 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/test/java-gen/org/eclipse/triquetrum/commands/tests/TqclInjectorProvider.java @@ -0,0 +1,76 @@ +/******************************************************************************* + * Copyright (c) 2016 Totaro Rodolfo + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Rodolfo Totaro - initial API and implementation and/or initial documentation + *******************************************************************************/ +/* + * generated by Xtext 2.10.0 + */ +package org.eclipse.triquetrum.commands.tests; + +import com.google.inject.Guice; +import com.google.inject.Injector; +import org.eclipse.triquetrum.commands.TqclRuntimeModule; +import org.eclipse.triquetrum.commands.TqclStandaloneSetup; +import org.eclipse.xtext.junit4.GlobalRegistries; +import org.eclipse.xtext.junit4.GlobalRegistries.GlobalStateMemento; +import org.eclipse.xtext.junit4.IInjectorProvider; +import org.eclipse.xtext.junit4.IRegistryConfigurator; + +public class TqclInjectorProvider implements IInjectorProvider, IRegistryConfigurator { + + protected GlobalStateMemento stateBeforeInjectorCreation; + protected GlobalStateMemento stateAfterInjectorCreation; + protected Injector injector; + + static { + GlobalRegistries.initializeDefaults(); + } + + @Override + public Injector getInjector() { + if (injector == null) { + stateBeforeInjectorCreation = GlobalRegistries.makeCopyOfGlobalState(); + this.injector = internalCreateInjector(); + stateAfterInjectorCreation = GlobalRegistries.makeCopyOfGlobalState(); + } + return injector; + } + + protected Injector internalCreateInjector() { + return new TqclStandaloneSetup() { + @Override + public Injector createInjector() { + return Guice.createInjector(createRuntimeModule()); + } + }.createInjectorAndDoEMFRegistration(); + } + + protected TqclRuntimeModule createRuntimeModule() { + // make it work also with Maven/Tycho and OSGI + // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=493672 + return new TqclRuntimeModule() { + @Override + public ClassLoader bindClassLoaderToInstance() { + return TqclInjectorProvider.class + .getClassLoader(); + } + }; + } + + @Override + public void restoreRegistry() { + stateBeforeInjectorCreation.restoreGlobalState(); + } + + @Override + public void setupRegistry() { + getInjector(); + stateAfterInjectorCreation.restoreGlobalState(); + } +} diff --git a/org.eclipse.triquetrum.commands.xtext/src/test/java/org/eclipse/triquetrum/commands/tests/TqclParsingTest.xtend b/org.eclipse.triquetrum.commands.xtext/src/test/java/org/eclipse/triquetrum/commands/tests/TqclParsingTest.xtend new file mode 100644 index 00000000..ba58d1f1 --- /dev/null +++ b/org.eclipse.triquetrum.commands.xtext/src/test/java/org/eclipse/triquetrum/commands/tests/TqclParsingTest.xtend @@ -0,0 +1,30 @@ +/* + * generated by Xtext 2.10.0 + */ +package org.eclipse.triquetrum.commands.tests + +import com.google.inject.Inject +import org.eclipse.triquetrum.commands.tqcl.TriquetrumScript +import org.eclipse.xtext.junit4.InjectWith +import org.eclipse.xtext.junit4.XtextRunner +import org.eclipse.xtext.junit4.util.ParseHelper +import org.junit.Assert +import org.junit.Test +import org.junit.runner.RunWith + +@RunWith(XtextRunner) +@InjectWith(TqclInjectorProvider) +class TqclParsingTest{ + + @Inject + ParseHelper parseHelper + + @Test + def void loadModel() { + val result = parseHelper.parse(''' + Hello Xtext! + ''') + Assert.assertNotNull(result) + } + +} diff --git a/org.eclipse.triquetrum.logging.dvp/src/main/resources/log4j.properties b/org.eclipse.triquetrum.logging.dvp/src/main/resources/log4j.properties index 30533356..f836a6fb 100644 --- a/org.eclipse.triquetrum.logging.dvp/src/main/resources/log4j.properties +++ b/org.eclipse.triquetrum.logging.dvp/src/main/resources/log4j.properties @@ -8,7 +8,7 @@ # Contributors: # Erwin De Ley - initial API and implementation and/or initial documentation ############################################################################### -log4j.rootLogger=INFO,CONSOLE +log4j.rootLogger=DEBUG,CONSOLE #log4j.logger.org.eclipse.triquetrum.workflow.editor = ALL log4j.logger.org.eclipse.triquetrum.processing.service = ALL diff --git a/org.eclipse.triquetrum.processing.actor/.DS_Store b/org.eclipse.triquetrum.processing.actor/.DS_Store new file mode 100644 index 00000000..5008ddfc Binary files /dev/null and b/org.eclipse.triquetrum.processing.actor/.DS_Store differ diff --git a/org.eclipse.triquetrum.target.platform/org.eclipse.triquetrum.commands.xtext.platform.target b/org.eclipse.triquetrum.target.platform/org.eclipse.triquetrum.commands.xtext.platform.target new file mode 100644 index 00000000..c6275355 --- /dev/null +++ b/org.eclipse.triquetrum.target.platform/org.eclipse.triquetrum.commands.xtext.platform.target @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.eclipse.triquetrum.workflow.editor/META-INF/MANIFEST.MF b/org.eclipse.triquetrum.workflow.editor/META-INF/MANIFEST.MF index 9907c888..925267bf 100644 --- a/org.eclipse.triquetrum.workflow.editor/META-INF/MANIFEST.MF +++ b/org.eclipse.triquetrum.workflow.editor/META-INF/MANIFEST.MF @@ -10,7 +10,8 @@ Require-Bundle: org.eclipse.graphiti;bundle-version="0.12.0", org.eclipse.core.commands;bundle-version="3.7.0", org.eclipse.core.resources;bundle-version="3.10.0", org.eclipse.core.runtime;bundle-version="3.11.0", - org.eclipse.ui.views.properties.tabbed;bundle-version="3.6.100" + org.eclipse.ui.views.properties.tabbed;bundle-version="3.6.100", + org.eclipse.triquetrum.commands.api Import-Package: org.apache.batik.bridge;version="1.6.0", org.apache.batik.css.engine;version="1.6.0", org.apache.batik.dom;version="1.6.1", @@ -106,7 +107,8 @@ Import-Package: org.apache.batik.bridge;version="1.6.0", ptolemy.vergil.icon;version="11.0.0", ptolemy.vergil.kernel.attributes;version="11.0.0" Bundle-Activator: org.eclipse.triquetrum.workflow.editor.TriqEditorPlugin -Service-Component: OSGI-INF/colorRendererService.xml, - OSGI-INF/attributesRendererService.xml +Service-Component: OSGI-INF/colorRendererService.xml,OSGI-INF/attributesRendererService.xml,OSGI-INF/librariesProvider.xml, + OSGI-INF/ModelBuilderService.xml,OSGI-INF/PtolemyModelBuilderService.xml Bundle-ActivationPolicy: lazy -Export-Package: org.eclipse.triquetrum.workflow.editor.palette.spi +Export-Package: org.eclipse.triquetrum.workflow.editor, + org.eclipse.triquetrum.workflow.editor.features diff --git a/org.eclipse.triquetrum.workflow.editor/OSGI-INF/ModelBuilderService.xml b/org.eclipse.triquetrum.workflow.editor/OSGI-INF/ModelBuilderService.xml new file mode 100644 index 00000000..5557c47a --- /dev/null +++ b/org.eclipse.triquetrum.workflow.editor/OSGI-INF/ModelBuilderService.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/org.eclipse.triquetrum.workflow.editor/OSGI-INF/PtolemyModelBuilderService.xml b/org.eclipse.triquetrum.workflow.editor/OSGI-INF/PtolemyModelBuilderService.xml new file mode 100644 index 00000000..caafff1e --- /dev/null +++ b/org.eclipse.triquetrum.workflow.editor/OSGI-INF/PtolemyModelBuilderService.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/org.eclipse.triquetrum.workflow.editor/OSGI-INF/librariesProvider.xml b/org.eclipse.triquetrum.workflow.editor/OSGI-INF/librariesProvider.xml new file mode 100644 index 00000000..c1642491 --- /dev/null +++ b/org.eclipse.triquetrum.workflow.editor/OSGI-INF/librariesProvider.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/org.eclipse.triquetrum.workflow.editor/build.properties b/org.eclipse.triquetrum.workflow.editor/build.properties index 42cb575b..54042ee1 100644 --- a/org.eclipse.triquetrum.workflow.editor/build.properties +++ b/org.eclipse.triquetrum.workflow.editor/build.properties @@ -1,15 +1,3 @@ -############################################################################### -# Copyright (c) 2015, 2016 iSencia Belgium NV. -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Eclipse Public License v1.0 -# which accompanies this distribution, and is available at -# http://www.eclipse.org/legal/epl-v10.html -# -# Contributors: -# Erwin De Ley - initial API and implementation and/or initial documentation -############################################################################### -source.. = src/main/java/,\ - src/main/resources/ output.. = target/classes/ bin.includes = META-INF/,\ .,\ @@ -23,7 +11,9 @@ bin.includes = META-INF/,\ about.properties,\ eclipse32.png,\ schema/,\ - build.properties + build.properties,\ + OSGI-INF/librariesProvider.xml,\ + OSGI-INF/ModelBuilderService.xml src.includes = src/,\ schema/,\ plugin_customization.ini,\ @@ -37,3 +27,5 @@ src.includes = src/,\ about.html,\ OSGI-INF/,\ META-INF/ +source.. = src/main/java/,\ + src/main/resources/ diff --git a/org.eclipse.triquetrum.workflow.editor/src/main/java/org/eclipse/triquetrum/workflow/editor/PtolemyModelBuilderService.java b/org.eclipse.triquetrum.workflow.editor/src/main/java/org/eclipse/triquetrum/workflow/editor/PtolemyModelBuilderService.java new file mode 100644 index 00000000..3d900e9c --- /dev/null +++ b/org.eclipse.triquetrum.workflow.editor/src/main/java/org/eclipse/triquetrum/workflow/editor/PtolemyModelBuilderService.java @@ -0,0 +1,178 @@ +package org.eclipse.triquetrum.workflow.editor; + +import java.util.Map; + +import org.eclipse.triquetrum.commands.api.services.ModelBuilderService; +import org.eclipse.triquetrum.workflow.model.util.PtolemyUtil; +import org.osgi.framework.Version; +import org.ptolemy.commons.ThreeDigitVersionSpecification; +import org.ptolemy.commons.VersionSpecification; + +import ptolemy.actor.CompositeActor; +import ptolemy.actor.Director; +import ptolemy.actor.IOPort; +import ptolemy.actor.IORelation; +import ptolemy.actor.TypedCompositeActor; +import ptolemy.actor.TypedIORelation; +import ptolemy.data.expr.Parameter; +import ptolemy.kernel.ComponentEntity; +import ptolemy.kernel.ComponentRelation; +import ptolemy.kernel.CompositeEntity; +import ptolemy.kernel.Entity; +import ptolemy.kernel.Port; +import ptolemy.kernel.Relation; +import ptolemy.kernel.util.Attribute; +import ptolemy.kernel.util.IllegalActionException; +import ptolemy.kernel.util.NameDuplicationException; + +public class PtolemyModelBuilderService implements ModelBuilderService> { + + @Override + public Class getSupportedModelClass() { + return CompositeActor.class; + } + + @Override + public CompositeEntity createNewModel(String modelName, String folderPath) { + return new TypedCompositeActor(); + } + + private VersionSpecification getVersion() { + Version bundleVersion = TriqEditorPlugin.getDefault().getBundle().getVersion(); + VersionSpecification providerVersion = new ThreeDigitVersionSpecification(bundleVersion.getMajor(), + bundleVersion.getMinor(), bundleVersion.getMicro(), bundleVersion.getQualifier()); + return providerVersion; + } + + @Override + public boolean insertActor(CompositeEntity parent, String actorName, String actorclass, + Map parameters) { + try { + Entity actor = PtolemyUtil._createEntity(parent, actorclass, /*getVersion()*/null, actorName); + for (String paramKey : parameters.keySet()) { + Attribute attribute = actor.getAttribute(paramKey); + if (attribute instanceof Parameter) { + Parameter param = (Parameter) attribute; + param.setExpression(parameters.get(paramKey)); + param.propagateValue(); + } + } +// parent.entityList().add(actor); + return true; + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return false; + } + + @Override + public boolean insertDirector(CompositeEntity actor, String directorName, String entityClass, + Map params) { + try { + Attribute attribute = PtolemyUtil._createAttribute(actor, entityClass, directorName); + if (attribute instanceof Director) { + for (String paramKey : params.keySet()) { + Attribute directorAttribute = attribute.getAttribute(paramKey); + if (directorAttribute instanceof Parameter) { + Parameter param = (Parameter) directorAttribute; + param.setExpression(params.get(paramKey)); + param.propagateValue(); + } + } + return true; + } + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return false; + } + + @Override + public boolean insertPort(ComponentEntity actor, String portName, String entityClass, + Map params) { + try { + Port port = PtolemyUtil._createPort(actor, entityClass, portName); + + if (port instanceof IOPort) { + IOPort ioPort = (IOPort) port; + if(params.containsKey("input") && Boolean.parseBoolean(params.get("input"))) + { + ioPort.setInput(true); + } + if(params.containsKey("output") && Boolean.parseBoolean(params.get("output"))) + { + ioPort.setOutput(true); + } + if(params.containsKey("multi") && Boolean.parseBoolean(params.get("multi"))) + { + ioPort.setMultiport(true); + } + + } + + return true; + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return false; + } + + @Override + public boolean insertParameter(ComponentEntity actor, String parameterName, String entityClass, + Map params) { + try { + Attribute attribute = PtolemyUtil._createAttribute(actor, entityClass, parameterName); + if (attribute instanceof Parameter) { + Parameter param = (Parameter) attribute; + param.setExpression(params.get("expression")); + return true; + } + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return false; + } + + @Override + public CompositeEntity getParent(ComponentEntity actor) { + return (CompositeEntity) actor.getContainer(); + } + + @Override + public ComponentEntity getChild(CompositeEntity parent, String name) { + return parent.getEntity(name); + } + + @Override + public boolean connect(CompositeEntity currentActor, String from, String to) { + int size = currentActor.relationList().size(); + try { + + ComponentRelation relation = currentActor.newRelation("_R" + (size + 1)); + + String[] splitFrom = from.split("\\."); + String actorFrom = splitFrom[0]; + String portFrom = splitFrom[1]; + + String[] splitTo = to.split("\\."); + String actorTo = splitTo[0]; + String portTo = splitTo[1]; + + Port outputport = currentActor.getEntity(actorFrom).getPort(portFrom); + Port inputPort = currentActor.getEntity(actorTo).getPort(portTo); + + inputPort.link(relation); + outputport.link(relation); + + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return false; + } + +} diff --git a/org.eclipse.triquetrum.workflow.editor/src/main/java/org/eclipse/triquetrum/workflow/editor/TriquetrumLibraryProvider.java b/org.eclipse.triquetrum.workflow.editor/src/main/java/org/eclipse/triquetrum/workflow/editor/TriquetrumLibraryProvider.java new file mode 100644 index 00000000..07417335 --- /dev/null +++ b/org.eclipse.triquetrum.workflow.editor/src/main/java/org/eclipse/triquetrum/workflow/editor/TriquetrumLibraryProvider.java @@ -0,0 +1,276 @@ +package org.eclipse.triquetrum.workflow.editor; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.apache.commons.lang.StringUtils; +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.core.runtime.IExtension; +import org.eclipse.core.runtime.IExtensionPoint; +import org.eclipse.core.runtime.Platform; +import org.eclipse.triquetrum.commands.api.services.ActorDescriptor; +import org.eclipse.triquetrum.commands.api.services.DirectorDescriptor; +import org.eclipse.triquetrum.commands.api.services.EntityDescriptor; +import org.eclipse.triquetrum.commands.api.services.ParameterDescriptor; +import org.eclipse.triquetrum.commands.api.services.PortDescriptor; +import org.eclipse.triquetrum.commands.api.services.TqCLLibraryException; +import org.eclipse.triquetrum.commands.api.services.TqCLLibraryProvider; +import org.eclipse.triquetrum.workflow.model.util.PtolemyUtil; +import org.osgi.framework.Version; +import org.ptolemy.commons.ThreeDigitVersionSpecification; +import org.ptolemy.commons.VersionSpecification; + +import ptolemy.actor.CompositeActor; +import ptolemy.actor.IOPort; +import ptolemy.actor.TypedIOPort; +import ptolemy.data.expr.Parameter; +import ptolemy.kernel.Entity; +import ptolemy.kernel.Port; +import ptolemy.kernel.util.Attribute; + +public class TriquetrumLibraryProvider implements TqCLLibraryProvider { + + private static final String TRIQUETRUM_LIBRARY_NAME = "Triquetrum"; + private Map actors = new HashMap<>(); + private Map directors = new HashMap<>(); + private Map parameters = new HashMap<>(); + private Map ports = new HashMap<>(); + + private boolean initialized = false; + + private void init() { + if (initialized) { + return; + } + IExtensionPoint extPoint = Platform.getExtensionRegistry() + .getExtensionPoint(TriqFeatureProvider.PALETTE_CONTRIBUTION_EXTENSION_ID); + IExtension[] extensions = extPoint.getExtensions(); + for (IExtension extension : extensions) { + IConfigurationElement[] configurationElements = extension.getConfigurationElements(); + for (IConfigurationElement group : configurationElements) { + fillElementsFromGroup(group); + } + } + + PortDescriptor port = new PortDescriptor(TRIQUETRUM_LIBRARY_NAME, "port", TypedIOPort.class.getName(), null,true,true); + ParameterDescriptor inputParameter = new ParameterDescriptor(TRIQUETRUM_LIBRARY_NAME, "input", Parameter.class.getName(), null); + inputParameter.setDefaultValue("false"); + port.addParameter(inputParameter); + + ParameterDescriptor outputParameter = new ParameterDescriptor(TRIQUETRUM_LIBRARY_NAME, "output", Parameter.class.getName(), null); + outputParameter.setDefaultValue("false"); + port.addParameter(outputParameter); + + ParameterDescriptor multiParameter = new ParameterDescriptor(TRIQUETRUM_LIBRARY_NAME, "multi", Parameter.class.getName(), null); + multiParameter.setDefaultValue("false"); + port.addParameter(multiParameter); + + ports.put(TypedIOPort.class.getName(), + port); + + initialized = true; + } + + public void fillElementsFromGroup(IConfigurationElement group) { + String groupName = group.getAttribute("displayName"); + + IConfigurationElement[] children = group.getChildren(); + for (IConfigurationElement element : children) { + if (element.getName().equals("entry")) { + String clazz = element.getAttribute("class"); + String displayName = element.getAttribute("displayName"); + String icon = element.getAttribute("icon"); + String type = element.getAttribute("type"); + if (type != null) { + BoCategory boCategory = BoCategory.valueOf(type); + switch (boCategory) { + case Actor: + ActorDescriptor actorDescriptor = new ActorDescriptor(TRIQUETRUM_LIBRARY_NAME, displayName, + clazz, icon); + fillParameters(actorDescriptor); + actors.put(actorDescriptor.getClazz(), actorDescriptor); + break; + case Director: + DirectorDescriptor directorDescriptor = new DirectorDescriptor(TRIQUETRUM_LIBRARY_NAME, + displayName, clazz, icon); + fillParameters(directorDescriptor); + directors.put(directorDescriptor.getClazz(), directorDescriptor); + break; + case Parameter: + ParameterDescriptor parameterDescriptor = new ParameterDescriptor(TRIQUETRUM_LIBRARY_NAME, + displayName, clazz, icon); + fillParameters(parameterDescriptor); + parameters.put(parameterDescriptor.getClazz(), parameterDescriptor); + break; + case Port: +// PortDescriptor port = new PortDescriptor(TRIQUETRUM_LIBRARY_NAME, "input", clazz, null); +// ports.put(clazz, port); + break; + default: + System.out.println("unsupported category " + boCategory.name()); + break; + } + } + } else if (element.getName().equals("group")) { + fillElementsFromGroup(element); + } + + } + } + + private void fillParameters(EntityDescriptor entityDescriptor) { + CompositeActor ptolemyModel = new CompositeActor(); + + Version bundleVersion = TriqEditorPlugin.getDefault().getBundle().getVersion(); + VersionSpecification providerVersion = new ThreeDigitVersionSpecification(bundleVersion.getMajor(), + bundleVersion.getMinor(), bundleVersion.getMicro(), bundleVersion.getQualifier()); + try { + List paramList = new ArrayList<>(); + if (entityDescriptor instanceof ActorDescriptor) { + ActorDescriptor actorDescriptor = (ActorDescriptor) entityDescriptor; + Entity entity = PtolemyUtil._createEntity(ptolemyModel, actorDescriptor.getClazz(), providerVersion, + "parameterfilling"); + paramList = entity.attributeList(Parameter.class); + fillPorts(actorDescriptor, entity); + } else { + Attribute attribute = PtolemyUtil._createAttribute(ptolemyModel, entityDescriptor.getClazz(), + "parameterfilling"); + paramList = attribute.attributeList(Parameter.class); + } + for (Parameter ptolemyParameter : paramList) { + ParameterDescriptor parameter = new ParameterDescriptor(TRIQUETRUM_LIBRARY_NAME, + ptolemyParameter.getName(), ptolemyParameter.getClassName(), null); + parameter.setDefaultValue(ptolemyParameter.getDefaultExpression()); + entityDescriptor.addParameter(parameter); + } + if (entityDescriptor instanceof ParameterDescriptor) { + ParameterDescriptor parameter = new ParameterDescriptor(TRIQUETRUM_LIBRARY_NAME, "expression", + String.class.getName(), null); + entityDescriptor.addParameter(parameter); + } + } catch ( + + Exception e) { + // LOG + e.printStackTrace(); + } + } + + public void fillPorts(ActorDescriptor actorDescriptor, Entity entity) { + List portList = entity.portList(); + for (Object object : portList) { + if (object instanceof IOPort) { + IOPort port = (IOPort) object; + PortDescriptor portDescriptor = new PortDescriptor(TRIQUETRUM_LIBRARY_NAME, port.getName(), + port.getClassName(), null,port.isInput(),port.isOutput()); + actorDescriptor.addPort(portDescriptor); + } else { + System.out.println(""); + } + } + } + + @Override + public List getActors(String library) throws TqCLLibraryException { + init(); + return new ArrayList<>(actors.values()); + } + + @Override + public List getDirectors(String library) throws TqCLLibraryException { + init(); + return new ArrayList<>(directors.values()); + } + + @Override + public List getParameterTypes(String library) throws TqCLLibraryException { + + init(); + return new ArrayList<>(parameters.values()); + } + + @Override + public List getPortTypes(String library) throws TqCLLibraryException { + init(); + return new ArrayList<>(ports.values()); + } + + @Override + public List getActorPorts(String actor) throws TqCLLibraryException { + init(); + return actors.get(actor).getPorts(); + } + + @Override + public List getActorParameters(String actor) throws TqCLLibraryException { + // TODO Auto-generated method stub + return null; + } + + @Override + public Set getLibraryNames() { + HashSet libraries = new HashSet(); + libraries.add(TRIQUETRUM_LIBRARY_NAME); + return libraries; + } + + @Override + public boolean hasElement(String element) { + return actors.containsKey(element) || directors.containsKey(element) || parameters.containsKey(element); + } + + @Override + public ActorDescriptor getActor(String library, String actorClass) throws TqCLLibraryException { + if (getLibraryNames().contains(library)) { + return actors.get(actorClass); + } + return null; + } + + @Override + public ActorDescriptor getActor(String actorClass) throws TqCLLibraryException { + return actors.get(actorClass); + } + + @Override + public DirectorDescriptor getDirector(String directorClass) throws TqCLLibraryException { + return directors.get(directorClass); + } + + @Override + public boolean hasElementInLibrary(String element, String library, String category) { + init(); + if (getLibraryNames().contains(library)) { + BoCategory boCategory = BoCategory.valueOf(StringUtils.capitalize(category)); + switch (boCategory) { + case Actor: + return actors.containsKey(element); + case Director: + return directors.containsKey(element); + case Parameter: + return parameters.containsKey(element); + case Port: + return ports.containsKey(element); + // TODO: remove default when switch is completed + default: + return true; + } + } + return false; + } + + @Override + public ParameterDescriptor getParameterType(String parameterClass) { + return parameters.get(parameterClass); + } + + @Override + public PortDescriptor getPortType(String portClass) throws TqCLLibraryException { + return ports.get(portClass); + } + +} diff --git a/org.eclipse.triquetrum.workflow.editor/src/main/java/org/eclipse/triquetrum/workflow/editor/TriquetrumModelBuilderService.java b/org.eclipse.triquetrum.workflow.editor/src/main/java/org/eclipse/triquetrum/workflow/editor/TriquetrumModelBuilderService.java new file mode 100644 index 00000000..ce309975 --- /dev/null +++ b/org.eclipse.triquetrum.workflow.editor/src/main/java/org/eclipse/triquetrum/workflow/editor/TriquetrumModelBuilderService.java @@ -0,0 +1,295 @@ +package org.eclipse.triquetrum.workflow.editor; + +import java.net.URI; +import java.text.MessageFormat; +import java.util.HashMap; +import java.util.Map; +import java.util.Map.Entry; + +import org.apache.commons.lang.StringUtils; +import org.eclipse.core.resources.IFolder; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.IWorkspace; +import org.eclipse.core.resources.IWorkspaceRoot; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.emf.common.command.AbstractCommand; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.command.SetCommand; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.graphiti.features.ICreateFeature; +import org.eclipse.graphiti.features.context.impl.AddContext; +import org.eclipse.graphiti.features.context.impl.CreateConnectionContext; +import org.eclipse.graphiti.features.context.impl.CreateContext; +import org.eclipse.graphiti.mm.pictograms.Diagram; +import org.eclipse.graphiti.services.Graphiti; +import org.eclipse.triquetrum.commands.api.services.ModelBuilderService; +import org.eclipse.triquetrum.workflow.editor.features.ConnectionCreateFeature; +import org.eclipse.triquetrum.workflow.editor.features.ModelElementCreateFeature; +import org.eclipse.triquetrum.workflow.editor.wizard.WizardUtils; +import org.eclipse.triquetrum.workflow.model.Actor; +import org.eclipse.triquetrum.workflow.model.CompositeActor; +import org.eclipse.triquetrum.workflow.model.CompositeEntity; +import org.eclipse.triquetrum.workflow.model.Entity; +import org.eclipse.triquetrum.workflow.model.TriqFactory; +import org.eclipse.ui.PartInitException; +import org.osgi.framework.Version; +import org.ptolemy.commons.ThreeDigitVersionSpecification; +import org.ptolemy.commons.VersionSpecification; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class TriquetrumModelBuilderService implements ModelBuilderService { + + private static final Logger LOGGER = LoggerFactory.getLogger(TriquetrumModelBuilderService.class); + private Diagram diagram; + private TriqDiagramEditor editor; + + @Override + public Class getSupportedModelClass() { + return CompositeActor.class; + } + + @Override + public CompositeActor createNewModel(String modelName, String folderPath) { + + IWorkspace workspace = ResourcesPlugin.getWorkspace(); + IWorkspaceRoot root = workspace.getRoot(); + URI locationURI = root.getLocationURI(); + if (folderPath.startsWith(locationURI.toString())) { + String relativePath = StringUtils.removeStart(folderPath, locationURI.toString()); + IResource modelContainer = root.findMember(relativePath); + IProject project = null; + if (modelContainer instanceof IProject) { + project = (IProject) modelContainer; + modelContainer = null; + } else { + project = modelContainer.getProject(); + } + diagram = WizardUtils.createDiagramAndFile("Triquetrum workflow", modelName, project, + (IFolder) modelContainer); + + CompositeActor model = TriqFactory.eINSTANCE.createCompositeActor(); + model.setName(diagram.getName()); + model.buildWrappedObject(); + diagram.eResource().getContents().add(model); + try { + editor = WizardUtils.openDiagramInEditor(diagram); + TransactionalEditingDomain editingDomain = editor.getDiagramBehavior().getEditingDomain(); + editingDomain.getCommandStack().execute(new AbstractCommand("Create model","Model Builder creting new model") { + + { + isExecutable=true; + isPrepared = true; + } + + @Override + public void redo() { + // TODO Auto-generated method stub + + } + + @Override + public void execute() { + getFeatureProvider().link(diagram, model); + } + }); + + + } catch (PartInitException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } else { + // TODO exception to manage + throw new RuntimeException("file not in workspace"); + } + return (CompositeActor) Graphiti.getLinkService() + .getBusinessObjectForLinkedPictogramElement(diagram); + } + + private VersionSpecification getVersion() { + Version bundleVersion = TriqEditorPlugin.getDefault().getBundle().getVersion(); + VersionSpecification providerVersion = new ThreeDigitVersionSpecification(bundleVersion.getMajor(), + bundleVersion.getMinor(), bundleVersion.getMicro(), bundleVersion.getQualifier()); + return providerVersion; + } + + private EObject createElement(String entityClass) { + TriqFeatureProvider triqFeatureProvider = getFeatureProvider(); + + ICreateFeature[] createFeatures = triqFeatureProvider.getCreateFeatures(); + for (ICreateFeature iCreateFeature : createFeatures) { + if (iCreateFeature instanceof ModelElementCreateFeature) { + ModelElementCreateFeature modelElementCreateFeature = (ModelElementCreateFeature) iCreateFeature; + + if (modelElementCreateFeature.getWrappedClass().equals(entityClass)) { + CreateContext createContext = new CreateContext(); + createContext.setTargetContainer(triqFeatureProvider.getDiagramTypeProvider().getDiagram()); + + editor.getDiagramBehavior().executeFeature(modelElementCreateFeature,createContext); + + EObject businessObjectForLinkedPictogramElement = Graphiti.getLinkService() + .getBusinessObjectForLinkedPictogramElement(diagram); + return businessObjectForLinkedPictogramElement; + + } + } + } + + return null; + } + + public TriqFeatureProvider getFeatureProvider() { + TriqFeatureProvider triqFeatureProvider = (TriqFeatureProvider) editor.getDiagramTypeProvider() + .getFeatureProvider(); + return triqFeatureProvider; + } + + @Override + public boolean insertActor(CompositeEntity parent, String actorName, String actorclass, + Map parameters) { + + LOGGER.debug(MessageFormat.format("Creating actor {0} of type {1} with parameters {2}", actorName, actorclass, + parameters.toString())); + try { + + TransactionalEditingDomain editingDomain = editor.getDiagramBehavior().getEditingDomain(); + Actor actor = TriqFactory.eINSTANCE.createActor(); + Map modelParameters = new HashMap<>(); + for (org.eclipse.triquetrum.workflow.model.Parameter parameter : actor.getParameters()) { + modelParameters.put(parameter.getName(), parameter); + } + EStructuralFeature eStructuralFeatureName = actor.eClass().getEStructuralFeature("name"); + editingDomain.getCommandStack() + .execute(new SetCommand(editingDomain, actor, eStructuralFeatureName, actorName)); + + for (Entry parameter : parameters.entrySet()) { + String paramName = parameter.getKey(); + org.eclipse.triquetrum.workflow.model.Parameter parameterToSet = modelParameters.get(paramName); + EStructuralFeature eStructuralFeatureExpression = parameterToSet.eClass() + .getEStructuralFeature("expression"); + editingDomain.getCommandStack().execute(new SetCommand(editingDomain, parameterToSet, + eStructuralFeatureExpression, parameter.getValue())); + } + + + AddContext context = new AddContext(); + context.setNewObject(actor); + getFeatureProvider().getAddFeature(context); + + + + +// EObject businessObjectForLinkedPictogramElement = parent; + + +// AddContext context = new AddContext(); +// context.setNewObject(TriqFactory); +// getFeatureProvider().getAddFeature(context) + +// EObject businessObjectForLinkedPictogramElement = createElement(actorclass); +// +// if (businessObjectForLinkedPictogramElement instanceof CompositeActor) { +// CompositeActor mainActor = (CompositeActor) businessObjectForLinkedPictogramElement; +// org.eclipse.triquetrum.workflow.model.NamedObj child = mainActor +// .getChild(((CompositeActor) businessObjectForLinkedPictogramElement).getName()); +// TransactionalEditingDomain editingDomain = editor.getDiagramBehavior().getEditingDomain(); +// if (child instanceof Actor) { +// Actor actor = (Actor) child; +// Map modelParameters = new HashMap<>(); +// for (org.eclipse.triquetrum.workflow.model.Parameter parameter : actor.getParameters()) { +// modelParameters.put(parameter.getName(), parameter); +// } +// EStructuralFeature eStructuralFeatureName = actor.eClass().getEStructuralFeature("name"); +// editingDomain.getCommandStack() +// .execute(new SetCommand(editingDomain, actor, eStructuralFeatureName, actorName)); +// +// for (Entry parameter : parameters.entrySet()) { +// String paramName = parameter.getKey(); +// org.eclipse.triquetrum.workflow.model.Parameter parameterToSet = modelParameters.get(paramName); +// EStructuralFeature eStructuralFeatureExpression = parameterToSet.eClass() +// .getEStructuralFeature("expression"); +// editingDomain.getCommandStack().execute(new SetCommand(editingDomain, parameterToSet, +// eStructuralFeatureExpression, parameter.getValue())); +// } +// } +// } + + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + return false; + } + + @Override + public boolean insertDirector(CompositeEntity actor, String directorName, String entityClass, + Map params) { + LOGGER.debug(MessageFormat.format("Creating director {0} of type {1} with parameters {2}", directorName, + entityClass, params.toString())); + return false; + } + + @Override + public boolean insertPort(Entity actor, String portName, String entityClass, Map params) { + LOGGER.debug(MessageFormat.format("Creating port {0} of type {1} with parameters {2}", portName, entityClass, + params.toString())); + return false; + } + + @Override + public boolean insertParameter(Entity actor, String parameterName, String entityClass, Map params) { + LOGGER.debug(MessageFormat.format("Creating parameter {0} of type {1} with parameters {2}", parameterName, + entityClass, params.toString())); + return false; + } + + @Override + public CompositeEntity getParent(Entity actor) { + LOGGER.debug("go to parent"); + return (CompositeEntity) actor.getContainer(); + } + + @Override + public Entity getChild(CompositeEntity parent,String name) { + // TODO Auto-generated method stub + LOGGER.debug("go into child " + name); + return (Entity) parent.getChild(name); + } + + @Override + public boolean connect(CompositeEntity currentActor, String from, String to) { + LOGGER.debug(MessageFormat.format("Connecting {0} to {1}", from, to)); + + ConnectionCreateFeature feature = new ConnectionCreateFeature(getFeatureProvider()); + CreateConnectionContext createContext = new CreateConnectionContext(); + EList children = currentActor.eContents(); + +// for (Shape shape : children) { +// EList anchors = shape.getAnchors(); +// for (Anchor anchor : anchors) { +// EObject bo = Graphiti.getLinkService().getBusinessObjectForLinkedPictogramElement(anchor); +// if (bo instanceof Port) { +// Port port = (Port) bo; +// String fullName = port.getFullName(); +// if(fullName.endsWith(from)) +// { +// createContext.setSourceAnchor(anchor); +// } +// if(fullName.endsWith(to)) +// { +// createContext.setTargetAnchor(anchor); +// } +// } +// } +// } + + editor.getDiagramBehavior().executeFeature(feature, createContext); + return false; + } + +} diff --git a/org.eclipse.triquetrum.workflow.editor/src/main/java/org/eclipse/triquetrum/workflow/editor/wizard/WizardUtils.java b/org.eclipse.triquetrum.workflow.editor/src/main/java/org/eclipse/triquetrum/workflow/editor/wizard/WizardUtils.java index 2a1e1442..c047b47d 100644 --- a/org.eclipse.triquetrum.workflow.editor/src/main/java/org/eclipse/triquetrum/workflow/editor/wizard/WizardUtils.java +++ b/org.eclipse.triquetrum.workflow.editor/src/main/java/org/eclipse/triquetrum/workflow/editor/wizard/WizardUtils.java @@ -34,6 +34,7 @@ import org.eclipse.triquetrum.workflow.editor.TriqDiagramEditor; import org.eclipse.triquetrum.workflow.editor.util.FileService; import org.eclipse.ui.IEditorDescriptor; +import org.eclipse.ui.IEditorPart; import org.eclipse.ui.PartInitException; import org.eclipse.ui.PlatformUI; @@ -92,7 +93,7 @@ public static Diagram createDiagramAndFile(final String diagramTypeId, final Str return diagram; } - public static void openDiagramInEditor(Diagram diagram) throws PartInitException { + public static TriqDiagramEditor openDiagramInEditor(Diagram diagram) throws PartInitException { String editorID = TriqDiagramEditor.EDITOR_ID; String diagramTypeProviderId = GraphitiUi.getExtensionManager().getDiagramTypeProviderId(diagram.getDiagramTypeId()); String namingConventionID = diagramTypeProviderId + ".editor"; //$NON-NLS-1$ @@ -105,7 +106,7 @@ public static void openDiagramInEditor(Diagram diagram) throws PartInitException String providerId = GraphitiUi.getExtensionManager().getDiagramTypeProviderId(diagram.getDiagramTypeId()); DiagramEditorInput editorInput = new DiagramEditorInput(EcoreUtil.getURI(diagram), providerId); - PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor(editorInput, editorID); + return (TriqDiagramEditor) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor(editorInput, editorID); } /** diff --git a/org.eclipse.triquetrum.workflow.model/.DS_Store b/org.eclipse.triquetrum.workflow.model/.DS_Store new file mode 100644 index 00000000..b85d7272 Binary files /dev/null and b/org.eclipse.triquetrum.workflow.model/.DS_Store differ diff --git a/target/classes/org/eclipse/triquetrum/commands/api/.gitignore b/target/classes/org/eclipse/triquetrum/commands/api/.gitignore new file mode 100644 index 00000000..81ebf4e6 --- /dev/null +++ b/target/classes/org/eclipse/triquetrum/commands/api/.gitignore @@ -0,0 +1 @@ +/TqCLCommandServices.class diff --git a/target/classes/org/eclipse/triquetrum/commands/api/TqCLCommandServices.class b/target/classes/org/eclipse/triquetrum/commands/api/TqCLCommandServices.class new file mode 100644 index 00000000..32e8c716 Binary files /dev/null and b/target/classes/org/eclipse/triquetrum/commands/api/TqCLCommandServices.class differ