package lambdapi

  1. Overview
  2. Docs

Pretty-printing the parser-level AST.

This module defines functions that allow printing elements of syntax found in the parser-level abstract syntax. This is used, for example, to print a file in the Lambdapi syntax, given the AST obtained when parsing a file in the legacy (Dedukti) syntax.

val keyword_table : (string, LpLexer.token) Stdlib.Hashtbl.t

Keywords table.

val is_keyword : string -> bool
val raw_ident : string Lplib.Base.pp
val param_id : Syntax.p_ident option Lplib.Base.pp
val param_ids : Syntax.p_ident option list Lplib.Base.pp
val modifiers : Syntax.p_modifier list Lplib.Base.pp
type priority = [
  1. | `Func
  2. | `Appl
  3. | `Atom
]

The possible priority levels are `Func (top level, including abstraction and product), `Appl (application) and `Atom (smallest priority).

val params_list : Syntax.p_params list Lplib.Base.pp
val typ : Syntax.p_term option Lplib.Base.pp
val rule : string -> Syntax.p_rule Lplib.Base.pp
val inductive : string -> Syntax.p_inductive Lplib.Base.pp
val unpack : Syntax.p_term -> (Syntax.p_term * Syntax.p_term) list

unpack eqs transforms a p_term of the form LpLexer.cons (LpLexer.equiv t u) (LpLexer.cons (LpLexer.equiv v w) ...) into a list [(t,u); (v,w); ...]. See unif_rule.ml.

val assoc : Pratter.associativity Lplib.Base.pp
val subproofs : Syntax.p_subproof list Lplib.Base.pp
val beautify : Syntax.ast -> unit

beautify cmds pretty-prints the commands cmds to standard output.

OCaml

Innovation. Community. Security.