diff options
author | Thomas Schuetz | 2013-07-12 08:40:15 +0000 |
---|---|---|
committer | Thomas Schuetz | 2013-07-12 08:40:15 +0000 |
commit | 12cda553738ca88662624b6f47066b5564549648 (patch) | |
tree | bfa65b6c38aa566a5f1cc98395da6546a6c6e282 /plugins | |
parent | 3447749b1a453735ac54fc09ea7680acdbb19b69 (diff) | |
parent | d65e1d1bdd43feadb43261b85aac2d8aef5e089c (diff) | |
download | org.eclipse.etrice-12cda553738ca88662624b6f47066b5564549648.tar.gz org.eclipse.etrice-12cda553738ca88662624b6f47066b5564549648.tar.xz org.eclipse.etrice-12cda553738ca88662624b6f47066b5564549648.zip |
Merge remote-tracking branch 'origin/master'
Conflicts:
plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.modellib.c.zip
plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.modellib.java.zip
plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.runtime.c.zip
plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.tutorials.c.zip
plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.tutorials.java.zip
Change-Id: I98e2df3ab57d6e7e8f27e5b0aee7eaa189bfbc33
Diffstat (limited to 'plugins')
1121 files changed, 371377 insertions, 371377 deletions
diff --git a/plugins/org.eclipse.etrice.abstractexec.behavior/.classpath b/plugins/org.eclipse.etrice.abstractexec.behavior/.classpath index 8a8f1668c..ad32c83a7 100644 --- a/plugins/org.eclipse.etrice.abstractexec.behavior/.classpath +++ b/plugins/org.eclipse.etrice.abstractexec.behavior/.classpath @@ -1,7 +1,7 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/plugins/org.eclipse.etrice.abstractexec.behavior/.gitignore b/plugins/org.eclipse.etrice.abstractexec.behavior/.gitignore index a25460a14..84bb5a8a5 100644 --- a/plugins/org.eclipse.etrice.abstractexec.behavior/.gitignore +++ b/plugins/org.eclipse.etrice.abstractexec.behavior/.gitignore @@ -1,2 +1,2 @@ -bin
+bin .antlr-generator-3.2.0.jar
\ No newline at end of file diff --git a/plugins/org.eclipse.etrice.abstractexec.behavior/.options b/plugins/org.eclipse.etrice.abstractexec.behavior/.options index d2483c955..ac43d590c 100644 --- a/plugins/org.eclipse.etrice.abstractexec.behavior/.options +++ b/plugins/org.eclipse.etrice.abstractexec.behavior/.options @@ -1,8 +1,8 @@ -org.eclipse.etrice.abstractexec.behavior/debug=true
-org.eclipse.etrice.abstractexec.behavior/trace/proposals=true
-org.eclipse.etrice.abstractexec.behavior/trace/checks=true
-org.eclipse.etrice.abstractexec.behavior/trace/checks/level=1
-org.eclipse.etrice.abstractexec.behavior/trace/rules=true
-org.eclipse.etrice.abstractexec.behavior/trace/rules/level=2
-org.eclipse.etrice.abstractexec.behavior/trace/abstractexec=true
-org.eclipse.etrice.abstractexec.behavior/trace/abstractexec/name=AETest
+org.eclipse.etrice.abstractexec.behavior/debug=true +org.eclipse.etrice.abstractexec.behavior/trace/proposals=true +org.eclipse.etrice.abstractexec.behavior/trace/checks=true +org.eclipse.etrice.abstractexec.behavior/trace/checks/level=1 +org.eclipse.etrice.abstractexec.behavior/trace/rules=true +org.eclipse.etrice.abstractexec.behavior/trace/rules/level=2 +org.eclipse.etrice.abstractexec.behavior/trace/abstractexec=true +org.eclipse.etrice.abstractexec.behavior/trace/abstractexec/name=AETest diff --git a/plugins/org.eclipse.etrice.abstractexec.behavior/.project b/plugins/org.eclipse.etrice.abstractexec.behavior/.project index bc5cf1d2c..f780a1c2a 100644 --- a/plugins/org.eclipse.etrice.abstractexec.behavior/.project +++ b/plugins/org.eclipse.etrice.abstractexec.behavior/.project @@ -1,28 +1,28 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.etrice.abstractexec.behavior</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.etrice.abstractexec.behavior</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.ManifestBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.SchemaBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> diff --git a/plugins/org.eclipse.etrice.abstractexec.behavior/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.etrice.abstractexec.behavior/.settings/org.eclipse.jdt.core.prefs index 08fa054b3..60c096c32 100644 --- a/plugins/org.eclipse.etrice.abstractexec.behavior/.settings/org.eclipse.jdt.core.prefs +++ b/plugins/org.eclipse.etrice.abstractexec.behavior/.settings/org.eclipse.jdt.core.prefs @@ -1,8 +1,8 @@ -#Wed May 23 19:11:47 CEST 2012
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
+#Wed May 23 19:11:47 CEST 2012 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/plugins/org.eclipse.etrice.abstractexec.behavior/META-INF/MANIFEST.MF b/plugins/org.eclipse.etrice.abstractexec.behavior/META-INF/MANIFEST.MF index 884fef21c..984c52a05 100644 --- a/plugins/org.eclipse.etrice.abstractexec.behavior/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.etrice.abstractexec.behavior/META-INF/MANIFEST.MF @@ -1,17 +1,17 @@ -Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Abstract Execution for State Machines
-Bundle-SymbolicName: org.eclipse.etrice.abstractexec.behavior;singleton:=true
-Bundle-Version: 0.3.0.qualifier
-Bundle-Vendor: Eclipse eTrice (Incubation)
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Require-Bundle: org.eclipse.etrice.core.room;bundle-version="0.3.0",
- org.eclipse.etrice.core.room.ui;bundle-version="0.3.0",
- org.eclipse.etrice.core.genmodel;bundle-version="0.3.0",
- org.eclipse.etrice.generator;bundle-version="0.3.0",
- org.eclipse.emf.ecore;bundle-version="2.7.0",
- org.eclipse.xtext;bundle-version="2.1.1",
- org.eclipse.xtext.ui;bundle-version="2.1.1"
-Bundle-Activator: org.eclipse.etrice.abstractexec.behavior.Activator
-Bundle-ActivationPolicy: lazy
-Export-Package: org.eclipse.etrice.abstractexec.behavior;x-friends:="org.eclipse.etrice.abstractexec.behavior.tests"
+Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Abstract Execution for State Machines +Bundle-SymbolicName: org.eclipse.etrice.abstractexec.behavior;singleton:=true +Bundle-Version: 0.3.0.qualifier +Bundle-Vendor: Eclipse eTrice (Incubation) +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Require-Bundle: org.eclipse.etrice.core.room;bundle-version="0.3.0", + org.eclipse.etrice.core.room.ui;bundle-version="0.3.0", + org.eclipse.etrice.core.genmodel;bundle-version="0.3.0", + org.eclipse.etrice.generator;bundle-version="0.3.0", + org.eclipse.emf.ecore;bundle-version="2.7.0", + org.eclipse.xtext;bundle-version="2.1.1", + org.eclipse.xtext.ui;bundle-version="2.1.1" +Bundle-Activator: org.eclipse.etrice.abstractexec.behavior.Activator +Bundle-ActivationPolicy: lazy +Export-Package: org.eclipse.etrice.abstractexec.behavior;x-friends:="org.eclipse.etrice.abstractexec.behavior.tests" diff --git a/plugins/org.eclipse.etrice.abstractexec.behavior/about.html b/plugins/org.eclipse.etrice.abstractexec.behavior/about.html index f47dbddbb..c258ef55d 100644 --- a/plugins/org.eclipse.etrice.abstractexec.behavior/about.html +++ b/plugins/org.eclipse.etrice.abstractexec.behavior/about.html @@ -1,28 +1,28 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, "Program" will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party ("Redistributor") and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> +<title>About</title> +</head> +<body lang="EN-US"> +<h2>About This Content</h2> + +<p>June 5, 2006</p> +<h3>License</h3> + +<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available +at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. +For purposes of the EPL, "Program" will mean the Content.</p> + +<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") and different terms and conditions may +apply to your use of any object code in the Content. Check the Redistributor's license that was +provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise +indicated below, the terms and conditions of the EPL still apply to any source code in the Content +and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p> + +</body> </html>
\ No newline at end of file diff --git a/plugins/org.eclipse.etrice.abstractexec.behavior/build.properties b/plugins/org.eclipse.etrice.abstractexec.behavior/build.properties index 6965d1296..060a9e9fd 100644 --- a/plugins/org.eclipse.etrice.abstractexec.behavior/build.properties +++ b/plugins/org.eclipse.etrice.abstractexec.behavior/build.properties @@ -1,6 +1,6 @@ -source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- .options
+source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + .options diff --git a/plugins/org.eclipse.etrice.abstractexec.behavior/plugin.xml b/plugins/org.eclipse.etrice.abstractexec.behavior/plugin.xml index d5e518210..9f7af4949 100644 --- a/plugins/org.eclipse.etrice.abstractexec.behavior/plugin.xml +++ b/plugins/org.eclipse.etrice.abstractexec.behavior/plugin.xml @@ -1,18 +1,18 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- point="org.eclipse.etrice.core.room.validation">
- <validator
- class="org.eclipse.etrice.abstractexec.behavior.AbstractExecutionValidator"
- classToCheck="org.eclipse.etrice.core.room.ActorClass"
- mode="FAST">
- </validator>
- <validator
- class="org.eclipse.etrice.abstractexec.behavior.ReachabilityValidator"
- classToCheck="org.eclipse.etrice.core.room.ActorClass"
- mode="FAST">
- </validator>
- </extension>
-
-</plugin>
+<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.4"?> +<plugin> + <extension + point="org.eclipse.etrice.core.room.validation"> + <validator + class="org.eclipse.etrice.abstractexec.behavior.AbstractExecutionValidator" + classToCheck="org.eclipse.etrice.core.room.ActorClass" + mode="FAST"> + </validator> + <validator + class="org.eclipse.etrice.abstractexec.behavior.ReachabilityValidator" + classToCheck="org.eclipse.etrice.core.room.ActorClass" + mode="FAST"> + </validator> + </extension> + +</plugin> diff --git a/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/AbstractExecutionValidator.java b/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/AbstractExecutionValidator.java index b66eab480..25833f20f 100644 --- a/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/AbstractExecutionValidator.java +++ b/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/AbstractExecutionValidator.java @@ -1,254 +1,254 @@ -/*******************************************************************************
- * Copyright (c) 2012 Rohit Agrawal
- * 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:
- * Rohit Agrawal (initial contribution)
- *
- *******************************************************************************/
-
-
-package org.eclipse.etrice.abstractexec.behavior;
-
-import java.util.List;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.emf.common.util.TreeIterator;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.etrice.core.genmodel.base.NullDiagnostician;
-import org.eclipse.etrice.core.genmodel.base.NullLogger;
-import org.eclipse.etrice.core.genmodel.builder.GeneratorModelBuilder;
-import org.eclipse.etrice.core.genmodel.etricegen.ActiveTrigger;
-import org.eclipse.etrice.core.genmodel.etricegen.ExpandedActorClass;
-import org.eclipse.etrice.core.room.ActorClass;
-import org.eclipse.etrice.core.room.DetailCode;
-import org.eclipse.etrice.core.room.GeneralProtocolClass;
-import org.eclipse.etrice.core.room.InterfaceItem;
-import org.eclipse.etrice.core.room.MessageFromIf;
-import org.eclipse.etrice.core.room.ProtocolClass;
-import org.eclipse.etrice.core.room.State;
-import org.eclipse.etrice.core.room.StateGraphItem;
-import org.eclipse.etrice.core.room.Trigger;
-import org.eclipse.etrice.core.room.TriggeredTransition;
-import org.eclipse.etrice.core.room.util.RoomHelpers;
-import org.eclipse.etrice.core.validation.IRoomValidator;
-import org.eclipse.etrice.core.validation.ValidationUtil;
-import org.eclipse.xtext.validation.ValidationMessageAcceptor;
-
-/**
- * @author rentzhnr
- *
- */
-public class AbstractExecutionValidator implements IRoomValidator {
-
- // c&p in tests
- public static String DIAG_CODE_VIOLATION_TRIGGER = "etrice.violation_trigger";
- public static String DIAG_CODE_VIOLATION_MESSAGESEND = "etrice.violation_messagesend";
- public static String DIAG_CODE_MISSING_TRIGGER = "etrice.receive_message";
- public static String DIAG_CODE_MISSING_MESSAGESEND = "etrice.send_message";
-
- private static boolean traceExec = false;
- private static String traceName = "";
- static {
- if (Activator.getDefault().isDebugging()) {
- String value = Platform
- .getDebugOption("org.eclipse.etrice.abstractexec.behavior/trace/abstractexec");
- if (value != null && value.equalsIgnoreCase(Boolean.toString(true))) {
- traceExec = true;
- }
- traceName = Platform
- .getDebugOption("org.eclipse.etrice.abstractexec.behavior/trace/abstractexec/name");
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.etrice.core.validation.IRoomValidator#validate(org.eclipse
- * .emf.ecore.EObject,
- * org.eclipse.xtext.validation.ValidationMessageAcceptor)
- */
- @Override
- public void validate(EObject object,
- ValidationMessageAcceptor messageAcceptor) {
-
- if (!(object instanceof ActorClass))
- return;
-
- ActorClass ac = (ActorClass) object;
-
- if (traceExec) {
- if (!(traceName.isEmpty() || ac.getName().equals(traceName)))
- return;
- System.out.println("AbstractExecutionValidator checking class "
- + ac.getName());
- }
-
- if (ac.isAbstract())
- return;
-
- if (ValidationUtil.isCircularClassHierarchy(ac))
- // is checked elsewhere
- return;
-
- boolean oneProtocolsWithSemantics = false;
- List<InterfaceItem> ifItems = RoomHelpers.getAllInterfaceItems(ac);
- for (InterfaceItem item : ifItems) {
- GeneralProtocolClass pc = item.getGeneralProtocol();
- if (!(pc instanceof ProtocolClass))
- continue;
-
- if (traceExec)
- System.out.println(" Checking protocolClass " + pc.getName()
- + " for semantics");
- if (((ProtocolClass) pc).getSemantics() != null) {
- oneProtocolsWithSemantics = true;
- if (traceExec)
- System.out
- .println(" Will execute because semantics defined for "
- + pc.getName());
- break;
- }
- }
- if (oneProtocolsWithSemantics) {
- // begin abstract execution on state machine of expanded actor class
- if (traceExec)
- System.out.println(" Reached where at least one interface items has semantics");
- NullDiagnostician diagnostician = new NullDiagnostician();
- GeneratorModelBuilder builder = new GeneratorModelBuilder(
- new NullLogger(), diagnostician);
- ExpandedActorClass xpac = builder.createExpandedActorClass(ac);
-
- if (xpac != null && !diagnostician.isFailed()) {
- SemanticsCheck checker = new SemanticsCheck(xpac);
- checker.checkSemantics();
-
- if (traceExec)
- System.out.println(" Rule checking for "
- + xpac.getActorClass().getName() + " is over");
-
- TreeIterator<EObject> it = xpac.getStateMachine()
- .eAllContents();
- while (it.hasNext()) {
- EObject obj = it.next();
- if (obj instanceof State) {
- ProposalGenerator propGen = new ProposalGenerator(xpac,
- checker);
- State st = (State) obj;
- propGen.createProposals(st);
- createMarkersForProposals(propGen, messageAcceptor, st,
- xpac);
- }
- // the following part takes care of all the warnings
- if (obj instanceof StateGraphItem) {
- StateGraphItem item = (StateGraphItem) obj;
- createMarkersForWarnings(checker, messageAcceptor,
- item, xpac);
- }
- }
- if (traceExec)
- System.out
- .println("AbstractExecutionValidator done checking class "
- + ac.getName());
- }
- else
- if(traceExec)
- System.out.println("No checking because internal generation failed");
- }
- }
-
- @Override
- public String getName() {
- return "Abstract FSM Execution Validator";
- }
-
- @Override
- public String getDescription() {
- return "This validator checks the state machine against the protocol semantics of its ports.";
- }
-
- private void createMarkersForProposals(ProposalGenerator propGen,
- ValidationMessageAcceptor messageAcceptor, State st,
- ExpandedActorClass xpac) {
- List<MessageFromIf> incoming = propGen.getIncomingProposals();
- EObject orig = xpac.getOrig(st);
- EObject container = orig.eContainer();
- @SuppressWarnings("unchecked")
- int idx = ((List<? extends EObject>) container.eGet(orig
- .eContainingFeature())).indexOf(orig);
-
- for (MessageFromIf msg : incoming) {
- messageAcceptor.acceptWarning("State should handle the message "
- + msg.getMessage().getName() + " from port "
- + msg.getFrom().getName() + " ", container,
- orig.eContainingFeature(), idx, DIAG_CODE_MISSING_TRIGGER,
- st.getName());
- }
- List<MessageFromIf> outgoing = propGen.getOutgoingProposals();
-
- for (MessageFromIf msg : outgoing) {
- messageAcceptor.acceptInfo("State should send the message "
- + msg.getMessage().getName() + " to port "
- + msg.getFrom().getName() + " ", container,
- orig.eContainingFeature(), idx, DIAG_CODE_MISSING_MESSAGESEND,
- st.getName());
-
- }
-
- }
-
- private void createMarkersForWarnings(SemanticsCheck checker,
- ValidationMessageAcceptor messageAcceptor, StateGraphItem item,
- ExpandedActorClass xpac) {
- List<HandledMessage> warningList = checker.getWarningMsg(item);
- if (traceExec && warningList != null) {
- System.out.println("Messages in the warning list for item "
- + item.getName());
- }
- if (warningList != null)
- for (HandledMessage msg : warningList) {
- EObject origin = msg.getOrigin();
- if (origin instanceof ActiveTrigger) {
- ActiveTrigger trigger = (ActiveTrigger) origin;
- for (TriggeredTransition trans : trigger.getTransitions()) {
- // have to translate back the transition to our original
- // model
- TriggeredTransition orig = (TriggeredTransition) xpac
- .getOrig(trans);
- for (Trigger trig : orig.getTriggers()) {
- for (MessageFromIf mif : trig.getMsgFromIfPairs()) {
- // messages haven't been copied, so all point to
- // the same objects and we can just compare
- // pointers
- if (mif.getMessage() == msg.getMsg()
- && mif.getFrom() == msg.getIfitem()) {
- messageAcceptor
- .acceptWarning(
- "The message violates the semantic rule",
- trig,
- mif.eContainingFeature(),
- trig.getMsgFromIfPairs()
- .indexOf(trig),
- DIAG_CODE_VIOLATION_TRIGGER, trigger
- .getMsg().getName());
- }
- }
- }
- }
- } else if (origin instanceof DetailCode) {
- DetailCode dc = (DetailCode) origin;
- EObject orig = xpac.getOrig(dc);
- messageAcceptor.acceptWarning(
- "The message violates the semantic rule",
- orig.eContainer(), orig.eContainingFeature(),
- ValidationMessageAcceptor.INSIGNIFICANT_INDEX,
- DIAG_CODE_VIOLATION_MESSAGESEND);
-
- }
- }
- }
-}
+/******************************************************************************* + * Copyright (c) 2012 Rohit Agrawal + * 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: + * Rohit Agrawal (initial contribution) + * + *******************************************************************************/ + + +package org.eclipse.etrice.abstractexec.behavior; + +import java.util.List; + +import org.eclipse.core.runtime.Platform; +import org.eclipse.emf.common.util.TreeIterator; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.etrice.core.genmodel.base.NullDiagnostician; +import org.eclipse.etrice.core.genmodel.base.NullLogger; +import org.eclipse.etrice.core.genmodel.builder.GeneratorModelBuilder; +import org.eclipse.etrice.core.genmodel.etricegen.ActiveTrigger; +import org.eclipse.etrice.core.genmodel.etricegen.ExpandedActorClass; +import org.eclipse.etrice.core.room.ActorClass; +import org.eclipse.etrice.core.room.DetailCode; +import org.eclipse.etrice.core.room.GeneralProtocolClass; +import org.eclipse.etrice.core.room.InterfaceItem; +import org.eclipse.etrice.core.room.MessageFromIf; +import org.eclipse.etrice.core.room.ProtocolClass; +import org.eclipse.etrice.core.room.State; +import org.eclipse.etrice.core.room.StateGraphItem; +import org.eclipse.etrice.core.room.Trigger; +import org.eclipse.etrice.core.room.TriggeredTransition; +import org.eclipse.etrice.core.room.util.RoomHelpers; +import org.eclipse.etrice.core.validation.IRoomValidator; +import org.eclipse.etrice.core.validation.ValidationUtil; +import org.eclipse.xtext.validation.ValidationMessageAcceptor; + +/** + * @author rentzhnr + * + */ +public class AbstractExecutionValidator implements IRoomValidator { + + // c&p in tests + public static String DIAG_CODE_VIOLATION_TRIGGER = "etrice.violation_trigger"; + public static String DIAG_CODE_VIOLATION_MESSAGESEND = "etrice.violation_messagesend"; + public static String DIAG_CODE_MISSING_TRIGGER = "etrice.receive_message"; + public static String DIAG_CODE_MISSING_MESSAGESEND = "etrice.send_message"; + + private static boolean traceExec = false; + private static String traceName = ""; + static { + if (Activator.getDefault().isDebugging()) { + String value = Platform + .getDebugOption("org.eclipse.etrice.abstractexec.behavior/trace/abstractexec"); + if (value != null && value.equalsIgnoreCase(Boolean.toString(true))) { + traceExec = true; + } + traceName = Platform + .getDebugOption("org.eclipse.etrice.abstractexec.behavior/trace/abstractexec/name"); + } + } + + /* + * (non-Javadoc) + * + * @see + * org.eclipse.etrice.core.validation.IRoomValidator#validate(org.eclipse + * .emf.ecore.EObject, + * org.eclipse.xtext.validation.ValidationMessageAcceptor) + */ + @Override + public void validate(EObject object, + ValidationMessageAcceptor messageAcceptor) { + + if (!(object instanceof ActorClass)) + return; + + ActorClass ac = (ActorClass) object; + + if (traceExec) { + if (!(traceName.isEmpty() || ac.getName().equals(traceName))) + return; + System.out.println("AbstractExecutionValidator checking class " + + ac.getName()); + } + + if (ac.isAbstract()) + return; + + if (ValidationUtil.isCircularClassHierarchy(ac)) + // is checked elsewhere + return; + + boolean oneProtocolsWithSemantics = false; + List<InterfaceItem> ifItems = RoomHelpers.getAllInterfaceItems(ac); + for (InterfaceItem item : ifItems) { + GeneralProtocolClass pc = item.getGeneralProtocol(); + if (!(pc instanceof ProtocolClass)) + continue; + + if (traceExec) + System.out.println(" Checking protocolClass " + pc.getName() + + " for semantics"); + if (((ProtocolClass) pc).getSemantics() != null) { + oneProtocolsWithSemantics = true; + if (traceExec) + System.out + .println(" Will execute because semantics defined for " + + pc.getName()); + break; + } + } + if (oneProtocolsWithSemantics) { + // begin abstract execution on state machine of expanded actor class + if (traceExec) + System.out.println(" Reached where at least one interface items has semantics"); + NullDiagnostician diagnostician = new NullDiagnostician(); + GeneratorModelBuilder builder = new GeneratorModelBuilder( + new NullLogger(), diagnostician); + ExpandedActorClass xpac = builder.createExpandedActorClass(ac); + + if (xpac != null && !diagnostician.isFailed()) { + SemanticsCheck checker = new SemanticsCheck(xpac); + checker.checkSemantics(); + + if (traceExec) + System.out.println(" Rule checking for " + + xpac.getActorClass().getName() + " is over"); + + TreeIterator<EObject> it = xpac.getStateMachine() + .eAllContents(); + while (it.hasNext()) { + EObject obj = it.next(); + if (obj instanceof State) { + ProposalGenerator propGen = new ProposalGenerator(xpac, + checker); + State st = (State) obj; + propGen.createProposals(st); + createMarkersForProposals(propGen, messageAcceptor, st, + xpac); + } + // the following part takes care of all the warnings + if (obj instanceof StateGraphItem) { + StateGraphItem item = (StateGraphItem) obj; + createMarkersForWarnings(checker, messageAcceptor, + item, xpac); + } + } + if (traceExec) + System.out + .println("AbstractExecutionValidator done checking class " + + ac.getName()); + } + else + if(traceExec) + System.out.println("No checking because internal generation failed"); + } + } + + @Override + public String getName() { + return "Abstract FSM Execution Validator"; + } + + @Override + public String getDescription() { + return "This validator checks the state machine against the protocol semantics of its ports."; + } + + private void createMarkersForProposals(ProposalGenerator propGen, + ValidationMessageAcceptor messageAcceptor, State st, + ExpandedActorClass xpac) { + List<MessageFromIf> incoming = propGen.getIncomingProposals(); + EObject orig = xpac.getOrig(st); + EObject container = orig.eContainer(); + @SuppressWarnings("unchecked") + int idx = ((List<? extends EObject>) container.eGet(orig + .eContainingFeature())).indexOf(orig); + + for (MessageFromIf msg : incoming) { + messageAcceptor.acceptWarning("State should handle the message " + + msg.getMessage().getName() + " from port " + + msg.getFrom().getName() + " ", container, + orig.eContainingFeature(), idx, DIAG_CODE_MISSING_TRIGGER, + st.getName()); + } + List<MessageFromIf> outgoing = propGen.getOutgoingProposals(); + + for (MessageFromIf msg : outgoing) { + messageAcceptor.acceptInfo("State should send the message " + + msg.getMessage().getName() + " to port " + + msg.getFrom().getName() + " ", container, + orig.eContainingFeature(), idx, DIAG_CODE_MISSING_MESSAGESEND, + st.getName()); + + } + + } + + private void createMarkersForWarnings(SemanticsCheck checker, + ValidationMessageAcceptor messageAcceptor, StateGraphItem item, + ExpandedActorClass xpac) { + List<HandledMessage> warningList = checker.getWarningMsg(item); + if (traceExec && warningList != null) { + System.out.println("Messages in the warning list for item " + + item.getName()); + } + if (warningList != null) + for (HandledMessage msg : warningList) { + EObject origin = msg.getOrigin(); + if (origin instanceof ActiveTrigger) { + ActiveTrigger trigger = (ActiveTrigger) origin; + for (TriggeredTransition trans : trigger.getTransitions()) { + // have to translate back the transition to our original + // model + TriggeredTransition orig = (TriggeredTransition) xpac + .getOrig(trans); + for (Trigger trig : orig.getTriggers()) { + for (MessageFromIf mif : trig.getMsgFromIfPairs()) { + // messages haven't been copied, so all point to + // the same objects and we can just compare + // pointers + if (mif.getMessage() == msg.getMsg() + && mif.getFrom() == msg.getIfitem()) { + messageAcceptor + .acceptWarning( + "The message violates the semantic rule", + trig, + mif.eContainingFeature(), + trig.getMsgFromIfPairs() + .indexOf(trig), + DIAG_CODE_VIOLATION_TRIGGER, trigger + .getMsg().getName()); + } + } + } + } + } else if (origin instanceof DetailCode) { + DetailCode dc = (DetailCode) origin; + EObject orig = xpac.getOrig(dc); + messageAcceptor.acceptWarning( + "The message violates the semantic rule", + orig.eContainer(), orig.eContainingFeature(), + ValidationMessageAcceptor.INSIGNIFICANT_INDEX, + DIAG_CODE_VIOLATION_MESSAGESEND); + + } + } + } +} diff --git a/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/ActionCodeAnalyzer.java b/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/ActionCodeAnalyzer.java index 5a00ad47e..4d9720494 100644 --- a/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/ActionCodeAnalyzer.java +++ b/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/ActionCodeAnalyzer.java @@ -1,81 +1,81 @@ -/*******************************************************************************
- * Copyright (c) 2012 Rohit Agrawal
- * 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:
- * Rohit Agrawal (initial contribution)
- *
- *******************************************************************************/
-
-package org.eclipse.etrice.abstractexec.behavior;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.etrice.core.room.ActorClass;
-import org.eclipse.etrice.core.room.DetailCode;
-import org.eclipse.etrice.core.room.InterfaceItem;
-import org.eclipse.etrice.core.room.Message;
-import org.eclipse.etrice.generator.base.DefaultTranslationProvider;
-import org.eclipse.etrice.generator.base.DetailCodeTranslator;
-
-/**
- * @author Henrik Rentz-Reichert
- *
- */
-public class ActionCodeAnalyzer {
-
- private class Collector extends DefaultTranslationProvider {
-
- private ArrayList<HandledMessage> mifs = new ArrayList<HandledMessage>();
-
- public ArrayList<HandledMessage> getMifs() {
- return mifs;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.etrice.generator.base.DefaultTranslationProvider#getInterfaceItemMessageText(org.eclipse.etrice.core.room.InterfaceItem, org.eclipse.etrice.core.room.Message, java.util.ArrayList, java.lang.String, java.lang.String)
- */
- @Override
- public String getInterfaceItemMessageText(InterfaceItem item,
- Message msg, ArrayList<String> args, String index, String orig) {
-
- HandledMessage sm = new HandledMessage(item, msg, origin);
- mifs.add(sm);
-
- return orig;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.etrice.generator.base.DefaultTranslationProvider#translateMembers()
- */
- @Override
- public boolean translateMembers() {
- return true;
- }
-
- // create a new list and leave previous unchanged
- public void begin() {
- mifs = new ArrayList<HandledMessage>();
- }
- }
-
- private Collector collector;
- private DetailCodeTranslator translator;
- private DetailCode origin;
-
- public ActionCodeAnalyzer(ActorClass ac) {
- collector = new Collector();
- translator = new DetailCodeTranslator(ac, collector);
- }
-
- public List<HandledMessage> analyze(DetailCode dc) {
- origin = dc;
- collector.begin();
- translator.translateDetailCode(dc);
- return collector.getMifs();
- }
-}
+/******************************************************************************* + * Copyright (c) 2012 Rohit Agrawal + * 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: + * Rohit Agrawal (initial contribution) + * + *******************************************************************************/ + +package org.eclipse.etrice.abstractexec.behavior; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.etrice.core.room.ActorClass; +import org.eclipse.etrice.core.room.DetailCode; +import org.eclipse.etrice.core.room.InterfaceItem; +import org.eclipse.etrice.core.room.Message; +import org.eclipse.etrice.generator.base.DefaultTranslationProvider; +import org.eclipse.etrice.generator.base.DetailCodeTranslator; + +/** + * @author Henrik Rentz-Reichert + * + */ +public class ActionCodeAnalyzer { + + private class Collector extends DefaultTranslationProvider { + + private ArrayList<HandledMessage> mifs = new ArrayList<HandledMessage>(); + + public ArrayList<HandledMessage> getMifs() { + return mifs; + } + + /* (non-Javadoc) + * @see org.eclipse.etrice.generator.base.DefaultTranslationProvider#getInterfaceItemMessageText(org.eclipse.etrice.core.room.InterfaceItem, org.eclipse.etrice.core.room.Message, java.util.ArrayList, java.lang.String, java.lang.String) + */ + @Override + public String getInterfaceItemMessageText(InterfaceItem item, + Message msg, ArrayList<String> args, String index, String orig) { + + HandledMessage sm = new HandledMessage(item, msg, origin); + mifs.add(sm); + + return orig; + } + + /* (non-Javadoc) + * @see org.eclipse.etrice.generator.base.DefaultTranslationProvider#translateMembers() + */ + @Override + public boolean translateMembers() { + return true; + } + + // create a new list and leave previous unchanged + public void begin() { + mifs = new ArrayList<HandledMessage>(); + } + } + + private Collector collector; + private DetailCodeTranslator translator; + private DetailCode origin; + + public ActionCodeAnalyzer(ActorClass ac) { + collector = new Collector(); + translator = new DetailCodeTranslator(ac, collector); + } + + public List<HandledMessage> analyze(DetailCode dc) { + origin = dc; + collector.begin(); + translator.translateDetailCode(dc); + return collector.getMifs(); + } +} diff --git a/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/Activator.java b/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/Activator.java index 66c49dcea..75ba91352 100644 --- a/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/Activator.java +++ b/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/Activator.java @@ -1,39 +1,39 @@ -/*******************************************************************************
- * Copyright (c) 2012 Rohit Agrawal
- * 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:
- * Rohit Agrawal (initial contribution)
- *
- *******************************************************************************/
-
-package org.eclipse.etrice.abstractexec.behavior;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class Activator extends AbstractUIPlugin implements BundleActivator {
-
- private static Activator instance = null;
-
- public static
- Activator getDefault() {
- return instance;
- }
-
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- instance = this;
- }
-
- @Override
- public void stop(BundleContext context) throws Exception {
- instance = null;
- super.stop(context);
- }
-}
+/******************************************************************************* + * Copyright (c) 2012 Rohit Agrawal + * 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: + * Rohit Agrawal (initial contribution) + * + *******************************************************************************/ + +package org.eclipse.etrice.abstractexec.behavior; + +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; + +public class Activator extends AbstractUIPlugin implements BundleActivator { + + private static Activator instance = null; + + public static + Activator getDefault() { + return instance; + } + + @Override + public void start(BundleContext context) throws Exception { + super.start(context); + instance = this; + } + + @Override + public void stop(BundleContext context) throws Exception { + instance = null; + super.stop(context); + } +} diff --git a/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/ActiveRules.java b/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/ActiveRules.java index 9d2152cd7..65f3d5839 100644 --- a/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/ActiveRules.java +++ b/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/ActiveRules.java @@ -1,173 +1,173 @@ -/*******************************************************************************
- * Copyright (c) 2012 Rohit Agrawal
- * 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:
- * Rohit Agrawal (initial contribution)
- *
- *******************************************************************************/
-
-package org.eclipse.etrice.abstractexec.behavior;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map.Entry;
-import java.util.Set;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.etrice.core.genmodel.etricegen.ExpandedActorClass;
-import org.eclipse.etrice.core.room.GeneralProtocolClass;
-import org.eclipse.etrice.core.room.InSemanticsRule;
-import org.eclipse.etrice.core.room.InterfaceItem;
-import org.eclipse.etrice.core.room.ProtocolClass;
-import org.eclipse.etrice.core.room.SemanticsRule;
-import org.eclipse.etrice.core.room.util.RoomHelpers;
-
-public class ActiveRules {
- private HashMap<InterfaceItem, List<SemanticsRule>> rules;
- private static boolean traceRules = false;
- private static int traceLevel = 0;
- static {
- if (Activator.getDefault().isDebugging()) {
- String value = Platform
- .getDebugOption("org.eclipse.etrice.abstractexec.behavior/trace/rules");
- if (value != null && value.equalsIgnoreCase(Boolean.toString(true))) {
- traceRules = true;
- }
- value = Platform
- .getDebugOption("org.eclipse.etrice.abstractexec.behavior/trace/rules/level");
- if (value != null) {
- traceLevel = Integer.parseInt(value);
- }
- }
- }
-
- // private static final int TRACE_RESULT = 1;
- private static final int TRACE_DETAILS = 2;
-
- public ActiveRules() {
- rules = new HashMap<InterfaceItem, List<SemanticsRule>>();
- }
-
- private ActiveRules(HashMap<InterfaceItem, List<SemanticsRule>> r) {
- rules = r;
- }
-
- public Set<InterfaceItem> getPortList() {
- return rules.keySet();
- }
-
- public List<SemanticsRule> getRulesForPort(InterfaceItem port) {
- return rules.get(port);
- }
-
- // checks for currently active rules against a message list and modifies the
- // rules which can be merged with the destination node
- public List<HandledMessage> consumeMessages(List<HandledMessage> msgList) {
- List<HandledMessage> wrongMsgList = new ArrayList<HandledMessage>();
- for (HandledMessage msg : msgList) {
- List<SemanticsRule> localRules = rules.get(msg.getIfitem());
- if (localRules != null) {
- SemanticsRule match = null;
- for (SemanticsRule rule : localRules) {
- if (rule.getMsg() == msg.getMsg()) {
- match = rule;
- break;
- }
- }
-
- if (match != null) {
- if (traceRules && traceLevel >= TRACE_DETAILS)
- System.out.println(" found match for "
- + msg.getMsg().getName());
-
- // discard all alternatives
- localRules.clear();
-
- // and add all follow ups
- localRules.addAll(match.getFollowUps());
- } else {
- // TODO: issue a warning?
- wrongMsgList.add(msg);
- }
- }
- }
- return wrongMsgList;
- }
-
- // merges the rules with the destination active rules
- public boolean merge(ActiveRules ar) {
- boolean added_at_least_one = false;
- for (Entry<InterfaceItem, List<SemanticsRule>> entry : ar.rules
- .entrySet()) {
- for (SemanticsRule rule : entry.getValue()) {
- InterfaceItem ifitem = entry.getKey();
- if (rules.containsKey(ifitem)) {
- if (!rules.get(ifitem).contains(rule)) {
- rules.get(ifitem).add(rule);
- added_at_least_one = true;
- }
- } else {
- List<SemanticsRule> tempList = new ArrayList<SemanticsRule>();
- tempList.add(rule);
- rules.put(ifitem, tempList);
- added_at_least_one = true;
- }
- }
- }
-
- if (traceRules && traceLevel >= TRACE_DETAILS)
- System.out.println(" merge changed rules");
-
- return added_at_least_one;
- }
-
- public ActiveRules createCopy() {
- HashMap<InterfaceItem, List<SemanticsRule>> newRules = new HashMap<InterfaceItem, List<SemanticsRule>>();
- for (InterfaceItem ifitem : rules.keySet()) {
- newRules.put(ifitem,
- new ArrayList<SemanticsRule>(rules.get(ifitem)));
- }
- return new ActiveRules(newRules);
- }
-
- public void buildInitLocalRules(ExpandedActorClass xpAct) {
- // HashMap<InterfaceItem, EList<SemanticsRule>> locals = new
- // HashMap<InterfaceItem, EList<SemanticsRule>>();
- List<InterfaceItem> portList = RoomHelpers.getAllInterfaceItems(xpAct
- .getActorClass());
- for (InterfaceItem ifitem : portList) {
- GeneralProtocolClass gpc = ifitem.getGeneralProtocol();
- if (gpc instanceof ProtocolClass) {
- ProtocolClass pc = (ProtocolClass) gpc;
- if (pc.getSemantics() != null)
- rules.put(ifitem, new ArrayList<SemanticsRule>(pc
- .getSemantics().getRules()));
- }
- }
- }
-
- public void print() {
- for (InterfaceItem port : rules.keySet()) {
- System.out.println(" Rules for Port " + port.getName() + ":");
- for (SemanticsRule rule : rules.get(port)) {
- printRule(rule, " ");
- }
- }
- }
-
- public void printRule(SemanticsRule rule, String indent) {
- if (rule instanceof InSemanticsRule)
- System.out.println(indent + "in: " + rule.getMsg().getName());
- else
- System.out.println(indent + "out: " + rule.getMsg().getName());
- // recursion
- for (SemanticsRule sr : rule.getFollowUps()) {
- printRule(sr, indent + " ");
- }
- }
-}
+/******************************************************************************* + * Copyright (c) 2012 Rohit Agrawal + * 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: + * Rohit Agrawal (initial contribution) + * + *******************************************************************************/ + +package org.eclipse.etrice.abstractexec.behavior; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map.Entry; +import java.util.Set; + +import org.eclipse.core.runtime.Platform; +import org.eclipse.etrice.core.genmodel.etricegen.ExpandedActorClass; +import org.eclipse.etrice.core.room.GeneralProtocolClass; +import org.eclipse.etrice.core.room.InSemanticsRule; +import org.eclipse.etrice.core.room.InterfaceItem; +import org.eclipse.etrice.core.room.ProtocolClass; +import org.eclipse.etrice.core.room.SemanticsRule; +import org.eclipse.etrice.core.room.util.RoomHelpers; + +public class ActiveRules { + private HashMap<InterfaceItem, List<SemanticsRule>> rules; + private static boolean traceRules = false; + private static int traceLevel = 0; + static { + if (Activator.getDefault().isDebugging()) { + String value = Platform + .getDebugOption("org.eclipse.etrice.abstractexec.behavior/trace/rules"); + if (value != null && value.equalsIgnoreCase(Boolean.toString(true))) { + traceRules = true; + } + value = Platform + .getDebugOption("org.eclipse.etrice.abstractexec.behavior/trace/rules/level"); + if (value != null) { + traceLevel = Integer.parseInt(value); + } + } + } + + // private static final int TRACE_RESULT = 1; + private static final int TRACE_DETAILS = 2; + + public ActiveRules() { + rules = new HashMap<InterfaceItem, List<SemanticsRule>>(); + } + + private ActiveRules(HashMap<InterfaceItem, List<SemanticsRule>> r) { + rules = r; + } + + public Set<InterfaceItem> getPortList() { + return rules.keySet(); + } + + public List<SemanticsRule> getRulesForPort(InterfaceItem port) { + return rules.get(port); + } + + // checks for currently active rules against a message list and modifies the + // rules which can be merged with the destination node + public List<HandledMessage> consumeMessages(List<HandledMessage> msgList) { + List<HandledMessage> wrongMsgList = new ArrayList<HandledMessage>(); + for (HandledMessage msg : msgList) { + List<SemanticsRule> localRules = rules.get(msg.getIfitem()); + if (localRules != null) { + SemanticsRule match = null; + for (SemanticsRule rule : localRules) { + if (rule.getMsg() == msg.getMsg()) { + match = rule; + break; + } + } + + if (match != null) { + if (traceRules && traceLevel >= TRACE_DETAILS) + System.out.println(" found match for " + + msg.getMsg().getName()); + + // discard all alternatives + localRules.clear(); + + // and add all follow ups + localRules.addAll(match.getFollowUps()); + } else { + // TODO: issue a warning? + wrongMsgList.add(msg); + } + } + } + return wrongMsgList; + } + + // merges the rules with the destination active rules + public boolean merge(ActiveRules ar) { + boolean added_at_least_one = false; + for (Entry<InterfaceItem, List<SemanticsRule>> entry : ar.rules + .entrySet()) { + for (SemanticsRule rule : entry.getValue()) { + InterfaceItem ifitem = entry.getKey(); + if (rules.containsKey(ifitem)) { + if (!rules.get(ifitem).contains(rule)) { + rules.get(ifitem).add(rule); + added_at_least_one = true; + } + } else { + List<SemanticsRule> tempList = new ArrayList<SemanticsRule>(); + tempList.add(rule); + rules.put(ifitem, tempList); + added_at_least_one = true; + } + } + } + + if (traceRules && traceLevel >= TRACE_DETAILS) + System.out.println(" merge changed rules"); + + return added_at_least_one; + } + + public ActiveRules createCopy() { + HashMap<InterfaceItem, List<SemanticsRule>> newRules = new HashMap<InterfaceItem, List<SemanticsRule>>(); + for (InterfaceItem ifitem : rules.keySet()) { + newRules.put(ifitem, + new ArrayList<SemanticsRule>(rules.get(ifitem))); + } + return new ActiveRules(newRules); + } + + public void buildInitLocalRules(ExpandedActorClass xpAct) { + // HashMap<InterfaceItem, EList<SemanticsRule>> locals = new + // HashMap<InterfaceItem, EList<SemanticsRule>>(); + List<InterfaceItem> portList = RoomHelpers.getAllInterfaceItems(xpAct + .getActorClass()); + for (InterfaceItem ifitem : portList) { + GeneralProtocolClass gpc = ifitem.getGeneralProtocol(); + if (gpc instanceof ProtocolClass) { + ProtocolClass pc = (ProtocolClass) gpc; + if (pc.getSemantics() != null) + rules.put(ifitem, new ArrayList<SemanticsRule>(pc + .getSemantics().getRules())); + } + } + } + + public void print() { + for (InterfaceItem port : rules.keySet()) { + System.out.println(" Rules for Port " + port.getName() + ":"); + for (SemanticsRule rule : rules.get(port)) { + printRule(rule, " "); + } + } + } + + public void printRule(SemanticsRule rule, String indent) { + if (rule instanceof InSemanticsRule) + System.out.println(indent + "in: " + rule.getMsg().getName()); + else + System.out.println(indent + "out: " + rule.getMsg().getName()); + // recursion + for (SemanticsRule sr : rule.getFollowUps()) { + printRule(sr, indent + " "); + } + } +} diff --git a/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/HandledMessage.java b/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/HandledMessage.java index 2aa91f104..546b10f1a 100644 --- a/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/HandledMessage.java +++ b/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/HandledMessage.java @@ -1,42 +1,42 @@ -/*******************************************************************************
- * Copyright (c) 2012 Rohit Agrawal
- * 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:
- * Rohit Agrawal (initial contribution)
- *
- *******************************************************************************/
-
-
-package org.eclipse.etrice.abstractexec.behavior;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.etrice.core.room.InterfaceItem;
-import org.eclipse.etrice.core.room.Message;
-
-public class HandledMessage {
- private InterfaceItem ifitem;
- private Message msg;
- private EObject origin;
-
- public HandledMessage(InterfaceItem ifitem, Message msg, EObject origin) {
- this.ifitem = ifitem;
- this.msg = msg;
- this.origin = origin;
- }
-
- public InterfaceItem getIfitem() {
- return ifitem;
- }
-
- public Message getMsg() {
- return msg;
- }
-
- public EObject getOrigin() {
- return origin;
- }
+/******************************************************************************* + * Copyright (c) 2012 Rohit Agrawal + * 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: + * Rohit Agrawal (initial contribution) + * + *******************************************************************************/ + + +package org.eclipse.etrice.abstractexec.behavior; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.etrice.core.room.InterfaceItem; +import org.eclipse.etrice.core.room.Message; + +public class HandledMessage { + private InterfaceItem ifitem; + private Message msg; + private EObject origin; + + public HandledMessage(InterfaceItem ifitem, Message msg, EObject origin) { + this.ifitem = ifitem; + this.msg = msg; + this.origin = origin; + } + + public InterfaceItem getIfitem() { + return ifitem; + } + + public Message getMsg() { + return msg; + } + + public EObject getOrigin() { + return origin; + } }
\ No newline at end of file diff --git a/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/ProposalGenerator.java b/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/ProposalGenerator.java index d41ccb0e2..7c8930346 100644 --- a/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/ProposalGenerator.java +++ b/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/ProposalGenerator.java @@ -1,116 +1,116 @@ -/*******************************************************************************
- * Copyright (c) 2012 Rohit Agrawal
- * 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:
- * Rohit Agrawal (initial contribution)
- *
- *******************************************************************************/
-
-package org.eclipse.etrice.abstractexec.behavior;
-
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.etrice.core.genmodel.etricegen.ActiveTrigger;
-import org.eclipse.etrice.core.genmodel.etricegen.ExpandedActorClass;
-import org.eclipse.etrice.core.room.InterfaceItem;
-import org.eclipse.etrice.core.room.Message;
-import org.eclipse.etrice.core.room.MessageFromIf;
-import org.eclipse.etrice.core.room.RoomFactory;
-import org.eclipse.etrice.core.room.SemanticsRule;
-import org.eclipse.etrice.core.room.State;
-import org.eclipse.etrice.core.room.util.RoomHelpers;
-
-public class ProposalGenerator {
- private ExpandedActorClass xpac;
- private SemanticsCheck checker;
- private List<MessageFromIf> outgoingProposal = new LinkedList<MessageFromIf>();
- private List<MessageFromIf> incomingProposal = new LinkedList<MessageFromIf>();
- private static boolean traceProposals = false;
- static {
- if (Activator.getDefault().isDebugging()) {
- String value = Platform
- .getDebugOption("org.eclipse.etrice.abstractexec.behavior/trace/proposals");
- if (value != null && value.equalsIgnoreCase(Boolean.toString(true))) {
- traceProposals = true;
- }
- }
- }
-
- public ProposalGenerator(ExpandedActorClass xp, SemanticsCheck chk) {
- xpac = xp;
- checker = chk;
- }
-
- public List<MessageFromIf> getIncomingProposals() {
- return incomingProposal;
- }
-
- public List<MessageFromIf> getOutgoingProposals() {
- return outgoingProposal;
- }
-
- public void createProposals(State st) {
- ActiveRules rules = checker.getActiveRules(st);
-
- // in case the state is disconnected component of the graph
- if (rules == null)
- return;
-
- // ignore substates
- if (RoomHelpers.hasDirectSubStructure(st))
- return;
-
- outgoingProposal.clear();
- incomingProposal.clear();
-
- for (InterfaceItem port : rules.getPortList()) {
- // collect all messages from active triggers
- Set<Message> messages = new HashSet<Message>();
- for (ActiveTrigger t : xpac.getActiveTriggers(st))
- if (t.getIfitem().equals(port))
- messages.add(t.getMsg());
- // check if every rule has its messages
- if (rules.getPortList().contains(port)) {
- for (SemanticsRule curRule : rules.getRulesForPort(port)) {
- if (!messages.contains(curRule.getMsg())) {
- MessageFromIf mif = RoomFactory.eINSTANCE
- .createMessageFromIf();
- mif.setFrom(port);
- mif.setMessage(curRule.getMsg());
- boolean isOutgoing = RoomHelpers.getMessageListDeep(
- port, true).contains(curRule.getMsg());
- if (isOutgoing) {
- outgoingProposal.add(mif);
- } else {
- incomingProposal.add(mif);
- }
- }
- }
- }
- }
-
- if (traceProposals) {
- System.out.println(" Proposals for : " + st.getName());
-
- for (MessageFromIf msg : outgoingProposal) {
- System.out.println(" Outgoing msg proposal : "
- + msg.getFrom().getName() + "."
- + msg.getMessage().getName() + "()");
- }
- for (MessageFromIf msg : incomingProposal) {
- System.out.println(" Incoming msg proposal : "
- + msg.getMessage().getName() + " from "
- + msg.getFrom().getName());
- }
- }
- }
-
-}
+/******************************************************************************* + * Copyright (c) 2012 Rohit Agrawal + * 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: + * Rohit Agrawal (initial contribution) + * + *******************************************************************************/ + +package org.eclipse.etrice.abstractexec.behavior; + +import java.util.HashSet; +import java.util.LinkedList; +import java.util.List; +import java.util.Set; + +import org.eclipse.core.runtime.Platform; +import org.eclipse.etrice.core.genmodel.etricegen.ActiveTrigger; +import org.eclipse.etrice.core.genmodel.etricegen.ExpandedActorClass; +import org.eclipse.etrice.core.room.InterfaceItem; +import org.eclipse.etrice.core.room.Message; +import org.eclipse.etrice.core.room.MessageFromIf; +import org.eclipse.etrice.core.room.RoomFactory; +import org.eclipse.etrice.core.room.SemanticsRule; +import org.eclipse.etrice.core.room.State; +import org.eclipse.etrice.core.room.util.RoomHelpers; + +public class ProposalGenerator { + private ExpandedActorClass xpac; + private SemanticsCheck checker; + private List<MessageFromIf> outgoingProposal = new LinkedList<MessageFromIf>(); + private List<MessageFromIf> incomingProposal = new LinkedList<MessageFromIf>(); + private static boolean traceProposals = false; + static { + if (Activator.getDefault().isDebugging()) { + String value = Platform + .getDebugOption("org.eclipse.etrice.abstractexec.behavior/trace/proposals"); + if (value != null && value.equalsIgnoreCase(Boolean.toString(true))) { + traceProposals = true; + } + } + } + + public ProposalGenerator(ExpandedActorClass xp, SemanticsCheck chk) { + xpac = xp; + checker = chk; + } + + public List<MessageFromIf> getIncomingProposals() { + return incomingProposal; + } + + public List<MessageFromIf> getOutgoingProposals() { + return outgoingProposal; + } + + public void createProposals(State st) { + ActiveRules rules = checker.getActiveRules(st); + + // in case the state is disconnected component of the graph + if (rules == null) + return; + + // ignore substates + if (RoomHelpers.hasDirectSubStructure(st)) + return; + + outgoingProposal.clear(); + incomingProposal.clear(); + + for (InterfaceItem port : rules.getPortList()) { + // collect all messages from active triggers + Set<Message> messages = new HashSet<Message>(); + for (ActiveTrigger t : xpac.getActiveTriggers(st)) + if (t.getIfitem().equals(port)) + messages.add(t.getMsg()); + // check if every rule has its messages + if (rules.getPortList().contains(port)) { + for (SemanticsRule curRule : rules.getRulesForPort(port)) { + if (!messages.contains(curRule.getMsg())) { + MessageFromIf mif = RoomFactory.eINSTANCE + .createMessageFromIf(); + mif.setFrom(port); + mif.setMessage(curRule.getMsg()); + boolean isOutgoing = RoomHelpers.getMessageListDeep( + port, true).contains(curRule.getMsg()); + if (isOutgoing) { + outgoingProposal.add(mif); + } else { + incomingProposal.add(mif); + } + } + } + } + } + + if (traceProposals) { + System.out.println(" Proposals for : " + st.getName()); + + for (MessageFromIf msg : outgoingProposal) { + System.out.println(" Outgoing msg proposal : " + + msg.getFrom().getName() + "." + + msg.getMessage().getName() + "()"); + } + for (MessageFromIf msg : incomingProposal) { + System.out.println(" Incoming msg proposal : " + + msg.getMessage().getName() + " from " + + msg.getFrom().getName()); + } + } + } + +} diff --git a/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/ReachabilityCheck.java b/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/ReachabilityCheck.java index a542a3e25..4bdad9743 100644 --- a/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/ReachabilityCheck.java +++ b/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/ReachabilityCheck.java @@ -1,137 +1,137 @@ -/*******************************************************************************
- * Copyright (c) 2012 Rohit Agrawal
- * 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:
- * Rohit Agrawal (initial contribution)
- *
- *******************************************************************************/
-
-package org.eclipse.etrice.abstractexec.behavior;
-
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.Queue;
-import java.util.Set;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.etrice.core.genmodel.etricegen.ActiveTrigger;
-import org.eclipse.etrice.core.genmodel.etricegen.ExpandedActorClass;
-import org.eclipse.etrice.core.room.EntryPoint;
-import org.eclipse.etrice.core.room.GuardedTransition;
-import org.eclipse.etrice.core.room.InitialTransition;
-import org.eclipse.etrice.core.room.State;
-import org.eclipse.etrice.core.room.StateGraph;
-import org.eclipse.etrice.core.room.StateGraphItem;
-import org.eclipse.etrice.core.room.StateGraphNode;
-import org.eclipse.etrice.core.room.TrPoint;
-import org.eclipse.etrice.core.room.Transition;
-import org.eclipse.etrice.core.room.TransitionPoint;
-import org.eclipse.etrice.core.room.TriggeredTransition;
-import org.eclipse.etrice.core.room.util.RoomHelpers;
-import org.eclipse.etrice.generator.generic.RoomExtensions;
-
-public class ReachabilityCheck {
-
- private static RoomExtensions roomExt;
-
- Queue<StateGraphNode> queue;
- public Set<StateGraphItem> visited;
- private Set<State> visitedSubStates;
- private ExpandedActorClass xpAct;
- //private Set<StateGraphItem> exitUsed;
-
- public ReachabilityCheck(ExpandedActorClass xpac) {
- roomExt = new RoomExtensions();
- queue = new LinkedList<StateGraphNode>();
- xpAct = xpac;
- visited = new HashSet<StateGraphItem>();
- visitedSubStates = new HashSet<State>();
- //exitUsed = new HashSet<StateGraphItem>();
- }
-
- public void computeReachability() {
- StateGraph graph = xpAct.getStateMachine();
- addStartingPoints(graph, true);
- doTraversal();
- visited.addAll(visitedSubStates);
- }
-
- private void addStartingPoints(StateGraph graph, boolean add_initial) {
- EList<Transition> transitions = graph.getTransitions();
- EList<TrPoint> trPoint = graph.getTrPoints();
- if (add_initial)
- for (Transition trans : transitions)
- if (trans instanceof InitialTransition) {
- visited.add(trans);
- StateGraphNode cur = RoomHelpers.getNode(trans.getTo());
- if (!visited.contains(cur))
- queue.add(cur);
- break;
- }
- for (TrPoint tp : trPoint) {
- if (tp instanceof TransitionPoint && !visited.contains(tp)) {
- queue.add(tp);
- }
- }
- }
-
- private void doTraversal() {
- while (!queue.isEmpty()) {
- StateGraphNode node = queue.poll();
- if (!visited.contains(node))
- visit(node);
- // System.out.println("Visited node : " + node.getName());
- }
- }
-
-// public boolean isExitUsed(StateGraphItem item) {
-// return exitUsed.contains(item);
-// }
-
- public boolean isReachable(StateGraphItem item) {
-
- return visited.contains(item);
- }
-
- private void visit(StateGraphNode node) {
- visited.add(node);
- if (node instanceof State) {
- State st = (State) node;
- if (RoomHelpers.hasDirectSubStructure(st)) {
- addStartingPoints(st.getSubgraph(), true);
- } else {
- // visit outgoing triggered transitions
- for (ActiveTrigger trigger : xpAct.getActiveTriggers(st)) {
- for (TriggeredTransition trans : trigger.getTransitions())
- visit(trans);
- }
- // visit outgoing guarded transitions
- for(Transition trans : roomExt.getOutgoingTransitionsHierarchical(xpAct, st)){
- if(trans instanceof GuardedTransition)
- visit(trans);
- }
- }
- } else {
- if (node instanceof EntryPoint) {
- // don't set container visited. otherwise its initial transition could not be visited any more
- State container = (State) node.eContainer().eContainer();
- visitedSubStates.add(container);
- }
- for (Transition trans : xpAct.getOutgoingTransitions(node))
- visit(trans);
- }
-
- }
-
- private void visit(Transition trans){
- visited.add(trans);
- StateGraphNode target = RoomHelpers.getNode(trans.getTo());
- if (!visited.contains(target))
- queue.add(target);
- }
-
-}
+/******************************************************************************* + * Copyright (c) 2012 Rohit Agrawal + * 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: + * Rohit Agrawal (initial contribution) + * + *******************************************************************************/ + +package org.eclipse.etrice.abstractexec.behavior; + +import java.util.HashSet; +import java.util.LinkedList; +import java.util.Queue; +import java.util.Set; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.etrice.core.genmodel.etricegen.ActiveTrigger; +import org.eclipse.etrice.core.genmodel.etricegen.ExpandedActorClass; +import org.eclipse.etrice.core.room.EntryPoint; +import org.eclipse.etrice.core.room.GuardedTransition; +import org.eclipse.etrice.core.room.InitialTransition; +import org.eclipse.etrice.core.room.State; +import org.eclipse.etrice.core.room.StateGraph; +import org.eclipse.etrice.core.room.StateGraphItem; +import org.eclipse.etrice.core.room.StateGraphNode; +import org.eclipse.etrice.core.room.TrPoint; +import org.eclipse.etrice.core.room.Transition; +import org.eclipse.etrice.core.room.TransitionPoint; +import org.eclipse.etrice.core.room.TriggeredTransition; +import org.eclipse.etrice.core.room.util.RoomHelpers; +import org.eclipse.etrice.generator.generic.RoomExtensions; + +public class ReachabilityCheck { + + private static RoomExtensions roomExt; + + Queue<StateGraphNode> queue; + public Set<StateGraphItem> visited; + private Set<State> visitedSubStates; + private ExpandedActorClass xpAct; + //private Set<StateGraphItem> exitUsed; + + public ReachabilityCheck(ExpandedActorClass xpac) { + roomExt = new RoomExtensions(); + queue = new LinkedList<StateGraphNode>(); + xpAct = xpac; + visited = new HashSet<StateGraphItem>(); + visitedSubStates = new HashSet<State>(); + //exitUsed = new HashSet<StateGraphItem>(); + } + + public void computeReachability() { + StateGraph graph = xpAct.getStateMachine(); + addStartingPoints(graph, true); + doTraversal(); + visited.addAll(visitedSubStates); + } + + private void addStartingPoints(StateGraph graph, boolean add_initial) { + EList<Transition> transitions = graph.getTransitions(); + EList<TrPoint> trPoint = graph.getTrPoints(); + if (add_initial) + for (Transition trans : transitions) + if (trans instanceof InitialTransition) { + visited.add(trans); + StateGraphNode cur = RoomHelpers.getNode(trans.getTo()); + if (!visited.contains(cur)) + queue.add(cur); + break; + } + for (TrPoint tp : trPoint) { + if (tp instanceof TransitionPoint && !visited.contains(tp)) { + queue.add(tp); + } + } + } + + private void doTraversal() { + while (!queue.isEmpty()) { + StateGraphNode node = queue.poll(); + if (!visited.contains(node)) + visit(node); + // System.out.println("Visited node : " + node.getName()); + } + } + +// public boolean isExitUsed(StateGraphItem item) { +// return exitUsed.contains(item); +// } + + public boolean isReachable(StateGraphItem item) { + + return visited.contains(item); + } + + private void visit(StateGraphNode node) { + visited.add(node); + if (node instanceof State) { + State st = (State) node; + if (RoomHelpers.hasDirectSubStructure(st)) { + addStartingPoints(st.getSubgraph(), true); + } else { + // visit outgoing triggered transitions + for (ActiveTrigger trigger : xpAct.getActiveTriggers(st)) { + for (TriggeredTransition trans : trigger.getTransitions()) + visit(trans); + } + // visit outgoing guarded transitions + for(Transition trans : roomExt.getOutgoingTransitionsHierarchical(xpAct, st)){ + if(trans instanceof GuardedTransition) + visit(trans); + } + } + } else { + if (node instanceof EntryPoint) { + // don't set container visited. otherwise its initial transition could not be visited any more + State container = (State) node.eContainer().eContainer(); + visitedSubStates.add(container); + } + for (Transition trans : xpAct.getOutgoingTransitions(node)) + visit(trans); + } + + } + + private void visit(Transition trans){ + visited.add(trans); + StateGraphNode target = RoomHelpers.getNode(trans.getTo()); + if (!visited.contains(target)) + queue.add(target); + } + +} diff --git a/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/ReachabilityValidator.java b/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/ReachabilityValidator.java index ca0fe0a1e..5f1f60b21 100644 --- a/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/ReachabilityValidator.java +++ b/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/ReachabilityValidator.java @@ -1,90 +1,90 @@ -
-/*******************************************************************************
- * Copyright (c) 2012 Rohit Agrawal
- * 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:
- * Rohit Agrawal (initial contribution)
- *
- *******************************************************************************/
-
-
-package org.eclipse.etrice.abstractexec.behavior;
-
-import java.util.List;
-
-import org.eclipse.emf.common.util.TreeIterator;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.etrice.core.genmodel.base.NullDiagnostician;
-import org.eclipse.etrice.core.genmodel.base.NullLogger;
-import org.eclipse.etrice.core.genmodel.builder.GeneratorModelBuilder;
-import org.eclipse.etrice.core.genmodel.etricegen.ExpandedActorClass;
-import org.eclipse.etrice.core.room.ActorClass;
-import org.eclipse.etrice.core.room.StateGraphItem;
-import org.eclipse.etrice.core.validation.IRoomValidator;
-import org.eclipse.etrice.core.validation.ValidationUtil;
-import org.eclipse.xtext.validation.ValidationMessageAcceptor;
-
-
-public class ReachabilityValidator implements IRoomValidator {
-
- public static String DIAG_CODE_UNREACHABLE = "etrice.unreachable";
-
- @Override
- public void validate(EObject object, ValidationMessageAcceptor messageAcceptor) {
-
- if (!(object instanceof ActorClass))
- return;
-
- ActorClass ac = (ActorClass) object;
-
- if (ac.isAbstract())
- return;
-
- if (ValidationUtil.isCircularClassHierarchy(ac))
- // is checked elsewhere
- return;
-
- NullDiagnostician diagnostician = new NullDiagnostician();
- GeneratorModelBuilder builder = new GeneratorModelBuilder(new NullLogger(), diagnostician);
- ExpandedActorClass xpac = builder.createExpandedActorClass(ac);
-
- if (xpac != null && !diagnostician.isFailed()) {
- ReachabilityCheck checker = new ReachabilityCheck(xpac);
- checker.computeReachability();
- TreeIterator<EObject> it = xpac.getStateMachine().eAllContents();
- while (it.hasNext()) {
- EObject item = it.next();
- if (item instanceof StateGraphItem)
- {
-
- StateGraphItem toCheck = (StateGraphItem) item;
- if (!checker.isReachable(toCheck)) {
- EObject orig = xpac.getOrig(toCheck);
- EObject container = orig.eContainer();
- @SuppressWarnings("unchecked")
- int idx = ((List<? extends EObject>)container.eGet(orig.eContainingFeature())).indexOf(orig);
- messageAcceptor.acceptWarning(
- "Unreachable state/point of graph",
- xpac.getOrig(toCheck).eContainer(), xpac.getOrig(toCheck).eContainingFeature(), idx,
- DIAG_CODE_UNREACHABLE, toCheck.getName());
- }
- }
- }
- }
- }
-
- @Override
- public String getName() {
- return "State Reachability Validator";
- }
-
- @Override
- public String getDescription() {
- return "This validator checks the reachability of state graph items.";
- }
-
-}
+ +/******************************************************************************* + * Copyright (c) 2012 Rohit Agrawal + * 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: + * Rohit Agrawal (initial contribution) + * + *******************************************************************************/ + + +package org.eclipse.etrice.abstractexec.behavior; + +import java.util.List; + +import org.eclipse.emf.common.util.TreeIterator; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.etrice.core.genmodel.base.NullDiagnostician; +import org.eclipse.etrice.core.genmodel.base.NullLogger; +import org.eclipse.etrice.core.genmodel.builder.GeneratorModelBuilder; +import org.eclipse.etrice.core.genmodel.etricegen.ExpandedActorClass; +import org.eclipse.etrice.core.room.ActorClass; +import org.eclipse.etrice.core.room.StateGraphItem; +import org.eclipse.etrice.core.validation.IRoomValidator; +import org.eclipse.etrice.core.validation.ValidationUtil; +import org.eclipse.xtext.validation.ValidationMessageAcceptor; + + +public class ReachabilityValidator implements IRoomValidator { + + public static String DIAG_CODE_UNREACHABLE = "etrice.unreachable"; + + @Override + public void validate(EObject object, ValidationMessageAcceptor messageAcceptor) { + + if (!(object instanceof ActorClass)) + return; + + ActorClass ac = (ActorClass) object; + + if (ac.isAbstract()) + return; + + if (ValidationUtil.isCircularClassHierarchy(ac)) + // is checked elsewhere + return; + + NullDiagnostician diagnostician = new NullDiagnostician(); + GeneratorModelBuilder builder = new GeneratorModelBuilder(new NullLogger(), diagnostician); + ExpandedActorClass xpac = builder.createExpandedActorClass(ac); + + if (xpac != null && !diagnostician.isFailed()) { + ReachabilityCheck checker = new ReachabilityCheck(xpac); + checker.computeReachability(); + TreeIterator<EObject> it = xpac.getStateMachine().eAllContents(); + while (it.hasNext()) { + EObject item = it.next(); + if (item instanceof StateGraphItem) + { + + StateGraphItem toCheck = (StateGraphItem) item; + if (!checker.isReachable(toCheck)) { + EObject orig = xpac.getOrig(toCheck); + EObject container = orig.eContainer(); + @SuppressWarnings("unchecked") + int idx = ((List<? extends EObject>)container.eGet(orig.eContainingFeature())).indexOf(orig); + messageAcceptor.acceptWarning( + "Unreachable state/point of graph", + xpac.getOrig(toCheck).eContainer(), xpac.getOrig(toCheck).eContainingFeature(), idx, + DIAG_CODE_UNREACHABLE, toCheck.getName()); + } + } + } + } + } + + @Override + public String getName() { + return "State Reachability Validator"; + } + + @Override + public String getDescription() { + return "This validator checks the reachability of state graph items."; + } + +} diff --git a/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/SemanticsCheck.java b/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/SemanticsCheck.java index 83d1fae91..1e6bcca92 100644 --- a/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/SemanticsCheck.java +++ b/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/SemanticsCheck.java @@ -1,240 +1,240 @@ -/*******************************************************************************
- * Copyright (c) 2012 Rohit Agrawal
- * 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:
- * Rohit Agrawal (initial contribution)
- *
- *******************************************************************************/
-
-
-package org.eclipse.etrice.abstractexec.behavior;
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Queue;
-import java.util.Set;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.etrice.core.genmodel.etricegen.ActiveTrigger;
-import org.eclipse.etrice.core.genmodel.etricegen.ExpandedActorClass;
-import org.eclipse.etrice.core.room.InitialTransition;
-import org.eclipse.etrice.core.room.State;
-import org.eclipse.etrice.core.room.StateGraph;
-import org.eclipse.etrice.core.room.StateGraphItem;
-import org.eclipse.etrice.core.room.StateGraphNode;
-import org.eclipse.etrice.core.room.Transition;
-import org.eclipse.etrice.core.room.util.RoomHelpers;
-
-public class SemanticsCheck {
- private Queue<StateGraphNode> queue;
- private Set<StateGraphNode> visited;
- private ExpandedActorClass xpAct;
- private HashMap<StateGraphItem, ActiveRules> mapToRules = new HashMap<StateGraphItem, ActiveRules>();
- private ActionCodeAnalyzer codeAnalyzer;
- private HashMap<StateGraphItem, List<HandledMessage>> mapToWarnings = new HashMap<StateGraphItem, List<HandledMessage>>();
- private static boolean traceChecks = false;
- private static int traceLevel = 0;
- static {
- if (Activator.getDefault().isDebugging()) {
- String value = Platform.getDebugOption("org.eclipse.etrice.abstractexec.behavior/trace/checks");
- if (value != null && value.equalsIgnoreCase(Boolean.toString(true))) {
- traceChecks = true;
- }
- value = Platform.getDebugOption("org.eclipse.etrice.abstractexec.behavior/trace/checks/level");
- if (value != null) {
- traceLevel = Integer.parseInt(value);
- }
- }
- }
-
- private static final int TRACE_RESULT = 1;
- private static final int TRACE_DETAILS = 2;
-
- public SemanticsCheck(ExpandedActorClass xpac) {
- queue = new LinkedList<StateGraphNode>();
- xpAct = xpac;
- visited = new HashSet<StateGraphNode>();
- codeAnalyzer = new ActionCodeAnalyzer(xpac.getActorClass());
- }
-
- public void checkSemantics() {
- if (traceChecks)
- System.out.println("checkSemantics: check of ActorClass "+xpAct.getActorClass().getName());
-
- StateGraph graph = xpAct.getStateMachine();
- ActiveRules localRules = new ActiveRules();
- localRules.buildInitLocalRules(xpAct);
- addStartingPoints(graph, localRules);
- doTraversal();
-
- if (traceChecks) {
- if (traceLevel>=TRACE_RESULT)
- printRules();
-
- System.out.println("checkSemantics: done with check of ActorClass "+xpAct.getActorClass().getName());
- }
- }
-
- private void addStartingPoints(StateGraph graph, ActiveRules localRules) {
- EList<Transition> transitions = graph.getTransitions();
- for (Transition trans : transitions)
- if (trans instanceof InitialTransition) {
- StateGraphNode cur = RoomHelpers.getNode(trans.getTo());
- List<HandledMessage> msgList = codeAnalyzer.analyze(trans.getAction());
- if (cur instanceof State) {
- msgList.addAll(codeAnalyzer.analyze(((State) cur).getEntryCode()));
- }
- List<HandledMessage> wrongMsgList = localRules.consumeMessages(msgList);
- addToWarning(trans, wrongMsgList);
- boolean rulesChanged = false;
- if (mapToRules.containsKey(cur)) {
- rulesChanged = mapToRules.get(cur).merge(localRules);
- } else {
- mapToRules.put(cur, localRules);
- rulesChanged = true;
- }
- if (!visited.contains(cur) || rulesChanged)
- queue.add(cur);
-
- break;
- }
- }
-
- private void doTraversal() {
- while (!queue.isEmpty()) {
- Visit(queue.poll());
- }
- }
-
- private void Visit(StateGraphNode node) {
- visited.add(node);
- if (node instanceof State) {
- State st = (State) node;
- if (RoomHelpers.hasDirectSubStructure(st)) {
- addStartingPoints(st.getSubgraph(), mapToRules.get(st));
- }
- else {
- for (ActiveTrigger trigger : xpAct.getActiveTriggers(st)) {
- if (traceChecks && traceLevel>=TRACE_DETAILS) {
- System.out.println(" Currently visiting: " + st.getName());
- System.out.println(" Trigger: " + trigger.getMsg().getName());
- }
-
- for (Transition trans : trigger.getTransitions()) {
- StateGraphNode target = RoomHelpers.getNode(trans.getTo());
- List<HandledMessage> msgList = new LinkedList<HandledMessage>();
- // create a list of codes here in the order
- // trigger, exit, action, entry
- msgList.add(new HandledMessage(trigger.getIfitem(), trigger.getMsg(), trigger));
- StateGraph triggerContext = (StateGraph) trans.eContainer();
- State exitCalled = st;
- while (true) {
- // this is where all the exit code is added
- msgList.addAll(codeAnalyzer.analyze(exitCalled.getExitCode()));
- if (exitCalled.eContainer() == triggerContext)
- break;
- exitCalled = (State) exitCalled.eContainer().eContainer();
- }
- msgList.addAll(codeAnalyzer.analyze(trans.getAction()));
- if (target instanceof State) {
- msgList.addAll(codeAnalyzer.analyze(((State) target).getEntryCode()));
- }
- ActiveRules tempRule = mapToRules.get(node).createCopy();
-
- if (traceChecks && traceLevel>=TRACE_DETAILS) {
- System.out.println(" Messages in msglist before consuming: ");
- for (HandledMessage msg : msgList) {
- System.out.println(" Msg: "+ msg.getMsg().getName());
- }
- }
- if (traceChecks && traceLevel>=TRACE_DETAILS) {
- System.out.println(" rules before consuming message list : ");
- printRules();
- }
- List<HandledMessage> wrongMsgList = tempRule.consumeMessages(msgList);
- addToWarning(node, wrongMsgList);
-
- if (traceChecks && traceLevel>=TRACE_DETAILS)
- System.out.println(" Messages consumed");
-
- addAndMergeRules(target, tempRule);
-
- if (traceChecks && traceLevel>=TRACE_DETAILS) {
- System.out.println(" rules after consuming and merging message list : ");
- printRules();
- }
-
- }
- }
- }
- } else {
- /*
- * If the current node is an Entry/Exit/Transition/Choice pt , then
- * only the action code in the outgoing transition needs to be
- * considered For this, a copy of the ActiveRules of the current
- * node is created and is checked against each outgoing transition
- * for Rule changes If there is any rule change or if the
- * destination state hasn't been visited then the destination rules
- * are merged with the current rules and destination node is added
- * to the current queue.
- */
- for (Transition trans : xpAct.getOutgoingTransitions(node)) {
- ActiveRules tempRule = mapToRules.get(node).createCopy();
- List<HandledMessage> msgList = codeAnalyzer.analyze(trans.getAction());
- StateGraphNode target = RoomHelpers.getNode(trans.getTo());
- if (target instanceof State) {
- msgList.addAll(codeAnalyzer.analyze(((State) target).getEntryCode()));
- }
- List<HandledMessage> wrongMsgList = tempRule.consumeMessages(msgList);
- addToWarning(node, wrongMsgList);
- addAndMergeRules(target, tempRule);
- }
- }
- }
-
- private void addToWarning(StateGraphItem item,
- List<HandledMessage> wrongMsgList) {
- if (mapToWarnings.containsKey(item)) {
- mapToWarnings.get(item).addAll(wrongMsgList);
- } else {
- mapToWarnings.put(item, wrongMsgList);
- }
- }
- private void addAndMergeRules(StateGraphNode target, ActiveRules tempRule) {
- boolean rulesChanged = false;
- if (mapToRules.containsKey(target)) {
- rulesChanged = mapToRules.get(target).merge(tempRule);
- } else {
- mapToRules.put(target, tempRule);
- rulesChanged = true;
- }
- if (!visited.contains(target) || rulesChanged) {
- queue.add(target);
- }
-
- }
-
- public void printRules() {
- System.out.println(" Current Rules: ");
- System.out.println(" MapToRules size: " + this.mapToRules.size());
- for (StateGraphItem item : this.mapToRules.keySet()) {
- System.out.println(" Rules for " + item.getName() + " : ");
- mapToRules.get(item).print();
- }
- }
-
- public ActiveRules getActiveRules(StateGraphItem item) {
- return mapToRules.get(item);
- }
- public List<HandledMessage> getWarningMsg (StateGraphItem item)
- {
- return mapToWarnings.get(item);
- }
-}
+/******************************************************************************* + * Copyright (c) 2012 Rohit Agrawal + * 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: + * Rohit Agrawal (initial contribution) + * + *******************************************************************************/ + + +package org.eclipse.etrice.abstractexec.behavior; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import java.util.Set; + +import org.eclipse.core.runtime.Platform; +import org.eclipse.emf.common.util.EList; +import org.eclipse.etrice.core.genmodel.etricegen.ActiveTrigger; +import org.eclipse.etrice.core.genmodel.etricegen.ExpandedActorClass; +import org.eclipse.etrice.core.room.InitialTransition; +import org.eclipse.etrice.core.room.State; +import org.eclipse.etrice.core.room.StateGraph; +import org.eclipse.etrice.core.room.StateGraphItem; +import org.eclipse.etrice.core.room.StateGraphNode; +import org.eclipse.etrice.core.room.Transition; +import org.eclipse.etrice.core.room.util.RoomHelpers; + +public class SemanticsCheck { + private Queue<StateGraphNode> queue; + private Set<StateGraphNode> visited; + private ExpandedActorClass xpAct; + private HashMap<StateGraphItem, ActiveRules> mapToRules = new HashMap<StateGraphItem, ActiveRules>(); + private ActionCodeAnalyzer codeAnalyzer; + private HashMap<StateGraphItem, List<HandledMessage>> mapToWarnings = new HashMap<StateGraphItem, List<HandledMessage>>(); + private static boolean traceChecks = false; + private static int traceLevel = 0; + static { + if (Activator.getDefault().isDebugging()) { + String value = Platform.getDebugOption("org.eclipse.etrice.abstractexec.behavior/trace/checks"); + if (value != null && value.equalsIgnoreCase(Boolean.toString(true))) { + traceChecks = true; + } + value = Platform.getDebugOption("org.eclipse.etrice.abstractexec.behavior/trace/checks/level"); + if (value != null) { + traceLevel = Integer.parseInt(value); + } + } + } + + private static final int TRACE_RESULT = 1; + private static final int TRACE_DETAILS = 2; + + public SemanticsCheck(ExpandedActorClass xpac) { + queue = new LinkedList<StateGraphNode>(); + xpAct = xpac; + visited = new HashSet<StateGraphNode>(); + codeAnalyzer = new ActionCodeAnalyzer(xpac.getActorClass()); + } + + public void checkSemantics() { + if (traceChecks) + System.out.println("checkSemantics: check of ActorClass "+xpAct.getActorClass().getName()); + + StateGraph graph = xpAct.getStateMachine(); + ActiveRules localRules = new ActiveRules(); + localRules.buildInitLocalRules(xpAct); + addStartingPoints(graph, localRules); + doTraversal(); + + if (traceChecks) { + if (traceLevel>=TRACE_RESULT) + printRules(); + + System.out.println("checkSemantics: done with check of ActorClass "+xpAct.getActorClass().getName()); + } + } + + private void addStartingPoints(StateGraph graph, ActiveRules localRules) { + EList<Transition> transitions = graph.getTransitions(); + for (Transition trans : transitions) + if (trans instanceof InitialTransition) { + StateGraphNode cur = RoomHelpers.getNode(trans.getTo()); + List<HandledMessage> msgList = codeAnalyzer.analyze(trans.getAction()); + if (cur instanceof State) { + msgList.addAll(codeAnalyzer.analyze(((State) cur).getEntryCode())); + } + List<HandledMessage> wrongMsgList = localRules.consumeMessages(msgList); + addToWarning(trans, wrongMsgList); + boolean rulesChanged = false; + if (mapToRules.containsKey(cur)) { + rulesChanged = mapToRules.get(cur).merge(localRules); + } else { + mapToRules.put(cur, localRules); + rulesChanged = true; + } + if (!visited.contains(cur) || rulesChanged) + queue.add(cur); + + break; + } + } + + private void doTraversal() { + while (!queue.isEmpty()) { + Visit(queue.poll()); + } + } + + private void Visit(StateGraphNode node) { + visited.add(node); + if (node instanceof State) { + State st = (State) node; + if (RoomHelpers.hasDirectSubStructure(st)) { + addStartingPoints(st.getSubgraph(), mapToRules.get(st)); + } + else { + for (ActiveTrigger trigger : xpAct.getActiveTriggers(st)) { + if (traceChecks && traceLevel>=TRACE_DETAILS) { + System.out.println(" Currently visiting: " + st.getName()); + System.out.println(" Trigger: " + trigger.getMsg().getName()); + } + + for (Transition trans : trigger.getTransitions()) { + StateGraphNode target = RoomHelpers.getNode(trans.getTo()); + List<HandledMessage> msgList = new LinkedList<HandledMessage>(); + // create a list of codes here in the order + // trigger, exit, action, entry + msgList.add(new HandledMessage(trigger.getIfitem(), trigger.getMsg(), trigger)); + StateGraph triggerContext = (StateGraph) trans.eContainer(); + State exitCalled = st; + while (true) { + // this is where all the exit code is added + msgList.addAll(codeAnalyzer.analyze(exitCalled.getExitCode())); + if (exitCalled.eContainer() == triggerContext) + break; + exitCalled = (State) exitCalled.eContainer().eContainer(); + } + msgList.addAll(codeAnalyzer.analyze(trans.getAction())); + if (target instanceof State) { + msgList.addAll(codeAnalyzer.analyze(((State) target).getEntryCode())); + } + ActiveRules tempRule = mapToRules.get(node).createCopy(); + + if (traceChecks && traceLevel>=TRACE_DETAILS) { + System.out.println(" Messages in msglist before consuming: "); + for (HandledMessage msg : msgList) { + System.out.println(" Msg: "+ msg.getMsg().getName()); + } + } + if (traceChecks && traceLevel>=TRACE_DETAILS) { + System.out.println(" rules before consuming message list : "); + printRules(); + } + List<HandledMessage> wrongMsgList = tempRule.consumeMessages(msgList); + addToWarning(node, wrongMsgList); + + if (traceChecks && traceLevel>=TRACE_DETAILS) + System.out.println(" Messages consumed"); + + addAndMergeRules(target, tempRule); + + if (traceChecks && traceLevel>=TRACE_DETAILS) { + System.out.println(" rules after consuming and merging message list : "); + printRules(); + } + + } + } + } + } else { + /* + * If the current node is an Entry/Exit/Transition/Choice pt , then + * only the action code in the outgoing transition needs to be + * considered For this, a copy of the ActiveRules of the current + * node is created and is checked against each outgoing transition + * for Rule changes If there is any rule change or if the + * destination state hasn't been visited then the destination rules + * are merged with the current rules and destination node is added + * to the current queue. + */ + for (Transition trans : xpAct.getOutgoingTransitions(node)) { + ActiveRules tempRule = mapToRules.get(node).createCopy(); + List<HandledMessage> msgList = codeAnalyzer.analyze(trans.getAction()); + StateGraphNode target = RoomHelpers.getNode(trans.getTo()); + if (target instanceof State) { + msgList.addAll(codeAnalyzer.analyze(((State) target).getEntryCode())); + } + List<HandledMessage> wrongMsgList = tempRule.consumeMessages(msgList); + addToWarning(node, wrongMsgList); + addAndMergeRules(target, tempRule); + } + } + } + + private void addToWarning(StateGraphItem item, + List<HandledMessage> wrongMsgList) { + if (mapToWarnings.containsKey(item)) { + mapToWarnings.get(item).addAll(wrongMsgList); + } else { + mapToWarnings.put(item, wrongMsgList); + } + } + private void addAndMergeRules(StateGraphNode target, ActiveRules tempRule) { + boolean rulesChanged = false; + if (mapToRules.containsKey(target)) { + rulesChanged = mapToRules.get(target).merge(tempRule); + } else { + mapToRules.put(target, tempRule); + rulesChanged = true; + } + if (!visited.contains(target) || rulesChanged) { + queue.add(target); + } + + } + + public void printRules() { + System.out.println(" Current Rules: "); + System.out.println(" MapToRules size: " + this.mapToRules.size()); + for (StateGraphItem item : this.mapToRules.keySet()) { + System.out.println(" Rules for " + item.getName() + " : "); + mapToRules.get(item).print(); + } + } + + public ActiveRules getActiveRules(StateGraphItem item) { + return mapToRules.get(item); + } + public List<HandledMessage> getWarningMsg (StateGraphItem item) + { + return mapToWarnings.get(item); + } +} diff --git a/plugins/org.eclipse.etrice.core.config.ui/.classpath b/plugins/org.eclipse.etrice.core.config.ui/.classpath index c59891c4d..6c8f56046 100644 --- a/plugins/org.eclipse.etrice.core.config.ui/.classpath +++ b/plugins/org.eclipse.etrice.core.config.ui/.classpath @@ -1,12 +1,12 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="src-gen"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
- <accessrules>
- <accessrule kind="accessible" pattern="org/eclipse/xtext/ui/codetemplates/ui/partialEditing/IPartialContentAssistParser"/>
- </accessrules>
- </classpathentry>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src"/> + <classpathentry kind="src" path="src-gen"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"> + <accessrules> + <accessrule kind="accessible" pattern="org/eclipse/xtext/ui/codetemplates/ui/partialEditing/IPartialContentAssistParser"/> + </accessrules> + </classpathentry> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/plugins/org.eclipse.etrice.core.config.ui/.gitignore b/plugins/org.eclipse.etrice.core.config.ui/.gitignore index 092357e47..ba077a403 100644 --- a/plugins/org.eclipse.etrice.core.config.ui/.gitignore +++ b/plugins/org.eclipse.etrice.core.config.ui/.gitignore @@ -1 +1 @@ -bin
+bin diff --git a/plugins/org.eclipse.etrice.core.config.ui/.project b/plugins/org.eclipse.etrice.core.config.ui/.project index 4a42e8ec7..1f147cb79 100644 --- a/plugins/org.eclipse.etrice.core.config.ui/.project +++ b/plugins/org.eclipse.etrice.core.config.ui/.project @@ -1,28 +1,28 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.etrice.core.config.ui</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.etrice.core.config.ui</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.ManifestBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.SchemaBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.eclipse.pde.PluginNature</nature> + </natures> +</projectDescription> diff --git a/plugins/org.eclipse.etrice.core.config.ui/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.etrice.core.config.ui/.settings/org.eclipse.jdt.core.prefs index f287d53cf..c537b6306 100644 --- a/plugins/org.eclipse.etrice.core.config.ui/.settings/org.eclipse.jdt.core.prefs +++ b/plugins/org.eclipse.etrice.core.config.ui/.settings/org.eclipse.jdt.core.prefs @@ -1,7 +1,7 @@ -eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
+eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/plugins/org.eclipse.etrice.core.config.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.etrice.core.config.ui/META-INF/MANIFEST.MF index ebfefc8b1..b6a0ca62a 100644 --- a/plugins/org.eclipse.etrice.core.config.ui/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.etrice.core.config.ui/META-INF/MANIFEST.MF @@ -1,27 +1,27 @@ -Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: eTrice Config DSL UI
-Bundle-Vendor: Eclipse eTrice (Incubation)
-Bundle-Version: 0.3.0.qualifier
-Bundle-SymbolicName: org.eclipse.etrice.core.config.ui; singleton:=true
-Bundle-ActivationPolicy: lazy
-Require-Bundle: org.eclipse.etrice.core.config;bundle-version="0.3.0";visibility:=reexport,
- org.eclipse.xtext.ui;bundle-version="2.1.1",
- org.eclipse.ui.editors;bundle-version="3.5.0",
- org.eclipse.ui.ide;bundle-version="3.5.0",
- org.eclipse.xtext.ui.shared;bundle-version="2.1.1",
- org.eclipse.ui,
- org.eclipse.xtext.builder;bundle-version="2.1.1",
- org.antlr.runtime,
- org.eclipse.xtext.common.types.ui;bundle-version="2.1.1",
- org.eclipse.xtext.ui.codetemplates.ui;bundle-version="2.1.1",
- org.eclipse.compare,
- org.eclipse.etrice.core.room.ui;bundle-version="0.3.0"
-Import-Package: org.apache.log4j,
- org.apache.commons.logging
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Export-Package: org.eclipse.etrice.core.ui.contentassist.antlr,
- org.eclipse.etrice.core.ui.internal,
- org.eclipse.etrice.core.ui.contentassist,
- org.eclipse.etrice.core.ui.quickfix
-Bundle-Activator: org.eclipse.etrice.core.ui.internal.ConfigActivator
+Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: eTrice Config DSL UI +Bundle-Vendor: Eclipse eTrice (Incubation) +Bundle-Version: 0.3.0.qualifier +Bundle-SymbolicName: org.eclipse.etrice.core.config.ui; singleton:=true +Bundle-ActivationPolicy: lazy +Require-Bundle: org.eclipse.etrice.core.config;bundle-version="0.3.0";visibility:=reexport, + org.eclipse.xtext.ui;bundle-version="2.1.1", + org.eclipse.ui.editors;bundle-version="3.5.0", + org.eclipse.ui.ide;bundle-version="3.5.0", + org.eclipse.xtext.ui.shared;bundle-version="2.1.1", + org.eclipse.ui, + org.eclipse.xtext.builder;bundle-version="2.1.1", + org.antlr.runtime, + org.eclipse.xtext.common.types.ui;bundle-version="2.1.1", + org.eclipse.xtext.ui.codetemplates.ui;bundle-version="2.1.1", + org.eclipse.compare, + org.eclipse.etrice.core.room.ui;bundle-version="0.3.0" +Import-Package: org.apache.log4j, + org.apache.commons.logging +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Export-Package: org.eclipse.etrice.core.ui.contentassist.antlr, + org.eclipse.etrice.core.ui.internal, + org.eclipse.etrice.core.ui.contentassist, + org.eclipse.etrice.core.ui.quickfix +Bundle-Activator: org.eclipse.etrice.core.ui.internal.ConfigActivator diff --git a/plugins/org.eclipse.etrice.core.config.ui/about.html b/plugins/org.eclipse.etrice.core.config.ui/about.html index 82d49bf5f..d35d5aed6 100644 --- a/plugins/org.eclipse.etrice.core.config.ui/about.html +++ b/plugins/org.eclipse.etrice.core.config.ui/about.html @@ -1,28 +1,28 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2007</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, "Program" will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party ("Redistributor") and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> +<title>About</title> +</head> +<body lang="EN-US"> +<h2>About This Content</h2> + +<p>June 5, 2007</p> +<h3>License</h3> + +<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available +at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. +For purposes of the EPL, "Program" will mean the Content.</p> + +<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") and different terms and conditions may +apply to your use of any object code in the Content. Check the Redistributor's license that was +provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise +indicated below, the terms and conditions of the EPL still apply to any source code in the Content +and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p> + +</body> +</html> diff --git a/plugins/org.eclipse.etrice.core.config.ui/build.properties b/plugins/org.eclipse.etrice.core.config.ui/build.properties index de48124aa..e10dcceb6 100644 --- a/plugins/org.eclipse.etrice.core.config.ui/build.properties +++ b/plugins/org.eclipse.etrice.core.config.ui/build.properties @@ -1,5 +1,5 @@ -source.. = src/,\
- src-gen/
-bin.includes = META-INF/,\
- .,\
+source.. = src/,\ + src-gen/ +bin.includes = META-INF/,\ + .,\ plugin.xml
\ No newline at end of file diff --git a/plugins/org.eclipse.etrice.core.config.ui/plugin.xml b/plugins/org.eclipse.etrice.core.config.ui/plugin.xml index 248457e52..ae1fb2b6e 100644 --- a/plugins/org.eclipse.etrice.core.config.ui/plugin.xml +++ b/plugins/org.eclipse.etrice.core.config.ui/plugin.xml @@ -1,281 +1,281 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-
-<plugin>
-
- <extension
- point="org.eclipse.ui.editors">
- <editor
- class="org.eclipse.etrice.core.ui.ConfigExecutableExtensionFactory:org.eclipse.xtext.ui.editor.XtextEditor"
- contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
- default="true"
- extensions="config"
- icon="icons/config_icon.gif"
- id="org.eclipse.etrice.core.Config"
- name="Config Editor">
- </editor>
- </extension>
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.etrice.core.ui.ConfigExecutableExtensionFactory:org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclarationHandler"
- commandId="org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclaration">
- <activeWhen>
- <reference
- definitionId="org.eclipse.etrice.core.Config.Editor.opened">
- </reference>
- </activeWhen>
- </handler>
- <handler
- class="org.eclipse.etrice.core.ui.ConfigExecutableExtensionFactory:org.eclipse.xtext.ui.editor.handler.ValidateActionHandler"
- commandId="org.eclipse.etrice.core.Config.validate">
- <activeWhen>
- <reference
- definitionId="org.eclipse.etrice.core.Config.Editor.opened">
- </reference>
- </activeWhen>
- </handler>
- </extension>
- <extension point="org.eclipse.core.expressions.definitions">
- <definition id="org.eclipse.etrice.core.Config.Editor.opened">
- <and>
- <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
- <with variable="activeEditor">
- <test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName"
- value="org.eclipse.etrice.core.Config"
- forcePluginActivation="true"/>
- </with>
- </and>
- </definition>
- </extension>
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- category="org.eclipse.etrice.ui.common.preferences.ETricePreferencePage"
- class="org.eclipse.etrice.core.ui.ConfigExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
- id="org.eclipse.etrice.core.Config"
- name="Config">
- <keywordReference id="org.eclipse.etrice.core.ui.keyword_Config"/>
- </page>
- <page
- category="org.eclipse.etrice.core.Config"
- class="org.eclipse.etrice.core.ui.ConfigExecutableExtensionFactory:org.eclipse.xtext.ui.editor.syntaxcoloring.SyntaxColoringPreferencePage"
- id="org.eclipse.etrice.core.Config.coloring"
- name="Syntax Coloring">
- <keywordReference id="org.eclipse.etrice.core.ui.keyword_Config"/>
- </page>
- <page
- category="org.eclipse.etrice.core.Config"
- class="org.eclipse.etrice.core.ui.ConfigExecutableExtensionFactory:org.eclipse.xtext.ui.editor.templates.XtextTemplatePreferencePage"
- id="org.eclipse.etrice.core.Config.templates"
- name="Templates">
- <keywordReference id="org.eclipse.etrice.core.ui.keyword_Config"/>
- </page>
- </extension>
- <!--
- <extension
- point="org.eclipse.ui.propertyPages">
- <page
- class="org.eclipse.etrice.core.ui.ConfigExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
- id="org.eclipse.etrice.core.Config"
- name="Config">
- <keywordReference id="org.eclipse.etrice.core.ui.keyword_Config"/>
- <enabledWhen>
- <adapt type="org.eclipse.core.resources.IProject"/>
- </enabledWhen>
- <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/>
- </page>
- </extension>
- -->
- <extension
- point="org.eclipse.ui.keywords">
- <keyword
- id="org.eclipse.etrice.core.ui.keyword_Config"
- label="Config"/>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <command
- description="Trigger expensive validation"
- id="org.eclipse.etrice.core.Config.validate"
- name="Validate">
- </command>
- </extension>
- <extension point="org.eclipse.ui.menus">
- <menuContribution
- locationURI="popup:#TextEditorContext?after=group.edit">
- <command
- commandId="org.eclipse.etrice.core.Config.validate"
- style="push"
- tooltip="Trigger expensive validation">
- <visibleWhen checkEnabled="false">
- <reference
- definitionId="org.eclipse.etrice.core.Config.Editor.opened">
- </reference>
- </visibleWhen>
- </command>
- </menuContribution>
- </extension>
- <extension point="org.eclipse.ui.menus">
- <menuContribution locationURI="popup:#TextEditorContext?endof=group.find">
- <command commandId="org.eclipse.xtext.ui.editor.FindReferences">
- <visibleWhen checkEnabled="false">
- <reference definitionId="org.eclipse.etrice.core.Config.Editor.opened">
- </reference>
- </visibleWhen>
- </command>
- </menuContribution>
- </extension>
- <extension point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.etrice.core.ui.ConfigExecutableExtensionFactory:org.eclipse.xtext.ui.editor.findrefs.FindReferencesHandler"
- commandId="org.eclipse.xtext.ui.editor.FindReferences">
- <activeWhen>
- <reference
- definitionId="org.eclipse.etrice.core.Config.Editor.opened">
- </reference>
- </activeWhen>
- </handler>
- </extension>
-
-<!-- adding resource factories -->
-
- <extension
- point="org.eclipse.emf.ecore.extension_parser">
- <parser
- class="org.eclipse.etrice.core.ui.ConfigExecutableExtensionFactory:org.eclipse.xtext.resource.IResourceFactory"
- type="config">
- </parser>
- </extension>
- <extension point="org.eclipse.xtext.extension_resourceServiceProvider">
- <resourceServiceProvider
- class="org.eclipse.etrice.core.ui.ConfigExecutableExtensionFactory:org.eclipse.xtext.ui.resource.IResourceUIServiceProvider"
- uriExtension="config">
- </resourceServiceProvider>
- </extension>
-
-
-
- <!--
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- category="org.eclipse.etrice.core.Config"
- class="org.eclipse.etrice.core.ui.ConfigExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage"
- id="org.eclipse.etrice.core.Config.compiler.preferencePage"
- name="Compiler">
- <keywordReference id="org.eclipse.etrice.core.ui.keyword_Config"/>
- </page>
- </extension>
- <extension
- point="org.eclipse.ui.propertyPages">
- <page
- category="org.eclipse.etrice.core.Config"
- class="org.eclipse.etrice.core.ui.ConfigExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage"
- id="org.eclipse.etrice.core.Config.compiler.propertyPage"
- name="Compiler">
- <keywordReference id="org.eclipse.etrice.core.ui.keyword_Config"/>
- <enabledWhen>
- <adapt type="org.eclipse.core.resources.IProject"/>
- </enabledWhen>
- <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/>
- </page>
- </extension>
- -->
-
- <!-- Quick Outline -->
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.etrice.core.ui.ConfigExecutableExtensionFactory:org.eclipse.xtext.ui.editor.outline.quickoutline.ShowQuickOutlineActionHandler"
- commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline">
- <activeWhen>
- <reference
- definitionId="org.eclipse.etrice.core.Config.Editor.opened">
- </reference>
- </activeWhen>
- </handler>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <command
- description="Open the quick outline."
- id="org.eclipse.xtext.ui.editor.outline.QuickOutline"
- name="Quick Outline">
- </command>
- </extension>
- <extension point="org.eclipse.ui.menus">
- <menuContribution
- locationURI="popup:#TextEditorContext?after=group.open">
- <command commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline"
- style="push"
- tooltip="Open Quick Outline">
- <visibleWhen checkEnabled="false">
- <reference definitionId="org.eclipse.etrice.core.Config.Editor.opened"/>
- </visibleWhen>
- </command>
- </menuContribution>
- </extension>
- <!-- quickfix marker resolution generator -->
- <extension
- point="org.eclipse.ui.ide.markerResolution">
- <markerResolutionGenerator
- class="org.eclipse.etrice.core.ui.ConfigExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator">
- </markerResolutionGenerator>
- </extension>
- <!-- Rename Refactoring -->
- <extension point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.etrice.core.ui.ConfigExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.IRenameElementHandler"
- commandId="org.eclipse.xtext.ui.refactoring.RenameElement">
- <activeWhen>
- <reference
- definitionId="org.eclipse.etrice.core.Config.Editor.opened">
- </reference>
- </activeWhen>
- </handler>
- </extension>
- <extension point="org.eclipse.ui.menus">
- <menuContribution
- locationURI="popup:#TextEditorContext?after=group.edit">
- <command commandId="org.eclipse.xtext.ui.refactoring.RenameElement"
- style="push">
- <visibleWhen checkEnabled="false">
- <reference
- definitionId="org.eclipse.etrice.core.Config.Editor.opened">
- </reference>
- </visibleWhen>
- </command>
- </menuContribution>
- </extension>
- <extension point="org.eclipse.ui.preferencePages">
- <page
- category="org.eclipse.etrice.core.Config"
- class="org.eclipse.etrice.core.ui.ConfigExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.RefactoringPreferencePage"
- id="org.eclipse.etrice.core.Config.refactoring"
- name="Refactoring">
- <keywordReference id="org.eclipse.etrice.core.ui.keyword_Config"/>
- </page>
- </extension>
-
-
- <extension point="org.eclipse.compare.contentViewers">
- <viewer id="org.eclipse.etrice.core.Config.compare.contentViewers"
- class="org.eclipse.etrice.core.ui.ConfigExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator"
- extensions="config">
- </viewer>
- </extension>
- <extension point="org.eclipse.compare.contentMergeViewers">
- <viewer id="org.eclipse.etrice.core.Config.compare.contentMergeViewers"
- class="org.eclipse.etrice.core.ui.ConfigExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator"
- extensions="config" label="Config Compare">
- </viewer>
- </extension>
- <extension point="org.eclipse.ui.editors.documentProviders">
- <provider id="org.eclipse.etrice.core.Config.editors.documentProviders"
- class="org.eclipse.etrice.core.ui.ConfigExecutableExtensionFactory:org.eclipse.xtext.ui.editor.model.XtextDocumentProvider"
- extensions="config">
- </provider>
- </extension>
-
-</plugin>
+<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> + +<plugin> + + <extension + point="org.eclipse.ui.editors"> + <editor + class="org.eclipse.etrice.core.ui.ConfigExecutableExtensionFactory:org.eclipse.xtext.ui.editor.XtextEditor" + contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor" + default="true" + extensions="config" + icon="icons/config_icon.gif" + id="org.eclipse.etrice.core.Config" + name="Config Editor"> + </editor> + </extension> + <extension + point="org.eclipse.ui.handlers"> + <handler + class="org.eclipse.etrice.core.ui.ConfigExecutableExtensionFactory:org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclarationHandler" + commandId="org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclaration"> + <activeWhen> + <reference + definitionId="org.eclipse.etrice.core.Config.Editor.opened"> + </reference> + </activeWhen> + </handler> + <handler + class="org.eclipse.etrice.core.ui.ConfigExecutableExtensionFactory:org.eclipse.xtext.ui.editor.handler.ValidateActionHandler" + commandId="org.eclipse.etrice.core.Config.validate"> + <activeWhen> + <reference + definitionId="org.eclipse.etrice.core.Config.Editor.opened"> + </reference> + </activeWhen> + </handler> + </extension> + <extension point="org.eclipse.core.expressions.definitions"> + <definition id="org.eclipse.etrice.core.Config.Editor.opened"> + <and> + <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/> + <with variable="activeEditor"> + <test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName" + value="org.eclipse.etrice.core.Config" + forcePluginActivation="true"/> + </with> + </and> + </definition> + </extension> + <extension + point="org.eclipse.ui.preferencePages"> + <page + category="org.eclipse.etrice.ui.common.preferences.ETricePreferencePage" + class="org.eclipse.etrice.core.ui.ConfigExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage" + id="org.eclipse.etrice.core.Config" + name="Config"> + <keywordReference id="org.eclipse.etrice.core.ui.keyword_Config"/> + </page> + <page + category="org.eclipse.etrice.core.Config" + class="org.eclipse.etrice.core.ui.ConfigExecutableExtensionFactory:org.eclipse.xtext.ui.editor.syntaxcoloring.SyntaxColoringPreferencePage" + id="org.eclipse.etrice.core.Config.coloring" + name="Syntax Coloring"> + <keywordReference id="org.eclipse.etrice.core.ui.keyword_Config"/> + </page> + <page + category="org.eclipse.etrice.core.Config" + class="org.eclipse.etrice.core.ui.ConfigExecutableExtensionFactory:org.eclipse.xtext.ui.editor.templates.XtextTemplatePreferencePage" + id="org.eclipse.etrice.core.Config.templates" + name="Templates"> + <keywordReference id="org.eclipse.etrice.core.ui.keyword_Config"/> + </page> + </extension> + <!-- + <extension + point="org.eclipse.ui.propertyPages"> + <page + class="org.eclipse.etrice.core.ui.ConfigExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage" + id="org.eclipse.etrice.core.Config" + name="Config"> + <keywordReference id="org.eclipse.etrice.core.ui.keyword_Config"/> + <enabledWhen> + <adapt type="org.eclipse.core.resources.IProject"/> + </enabledWhen> + <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/> + </page> + </extension> + --> + <extension + point="org.eclipse.ui.keywords"> + <keyword + id="org.eclipse.etrice.core.ui.keyword_Config" + label="Config"/> + </extension> + <extension + point="org.eclipse.ui.commands"> + <command + description="Trigger expensive validation" + id="org.eclipse.etrice.core.Config.validate" + name="Validate"> + </command> + </extension> + <extension point="org.eclipse.ui.menus"> + <menuContribution + locationURI="popup:#TextEditorContext?after=group.edit"> + <command + commandId="org.eclipse.etrice.core.Config.validate" + style="push" + tooltip="Trigger expensive validation"> + <visibleWhen checkEnabled="false"> + <reference + definitionId="org.eclipse.etrice.core.Config.Editor.opened"> + </reference> + </visibleWhen> + </command> + </menuContribution> + </extension> + <extension point="org.eclipse.ui.menus"> + <menuContribution locationURI="popup:#TextEditorContext?endof=group.find"> + <command commandId="org.eclipse.xtext.ui.editor.FindReferences"> + <visibleWhen checkEnabled="false"> + <reference definitionId="org.eclipse.etrice.core.Config.Editor.opened"> + </reference> + </visibleWhen> + </command> + </menuContribution> + </extension> + <extension point="org.eclipse.ui.handlers"> + <handler + class="org.eclipse.etrice.core.ui.ConfigExecutableExtensionFactory:org.eclipse.xtext.ui.editor.findrefs.FindReferencesHandler" + commandId="org.eclipse.xtext.ui.editor.FindReferences"> + <activeWhen> + <reference + definitionId="org.eclipse.etrice.core.Config.Editor.opened"> + </reference> + </activeWhen> + </handler> + </extension> + +<!-- adding resource factories --> + + <extension + point="org.eclipse.emf.ecore.extension_parser"> + <parser + class="org.eclipse.etrice.core.ui.ConfigExecutableExtensionFactory:org.eclipse.xtext.resource.IResourceFactory" + type="config"> + </parser> + </extension> + <extension point="org.eclipse.xtext.extension_resourceServiceProvider"> + <resourceServiceProvider + class="org.eclipse.etrice.core.ui.ConfigExecutableExtensionFactory:org.eclipse.xtext.ui.resource.IResourceUIServiceProvider" + uriExtension="config"> + </resourceServiceProvider> + </extension> + + + + <!-- + <extension + point="org.eclipse.ui.preferencePages"> + <page + category="org.eclipse.etrice.core.Config" + class="org.eclipse.etrice.core.ui.ConfigExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage" + id="org.eclipse.etrice.core.Config.compiler.preferencePage" + name="Compiler"> + <keywordReference id="org.eclipse.etrice.core.ui.keyword_Config"/> + </page> + </extension> + <extension + point="org.eclipse.ui.propertyPages"> + <page + category="org.eclipse.etrice.core.Config" + class="org.eclipse.etrice.core.ui.ConfigExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage" + id="org.eclipse.etrice.core.Config.compiler.propertyPage" + name="Compiler"> + <keywordReference id="org.eclipse.etrice.core.ui.keyword_Config"/> + <enabledWhen> + <adapt type="org.eclipse.core.resources.IProject"/> + </enabledWhen> + <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/> + </page> + </extension> + --> + + <!-- Quick Outline --> + <extension + point="org.eclipse.ui.handlers"> + <handler + class="org.eclipse.etrice.core.ui.ConfigExecutableExtensionFactory:org.eclipse.xtext.ui.editor.outline.quickoutline.ShowQuickOutlineActionHandler" + commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline"> + <activeWhen> + <reference + definitionId="org.eclipse.etrice.core.Config.Editor.opened"> + </reference> + </activeWhen> + </handler> + </extension> + <extension + point="org.eclipse.ui.commands"> + <command + description="Open the quick outline." + id="org.eclipse.xtext.ui.editor.outline.QuickOutline" + name="Quick Outline"> + </command> + </extension> + <extension point="org.eclipse.ui.menus"> + <menuContribution + locationURI="popup:#TextEditorContext?after=group.open"> + <command commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline" + style="push" + tooltip="Open Quick Outline"> + <visibleWhen checkEnabled="false"> + <reference definitionId="org.eclipse.etrice.core.Config.Editor.opened"/> + </visibleWhen> + </command> + </menuContribution> + </extension> + <!-- quickfix marker resolution generator --> + <extension + point="org.eclipse.ui.ide.markerResolution"> + <markerResolutionGenerator + class="org.eclipse.etrice.core.ui.ConfigExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"> + </markerResolutionGenerator> + </extension> + <!-- Rename Refactoring --> + <extension point="org.eclipse.ui.handlers"> + <handler + class="org.eclipse.etrice.core.ui.ConfigExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.IRenameElementHandler" + commandId="org.eclipse.xtext.ui.refactoring.RenameElement"> + <activeWhen> + <reference + definitionId="org.eclipse.etrice.core.Config.Editor.opened"> + </reference> + </activeWhen> + </handler> + </extension> + <extension point="org.eclipse.ui.menus"> + <menuContribution + locationURI="popup:#TextEditorContext?after=group.edit"> + <command commandId="org.eclipse.xtext.ui.refactoring.RenameElement" + style="push"> + <visibleWhen checkEnabled="false"> + <reference + definitionId="org.eclipse.etrice.core.Config.Editor.opened"> + </reference> + </visibleWhen> + </command> + </menuContribution> + </extension> + <extension point="org.eclipse.ui.preferencePages"> + <page + category="org.eclipse.etrice.core.Config" + class="org.eclipse.etrice.core.ui.ConfigExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.RefactoringPreferencePage" + id="org.eclipse.etrice.core.Config.refactoring" + name="Refactoring"> + <keywordReference id="org.eclipse.etrice.core.ui.keyword_Config"/> + </page> + </extension> + + + <extension point="org.eclipse.compare.contentViewers"> + <viewer id="org.eclipse.etrice.core.Config.compare.contentViewers" + class="org.eclipse.etrice.core.ui.ConfigExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator" + extensions="config"> + </viewer> + </extension> + <extension point="org.eclipse.compare.contentMergeViewers"> + <viewer id="org.eclipse.etrice.core.Config.compare.contentMergeViewers" + class="org.eclipse.etrice.core.ui.ConfigExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator" + extensions="config" label="Config Compare"> + </viewer> + </extension> + <extension point="org.eclipse.ui.editors.documentProviders"> + <provider id="org.eclipse.etrice.core.Config.editors.documentProviders" + class="org.eclipse.etrice.core.ui.ConfigExecutableExtensionFactory:org.eclipse.xtext.ui.editor.model.XtextDocumentProvider" + extensions="config"> + </provider> + </extension> + +</plugin> diff --git a/plugins/org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.tokens b/plugins/org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.tokens index 39c8e1079..daaf307b8 100644 --- a/plugins/org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.tokens +++ b/plugins/org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.tokens @@ -1,75 +1,75 @@ -RULE_ID=5
-RULE_EXP=7
-T__29=29
-T__28=28
-T__27=27
-T__26=26
-T__25=25
-T__24=24
-T__23=23
-T__22=22
-RULE_ANY_OTHER=12
-T__21=21
-T__20=20
-T__19=19
-RULE_HEX=4
-T__16=16
-T__15=15
-T__18=18
-T__17=17
-T__14=14
-T__13=13
-RULE_INT=6
-T__42=42
-T__43=43
-T__40=40
-T__41=41
-T__44=44
-T__45=45
-RULE_SL_COMMENT=10
-RULE_ML_COMMENT=9
-T__30=30
-T__31=31
-T__32=32
-RULE_STRING=8
-T__33=33
-T__34=34
-T__35=35
-T__36=36
-T__37=37
-T__38=38
-T__39=39
-RULE_WS=11
-'Attr'=35
-'/'=22
-'model'=14
-'user import'=25
-'user constructor'=26
-'.*'=41
-'conjugate'=32
-'='=36
-'Port'=33
-'InterfaceItem'=34
-'+'=16
-'ConfigModel'=18
-'.'=42
-'ProtocolClassConfig'=30
-'regular'=31
-'max'=38
-'import'=39
-'true'=45
-'}'=20
-'SubSystemConfig'=21
-'ActorClassConfig'=28
-'polling timer [ms]'=27
-'dynamic configuration'=23
-'{'=19
-'write'=13
-'ActorInstanceConfig'=29
-'false'=15
-'-'=17
-'min'=37
-','=43
-'read'=44
-'file path'=24
-'from'=40
+RULE_ID=5 +RULE_EXP=7 +T__29=29 +T__28=28 +T__27=27 +T__26=26 +T__25=25 +T__24=24 +T__23=23 +T__22=22 +RULE_ANY_OTHER=12 +T__21=21 +T__20=20 +T__19=19 +RULE_HEX=4 +T__16=16 +T__15=15 +T__18=18 +T__17=17 +T__14=14 +T__13=13 +RULE_INT=6 +T__42=42 +T__43=43 +T__40=40 +T__41=41 +T__44=44 +T__45=45 +RULE_SL_COMMENT=10 +RULE_ML_COMMENT=9 +T__30=30 +T__31=31 +T__32=32 +RULE_STRING=8 +T__33=33 +T__34=34 +T__35=35 +T__36=36 +T__37=37 +T__38=38 +T__39=39 +RULE_WS=11 +'Attr'=35 +'/'=22 +'model'=14 +'user import'=25 +'user constructor'=26 +'.*'=41 +'conjugate'=32 +'='=36 +'Port'=33 +'InterfaceItem'=34 +'+'=16 +'ConfigModel'=18 +'.'=42 +'ProtocolClassConfig'=30 +'regular'=31 +'max'=38 +'import'=39 +'true'=45 +'}'=20 +'SubSystemConfig'=21 +'ActorClassConfig'=28 +'polling timer [ms]'=27 +'dynamic configuration'=23 +'{'=19 +'write'=13 +'ActorInstanceConfig'=29 +'false'=15 +'-'=17 +'min'=37 +','=43 +'read'=44 +'file path'=24 +'from'=40 diff --git a/plugins/org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfigLexer.java b/plugins/org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfigLexer.java index b8660d902..c0d8f30c1 100644 --- a/plugins/org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfigLexer.java +++ b/plugins/org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfigLexer.java @@ -1,2195 +1,2195 @@ -package org.eclipse.etrice.core.ui.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.ui.editor.contentassist.antlr.internal.Lexer;
-
-
-import org.antlr.runtime.*;
-import java.util.Stack;
-import java.util.List;
-import java.util.ArrayList;
-
+package org.eclipse.etrice.core.ui.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.ui.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 InternalConfigLexer extends Lexer {
- public static final int RULE_ID=5;
- public static final int RULE_EXP=7;
- public static final int T__29=29;
- public static final int T__28=28;
- public static final int T__27=27;
- public static final int T__26=26;
- public static final int T__25=25;
- public static final int T__24=24;
- public static final int T__23=23;
- public static final int T__22=22;
- public static final int T__21=21;
- public static final int RULE_ANY_OTHER=12;
- public static final int T__20=20;
- public static final int EOF=-1;
- public static final int T__19=19;
- public static final int RULE_HEX=4;
- public static final int T__16=16;
- public static final int T__15=15;
- public static final int T__18=18;
- public static final int T__17=17;
- public static final int T__14=14;
- public static final int T__13=13;
- public static final int RULE_INT=6;
- public static final int T__42=42;
- public static final int T__43=43;
- public static final int T__40=40;
- public static final int T__41=41;
- public static final int T__44=44;
- public static final int T__45=45;
- public static final int RULE_SL_COMMENT=10;
- public static final int RULE_ML_COMMENT=9;
- 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_STRING=8;
- public static final int T__33=33;
- public static final int T__34=34;
- public static final int T__35=35;
- public static final int T__36=36;
- public static final int T__37=37;
- public static final int T__38=38;
- public static final int T__39=39;
- public static final int RULE_WS=11;
-
- // delegates
- // delegators
-
- public InternalConfigLexer() {;}
- public InternalConfigLexer(CharStream input) {
- this(input, new RecognizerSharedState());
- }
- public InternalConfigLexer(CharStream input, RecognizerSharedState state) {
- super(input,state);
-
- }
- public String getGrammarFileName() { return "../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g"; }
-
- // $ANTLR start "T__13"
- public final void mT__13() throws RecognitionException {
- try {
- int _type = T__13;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:11:7: ( 'write' )
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:11:9: 'write'
- {
- match("write");
-
-
- }
-
- 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;
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:12:7: ( 'model' )
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:12:9: 'model'
- {
- match("model");
-
-
- }
-
- 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;
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:13:7: ( 'false' )
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:13:9: 'false'
- {
- match("false");
-
-
- }
-
- 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;
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:14:7: ( '+' )
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:14:9: '+'
- {
- match('+');
-
- }
-
- 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;
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:15:7: ( '-' )
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.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;
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:16:7: ( 'ConfigModel' )
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:16:9: 'ConfigModel'
- {
- match("ConfigModel");
-
-
- }
-
- 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;
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:17:7: ( '{' )
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.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;
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:18:7: ( '}' )
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:18:9: '}'
- {
- match('}');
-
- }
-
- 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;
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:19:7: ( 'SubSystemConfig' )
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:19:9: 'SubSystemConfig'
- {
- match("SubSystemConfig");
-
-
- }
-
- 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;
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:20:7: ( '/' )
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:20:9: '/'
- {
- match('/');
-
- }
-
- 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;
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:21:7: ( 'dynamic configuration' )
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:21:9: 'dynamic configuration'
- {
- match("dynamic configuration");
-
-
- }
-
- 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;
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:22:7: ( 'file path' )
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:22:9: 'file path'
- {
- match("file path");
-
-
- }
-
- 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;
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:23:7: ( 'user import' )
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:23:9: 'user import'
- {
- match("user import");
-
-
- }
-
- 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;
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:24:7: ( 'user constructor' )
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:24:9: 'user constructor'
- {
- match("user constructor");
-
-
- }
-
- 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;
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:25:7: ( 'polling timer [ms]' )
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:25:9: 'polling timer [ms]'
- {
- match("polling timer [ms]");
-
-
- }
-
- 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;
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:26:7: ( 'ActorClassConfig' )
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:26:9: 'ActorClassConfig'
- {
- match("ActorClassConfig");
-
-
- }
-
- 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;
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:27:7: ( 'ActorInstanceConfig' )
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:27:9: 'ActorInstanceConfig'
- {
- match("ActorInstanceConfig");
-
-
- }
-
- 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;
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:28:7: ( 'ProtocolClassConfig' )
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:28:9: 'ProtocolClassConfig'
- {
- match("ProtocolClassConfig");
-
-
- }
-
- 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;
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:29:7: ( 'regular' )
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:29:9: 'regular'
- {
- match("regular");
-
-
- }
-
- 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;
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:30:7: ( 'conjugate' )
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:30:9: 'conjugate'
- {
- match("conjugate");
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "T__32"
-
- // $ANTLR start "T__33"
- public final void mT__33() throws RecognitionException {
- try {
- int _type = T__33;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:31:7: ( 'Port' )
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:31:9: 'Port'
- {
- match("Port");
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "T__33"
-
- // $ANTLR start "T__34"
- public final void mT__34() throws RecognitionException {
- try {
- int _type = T__34;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:32:7: ( 'InterfaceItem' )
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:32:9: 'InterfaceItem'
- {
- match("InterfaceItem");
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "T__34"
-
- // $ANTLR start "T__35"
- public final void mT__35() throws RecognitionException {
- try {
- int _type = T__35;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:33:7: ( 'Attr' )
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:33:9: 'Attr'
- {
- match("Attr");
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "T__35"
-
- // $ANTLR start "T__36"
- public final void mT__36() throws RecognitionException {
- try {
- int _type = T__36;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:34:7: ( '=' )
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:34:9: '='
- {
- match('=');
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "T__36"
-
- // $ANTLR start "T__37"
- public final void mT__37() throws RecognitionException {
- try {
- int _type = T__37;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:35:7: ( 'min' )
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:35:9: 'min'
- {
- match("min");
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "T__37"
-
- // $ANTLR start "T__38"
- public final void mT__38() throws RecognitionException {
- try {
- int _type = T__38;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:36:7: ( 'max' )
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:36:9: 'max'
- {
- match("max");
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "T__38"
-
- // $ANTLR start "T__39"
- public final void mT__39() throws RecognitionException {
- try {
- int _type = T__39;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:37:7: ( 'import' )
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:37:9: 'import'
- {
- match("import");
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "T__39"
-
- // $ANTLR start "T__40"
- public final void mT__40() throws RecognitionException {
- try {
- int _type = T__40;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:38:7: ( 'from' )
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:38:9: 'from'
- {
- match("from");
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "T__40"
-
- // $ANTLR start "T__41"
- public final void mT__41() throws RecognitionException {
- try {
- int _type = T__41;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:39:7: ( '.*' )
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:39:9: '.*'
- {
- match(".*");
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "T__41"
-
- // $ANTLR start "T__42"
- public final void mT__42() throws RecognitionException {
- try {
- int _type = T__42;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:40:7: ( '.' )
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:40:9: '.'
- {
- match('.');
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "T__42"
-
- // $ANTLR start "T__43"
- public final void mT__43() throws RecognitionException {
- try {
- int _type = T__43;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:41:7: ( ',' )
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:41:9: ','
- {
- match(',');
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "T__43"
-
- // $ANTLR start "T__44"
- public final void mT__44() throws RecognitionException {
- try {
- int _type = T__44;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:42:7: ( 'read' )
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:42:9: 'read'
- {
- match("read");
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "T__44"
-
- // $ANTLR start "T__45"
- public final void mT__45() throws RecognitionException {
- try {
- int _type = T__45;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:43:7: ( 'true' )
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:43:9: 'true'
- {
- match("true");
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "T__45"
-
- // $ANTLR start "RULE_EXP"
- public final void mRULE_EXP() throws RecognitionException {
- try {
- int _type = RULE_EXP;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6584:10: ( ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+ )
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6584:12: ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+
- {
- if ( input.LA(1)=='E'||input.LA(1)=='e' ) {
- input.consume();
-
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;}
-
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6584:22: ( '+' | '-' )?
- int alt1=2;
- int LA1_0 = input.LA(1);
-
- if ( (LA1_0=='+'||LA1_0=='-') ) {
- alt1=1;
- }
- switch (alt1) {
- case 1 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:
- {
- if ( input.LA(1)=='+'||input.LA(1)=='-' ) {
- input.consume();
-
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;}
-
-
- }
- break;
-
- }
-
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6584:33: ( '0' .. '9' )+
- int cnt2=0;
- loop2:
- do {
- int alt2=2;
- int LA2_0 = input.LA(1);
-
- if ( ((LA2_0>='0' && LA2_0<='9')) ) {
- alt2=1;
- }
-
-
- switch (alt2) {
- case 1 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6584:34: '0' .. '9'
- {
- matchRange('0','9');
-
- }
- break;
-
- default :
- if ( cnt2 >= 1 ) break loop2;
- EarlyExitException eee =
- new EarlyExitException(2, input);
- throw eee;
- }
- cnt2++;
- } while (true);
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "RULE_EXP"
-
- // $ANTLR start "RULE_HEX"
- public final void mRULE_HEX() throws RecognitionException {
- try {
- int _type = RULE_HEX;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6586:10: ( ( '0x' | '0X' ) ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' )+ )
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6586:12: ( '0x' | '0X' ) ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' )+
- {
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6586:12: ( '0x' | '0X' )
- int alt3=2;
- int LA3_0 = input.LA(1);
-
- if ( (LA3_0=='0') ) {
- int LA3_1 = input.LA(2);
-
- if ( (LA3_1=='x') ) {
- alt3=1;
- }
- else if ( (LA3_1=='X') ) {
- alt3=2;
- }
- else {
- NoViableAltException nvae =
- new NoViableAltException("", 3, 1, input);
-
- throw nvae;
- }
- }
- else {
- NoViableAltException nvae =
- new NoViableAltException("", 3, 0, input);
-
- throw nvae;
- }
- switch (alt3) {
- case 1 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6586:13: '0x'
- {
- match("0x");
-
-
- }
- break;
- case 2 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6586:18: '0X'
- {
- match("0X");
-
-
- }
- break;
-
- }
-
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6586:24: ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' )+
- int cnt4=0;
- loop4:
- do {
- int alt4=2;
- int LA4_0 = input.LA(1);
-
- if ( ((LA4_0>='0' && LA4_0<='9')||(LA4_0>='A' && LA4_0<='F')||(LA4_0>='a' && LA4_0<='f')) ) {
- alt4=1;
- }
-
-
- switch (alt4) {
- case 1 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:
- {
- if ( (input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='F')||(input.LA(1)>='a' && input.LA(1)<='f') ) {
- input.consume();
-
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;}
-
-
- }
- break;
-
- default :
- if ( cnt4 >= 1 ) break loop4;
- EarlyExitException eee =
- new EarlyExitException(4, input);
- throw eee;
- }
- cnt4++;
- } while (true);
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "RULE_HEX"
-
- // $ANTLR start "RULE_ID"
- public final void mRULE_ID() throws RecognitionException {
- try {
- int _type = RULE_ID;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6588:9: ( ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* )
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6588:11: ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
- {
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6588:11: ( '^' )?
- int alt5=2;
- int LA5_0 = input.LA(1);
-
- if ( (LA5_0=='^') ) {
- alt5=1;
- }
- switch (alt5) {
- case 1 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6588: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;}
-
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6588:40: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
- loop6:
- do {
- int alt6=2;
- int LA6_0 = input.LA(1);
-
- if ( ((LA6_0>='0' && LA6_0<='9')||(LA6_0>='A' && LA6_0<='Z')||LA6_0=='_'||(LA6_0>='a' && LA6_0<='z')) ) {
- alt6=1;
- }
-
-
- switch (alt6) {
- case 1 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.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 loop6;
- }
- } 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;
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6590:10: ( ( '0' .. '9' )+ )
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6590:12: ( '0' .. '9' )+
- {
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6590:12: ( '0' .. '9' )+
- int cnt7=0;
- loop7:
- do {
- int alt7=2;
- int LA7_0 = input.LA(1);
-
- if ( ((LA7_0>='0' && LA7_0<='9')) ) {
- alt7=1;
- }
-
-
- switch (alt7) {
- case 1 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6590:13: '0' .. '9'
- {
- matchRange('0','9');
-
- }
- break;
-
- default :
- if ( cnt7 >= 1 ) break loop7;
- EarlyExitException eee =
- new EarlyExitException(7, input);
- throw eee;
- }
- cnt7++;
- } 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;
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6592:13: ( ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) )
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6592:15: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
- {
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6592:15: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
- int alt10=2;
- int LA10_0 = input.LA(1);
-
- if ( (LA10_0=='\"') ) {
- alt10=1;
- }
- else if ( (LA10_0=='\'') ) {
- alt10=2;
- }
- else {
- NoViableAltException nvae =
- new NoViableAltException("", 10, 0, input);
-
- throw nvae;
- }
- switch (alt10) {
- case 1 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6592:16: '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"'
- {
- match('\"');
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6592:20: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )*
- loop8:
- do {
- int alt8=3;
- int LA8_0 = input.LA(1);
-
- if ( (LA8_0=='\\') ) {
- alt8=1;
- }
- else if ( ((LA8_0>='\u0000' && LA8_0<='!')||(LA8_0>='#' && LA8_0<='[')||(LA8_0>=']' && LA8_0<='\uFFFF')) ) {
- alt8=2;
- }
-
-
- switch (alt8) {
- case 1 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6592:21: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' )
- {
- match('\\');
- if ( input.LA(1)=='\"'||input.LA(1)=='\''||input.LA(1)=='\\'||input.LA(1)=='b'||input.LA(1)=='f'||input.LA(1)=='n'||input.LA(1)=='r'||(input.LA(1)>='t' && input.LA(1)<='u') ) {
- input.consume();
-
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;}
-
-
- }
- break;
- case 2 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6592:66: ~ ( ( '\\\\' | '\"' ) )
- {
- 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 loop8;
- }
- } while (true);
-
- match('\"');
-
- }
- break;
- case 2 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6592:86: '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\''
- {
- match('\'');
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6592:91: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )*
- loop9:
- do {
- int alt9=3;
- int LA9_0 = input.LA(1);
-
- if ( (LA9_0=='\\') ) {
- alt9=1;
- }
- else if ( ((LA9_0>='\u0000' && LA9_0<='&')||(LA9_0>='(' && LA9_0<='[')||(LA9_0>=']' && LA9_0<='\uFFFF')) ) {
- alt9=2;
- }
-
-
- switch (alt9) {
- case 1 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6592:92: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | 'u' | '\"' | '\\'' | '\\\\' )
- {
- match('\\');
- if ( input.LA(1)=='\"'||input.LA(1)=='\''||input.LA(1)=='\\'||input.LA(1)=='b'||input.LA(1)=='f'||input.LA(1)=='n'||input.LA(1)=='r'||(input.LA(1)>='t' && input.LA(1)<='u') ) {
- input.consume();
-
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;}
-
-
- }
- break;
- case 2 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6592:137: ~ ( ( '\\\\' | '\\'' ) )
- {
- 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 loop9;
- }
- } 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;
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6594:17: ( '/*' ( options {greedy=false; } : . )* '*/' )
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6594:19: '/*' ( options {greedy=false; } : . )* '*/'
- {
- match("/*");
-
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6594:24: ( options {greedy=false; } : . )*
- loop11:
- do {
- int alt11=2;
- int LA11_0 = input.LA(1);
-
- if ( (LA11_0=='*') ) {
- int LA11_1 = input.LA(2);
-
- if ( (LA11_1=='/') ) {
- alt11=2;
- }
- else if ( ((LA11_1>='\u0000' && LA11_1<='.')||(LA11_1>='0' && LA11_1<='\uFFFF')) ) {
- alt11=1;
- }
-
-
- }
- else if ( ((LA11_0>='\u0000' && LA11_0<=')')||(LA11_0>='+' && LA11_0<='\uFFFF')) ) {
- alt11=1;
- }
-
-
- switch (alt11) {
- case 1 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6594:52: .
- {
- matchAny();
-
- }
- break;
-
- default :
- break loop11;
- }
- } 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;
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6596:17: ( '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6596:19: '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
- {
- match("//");
-
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6596:24: (~ ( ( '\\n' | '\\r' ) ) )*
- loop12:
- do {
- int alt12=2;
- int LA12_0 = input.LA(1);
-
- if ( ((LA12_0>='\u0000' && LA12_0<='\t')||(LA12_0>='\u000B' && LA12_0<='\f')||(LA12_0>='\u000E' && LA12_0<='\uFFFF')) ) {
- alt12=1;
- }
-
-
- switch (alt12) {
- case 1 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6596: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 loop12;
- }
- } while (true);
-
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6596:40: ( ( '\\r' )? '\\n' )?
- int alt14=2;
- int LA14_0 = input.LA(1);
-
- if ( (LA14_0=='\n'||LA14_0=='\r') ) {
- alt14=1;
- }
- switch (alt14) {
- case 1 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6596:41: ( '\\r' )? '\\n'
- {
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6596:41: ( '\\r' )?
- int alt13=2;
- int LA13_0 = input.LA(1);
-
- if ( (LA13_0=='\r') ) {
- alt13=1;
- }
- switch (alt13) {
- case 1 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6596: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;
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6598:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ )
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6598:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
- {
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6598:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
- int cnt15=0;
- loop15:
- do {
- int alt15=2;
- int LA15_0 = input.LA(1);
-
- if ( ((LA15_0>='\t' && LA15_0<='\n')||LA15_0=='\r'||LA15_0==' ') ) {
- alt15=1;
- }
-
-
- switch (alt15) {
- case 1 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.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 ( cnt15 >= 1 ) break loop15;
- EarlyExitException eee =
- new EarlyExitException(15, input);
- throw eee;
- }
- cnt15++;
- } 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;
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6600:16: ( . )
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:6600:18: .
- {
- matchAny();
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "RULE_ANY_OTHER"
-
- public void mTokens() throws RecognitionException {
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.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 | T__33 | T__34 | T__35 | T__36 | T__37 | T__38 | T__39 | T__40 | T__41 | T__42 | T__43 | T__44 | T__45 | RULE_EXP | RULE_HEX | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER )
- int alt16=42;
- alt16 = dfa16.predict(input);
- switch (alt16) {
- case 1 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:1:10: T__13
- {
- mT__13();
-
- }
- break;
- case 2 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:1:16: T__14
- {
- mT__14();
-
- }
- break;
- case 3 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:1:22: T__15
- {
- mT__15();
-
- }
- break;
- case 4 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:1:28: T__16
- {
- mT__16();
-
- }
- break;
- case 5 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:1:34: T__17
- {
- mT__17();
-
- }
- break;
- case 6 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:1:40: T__18
- {
- mT__18();
-
- }
- break;
- case 7 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:1:46: T__19
- {
- mT__19();
-
- }
- break;
- case 8 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:1:52: T__20
- {
- mT__20();
-
- }
- break;
- case 9 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:1:58: T__21
- {
- mT__21();
-
- }
- break;
- case 10 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:1:64: T__22
- {
- mT__22();
-
- }
- break;
- case 11 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:1:70: T__23
- {
- mT__23();
-
- }
- break;
- case 12 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:1:76: T__24
- {
- mT__24();
-
- }
- break;
- case 13 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:1:82: T__25
- {
- mT__25();
-
- }
- break;
- case 14 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:1:88: T__26
- {
- mT__26();
-
- }
- break;
- case 15 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:1:94: T__27
- {
- mT__27();
-
- }
- break;
- case 16 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:1:100: T__28
- {
- mT__28();
-
- }
- break;
- case 17 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:1:106: T__29
- {
- mT__29();
-
- }
- break;
- case 18 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:1:112: T__30
- {
- mT__30();
-
- }
- break;
- case 19 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:1:118: T__31
- {
- mT__31();
-
- }
- break;
- case 20 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:1:124: T__32
- {
- mT__32();
-
- }
- break;
- case 21 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:1:130: T__33
- {
- mT__33();
-
- }
- break;
- case 22 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:1:136: T__34
- {
- mT__34();
-
- }
- break;
- case 23 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:1:142: T__35
- {
- mT__35();
-
- }
- break;
- case 24 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:1:148: T__36
- {
- mT__36();
-
- }
- break;
- case 25 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:1:154: T__37
- {
- mT__37();
-
- }
- break;
- case 26 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:1:160: T__38
- {
- mT__38();
-
- }
- break;
- case 27 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:1:166: T__39
- {
- mT__39();
-
- }
- break;
- case 28 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:1:172: T__40
- {
- mT__40();
-
- }
- break;
- case 29 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:1:178: T__41
- {
- mT__41();
-
- }
- break;
- case 30 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:1:184: T__42
- {
- mT__42();
-
- }
- break;
- case 31 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:1:190: T__43
- {
- mT__43();
-
- }
- break;
- case 32 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:1:196: T__44
- {
- mT__44();
-
- }
- break;
- case 33 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:1:202: T__45
- {
- mT__45();
-
- }
- break;
- case 34 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:1:208: RULE_EXP
- {
- mRULE_EXP();
-
- }
- break;
- case 35 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:1:217: RULE_HEX
- {
- mRULE_HEX();
-
- }
- break;
- case 36 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:1:226: RULE_ID
- {
- mRULE_ID();
-
- }
- break;
- case 37 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:1:234: RULE_INT
- {
- mRULE_INT();
-
- }
- break;
- case 38 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:1:243: RULE_STRING
- {
- mRULE_STRING();
-
- }
- break;
- case 39 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:1:255: RULE_ML_COMMENT
- {
- mRULE_ML_COMMENT();
-
- }
- break;
- case 40 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:1:271: RULE_SL_COMMENT
- {
- mRULE_SL_COMMENT();
-
- }
- break;
- case 41 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:1:287: RULE_WS
- {
- mRULE_WS();
-
- }
- break;
- case 42 :
- // ../org.eclipse.etrice.core.config.ui/src-gen/org/eclipse/etrice/core/ui/contentassist/antlr/internal/InternalConfig.g:1:295: RULE_ANY_OTHER
- {
- mRULE_ANY_OTHER();
-
- }
- break;
-
- }
-
- }
-
-
- protected DFA16 dfa16 = new DFA16(this);
- static final String DFA16_eotS =
- "\1\uffff\3\42\2\uffff\1\42\2\uffff\1\42\1\61\10\42\1\uffff\1\42"+
- "\1\77\1\uffff\2\42\1\105\1\40\2\uffff\2\40\2\uffff\1\42\1\uffff"+
- "\6\42\2\uffff\1\42\2\uffff\1\42\3\uffff\12\42\1\uffff\1\42\3\uffff"+
- "\1\42\1\103\5\uffff\2\42\1\140\1\141\24\42\2\uffff\2\42\1\170\6"+
- "\42\1\177\1\42\1\u0081\1\42\1\u0083\3\42\1\u0087\1\u0088\1\u0089"+
- "\1\u008a\2\uffff\3\42\1\uffff\2\42\1\uffff\1\42\1\uffff\1\42\1\uffff"+
- "\3\42\4\uffff\3\42\2\uffff\7\42\1\u00a2\7\42\1\u00aa\2\42\1\uffff"+
- "\2\42\2\uffff\3\42\1\uffff\7\42\1\u00b9\6\42\1\uffff\1\42\1\u00c1"+
- "\5\42\1\uffff\11\42\1\u00d0\4\42\1\uffff\1\u00d5\3\42\1\uffff\1"+
- "\u00d9\2\42\1\uffff\4\42\1\u00e0\1\u00e1\2\uffff";
- static final String DFA16_eofS =
- "\u00e2\uffff";
- static final String DFA16_minS =
- "\1\0\1\162\2\141\2\uffff\1\157\2\uffff\1\165\1\52\1\171\1\163\1"+
- "\157\1\143\1\157\1\145\1\157\1\156\1\uffff\1\155\1\52\1\uffff\1"+
- "\162\1\53\1\130\1\101\2\uffff\2\0\2\uffff\1\151\1\uffff\1\144\1"+
- "\156\1\170\2\154\1\157\2\uffff\1\156\2\uffff\1\142\3\uffff\1\156"+
- "\1\145\1\154\2\164\1\157\1\162\1\141\1\156\1\164\1\uffff\1\160\3"+
- "\uffff\1\165\1\60\5\uffff\1\164\1\145\2\60\1\163\1\145\1\155\1\146"+
- "\1\123\1\141\1\162\1\154\1\157\1\162\2\164\1\165\1\144\1\152\1\145"+
- "\1\157\2\145\1\154\2\uffff\1\145\1\40\1\60\1\151\1\171\1\155\1\40"+
- "\1\151\1\162\1\60\1\157\1\60\1\154\1\60\1\165\2\162\4\60\2\uffff"+
- "\1\147\1\163\1\151\1\143\1\156\1\103\1\uffff\1\143\1\uffff\1\141"+
- "\1\uffff\1\147\1\146\1\164\4\uffff\1\115\1\164\1\143\2\uffff\1\147"+
- "\1\154\1\156\1\157\1\162\2\141\1\60\1\157\1\145\2\40\1\141\1\163"+
- "\1\154\1\60\1\164\1\143\1\uffff\1\144\1\155\2\uffff\1\163\1\164"+
- "\1\103\1\uffff\3\145\1\103\1\163\1\141\1\154\1\60\1\111\1\154\1"+
- "\157\1\103\1\156\1\141\1\uffff\1\164\1\60\1\156\1\157\1\143\1\163"+
- "\1\145\1\uffff\1\146\1\156\1\145\1\163\1\155\1\151\1\146\2\103\1"+
- "\60\1\147\1\151\2\157\1\uffff\1\60\1\147\2\156\1\uffff\1\60\2\146"+
- "\1\uffff\2\151\2\147\2\60\2\uffff";
- static final String DFA16_maxS =
- "\1\uffff\1\162\1\157\1\162\2\uffff\1\157\2\uffff\1\165\1\57\1\171"+
- "\1\163\1\157\1\164\1\162\1\145\1\157\1\156\1\uffff\1\155\1\52\1"+
- "\uffff\1\162\1\71\1\170\1\172\2\uffff\2\uffff\2\uffff\1\151\1\uffff"+
- "\1\144\1\156\1\170\2\154\1\157\2\uffff\1\156\2\uffff\1\142\3\uffff"+
- "\1\156\1\145\1\154\2\164\1\157\1\162\1\147\1\156\1\164\1\uffff\1"+
- "\160\3\uffff\1\165\1\172\5\uffff\1\164\1\145\2\172\1\163\1\145\1"+
- "\155\1\146\1\123\1\141\1\162\1\154\1\157\1\162\2\164\1\165\1\144"+
- "\1\152\1\145\1\157\2\145\1\154\2\uffff\1\145\1\40\1\172\1\151\1"+
- "\171\1\155\1\40\1\151\1\162\1\172\1\157\1\172\1\154\1\172\1\165"+
- "\2\162\4\172\2\uffff\1\147\1\163\2\151\1\156\1\111\1\uffff\1\143"+
- "\1\uffff\1\141\1\uffff\1\147\1\146\1\164\4\uffff\1\115\1\164\1\143"+
- "\2\uffff\1\147\1\154\1\156\1\157\1\162\2\141\1\172\1\157\1\145\2"+
- "\40\1\141\1\163\1\154\1\172\1\164\1\143\1\uffff\1\144\1\155\2\uffff"+
- "\1\163\1\164\1\103\1\uffff\3\145\1\103\1\163\1\141\1\154\1\172\1"+
- "\111\1\154\1\157\1\103\1\156\1\141\1\uffff\1\164\1\172\1\156\1\157"+
- "\1\143\1\163\1\145\1\uffff\1\146\1\156\1\145\1\163\1\155\1\151\1"+
- "\146\2\103\1\172\1\147\1\151\2\157\1\uffff\1\172\1\147\2\156\1\uffff"+
- "\1\172\2\146\1\uffff\2\151\2\147\2\172\2\uffff";
- static final String DFA16_acceptS =
- "\4\uffff\1\4\1\5\1\uffff\1\7\1\10\12\uffff\1\30\2\uffff\1\37\4"+
- "\uffff\1\44\1\45\2\uffff\1\51\1\52\1\uffff\1\44\6\uffff\1\4\1\5"+
- "\1\uffff\1\7\1\10\1\uffff\1\47\1\50\1\12\12\uffff\1\30\1\uffff\1"+
- "\35\1\36\1\37\2\uffff\1\42\1\43\1\45\1\46\1\51\30\uffff\1\31\1\32"+
- "\25\uffff\1\14\1\34\6\uffff\1\27\1\uffff\1\25\1\uffff\1\40\3\uffff"+
- "\1\41\1\1\1\2\1\3\3\uffff\1\15\1\16\22\uffff\1\33\2\uffff\1\13\1"+
- "\17\3\uffff\1\23\16\uffff\1\24\7\uffff\1\6\16\uffff\1\26\4\uffff"+
- "\1\11\3\uffff\1\20\6\uffff\1\21\1\22";
- static final String DFA16_specialS =
- "\1\1\34\uffff\1\0\1\2\u00c3\uffff}>";
- static final String[] DFA16_transitionS = {
- "\11\40\2\37\2\40\1\37\22\40\1\37\1\40\1\35\4\40\1\36\3\40\1"+
- "\4\1\26\1\5\1\25\1\12\1\31\11\34\3\40\1\23\3\40\1\16\1\33\1"+
- "\6\1\33\1\30\3\33\1\22\6\33\1\17\2\33\1\11\7\33\3\40\1\32\1"+
- "\33\1\40\2\33\1\21\1\13\1\30\1\3\2\33\1\24\3\33\1\2\2\33\1\15"+
- "\1\33\1\20\1\33\1\27\1\14\1\33\1\1\3\33\1\7\1\40\1\10\uff82"+
- "\40",
- "\1\41",
- "\1\45\7\uffff\1\44\5\uffff\1\43",
- "\1\46\7\uffff\1\47\10\uffff\1\50",
- "",
- "",
- "\1\53",
- "",
- "",
- "\1\56",
- "\1\57\4\uffff\1\60",
- "\1\62",
- "\1\63",
- "\1\64",
- "\1\65\20\uffff\1\66",
- "\1\70\2\uffff\1\67",
- "\1\71",
- "\1\72",
- "\1\73",
- "",
- "\1\75",
- "\1\76",
- "",
- "\1\101",
- "\1\103\1\uffff\1\103\2\uffff\12\102",
- "\1\104\37\uffff\1\104",
- "\32\42\4\uffff\1\42\1\uffff\32\42",
- "",
- "",
- "\0\106",
- "\0\106",
- "",
- "",
- "\1\110",
- "",
- "\1\111",
- "\1\112",
- "\1\113",
- "\1\114",
- "\1\115",
- "\1\116",
- "",
- "",
- "\1\117",
- "",
- "",
- "\1\120",
- "",
- "",
- "",
- "\1\121",
- "\1\122",
- "\1\123",
- "\1\124",
- "\1\125",
- "\1\126",
- "\1\127",
- "\1\131\5\uffff\1\130",
- "\1\132",
- "\1\133",
- "",
- "\1\134",
- "",
- "",
- "",
- "\1\135",
- "\12\102\7\uffff\32\42\4\uffff\1\42\1\uffff\32\42",
- "",
- "",
- "",
- "",
- "",
- "\1\136",
- "\1\137",
- "\12\42\7\uffff\32\42\4\uffff\1\42\1\uffff\32\42",
- "\12\42\7\uffff\32\42\4\uffff\1\42\1\uffff\32\42",
- "\1\142",
- "\1\143",
- "\1\144",
- "\1\145",
- "\1\146",
- "\1\147",
- "\1\150",
- "\1\151",
- "\1\152",
- "\1\153",
- "\1\154",
- "\1\155",
- "\1\156",
- "\1\157",
- "\1\160",
- "\1\161",
- "\1\162",
- "\1\163",
- "\1\164",
- "\1\165",
- "",
- "",
- "\1\166",
- "\1\167",
- "\12\42\7\uffff\32\42\4\uffff\1\42\1\uffff\32\42",
- "\1\171",
- "\1\172",
- "\1\173",
- "\1\174",
- "\1\175",
- "\1\176",
- "\12\42\7\uffff\32\42\4\uffff\1\42\1\uffff\32\42",
- "\1\u0080",
- "\12\42\7\uffff\32\42\4\uffff\1\42\1\uffff\32\42",
- "\1\u0082",
- "\12\42\7\uffff\32\42\4\uffff\1\42\1\uffff\32\42",
- "\1\u0084",
- "\1\u0085",
- "\1\u0086",
- "\12\42\7\uffff\32\42\4\uffff\1\42\1\uffff\32\42",
- "\12\42\7\uffff\32\42\4\uffff\1\42\1\uffff\32\42",
- "\12\42\7\uffff\32\42\4\uffff\1\42\1\uffff\32\42",
- "\12\42\7\uffff\32\42\4\uffff\1\42\1\uffff\32\42",
- "",
- "",
- "\1\u008b",
- "\1\u008c",
- "\1\u008d",
- "\1\u008f\5\uffff\1\u008e",
- "\1\u0090",
- "\1\u0091\5\uffff\1\u0092",
- "",
- "\1\u0093",
- "",
- "\1\u0094",
- "",
- "\1\u0095",
- "\1\u0096",
- "\1\u0097",
- "",
- "",
- "",
- "",
- "\1\u0098",
- "\1\u0099",
- "\1\u009a",
- "",
- "",
- "\1\u009b",
- "\1\u009c",
- "\1\u009d",
- "\1\u009e",
- "\1\u009f",
- "\1\u00a0",
- "\1\u00a1",
- "\12\42\7\uffff\32\42\4\uffff\1\42\1\uffff\32\42",
- "\1\u00a3",
- "\1\u00a4",
- "\1\u00a5",
- "\1\u00a6",
- "\1\u00a7",
- "\1\u00a8",
- "\1\u00a9",
- "\12\42\7\uffff\32\42\4\uffff\1\42\1\uffff\32\42",
- "\1\u00ab",
- "\1\u00ac",
- "",
- "\1\u00ad",
- "\1\u00ae",
- "",
- "",
- "\1\u00af",
- "\1\u00b0",
- "\1\u00b1",
- "",
- "\1\u00b2",
- "\1\u00b3",
- "\1\u00b4",
- "\1\u00b5",
- "\1\u00b6",
- "\1\u00b7",
- "\1\u00b8",
- "\12\42\7\uffff\32\42\4\uffff\1\42\1\uffff\32\42",
- "\1\u00ba",
- "\1\u00bb",
- "\1\u00bc",
- "\1\u00bd",
- "\1\u00be",
- "\1\u00bf",
- "",
- "\1\u00c0",
- "\12\42\7\uffff\32\42\4\uffff\1\42\1\uffff\32\42",
- "\1\u00c2",
- "\1\u00c3",
- "\1\u00c4",
- "\1\u00c5",
- "\1\u00c6",
- "",
- "\1\u00c7",
- "\1\u00c8",
- "\1\u00c9",
- "\1\u00ca",
- "\1\u00cb",
- "\1\u00cc",
- "\1\u00cd",
- "\1\u00ce",
- "\1\u00cf",
- "\12\42\7\uffff\32\42\4\uffff\1\42\1\uffff\32\42",
- "\1\u00d1",
- "\1\u00d2",
- "\1\u00d3",
- "\1\u00d4",
- "",
- "\12\42\7\uffff\32\42\4\uffff\1\42\1\uffff\32\42",
- "\1\u00d6",
- "\1\u00d7",
- "\1\u00d8",
- "",
- "\12\42\7\uffff\32\42\4\uffff\1\42\1\uffff\32\42",
- "\1\u00da",
- "\1\u00db",
- "",
- "\1\u00dc",
- "\1\u00dd",
- "\1\u00de",
- "\1\u00df",
- "\12\42\7\uffff\32\42\4\uffff\1\42\1\uffff\32\42",
- "\12\42\7\uffff\32\42\4\uffff\1\42\1\uffff\32\42",
- "",
- ""
- };
-
- static final short[] DFA16_eot = DFA.unpackEncodedString(DFA16_eotS);
- static final short[] DFA16_eof = DFA.unpackEncodedString(DFA16_eofS);
- static final char[] DFA16_min = DFA.unpackEncodedStringToUnsignedChars(DFA16_minS);
- static final char[] DFA16_max = DFA.unpackEncodedStringToUnsignedChars(DFA16_maxS);
- static final short[] DFA16_accept = DFA.unpackEncodedString(DFA16_acceptS);
- static final short[] DFA16_special = DFA.unpackEncodedString(DFA16_specialS);
- static final short[][] DFA16_transition;
-
- static {
- int numStates = DFA16_transitionS.length;
- DFA16_transition = new short[numStates][];
- for (int i=0; i<numStates; i++) {
- DFA16_transition[i] = DFA.unpackEncodedString(DFA16_transitionS[i]);
- }
- }
-
- class DFA16 extends DFA {
-
- public DFA16(BaseRecognizer recognizer) {
- this.recognizer = recognizer;
- this.decisionNumber = 16;
- this.eot = DFA16_eot;
- this.eof = DFA16_eof;
- this.min = DFA16_min;
- this.max = DFA16_max;
- this.accept = DFA16_accept;
- this.special = DFA16_special;
- this.transition = DFA16_transition;
- }
- public String getDescription() {
- return "1:1: Tokens : ( 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 | T__33 | T__34 | T__35 | T__36 | T__37 | T__38 | T__39 | T__40 | T__41 | T__42 | T__43 | T__44 | T__45 | RULE_EXP | RULE_HEX | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER );";
- }
- public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
- IntStream input = _input;
- int _s = s;
- switch ( s ) {
- case 0 :
- int LA16_29 = input.LA(1);
-
- s = -1;
- if ( ((LA16_29>='\u0000' && LA16_29<='\uFFFF')) ) {s = 70;}
-
- else s = 32;
-
- if ( s>=0 ) return s;
- break;
- case 1 :
- int LA16_0 = input.LA(1);
-
- s = -1;
- if ( (LA16_0=='w') ) {s = 1;}
-
- else if ( (LA16_0=='m') ) {s = 2;}
-
- else if ( (LA16_0=='f') ) {s = 3;}
-
- else if ( (LA16_0=='+') ) {s = 4;}
-
- else if ( (LA16_0=='-') ) {s = 5;}
-
- else if ( (LA16_0=='C') ) {s = 6;}
-
- else if ( (LA16_0=='{') ) {s = 7;}
-
- else if ( (LA16_0=='}') ) {s = 8;}
-
- else if ( (LA16_0=='S') ) {s = 9;}
-
- else if ( (LA16_0=='/') ) {s = 10;}
-
- else if ( (LA16_0=='d') ) {s = 11;}
-
- else if ( (LA16_0=='u') ) {s = 12;}
-
- else if ( (LA16_0=='p') ) {s = 13;}
-
- else if ( (LA16_0=='A') ) {s = 14;}
-
- else if ( (LA16_0=='P') ) {s = 15;}
-
- else if ( (LA16_0=='r') ) {s = 16;}
-
- else if ( (LA16_0=='c') ) {s = 17;}
-
- else if ( (LA16_0=='I') ) {s = 18;}
-
- else if ( (LA16_0=='=') ) {s = 19;}
-
- else if ( (LA16_0=='i') ) {s = 20;}
-
- else if ( (LA16_0=='.') ) {s = 21;}
-
- else if ( (LA16_0==',') ) {s = 22;}
-
- else if ( (LA16_0=='t') ) {s = 23;}
-
- else if ( (LA16_0=='E'||LA16_0=='e') ) {s = 24;}
-
- else if ( (LA16_0=='0') ) {s = 25;}
-
- else if ( (LA16_0=='^') ) {s = 26;}
-
- else if ( (LA16_0=='B'||LA16_0=='D'||(LA16_0>='F' && LA16_0<='H')||(LA16_0>='J' && LA16_0<='O')||(LA16_0>='Q' && LA16_0<='R')||(LA16_0>='T' && LA16_0<='Z')||LA16_0=='_'||(LA16_0>='a' && LA16_0<='b')||(LA16_0>='g' && LA16_0<='h')||(LA16_0>='j' && LA16_0<='l')||(LA16_0>='n' && LA16_0<='o')||LA16_0=='q'||LA16_0=='s'||LA16_0=='v'||(LA16_0>='x' && LA16_0<='z')) ) {s = 27;}
-
- else if ( ((LA16_0>='1' && LA16_0<='9')) ) {s = 28;}
-
- else if ( (LA16_0=='\"') ) {s = 29;}
-
- else if ( (LA16_0=='\'') ) {s = 30;}
-
- else if ( ((LA16_0>='\t' && LA16_0<='\n')||LA16_0=='\r'||LA16_0==' ') ) {s = 31;}
-
- else if ( ((LA16_0>='\u0000' && LA16_0<='\b')||(LA16_0>='\u000B' && LA16_0<='\f')||(LA16_0>='\u000E' && LA16_0<='\u001F')||LA16_0=='!'||(LA16_0>='#' && LA16_0<='&')||(LA16_0>='(' && LA16_0<='*')||(LA16_0>=':' && LA16_0<='<')||(LA16_0>='>' && LA16_0<='@')||(LA16_0>='[' && LA16_0<=']')||LA16_0=='`'||LA16_0=='|'||(LA16_0>='~' && LA16_0<='\uFFFF')) ) {s = 32;}
-
- if ( s>=0 ) return s;
- break;
- case 2 :
- int LA16_30 = input.LA(1);
-
- s = -1;
- if ( ((LA16_30>='\u0000' && LA16_30<='\uFFFF')) ) {s = 70;}
-
- else s = 32;
-
- if ( s>=0 ) return s;
- break;
- }
- NoViableAltException nvae =
- new NoViableAltException(getDescription(), 16, _s, input);
- error(nvae);
- throw nvae;
- }
- }
-
-
+public class InternalConfigLexer extends Lexer { + public static final int RULE_ID=5; + public static final int RULE_EXP=7; + public static final int T__29=29; + public static final int T__28=28; + public static final int T__27=27; + public static final int T__26=26; + public static final int T__25=25; + public static final int T__24=24; + public static final int T__23=23; + public static final int T__22=22; + public static final int T__21=21; + public static final int RULE_ANY_OTHER=12; + public static final int T__20=20; + public static final int EOF=-1; + public static final int T__19=19; + public static final int RULE_HEX=4; + public static final int T__16=16; + public static final int T__15=15; + public static final int T__18=18; + public static final int T__17=17; + public static final int T__14=14; + public static final int T__13=13; + public static final int RULE_INT=6; + public static final int T__42=42; + public static final int T__43=43; + public static final int T_ |