sig
type ('a, 'b) result = [ `Error of 'b | `Ok of 'a ]
type 'a t
val return : 'a -> 'a CCApp_parse.t
val pure : 'a -> 'a CCApp_parse.t
val junk : unit CCApp_parse.t
val fail : string -> 'a CCApp_parse.t
val failf : ('a, unit, string, 'b CCApp_parse.t) Pervasives.format4 -> 'a
val app : ('a -> 'b) CCApp_parse.t -> 'a CCApp_parse.t -> 'b CCApp_parse.t
val map : ('a -> 'b) -> 'a CCApp_parse.t -> 'b CCApp_parse.t
val int : int CCApp_parse.t
val float : float CCApp_parse.t
val bool : bool CCApp_parse.t
val char : char -> char CCApp_parse.t
val any_of : string -> char CCApp_parse.t
val alpha_lower : char CCApp_parse.t
val alpha_upper : char CCApp_parse.t
val alpha : char CCApp_parse.t
val symbols : char CCApp_parse.t
val num : char CCApp_parse.t
val alpha_num : char CCApp_parse.t
val word : string CCApp_parse.t
val quoted : string CCApp_parse.t
val str_of_l : char list -> string
val spaces : unit CCApp_parse.t
val spaces1 : unit CCApp_parse.t
val white : unit CCApp_parse.t
val white1 : unit CCApp_parse.t
val eof : unit CCApp_parse.t
val many :
?sep:unit CCApp_parse.t -> 'a CCApp_parse.t -> 'a list CCApp_parse.t
val many1 :
?sep:unit CCApp_parse.t -> 'a CCApp_parse.t -> 'a list CCApp_parse.t
val skip : 'a CCApp_parse.t -> unit CCApp_parse.t
val skip1 : 'a CCApp_parse.t -> unit CCApp_parse.t
val opt : 'a CCApp_parse.t -> 'a option CCApp_parse.t
val filter : ('a -> bool) -> 'a CCApp_parse.t -> 'a CCApp_parse.t
val switch_c :
?default:'a CCApp_parse.t ->
(char * 'a CCApp_parse.t) list -> 'a CCApp_parse.t
val switch_s : (string * 'a CCApp_parse.t) list -> 'a CCApp_parse.t
val choice : 'a CCApp_parse.t list -> 'a CCApp_parse.t
val fix : ('a CCApp_parse.t -> 'a CCApp_parse.t) -> 'a CCApp_parse.t
module Infix :
sig
val ( >|= ) : 'a CCApp_parse.t -> ('a -> 'b) -> 'b CCApp_parse.t
val ( <*> ) :
('a -> 'b) CCApp_parse.t -> 'a CCApp_parse.t -> 'b CCApp_parse.t
val ( >> ) : 'b CCApp_parse.t -> 'a CCApp_parse.t -> 'a CCApp_parse.t
val ( << ) : 'a CCApp_parse.t -> 'b CCApp_parse.t -> 'a CCApp_parse.t
val ( <+> ) : 'a CCApp_parse.t -> 'a CCApp_parse.t -> 'a CCApp_parse.t
val ( <::> ) :
'a CCApp_parse.t -> 'a list CCApp_parse.t -> 'a list CCApp_parse.t
end
val ( >|= ) : 'a t -> ('a -> 'b) -> 'b t
val ( <*> ) : ('a -> 'b) t -> 'a t -> 'b t
val ( >> ) : 'b t -> 'a t -> 'a t
val ( << ) : 'a t -> 'b t -> 'a t
val ( <+> ) : 'a t -> 'a t -> 'a t
val ( <::> ) : 'a t -> 'a list t -> 'a list t
type error = { line : int; col : int; msg : string; }
val string_of_error : CCApp_parse.error -> string
exception Error of CCApp_parse.error
module type S =
sig
type source
val parse :
CCApp_parse.S.source ->
'a CCApp_parse.t -> ('a, CCApp_parse.error) CCApp_parse.result
val parse' :
CCApp_parse.S.source ->
'a CCApp_parse.t -> ('a, string) CCApp_parse.result
val parse_exn : CCApp_parse.S.source -> 'a CCApp_parse.t -> 'a
end
module type INPUT =
sig
type t
val read : CCApp_parse.INPUT.t -> Bytes.t -> int -> int -> int
end
module Make :
functor (I : INPUT) ->
sig
type source = I.t
val parse : source -> 'a t -> ('a, error) result
val parse' : source -> 'a t -> ('a, string) result
val parse_exn : source -> 'a t -> 'a
end
val print : Format.formatter -> 'a CCApp_parse.t -> unit
type token = Yield of char | EOF
module type READER =
sig
type t
type source
val create : CCApp_parse.READER.source -> CCApp_parse.READER.t
val peek : CCApp_parse.READER.t -> CCApp_parse.token
val next : CCApp_parse.READER.t -> CCApp_parse.token
val junk : CCApp_parse.READER.t -> unit
val line : CCApp_parse.READER.t -> int
val col : CCApp_parse.READER.t -> int
end
module MakeFromReader :
functor (R : READER) ->
sig
type source = R.source
val parse : source -> 'a t -> ('a, error) result
val parse' : source -> 'a t -> ('a, string) result
val parse_exn : source -> 'a t -> 'a
end
module Str :
sig
type source = string
val parse : source -> 'a t -> ('a, error) result
val parse' : source -> 'a t -> ('a, string) result
val parse_exn : source -> 'a t -> 'a
end
module Chan :
sig
type source = in_channel
val parse : source -> 'a t -> ('a, error) result
val parse' : source -> 'a t -> ('a, string) result
val parse_exn : source -> 'a t -> 'a
end
end