Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
org.contextmapper.servicecutter.dsl.serializer.ServiceCutterConfigurationDSLSyntacticSequencer Maven / Gradle / Ivy
/*
* generated by Xtext 2.21.0
*/
package org.contextmapper.servicecutter.dsl.serializer;
import com.google.inject.Inject;
import java.util.List;
import org.contextmapper.servicecutter.dsl.services.ServiceCutterConfigurationDSLGrammarAccess;
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 ServiceCutterConfigurationDSLSyntacticSequencer extends AbstractSyntacticSequencer {
protected ServiceCutterConfigurationDSLGrammarAccess grammarAccess;
protected AbstractElementAlias match_UseCase___ReadsKeyword_3_1_1_0_0_a_WritesKeyword_3_1_2_0_0__a;
protected AbstractElementAlias match_UseCase___ReadsKeyword_3_1_1_0_0_a_WritesKeyword_3_1_2_0_0__p;
protected AbstractElementAlias match_UseCase___ReadsKeyword_3_1_1_0_0_or_WritesKeyword_3_1_2_0_0__a;
protected AbstractElementAlias match_UseCase___WritesKeyword_3_1_2_0_0_a_ReadsKeyword_3_1_1_0_0__a;
protected AbstractElementAlias match_UseCase___WritesKeyword_3_1_2_0_0_a_ReadsKeyword_3_1_1_0_0__p;
@Inject
protected void init(IGrammarAccess access) {
grammarAccess = (ServiceCutterConfigurationDSLGrammarAccess) access;
match_UseCase___ReadsKeyword_3_1_1_0_0_a_WritesKeyword_3_1_2_0_0__a = new GroupAlias(true, true, new TokenAlias(true, true, grammarAccess.getUseCaseAccess().getReadsKeyword_3_1_1_0_0()), new TokenAlias(false, false, grammarAccess.getUseCaseAccess().getWritesKeyword_3_1_2_0_0()));
match_UseCase___ReadsKeyword_3_1_1_0_0_a_WritesKeyword_3_1_2_0_0__p = new GroupAlias(true, false, new TokenAlias(true, true, grammarAccess.getUseCaseAccess().getReadsKeyword_3_1_1_0_0()), new TokenAlias(false, false, grammarAccess.getUseCaseAccess().getWritesKeyword_3_1_2_0_0()));
match_UseCase___ReadsKeyword_3_1_1_0_0_or_WritesKeyword_3_1_2_0_0__a = new AlternativeAlias(true, true, new TokenAlias(false, false, grammarAccess.getUseCaseAccess().getReadsKeyword_3_1_1_0_0()), new TokenAlias(false, false, grammarAccess.getUseCaseAccess().getWritesKeyword_3_1_2_0_0()));
match_UseCase___WritesKeyword_3_1_2_0_0_a_ReadsKeyword_3_1_1_0_0__a = new GroupAlias(true, true, new TokenAlias(true, true, grammarAccess.getUseCaseAccess().getWritesKeyword_3_1_2_0_0()), new TokenAlias(false, false, grammarAccess.getUseCaseAccess().getReadsKeyword_3_1_1_0_0()));
match_UseCase___WritesKeyword_3_1_2_0_0_a_ReadsKeyword_3_1_1_0_0__p = new GroupAlias(true, false, new TokenAlias(true, true, grammarAccess.getUseCaseAccess().getWritesKeyword_3_1_2_0_0()), new TokenAlias(false, false, grammarAccess.getUseCaseAccess().getReadsKeyword_3_1_1_0_0()));
}
@Override
protected String getUnassignedRuleCallToken(EObject semanticObject, RuleCall ruleCall, INode node) {
if (ruleCall.getRule() == grammarAccess.getCLOSERule())
return getCLOSEToken(semanticObject, ruleCall, node);
else if (ruleCall.getRule() == grammarAccess.getOPENRule())
return getOPENToken(semanticObject, ruleCall, node);
return "";
}
/**
* terminal CLOSE: '}';
*/
protected String getCLOSEToken(EObject semanticObject, RuleCall ruleCall, INode node) {
if (node != null)
return getTokenText(node);
return "}";
}
/**
* terminal OPEN: '{';
*/
protected String getOPENToken(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 transitionNodes = collectNodes(fromNode, toNode);
for (AbstractElementAlias syntax : transition.getAmbiguousSyntaxes()) {
List syntaxNodes = getNodesFor(transitionNodes, syntax);
if (match_UseCase___ReadsKeyword_3_1_1_0_0_a_WritesKeyword_3_1_2_0_0__a.equals(syntax))
emit_UseCase___ReadsKeyword_3_1_1_0_0_a_WritesKeyword_3_1_2_0_0__a(semanticObject, getLastNavigableState(), syntaxNodes);
else if (match_UseCase___ReadsKeyword_3_1_1_0_0_a_WritesKeyword_3_1_2_0_0__p.equals(syntax))
emit_UseCase___ReadsKeyword_3_1_1_0_0_a_WritesKeyword_3_1_2_0_0__p(semanticObject, getLastNavigableState(), syntaxNodes);
else if (match_UseCase___ReadsKeyword_3_1_1_0_0_or_WritesKeyword_3_1_2_0_0__a.equals(syntax))
emit_UseCase___ReadsKeyword_3_1_1_0_0_or_WritesKeyword_3_1_2_0_0__a(semanticObject, getLastNavigableState(), syntaxNodes);
else if (match_UseCase___WritesKeyword_3_1_2_0_0_a_ReadsKeyword_3_1_1_0_0__a.equals(syntax))
emit_UseCase___WritesKeyword_3_1_2_0_0_a_ReadsKeyword_3_1_1_0_0__a(semanticObject, getLastNavigableState(), syntaxNodes);
else if (match_UseCase___WritesKeyword_3_1_2_0_0_a_ReadsKeyword_3_1_1_0_0__p.equals(syntax))
emit_UseCase___WritesKeyword_3_1_2_0_0_a_ReadsKeyword_3_1_1_0_0__p(semanticObject, getLastNavigableState(), syntaxNodes);
else acceptNodes(getLastNavigableState(), syntaxNodes);
}
}
/**
* Ambiguous syntax:
* ('reads'* 'writes')*
*
* This ambiguous syntax occurs at:
* nanoentitiesWritten+=STRING (ambiguity) ',' nanoentitiesWritten+=STRING
* nanoentitiesWritten+=STRING (ambiguity) nanoentitiesWritten+=STRING
*/
protected void emit_UseCase___ReadsKeyword_3_1_1_0_0_a_WritesKeyword_3_1_2_0_0__a(EObject semanticObject, ISynNavigable transition, List nodes) {
acceptNodes(transition, nodes);
}
/**
* Ambiguous syntax:
* ('reads'* 'writes')+
*
* This ambiguous syntax occurs at:
* isLatencyCritical?='true' (ambiguity) ',' nanoentitiesWritten+=STRING
* isLatencyCritical?='true' (ambiguity) nanoentitiesWritten+=STRING
* name=ID OPEN (ambiguity) ',' nanoentitiesWritten+=STRING
* name=ID OPEN (ambiguity) nanoentitiesWritten+=STRING
* nanoentitiesRead+=STRING (ambiguity) ',' nanoentitiesWritten+=STRING
* nanoentitiesRead+=STRING (ambiguity) nanoentitiesWritten+=STRING
* nanoentitiesWritten+=STRING (ambiguity) nanoentitiesWritten+=STRING
*/
protected void emit_UseCase___ReadsKeyword_3_1_1_0_0_a_WritesKeyword_3_1_2_0_0__p(EObject semanticObject, ISynNavigable transition, List nodes) {
acceptNodes(transition, nodes);
}
/**
* Ambiguous syntax:
* ('reads' | 'writes')*
*
* This ambiguous syntax occurs at:
* isLatencyCritical?='true' (ambiguity) 'isLatencyCritical' '=' isLatencyCritical?='true'
* isLatencyCritical?='true' (ambiguity) CLOSE (rule end)
* name=ID OPEN (ambiguity) 'isLatencyCritical' '=' isLatencyCritical?='true'
* name=ID OPEN (ambiguity) CLOSE (rule end)
* nanoentitiesRead+=STRING (ambiguity) 'isLatencyCritical' '=' isLatencyCritical?='true'
* nanoentitiesRead+=STRING (ambiguity) CLOSE (rule end)
* nanoentitiesWritten+=STRING (ambiguity) 'isLatencyCritical' '=' isLatencyCritical?='true'
* nanoentitiesWritten+=STRING (ambiguity) CLOSE (rule end)
*/
protected void emit_UseCase___ReadsKeyword_3_1_1_0_0_or_WritesKeyword_3_1_2_0_0__a(EObject semanticObject, ISynNavigable transition, List nodes) {
acceptNodes(transition, nodes);
}
/**
* Ambiguous syntax:
* ('writes'* 'reads')*
*
* This ambiguous syntax occurs at:
* nanoentitiesRead+=STRING (ambiguity) ',' nanoentitiesRead+=STRING
* nanoentitiesRead+=STRING (ambiguity) nanoentitiesRead+=STRING
*/
protected void emit_UseCase___WritesKeyword_3_1_2_0_0_a_ReadsKeyword_3_1_1_0_0__a(EObject semanticObject, ISynNavigable transition, List nodes) {
acceptNodes(transition, nodes);
}
/**
* Ambiguous syntax:
* ('writes'* 'reads')+
*
* This ambiguous syntax occurs at:
* isLatencyCritical?='true' (ambiguity) ',' nanoentitiesRead+=STRING
* isLatencyCritical?='true' (ambiguity) nanoentitiesRead+=STRING
* name=ID OPEN (ambiguity) ',' nanoentitiesRead+=STRING
* name=ID OPEN (ambiguity) nanoentitiesRead+=STRING
* nanoentitiesRead+=STRING (ambiguity) nanoentitiesRead+=STRING
* nanoentitiesWritten+=STRING (ambiguity) ',' nanoentitiesRead+=STRING
* nanoentitiesWritten+=STRING (ambiguity) nanoentitiesRead+=STRING
*/
protected void emit_UseCase___WritesKeyword_3_1_2_0_0_a_ReadsKeyword_3_1_1_0_0__p(EObject semanticObject, ISynNavigable transition, List nodes) {
acceptNodes(transition, nodes);
}
}