mirror of
https://gitlab.com/scemama/QCaml.git
synced 2024-12-22 20:33:36 +01:00
27 lines
567 B
OCaml
27 lines
567 B
OCaml
(* Range *)
|
|
|
|
(* A range is a sorted list of integers in an interval.
|
|
*
|
|
* - ~"[a-b]"~ : range between a and b (included)
|
|
* - ~"[a]"~ : the list with only one integer a
|
|
* - ~"a"~ : equivalent to "[a]"
|
|
* - ~"[36-53,72-107,126-131]"~ represents the list of integers
|
|
* [ 37 ; 37 ; 38 ; ... ; 52 ; 53 ; 72 ; 73 ; ... ; 106 ; 107 ; 126 ; 127 ; ... ; 130 ; 131 ].
|
|
*)
|
|
|
|
(** Type *)
|
|
|
|
type t
|
|
|
|
|
|
(** Conversion *)
|
|
|
|
val of_string : string -> t
|
|
val to_string : t -> string
|
|
val to_int_list : t -> int list
|
|
|
|
|
|
(** Printers *)
|
|
|
|
val pp : Format.formatter -> t -> unit
|