/* * generated by Xtext 2.12.0 */ package com.irtsaintexupery.xtext.serializer; import com.google.inject.Inject; import com.irtsaintexupery.xtext.services.PseimGrammarAccess; import java.util.List; import org.eclipse.emf.ecore.EObject; import org.eclipse.xtext.IGrammarAccess; import org.eclipse.xtext.RuleCall; import org.eclipse.xtext.nodemodel.INode; import org.eclipse.xtext.serializer.analysis.GrammarAlias.AbstractElementAlias; import org.eclipse.xtext.serializer.analysis.GrammarAlias.GroupAlias; import org.eclipse.xtext.serializer.analysis.GrammarAlias.TokenAlias; import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynNavigable; import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynTransition; import org.eclipse.xtext.serializer.sequencer.AbstractSyntacticSequencer; @SuppressWarnings("all") public class PseimSyntacticSequencer extends AbstractSyntacticSequencer { protected PseimGrammarAccess grammarAccess; protected AbstractElementAlias match_Component___LeftCurlyBracketKeyword_5_0_RightCurlyBracketKeyword_5_2__q; protected AbstractElementAlias match_Model___LeftCurlyBracketKeyword_2_0_RightCurlyBracketKeyword_2_2__q; @Inject protected void init(IGrammarAccess access) { grammarAccess = (PseimGrammarAccess) access; match_Component___LeftCurlyBracketKeyword_5_0_RightCurlyBracketKeyword_5_2__q = new GroupAlias(false, true, new TokenAlias(false, false, grammarAccess.getComponentAccess().getLeftCurlyBracketKeyword_5_0()), new TokenAlias(false, false, grammarAccess.getComponentAccess().getRightCurlyBracketKeyword_5_2())); match_Model___LeftCurlyBracketKeyword_2_0_RightCurlyBracketKeyword_2_2__q = new GroupAlias(false, true, new TokenAlias(false, false, grammarAccess.getModelAccess().getLeftCurlyBracketKeyword_2_0()), new TokenAlias(false, false, grammarAccess.getModelAccess().getRightCurlyBracketKeyword_2_2())); } @Override protected String getUnassignedRuleCallToken(EObject semanticObject, RuleCall ruleCall, INode node) { return ""; } @Override protected void emitUnassignedTokens(EObject semanticObject, ISynTransition transition, INode fromNode, INode toNode) { if (transition.getAmbiguousSyntaxes().isEmpty()) return; List transitionNodes = collectNodes(fromNode, toNode); for (AbstractElementAlias syntax : transition.getAmbiguousSyntaxes()) { List syntaxNodes = getNodesFor(transitionNodes, syntax); if (match_Component___LeftCurlyBracketKeyword_5_0_RightCurlyBracketKeyword_5_2__q.equals(syntax)) emit_Component___LeftCurlyBracketKeyword_5_0_RightCurlyBracketKeyword_5_2__q(semanticObject, getLastNavigableState(), syntaxNodes); else if (match_Model___LeftCurlyBracketKeyword_2_0_RightCurlyBracketKeyword_2_2__q.equals(syntax)) emit_Model___LeftCurlyBracketKeyword_2_0_RightCurlyBracketKeyword_2_2__q(semanticObject, getLastNavigableState(), syntaxNodes); else acceptNodes(getLastNavigableState(), syntaxNodes); } } /** * Ambiguous syntax: * ('{' '}')? * * This ambiguous syntax occurs at: * content+=Port ')' (ambiguity) (rule end) * name=ID '(' ')' (ambiguity) (rule end) */ protected void emit_Component___LeftCurlyBracketKeyword_5_0_RightCurlyBracketKeyword_5_2__q(EObject semanticObject, ISynNavigable transition, List nodes) { acceptNodes(transition, nodes); } /** * Ambiguous syntax: * ('{' '}')? * * This ambiguous syntax occurs at: * name=EString (ambiguity) (rule end) */ protected void emit_Model___LeftCurlyBracketKeyword_2_0_RightCurlyBracketKeyword_2_2__q(EObject semanticObject, ISynNavigable transition, List nodes) { acceptNodes(transition, nodes); } }