summaryrefslogtreecommitdiff
path: root/src/ast.mli
diff options
context:
space:
mode:
Diffstat (limited to 'src/ast.mli')
-rw-r--r--src/ast.mli29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/ast.mli b/src/ast.mli
new file mode 100644
index 0000000..557b3f6
--- /dev/null
+++ b/src/ast.mli
@@ -0,0 +1,29 @@
+
+(* Syntaxe abstraite pour mini-C++ *)
+
+(* rien à voir pour l'instant *)
+
+type ident = string
+
+type binop =
+ | Equal | NotEqual
+ | Lt | Le | Gt | Ge
+ | Add | Sub | Mul | Div | Modulo
+ | Land | Lor
+
+type unop =
+ | PreIncr | PostIncr | PreDecr | PostDecr
+ | Ref | Deref
+ | Not
+ | Minus | Plus
+
+type expr =
+ | EBinop of expr * binop * expr
+ | EUnary of unop * expr
+ | EAssign of expr * expr
+ | EIntConst of int
+ | EBoolConst of bool
+ | EThis
+ | ENull
+ | EMem of expr * ident
+