home
/
code
/
tiger.ml.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rough frame allocations
[tiger.ml.git]
/
compiler
/
src
/
lib
/
tiger
/
tiger_absyn.mli
diff --git
a/compiler/src/lib/tiger/tiger_absyn.mli
b/compiler/src/lib/tiger/tiger_absyn.mli
index
12dc6a8
..
b2f9406
100644
(file)
--- a/
compiler/src/lib/tiger/tiger_absyn.mli
+++ b/
compiler/src/lib/tiger/tiger_absyn.mli
@@
-1,7
+1,3
@@
-type pos = Tiger_position.t
-
-type symbol = Tiger_symbol.t
-
type oper =
| PlusOp
| MinusOp
type oper =
| PlusOp
| MinusOp
@@
-15,130
+11,132
@@
type oper =
| GeOp
type exp =
| GeOp
type exp =
- | VarExp of
- var
| NilExp
| IntExp of
int
| StringExp of
{ string : string
| NilExp
| IntExp of
int
| StringExp of
{ string : string
- ; pos :
pos
+ ; pos :
Tiger_position.t
}
| CallExp of
}
| CallExp of
- { func :
symbol
+ { func :
Tiger_symbol.t
; args : exp list
; args : exp list
- ; pos :
pos
+ ; pos :
Tiger_position.t
}
| OpExp of
{ left : exp
; oper : oper
; right : exp
}
| OpExp of
{ left : exp
; oper : oper
; right : exp
- ; pos :
pos
+ ; pos :
Tiger_position.t
}
| RecordExp of
}
| RecordExp of
- { fields : (
symbol * exp * pos
) list
- ; typ :
symbol
- ; pos :
pos
+ { fields : (
Tiger_symbol.t * exp * Tiger_position.t
) list
+ ; typ :
Tiger_symbol.t
+ ; pos :
Tiger_position.t
}
| SeqExp of
}
| SeqExp of
- (exp *
pos
) list
+ (exp *
Tiger_position.t
) list
| AssignExp of
{ var : var
; exp : exp
| AssignExp of
{ var : var
; exp : exp
- ; pos :
pos
+ ; pos :
Tiger_position.t
}
| IfExp of
{ test : exp
; then' : exp
; else' : exp option
}
| IfExp of
{ test : exp
; then' : exp
; else' : exp option
- ; pos :
pos
+ ; pos :
Tiger_position.t
}
| WhileExp of
{ test : exp
; body : exp
}
| WhileExp of
{ test : exp
; body : exp
- ; pos :
pos
+ ; pos :
Tiger_position.t
}
| ForExp of
}
| ForExp of
- { var :
symbol
+ { var :
Tiger_symbol.t
; escape : bool ref (* Whoa - why a mutable cell in AST? *)
; lo : exp
; hi : exp
; body : exp
; escape : bool ref (* Whoa - why a mutable cell in AST? *)
; lo : exp
; hi : exp
; body : exp
- ; pos :
pos
+ ; pos :
Tiger_position.t
}
| BreakExp of
}
| BreakExp of
- pos
+ Tiger_position.t
| LetExp of
{ decs : dec list
; body : exp
| LetExp of
{ decs : dec list
; body : exp
- ; pos :
pos
+ ; pos :
Tiger_position.t
}
| ArrayExp of
}
| ArrayExp of
- { typ :
symbol
+ { typ :
Tiger_symbol.t
; size : exp
; init : exp
; size : exp
; init : exp
- ; pos :
pos
+ ; pos :
Tiger_position.t
}
}
+ | VarExp of
+ var
and var =
| SimpleVar of
and var =
| SimpleVar of
- { symbol :
symbol
- ; pos :
pos
+ { symbol :
Tiger_symbol.t
+ ; pos :
Tiger_position.t
}
| FieldVar of
{ var : var
}
| FieldVar of
{ var : var
- ; symbol :
symbol
- ; pos :
pos
+ ; symbol :
Tiger_symbol.t
+ ; pos :
Tiger_position.t
}
| SubscriptVar of
{ var : var
; exp : exp
}
| SubscriptVar of
{ var : var
; exp : exp
- ; pos :
pos
+ ; pos :
Tiger_position.t
}
and dec =
| FunDecs of (* "FunctionDec" in Appel's code *)
fundec list
| VarDec of
}
and dec =
| FunDecs of (* "FunctionDec" in Appel's code *)
fundec list
| VarDec of
- { name :
symbol
+ { name :
Tiger_symbol.t
; escape : bool ref (* Again, why mutable? *)
; escape : bool ref (* Again, why mutable? *)
- ; typ : (
symbol * pos
) option
+ ; typ : (
Tiger_symbol.t * Tiger_position.t
) option
; init : exp
; init : exp
- ; pos :
pos
+ ; pos :
Tiger_position.t
}
| TypeDecs of (* "TypeDec" in Appel's code *)
typedec list
and ty =
| NameTy of
}
| TypeDecs of (* "TypeDec" in Appel's code *)
typedec list
and ty =
| NameTy of
- { symbol :
symbol
- ; pos :
pos
+ { symbol :
Tiger_symbol.t
+ ; pos :
Tiger_position.t
}
| RecordTy of
field list
| ArrayTy of
}
| RecordTy of
field list
| ArrayTy of
- { symbol :
symbol
- ; pos :
pos
+ { symbol :
Tiger_symbol.t
+ ; pos :
Tiger_position.t
}
and field =
| Field of
}
and field =
| Field of
- { name :
symbol
+ { name :
Tiger_symbol.t
; escape : bool ref
; escape : bool ref
- ; typ :
symbol
- ; pos :
pos
+ ; typ :
Tiger_symbol.t
+ ; pos :
Tiger_position.t
}
and typedec =
| TypeDec of (* An anonymous record in Appel's code *)
}
and typedec =
| TypeDec of (* An anonymous record in Appel's code *)
- { name :
symbol
+ { name :
Tiger_symbol.t
; ty : ty
; ty : ty
- ; pos :
pos
+ ; pos :
Tiger_position.t
}
and fundec =
| FunDec of
}
and fundec =
| FunDec of
- { name :
symbol
+ { name :
Tiger_symbol.t
; params : field list
; params : field list
- ; result : (
symbol * pos
) option
+ ; result : (
Tiger_symbol.t * Tiger_position.t
) option
; body : exp
; body : exp
- ; pos :
pos
+ ; pos :
Tiger_position.t
}
type t = exp
val to_string : t -> string
}
type t = exp
val to_string : t -> string
+
+val op_show : oper -> string
This page took
0.02861 seconds
and
4
git commands to generate.