/** * Compiles the given pattern into a {@link NFAFactory}. The NFA factory can be used to create * multiple NFAs. */ void compileFactory() { if (currentPattern.getQuantifier().getConsumingStrategy() == Quantifier.ConsumingStrategy.NOT_FOLLOW) { throw new MalformedPatternException("NotFollowedBy is not supported as a last part of a Pattern!"); } checkPatternNameUniqueness(); checkPatternSkipStrategy(); // we're traversing the pattern from the end to the beginning --> the first state is the final state State<T> sinkState = createEndingState(); // add all the normal states sinkState = createMiddleStates(sinkState); // add the beginning state createStartState(sinkState); }
/** * Compiles the given pattern into a {@link NFAFactory}. The NFA factory can be used to create * multiple NFAs. */ void compileFactory() { if (currentPattern.getQuantifier().getConsumingStrategy() == Quantifier.ConsumingStrategy.NOT_FOLLOW) { throw new MalformedPatternException("NotFollowedBy is not supported as a last part of a Pattern!"); } checkPatternNameUniqueness(); checkPatternSkipStrategy(); // we're traversing the pattern from the end to the beginning --> the first state is the final state State<T> sinkState = createEndingState(); // add all the normal states sinkState = createMiddleStates(sinkState); // add the beginning state createStartState(sinkState); }
/** * Compiles the given pattern into a {@link NFAFactory}. The NFA factory can be used to create * multiple NFAs. */ void compileFactory() { if (currentPattern.getQuantifier().getConsumingStrategy() == Quantifier.ConsumingStrategy.NOT_FOLLOW) { throw new MalformedPatternException("NotFollowedBy is not supported as a last part of a Pattern!"); } // we're traversing the pattern from the end to the beginning --> the first state is the final state State<T> sinkState = createEndingState(); // add all the normal states sinkState = createMiddleStates(sinkState); // add the beginning state createStartState(sinkState); }
/** * Compiles the given pattern into a {@link NFAFactory}. The NFA factory can be used to create * multiple NFAs. */ void compileFactory() { if (currentPattern.getQuantifier().getConsumingStrategy() == Quantifier.ConsumingStrategy.NOT_FOLLOW) { throw new MalformedPatternException("NotFollowedBy is not supported as a last part of a Pattern!"); } checkPatternNameUniqueness(); checkPatternSkipStrategy(); // we're traversing the pattern from the end to the beginning --> the first state is the final state State<T> sinkState = createEndingState(); // add all the normal states sinkState = createMiddleStates(sinkState); // add the beginning state createStartState(sinkState); }