package cfg

  1. Overview
  2. Docs

Pretty-printing functions for BNF-grammars

val pp_prod : Stdlib.Format.formatter -> Cfg.Bnf_spec.Bnf.Spec.symbol list -> unit

pp_prod ppf syms prettyprint symbols list syms using prettyprinter ppf.

val pp_live_prods : Stdlib.Format.formatter -> int Cfg.Bnf_spec.Bnf.ProdMap.t -> unit

pp_live_prods ppf syms prettyprint live production map pm using prettyprinter ppf.

val pp_nt : Stdlib.Format.formatter -> string -> Cfg.Bnf_spec.Bnf.ProdSet.t -> unit

pp_nt ppf nt ps prettyprint nonterminal nt and its production set ps using prettyprinter ppf.

val pp_live_nt : Stdlib.Format.formatter -> string -> (int * int Cfg.Bnf_spec.Bnf.ProdMap.t) -> unit

pp_nt ppf nt di prettyprint live nonterminal nt and its derivation information di using prettyprinter ppf.

val pp_nt_map : Stdlib.Format.formatter -> Cfg.Bnf_spec.Bnf.ProdSet.t Cfg.Bnf_spec.Bnf.NTMap.t -> unit

pp_nt_map ppf nts prettyprint map of nonterminals nts using prettyprinter ppf.

val pp_live_nts : Stdlib.Format.formatter -> (int * int Cfg.Bnf_spec.Bnf.ProdMap.t) Cfg.Bnf_spec.Bnf.NTMap.t -> unit

pp_live_nts ppf nt_di prettyprint map of nonterminal derivation information nt_di using prettyprinter ppf.

val pp_ts : Stdlib.Format.formatter -> Cfg.Bnf_spec.Bnf.TSet.t -> unit

pp_ts ppf ts prettyprint set of terminals ts using prettyprinter ppf.

val pp_nts : Stdlib.Format.formatter -> Cfg.Bnf_spec.Bnf.NTSet.t -> unit

pp_nts ppf nts prettyprint set of nonterminals nts using prettyprinter ppf.

val pp_prods : Stdlib.Format.formatter -> Cfg.Bnf_spec.Bnf.ProdSet.t -> unit

pp_prods ppf prods prettyprint set of productions prods using prettyprinter ppf.

OCaml

Innovation. Community. Security.