Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Jeanne-Marie Musca
gg-proto
Commits
59b86cc4
Commit
59b86cc4
authored
Mar 15, 2016
by
matthew-eads
Browse files
added imptest.y, other small changes
parent
c52fa176
Changes
2
Hide whitespace changes
Inline
Side-by-side
#Imp.ast#
deleted
100644 → 0
View file @
c52fa176
module AST where
type ID = String
data Prog = Prog [AST]
data AST = Expression Exp
| TopLevlDec Dec
data Exp = SET ID Exp
| IF SimpleExp Exp (Maybe Exp)
| WHILE SimpleExp Exp
| BEGIN (List1 Exp)
| LET [(String, Exp)] Exp
data BinOp = Plus SimpleExp SimpleExp
| Mult SimpleExp SimpleExp
| Div SimpleExp SimpleExp
| Minus SimpleExp SimpleExp
| CheckExpect SimpleExp SimpleExp
data SimpleExp =
Lit Int
| Var ID
| Apply ID (List0 Exp)
| BinOp BinOp
-- | AGet SimpleExp SimpleExp --(arr[i])
-- | ASet SimpleExp SimpleExp SimpleExp --(set arr[i] j)
-- | AMake ID SimpleExp --(new arr size)
data Dec = Val ID Exp
.#Imp.ast
deleted
120000 → 0
View file @
c52fa176
matt@hal.2957:1457926303
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment