aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2010-12-11 02:03:13 +0000
committerdos-reis <gdr@axiomatics.org>2010-12-11 02:03:13 +0000
commitf8e7728606692cfb26816637c0622007758d9ae5 (patch)
tree2d2965bfcbd1e4a02bd61c5460e217f16b99f960
parent46e765be689a737fa233ca242459520db3797f03 (diff)
downloadopen-axiom-f8e7728606692cfb26816637c0622007758d9ae5.tar.gz
Clean up
-rw-r--r--src/boot/ast.boot14
-rw-r--r--src/boot/includer.boot18
-rw-r--r--src/boot/scanner.boot2
-rw-r--r--src/boot/strap/ast.clisp14
-rw-r--r--src/boot/strap/includer.clisp17
-rw-r--r--src/boot/strap/scanner.clisp2
6 files changed, 31 insertions, 36 deletions
diff --git a/src/boot/ast.boot b/src/boot/ast.boot
index 052ae2d6..25e539ff 100644
--- a/src/boot/ast.boot
+++ b/src/boot/ast.boot
@@ -147,7 +147,7 @@ quote x ==
bfGenSymbol: () -> %Symbol
bfGenSymbol()==
$GenVarCounter := $GenVarCounter+1
- INTERN strconc('"bfVar#",STRINGIMAGE $GenVarCounter)
+ INTERN strconc('"bfVar#",toString $GenVarCounter)
bfColon: %Thing -> %List
bfColon x==
@@ -528,7 +528,7 @@ bfLET1(lhs,rhs) ==
l2 is ["PROGN",:.] => bfMKPROGN [l1,:rest l2]
if IDENTP first l2 then l2 := [l2,:nil]
bfMKPROGN [l1,:l2,name]
- g := INTERN strconc('"LETTMP#",STRINGIMAGE $letGenVarCounter)
+ g := INTERN strconc('"LETTMP#",toString $letGenVarCounter)
$letGenVarCounter := $letGenVarCounter + 1
rhs1 := ['L%T,g,rhs]
let1 := bfLET1(lhs,g)
@@ -565,7 +565,7 @@ bfLET2(lhs,rhs) ==
lhs is ['APPEND,var1,var2] =>
patrev := bfISReverse(var2,var1)
rev := ['REVERSE,rhs]
- g := INTERN strconc('"LETTMP#", STRINGIMAGE $letGenVarCounter)
+ g := INTERN strconc('"LETTMP#", toString $letGenVarCounter)
$letGenVarCounter := $letGenVarCounter + 1
l2 := bfLET2(patrev,g)
if cons? l2 and atom first l2 then l2 := [l2,:nil]
@@ -648,7 +648,7 @@ bfIS1(lhs,rhs) ==
bfAND [bfIS1(lhs,d),bfMKPROGN [l,'T]]
rhs is ["EQUAL",a] => bfQ(lhs,a)
cons? lhs =>
- g := INTERN strconc('"ISTMP#",STRINGIMAGE $isGenVarCounter)
+ g := INTERN strconc('"ISTMP#",toString $isGenVarCounter)
$isGenVarCounter := $isGenVarCounter + 1
bfMKPROGN [['L%T,g,lhs],bfIS1(g,rhs)]
rhs is ['CONS,a,b] =>
@@ -665,7 +665,7 @@ bfIS1(lhs,rhs) ==
bfAND [['CONSP,lhs],a1,b1]
rhs is ['APPEND,a,b] =>
patrev := bfISReverse(b,a)
- g := INTERN strconc('"ISTMP#",STRINGIMAGE $isGenVarCounter)
+ g := INTERN strconc('"ISTMP#",toString $isGenVarCounter)
$isGenVarCounter := $isGenVarCounter + 1
rev := bfAND [['CONSP,lhs],['PROGN,['L%T,g,['REVERSE,lhs]],'T]]
l2 := bfIS1(g,patrev)
@@ -1433,7 +1433,7 @@ genGCLnativeTranslation(op,s,t,op') ==
:[gclArgsInC(x,a) for x in tails s for a in tails cargs],
'"); }" ]
where cargs := [mkCArgName i for i in 0..(#s - 1)]
- mkCArgName i == strconc('"x",STRINGIMAGE i)
+ mkCArgName i == strconc('"x",toString i)
cparm(x,a) ==
strconc(gclTypeInC first x, '" ", first a,
(rest x => '", "; '""))
@@ -1475,7 +1475,7 @@ genECLnativeTranslation(op,s,t,op') ==
:[sharpArg(i,x) for i in 0..(n-1) for x in s],'")"]
sharpArg(i,x) ==
i = 0 => strconc('"(#0)",selectDatum x)
- strconc('",",'"(#", STRINGIMAGE i, '")", selectDatum x)
+ strconc('",",'"(#", toString i, '")", selectDatum x)
selectDatum x ==
isSimpleNativeType x => '""
[.,[c,y]] := x
diff --git a/src/boot/includer.boot b/src/boot/includer.boot
index b0c72019..f6056139 100644
--- a/src/boot/includer.boot
+++ b/src/boot/includer.boot
@@ -77,10 +77,6 @@ PNAME x ==
char x ==
CHAR(PNAME x, 0)
--- returns the string representation of object X.
-STRINGIMAGE x ==
- toString x
-
-- close STREAM.
shoeCLOSE stream ==
CLOSE stream
@@ -112,11 +108,11 @@ shoeSpaces n ==
diagnosticLocation tok ==
pos := shoeTokPosn tok
- strconc('"line ", STRINGIMAGE lineNo pos, '", column ",
- STRINGIMAGE lineCharacter pos)
+ strconc('"line ", toString lineNo pos, '", column ",
+ toString lineCharacter pos)
SoftShoeError(posn,key)==
- coreError ['"in line ", STRINGIMAGE lineNo posn]
+ coreError ['"in line ", toString lineNo posn]
shoeConsole lineString posn
shoeConsole strconc(shoeSpaces lineCharacter posn,'"|")
shoeConsole key
@@ -130,10 +126,10 @@ bpSpecificErrorHere(key) == bpSpecificErrorAtToken($stok, key)
bpGeneralErrorHere() == bpSpecificErrorHere('"syntax error")
bpIgnoredFromTo(pos1, pos2) ==
- shoeConsole strconc('"ignored from line ", STRINGIMAGE lineNo pos1)
+ shoeConsole strconc('"ignored from line ", toString lineNo pos1)
shoeConsole lineString pos1
shoeConsole strconc(shoeSpaces lineCharacter pos1,'"|")
- shoeConsole strconc('"ignored through line ", STRINGIMAGE lineNo pos2)
+ shoeConsole strconc('"ignored through line ", toString lineNo pos2)
shoeConsole lineString pos2
shoeConsole strconc(shoeSpaces lineCharacter pos2,'"|")
@@ -395,12 +391,12 @@ shoeElse1(keep,b,s)==
shoeLineSyntaxError(h)==
shoeConsole strconc('"INCLUSION SYNTAX ERROR IN LINE ",
- STRINGIMAGE rest h)
+ toString rest h)
shoeConsole first h
shoeConsole '"LINE IGNORED"
bPremStreamNil(h)==
- shoeConsole strconc('"UNEXPECTED )fin IN LINE ",STRINGIMAGE rest h)
+ shoeConsole strconc('"UNEXPECTED )fin IN LINE ",toString rest h)
shoeConsole first h
shoeConsole '"REST OF FILE IGNORED"
$bStreamNil
diff --git a/src/boot/scanner.boot b/src/boot/scanner.boot
index 011100e6..03db838b 100644
--- a/src/boot/scanner.boot
+++ b/src/boot/scanner.boot
@@ -454,7 +454,7 @@ shoeError()==
$n:=$n+1
SoftShoeError([$linepos,:n],
strconc( '"The character whose number is ",
- STRINGIMAGE QENUM($ln,n),'" is not a Boot character"))
+ toString QENUM($ln,n),'" is not a Boot character"))
shoeLeafError ($ln.n)
shoeOrdToNum x==
diff --git a/src/boot/strap/ast.clisp b/src/boot/strap/ast.clisp
index 220253f9..280f58a3 100644
--- a/src/boot/strap/ast.clisp
+++ b/src/boot/strap/ast.clisp
@@ -163,7 +163,7 @@
(DECLARE (SPECIAL |$GenVarCounter|))
(PROGN
(SETQ |$GenVarCounter| (+ |$GenVarCounter| 1))
- (INTERN (CONCAT "bfVar#" (STRINGIMAGE |$GenVarCounter|)))))
+ (INTERN (CONCAT "bfVar#" (WRITE-TO-STRING |$GenVarCounter|)))))
(DECLAIM (FTYPE (FUNCTION (|%Thing|) |%List|) |bfColon|))
@@ -742,7 +742,7 @@
(|bfMKPROGN| (CONS |l1| (APPEND |l2| (CONS |name| NIL)))))))
(T (SETQ |g|
(INTERN (CONCAT "LETTMP#"
- (STRINGIMAGE |$letGenVarCounter|))))
+ (WRITE-TO-STRING |$letGenVarCounter|))))
(SETQ |$letGenVarCounter| (+ |$letGenVarCounter| 1))
(SETQ |rhs1| (LIST 'L%T |g| |rhs|))
(SETQ |let1| (|bfLET1| |lhs| |g|))
@@ -834,7 +834,7 @@
(SETQ |rev| (LIST 'REVERSE |rhs|))
(SETQ |g|
(INTERN (CONCAT "LETTMP#"
- (STRINGIMAGE |$letGenVarCounter|))))
+ (WRITE-TO-STRING |$letGenVarCounter|))))
(SETQ |$letGenVarCounter| (+ |$letGenVarCounter| 1))
(SETQ |l2| (|bfLET2| |patrev| |g|))
(COND
@@ -982,7 +982,7 @@
((CONSP |lhs|)
(SETQ |g|
(INTERN (CONCAT "ISTMP#"
- (STRINGIMAGE |$isGenVarCounter|))))
+ (WRITE-TO-STRING |$isGenVarCounter|))))
(SETQ |$isGenVarCounter| (+ |$isGenVarCounter| 1))
(|bfMKPROGN| (LIST (LIST 'L%T |g| |lhs|) (|bfIS1| |g| |rhs|))))
((AND (CONSP |rhs|) (EQ (CAR |rhs|) 'CONS)
@@ -1039,7 +1039,7 @@
(SETQ |patrev| (|bfISReverse| |b| |a|))
(SETQ |g|
(INTERN (CONCAT "ISTMP#"
- (STRINGIMAGE |$isGenVarCounter|))))
+ (WRITE-TO-STRING |$isGenVarCounter|))))
(SETQ |$isGenVarCounter| (+ |$isGenVarCounter| 1))
(SETQ |rev|
(|bfAND| (LIST (LIST 'CONSP |lhs|)
@@ -2412,7 +2412,7 @@
(LIST |rettype| |cop|)))))))))
(DEFUN |genGCLnativeTranslation,mkCArgName| (|i|)
- (CONCAT "x" (STRINGIMAGE |i|)))
+ (CONCAT "x" (WRITE-TO-STRING |i|)))
(DEFUN |genGCLnativeTranslation,cparm| (|x| |a|)
(CONCAT (|genGCLnativeTranslation,gclTypeInC| (CAR |x|)) " "
@@ -2525,7 +2525,7 @@
(COND
((EQL |i| 0)
(CONCAT "(#0)" (|genECLnativeTranslation,selectDatum| |x|)))
- (T (CONCAT "," "(#" (STRINGIMAGE |i|) ")"
+ (T (CONCAT "," "(#" (WRITE-TO-STRING |i|) ")"
(|genECLnativeTranslation,selectDatum| |x|)))))
(DEFUN |genECLnativeTranslation,selectDatum| (|x|)
diff --git a/src/boot/strap/includer.clisp b/src/boot/strap/includer.clisp
index f88bfa6f..4d4cd438 100644
--- a/src/boot/strap/includer.clisp
+++ b/src/boot/strap/includer.clisp
@@ -13,8 +13,6 @@
(DEFUN |char| (|x|) (CHAR (PNAME |x|) 0))
-(DEFUN STRINGIMAGE (|x|) (WRITE-TO-STRING |x|))
-
(DEFUN |shoeCLOSE| (|stream|) (CLOSE |stream|))
(DEFUN |shoeNotFound| (|fn|)
@@ -41,12 +39,12 @@
(RETURN
(PROGN
(SETQ |pos| (|shoeTokPosn| |tok|))
- (CONCAT "line " (STRINGIMAGE (|lineNo| |pos|)) ", column "
- (STRINGIMAGE (|lineCharacter| |pos|)))))))
+ (CONCAT "line " (WRITE-TO-STRING (|lineNo| |pos|)) ", column "
+ (WRITE-TO-STRING (|lineCharacter| |pos|)))))))
(DEFUN |SoftShoeError| (|posn| |key|)
(PROGN
- (|coreError| (LIST "in line " (STRINGIMAGE (|lineNo| |posn|))))
+ (|coreError| (LIST "in line " (WRITE-TO-STRING (|lineNo| |posn|))))
(|shoeConsole| (|lineString| |posn|))
(|shoeConsole|
(CONCAT (|shoeSpaces| (|lineCharacter| |posn|)) "|"))
@@ -68,13 +66,14 @@
(DEFUN |bpIgnoredFromTo| (|pos1| |pos2|)
(PROGN
(|shoeConsole|
- (CONCAT "ignored from line " (STRINGIMAGE (|lineNo| |pos1|))))
+ (CONCAT "ignored from line "
+ (WRITE-TO-STRING (|lineNo| |pos1|))))
(|shoeConsole| (|lineString| |pos1|))
(|shoeConsole|
(CONCAT (|shoeSpaces| (|lineCharacter| |pos1|)) "|"))
(|shoeConsole|
(CONCAT "ignored through line "
- (STRINGIMAGE (|lineNo| |pos2|))))
+ (WRITE-TO-STRING (|lineNo| |pos2|))))
(|shoeConsole| (|lineString| |pos2|))
(|shoeConsole|
(CONCAT (|shoeSpaces| (|lineCharacter| |pos2|)) "|"))))
@@ -454,7 +453,7 @@
(PROGN
(|shoeConsole|
(CONCAT "INCLUSION SYNTAX ERROR IN LINE "
- (STRINGIMAGE (CDR |h|))))
+ (WRITE-TO-STRING (CDR |h|))))
(|shoeConsole| (CAR |h|))
(|shoeConsole| "LINE IGNORED")))
@@ -462,7 +461,7 @@
(DECLARE (SPECIAL |$bStreamNil|))
(PROGN
(|shoeConsole|
- (CONCAT "UNEXPECTED )fin IN LINE " (STRINGIMAGE (CDR |h|))))
+ (CONCAT "UNEXPECTED )fin IN LINE " (WRITE-TO-STRING (CDR |h|))))
(|shoeConsole| (CAR |h|))
(|shoeConsole| "REST OF FILE IGNORED")
|$bStreamNil|))
diff --git a/src/boot/strap/scanner.clisp b/src/boot/strap/scanner.clisp
index 9fcb1bef..42cb92e3 100644
--- a/src/boot/strap/scanner.clisp
+++ b/src/boot/strap/scanner.clisp
@@ -526,7 +526,7 @@
(SETQ |$n| (+ |$n| 1))
(|SoftShoeError| (CONS |$linepos| |n|)
(CONCAT "The character whose number is "
- (STRINGIMAGE (QENUM |$ln| |n|))
+ (WRITE-TO-STRING (QENUM |$ln| |n|))
" is not a Boot character"))
(|shoeLeafError| (ELT |$ln| |n|))))))