/*
* generated by Xtext
*/
package net.certware.argument.language.serializer;
import com.google.inject.Inject;
import java.util.List;
import net.certware.argument.language.services.LGrammarAccess;
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.AlternativeAlias;
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 LSyntacticSequencer extends AbstractSyntacticSequencer {
protected LGrammarAccess grammarAccess;
protected AbstractElementAlias match_Addition_HyphenMinusKeyword_1_1_1_or_PlusSignKeyword_1_1_0;
protected AbstractElementAlias match_AndSentence_AndKeyword_1_1_0_or_CommaKeyword_1_1_1;
protected AbstractElementAlias match_GroundAddition_HyphenMinusKeyword_1_1_1_or_PlusSignKeyword_1_1_0;
protected AbstractElementAlias match_GroundMultiplication_AsteriskKeyword_1_1_0_or_PercentSignKeyword_1_1_2_or_SolidusKeyword_1_1_1;
protected AbstractElementAlias match_MaybeLiteral_pPrimarySentence_pSentenceLiteral_MaybeKeyword_0_or___LeftParenthesisKeyword_1_0_a_NotKeyword_1_0__;
protected AbstractElementAlias match_Multiplication_AsteriskKeyword_1_1_0_or_PercentSignKeyword_1_1_2_or_SolidusKeyword_1_1_1;
protected AbstractElementAlias match_PrimarySentence_LeftParenthesisKeyword_1_0_a;
protected AbstractElementAlias match_PrimarySentence_LeftParenthesisKeyword_1_0_p;
protected AbstractElementAlias match_SentenceLiteral_NotKeyword_1_0_q;
protected AbstractElementAlias match_SetMultiplication_AsteriskKeyword_1_1_0_or_ReverseSolidusKeyword_1_1_1;
protected AbstractElementAlias match_SetPrimary_LeftParenthesisKeyword_1_0_a;
protected AbstractElementAlias match_SetPrimary_LeftParenthesisKeyword_1_0_p;
protected AbstractElementAlias match_pPrimarySentence_LeftParenthesisKeyword_1_0_a;
protected AbstractElementAlias match_pPrimarySentence_LeftParenthesisKeyword_1_0_p;
@Inject
protected void init(IGrammarAccess access) {
grammarAccess = (LGrammarAccess) access;
match_Addition_HyphenMinusKeyword_1_1_1_or_PlusSignKeyword_1_1_0 = new AlternativeAlias(false, false, new TokenAlias(false, false, grammarAccess.getAdditionAccess().getHyphenMinusKeyword_1_1_1()), new TokenAlias(false, false, grammarAccess.getAdditionAccess().getPlusSignKeyword_1_1_0()));
match_AndSentence_AndKeyword_1_1_0_or_CommaKeyword_1_1_1 = new AlternativeAlias(false, false, new TokenAlias(false, false, grammarAccess.getAndSentenceAccess().getAndKeyword_1_1_0()), new TokenAlias(false, false, grammarAccess.getAndSentenceAccess().getCommaKeyword_1_1_1()));
match_GroundAddition_HyphenMinusKeyword_1_1_1_or_PlusSignKeyword_1_1_0 = new AlternativeAlias(false, false, new TokenAlias(false, false, grammarAccess.getGroundAdditionAccess().getHyphenMinusKeyword_1_1_1()), new TokenAlias(false, false, grammarAccess.getGroundAdditionAccess().getPlusSignKeyword_1_1_0()));
match_GroundMultiplication_AsteriskKeyword_1_1_0_or_PercentSignKeyword_1_1_2_or_SolidusKeyword_1_1_1 = new AlternativeAlias(false, false, new TokenAlias(false, false, grammarAccess.getGroundMultiplicationAccess().getAsteriskKeyword_1_1_0()), new TokenAlias(false, false, grammarAccess.getGroundMultiplicationAccess().getPercentSignKeyword_1_1_2()), new TokenAlias(false, false, grammarAccess.getGroundMultiplicationAccess().getSolidusKeyword_1_1_1()));
match_MaybeLiteral_pPrimarySentence_pSentenceLiteral_MaybeKeyword_0_or___LeftParenthesisKeyword_1_0_a_NotKeyword_1_0__ = new AlternativeAlias(false, false, new GroupAlias(false, false, new TokenAlias(true, true, grammarAccess.getPPrimarySentenceAccess().getLeftParenthesisKeyword_1_0()), new TokenAlias(false, false, grammarAccess.getPSentenceLiteralAccess().getNotKeyword_1_0())), new TokenAlias(false, false, grammarAccess.getMaybeLiteralAccess().getMaybeKeyword_0()));
match_Multiplication_AsteriskKeyword_1_1_0_or_PercentSignKeyword_1_1_2_or_SolidusKeyword_1_1_1 = new AlternativeAlias(false, false, new TokenAlias(false, false, grammarAccess.getMultiplicationAccess().getAsteriskKeyword_1_1_0()), new TokenAlias(false, false, grammarAccess.getMultiplicationAccess().getPercentSignKeyword_1_1_2()), new TokenAlias(false, false, grammarAccess.getMultiplicationAccess().getSolidusKeyword_1_1_1()));
match_PrimarySentence_LeftParenthesisKeyword_1_0_a = new TokenAlias(true, true, grammarAccess.getPrimarySentenceAccess().getLeftParenthesisKeyword_1_0());
match_PrimarySentence_LeftParenthesisKeyword_1_0_p = new TokenAlias(true, false, grammarAccess.getPrimarySentenceAccess().getLeftParenthesisKeyword_1_0());
match_SentenceLiteral_NotKeyword_1_0_q = new TokenAlias(false, true, grammarAccess.getSentenceLiteralAccess().getNotKeyword_1_0());
match_SetMultiplication_AsteriskKeyword_1_1_0_or_ReverseSolidusKeyword_1_1_1 = new AlternativeAlias(false, false, new TokenAlias(false, false, grammarAccess.getSetMultiplicationAccess().getAsteriskKeyword_1_1_0()), new TokenAlias(false, false, grammarAccess.getSetMultiplicationAccess().getReverseSolidusKeyword_1_1_1()));
match_SetPrimary_LeftParenthesisKeyword_1_0_a = new TokenAlias(true, true, grammarAccess.getSetPrimaryAccess().getLeftParenthesisKeyword_1_0());
match_SetPrimary_LeftParenthesisKeyword_1_0_p = new TokenAlias(true, false, grammarAccess.getSetPrimaryAccess().getLeftParenthesisKeyword_1_0());
match_pPrimarySentence_LeftParenthesisKeyword_1_0_a = new TokenAlias(true, true, grammarAccess.getPPrimarySentenceAccess().getLeftParenthesisKeyword_1_0());
match_pPrimarySentence_LeftParenthesisKeyword_1_0_p = new TokenAlias(true, false, grammarAccess.getPPrimarySentenceAccess().getLeftParenthesisKeyword_1_0());
}
@Override
protected String getUnassignedRuleCallToken(EObject semanticObject, RuleCall ruleCall, INode node) {
if (ruleCall.getRule() == grammarAccess.getLIDRule())
return getLIDToken(semanticObject, ruleCall, node);
return "";
}
/**
* terminal LID:
* ('a'..'z') ('a'..'z' | 'A'..'Z' | '_' | '0'..'9')*;
*/
protected String getLIDToken(EObject semanticObject, RuleCall ruleCall, INode node) {
if (node != null)
return getTokenText(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_Addition_HyphenMinusKeyword_1_1_1_or_PlusSignKeyword_1_1_0.equals(syntax))
emit_Addition_HyphenMinusKeyword_1_1_1_or_PlusSignKeyword_1_1_0(semanticObject, getLastNavigableState(), syntaxNodes);
else if (match_AndSentence_AndKeyword_1_1_0_or_CommaKeyword_1_1_1.equals(syntax))
emit_AndSentence_AndKeyword_1_1_0_or_CommaKeyword_1_1_1(semanticObject, getLastNavigableState(), syntaxNodes);
else if (match_GroundAddition_HyphenMinusKeyword_1_1_1_or_PlusSignKeyword_1_1_0.equals(syntax))
emit_GroundAddition_HyphenMinusKeyword_1_1_1_or_PlusSignKeyword_1_1_0(semanticObject, getLastNavigableState(), syntaxNodes);
else if (match_GroundMultiplication_AsteriskKeyword_1_1_0_or_PercentSignKeyword_1_1_2_or_SolidusKeyword_1_1_1.equals(syntax))
emit_GroundMultiplication_AsteriskKeyword_1_1_0_or_PercentSignKeyword_1_1_2_or_SolidusKeyword_1_1_1(semanticObject, getLastNavigableState(), syntaxNodes);
else if (match_MaybeLiteral_pPrimarySentence_pSentenceLiteral_MaybeKeyword_0_or___LeftParenthesisKeyword_1_0_a_NotKeyword_1_0__.equals(syntax))
emit_MaybeLiteral_pPrimarySentence_pSentenceLiteral_MaybeKeyword_0_or___LeftParenthesisKeyword_1_0_a_NotKeyword_1_0__(semanticObject, getLastNavigableState(), syntaxNodes);
else if (match_Multiplication_AsteriskKeyword_1_1_0_or_PercentSignKeyword_1_1_2_or_SolidusKeyword_1_1_1.equals(syntax))
emit_Multiplication_AsteriskKeyword_1_1_0_or_PercentSignKeyword_1_1_2_or_SolidusKeyword_1_1_1(semanticObject, getLastNavigableState(), syntaxNodes);
else if (match_PrimarySentence_LeftParenthesisKeyword_1_0_a.equals(syntax))
emit_PrimarySentence_LeftParenthesisKeyword_1_0_a(semanticObject, getLastNavigableState(), syntaxNodes);
else if (match_PrimarySentence_LeftParenthesisKeyword_1_0_p.equals(syntax))
emit_PrimarySentence_LeftParenthesisKeyword_1_0_p(semanticObject, getLastNavigableState(), syntaxNodes);
else if (match_SentenceLiteral_NotKeyword_1_0_q.equals(syntax))
emit_SentenceLiteral_NotKeyword_1_0_q(semanticObject, getLastNavigableState(), syntaxNodes);
else if (match_SetMultiplication_AsteriskKeyword_1_1_0_or_ReverseSolidusKeyword_1_1_1.equals(syntax))
emit_SetMultiplication_AsteriskKeyword_1_1_0_or_ReverseSolidusKeyword_1_1_1(semanticObject, getLastNavigableState(), syntaxNodes);
else if (match_SetPrimary_LeftParenthesisKeyword_1_0_a.equals(syntax))
emit_SetPrimary_LeftParenthesisKeyword_1_0_a(semanticObject, getLastNavigableState(), syntaxNodes);
else if (match_SetPrimary_LeftParenthesisKeyword_1_0_p.equals(syntax))
emit_SetPrimary_LeftParenthesisKeyword_1_0_p(semanticObject, getLastNavigableState(), syntaxNodes);
else if (match_pPrimarySentence_LeftParenthesisKeyword_1_0_a.equals(syntax))
emit_pPrimarySentence_LeftParenthesisKeyword_1_0_a(semanticObject, getLastNavigableState(), syntaxNodes);
else if (match_pPrimarySentence_LeftParenthesisKeyword_1_0_p.equals(syntax))
emit_pPrimarySentence_LeftParenthesisKeyword_1_0_p(semanticObject, getLastNavigableState(), syntaxNodes);
else acceptNodes(getLastNavigableState(), syntaxNodes);
}
}
/**
* Ambiguous syntax:
* '+' | '-'
*
* This ambiguous syntax occurs at:
* {Addition.lhs=} (ambiguity) rhs=Multiplication
*/
protected void emit_Addition_HyphenMinusKeyword_1_1_1_or_PlusSignKeyword_1_1_0(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
acceptNodes(transition, nodes);
}
/**
* Ambiguous syntax:
* 'and' | ','
*
* This ambiguous syntax occurs at:
* {AndSentence.left=} (ambiguity) right=PrimarySentence
*/
protected void emit_AndSentence_AndKeyword_1_1_0_or_CommaKeyword_1_1_1(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
acceptNodes(transition, nodes);
}
/**
* Ambiguous syntax:
* '+' | '-'
*
* This ambiguous syntax occurs at:
* {GroundAddition.lhs=} (ambiguity) rhs=GroundMultiplication
*/
protected void emit_GroundAddition_HyphenMinusKeyword_1_1_1_or_PlusSignKeyword_1_1_0(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
acceptNodes(transition, nodes);
}
/**
* Ambiguous syntax:
* '*' | '/' | '%'
*
* This ambiguous syntax occurs at:
* {GroundMultiplication.lhs=} (ambiguity) rhs=Primary
*/
protected void emit_GroundMultiplication_AsteriskKeyword_1_1_0_or_PercentSignKeyword_1_1_2_or_SolidusKeyword_1_1_1(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
acceptNodes(transition, nodes);
}
/**
* Ambiguous syntax:
* 'maybe' | ('('* 'not')
*
* This ambiguous syntax occurs at:
* (rule start) (ambiguity) fid=LID
*/
protected void emit_MaybeLiteral_pPrimarySentence_pSentenceLiteral_MaybeKeyword_0_or___LeftParenthesisKeyword_1_0_a_NotKeyword_1_0__(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
acceptNodes(transition, nodes);
}
/**
* Ambiguous syntax:
* '*' | '/' | '%'
*
* This ambiguous syntax occurs at:
* {Multiplication.lhs=} (ambiguity) rhs=Primary
*/
protected void emit_Multiplication_AsteriskKeyword_1_1_0_or_PercentSignKeyword_1_1_2_or_SolidusKeyword_1_1_1(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
acceptNodes(transition, nodes);
}
/**
* Ambiguous syntax:
* '('*
*
* This ambiguous syntax occurs at:
* (rule start) (ambiguity) 'not' fid=LID
* (rule start) (ambiguity) 'not'? lhs=BasicTerm
* (rule start) (ambiguity) fid=LID
* (rule start) (ambiguity) {AndSentence.left=}
* (rule start) (ambiguity) {OrSentence.left=}
*/
protected void emit_PrimarySentence_LeftParenthesisKeyword_1_0_a(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
acceptNodes(transition, nodes);
}
/**
* Ambiguous syntax:
* '('+
*
* This ambiguous syntax occurs at:
* (rule start) (ambiguity) {AndSentence.left=}
* (rule start) (ambiguity) {OrSentence.left=}
*/
protected void emit_PrimarySentence_LeftParenthesisKeyword_1_0_p(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
acceptNodes(transition, nodes);
}
/**
* Ambiguous syntax:
* 'not'?
*
* This ambiguous syntax occurs at:
* (rule start) '('* (ambiguity) lhs=BasicTerm
* (rule start) (ambiguity) lhs=BasicTerm
*/
protected void emit_SentenceLiteral_NotKeyword_1_0_q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
acceptNodes(transition, nodes);
}
/**
* Ambiguous syntax:
* '*' | '\'
*
* This ambiguous syntax occurs at:
* {SetMultiplication.left=} (ambiguity) right=SetPrimary
*/
protected void emit_SetMultiplication_AsteriskKeyword_1_1_0_or_ReverseSolidusKeyword_1_1_1(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
acceptNodes(transition, nodes);
}
/**
* Ambiguous syntax:
* '('*
*
* This ambiguous syntax occurs at:
* (rule start) (ambiguity) '{' lhs=Limit
* (rule start) (ambiguity) LID (rule start)
* (rule start) (ambiguity) lhs='{'
* (rule start) (ambiguity) lhs=BasicTerm
* (rule start) (ambiguity) {SetAddition.left=}
* (rule start) (ambiguity) {SetMultiplication.left=}
*/
protected void emit_SetPrimary_LeftParenthesisKeyword_1_0_a(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
acceptNodes(transition, nodes);
}
/**
* Ambiguous syntax:
* '('+
*
* This ambiguous syntax occurs at:
* (rule start) (ambiguity) {SetAddition.left=}
* (rule start) (ambiguity) {SetMultiplication.left=}
*/
protected void emit_SetPrimary_LeftParenthesisKeyword_1_0_p(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
acceptNodes(transition, nodes);
}
/**
* Ambiguous syntax:
* '('*
*
* This ambiguous syntax occurs at:
* (rule start) (ambiguity) 'not' fid=LID
* (rule start) (ambiguity) fid=LID
* (rule start) (ambiguity) {pAndSentence.left=}
* (rule start) (ambiguity) {pOrSentence.left=}
*/
protected void emit_pPrimarySentence_LeftParenthesisKeyword_1_0_a(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
acceptNodes(transition, nodes);
}
/**
* Ambiguous syntax:
* '('+
*
* This ambiguous syntax occurs at:
* (rule start) (ambiguity) {pAndSentence.left=}
* (rule start) (ambiguity) {pOrSentence.left=}
*/
protected void emit_pPrimarySentence_LeftParenthesisKeyword_1_0_p(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
acceptNodes(transition, nodes);
}
}