Documentation

Regex.Compiler

Compiler #

Compile from a regex's high-level intermediate representation (Syntax.Hir) into an NFA state graph (NFA).

The configuration used for a Thompson NFA compiler.

  • unanchored_prefix : Bool

    Whether to compile an unanchored prefix into this NFA.

  • unanchored_prefix_simulation : Bool

    Whether to simulate an unanchored prefix with the backtracker.

  • fuel : Nat

    Max recurciosn deth in compilation

Instances For
    Equations

    A value that represents the result of compiling a sub-expression of a regex's HIR. Specifically, this represents a sub-graph of the NFA that has an initial state at start and a final state at end.

    Instances For
      @[reducible, inline]
      Equations
      Instances For
        @[reducible, inline]
        abbrev Compiler.States' (states : States) :
        Equations
        Instances For
          @[reducible, inline]
          Equations
          Instances For
            @[reducible, inline]
            abbrev Compiler.StateIDStates' (states states' : States) :
            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              @[reducible, inline]
              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                def Compiler.ThompsonRefStates.mk {states : States} (arg1Start arg1End : NFA.Unchecked.StateID) (arg2 : States) (h : arg1Start < arg2.val.size arg1End < arg2.val.size states.val.size < arg2.val.size) :
                Equations
                Instances For
                  def Compiler.ThompsonRefStates.castLt {states states' : States} (t : ThompsonRefStates states) (h : states'.val.size < t.val.snd.val.size) :
                  Equations
                  Instances For
                    @[reducible, inline]
                    Equations
                    Instances For

                      Compile the HIR expression given.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For