final IterativeCondition<T> proceedCondition = getTrueFunction();
true); IterativeCondition<T> proceedCondition = getTrueFunction(); final State<T> loopingState = createState(currentPattern.getName(), State.StateType.Normal);
final IterativeCondition<T> proceedCondition = getTrueFunction();
final IterativeCondition<T> proceedCondition = getTrueFunction();
true); IterativeCondition<T> proceedCondition = getTrueFunction(); final State<T> loopingState = createState(currentPattern.getName(), State.StateType.Normal);
true); IterativeCondition<T> proceedCondition = getTrueFunction(); final State<T> loopingState = createState(currentPattern.getName(), State.StateType.Normal);
final State<T> proceedState, final boolean isOptional) { final IterativeCondition<T> proceedCondition = getTrueFunction();
final State<T> proceedState, final boolean isOptional) { final IterativeCondition<T> proceedCondition = getTrueFunction();
/** * Create the states for the group pattern as a looping one. * * @param groupPattern the group pattern to create the states for * @param sinkState the state that the group pattern being converted should point to * @return the first state of the states of the group pattern */ private State<T> createLoopingGroupPatternState( final GroupPattern<T, ?> groupPattern, final State<T> sinkState) { final IterativeCondition<T> proceedCondition = getTrueFunction(); Pattern<T, ?> oldCurrentPattern = currentPattern; Pattern<T, ?> oldFollowingPattern = followingPattern; GroupPattern<T, ?> oldGroupPattern = currentGroupPattern; final State<T> dummyState = createState(currentPattern.getName(), State.StateType.Normal); State<T> lastSink = dummyState; currentGroupPattern = groupPattern; currentPattern = groupPattern.getRawPattern(); lastSink = createMiddleStates(lastSink); lastSink = convertPattern(lastSink); lastSink.addProceed(sinkState, proceedCondition); dummyState.addProceed(lastSink, proceedCondition); currentPattern = oldCurrentPattern; followingPattern = oldFollowingPattern; currentGroupPattern = oldGroupPattern; return lastSink; }
/** * Create the states for the group pattern as a looping one. * * @param groupPattern the group pattern to create the states for * @param sinkState the state that the group pattern being converted should point to * @return the first state of the states of the group pattern */ private State<T> createLoopingGroupPatternState( final GroupPattern<T, ?> groupPattern, final State<T> sinkState) { final IterativeCondition<T> proceedCondition = getTrueFunction(); Pattern<T, ?> oldCurrentPattern = currentPattern; Pattern<T, ?> oldFollowingPattern = followingPattern; GroupPattern<T, ?> oldGroupPattern = currentGroupPattern; final State<T> dummyState = createState(currentPattern.getName(), State.StateType.Normal); State<T> lastSink = dummyState; currentGroupPattern = groupPattern; currentPattern = groupPattern.getRawPattern(); lastSink = createMiddleStates(lastSink); lastSink = convertPattern(lastSink); lastSink.addProceed(sinkState, proceedCondition); dummyState.addProceed(lastSink, proceedCondition); currentPattern = oldCurrentPattern; followingPattern = oldFollowingPattern; currentGroupPattern = oldGroupPattern; return lastSink; }
final State<T> proceedState, final boolean isOptional) { final IterativeCondition<T> proceedCondition = getTrueFunction();
/** * Create the states for the group pattern as a looping one. * * @param groupPattern the group pattern to create the states for * @param sinkState the state that the group pattern being converted should point to * @return the first state of the states of the group pattern */ private State<T> createLoopingGroupPatternState( final GroupPattern<T, ?> groupPattern, final State<T> sinkState) { final IterativeCondition<T> proceedCondition = getTrueFunction(); Pattern<T, ?> oldCurrentPattern = currentPattern; Pattern<T, ?> oldFollowingPattern = followingPattern; GroupPattern<T, ?> oldGroupPattern = currentGroupPattern; final State<T> dummyState = createState(currentPattern.getName(), State.StateType.Normal); State<T> lastSink = dummyState; currentGroupPattern = groupPattern; currentPattern = groupPattern.getRawPattern(); lastSink = createMiddleStates(lastSink); lastSink = convertPattern(lastSink); lastSink.addProceed(sinkState, proceedCondition); dummyState.addProceed(lastSink, proceedCondition); currentPattern = oldCurrentPattern; followingPattern = oldFollowingPattern; currentGroupPattern = oldGroupPattern; return lastSink; }