elpi

ELPI - Embeddable λProlog Interpreter
Library elpi.parser
type program = {
macros : ( Func.t, Term.t ) Macro.t list;
types : tattribute Type.t list;
type_abbrevs : Func.t TypeAbbreviation.t list;
modes : Func.t Mode.t list;
body : block list;
}
and block =
| Locals of Func.t list * program
| Clauses of ( Term.t, attribute ) Clause.t list
| Namespace of Func.t * program
| Shorten of Func.t shorthand list * program
| Constraints of Func.t list * cattribute Chr.t list * program
and attribute = {
insertion : insertion option;
id : string option;
ifexpr : string option;
}
and insertion =
| Before of string
| After of string
and cattribute = {
cid : string;
cifexpr : string option;
}
and tattribute =
| External
| Index of int list
and 'a shorthand = {
iloc : Loc.t;
full_name : 'a;
short_name : 'a;
}
val show_program : program -> Ppx_deriving_runtime.string
val show_attribute : attribute -> Ppx_deriving_runtime.string
val show_insertion : insertion -> Ppx_deriving_runtime.string
val show_cattribute : cattribute -> Ppx_deriving_runtime.string
val show_tattribute : tattribute -> Ppx_deriving_runtime.string