separated into modules, added parser and lexer for miniImp
This commit is contained in:
@ -8,13 +8,13 @@ and c_exp =
|
||||
| Sequence of c_exp * c_exp (* c; c *)
|
||||
| If of b_exp * c_exp * c_exp (* if b then c else c *)
|
||||
| While of b_exp * c_exp (* while b do c *)
|
||||
| For of c_exp * b_exp * c_exp * c_exp (* for c; b; c do c *)
|
||||
| For of c_exp * b_exp * c_exp * c_exp (* for (c; b; c) do c *)
|
||||
and b_exp =
|
||||
Boolean of bool (* v *)
|
||||
| BAnd of b_exp * b_exp (* b and b *)
|
||||
| BOr of b_exp * b_exp (* b or b *)
|
||||
| BAnd of b_exp * b_exp (* b && b *)
|
||||
| BOr of b_exp * b_exp (* b || b *)
|
||||
| BNot of b_exp (* not b *)
|
||||
| BCmp of a_exp * a_exp (* a = a *)
|
||||
| BCmp of a_exp * a_exp (* a == a *)
|
||||
| BCmpLess of a_exp * a_exp (* a < a *)
|
||||
| BCmpLessEq of a_exp * a_exp (* a <= a *)
|
||||
| BCmpGreater of a_exp * a_exp (* a > a *)
|
||||
|
||||
Reference in New Issue
Block a user