module Compiler_util: sig
.. end
Support code for writing a simple compiler.
type
id = string
val pp_id : Format.formatter -> id -> Ppx_deriving_runtime.unit
val show_id : id -> Ppx_deriving_runtime.string
type
op2 =
| |
LT |
| |
GT |
| |
Eq |
| |
Add |
| |
Sub |
| |
Mul |
| |
Div |
| |
Mod |
val pp_op2 : Format.formatter -> op2 -> Ppx_deriving_runtime.unit
val show_op2 : op2 -> Ppx_deriving_runtime.string
type
const =
| |
Int of int |
| |
Bool of bool |
val pp_const : Format.formatter -> const -> Ppx_deriving_runtime.unit
val show_const : const -> Ppx_deriving_runtime.string
type
exp =
val pp_exp : Format.formatter -> exp -> Ppx_deriving_runtime.unit
val show_exp : exp -> Ppx_deriving_runtime.string
val from_string : string -> exp
val from_file : string -> exp
type
aexp =
Atomic expressions.
type
bexp =
Binding forms.
type
anfexp =
Expressions in A-normal form.
val pp_aexp : Format.formatter -> aexp -> Ppx_deriving_runtime.unit
val show_aexp : aexp -> Ppx_deriving_runtime.string
val pp_bexp : Format.formatter -> bexp -> Ppx_deriving_runtime.unit
val show_bexp : bexp -> Ppx_deriving_runtime.string
val pp_anfexp : Format.formatter -> anfexp -> Ppx_deriving_runtime.unit
val show_anfexp : anfexp -> Ppx_deriving_runtime.string
module IdSet: Set.S
with type elt = id
val free_vars : anfexp -> IdSet.t
val rename : id ->
id -> anfexp -> anfexp