SmachDSLSyntacticSequencer.java
Go to the documentation of this file.
00001 package org.best.of.robotics.serializer;
00002 
00003 import com.google.inject.Inject;
00004 import java.util.List;
00005 import org.best.of.robotics.services.SmachDSLGrammarAccess;
00006 import org.eclipse.emf.ecore.EObject;
00007 import org.eclipse.xtext.IGrammarAccess;
00008 import org.eclipse.xtext.RuleCall;
00009 import org.eclipse.xtext.nodemodel.INode;
00010 import org.eclipse.xtext.serializer.analysis.GrammarAlias.AbstractElementAlias;
00011 import org.eclipse.xtext.serializer.analysis.GrammarAlias.TokenAlias;
00012 import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynNavigable;
00013 import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynTransition;
00014 import org.eclipse.xtext.serializer.sequencer.AbstractSyntacticSequencer;
00015 
00016 @SuppressWarnings("all")
00017 public class SmachDSLSyntacticSequencer extends AbstractSyntacticSequencer {
00018 
00019         protected SmachDSLGrammarAccess grammarAccess;
00020         protected AbstractElementAlias match_ActionState_CommaKeyword_6_1_q;
00021         
00022         @Inject
00023         protected void init(IGrammarAccess access) {
00024                 grammarAccess = (SmachDSLGrammarAccess) access;
00025                 match_ActionState_CommaKeyword_6_1_q = new TokenAlias(false, true, grammarAccess.getActionStateAccess().getCommaKeyword_6_1());
00026         }
00027         
00028         @Override
00029         protected String getUnassignedRuleCallToken(EObject semanticObject, RuleCall ruleCall, INode node) {
00030                 return "";
00031         }
00032         
00033         
00034         @Override
00035         protected void emitUnassignedTokens(EObject semanticObject, ISynTransition transition, INode fromNode, INode toNode) {
00036                 if (transition.getAmbiguousSyntaxes().isEmpty()) return;
00037                 List<INode> transitionNodes = collectNodes(fromNode, toNode);
00038                 for (AbstractElementAlias syntax : transition.getAmbiguousSyntaxes()) {
00039                         List<INode> syntaxNodes = getNodesFor(transitionNodes, syntax);
00040                         if(match_ActionState_CommaKeyword_6_1_q.equals(syntax))
00041                                 emit_ActionState_CommaKeyword_6_1_q(semanticObject, getLastNavigableState(), syntaxNodes);
00042                         else acceptNodes(getLastNavigableState(), syntaxNodes);
00043                 }
00044         }
00045 
00050         protected void emit_ActionState_CommaKeyword_6_1_q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
00051                 acceptNodes(transition, nodes);
00052         }
00053         
00054 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends


bride_plugin_source
Author(s): Alexander Bubeck
autogenerated on Wed Aug 14 2013 10:06:09