aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ABC/Assembler.dcl3
-rw-r--r--ABC/Assembler.icl2
2 files changed, 4 insertions, 1 deletions
diff --git a/ABC/Assembler.dcl b/ABC/Assembler.dcl
index 6ba9db7..03b8820 100644
--- a/ABC/Assembler.dcl
+++ b/ABC/Assembler.dcl
@@ -71,11 +71,12 @@ from ABC.Machine.GraphStore import ::Desc
| Update_b BSrc BDst
| AddI
| DecI
- | GtI
+ | GtI
| IncI
| LtI
| MulI
| SubI
+ | Comment String
instance toString Assembler
instance toString Statement
diff --git a/ABC/Assembler.icl b/ABC/Assembler.icl
index 29e2d5b..8167f70 100644
--- a/ABC/Assembler.icl
+++ b/ABC/Assembler.icl
@@ -36,6 +36,7 @@ gPrint{|CONS of d|} fx (CONS x) = case d.gcd_name of
"Descriptor" = []
"Dump" = ['dump\t"'] ++ quote (fx x) ++ ['"']
"Print" = ['print\t"'] ++ quote (fx x) ++ ['"']
+ "Comment" = ['| '] ++ fx x
name = tl (cons (fromString name)) ++ ['\t':fx x]
where
cons :: ![Char] -> [Char]
@@ -104,6 +105,7 @@ translate :: Assembler Int SymTable -> [Instruction]
translate [] _ _ = []
translate [Label _ :r] lc syms = translate r lc syms
translate [Descriptor _ _ _ _:r] lc syms = translate r lc syms
+translate [Comment _ :r] lc syms = translate r lc syms
translate [stm :r] lc syms
= [trans stm lc syms:translate r (lc+1) syms]
where