diff options
author | dos-reis <gdr@axiomatics.org> | 2010-12-12 04:12:20 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2010-12-12 04:12:20 +0000 |
commit | 2583edf6b172ea98d700773df5f51761aee01692 (patch) | |
tree | 8df49363ad97afcdeaca8a2dd0f18eb778849b22 /src | |
parent | dd14d434d1d7d06cd90a5a8a0fd1bef6cfffda8f (diff) | |
download | open-axiom-2583edf6b172ea98d700773df5f51761aee01692.tar.gz |
Clean symbol vs. character vs. string confusion
Diffstat (limited to 'src')
-rw-r--r-- | src/interp/bc-solve.boot | 16 | ||||
-rw-r--r-- | src/interp/br-con.boot | 14 | ||||
-rw-r--r-- | src/interp/br-op2.boot | 4 | ||||
-rw-r--r-- | src/interp/br-saturn.boot | 2 | ||||
-rw-r--r-- | src/interp/br-search.boot | 22 | ||||
-rw-r--r-- | src/interp/c-util.boot | 6 | ||||
-rw-r--r-- | src/interp/fortcall.boot | 24 | ||||
-rw-r--r-- | src/interp/g-util.boot | 2 | ||||
-rw-r--r-- | src/interp/i-output.boot | 8 | ||||
-rw-r--r-- | src/interp/i-syscmd.boot | 4 | ||||
-rw-r--r-- | src/interp/newfort.boot | 6 | ||||
-rw-r--r-- | src/interp/nruncomp.boot | 2 | ||||
-rw-r--r-- | src/interp/pspad1.boot | 2 | ||||
-rw-r--r-- | src/interp/pspad2.boot | 2 | ||||
-rw-r--r-- | src/interp/record.boot | 2 | ||||
-rw-r--r-- | src/interp/word.boot | 12 |
16 files changed, 64 insertions, 64 deletions
diff --git a/src/interp/bc-solve.boot b/src/interp/bc-solve.boot index 7ccace8a..e3062226 100644 --- a/src/interp/bc-solve.boot +++ b/src/interp/bc-solve.boot @@ -184,26 +184,26 @@ bcCreateVariableString(i) == strconc('"x",STRINGIMAGE i) bcMakeUnknowns(number)== - apply(function strconc,[strconc(bcCreateVariableString(i)," ") for i in 1..number]) + apply(function strconc,[strconc(bcCreateVariableString(i),'" ") for i in 1..number]) bcMakeEquations(i,number)== - number =1 => strconc(bcCreateVariableString(1),"^2+1") + number =1 => strconc(bcCreateVariableString(1),'"^2+1") bcCreateVariableString(i) strconc( strconc( - apply(function strconc,[strconc(bcCreateVariableString(j),"+") for j in 1..number]),"1"), - strconc("-2*",strconc(bcCreateVariableString(i),"^2"))) + apply(function strconc,[strconc(bcCreateVariableString(j),'"+") for j in 1..number]),'"1"), + strconc('"-2*",strconc(bcCreateVariableString(i),'"^2"))) bcMakeLinearEquations(i,number)== number = 1 => bcCreateVariableString(1) number = 2 => - i=1 => strconc(bcCreateVariableString(1),strconc("+",bcCreateVariableString(2))) - strconc(bcCreateVariableString(1),strconc("-",bcCreateVariableString(2))) + i=1 => strconc(bcCreateVariableString(1),strconc('"+",bcCreateVariableString(2))) + strconc(bcCreateVariableString(1),strconc('"-",bcCreateVariableString(2))) strconc( strconc( - apply(function strconc,[strconc(bcCreateVariableString(j),"+") for j in 1..number]),"1"), - strconc("-2*",bcCreateVariableString(i))) + apply(function strconc,[strconc(bcCreateVariableString(j),'"+") for j in 1..number]),'"1"), + strconc('"-2*",bcCreateVariableString(i))) bcInputEquationsEnd htPage == diff --git a/src/interp/br-con.boot b/src/interp/br-con.boot index 064060d3..f0c4ad18 100644 --- a/src/interp/br-con.boot +++ b/src/interp/br-con.boot @@ -427,7 +427,7 @@ kcPage(htPage,junk) == htpSetProperty(htPage,'heading,heading) if kind = '"category" and dbpHasDefaultCategory? xpart then htSay '"This category has default package " - bcCon(strconc(name,char '_&),'"") + bcCon(strconc(name,'"&"),'"") htSayStandard '"\newline" htBeginMenu(3) htSayStandard '"\item " @@ -581,9 +581,9 @@ kcdePage(htPage,junk) == constring := strconc(name,args) conform := kind ~= '"default package" => ncParseFromString constring - [INTERN name,:rest ncParseFromString strconc(char 'd,args)] --because of & + [INTERN name,:rest ncParseFromString strconc('"d",args)] --because of & pakname := --- kind = '"category" => INTERN strconc(name,char '_&) +-- kind = '"category" => INTERN strconc(name,'"&") opOf conform domList := getDependentsOfConstructor pakname cAlist := [[getConstructorForm x,:true] for x in domList] @@ -597,9 +597,9 @@ kcuPage(htPage,junk) == constring := strconc(name,args) conform := kind ~= '"default package" => ncParseFromString constring - [INTERN name,:rest ncParseFromString strconc(char 'd,args)] --because of & + [INTERN name,:rest ncParseFromString strconc('"d",args)] --because of & pakname := - kind = '"category" => INTERN strconc(name,char '_&) + kind = '"category" => INTERN strconc(name,'"&") opOf conform domList := getUsersOfConstructor pakname cAlist := [[getConstructorForm x,:true] for x in domList] @@ -620,7 +620,7 @@ kcnPage(htPage,junk) == htpSetProperty(htPage,'heading,heading) conform:= htpProperty(htPage,'conform) pakname := - kind = '"category" => INTERN strconc(PNAME name,char '_&) + kind = '"category" => INTERN strconc(PNAME name,'"&") opOf conform domList := getImports pakname if domname then @@ -711,7 +711,7 @@ mkConform(kind,name,argString) == systemError '"Keywords in argument list?" atom parse => [parse] parse - [INTERN name,:rest ncParseFromString strconc(char 'd,argString)] --& case + [INTERN name,:rest ncParseFromString strconc('"d",argString)] --& case --======================================================================= -- Operation Page for a Domain Form from Scratch diff --git a/src/interp/br-op2.boot b/src/interp/br-op2.boot index 6b6c11e4..3eff1ceb 100644 --- a/src/interp/br-op2.boot +++ b/src/interp/br-op2.boot @@ -495,9 +495,9 @@ dbHeading(items,which,heading,:options) == capwhich := capitalize which prefix := count < 2 => - names? => pluralSay(count,strconc(capwhich," Name"),nil) + names? => pluralSay(count,strconc(capwhich,'" Name"),nil) pluralSay(count,capwhich,nil) - names? => pluralSay(count,nil,strconc(capwhich," Names")) + names? => pluralSay(count,nil,strconc(capwhich,'" Names")) pluralSay(count,nil,pluralize capwhich) [:prefix,'" for ",:heading] diff --git a/src/interp/br-saturn.boot b/src/interp/br-saturn.boot index e0a3bcd4..4b7f17c1 100644 --- a/src/interp/br-saturn.boot +++ b/src/interp/br-saturn.boot @@ -1633,7 +1633,7 @@ bcConform1 form == main where -- too, until we fix that. string? form or not isConstructorName form => s := - string? form => strconc("_"",form,"_"") + string? form => strconc('"_"",form,'"_"") STRINGIMAGE form (s.0 = char '_#) => (n := POSN1(form, $FormalFunctionParameterList)) => diff --git a/src/interp/br-search.boot b/src/interp/br-search.boot index 0279c51e..e28d118c 100644 --- a/src/interp/br-search.boot +++ b/src/interp/br-search.boot @@ -192,7 +192,7 @@ pmPreparse s == hn fn(s,0,#s) where--stupid insertion of chars to get correct pa --the following 2 lines make commutative("*") parse correctly!!!! t.0 = char '_" => t j < siz - 1 and s.j = char '_( => t - strconc(char '_",t,char '_") + strconc('"_"",t,'"_"") strconc(SUBSTRING(s,n,i - n),middle,fn(s,j,siz)) gn(s,i,j) == --replace each underscore by 4 underscores! n := or/[k for k in i..j | s.k = $charUnderscore] => @@ -241,7 +241,7 @@ mkUpDownPattern s == recurse(s,0,#s) where strconc(fixchar(s.i),recurse(s,i + 1,n)) fixchar(c) == alphabetic? c => - strconc(char '_[,CHAR_-UPCASE c,CHAR_-DOWNCASE c,char '_]) + strconc('"[",CHAR_-UPCASE c,CHAR_-DOWNCASE c,'"]") c mkGrepPattern(s,key) == @@ -834,14 +834,14 @@ generalSearchDo(htPage,flag) == which = 'ops => char 'o which = 'attrs => char 'a acc := '"" - if htButtonOn?(htPage,'cats) then acc := strconc(char 'c,acc) - if htButtonOn?(htPage,'doms) then acc := strconc(char 'd,acc) - if htButtonOn?(htPage,'paks) then acc := strconc(char 'p,acc) - if htButtonOn?(htPage,'defs) then acc := strconc(char 'x,acc) + if htButtonOn?(htPage,'cats) then acc := strconc('"c",acc) + if htButtonOn?(htPage,'doms) then acc := strconc('"d",acc) + if htButtonOn?(htPage,'paks) then acc := strconc('"p",acc) + if htButtonOn?(htPage,'defs) then acc := strconc('"x",acc) n := #acc n = 0 or n = 4 => '"[cdpx]" n = 1 => acc - strconc(char '_[,acc,char '_]) + strconc('"[",acc,'"]") form := mkDetailedGrepPattern(kindCode,name,nargs,npat) lines := applyGrep(form,'libdb) --lines := dbReadLines resultFile @@ -871,7 +871,7 @@ mkDetailedGrepPattern(kind,name,nargs,argOrSig) == main where main() == nottick := '"[^`]" name := replaceGrepStar name - firstPart := strconc(char "^",kind,name) + firstPart := strconc('"^",kind,name) nargsPart := replaceGrepStar nargs exposedPart := char '_. --always get exposed/unexposed patPart := replaceGrepStar argOrSig @@ -897,8 +897,8 @@ replaceGrepStar s == standardizeSignature(s) == underscoreDollars s.0 = char '_( => s k := STRPOS('"->",s,0,nil) or return s --will fail except perhaps on constants - s.(k - 1) = char '_) => strconc(char '_(,s) - strconc(char '_(,SUBSTRING(s,0,k),char '_),SUBSTRING(s,k,nil)) + s.(k - 1) = char '_) => strconc('"(",s) + strconc('"(",SUBSTRING(s,0,k),'")",SUBSTRING(s,k,nil)) underscoreDollars(s) == fn(s,0,MAXINDEX s) where fn(s,i,n) == @@ -950,7 +950,7 @@ grepSource key == 'comdb mkGrepTextfile s == - strconc(systemRootDirectory(),"/algebra/", STRINGIMAGE s, '".text") + strconc(systemRootDirectory(),'"/algebra/", STRINGIMAGE s, '".text") getTemporaryDirectory() == getEnv '"TMP" or getEnv '"TEMP" diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot index 134bb196..2ea52cc0 100644 --- a/src/interp/c-util.boot +++ b/src/interp/c-util.boot @@ -739,13 +739,13 @@ flatten(l,key) == genDomainVar() == $Index:= $Index+1 - INTERNL strconc("#D",STRINGIMAGE $Index) + INTERNL strconc('"#D",STRINGIMAGE $Index) genVariable() == - INTERNL strconc("#G",STRINGIMAGE ($genSDVar:= $genSDVar+1)) + INTERNL strconc('"#G",STRINGIMAGE ($genSDVar:= $genSDVar+1)) genSomeVariable() == - INTERNL strconc("##",STRINGIMAGE ($genSDVar:= $genSDVar+1)) + INTERNL strconc('"##",STRINGIMAGE ($genSDVar:= $genSDVar+1)) listOfIdentifiersIn x == IDENTP x => [x] diff --git a/src/interp/fortcall.boot b/src/interp/fortcall.boot index 10e65a79..7a195749 100644 --- a/src/interp/fortcall.boot +++ b/src/interp/fortcall.boot @@ -70,7 +70,7 @@ makeFort1(name,args,userArgs,dummies,decls,results,returnType,aspInfo) == arrayArgs := [u for u in args | not member(u,scalarArgs)] orderedArgs := [:scalarArgs,:arrayArgs] file := if $fortranDirectory then - strconc($fortranDirectory,"/",STRINGIMAGE name) + strconc($fortranDirectory,'"/",STRINGIMAGE name) else STRINGIMAGE name makeFortranFun(name,orderedArgs,args,dummies,decls,results,file, @@ -82,11 +82,11 @@ makeFort1(name,args,userArgs,dummies,decls,results,returnType,aspInfo) == makeFortranFun(name,args,fortranArgs,dummies,decls,results,file,dir, returnType,asps) == -- Create a C file to call the library function, and compile it. - fp := MAKE_-OUTSTREAM(strconc(file,".c")) + fp := MAKE_-OUTSTREAM(strconc(file,'".c")) writeCFile(name,args,fortranArgs,dummies,decls,results,returnType,asps,fp) if null dir then dir := '"." - asps => SYSTEM strconc("cc -c ",file,".c ; mv ",file,".o ",dir) - SYSTEM strconc("cc ",file,".c -o ",file,".spadexe ",$fortranLibraries) + asps => SYSTEM strconc('"cc -c ",file,'".c ; mv ",file,'".o ",dir) + SYSTEM strconc('"cc ",file,'".c -o ",file,'".spadexe ",$fortranLibraries) writeCFile(name,args,fortranArgs,dummies,decls,results,returnType,asps,fp) == writeLine('"#include <stdio.h>",fp) @@ -107,7 +107,7 @@ writeCFile(name,args,fortranArgs,dummies,decls,results,returnType,asps,fp) == routineName := name -- If it is a function then give it somewhere to stick its result: if returnType then - returnName := INTERN strconc(name,"__result") + returnName := INTERN strconc(name,'"__result") wl(['" ",getCType returnType,'" ",returnName,'",",routineName,'"();"],fp) -- print out type declarations for the Fortran parameters, and build an -- ordered list of pairs [<parameter> , <type>] @@ -301,7 +301,7 @@ makeSpadFun(name,userArgs,args,dummies,decls,results,returnType,asps,aspInfo, -- To make sure the spad interpreter isn't confused: if returnType then - returnName := INTERN strconc(name,"Result") + returnName := INTERN strconc(name,'"Result") decls := [[returnType,returnName], :decls] results := [returnName, :results] argNames := [INTERN strconc(STRINGIMAGE(u),'"__arg") for u in userArgs] @@ -315,7 +315,7 @@ makeSpadFun(name,userArgs,args,dummies,decls,results,returnType,asps,aspInfo, fargNames := delete(INTERN strconc(STRINGIMAGE(u),'"__arg"),fargNames) resPar := ["construct",["@",["construct",:fargNames],_ ["List",["Any"]]]] - call := [["$elt","Lisp","invokeFortran"],strconc(file,".spadexe"),_ + call := [["$elt","Lisp","invokeFortran"],strconc(file,'".spadexe"),_ [["$elt","Lisp","construct"],:mkQuote args],_ [["$elt","Lisp","construct"],:mkQuote union(asps,dummies)], decPar,_ [["$elt","Lisp","construct"],:mkQuote results],resPar] @@ -387,7 +387,7 @@ compileAndLink(fortFileList,fortCompiler,cFile,outFile,linkerArgs) == addSpaces(stringList) == l := " " - for s in stringList repeat l := strconc(l,s," ") + for s in stringList repeat l := strconc(l,s,'" ") l complexRows z == @@ -681,7 +681,7 @@ generateResultsName()==strconc($fortranTmpDir,getEnv('"HOST"), fortCall(objFile,data,results) == tmpFile1 := writeData(generateDataName(),data) tmpFile2 := generateResultsName() - SYSTEM strconc(objFile," < ",tmpFile1," > ",tmpFile2) + SYSTEM strconc(objFile,'" < ",tmpFile1,'" > ",tmpFile2) results := readData(tmpFile2,results) removeFile tmpFile1 removeFile tmpFile2 @@ -694,7 +694,7 @@ invokeNagman(objFiles,nfile,args,dummies,decls,results,actual) == prepareResults(results,args,dummies,actual,decls)),_ results,decls,inFirstNotSecond(args,dummies),actual) -- Tidy up asps - -- if objFiles then SYSTEM strconc("rm -f ",addSpaces objFiles) + -- if objFiles then SYSTEM strconc('"rm -f ",addSpaces objFiles) for fn in objFiles repeat removeFile fn result @@ -704,8 +704,8 @@ nagCall(objFiles,nfile,data,results,tmpFiled,tmpFiler) == $nagMessages => '"on" '"off" writeData(tmpFiled,data) - toSend:=strconc($nagHost," ",nfile," ",tmpFiler," ",tmpFiled," ",_ - STRINGIMAGE($fortPersistence)," ", nagMessagesString," ",addSpaces objFiles) + toSend:=strconc($nagHost,'" ",nfile,'" ",tmpFiler,'" ",tmpFiled,'" ",_ + STRINGIMAGE($fortPersistence),'" ", nagMessagesString,'" ",addSpaces objFiles) sockSendString(8,toSend) if sockGetInt(8)=1 then results := readData(tmpFiler,results) diff --git a/src/interp/g-util.boot b/src/interp/g-util.boot index 20df873d..727c2073 100644 --- a/src/interp/g-util.boot +++ b/src/interp/g-util.boot @@ -73,7 +73,7 @@ stringToChar s == s = '"\b" => $Backspace s = '"\t" => $HorizontalTab s = '"\v" => $VerticalTab - error strconc("invalid character designator: ", s) + error strconc('"invalid character designator: ", s) --% VM forms diff --git a/src/interp/i-output.boot b/src/interp/i-output.boot index 40ad756c..a05df223 100644 --- a/src/interp/i-output.boot +++ b/src/interp/i-output.boot @@ -1657,7 +1657,7 @@ outputOp x == n:= GETL(op,"NARY") => 2 #args - newop:= INTERN strconc("*",STRINGIMAGE n,PNAME op) + newop:= INTERN strconc('"*",STRINGIMAGE n,PNAME op) [newop,:[outputOp y for y in args]] x @@ -2686,10 +2686,10 @@ parms2String x == x is [var] => var if x is ["tuple",:.] then x := rest x paren [parm xs for xs in tails x] where - paren l == "strconc"/["(",:l,")"] + paren l == "strconc"/['"(",:l,'")"] parm xs == null rest xs => first xs - strconc(first xs, ", ") + strconc(first xs, '", ") inputForm2String x == atom x => primaryForm2String x @@ -2706,7 +2706,7 @@ inputForm2String x == op in '(_@ _:_: pretend) => typedForm2String(op, first args, second args) op = "+->" => - strconc(parms2String second x, " ", first x, " ", + strconc(parms2String second x, '" ", first x, '" ", inputForm2String third x) callForm2String x callForm2String x diff --git a/src/interp/i-syscmd.boot b/src/interp/i-syscmd.boot index b5441fef..892d9601 100644 --- a/src/interp/i-syscmd.boot +++ b/src/interp/i-syscmd.boot @@ -2700,7 +2700,7 @@ diffAlist(new,old) == reportUndo acc == for [name,:proplist] in acc repeat - sayBrightly strconc("Properties of ",PNAME name,'" ::") + sayBrightly strconc('"Properties of ",PNAME name,'" ::") curproplist := LASSOC(name,CAAR $InteractiveFrame) for [prop,:value] in proplist repeat sayBrightlyNT ['" ",prop,'" was: "] @@ -2925,7 +2925,7 @@ printLabelledList(ls,label1,label2,prefix,patterns) == sayBrightly '"" whatCommands(patterns) == - label := strconc("System Commands for User Level: ", + label := strconc('"System Commands for User Level: ", STRINGIMAGE $UserLevel) centerAndHighlight(label,$LINELENGTH,specialChar 'hbar) l := filterListOfStrings(patterns, diff --git a/src/interp/newfort.boot b/src/interp/newfort.boot index e83ce7c7..203345e9 100644 --- a/src/interp/newfort.boot +++ b/src/interp/newfort.boot @@ -337,7 +337,7 @@ fortError1 u == fortError(u,v) == $fortError := "t" - msg := strconc(" ",STRINGIMAGE u); + msg := strconc('" ",STRINGIMAGE u); sayErrorly("Fortran translation error",msg) mathPrint v @@ -844,7 +844,7 @@ fortPreRoot e == fix2FortranFloat e == -- Return a Fortran float for a given integer. $fortranPrecision = "double" => strconc(STRINGIMAGE(e),".0D0") - strconc(STRINGIMAGE(e),".") + strconc(STRINGIMAGE(e),'".") isFloat e == FLOATP(e) or string?(e) and FIND(char ".",e) @@ -860,7 +860,7 @@ checkPrecision e == ePos => SUBSEQ(e,period+1,ePos) period+1 < # e => SUBSEQ(e,period+1) "0" - strconc(iPart,rPart,"D",expt) + strconc(iPart,rPart,'"D",expt) e ----------------- segment.boot ----------------------- diff --git a/src/interp/nruncomp.boot b/src/interp/nruncomp.boot index a96e2345..a3427d0f 100644 --- a/src/interp/nruncomp.boot +++ b/src/interp/nruncomp.boot @@ -528,7 +528,7 @@ NRTcheckVector domainShell == alist := [[first v,:$SetFunctions.i],:alist] alist -mkDomainCatName id == INTERN strconc(id,";CAT") +mkDomainCatName id == INTERN strconc(id,'";CAT") NRTsetVector4Part1(siglist,formlist,condlist) == $uncondList: local := nil diff --git a/src/interp/pspad1.boot b/src/interp/pspad1.boot index 124a2e46..8ba4e329 100644 --- a/src/interp/pspad1.boot +++ b/src/interp/pspad1.boot @@ -340,7 +340,7 @@ formatUnion(['Union,:r]) == x is [":",y,'Branch] => fn STRINGIMAGE y string? x => [":", INTERN x, ['Enumeration,x]] x is [":",:.] => x - tag := INTERN strconc("value",STRINGIMAGE ($count := $count + 1)) + tag := INTERN strconc('"value",STRINGIMAGE ($count := $count + 1)) [":", tag, x] formatTestForPartial u == diff --git a/src/interp/pspad2.boot b/src/interp/pspad2.boot index ecbcedb0..3cea4138 100644 --- a/src/interp/pspad2.boot +++ b/src/interp/pspad2.boot @@ -545,7 +545,7 @@ formatPileLine($m,x,newLineIfTrue) == --====================================================================== -- Utility Functions --====================================================================== -nBlanks m == strconc/[char('_ ) for i in 1..m] +nBlanks m == strconc/['" " for i in 1..m] isNewspadOperator op == GETL(op,"Led") or GETL(op,"Nud") diff --git a/src/interp/record.boot b/src/interp/record.boot index a97b7111..7313b81c 100644 --- a/src/interp/record.boot +++ b/src/interp/record.boot @@ -135,7 +135,7 @@ hyperize(u,w) == res := reverse $testOutputLineList null res => '"" null rest res => first res - strconc/[first res,:[strconc("\newline ",x) for x in rest res]] + strconc/[first res,:[strconc('"\newline ",x) for x in rest res]] verbatimize u == u = '"" => u diff --git a/src/interp/word.boot b/src/interp/word.boot index 2ae1dae5..13c8b590 100644 --- a/src/interp/word.boot +++ b/src/interp/word.boot @@ -376,12 +376,12 @@ maskConvert str == j:= 0 --index into res final := MAXINDEX str for i in 0..final repeat - char := str.i - if char = '__ and i < final then - i:= i+1 - char := str.i - else if char = '_? then char := '_& - SUFFIX(char,buf) + c := str.i + if c = char "__" and i < final then + i := i+1 + c := str.i + else if c = char "?" then c := char "&" + SUFFIX(c,buf) buf |