-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathabsyn.mli
34 lines (25 loc) · 828 Bytes
/
absyn.mli
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
28
29
30
31
32
33
(* $Id: absyn.mli,v 1.2 2019-01-24 17:42:06-08 - - $ *)
(*
* Abstract syntax definitions for SB.
*)
type linenr = int
type ident = string
type label = string
type number = float
type oper = string
type printable = Printexpr of expr
| String of string
and memref = Arrayref of ident * expr
| Variable of ident
and expr = Number of number
| Memref of memref
| Unary of oper * expr
| Binary of oper * expr * expr
type stmt = Dim of ident * expr
| Let of memref * expr
| Goto of label
| If of expr * label
| Print of printable list
| Input of memref list
type progline = linenr * label option * stmt option
type program = progline list