Up

module Parser_intf

: sig
#
type 'a token = [
| `Token of 'a
| `Eof
]
#
type 'a continue = [
| `Continue of 'a
| `End
]
#
module Comm : sig
#
type ('a, 'b) t
#
val put : 'a -> 'b -> ('a, 'b) t
#
val continue : 'a -> ('a, 'b) t
#
val put_opt : 'a -> 'b option -> ('a, 'b) t
#
val put_list : 'a -> 'b list -> ('a, 'b) t
#
val warning : 'a -> msg:string -> ('a, 'b) t
#
val fatal : string -> ('a, 'b) t
end
#
module type Basic_S = sig
#
type t
#
type a
#
type b
#
val create : unit -> t
#
val parse : t -> a token -> (t, b) Comm.t
end
#
module type S = sig
include Basic_S
#
val parse_exn : ?log:(string -> unit) -> t -> a token -> t * b list
#
val parse_seq : ?log:(string -> unit) -> a Core_extended.Std.Lazy_sequence.t -> b Core_extended.Std.Lazy_sequence.t
#
val parse_lazy_list : ?log:(string -> unit) -> a Core_extended.Std.Lazy_list.t -> b Core_extended.Std.Lazy_list.t
#
val parse_list : ?log:(string -> unit) -> a list -> b list
#
val parse_pipe : ?log:(string -> unit) -> a Async.Std.Pipe.Reader.t -> b Async.Std.Pipe.Reader.t
end
#
module Make : functor (S : Basic_S) -> S with type t = S.t and type a = S.a and type b = S.b
end