package starpath

  1. Overview
  2. Docs

Parameters

module Pos : Pos

Signature

include Combinators with type token = CharToken.t with type pos = Pos.t with type pos0_arg = Pos.pos0_arg
type token = CharToken.t
type pos = Pos.t
type pos0_arg = Pos.pos0_arg
type parse_error = {
  1. pos : pos;
  2. expected : string list;
  3. actual : string;
}
val string_of_parse_error : parse_error -> string
type 'a t
val parse : pos0_arg -> (pos * token) Seq.t -> 'a t -> ('a, parse_error) result
val (>>|) : 'a t -> ('a -> 'b) -> 'b t
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (<|>) : 'a t -> 'a t -> 'a t
val (<*) : 'a t -> 'b t -> 'a t
val (*>) : 'a t -> 'b t -> 'b t
val (@>) : 'a t -> 'b t -> 'b t
val let+ : 'a t -> ('a -> 'b) -> 'b t
val let* : 'a t -> ('a -> 'b t) -> 'b t
val eof : unit t
val fail : parse_error -> 'a t
val fix : ('a t -> 'a t) -> 'a t
val optional : 'a t -> 'a option t
val optional_or : 'a t -> default:'a -> 'a t
val optional_or_else : 'a t -> default_f:(unit -> 'a) -> 'a t
val peek : token option t
val pos : 'a t -> (pos * 'a) t
val repeat : 'a t -> 'a list t
val repeat1 : 'a t -> 'a list t
val return : 'a -> 'a t
val return_at : pos -> 'a -> 'a t
val satisfy : expected:string list -> (token -> bool) -> token t
val satisfy_map : expected:string list -> (token -> 'a option) -> 'a t
val sep_by1 : _ t -> 'a t -> 'a list t
val sep_by : _ t -> 'a t -> 'a list t
val skip_while : (token -> bool) -> unit t
val take_while1 : expected:string list -> (token -> bool) -> token list t
val take_while : (token -> bool) -> token list t
val token_not : token -> token t
val token : token -> token t
val string : string -> string t
OCaml

Innovation. Community. Security.