aboutsummaryrefslogtreecommitdiff
path: root/src/boot
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-10-02 18:14:41 +0000
committerdos-reis <gdr@axiomatics.org>2011-10-02 18:14:41 +0000
commita2fd94946c6b380e2ee7ec242fd56aa4d52d9c92 (patch)
treed4b28b81780a4374367fb54cf3ce8189b423fd32 /src/boot
parent8640c7b9aa33084d77770f435814d1d8558c8e2e (diff)
downloadopen-axiom-a2fd94946c6b380e2ee7ec242fd56aa4d52d9c92.tar.gz
* lisp/core.lisp.in: Do not use CCL in AxiomCore.
* boot/translator.boot (packageBody): Tidy. * boot/scanner.boot (shoeOrdToNum): Remove. * boot/includer.boot (shoeBiteOff): Remove. (shoeFileName): Likewise. (shoeFnFileName): Likewise.
Diffstat (limited to 'src/boot')
-rw-r--r--src/boot/includer.boot21
-rw-r--r--src/boot/scanner.boot118
-rw-r--r--src/boot/tokens.boot3
-rw-r--r--src/boot/translator.boot6
4 files changed, 60 insertions, 88 deletions
diff --git a/src/boot/includer.boot b/src/boot/includer.boot
index 1095031c..0d85ab14 100644
--- a/src/boot/includer.boot
+++ b/src/boot/includer.boot
@@ -218,27 +218,6 @@ shoeElseIf? s == shoePrefix?('")elseif", s)
shoeLisp? s == shoePrefix?('")lisp", s)
shoeLine? s == shoePrefix?('")line", s)
-shoeBiteOff x ==
- n := firstNonblankPosition(x,0)
- n = nil => false
- n1 := firstBlankPosittion(x,n)
- n1 = nil => [subString(x,n),'""]
- [subString(x,n,n1-n),subString(x,n1)]
-
-shoeFileName x==
- a := shoeBiteOff x
- a = nil => '""
- c := shoeBiteOff second a
- c = nil => first a
- strconc(first a,'".",first c)
-
-shoeFnFileName x==
- a := shoeBiteOff x
- a = nil => ['"",'""]
- c := shoeFileName second a
- c = nil => [first a,'""]
- [first a, c]
-
shoeInclude s ==
bDelay(function shoeInclude1,[s])
diff --git a/src/boot/scanner.boot b/src/boot/scanner.boot
index a419a9a4..cdeedf96 100644
--- a/src/boot/scanner.boot
+++ b/src/boot/scanner.boot
@@ -64,8 +64,11 @@ dqToList s ==
s = nil => nil
first s
+shoeTokConstruct(x,y,z) ==
+ [x,y,:z]
+
shoeConstructToken(lp,b,n) ==
- [b.0,b.1,:[lp,:n]]
+ shoeTokConstruct(b.0,b.1,[lp,:n])
shoeTokType x ==
first x
@@ -74,46 +77,44 @@ shoeTokPart x ==
second x
shoeTokPosn x ==
- CDDR x
+ [.,.,:p] := x
+ p
-shoeTokConstruct(x,y,z) ==
- [x,y,:z]
-
-shoeNextLine(s)==
+shoeNextLine s==
bStreamNull s => false
- $linepos:=s
- $f:= first s
- $r:= rest s
- $ln:=first $f
+ $linepos := s
+ [$f,:$r] := s
+ $ln := first $f
$n := firstNonblankPosition($ln,0)
$sz := #$ln
$n = nil => true
stringChar($ln,$n) = shoeTAB =>
- a := makeString(7-REM($n,8),char " ")
+ a := makeString(7-($n rem 8),char " ")
stringChar($ln,$n) := char " "
$ln := strconc(a,$ln)
- s1:=[[$ln,:rest $f],:$r]
+ s1 := [[$ln,:rest $f],:$r]
shoeNextLine s1
true
-shoeLineToks(s)==
- $f: local:=nil
- $r:local :=nil
- $ln:local :=nil
- $n:local:=nil
- $sz:local := nil
- $floatok:local:=true
- $linepos:local:=s
+shoeLineToks s ==
+ $f: local := nil
+ $r: local := nil
+ $ln: local := nil
+ $n: local := nil
+ $sz: local := nil
+ $floatok: local := true
+ $linepos: local := s
not shoeNextLine s => [nil,:nil]
$n = nil => shoeLineToks $r
stringChar($ln,0) = char ")" =>
- command:=shoeLine? $ln=>
+ command := shoeLine? $ln =>
dq := dqUnit shoeConstructToken($linepos,shoeLeafLine command,0)
[[dq],:$r]
- command:=shoeLisp? $ln=> shoeLispToken($r,command)
+ command := shoeLisp? $ln => shoeLispToken($r,command)
shoeLineToks $r
- toks:=[]
- while $n<$sz repeat toks:=dqAppend(toks,shoeToken())
+ toks := []
+ while $n < $sz repeat
+ toks := dqAppend(toks,shoeToken())
toks = nil => shoeLineToks $r
[[toks],:$r]
@@ -121,18 +122,18 @@ shoeLispToken(s,string)==
if #string = 0 or stringChar(string,0) = char ";" then
string := '""
ln := $ln
- linepos:=$linepos
- [r,:st]:=shoeAccumulateLines(s,string)
+ linepos := $linepos
+ [r,:st] := shoeAccumulateLines(s,string)
dq := dqUnit shoeConstructToken(linepos,shoeLeafLisp st,0)
[[dq],:r]
shoeAccumulateLines(s,string)==
not shoeNextLine s => [s,:string]
$n = nil => shoeAccumulateLines($r,string)
- # $ln=0 => shoeAccumulateLines($r,string)
+ #$ln = 0 => shoeAccumulateLines($r,string)
stringChar($ln,0) = char ")" =>
- command:=shoeLisp? $ln
- command and #command>0 =>
+ command := shoeLisp? $ln
+ command and #command > 0 =>
stringChar(command,0) = char ";" =>
shoeAccumulateLines($r,string)
a := charPosition(char ";",command,0) =>
@@ -146,11 +147,11 @@ shoeAccumulateLines(s,string)==
shoeCloser t ==
shoeKeyWord t in '(CPAREN CBRACK)
-shoeToken () ==
+shoeToken() ==
linepos := $linepos
n := $n
ch := stringChar($ln,$n)
- b:=
+ b :=
shoeStartsComment() =>
shoeComment()
[]
@@ -167,7 +168,7 @@ shoeToken () ==
digit? ch => shoeNumber()
ch = char "__" => shoeEscape()
ch = shoeTAB =>
- $n:=$n+1
+ $n := $n + 1
[]
shoeError()
b = nil => nil
@@ -213,23 +214,23 @@ shoeLeafSpaces x ==
["SPACES",x]
shoeLispEscape()==
- $n:=$n+1
+ $n := $n + 1
$n >= $sz =>
SoftShoeError([$linepos,:$n],'"lisp escape error")
shoeLeafError stringChar($ln,$n)
- a:=shoeReadLispString($ln,$n)
+ a := shoeReadLispString($ln,$n)
a = nil =>
SoftShoeError([$linepos,:$n],'"lisp escape error")
shoeLeafError stringChar($ln,$n)
- [exp,n]:=a
+ [exp,n] := a
n = nil =>
- $n:= $sz
- shoeLeafLispExp exp
- $n:=n
+ $n := $sz
+ shoeLeafLispExp exp
+ $n := n
shoeLeafLispExp exp
-shoeEscape()==
- $n:=$n+1
+shoeEscape() ==
+ $n := $n + 1
shoeEsc() => shoeWord true
nil
@@ -252,7 +253,7 @@ shoeEsc()==
shoeStartsComment()==
$n < $sz =>
stringChar($ln,$n) = char "+" =>
- www:=$n+1
+ www := $n + 1
www >= $sz => false
stringChar($ln,www) = char "+"
false
@@ -261,7 +262,7 @@ shoeStartsComment()==
shoeStartsNegComment()==
$n < $sz =>
stringChar($ln,$n) = char "-" =>
- www:=$n+1
+ www := $n + 1
www >= $sz => false
stringChar($ln,www) = char "-"
false
@@ -290,7 +291,7 @@ shoeKeyTr w==
shoeLeafKey w
shoePossFloat (w)==
- $n>=$sz or not digit? stringChar($ln,$n) => shoeLeafKey w
+ $n >= $sz or not digit? stringChar($ln,$n) => shoeLeafKey w
w := shoeInteger()
shoeExponent('"0",w)
@@ -317,11 +318,11 @@ shoeS()==
escsym := charPosition(char "__",$ln,$n) or $sz
mn := MIN(strsym,escsym)
mn=$sz =>
- $n:=$sz
+ $n := $sz
SoftShoeError([$linepos,:$n],'"quote added")
subString($ln,n)
mn = strsym =>
- $n:=mn+1
+ $n := mn + 1
subString($ln,n,mn-n)
str := subString($ln,n,mn-n)
$n := mn+1
@@ -329,7 +330,7 @@ shoeS()==
b :=
a =>
str := strconc(str,charString stringChar($ln,$n))
- $n := $n+1
+ $n := $n + 1
shoeS()
shoeS()
strconc(str,b)
@@ -339,12 +340,12 @@ shoeIdEnd(line,n)==
n := n+1
n
-shoeW(b)==
+shoeW(b) ==
n1 := $n
$n := $n+1
l := $sz
endid := shoeIdEnd($ln,$n)
- endid=l or stringChar($ln,endid) ~= char "__" =>
+ endid = l or stringChar($ln,endid) ~= char "__" =>
$n := endid
[b,subString($ln,n1,endid-n1)]
str := subString($ln,n1,endid-n1)
@@ -373,10 +374,10 @@ shoeInteger1(zro) ==
l := $sz
while $n <l and digit? stringChar($ln,$n) repeat
$n := $n+1
- $n=l or stringChar($ln,$n) ~= char "__" =>
+ $n = l or stringChar($ln,$n) ~= char "__" =>
n = $n and zro => '"0"
- subString($ln,n,$n-n)
- str := subString($ln,n,$n-n)
+ subString($ln,n,$n - n)
+ str := subString($ln,n,$n - n)
$n := $n+1
a := shoeEsc()
bb := shoeInteger1(zro)
@@ -386,7 +387,7 @@ shoeIntValue(s) ==
ns := #s
ival := 0
for i in 0..ns-1 repeat
- d := shoeOrdToNum stringChar(s,i)
+ d := digit? stringChar(s,i)
ival := 10*ival + d
ival
@@ -432,16 +433,13 @@ shoeExponent(a,w)==
shoeLeafFloat(a,w,0)
shoeError()==
- n:=$n
- $n:=$n+1
+ n := $n
+ $n := $n + 1
SoftShoeError([$linepos,:n],
strconc( '"The character whose number is ",
toString codePoint stringChar($ln,n),'" is not a Boot character"))
shoeLeafError stringChar($ln,n)
-shoeOrdToNum x==
- digit? x
-
shoeKeyWord st ==
tableValue(shoeKeyTable,st)
@@ -451,7 +449,7 @@ shoeKeyWordP st ==
shoeMatch(l,i) ==
shoeSubStringMatch(l,shoeDict,i)
-shoeSubStringMatch (l,d,i)==
+shoeSubStringMatch(l,d,i) ==
h := codePoint stringChar(l, i)
u := d.h
ll := #l
@@ -461,12 +459,12 @@ shoeSubStringMatch (l,d,i)==
s := u.j
ls := #s
done :=
- ls+i > ll => false
+ ls + i > ll => false
eql := true
for k in 1..ls-1 while eql repeat
eql := stringChar(s,k) = stringChar(l,k+i)
eql =>
- s1:=s
+ s1 := s
true
false
s1
diff --git a/src/boot/tokens.boot b/src/boot/tokens.boot
index 2bacc64c..14abfeec 100644
--- a/src/boot/tokens.boot
+++ b/src/boot/tokens.boot
@@ -177,8 +177,6 @@ shoePun:=shoePunCons()
++ List of prefix operators.
for i in [ _
"NOT", _
--- "COLON", _
--- "SHOEEQ", _
"LENGTH" _
] _
repeat property(i,'SHOEPRE) := true
@@ -231,7 +229,6 @@ for i in [ _
["AND", true] , _
["OR", false] _
]
-
repeat property(first i,'SHOETHETA) := rest i
for i in [ _
diff --git a/src/boot/translator.boot b/src/boot/translator.boot
index 36f61662..8b58821c 100644
--- a/src/boot/translator.boot
+++ b/src/boot/translator.boot
@@ -431,8 +431,6 @@ packageBody(x,p) ==
z :=
ns is ['DOT,'System,'Foreign] =>
%hasFeature KEYWORD::SBCL => 'SB_-ALIEN
- %hasFeature KEYWORD::CLISP => 'FFI
- %hasFeature KEYWORD::CLOZURE => 'CCL
%hasFeature KEYWORD::ECL => 'FFI
return nil
ident? ns => ns
@@ -551,7 +549,7 @@ shoeReport stream==
shoeFileLine('"USED and not DEFINED",stream)
a := [i for [i,:b] in entries $bootUsed | not b]
for i in SSORT a repeat
- b := strconc(PNAME i,'" is used in ")
+ b := strconc(symbolName i,'" is used in ")
bootOutLines( SSORT tableValue($bootUsed,i),stream,b)
shoeDefUse(s)==
@@ -661,7 +659,7 @@ shoeXReport stream==
shoeFileLine('"USED and where DEFINED",stream)
c := SSORT [k for [k,:.] in entries $bootUsed]
for i in c repeat
- a := strconc(PNAME i,'" is used in ")
+ a := strconc(symbolName i,'" is used in ")
bootOutLines( SSORT tableValue($bootUsed,i),stream,a)
shoeItem (str)==