use of org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynEmitterState in project xtext-core by eclipse.
the class SyntacticSequencerPDAProviderNavigatorTest method newStack.
protected RuleCallStack newStack(ISynTransition start, String... ruleCalls) {
RuleCallStack result = new RuleCallStack();
for (String name : ruleCalls) {
ISynEmitterState emitter = findEmitter(start, name, Sets.<ISynFollowerOwner>newHashSet());
result.push((RuleCall) emitter.getGrammarElement());
}
return result;
}
use of org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynEmitterState in project xtext-core by eclipse.
the class AbstractSyntacticSequencer method acceptNodes.
protected void acceptNodes(ISynNavigable fromState, INode fromNode, INode toNode) {
RuleCallStack stack = contexts.peek().stack.clone();
List<INode> nodes = collectNodes(fromNode, toNode);
if (nodes != null) {
for (INode next : nodes) {
List<ISynState> path = fromState.getShortestPathTo((AbstractElement) next.getGrammarElement(), stack);
if (path != null) {
if (path.get(path.size() - 1) instanceof ISynEmitterState)
fromState = (ISynEmitterState) path.get(path.size() - 1);
else
return;
acceptNode(next);
}
}
}
}
Aggregations