aboutsummaryrefslogtreecommitdiffstats
path: root/_khb_experiment/khb_ast.ml
blob: fa52ecefb6e9d49054d48e8c8f4dbf7c2cc54bf5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27


type khb_binop = 
    | PLUS    | MINUS
    | TIMES   | DIV     | MOD
    | EQUAL   | NEQUAL
    | GT | LT | GE | LE
    | AND | OR | XOR
    | SEND | RECV | ASSIGN | SEQ

type khb_unop =
    | MINUS | NOT
    | DEREF | REF


type khb_expr =
    | BVar of string
    | BStr of string
    | BInt of int
    | BBool of bool
    | BUnary of unop * expr
    | BBinary of expr * unop * expr
    | BTernary of expr * expr * expr
    | BCall of string * expr list
    | BLoop of expr
    | BNewChan
    | BPar of expr
    | BIndex of expr * expr