sig
type t = Type.t = Atom of string | List of Sexp_intf.S.t list
val default_indent : int Pervasives.ref
val size : Sexp_intf.S.t -> int * int
val scan_sexp : ?buf:Buffer.t -> Lexing.lexbuf -> Sexp_intf.S.t
val scan_sexps : ?buf:Buffer.t -> Lexing.lexbuf -> Sexp_intf.S.t list
val scan_iter_sexps :
?buf:Buffer.t -> f:(Sexp_intf.S.t -> unit) -> Lexing.lexbuf -> unit
val scan_fold_sexps :
?buf:Buffer.t ->
f:('a -> Sexp_intf.S.t -> 'a) -> init:'a -> Lexing.lexbuf -> 'a
val scan_cnv_sexps :
?buf:Buffer.t -> f:(Sexp_intf.S.t -> 'a) -> Lexing.lexbuf -> 'a list
type parse_pos =
Pre_sexp.parse_pos = private {
mutable text_line : int;
mutable text_char : int;
mutable buf_pos : int;
}
type 'a parse_result =
'a Pre_sexp.parse_result =
Done of Sexp_intf.S.t * Sexp_intf.S.parse_pos
| Cont of bool * 'a Sexp_intf.S.parse_fun
and 'a parse_fun = pos:int -> len:int -> 'a -> 'a Sexp_intf.S.parse_result
type parse_state =
Pre_sexp.parse_state = private {
parse_pos : Sexp_intf.S.parse_pos;
mutable pstack : Sexp_intf.S.t list list;
pbuf : Buffer.t;
}
type parse_error =
Pre_sexp.parse_error = {
location : string;
err_msg : string;
parse_state : Sexp_intf.S.parse_state;
}
exception Parse_error of Sexp_intf.S.parse_error
val parse :
?text_line:int ->
?text_char:int ->
?pos:int -> ?len:int -> string -> string Sexp_intf.S.parse_result
type bstr =
(char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t
val parse_bstr :
?text_line:int ->
?text_char:int ->
?pos:int ->
?len:int -> Sexp_intf.S.bstr -> Sexp_intf.S.bstr Sexp_intf.S.parse_result
val input_sexp :
?text_line:int ->
?text_char:int -> ?buf_pos:int -> Pervasives.in_channel -> Sexp_intf.S.t
val input_sexps :
?text_line:int ->
?text_char:int ->
?buf_pos:int ->
?buf:string -> Pervasives.in_channel -> Sexp_intf.S.t list
val input_rev_sexps :
?text_line:int ->
?text_char:int ->
?buf_pos:int ->
?buf:string -> Pervasives.in_channel -> Sexp_intf.S.t list
val load_sexp : ?buf:string -> string -> Sexp_intf.S.t
val load_sexps : ?buf:string -> string -> Sexp_intf.S.t list
val load_rev_sexps : ?buf:string -> string -> Sexp_intf.S.t list
val output_hum : Pervasives.out_channel -> Sexp_intf.S.t -> unit
val output_hum_indent :
int -> Pervasives.out_channel -> Sexp_intf.S.t -> unit
val output_mach : Pervasives.out_channel -> Sexp_intf.S.t -> unit
val output : Pervasives.out_channel -> Sexp_intf.S.t -> unit
val save_hum : string -> Sexp_intf.S.t -> unit
val save_mach : string -> Sexp_intf.S.t -> unit
val save : string -> Sexp_intf.S.t -> unit
val save_sexps : string -> Sexp_intf.S.t list -> unit
val pp_hum : Format.formatter -> Sexp_intf.S.t -> unit
val pp_hum_indent : int -> Format.formatter -> Sexp_intf.S.t -> unit
val pp_mach : Format.formatter -> Sexp_intf.S.t -> unit
val pp : Format.formatter -> Sexp_intf.S.t -> unit
val of_string : string -> Sexp_intf.S.t
val of_bstr : Sexp_intf.S.bstr -> Sexp_intf.S.t
val to_string_hum : ?indent:int -> Sexp_intf.S.t -> string
val to_string_mach : Sexp_intf.S.t -> string
val to_string : Sexp_intf.S.t -> string
val to_buffer_hum : buf:Buffer.t -> ?indent:int -> Sexp_intf.S.t -> unit
val to_buffer_mach : buf:Buffer.t -> Sexp_intf.S.t -> unit
val to_buffer : buf:Buffer.t -> Sexp_intf.S.t -> unit
val unit : Sexp_intf.S.t
external sexp_of_t : Sexp_intf.S.t -> Sexp_intf.S.t = "%identity"
external t_of_sexp : Sexp_intf.S.t -> Sexp_intf.S.t = "%identity"
type found = [ `Found | `Pos of int * Sexp_intf.S.found ]
type search_result =
[ `Found | `Not_found | `Pos of int * Sexp_intf.S.found ]
val search_physical :
Sexp_intf.S.t -> contained:Sexp_intf.S.t -> Sexp_intf.S.search_result
val subst_found :
Sexp_intf.S.t ->
subst:Sexp_intf.S.t -> Sexp_intf.S.found -> Sexp_intf.S.t
end