Parser automaton
Warning: the API of this module is not fixed and might change! Use Sexp_parsing for the stable version.
include module type of Parsexp__.Parser_automaton_internal.Public
type ('u, 's) mode
=
| Single | (** Parse a single s-expression *) | |||
| Many | (** Parse a list of s-expressions *) | |||
| Eager of {
}
| (** Gives back s-expressions as soon as they are found. *) |
val empty_stack : stack
val empty_stack_cst : stack_cst
type ('u, 's) kind
=
| Positions : (Parsexp.Positions.Builder.t, unit) kind |
| Sexp : (unit, stack) kind |
| Sexp_with_positions : (Parsexp.Positions.Builder.t, stack) kind |
| Cst : (state_cst, stack_cst) kind |
val new_state : ?initial_pos:Parsexp.Positions.pos ‑> ('u, 's) mode ‑> ('u, 's) kind ‑> ('u, 's) state
val reset : ?pos:Parsexp.Positions.pos ‑> (_, _) state ‑> unit
val positions : (Parsexp.Positions.Builder.t, _) state ‑> Parsexp.Positions.t
val column : (_, _) state ‑> int
val set_error_state : (_, _) state ‑> unit
val sexp_of_stack : stack ‑> Parsexp__.Import.Ppx_sexp_conv_lib.Sexp.t
val sexps_of_stack : stack ‑> Parsexp__.Import.Ppx_sexp_conv_lib.Sexp.t list
val sexps_cst_of_stack : stack_cst ‑> Parsexp.Cst.t_or_comment list
module Error = Parsexp__.Parser_automaton_internal.Public.Error
exception
Parse_error of Error.t
val feed : ('u, 's) state ‑> char ‑> 's ‑> 's
val feed_eoi : ('u, 's) state ‑> 's ‑> 's