3 * Author: Kaustuv Chaudhuri <kaustuv+@cs.cmu.edu>
4 * Modified: Alex Vaynberg <alv@andrew.cmu.edu>
5 * Modified: Frank Pfenning <fp@cs.cmu.edu>
6 * Modified: Joshua Wise <jwise>
7 * Modified: Chris Lu <czl>
12 datatype binop = ADD | SUB | MUL | DIV | MOD | LSH | RSH | LOGOR | LOGAND | BITOR | BITAND | BITXOR | NEQ | EQ | LT | GT | LE | GE | BE
13 datatype unop = NEG | BITNOT | BANG
20 | ARG of Blarg (* I am j4cbo *)
21 | BINOP of binop * exp * exp
23 | CALL of Ast.ident * exp list
26 | STRING of Stringref.stringref
27 | COND of exp * exp * exp
28 | STMVAR of stm list * exp
34 | LABEL of Label.label
35 | JUMPIFN of exp * Label.label
38 FUNCTION of Ast.ident * stm list
40 type program = func list
43 structure Tree :> TREE =
45 datatype binop = ADD | SUB | MUL | DIV | MOD | LSH | RSH | LOGOR | LOGAND | BITOR | BITAND | BITXOR | NEQ | EQ | LT | GT | LE | GE | BE
46 datatype unop = NEG | BITNOT | BANG
53 | ARG of Blarg (* I am j4cbo *)
54 | BINOP of binop * exp * exp
56 | CALL of Ast.ident * exp list
59 | STRING of Stringref.stringref
60 | COND of exp * exp * exp
61 | STMVAR of stm list * exp
67 | LABEL of Label.label
68 | JUMPIFN of exp * Label.label
71 FUNCTION of Ast.ident * stm list
73 type program = func list