package regenerate

  1. Overview
  2. Docs

Definition of Regular expressions and associated utilities.

type 'a cset = 'a list
type 'a t =
  1. | One
  2. | Set of bool * 'a cset
  3. | Seq of 'a t * 'a t
  4. | Or of 'a t * 'a t
  5. | And of 'a t * 'a t
  6. | Not of 'a t
  7. | Rep of int * int option * 'a t

Smart constructors

val epsilon : 'a t
val void : 'a t
val atom : 'a -> 'b t
val char : 'a -> 'b t
val charset : 'a cset -> 'a t
val complset : 'a cset -> 'a t
val enumerate : char -> char -> char list option
val reduce : 'a -> ('b -> 'c -> 'd) -> 'e list -> 'f
val seq : 'a t list -> 'a t
val alt : 'a t -> 'a t -> 'a t
val inter : 'a t -> 'a t -> 'a t
val compl : 'a t -> 'a t
val rep : int -> int option -> 'a t -> 'a t
val star : 'a t -> 'a t
val plus : 'a t -> 'a t
val opt : 'a t -> 'a t

QCheck utilities

val size : 'a t -> int
val prio : 'a t -> int
val pp : ?epsilon:bool -> 'a Fmt.t -> 'b t Fmt.t
val gen : compl:bool -> 'a QCheck.Gen.t -> 'b t QCheck.Gen.t
OCaml

Innovation. Community. Security.