package earley

  1. Overview
  2. Docs
type 'a grammar
type blank = Input.buffer -> int -> Input.buffer * int
exception Parse_error of Input.buffer * int * string list
val give_up : unit -> 'a
val handle_exception : ('a -> 'b) -> 'a -> 'b
val char : ?name:string -> char -> 'a -> 'a grammar
val string : ?name:string -> string -> 'a -> 'a grammar
val eof : 'a -> 'a grammar
val any : char grammar
val in_charset : ?name:string -> Charset.charset -> char grammar
val not_in_charset : ?name:string -> Charset.charset -> unit grammar
val blank_not_in_charset : ?name:string -> Charset.charset -> unit grammar
val empty : 'a -> 'a grammar
val fail : unit -> 'a grammar
val error_message : (unit -> string) -> 'a grammar
val black_box : (Input.buffer -> int -> 'a * Input.buffer * int) -> Charset.charset -> bool -> string -> 'a grammar
val debug : string -> unit grammar
val regexp : ?name:string -> string -> string array grammar
val no_blank : blank
val blank_regexp : string -> blank
val blank_grammar : unit grammar -> blank -> blank
val change_layout : ?old_blank_before:bool -> ?new_blank_after:bool -> 'a grammar -> blank -> 'a grammar
val declare_grammar : string -> 'a grammar
val set_grammar : 'a grammar -> 'a grammar -> unit
val parse_buffer : 'a grammar -> blank -> Input.buffer -> 'a
val parse_string : ?filename:string -> 'a grammar -> blank -> string -> 'a
val parse_channel : ?filename:string -> 'a grammar -> blank -> Pervasives.in_channel -> 'a
val parse_file : 'a grammar -> blank -> string -> 'a
val partial_parse_buffer : 'a grammar -> blank -> ?blank_after:bool -> Input.buffer -> int -> 'a * Input.buffer * int
module WithPP (PP : Input.Preprocessor) : sig ... end
val debug_lvl : int Pervasives.ref
val warn_merge : bool Pervasives.ref
val greedy : 'a grammar -> 'a grammar
val sequence : 'a grammar -> 'b grammar -> ('a -> 'b -> 'c) -> 'c grammar
val sequence_position : 'a grammar -> 'b grammar -> ('a -> 'b -> Input.buffer -> int -> Input.buffer -> int -> 'c) -> 'c grammar
val fsequence : 'a grammar -> ('a -> 'b) grammar -> 'b grammar
val fsequence_position : 'a grammar -> ('a -> Input.buffer -> int -> Input.buffer -> int -> 'b) grammar -> 'b grammar
val sequence3 : 'a grammar -> 'b grammar -> 'c grammar -> ('a -> 'b -> 'c -> 'd) -> 'd grammar
val conditional_sequence : 'a grammar -> ('a -> 'b) -> 'c grammar -> ('b -> 'c -> 'd) -> 'd grammar
val conditional_sequence_position : 'a grammar -> ('a -> 'b) -> 'c grammar -> ('b -> 'c -> Input.buffer -> int -> Input.buffer -> int -> 'd) -> 'd grammar
val conditional_fsequence : 'a grammar -> ('a -> 'b) -> ('b -> 'c) grammar -> 'c grammar
val conditional_fsequence_position : 'a grammar -> ('a -> 'b) -> ('b -> Input.buffer -> int -> Input.buffer -> int -> 'c) grammar -> 'c grammar
val dependent_sequence : 'a grammar -> ('a -> 'b grammar) -> 'b grammar
val iter : 'a grammar grammar -> 'a grammar
val option : 'a -> 'a grammar -> 'a grammar
val fixpoint : 'a -> ('a -> 'a) grammar -> 'a grammar
val fixpoint1 : 'a -> ('a -> 'a) grammar -> 'a grammar
val alternatives : 'a grammar list -> 'a grammar
val apply : ('a -> 'b) -> 'a grammar -> 'b grammar
val apply_position : ('a -> Input.buffer -> int -> Input.buffer -> int -> 'b) -> 'a grammar -> 'b grammar
val position : 'a grammar -> (string * int * int * int * int * 'a) grammar
val test : ?name:string -> Charset.t -> (Input.buffer -> int -> 'a * bool) -> 'a grammar
val blank_test : ?name:string -> Charset.t -> (Input.buffer -> int -> Input.buffer -> int -> 'a * bool) -> 'a grammar
val success_test : 'a -> 'a grammar
val with_blank_test : 'a -> 'a grammar
val no_blank_test : 'a -> 'a grammar
val grammar_family : ?param_to_string:('a -> string) -> string -> ('a -> 'b grammar) * (('a -> 'b grammar) -> unit)
val accept_empty : 'a grammar -> bool
val grammar_info : 'a grammar -> bool * Charset.t
val give_name : string -> 'a grammar -> 'a grammar
OCaml

Innovation. Community. Security.