sig
type 'a or_error = [ `Error of string | `Ok of 'a ]
type line_num = int
type col_num = int
exception ParseError of CCParse.line_num * CCParse.col_num *
(unit -> string)
module MemoTbl : sig type t val create : int -> CCParse.MemoTbl.t end
type input = {
is_done : unit -> bool;
cur : unit -> char;
next : unit -> char;
pos : unit -> int;
lnum : unit -> CCParse.line_num;
cnum : unit -> CCParse.col_num;
memo : CCParse.MemoTbl.t;
backtrack : int -> unit;
sub : int -> int -> string;
}
val input_of_string : string -> CCParse.input
val input_of_chan : ?size:int -> Pervasives.in_channel -> CCParse.input
type 'a t = CCParse.input -> ok:('a -> unit) -> err:(exn -> unit) -> unit
val return : 'a -> 'a CCParse.t
val pure : 'a -> 'a CCParse.t
val ( >|= ) : 'a CCParse.t -> ('a -> 'b) -> 'b CCParse.t
val ( >>= ) : 'a CCParse.t -> ('a -> 'b CCParse.t) -> 'b CCParse.t
val ( <*> ) : ('a -> 'b) CCParse.t -> 'a CCParse.t -> 'b CCParse.t
val ( <* ) : 'a CCParse.t -> 'b CCParse.t -> 'a CCParse.t
val ( *> ) : 'b CCParse.t -> 'a CCParse.t -> 'a CCParse.t
val fail : string -> 'a CCParse.t
val eoi : unit CCParse.t
val nop : unit CCParse.t
val char : char -> char CCParse.t
val char_if : (char -> bool) -> char CCParse.t
val chars_if : (char -> bool) -> string CCParse.t
val chars1_if : (char -> bool) -> string CCParse.t
val endline : char CCParse.t
val space : char CCParse.t
val white : char CCParse.t
val skip_chars : (char -> bool) -> unit CCParse.t
val skip_space : unit CCParse.t
val skip_white : unit CCParse.t
val is_alpha : char -> bool
val is_num : char -> bool
val is_alpha_num : char -> bool
val is_space : char -> bool
val is_white : char -> bool
val ( ~~~ ) : (char -> bool) -> char -> bool
val ( ||| ) : (char -> bool) -> (char -> bool) -> char -> bool
val ( &&& ) : (char -> bool) -> (char -> bool) -> char -> bool
val ( <|> ) : 'a CCParse.t -> 'a CCParse.t -> 'a CCParse.t
val string : string -> string CCParse.t
val many : 'a CCParse.t -> 'a list CCParse.t
val many1 : 'a CCParse.t -> 'a list CCParse.t
val skip : 'a CCParse.t -> unit CCParse.t
val sep : by:'b CCParse.t -> 'a CCParse.t -> 'a list CCParse.t
val sep1 : by:'b CCParse.t -> 'a CCParse.t -> 'a list CCParse.t
val fix : ('a CCParse.t -> 'a CCParse.t) -> 'a CCParse.t
val memo : 'a CCParse.t -> 'a CCParse.t
val fix_memo : ('a CCParse.t -> 'a CCParse.t) -> 'a CCParse.t
val parse : input:CCParse.input -> p:'a CCParse.t -> 'a CCParse.or_error
val parse_exn : input:CCParse.input -> p:'a CCParse.t -> 'a
val parse_string : string -> p:'a CCParse.t -> 'a CCParse.or_error
val parse_string_exn : string -> p:'a CCParse.t -> 'a
val parse_file :
?size:int -> file:string -> p:'a CCParse.t -> 'a CCParse.or_error
val parse_file_exn : ?size:int -> file:string -> p:'a CCParse.t -> 'a
module U :
sig
val list :
?start:string ->
?stop:string -> ?sep:string -> 'a CCParse.t -> 'a list CCParse.t
val int : int CCParse.t
val word : string CCParse.t
val map : ('a -> 'b) -> 'a CCParse.t -> 'b CCParse.t
val map2 :
('a -> 'b -> 'c) -> 'a CCParse.t -> 'b CCParse.t -> 'c CCParse.t
val map3 :
('a -> 'b -> 'c -> 'd) ->
'a CCParse.t -> 'b CCParse.t -> 'c CCParse.t -> 'd CCParse.t
val pair :
?start:string ->
?stop:string ->
?sep:string -> 'a CCParse.t -> 'b CCParse.t -> ('a * 'b) CCParse.t
val triple :
?start:string ->
?stop:string ->
?sep:string ->
'a CCParse.t ->
'b CCParse.t -> 'c CCParse.t -> ('a * 'b * 'c) CCParse.t
end
end