sig
type pos = Annot.pos = { line : int; col : int; offset : int; }
type range = Annot.range = { start_pos : pos; end_pos : pos; }
type t = Annot.t = Atom of range * Type.t | List of range * t list * Type.t
type 'a conv = [ `Error of exn * t | `Result of 'a ]
exception Conv_exn of string * exn
type stack =
Annot.stack = {
mutable positions : pos list;
mutable stack : t list list;
}
val get_sexp : t -> Type.t
val get_range : t -> range
exception Annot_sexp of t
val find_sexp : t -> Type.t -> t option
val parse :
?parse_pos:Pre_sexp.Parse_pos.t ->
?len:int -> string -> (string, Pre_sexp.Annot.t) Pre_sexp.parse_result
val parse_bigstring :
?parse_pos:Pre_sexp.Parse_pos.t ->
?len:int ->
Pre_sexp.bigstring ->
(Pre_sexp.bigstring, Pre_sexp.Annot.t) Pre_sexp.parse_result
val input_rev_sexps :
?parse_pos:Pre_sexp.Parse_pos.t ->
?buf:string -> Pervasives.in_channel -> Pre_sexp.Annot.t list
val input_sexp :
?parse_pos:Pre_sexp.Parse_pos.t ->
Pervasives.in_channel -> Pre_sexp.Annot.t
val input_sexps :
?parse_pos:Pre_sexp.Parse_pos.t ->
?buf:string -> Pervasives.in_channel -> Pre_sexp.Annot.t list
val of_string : string -> Pre_sexp.Annot.t
val of_bigstring : Pre_sexp.bigstring -> Pre_sexp.Annot.t
val load_rev_sexps : ?buf:string -> string -> Pre_sexp.Annot.t list
val load_sexps : ?buf:string -> string -> Pre_sexp.Annot.t list
val load_sexp : ?strict:bool -> ?buf:string -> string -> Pre_sexp.Annot.t
val conv : (Type.t -> 'a) -> t -> [> `Error of exn * t | `Result of 'a ]
val get_conv_exn : file:string -> exc:exn -> t -> exn
end