diff options
author | Camil Staps | 2016-02-02 19:24:50 +0100 |
---|---|---|
committer | Camil Staps | 2016-02-02 19:24:50 +0100 |
commit | a7d7542dc646a5fd124ef71e71ce260889f1701b (patch) | |
tree | 04ed89503bbb3cc9933273a1326a53ca724c3492 /files/practicum/RefactorX.icl | |
parent | week6 camil: working positioning of lines by putting empties at left and righ... (diff) |
Diffstat (limited to 'files/practicum/RefactorX.icl')
-rw-r--r-- | files/practicum/RefactorX.icl | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/files/practicum/RefactorX.icl b/files/practicum/RefactorX.icl deleted file mode 100644 index a2b5614..0000000 --- a/files/practicum/RefactorX.icl +++ /dev/null @@ -1,32 +0,0 @@ -implementation module RefactorX
-
-import StdEnv
-
-Start = map toString [E1,E2,E3,E4,E5]
-
-E1 = (let x = 42 - 3 in x / 0) + (let y = 6 in y * y)
-E2 = let x = 42 in x + (let x = 58 in x)
-E3 = let x = 1 in let y = 2 in let x = 3 in 4
-E4 = let x = 1 in x + y
-E5 = (let x = 1 in x) * x
-
-:: Expr = NR Int
- | VAR Name
- | OP Expr Operator Expr
- | LET Name Expr Expr
-:: Name :== String
-:: Operator = PLUS | MIN | MUL | DIV
-:: Val = Result Int | Undef
-
-// expressies afdrukken:
-instance toString Expr where
- toString ...
-
-// vrije variabelen:
-free :: Expr -> [Name]
-
-// verwijder deelexpressies met ongebruikte let-variabelen:
-remove_unused_lets :: Expr -> Expr
-
-// evaluator met tabel van naam-waarde paren:
-eval :: Expr -> Val
|