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 Type
    Method
    Description
    void
    escape(StringBuilder out, CharSequence in, int startAt)
    starting with the character at startAt the given CharSequence is copied to out while all characters with special meaning for this parser are suitably escaped.
     
    void
    parse(NfaBuilder<?> builder, CharSequence regex)
    Parses regex while building up the automaton in the builder.
    provides all characters that have a special meaning for this parser
  • Method Details

    • parse

      void parse(NfaBuilder<?> builder, CharSequence regex) throws ReSyntaxException

      Parses regex while building up the automaton in the builder.

      Throws:
      ReSyntaxException
    • specialChars

      String specialChars()

      provides all characters that have a special meaning for this parser

    • escape

      void escape(StringBuilder out, CharSequence in, int startAt)

      starting with the character at startAt the given CharSequence is copied to out while 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()