package ecaml

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Ecaml.RxSource

Sourcemodule Named_char_class : sig ... end
Sourcemodule Char_class : sig ... end
Sourcemodule Start_or_end : sig ... end
Sourcetype t =
  1. | Any_char
  2. | Any_in of Ecaml__.Rx_intf.Char_class.t list
  3. | Exactly of string
    (*

    Exactly s matches exactly the string s (e.g., '.' only matches '.')

    *)
  4. | Line of Ecaml__.Rx_intf.Start_or_end.t
  5. | None_in of Ecaml__.Rx_intf.Char_class.t list
  6. | One_or_more of t
  7. | Or of t list
  8. | Pattern of string
    (*

    Pattern s interprets s as a regexp (e.g., '.' matches any character)

    *)
  9. | Point
    (*

    Matches zero characters, but only where the point is.

    *)
  10. | Repeat of {
    1. min : int;
    2. max : int option;
    3. t : t;
    }
  11. | Seq of t list
  12. | Submatch of t
    (*

    Text matched by Submatch can be retrieved using Regexp.Last_match.text_exn ~subexp:index.

    index is the number of parentheses to the left of this submatch in the regexp pattern.

    *)
  13. | Submatch_n of {
    1. index : int;
    2. t : t;
    }
    (*

    Text matched by Submatch_n can be retrieved using Regexp.Last_match.text_exn ~subexp:index.

    index must be at least the number of parentheses left of this submatch in the regexp pattern. If index is greater, it will shadow the submatch that would have been assigned that index. If index is less, then it is an error to use the resulting regexp.

    *)
  14. | Zero_or_more of t
  15. | Zero_or_one of t
Sourceval sexp_of_t : t -> Sexplib0.Sexp.t
Sourceval pattern : t -> string