aboutsummaryrefslogtreecommitdiff
path: root/src/boot/scanner.boot
diff options
context:
space:
mode:
Diffstat (limited to 'src/boot/scanner.boot')
-rw-r--r--src/boot/scanner.boot28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/boot/scanner.boot b/src/boot/scanner.boot
index 6f641469..7241df13 100644
--- a/src/boot/scanner.boot
+++ b/src/boot/scanner.boot
@@ -63,7 +63,7 @@ dqToList s ==
first s
shoeConstructToken(ln,lp,b,n) ==
- [b.0,b.1,:cons(lp,n)]
+ [b.0,b.1,:[lp,:n]]
shoeTokType x ==
first x
@@ -90,7 +90,7 @@ shoeNextLine(s)==
a:=MAKE_-FULL_-CVEC (7-REM($n,8) ,'" ")
$ln.$n:='" ".0
$ln:=CONCAT(a,$ln)
- s1:=cons(cons($ln,rest $f),$r)
+ s1:=[[$ln,:rest $f],:$r]
shoeNextLine s1
true
@@ -102,25 +102,25 @@ shoeLineToks(s)==
$sz:local := nil
$floatok:local:=true
$linepos:local:=s
- not shoeNextLine s => CONS(nil,nil)
+ not shoeNextLine s => [nil,:nil]
$n = nil => shoeLineToks $r
fst:=QENUM($ln,0)
EQL(fst,shoeCLOSEPAREN)=>
command:=shoeLine? $ln=>
dq:=dqUnit shoeConstructToken
($ln,$linepos,shoeLeafLine command,0)
- cons([dq],$r)
+ [[dq],:$r]
command:=shoeLisp? $ln=> shoeLispToken($r,command)
command:=shoePackage? $ln=>
a:=CONCAT('"(IN-PACKAGE ",command,'")")
dq:=dqUnit shoeConstructToken
($ln,$linepos,shoeLeafLisp a,0)
- cons([dq],$r)
+ [[dq],:$r]
shoeLineToks $r
toks:=[]
while $n<$sz repeat toks:=dqAppend(toks,shoeToken())
toks = nil => shoeLineToks $r
- cons([toks],$r)
+ [[toks],:$r]
shoeLispToken(s,string)==
string:=
@@ -130,10 +130,10 @@ shoeLispToken(s,string)==
linepos:=$linepos
[r,:st]:=shoeAccumulateLines(s,string)
dq:=dqUnit shoeConstructToken(ln,linepos,shoeLeafLisp st,0)
- cons([dq],r)
+ [[dq],:r]
shoeAccumulateLines(s,string)==
- not shoeNextLine s => CONS(s,string)
+ not shoeNextLine s => [s,:string]
$n = nil => shoeAccumulateLines($r,string)
# $ln=0 => shoeAccumulateLines($r,string)
fst:=QENUM($ln,0)
@@ -148,7 +148,7 @@ shoeAccumulateLines(s,string)==
CONCAT(string,SUBSTRING(command,0,a-1)))
shoeAccumulateLines($r,CONCAT(string,command))
shoeAccumulateLines($r,string)
- CONS(s,string)
+ [s,:string]
-- returns true if token t is closing `parenthesis'.
shoeCloser t ==
@@ -226,11 +226,11 @@ shoeLeafSpaces x ==
shoeLispEscape()==
$n:=$n+1
$n >= $sz =>
- SoftShoeError(cons($linepos,$n),'"lisp escape error")
+ SoftShoeError([$linepos,:$n],'"lisp escape error")
shoeLeafError ($ln.$n)
a:=shoeReadLispString($ln,$n)
a = nil =>
- SoftShoeError(cons($linepos,$n),'"lisp escape error")
+ SoftShoeError([$linepos,:$n],'"lisp escape error")
shoeLeafError ($ln.$n)
[exp,n]:=a
n = nil =>
@@ -321,7 +321,7 @@ shoeString()==
shoeS()==
$n >= $sz =>
- SoftShoeError(cons($linepos,$n),'"quote added")
+ SoftShoeError([$linepos,:$n],'"quote added")
'""
n := $n
strsym := STRPOS ('"_"",$ln,$n,nil) or $sz
@@ -329,7 +329,7 @@ shoeS()==
mn := MIN(strsym,escsym)
mn=$sz =>
$n:=$sz
- SoftShoeError(cons($linepos,$n),'"quote added")
+ SoftShoeError([$linepos,:$n],'"quote added")
SUBSTRING($ln,n,nil)
mn = strsym =>
$n:=mn+1
@@ -452,7 +452,7 @@ shoeExponent(a,w)==
shoeError()==
n:=$n
$n:=$n+1
- SoftShoeError(cons($linepos,n),
+ SoftShoeError([$linepos,:n],
CONCAT( '"The character whose number is ",
STRINGIMAGE QENUM($ln,n),'" is not a Boot character"))
shoeLeafError ($ln.n)