Package monq.jfa
Interface ReParser
- All Known Implementing Classes:
ReClassicParser
public interface ReParser
Defines the interface of a regular expression parser used by
NfaBuilder.matchRegex(java.lang.CharSequence) and configured with
NfaBuilder(ReParser, StateValueMerger, double)
-
Method Summary
Modifier and TypeMethodDescriptionvoidescape(StringBuilder out, CharSequence in, int startAt) starting with the character atstartAtthe givenCharSequenceis copied tooutwhile all characters with special meaning for this parser are suitably escaped.getChMap()voidparse(NfaBuilder<?> builder, CharSequence regex) Parsesregexwhile building up the automaton in the builder.provides all characters that have a special meaning for this parser
-
Method Details
-
parse
Parses
regexwhile building up the automaton in the builder.- Throws:
ReSyntaxException
-
specialChars
String specialChars()provides all characters that have a special meaning for this parser
-
escape
starting with the character at
startAtthe givenCharSequenceis copied tooutwhile all characters with special meaning for this parser are suitably escaped. The result can be used as a regular expression that matches exactly the input sequence. -
getChMap
CharUnaryOperator getChMap()
-