| 1 |
(** Information about groups in a match. *) |
| 2 |
|
| 3 |
(** Result of a successful match. *) |
| 4 |
type t |
| 5 |
|
| 6 |
val create : string -> gcount:int -> gpos:int array -> Mark_infos.t -> Pmark.Set.t -> t |
| 7 |
|
| 8 |
(** Raise [Not_found] if the group did not match *) |
| 9 |
val get : t -> int -> string |
| 10 |
|
| 11 |
(** Similar to {!get}, but returns an option instead of using an exception. *) |
| 12 |
val get_opt : t -> int -> string option |
| 13 |
|
| 14 |
(** Raise [Not_found] if the group did not match *) |
| 15 |
val offset : t -> int -> int * int |
| 16 |
|
| 17 |
val offset_opt : t -> int -> (int * int) option |
| 18 |
|
| 19 |
(** Return the start of the match. Raise [Not_found] if the group did not match. *) |
| 20 |
val start : t -> int -> int |
| 21 |
|
| 22 |
val start_opt : t -> int -> int option |
| 23 |
|
| 24 |
(** Return the end of the match. Raise [Not_found] if the group did not match. *) |
| 25 |
val stop : t -> int -> int |
| 26 |
|
| 27 |
val stop_opt : t -> int -> int option |
| 28 |
|
| 29 |
(** Return the empty string for each group which did not match *) |
| 30 |
val all : t -> string array |
| 31 |
|
| 32 |
(** Return [(-1,-1)] for each group which did not match *) |
| 33 |
val all_offset : t -> (int * int) array |
| 34 |
|
| 35 |
(** Test whether a group matched *) |
| 36 |
val test : t -> int -> bool |
| 37 |
|
| 38 |
val pmarks : t -> Pmark.Set.t |
| 39 |
|
| 40 |
(** Returns the total number of groups defined - matched or not. |
| 41 |
This function is experimental. *) |
| 42 |
val nb_groups : t -> int |
| 43 |
|
| 44 |
val pp : t Fmt.t |