| 1 |
(* |
| 2 |
RE - A regular expression library |
| 3 |
|
| 4 |
Copyright (C) 2001 Jerome Vouillon |
| 5 |
email: [email protected] |
| 6 |
|
| 7 |
This library is free software; you can redistribute it and/or |
| 8 |
modify it under the terms of the GNU Lesser General Public |
| 9 |
License as published by the Free Software Foundation, with |
| 10 |
linking exception; either version 2.1 of the License, or (at |
| 11 |
your option) any later version. |
| 12 |
|
| 13 |
This library is distributed in the hope that it will be useful, |
| 14 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 16 |
Lesser General Public License for more details. |
| 17 |
|
| 18 |
You should have received a copy of the GNU Lesser General Public |
| 19 |
License along with this library; if not, write to the Free Software |
| 20 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 21 |
*) |
| 22 |
|
| 23 |
(* Character sets, represented as sorted list of intervals *) |
| 24 |
|
| 25 |
type c [@@immediate] |
| 26 |
|
| 27 |
val equal_c : c -> c -> bool |
| 28 |
val to_int : c -> int |
| 29 |
val of_int : int -> c |
| 30 |
val to_char : c -> char |
| 31 |
val of_char : char -> c |
| 32 |
|
| 33 |
type t |
| 34 |
|
| 35 |
(** special characters which isn't present in any set (not even in [cany]) *) |
| 36 |
val null_char : c |
| 37 |
|
| 38 |
val equal : t -> t -> bool |
| 39 |
val iter : t -> f:(c -> c -> unit) -> unit |
| 40 |
val union : t -> t -> t |
| 41 |
val union_all : t list -> t |
| 42 |
val intersect_all : t list -> t |
| 43 |
val inter : t -> t -> t |
| 44 |
val diff : t -> t -> t |
| 45 |
val empty : t |
| 46 |
val single : c -> t |
| 47 |
val add : c -> t -> t |
| 48 |
val mem : c -> t -> bool |
| 49 |
val case_insens : t -> t |
| 50 |
val cdigit : t |
| 51 |
val calpha : t |
| 52 |
val cword : t |
| 53 |
val notnl : t |
| 54 |
val ascii : t |
| 55 |
val nl : t |
| 56 |
val cseq : char -> char -> t |
| 57 |
val set : string -> t |
| 58 |
val blank : t |
| 59 |
val space : t |
| 60 |
val xdigit : t |
| 61 |
val lower : t |
| 62 |
val upper : t |
| 63 |
val alpha : t |
| 64 |
val alnum : t |
| 65 |
val wordc : t |
| 66 |
val cntrl : t |
| 67 |
val graph : t |
| 68 |
val print : t |
| 69 |
val punct : t |
| 70 |
val pp : t Fmt.t |
| 71 |
val one_char : t -> c option |
| 72 |
val fold_right : t -> init:'acc -> f:(c -> c -> 'acc -> 'acc) -> 'acc |
| 73 |
val hash : t -> int |
| 74 |
val compare : t -> t -> int |
| 75 |
|
| 76 |
module CSetMap : Map.S with type key = int * t |
| 77 |
|
| 78 |
val cany : t |
| 79 |
val csingle : char -> t |
| 80 |
val is_empty : t -> bool |
| 81 |
val prepend : t -> 'a list -> (t * 'a list) list -> (t * 'a list) list |
| 82 |
val pick : t -> c |
| 83 |
|
| 84 |
val offset : int -> t -> t |