package sexp_grammar

  1. Overview
  2. Docs
type t

Represents the result of folding over a grammar.

type list_t

Represents the result of folding over a list grammar.

The remaining functions correspond to grammar constructors. Excludes the constructors related to recursive grammars: Tycon, Tyvar, and Recursive.

val any : string -> t
val bool : t
val char : t
val integer : t
val float : t
val string : t
val option : t -> t
val union : t list -> t
val list : list_t -> t
val empty : list_t
val cons : t -> list_t -> list_t
val many : t -> list_t
val record : (string, list_t Sexp_grammar__.Sexp_grammar_intf.Field.t * (string, Core.Sexp.t) Core.List.Assoc.t) Core.List.Assoc.t -> allow_extra_fields:bool -> list_t
val variant : (string, list_t option * (string, Core.Sexp.t) Core.List.Assoc.t) Core.List.Assoc.t -> case_sensitivity: Sexp_grammar__.Sexp_grammar_intf.{Sexp_grammar}1.case_sensitivity -> t
val lazy_ : t Core.Lazy.t -> t
val tag : t -> string -> Core.Sexp.t -> t
val of_lazy_recursive : t Core.Lazy.t -> t

Allows folds to tie the knot for recursive grammars. Must not force its argument immediately.

OCaml

Innovation. Community. Security.