aboutsummaryrefslogtreecommitdiff
path: root/ABC
diff options
context:
space:
mode:
Diffstat (limited to 'ABC')
-rw-r--r--ABC/Assembler.dcl1
-rw-r--r--ABC/Assembler.icl9
2 files changed, 7 insertions, 3 deletions
diff --git a/ABC/Assembler.dcl b/ABC/Assembler.dcl
index 618a885..acda095 100644
--- a/ABC/Assembler.dcl
+++ b/ABC/Assembler.dcl
@@ -88,6 +88,7 @@ from ABC.Machine.GraphStore import ::Desc
// Clean compiler additions
| Comment String
| Annotation Annotation
+ | Raw String
instance toString Assembler
instance toString Statement
diff --git a/ABC/Assembler.icl b/ABC/Assembler.icl
index 2e80a05..57ad36a 100644
--- a/ABC/Assembler.icl
+++ b/ABC/Assembler.icl
@@ -15,10 +15,11 @@ where
instance <<< Assembler
where
- <<< f [] = f
- <<< f [stm=:(Label _):r] = f <<< stm <<< "\r\n" <<< r
+ <<< f [ ] = f
+ <<< f [stm=:(Label _) :r] = f <<< stm <<< "\r\n" <<< r
<<< f [stm=:(Descriptor _ _ _ _):r] = f <<< r
- <<< f [stm=:(Annotation _):r] = f <<< stm <<< "\r\n" <<< r
+ <<< f [stm=:(Annotation _) :r] = f <<< stm <<< "\r\n" <<< r
+ <<< f [stm=:(Raw _) :r] = f <<< stm <<< "\r\n" <<< r
<<< f [stm :r] = f <<< "\t" <<< stm <<< "\r\n" <<< r
instance <<< Statement where <<< f st = f <<< toString st
@@ -55,6 +56,7 @@ gPrint{|CONS of d|} fx (CONS x) = case d.gcd_name of
"Print" = ['print\t"'] ++ quote (fx x) ++ ['"']
"Comment" = ['| '] ++ fx x
"Annotation" = fx x
+ "Raw" = fx x
name = tl (cons (fromString name)) ++ ['\t':fx x]
where
cons :: ![Char] -> [Char]
@@ -125,6 +127,7 @@ 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 [Annotation _ :r] lc syms = translate r lc syms
+translate [Raw _ :r] lc syms = translate r lc syms
translate [stm :r] lc syms
= [trans stm lc syms:translate r (lc+1) syms]
where