sig
type regexp =
[ `After of CamomileLibrary.Type.URe.regexp
| `Alt of
CamomileLibrary.Type.URe.regexp * CamomileLibrary.Type.URe.regexp
| `Before of CamomileLibrary.Type.URe.regexp
| `BoS
| `EoS
| `Epsilon
| `Group of CamomileLibrary.Type.URe.regexp
| `OneChar
| `Rep of CamomileLibrary.Type.URe.regexp
| `Repn of CamomileLibrary.Type.URe.regexp * int * int option
| `Seq of
CamomileLibrary.Type.URe.regexp * CamomileLibrary.Type.URe.regexp
| `Set of CamomileLibrary.Type.USet.t
| `String of CamomileLibrary.Type.UChar.t list ]
type match_semantics = [ `First | `Longest | `Shortest ]
val no_group :
CamomileLibrary.Type.URe.regexp -> CamomileLibrary.Type.URe.regexp
module type Type =
sig
type text
type index
type compiled_regexp
module SubText :
sig
type t
val get : t -> int -> UChar.t
val init : int -> (int -> UChar.t) -> t
val length : t -> int
type index
val look : t -> index -> UChar.t
val nth : t -> int -> index
val first : t -> index
val last : t -> index
val next : t -> index -> index
val prev : t -> index -> index
val move : t -> index -> int -> index
val out_of_range : t -> index -> bool
val compare_index : t -> index -> index -> int
val iter : (UChar.t -> unit) -> t -> unit
val compare : t -> t -> int
module Buf :
sig
type buf
val create : int -> buf
val contents : buf -> t
val clear : buf -> unit
val reset : buf -> unit
val add_char : buf -> UChar.t -> unit
val add_string : buf -> t -> unit
val add_buffer : buf -> buf -> unit
end
type ur_text = text
type ur_index = index
val refer : ur_text -> ur_index -> ur_index -> t
val excerpt : t -> ur_text
val context : t -> ur_text * ur_index * ur_index
val ur_index_of : t -> index -> ur_index
end
val compile :
CamomileLibrary.Type.URe.regexp ->
CamomileLibrary.Type.URe.Type.compiled_regexp
val regexp_match :
?sem:CamomileLibrary.Type.URe.match_semantics ->
CamomileLibrary.Type.URe.Type.compiled_regexp ->
CamomileLibrary.Type.URe.Type.text ->
CamomileLibrary.Type.URe.Type.index ->
CamomileLibrary.Type.URe.Type.SubText.t option array option
val string_match :
CamomileLibrary.Type.URe.Type.compiled_regexp ->
CamomileLibrary.Type.URe.Type.text ->
CamomileLibrary.Type.URe.Type.index -> bool
val search_forward :
?sem:CamomileLibrary.Type.URe.match_semantics ->
CamomileLibrary.Type.URe.Type.compiled_regexp ->
CamomileLibrary.Type.URe.Type.text ->
CamomileLibrary.Type.URe.Type.index ->
CamomileLibrary.Type.URe.Type.SubText.t option array option
end
module Make :
functor (Text : UnicodeString.Type) ->
sig
type text = Text.t
type index = Text.index
type compiled_regexp
module SubText :
sig
type t
val get : t -> int -> UChar.t
val init : int -> (int -> UChar.t) -> t
val length : t -> int
type index
val look : t -> index -> UChar.t
val nth : t -> int -> index
val first : t -> index
val last : t -> index
val next : t -> index -> index
val prev : t -> index -> index
val move : t -> index -> int -> index
val out_of_range : t -> index -> bool
val compare_index : t -> index -> index -> int
val iter : (UChar.t -> unit) -> t -> unit
val compare : t -> t -> int
module Buf :
sig
type buf
val create : int -> buf
val contents : buf -> t
val clear : buf -> unit
val reset : buf -> unit
val add_char : buf -> UChar.t -> unit
val add_string : buf -> t -> unit
val add_buffer : buf -> buf -> unit
end
type ur_text = text
type ur_index = index
val refer : ur_text -> ur_index -> ur_index -> t
val excerpt : t -> ur_text
val context : t -> ur_text * ur_index * ur_index
val ur_index_of : t -> index -> ur_index
end
val compile : regexp -> compiled_regexp
val regexp_match :
?sem:match_semantics ->
compiled_regexp -> text -> index -> SubText.t option array option
val string_match : compiled_regexp -> text -> index -> bool
val search_forward :
?sem:match_semantics ->
compiled_regexp -> text -> index -> SubText.t option array option
end
end