module Ttree:sig..end
Arbres issus du typage
typeident =string
type typ =
| |
Tint |
(* | int | *) |
| |
Tstructp of |
(* | struct S * | *) |
| |
Tvoidstar |
(* | void * | *) |
| |
Ttypenull |
(* | le type donné à la constante 0 | *) |
type structure = {
|
str_name : |
|
str_fields : |
type field = {
|
field_name : |
|
field_typ : |
typeunop =Ptree.unop
typebinop =Ptree.binop
typedecl_var =typ * ident
type expr = {
|
expr_node : |
|
expr_typ : |
Expression
type expr_node =
| |
Econst of |
| |
Eaccess_local of |
| |
Eaccess_field of |
| |
Eassign_local of |
| |
Eassign_field of |
| |
Eunop of |
| |
Ebinop of |
| |
Ecall of |
| |
Esizeof of |
type stmt =
| |
Sskip |
| |
Sexpr of |
| |
Sif of |
| |
Swhile of |
| |
Sblock of |
| |
Sreturn of |
Instruction
typeblock =decl_var list * stmt list
type decl_fun = {
|
fun_typ : |
|
fun_name : |
|
fun_formals : |
|
fun_body : |
type file = {
|
funs : |