diff options
author | dos-reis <gdr@axiomatics.org> | 2010-05-09 14:18:38 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2010-05-09 14:18:38 +0000 |
commit | aa827b23f713e6568dde0c7c9fecf67d2ee2e7fd (patch) | |
tree | 52572bbbb0561bf5454b07d3d9098392a3d6a498 | |
parent | 7b82287b36a54b0ac78e82f9d8ad468cb889a4e4 (diff) | |
download | open-axiom-aa827b23f713e6568dde0c7c9fecf67d2ee2e7fd.tar.gz |
* boot/ast.boot: Miscellaneous cleanup.
* boot/includer.boot: Likewise.
* boot/parser.boot: Likewise.
* boot/pile.boot: Likewise.
* boot/scanner.boot: Likewise.
* boot/translator.boot: Likewise.
-rw-r--r-- | src/ChangeLog | 9 | ||||
-rw-r--r-- | src/boot/ast.boot | 78 | ||||
-rw-r--r-- | src/boot/includer.boot | 30 | ||||
-rw-r--r-- | src/boot/parser.boot | 6 | ||||
-rw-r--r-- | src/boot/pile.boot | 12 | ||||
-rw-r--r-- | src/boot/scanner.boot | 28 | ||||
-rw-r--r-- | src/boot/translator.boot | 14 |
7 files changed, 93 insertions, 84 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 37936b26..937d284a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2010-05-09 Gabriel Dos Reis <gdr@cse.tamu.edu> + + * boot/ast.boot: Miscellaneous cleanup. + * boot/includer.boot: Likewise. + * boot/parser.boot: Likewise. + * boot/pile.boot: Likewise. + * boot/scanner.boot: Likewise. + * boot/translator.boot: Likewise. + 2010-05-09 Gabriel Dos Reis <gdr@cs.tamu.edu> * interp/cattable.boot: Replace call to CONS with bracket syntax. diff --git a/src/boot/ast.boot b/src/boot/ast.boot index 03a98b03..263108e1 100644 --- a/src/boot/ast.boot +++ b/src/boot/ast.boot @@ -185,14 +185,14 @@ bfPile(part) == bfAppend: %List -> %List bfAppend x== - APPLY(function APPEND,x) + apply(function append,x) bfColonAppend: (%List,%Thing) -> %List bfColonAppend(x,y) == x = nil => y is ["BVQUOTE",:a] => ["&REST",["QUOTE",:a]] ["&REST",y] - cons(first x,bfColonAppend(rest x,y)) + [first x,:bfColonAppend(rest x,y)] bfBeginsDollar: %Thing -> %Boolean bfBeginsDollar x == @@ -205,7 +205,7 @@ compFluidize x== IDENTP x and bfBeginsDollar x=>compFluid x atom x => x x is ["QUOTE",:.] => x - cons(compFluidize(first x),compFluidize(rest x)) + [compFluidize(first x),:compFluidize(rest x)] bfTuple x == ["TUPLE",:x] @@ -268,14 +268,14 @@ bfSTEP(id,fst,step,lst)== inc := atom step => step g1 := bfGenSymbol() - initvar := cons(g1,initvar) - initval := cons(step,initval) + initvar := [g1,:initvar] + initval := [step,:initval] g1 final := atom lst => lst g2 := bfGenSymbol() - initvar := cons(g2,initvar) - initval := cons(lst,initval) + initvar := [g2,:initvar] + initval := [lst,:initval] g2 ex := lst = nil => [] @@ -407,7 +407,7 @@ bfLp1(iters,body)== loop bfLp2(extrait,itl,body)== - itl is ["ITERATORS",:.] => bfLp1(cons(extrait,rest itl),body) + itl is ["ITERATORS",:.] => bfLp1([extrait,:rest itl],body) iters := rest itl bfLpCross([["ITERATORS",extrait,:CDAR iters],:rest iters],body) @@ -452,7 +452,7 @@ bfLocal(a,b)== bfTake(n,x)== x = nil => x n=0 => nil - cons(first x,bfTake(n-1,rest x)) + [first x,:bfTake(n-1,rest x)] bfDrop(n,x)== x = nil or n = 0 => x @@ -464,7 +464,7 @@ bfReturnNoName a == bfSUBLIS(p,e)== atom e=>bfSUBLIS1(p,e) e is ["QUOTE",:.] => e - cons(bfSUBLIS(p,first e),bfSUBLIS(p,rest e)) + [bfSUBLIS(p,first e),:bfSUBLIS(p,rest e)] +++ Returns e/p, where e is an atom. We assume that the +++ DEFs form a system admitting a fix point; otherwise we may @@ -510,22 +510,22 @@ bfLET1(lhs,rhs) == IDENTP rhs and not bfCONTAINED(rhs,lhs) => rhs1 := bfLET2(lhs,rhs) rhs1 is ["L%T",:.] => bfMKPROGN [rhs1,rhs] - rhs1 is ["PROGN",:.] => APPEND(rhs1,[rhs]) - if IDENTP first rhs1 then rhs1 := CONS(rhs1,nil) + rhs1 is ["PROGN",:.] => [:rhs1,:[rhs]] + if IDENTP first rhs1 then rhs1 := [rhs1,:nil] bfMKPROGN [:rhs1,rhs] rhs is ["L%T",:.] and IDENTP(name := second rhs) => -- handle things like [a] := x := foo l1 := bfLET1(name,third rhs) l2 := bfLET1(lhs,name) l2 is ["PROGN",:.] => bfMKPROGN [l1,:rest l2] - if IDENTP first l2 then l2 := cons(l2,nil) + if IDENTP first l2 then l2 := [l2,:nil] bfMKPROGN [l1,:l2,name] g := INTERN CONCAT('"LETTMP#",STRINGIMAGE $letGenVarCounter) $letGenVarCounter := $letGenVarCounter + 1 rhs1 := ['L%T,g,rhs] let1 := bfLET1(lhs,g) let1 is ["PROGN",:.] => bfMKPROGN [rhs1,:rest let1] - if IDENTP first let1 then let1 := CONS(let1,nil) + if IDENTP first let1 then let1 := [let1,:nil] bfMKPROGN [rhs1,:let1,g] bfCONTAINED(x,y)== @@ -541,26 +541,26 @@ bfLET2(lhs,rhs) == a := bfLET2(a,rhs) (b := bfLET2(b,rhs)) = nil => a atom b => [a,b] - cons? first b => CONS(a,b) + cons? first b => [a,:b] [a,b] lhs is ['CONS,var1,var2] => var1 = "DOT" or var1 is ["QUOTE",:.] => bfLET2(var2,addCARorCDR('CDR,rhs)) l1 := bfLET2(var1,addCARorCDR('CAR,rhs)) var2 = nil or var2 = "DOT" =>l1 - if cons? l1 and atom first l1 then l1 := cons(l1,nil) + if cons? l1 and atom first l1 then l1 := [l1,:nil] IDENTP var2 => [:l1,bfLetForm(var2,addCARorCDR('CDR,rhs))] l2 := bfLET2(var2,addCARorCDR('CDR,rhs)) - if cons? l2 and atom first l2 then l2 := cons(l2,nil) - APPEND(l1,l2) + if cons? l2 and atom first l2 then l2 := [l2,:nil] + [:l1,:l2] lhs is ['APPEND,var1,var2] => patrev := bfISReverse(var2,var1) rev := ['REVERSE,rhs] g := INTERN CONCAT('"LETTMP#", STRINGIMAGE $letGenVarCounter) $letGenVarCounter := $letGenVarCounter + 1 l2 := bfLET2(patrev,g) - if cons? l2 and atom first l2 then l2 := cons(l2,nil) + if cons? l2 and atom first l2 then l2 := [l2,:nil] var1 = "DOT" => [['L%T,g,rev],:l2] last l2 is ['L%T, =var1, val1] => [['L%T,g,rev],:REVERSE rest REVERSE l2, @@ -588,7 +588,7 @@ addCARorCDR(acc,expr) == atom expr => [acc,expr] acc = 'CAR and expr is ["REVERSE",:.] => ["CAR",["LAST",:rest expr]] - -- cons('last,rest expr) + -- ['last,:rest expr] funs := '(CAR CDR CAAR CDAR CADR CDDR CAAAR CADAR CAADR CADDR CDAAR CDDAR CDADR CDDDR) p := bfPosition(first expr,funs) @@ -597,8 +597,8 @@ addCARorCDR(acc,expr) == CAADDR CADAAR CADDAR CADADR CADDDR) funsR := '(CDAR CDDR CDAAR CDDAR CDADR CDDDR CDAAAR CDADAR CDAADR CDADDR CDDAAR CDDDAR CDDADR CDDDDR) - acc = 'CAR => CONS(funsA.p,rest expr) - CONS(funsR.p,rest expr) + acc = 'CAR => [funsA.p,:rest expr] + [funsR.p,:rest expr] bfPosition(x,l) == bfPosn(x,l,0) bfPosn(x,l,n) == @@ -661,7 +661,7 @@ bfIS1(lhs,rhs) == $isGenVarCounter := $isGenVarCounter + 1 rev := bfAND [['CONSP,lhs],['PROGN,['L%T,g,['REVERSE,lhs]],'T]] l2 := bfIS1(g,patrev) - if cons? l2 and atom first l2 then l2 := cons(l2,nil) + if cons? l2 and atom first l2 then l2 := [l2,:nil] a = "DOT" => bfAND [rev,:l2] bfAND [rev,:l2,['PROGN,bfLetForm(a,['NREVERSE,a]),'T]] bpSpecificErrorHere '"bad IS code is generated" @@ -748,7 +748,7 @@ bfMDef (op,args,body) == bfTupleP args => rest args [args] [gargl,sgargl,nargl,largl]:=bfGargl argl - sb:=[cons(i,j) for i in nargl for j in sgargl] + sb:=[[i,:j] for i in nargl for j in sgargl] body:= SUBLIS(sb,body) sb2 := [["CONS",["QUOTE",i],j] for i in sgargl for j in largl] body := ["SUBLIS",["LIST",:sb2],["QUOTE",body]] @@ -760,10 +760,10 @@ bfGargl argl== argl = nil => [[],[],[],[]] [a,b,c,d] := bfGargl rest argl first argl="&REST" => - [cons(first argl,b),b,c, - cons(["CONS",["QUOTE","LIST"],first d],rest d)] + [[first argl,:b],b,c, + [["CONS",["QUOTE","LIST"],first d],:rest d]] f := bfGenSymbol() - [cons(f,a),cons(f,b),cons(first argl,c),cons(f,d)] + [[f,:a],[f,:b],[first argl,:c],[f,:d]] bfDef1 [op,args,body] == argl := @@ -785,7 +785,7 @@ bfDef(op,args,body) == [.,op1,arg1,:body1] := shoeComp first bfDef1 [op,args,body] bfCompHash(op1,arg1,body1) bfTuple - [:shoeComps bfDef1 d for d in cons([op,args,body],$wheredefs)] + [:shoeComps bfDef1 d for d in [[op,args,body],:$wheredefs]] shoeComps x== [shoeComp def for def in x] @@ -818,7 +818,7 @@ bfInsertLet(x,body)== [false,nil,x,body] [b,norq,name1,body1] := bfInsertLet1 (first x,body) [b1,norq1,name2,body2] := bfInsertLet (rest x,body1) - [b or b1,cons(norq,norq1),bfParameterList(name1,name2),body2] + [b or b1,[norq,:norq1],bfParameterList(name1,name2),body2] bfInsertLet1(y,body)== y is ["L%T",l,r] => [false,nil,l,bfMKPROGN [bfLET(r,l),body]] @@ -854,7 +854,7 @@ shoeCompTran x== body := fl => fvs:=["DECLARE",["SPECIAL",:fl]] - cons(fvs,body) + [fvs,:body] body [lamtype,args, :body] @@ -899,7 +899,7 @@ shoeCompTran1 x== isDynamicVariable x => $dollarVars:= MEMQ(x,$dollarVars)=>$dollarVars - cons(x,$dollarVars) + [x,:$dollarVars] nil U:=car x U = "QUOTE" => nil @@ -910,21 +910,21 @@ shoeCompTran1 x== not bfBeginsDollar l=> $locVars:= MEMQ(l,$locVars)=>$locVars - cons(l,$locVars) + [l,:$locVars] $dollarVars:= MEMQ(l,$dollarVars)=>$dollarVars - cons(l,$dollarVars) + [l,:$dollarVars] l is ["FLUID",:.] => $fluidVars:= MEMQ(second l,$fluidVars)=>$fluidVars - cons(second l,$fluidVars) + [second l,:$fluidVars] x.rest.first := second l U in '(PROG LAMBDA) => newbindings:=nil for y in second x repeat not MEMQ(y,$locVars)=> - $locVars:=cons(y,$locVars) - newbindings:=cons(y,newbindings) + $locVars := [y,:$locVars] + newbindings := [y,:newbindings] res := shoeCompTran1 CDDR x $locVars := [y for y in $locVars | not MEMQ(y,newbindings)] shoeCompTran1 first x @@ -936,7 +936,7 @@ bfTagged(a,b)== b = "FLUID" => bfLET(compFluid a,nil) b = "fluid" => bfLET(compFluid a,nil) b = "local" => bfLET(compFluid a,nil) - $typings:=cons(["TYPE",b,a],$typings) + $typings := [["TYPE",b,a],:$typings] a ["THE",b,a] @@ -1038,7 +1038,7 @@ bfWhere (context,expr)== -- n>= # s => nil -- [exp,ind]:=shoeReadLisp(s,n) -- exp = nil => nil --- cons(exp,shoeReadLispString(s,ind)) +-- [exp,:shoeReadLispString(s,ind)] bfCompHash(op,argl,body) == auxfn:= INTERN CONCAT (PNAME op,'";") @@ -1089,7 +1089,7 @@ bfNameArgs (x,y)== y := y is ["TUPLE",:.] => rest y [y] - cons(x,y) + [x,:y] bfCreateDef: %Thing -> %List bfCreateDef x== diff --git a/src/boot/includer.boot b/src/boot/includer.boot index 655d2cb6..e7b7dc52 100644 --- a/src/boot/includer.boot +++ b/src/boot/includer.boot @@ -152,7 +152,7 @@ shoePackageStartsAt (lines,sz,name,stream)== bStreamNull stream => [[],['nullstream]] a := CAAR stream #a >= 8 and SUBSTRING(a,0,8)='")package" => - shoePackageStartsAt(cons(CAAR stream,lines),sz,name,rest stream) + shoePackageStartsAt([CAAR stream,:lines],sz,name,rest stream) #a < sz => shoePackageStartsAt(lines, sz,name,rest stream) SUBSTRING(a,0,sz)=name and (#a>sz and not shoeIdChar(a.sz)) => @@ -191,7 +191,7 @@ bMap1(:z)== [f,x]:=z if bStreamNull x then $bStreamNil - else cons(FUNCALL(f,first x),bMap(f,rest x)) + else [FUNCALL(f,first x),:bMap(f,rest x)] shoeFileMap(f, fn)== a:=shoeInputFile fn @@ -203,7 +203,7 @@ shoeFileMap(f, fn)== bDelay(f,x) == - cons("nonnullstream",[f,:x]) + ["nonnullstream",:[f,:x]] bAppend(x,y) == bDelay(function bAppend1,[x,y]) @@ -212,7 +212,7 @@ bAppend1(:z)== bStreamNull first z => bStreamNull second z => ["nullstream"] second z - cons(CAAR z,bAppend(CDAR z,second z)) + [CAAR z,:bAppend(CDAR z,second z)] bNext(f,s) == bDelay(function bNext1,[f,s]) @@ -228,14 +228,14 @@ bRgen s == bRgen1(:s) == a := shoeReadLine first s shoePLACEP a => ["nullstream"] - cons(a,bRgen first s) + [a,:bRgen first s] bIgen n == bDelay(function bIgen1,[n]) bIgen1(:n)== n:=first n+1 - cons(n,bIgen n) + [n,:bIgen n] bAddLineNumber(f1,f2) == bDelay(function bAddLineNumber1,[f1,f2]) @@ -244,7 +244,7 @@ bAddLineNumber1(:f)== [f1,f2] := f bStreamNull f1 => ["nullstream"] bStreamNull f2 => ["nullstream"] - cons(cons(first f1,first f2),bAddLineNumber(rest f1,rest f2)) + [[first f1,:first f2],:bAddLineNumber(rest f1,rest f2)] @@ -359,15 +359,15 @@ shoeThen1(keep,b,s)== keep1:= first keep b1 := first b command :=shoeIf? string => - keep1 and b1=> shoeThen(cons(true,keep),cons(STTOMC command,b),t) - shoeThen(cons(false,keep),cons(false,b),t) + keep1 and b1=> shoeThen([true,:keep],[STTOMC command,:b],t) + shoeThen([false,:keep],[false,:b],t) command :=shoeElseIf? string=> keep1 and not b1=> - shoeThen(cons(true,rest keep),cons(STTOMC command,rest b),t) - shoeThen(cons(false,rest keep),cons(false,rest b),t) + shoeThen([true,:rest keep],[STTOMC command,:rest b],t) + shoeThen([false,:rest keep],[false,:rest b],t) command :=shoeElse? string => - keep1 and not b1=>shoeElse(cons(true,rest keep),cons(true,rest b),t) - shoeElse(cons(false,rest keep),cons(false,rest b),t) + keep1 and not b1=>shoeElse([true,:rest keep],[true,:rest b],t) + shoeElse([false,:rest keep],[false,:rest b],t) command :=shoeEndIf? string=> rest b = nil => shoeInclude t shoeThen(rest keep,rest b,t) @@ -385,8 +385,8 @@ shoeElse1(keep,b,s)== b1:=first b keep1:=first keep command :=shoeIf? string=> - keep1 and b1=> shoeThen(cons(true,keep),cons(STTOMC command,b),t) - shoeThen(cons(false,keep),cons(false,b),t) + keep1 and b1=> shoeThen([true,:keep],[STTOMC command,:b],t) + shoeThen([false,:keep],[false,:b],t) command :=shoeEndIf? string => rest b = nil => shoeInclude t shoeThen(rest keep,rest b,t) diff --git a/src/boot/parser.boot b/src/boot/parser.boot index baf38b14..ce22eb37 100644 --- a/src/boot/parser.boot +++ b/src/boot/parser.boot @@ -79,7 +79,7 @@ bpNextToken() == bpFirstToken() bpState()== [$inputStream,$stack,$bpParenCount,$bpCount] ---cons($inputStream,$stack) +--[$inputStream,:$stack] bpRestore(x)== $inputStream:=first x @@ -509,8 +509,8 @@ bpCancel()== bpAddTokens n== n=0 => nil - n>0=> cons(shoeTokConstruct("KEY","SETTAB",shoeTokPosn $stok),bpAddTokens(n-1)) - cons(shoeTokConstruct("KEY","BACKTAB",shoeTokPosn $stok),bpAddTokens(n+1)) + n>0=> [shoeTokConstruct("KEY","SETTAB",shoeTokPosn $stok),:bpAddTokens(n-1)] + [shoeTokConstruct("KEY","BACKTAB",shoeTokPosn $stok),:bpAddTokens(n+1)] bpExceptions()== bpEqPeek "DOT" or bpEqPeek "QUOTE" or diff --git a/src/boot/pile.boot b/src/boot/pile.boot index 19c48923..fa19c102 100644 --- a/src/boot/pile.boot +++ b/src/boot/pile.boot @@ -49,11 +49,11 @@ shoePileColumn t== -- s is a token-dq-stream shoePileInsert (s)== - bStreamNull s => cons([],s) + bStreamNull s => [[],:s] toktype := shoeTokType CAAAR s - toktype = "LISP" or toktype = "LINE" => cons([first s],rest s) + toktype = "LISP" or toktype = "LINE" => [[first s],:rest s] a:=shoePileTree(-1,s) - cons([a.2],a.3) + [[a.2],:a.3] shoePileTree(n,s)== bStreamNull s => [false,n,[],s] @@ -73,14 +73,14 @@ shoePileForest(n,s)== [b,hh,h,t] := shoePileTree(n,s) b => [h1,t1]:=shoePileForest1(hh,t) - [cons(h,h1),t1] + [[h,:h1],t1] [[],s] shoePileForest1(n,s)== [b,n1,h,t] := eqshoePileTree(n,s) b => [h1,t1]:=shoePileForest1(n,t) - [cons(h,h1),t1] + [[h,:h1],t1] [[],s] shoePileForests(h,n,s)== @@ -111,7 +111,7 @@ shoePileCoagulate(a,b)== d is ["KEY",:.] and (e has SHOEINF or e = "COMMA" or e = "SEMICOLON") => shoePileCoagulate(dqAppend(a,c),rest b) - cons(a,shoePileCoagulate(c,rest b)) + [a,:shoePileCoagulate(c,rest b)] shoeSeparatePiles x== x = nil => [] 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) diff --git a/src/boot/translator.boot b/src/boot/translator.boot index 3a13d44a..68b9eef3 100644 --- a/src/boot/translator.boot +++ b/src/boot/translator.boot @@ -282,7 +282,7 @@ shoeTransformToFile(fn,str)== shoeConsoleItem (str)== dq := first str shoeConsoleLines shoeDQlines dq - cons(shoeParseTrees dq, rest str) + [shoeParseTrees dq,:rest str] bFileNext(fn,s) == bDelay(function bFileNext1,[fn,s]) @@ -533,11 +533,11 @@ defuse(e,x)== then $bootDefinedTwice:= nee="TOP-LEVEL"=> $bootDefinedTwice - cons(nee,$bootDefinedTwice) + [nee,:$bootDefinedTwice] else HPUT($bootDefined,nee,true) defuse1 (e,niens) for i in $used repeat - HPUT($bootUsed,i,cons(nee,GETHASH(i,$bootUsed))) + HPUT($bootUsed,i,[nee,:GETHASH(i,$bootUsed)]) defuse1(e,y)== atom y => @@ -563,13 +563,13 @@ defSeparate x== f := first x [x1,x2] := defSeparate rest x bfBeginsDollar f => [[f,:x1],x2] - [x1,cons(f,x2)] + [x1,[f,:x2]] unfluidlist x== x = nil => [] atom x => [x] x is ["&REST",y]=> [y] - cons(first x,unfluidlist rest x) + [first x,:unfluidlist rest x] defusebuiltin x == GETHASH(x,$lispWordTable) @@ -653,7 +653,7 @@ shoeTransform2 str== shoeItem (str)== dq:=first str - cons([[first line for line in shoeDQlines dq]],rest str) + [[[first line for line in shoeDQlines dq]],:rest str] stripm (x,pk,bt)== atom x => @@ -661,7 +661,7 @@ stripm (x,pk,bt)== SYMBOL_-PACKAGE x = bt => INTERN(PNAME x,pk) x x - CONS(stripm(first x,pk,bt),stripm(rest x,pk,bt)) + [stripm(first x,pk,bt),:stripm(rest x,pk,bt)] shoePCompile fn== fn:=stripm(fn,_*PACKAGE_*,FIND_-PACKAGE '"BOOTTRAN") |