Package monq.jfa
Class ReClassicParser
java.lang.Object
monq.jfa.ReClassicParser
- All Implemented Interfaces:
ReParser
Implements the regular
expression syntax classically used by monq.jfa.
-
Constructor Summary
ConstructorsConstructorDescriptionReClassicParser(CharUnaryOperator chMap) Creates the parser with the given character map. -
Method Summary
Modifier and TypeMethodDescriptionvoidescape(StringBuilder out, CharSequence cin, 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 s) Parsesregexwhile building up the automaton in the builder.provides all characters that have a special meaning for this parser
-
Constructor Details
-
ReClassicParser
public ReClassicParser() -
ReClassicParser
Creates the parser with the given character map. The most commonly used mapping is probablyCharacter::toLowerCase.- Parameters:
chMap- to map characters during parsing
-
-
Method Details
-
getChMap
-
parse
Description copied from interface:ReParserParses
regexwhile building up the automaton in the builder.- Specified by:
parsein interfaceReParser- Throws:
ReSyntaxException
-
specialChars
Description copied from interface:ReParserprovides all characters that have a special meaning for this parser
- Specified by:
specialCharsin interfaceReParser
-
escape
Description copied from interface:ReParserstarting 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.
-