package alba

  1. Overview
  2. Docs

Parameters

Signature

type token = T.t
type final = F.t
type parser
include COMBINATORS with type expect = Expect.t and type semantic = Semantic.t
type 'a t
type expect = Expect.t
type semantic = Semantic.t
val return : 'a -> 'a t
val succeed : 'a -> 'a t
val unexpected : expect -> 'a t
val fail : semantic -> 'a t
val consumer : 'a t -> 'a t
val map : ('a -> 'b) -> 'a t -> 'b t
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (<|>) : 'a t -> 'a t -> 'a t
val (<?>) : 'a t -> expect -> 'a t
val backtrackable : 'a t -> expect -> 'a t
val not_followed_by : 'a t -> expect -> unit t
val optional : 'a t -> 'a option t
val one_of : 'a t list -> 'a t
val zero_or_more : 'a t -> 'a list t
val one_or_more : 'a t -> 'a list t
val one_or_more_separated : 'a t -> _ t -> 'a list t
val zero_or_more_separated : 'a t -> _ t -> 'a list t
val skip_zero_or_more : 'a t -> int t
val skip_one_or_more : 'a t -> int t
val (|=) : ('a -> 'b) t -> 'a t -> 'b t
val (|.) : 'a t -> _ t -> 'a t
module Error : ERROR with type semantic = Semantic.t and type expect = Expect.t
val needs_more : parser -> bool
val has_ended : parser -> bool
val put_token : parser -> token -> parser
val state : parser -> S.t
val result : parser -> final option
val error : parser -> Error.t
val error_string : parser -> (Expect.t -> string) -> (Semantic.t -> string) -> string
val lookahead : parser -> token list
val has_succeeded : parser -> bool
val has_failed : parser -> bool
val make_parser : S.t -> final t -> parser
val get : S.t t
val update : (S.t -> S.t) -> unit t
val get_and_update : (S.t -> S.t) -> S.t t
val token : (S.t -> token -> ('a * S.t, Expect.t) Stdlib.result) -> 'a t
OCaml

Innovation. Community. Security.