aboutsummaryrefslogtreecommitdiff
path: root/ABC/Assembler.icl
diff options
context:
space:
mode:
authorCamil Staps2016-07-03 19:57:27 +0200
committerCamil Staps2016-07-03 19:59:22 +0200
commitfa8b99969d7a6966c1cd309d41384051599070fb (patch)
tree269be5ac51c66178816d472e5c9e4a80c9c4c142 /ABC/Assembler.icl
parentAdded ABC.Code (diff)
Fix RTS; working example
Diffstat (limited to 'ABC/Assembler.icl')
-rw-r--r--ABC/Assembler.icl8
1 files changed, 4 insertions, 4 deletions
diff --git a/ABC/Assembler.icl b/ABC/Assembler.icl
index 9de0708..e5e3a9a 100644
--- a/ABC/Assembler.icl
+++ b/ABC/Assembler.icl
@@ -29,12 +29,12 @@ where
collect :: Assembler Int Int -> SymTable
collect [] _ _ = []
-collect [Label l :r] lc dc = [(l,lc,LabSym) :collect r lc dc]
-collect [Descriptor dl rl _ _:r] lc dc = [(dl,dc,DescSym):collect r lc (dc+1)]
-collect [_ :r] lc dc = collect r (lc+1) dc
+collect [Label l :r] lc dc = [(l,lc,LabSym) :collect r lc dc]
+collect [Descriptor dl _ _ _:r] lc dc = [(dl,dc,DescSym):collect r lc (dc+1)]
+collect [_ :r] lc dc = collect r (lc+1) dc
lookup :: Label SymType SymTable -> Int
-lookup l t [] = abortn ("label " <+ l <+ " not defined as " <+ t)
+lookup l t [] = abortn (l <+ " not defined as " <+ t)
lookup l t [(name,n,type):r]
| l == name && t == type = n
| otherwise = lookup l t r