Commit bae63e23 authored by matthew-eads's avatar matthew-eads
Browse files

moved master to mk1 branch

parent bf75da3f
module TigAST where
type Pos = Int
type Line = Int
data Symbol = SYM String Pos Line
data Tyex = TYID Symbol
| ARRAY Symbol
| RECORD [(Symbol, Symbol)]
data Value = INT Int
| STRING String
data Lvalue = VAR Symbol
| DOT Lvalue Symbol
| SUBSCRIPT Lvalue Exp
data Exp = LVAL Lvalue
| NIL
| LITERAL Value
| SEQ [Exp]
| NEG Exp
| CALL Symbol [Exp]
| BINOP Exp Oper Exp
| MAKEARR Symbol Exp Exp
| MAKEREC Symbol [(Symbol, Exp)]
| ASSIGN Lvalue Exp
| IF Exp Exp (Maybe Exp)
| WHILE Exp Exp
| FOR Symbol Exp Exp Exp
| LET [Decl] [Exp]
| BREAK
data Decl = TYDECL Symbol Tyex
| VARDECL Symbol (Maybe Symbol) Exp
| FUNDECL Symbol (Maybe [(Symbol, Symbol)]) (Maybe Symbol) Exp
data Oper = PLUS | MINUS | TIMES | DIV | EQ | NEQ | LT | LE | GT | GE | AND | OR
module TigAST where
type Pos = Int
type Line = Int
data Symbol = SYM String Pos Line
data Tyex = TYID Symbol
| ARRAY Symbol
| RECORD [(Symbol, Symbol)]
data Value = INT Int
| STRING String
data Lvalue = VAR Symbol
| DOT Lvalue Symbol
| SUBSCRIPT Lvalue Exp
data Exp = LVAL Lvalue
| NIL
| LITERAL Value
| SEQ [Exp]
| NEG Exp
| CALL Symbol [Exp]
| BINOP Exp Oper Exp
| MAKEARR Symbol Exp Exp
| MAKEREC Symbol [(Symbol, Exp)]
| ASSIGN Lvalue Exp
| IF Exp Exp (Maybe Exp)
| WHILE Exp Exp
| FOR Symbol Exp Exp Exp
| LET [Decl] [Exp]
| BREAK
data Decl = TYDECL Symbol Tyex
| VARDECL Symbol (Maybe Symbol) Exp
| FUNDECL Symbol (Maybe [(Symbol, Symbol)]) (Maybe Symbol) Exp
data Oper = PLUS | MINUS | TIMES | DIV | EQ | NEQ | LT | LE | GT | GE | AND | OR
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment