diff options
author | Alex AUVOLAT <alex.auvolat@ens.fr> | 2014-03-12 10:11:12 +0100 |
---|---|---|
committer | Alex AUVOLAT <alex.auvolat@ens.fr> | 2014-03-12 10:11:12 +0100 |
commit | bfafa7dbc3325749358538a95cbb4831db66b03c (patch) | |
tree | 1eefa8d984472cb47f80b1ff1362c01675d0faa6 /khb/khs_ast.ml | |
download | SystemeReseaux-Projet-bfafa7dbc3325749358538a95cbb4831db66b03c.tar.gz SystemeReseaux-Projet-bfafa7dbc3325749358538a95cbb4831db66b03c.zip |
First commit
Diffstat (limited to 'khb/khs_ast.ml')
-rw-r--r-- | khb/khs_ast.ml | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/khb/khs_ast.ml b/khb/khs_ast.ml new file mode 100644 index 0000000..f5b2c8d --- /dev/null +++ b/khb/khs_ast.ml @@ -0,0 +1,36 @@ + +type khs_binop = + | PLUS | MINUS + | TIMES | DIV | MOD + | EQUAL | NEQUAL + | GT | LT | GE | LE + | AND | OR | XOR + +type khs_unop = + | MINUS | NOT + +type khs_expr = + | EEmpty + | EInt of int + | EStr of string + | EBool of bool + | EFrame + | ELocal of string + | EBinary of khs_expr * khs_binop * khs_expr + | EUnary of khs_unop * khs_expr + | ETernary of khs_expr * khs_expr * khs_expr + | ECat of khs_expr * khs_expr + | ELoad of khs_expr + | ENewChan + +type khs_stmt = + | SLabel of string + | SSet of khs_expr * khs_expr + | SGoto of khs_expr + | SPar of khs_expr + (* RECV and SEND do a load on their second argument (the chan), + (ie they expect an address and not a value) *) + | SRecv of khs_expr * khs_expr + | SSend of khs_expr * khs_expr + | SUnset of khs_expr list + | SExit |