package sexplib
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=da863b42b81235fdcf45eb32c04fb8bde22ff446a779cfb6f989730a35103160
doc/sexplib/Sexplib/Sexp/Annotated/index.html
Module Sexp.Annotated
Source
Module for parsing S-expressions annotated with location information
Position information for annotated S-expressions
Range information for annotated S-expressions
S-expression annotated with location information
Type of conversion results of annotated S-expressions.
Exception associated with conversion errors. First argument describes the location, the second the reason.
Stack used by annotation parsers
Annotated (partial) parsing
parse ?parse_pos ?len str
same as parse
, but returns an S-expression annotated with location information.
val parse_bigstring :
?parse_pos:Parse_pos.t ->
?len:int ->
bigstring ->
(bigstring, t) parse_result
parse_bigstring ?parse_pos ?len str
same as parse_bigstring
, but returns an S-expression annotated with location information.
input_sexp ?parse_pos ic
like input_sexp
, but returns an annotated S-expression instead.
input_sexps ?parse_pos ?buf ic
like input_sexps
, but returns a list of annotated S-expressions.
input_sexps ?parse_pos ?buf ic
like input_rev_sexps
, but returns a list of annotated S-expressions.
Loading of annotated S-expressions
NOTE: these functions should only be used if an annotated S-expression is required.
load_sexp ?strict ?buf file
like load_sexp
, but returns an annotated S-expression.
load_sexps ?buf file
like load_sexps
, but returns a list of annotated S-expressions.
load_rev_sexps ?buf file
like load_rev_sexps
, but returns a list of annotated S-expressions.
String and bigstring conversions
of_string str
same as of_string
, but returns an annotated S-expression.
of_string_many
same as of_string_many
, but returns a list of annotated S-expressions.
Similar to of_string_many
, on parse failure it raises Parsexp.Parse_error
rather than a native Sexplib.Sexp.Parse_error
.
of_bigstring bstr
same as of_string
, but operates on bigstrings.
Converters using annotations for determining error locations
conv f annot_sexp
converts the S-expression associated with annotated S-expression annot_sexp
using f
.