};;

let autohash_get ah s = try Hashtbl.find ah.autohash_h s with Not_found -> ( ah.autohash_last := 1 + !(ah.autohash_last); Hashtbl.add ah.autohash_h s !(ah.autohash_last); !(ah.autohash_last); );;

(* types *) type xtree = ID_TREE of string | INT_TREE of int | PLUS_TREE of xtree * xtree | MINUS_TREE of xtree * xtree | TIMES_TREE of xtree * xtree | EQEQ_TREE of xtree * xtree | GT_TREE of xtree * xtree | GE_TREE of xtree * xtree ;; type stree = ASSIGN_TREE of string * xtree | NOOP_TREE | IF_TREE of xtree * stree * stree | WHILE_TREE of xtree * stree | PRINT_TREE of xtree | STMT_GROUP_TREE of stree list | PROC_TREE of string * stree | CALL_TREE of string | GET_TREE of string

(* interpreter *) type ienv = { ienv_var : (string,int) Hashtbl.t; ienv_proc : (string,stree) Hashtbl.t; }