if(nextNode == null) {
// A path can start from anywhere in the graph. It might happen
// that the starting state of the path has been skipped by
// the optimization in FAFactory. We use the skippedStates mapping
// to find out what is the parent state of the skipped state.
FAState parentState = skippedStates.get(nextState.stateNumber);
if(parentState == null) {
System.err.println("[GGraphGroup] Starting path state "+nextState.stateNumber+"["+nextState.enclosingRule.name+"] cannot be found in the graph");
return;
} else {
nextNode = findNodeForStateNumber(parentState.stateNumber);
}
}
continue;
} else {
state = nextState;
node = nextNode;
}
nextState = (NFAState)path.get(getPathIndex());
nextNode = findNodeForStateNumber(nextState.stateNumber);
GNode externalNode = null;
if(nextNode == null) {
// The state has probably been skipped during the graphical rendering.
// Find the next non-skipped state.
FATransition t = getNodeTransitionToNextNonSkippedState(node, path);
if(t == null) {
// No transition found. Look in the skipped states mapping because
// it might be possible that the next state is in another rule but
// cannot be found because it has been skipped.
FAState parentState = skippedStates.get(nextState.stateNumber);
if(parentState == null) {
// OK. The node really does not exist. Continue by skipping it.
nextNode = node;
continue;
} else {