/*
* generated by Xtext
*/
package at.bestsolution.persistence.emap.serializer;
import at.bestsolution.persistence.emap.services.EMapGrammarAccess;
import com.google.inject.Inject;
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 EMapSyntacticSequencer extends AbstractSyntacticSequencer {
protected EMapGrammarAccess grammarAccess;
protected AbstractElementAlias match_EBundleEntity___LeftCurlyBracketKeyword_1_0_RightCurlyBracketKeyword_1_7__q;
protected AbstractElementAlias match_ECustomServiceMethods___LeftCurlyBracketKeyword_4_0_RightCurlyBracketKeyword_4_2__q;
protected AbstractElementAlias match_EModelTypeAttribute___LeftParenthesisKeyword_1_2_0_RightParenthesisKeyword_1_2_2__q;
protected AbstractElementAlias match_ENamedCustomQuery___LeftParenthesisKeyword_2_0_RightParenthesisKeyword_2_2__q;
protected AbstractElementAlias match_ENamedQuery___LeftParenthesisKeyword_2_0_RightParenthesisKeyword_2_2__q;
protected AbstractElementAlias match_ENamedServiceQuery___LeftCurlyBracketKeyword_4_0_RightCurlyBracketKeyword_4_3__q;
protected AbstractElementAlias match_ERestServiceMapping___LeftCurlyBracketKeyword_2_0_RightCurlyBracketKeyword_2_3__q;
@Inject
protected void init(IGrammarAccess access) {
grammarAccess = (EMapGrammarAccess) access;
match_EBundleEntity___LeftCurlyBracketKeyword_1_0_RightCurlyBracketKeyword_1_7__q = new GroupAlias(false, true, new TokenAlias(false, false, grammarAccess.getEBundleEntityAccess().getLeftCurlyBracketKeyword_1_0()), new TokenAlias(false, false, grammarAccess.getEBundleEntityAccess().getRightCurlyBracketKeyword_1_7()));
match_ECustomServiceMethods___LeftCurlyBracketKeyword_4_0_RightCurlyBracketKeyword_4_2__q = new GroupAlias(false, true, new TokenAlias(false, false, grammarAccess.getECustomServiceMethodsAccess().getLeftCurlyBracketKeyword_4_0()), new TokenAlias(false, false, grammarAccess.getECustomServiceMethodsAccess().getRightCurlyBracketKeyword_4_2()));
match_EModelTypeAttribute___LeftParenthesisKeyword_1_2_0_RightParenthesisKeyword_1_2_2__q = new GroupAlias(false, true, new TokenAlias(false, false, grammarAccess.getEModelTypeAttributeAccess().getLeftParenthesisKeyword_1_2_0()), new TokenAlias(false, false, grammarAccess.getEModelTypeAttributeAccess().getRightParenthesisKeyword_1_2_2()));
match_ENamedCustomQuery___LeftParenthesisKeyword_2_0_RightParenthesisKeyword_2_2__q = new GroupAlias(false, true, new TokenAlias(false, false, grammarAccess.getENamedCustomQueryAccess().getLeftParenthesisKeyword_2_0()), new TokenAlias(false, false, grammarAccess.getENamedCustomQueryAccess().getRightParenthesisKeyword_2_2()));
match_ENamedQuery___LeftParenthesisKeyword_2_0_RightParenthesisKeyword_2_2__q = new GroupAlias(false, true, new TokenAlias(false, false, grammarAccess.getENamedQueryAccess().getLeftParenthesisKeyword_2_0()), new TokenAlias(false, false, grammarAccess.getENamedQueryAccess().getRightParenthesisKeyword_2_2()));
match_ENamedServiceQuery___LeftCurlyBracketKeyword_4_0_RightCurlyBracketKeyword_4_3__q = new GroupAlias(false, true, new TokenAlias(false, false, grammarAccess.getENamedServiceQueryAccess().getLeftCurlyBracketKeyword_4_0()), new TokenAlias(false, false, grammarAccess.getENamedServiceQueryAccess().getRightCurlyBracketKeyword_4_3()));
match_ERestServiceMapping___LeftCurlyBracketKeyword_2_0_RightCurlyBracketKeyword_2_3__q = new GroupAlias(false, true, new TokenAlias(false, false, grammarAccess.getERestServiceMappingAccess().getLeftCurlyBracketKeyword_2_0()), new TokenAlias(false, false, grammarAccess.getERestServiceMappingAccess().getRightCurlyBracketKeyword_2_3()));
}
@Override
protected String getUnassignedRuleCallToken(EObject semanticObject, RuleCall ruleCall, INode node) {
return "";
}
@Override
protected void emitUnassignedTokens(EObject semanticObject, ISynTransition transition, INode fromNode, INode toNode) {
if (transition.getAmbiguousSyntaxes().isEmpty()) return;
List<INode> transitionNodes = collectNodes(fromNode, toNode);
for (AbstractElementAlias syntax : transition.getAmbiguousSyntaxes()) {
List<INode> syntaxNodes = getNodesFor(transitionNodes, syntax);
if (match_EBundleEntity___LeftCurlyBracketKeyword_1_0_RightCurlyBracketKeyword_1_7__q.equals(syntax))
emit_EBundleEntity___LeftCurlyBracketKeyword_1_0_RightCurlyBracketKeyword_1_7__q(semanticObject, getLastNavigableState(), syntaxNodes);
else if (match_ECustomServiceMethods___LeftCurlyBracketKeyword_4_0_RightCurlyBracketKeyword_4_2__q.equals(syntax))
emit_ECustomServiceMethods___LeftCurlyBracketKeyword_4_0_RightCurlyBracketKeyword_4_2__q(semanticObject, getLastNavigableState(), syntaxNodes);
else if (match_EModelTypeAttribute___LeftParenthesisKeyword_1_2_0_RightParenthesisKeyword_1_2_2__q.equals(syntax))
emit_EModelTypeAttribute___LeftParenthesisKeyword_1_2_0_RightParenthesisKeyword_1_2_2__q(semanticObject, getLastNavigableState(), syntaxNodes);
else if (match_ENamedCustomQuery___LeftParenthesisKeyword_2_0_RightParenthesisKeyword_2_2__q.equals(syntax))
emit_ENamedCustomQuery___LeftParenthesisKeyword_2_0_RightParenthesisKeyword_2_2__q(semanticObject, getLastNavigableState(), syntaxNodes);
else if (match_ENamedQuery___LeftParenthesisKeyword_2_0_RightParenthesisKeyword_2_2__q.equals(syntax))
emit_ENamedQuery___LeftParenthesisKeyword_2_0_RightParenthesisKeyword_2_2__q(semanticObject, getLastNavigableState(), syntaxNodes);
else if (match_ENamedServiceQuery___LeftCurlyBracketKeyword_4_0_RightCurlyBracketKeyword_4_3__q.equals(syntax))
emit_ENamedServiceQuery___LeftCurlyBracketKeyword_4_0_RightCurlyBracketKeyword_4_3__q(semanticObject, getLastNavigableState(), syntaxNodes);
else if (match_ERestServiceMapping___LeftCurlyBracketKeyword_2_0_RightCurlyBracketKeyword_2_3__q.equals(syntax))
emit_ERestServiceMapping___LeftCurlyBracketKeyword_2_0_RightCurlyBracketKeyword_2_3__q(semanticObject, getLastNavigableState(), syntaxNodes);
else acceptNodes(getLastNavigableState(), syntaxNodes);
}
}
/**
* Ambiguous syntax:
* ('{' '}')?
*
* This ambiguous syntax occurs at:
* entity=[EMappingEntity|ID] (ambiguity) (rule end)
*/
protected void emit_EBundleEntity___LeftCurlyBracketKeyword_1_0_RightCurlyBracketKeyword_1_7__q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
acceptNodes(transition, nodes);
}
/**
* Ambiguous syntax:
* ('{' '}')?
*
* This ambiguous syntax occurs at:
* path=STRING (ambiguity) (rule end)
*/
protected void emit_ECustomServiceMethods___LeftCurlyBracketKeyword_4_0_RightCurlyBracketKeyword_4_2__q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
acceptNodes(transition, nodes);
}
/**
* Ambiguous syntax:
* ('(' ')')?
*
* This ambiguous syntax occurs at:
* query=[ENamedCustomQuery|QualifiedName] (ambiguity) (rule end)
* query=[ENamedCustomQuery|QualifiedName] (ambiguity) cached?='cached'
*/
protected void emit_EModelTypeAttribute___LeftParenthesisKeyword_1_2_0_RightParenthesisKeyword_1_2_2__q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
acceptNodes(transition, nodes);
}
/**
* Ambiguous syntax:
* ('(' ')')?
*
* This ambiguous syntax occurs at:
* name=ID (ambiguity) '{' queries+=ECustomQuery
*/
protected void emit_ENamedCustomQuery___LeftParenthesisKeyword_2_0_RightParenthesisKeyword_2_2__q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
acceptNodes(transition, nodes);
}
/**
* Ambiguous syntax:
* ('(' ')')?
*
* This ambiguous syntax occurs at:
* name=ID (ambiguity) '{' queries+=EQuery
*/
protected void emit_ENamedQuery___LeftParenthesisKeyword_2_0_RightParenthesisKeyword_2_2__q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
acceptNodes(transition, nodes);
}
/**
* Ambiguous syntax:
* ('{' '}')?
*
* This ambiguous syntax occurs at:
* path=STRING (ambiguity) (rule end)
*/
protected void emit_ENamedServiceQuery___LeftCurlyBracketKeyword_4_0_RightCurlyBracketKeyword_4_3__q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
acceptNodes(transition, nodes);
}
/**
* Ambiguous syntax:
* ('{' '}')?
*
* This ambiguous syntax occurs at:
* (rule start) 'webservice' (ambiguity) rest?='rest'
*/
protected void emit_ERestServiceMapping___LeftCurlyBracketKeyword_2_0_RightCurlyBracketKeyword_2_3__q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
acceptNodes(transition, nodes);
}
}