package parsexp

  1. Overview
  2. Docs
S-expression parsing library

Install

dune-project
 Dependency

Authors

Maintainers

Sources

parsexp-v0.15.0.tar.gz
sha256=d1ee902b12ac7c0c888863025990d06845530fb75328454814e5ce5b6d43d193

doc/parsexp/Parsexp/module-type-Parser/index.html

Module type Parsexp.ParserSource

Sourcetype parsed_value

Values produced by the parser

Sourcemodule State : sig ... end
Sourcemodule Stack : sig ... end
Sourceval feed : State.t -> char -> Stack.t -> Stack.t

Feed one character to the parser. In case of error, it raises Parse_error

Sourceval feed_eoi : State.t -> Stack.t -> parsed_value

Instruct the parser that the end of input was reached. In case of error, it raises Parse_error

Convenience functions

Sourceval feed_string : State.t -> string -> Stack.t -> Stack.t
Sourceval feed_substring : State.t -> string -> pos:int -> len:int -> Stack.t -> Stack.t
Sourceval feed_bytes : State.t -> bytes -> Stack.t -> Stack.t
Sourceval feed_subbytes : State.t -> bytes -> pos:int -> len:int -> Stack.t -> Stack.t

High-level functions

Sourceval parse_string : string -> (parsed_value, Parse_error.t) result
Sourceval parse_string_exn : string -> parsed_value