aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/alql.boot6
-rw-r--r--src/interp/bc-util.boot6
-rw-r--r--src/interp/br-con.boot2
-rw-r--r--src/interp/br-data.boot12
-rw-r--r--src/interp/br-op1.boot6
-rw-r--r--src/interp/br-op2.boot2
-rw-r--r--src/interp/br-saturn.boot42
-rw-r--r--src/interp/br-search.boot80
-rw-r--r--src/interp/br-util.boot20
-rw-r--r--src/interp/c-doc.boot70
-rw-r--r--src/interp/format.boot2
-rw-r--r--src/interp/g-util.boot36
-rw-r--r--src/interp/ht-root.boot4
-rw-r--r--src/interp/ht-util.boot8
-rw-r--r--src/interp/htcheck.boot6
-rw-r--r--src/interp/htsetvar.boot4
-rw-r--r--src/interp/i-map.boot2
-rw-r--r--src/interp/i-output.boot4
-rw-r--r--src/interp/i-syscmd.boot14
-rw-r--r--src/interp/match.boot2
-rw-r--r--src/interp/msgdb.boot24
-rw-r--r--src/interp/record.boot12
-rw-r--r--src/interp/topics.boot12
23 files changed, 188 insertions, 188 deletions
diff --git a/src/interp/alql.boot b/src/interp/alql.boot
index 4bc574fe..43219d0b 100644
--- a/src/interp/alql.boot
+++ b/src/interp/alql.boot
@@ -45,17 +45,17 @@ stringMatches?(pattern,subject) ==
false
alqlGetKindString(x) ==
- x.0 = char 'a or x.0 = char 'o => subString(dbPart(x,5,1),0,1)
+ x.0 = char "a" or x.0 = char "o" => subString(dbPart(x,5,1),0,1)
subString(x,0,1)
alqlGetOrigin(x) ==
field :=dbPart(x,5,1)
- k := charPosition(char '_(,field,2)
+ k := charPosition(char "(",field,2)
subString(field,1,k-1)
alqlGetParams(x) ==
field :=dbPart(x,5,1)
- k := charPosition(char '_(,field,2)
+ k := charPosition(char "(",field,2)
subString(field,k)
diff --git a/src/interp/bc-util.boot b/src/interp/bc-util.boot
index 6061e577..7f69eeb8 100644
--- a/src/interp/bc-util.boot
+++ b/src/interp/bc-util.boot
@@ -50,7 +50,7 @@ bcMkFunction(name,arg,args) ==
strconc(name,'"(",arg,strconc/[strconc('",", x) for x in args],'")")
bcString2HyString2 s ==
- (string? s) and (s.0 = char '_") =>
+ (string? s) and (s.0 = char "_"") =>
len := #s
strconc('"\_"", subString(s, 1, len-2), '"\_"")
s
@@ -96,9 +96,9 @@ bcvspace() == bcHt '"\vspace{1}\newline "
bcString2WordList s == fn(s,0,maxIndex s) where
fn(s,i,n) ==
i > n => nil
- k := or/[j for j in i..n | s.j ~= char '_ ]
+ k := or/[j for j in i..n | s.j ~= char " "]
null integer? k => nil
- l := bcFindString(s,k + 1,n,char '_ )
+ l := bcFindString(s,k + 1,n,char " ")
null integer? l => [subString(s,k)]
[subString(s,k,l-k),:fn(s,l + 1,n)]
diff --git a/src/interp/br-con.boot b/src/interp/br-con.boot
index c0cea190..bbb341b2 100644
--- a/src/interp/br-con.boot
+++ b/src/interp/br-con.boot
@@ -76,7 +76,7 @@ conPage(a,:b) ==
conPageFastPath x == --called by conPage and constructorSearch
--gets line quickly for constructor name or abbreviation
s := STRINGIMAGE x
- charPosition(char '_*,s,0) < #s => nil --quit if name has * in it
+ charPosition(char "*",s,0) < #s => nil --quit if name has * in it
name := (string? x => makeSymbol x; x)
entry := HGET($lowerCaseConTb,name) or return nil
lineNumber := LASSQ('dbLineNumber,CDDR entry) =>
diff --git a/src/interp/br-data.boot b/src/interp/br-data.boot
index 9a6d4445..3983fde5 100644
--- a/src/interp/br-data.boot
+++ b/src/interp/br-data.boot
@@ -112,7 +112,7 @@ buildLibdbConEntry conname ==
and getConstructorModemapFromDB conname is [[.,t,:.],:.]
and t is ['CATEGORY,'package,:.] then kind := 'package
$kind :=
- pname.(maxIndex pname) = char '_& => 'x
+ pname.(maxIndex pname) = char "&" => 'x
DOWNCASE PNAME(kind).0
argl := rest $conform
conComments :=
@@ -197,8 +197,8 @@ checkCommentsForBraces(kind,sop,sigpart,comments) ==
count := 0
for i in 0..maxIndex comments repeat
c := comments.i
- c = char '_{ => count := count + 1
- c = char '_} =>
+ c = char "{" => count := count + 1
+ c = char "}" =>
count := count - 1
count < 0 => missingLeft := true
if count < 0 or missingLeft then
@@ -266,7 +266,7 @@ dbReadComments(n) ==
line := subString(line,k + 1)
while not EOFP instream and (x := READLINE instream) and
(k := maxIndex x) and (j := dbTickIndex(x,1,1)) and (j < k) and
- x.(j := j + 1) = char '_- and x.(j := j + 1) = char '_- repeat
+ x.(j := j + 1) = char "-" and x.(j := j + 1) = char "-" repeat
xtralines := [subString(x,j + 1),:xtralines]
SHUT instream
strconc(line, strconc/nreverse xtralines)
@@ -312,9 +312,9 @@ dbSplit(line,n,k) ==
dbSpreadComments(line,n) ==
line = '"" => nil
- k := charPosition(char '_-,line,n + 2)
+ k := charPosition(char "-",line,n + 2)
k >= maxIndex line => [subString(line,n)]
- line.(k + 1) ~= char '_- =>
+ line.(k + 1) ~= char "-" =>
u := dbSpreadComments(line,k)
[strconc(subString(line,n,k - n),first u),:rest u]
[subString(line,n,k - n),:dbSpreadComments(subString(line,k),0)]
diff --git a/src/interp/br-op1.boot b/src/interp/br-op1.boot
index 36098e3d..2e50119b 100644
--- a/src/interp/br-op1.boot
+++ b/src/interp/br-op1.boot
@@ -342,7 +342,7 @@ dbGatherData(htPage,opAlist,which,key) ==
while alist repeat
item := first alist
isExposed? :=
- string? item => dbExposed?(item,char 'o) --unexpanded case
+ string? item => dbExposed?(item,char "o") --unexpanded case
null (r := rest rest item) => true --assume true if unexpanded
r . 1 --expanded case
if isExposed? then return (exposureFlag := true)
@@ -689,7 +689,7 @@ dbChooseDomainOp(htPage,which,index) ==
htSayExpose(op,flag) ==
$includeUnexposed? =>
flag => htBlank()
- op.0 = char '_* => htSay '"{\em *} "
+ op.0 = char "*" => htSay '"{\em *} "
htSayUnexposed()
htSay '""
--============================================================================
@@ -831,7 +831,7 @@ dbExpandOpAlistIfNecessary(htPage,opAlist,which,needOrigins?,condition?) ==
else sig := rest sig
conname := intern dbNewConname line
origin := [conname,:getConstructorArgs conname]
- exposeFlag := dbExposed?(line,char 'o)
+ exposeFlag := dbExposed?(line,char "o")
acc := [[sig,predicate,origin,exposeFlag,comments],:acc]
--always store the fruits of our labor:
pair.rest := nreverse acc --at least partially expand it
diff --git a/src/interp/br-op2.boot b/src/interp/br-op2.boot
index 47f0ab3f..84cb23c6 100644
--- a/src/interp/br-op2.boot
+++ b/src/interp/br-op2.boot
@@ -544,7 +544,7 @@ opPageFast opAlist == --called by oSearch
opPageFastPath opstring ==
--return nil
x := STRINGIMAGE opstring
- charPosition(char '_*,x,0) < #x => nil --quit if name has * in it
+ charPosition(char "*",x,0) < #x => nil --quit if name has * in it
op := (string? x => makeSymbol x; x)
mmList := getAllModemapsFromDatabase(op,nil) or return nil
opAlist := [[op,:[item for mm in mmList]]] where item() ==
diff --git a/src/interp/br-saturn.boot b/src/interp/br-saturn.boot
index 5080d6e4..98b9543f 100644
--- a/src/interp/br-saturn.boot
+++ b/src/interp/br-saturn.boot
@@ -236,7 +236,7 @@ htMakeErrorPage htPage ==
writeSaturnLines lines ==
for line in lines repeat
- if line ~= '"" and line.0 = char '_\ then saturnTERPRI()
+ if line ~= '"" and line.0 = char "\" then saturnTERPRI()
saturnPRINTEXP line
writeSaturn(line) ==
@@ -244,7 +244,7 @@ writeSaturn(line) ==
n := maxIndex line
while --advance k if true
k > n => false
- line.k ~= char '_\ => true
+ line.k ~= char "\" => true
code := isBreakSegment?(line, k + 1,n) => false
true
repeat (k := k + 1)
@@ -268,7 +268,7 @@ writeSaturn(line) ==
$marg := $marg + 3
writeSaturnTable subString(line,k + 7)
code = 6 =>
- i := charPosition(char '_},line,k + 4)
+ i := charPosition(char "}",line,k + 4)
tabCode := subString(line,k, i - k + 1)
writeSaturnPrint tabCode
line := subString(line,i + 1)
@@ -280,9 +280,9 @@ writeSaturn(line) ==
i :=
substring?('"\beginmenu", line,k) => k + 9
substring?('"\beginscroll",line,k) => k + 11
- charPosition(char '_},line,k)
- if char '_[ = line.(i + 1) then
- i := charPosition(char '_], line, i + 2)
+ charPosition(char "}",line,k)
+ if char "[" = line.(i + 1) then
+ i := charPosition(char "]", line, i + 2)
beginCode := subString(line,k, i - k + 1)
writeSaturnPrint(beginCode)
line := subString(line,i + 1)
@@ -291,7 +291,7 @@ writeSaturn(line) ==
i :=
substring?('"\endmenu",line,k) => k + 7
substring?('"\endscroll",line,k) => k + 9
- charPosition(char '_},line,k)
+ charPosition(char "}",line,k)
endCode := subString(line,k, i - k + 1)
writeSaturnPrint(endCode)
line := subString(line,i + 1)
@@ -302,28 +302,28 @@ writeSaturn(line) ==
isBreakSegment?(line, k, n) ==
k > n => nil
char2 := line . k
- char2 = (char '_\) => 1
- char2 = (char '_&) =>
+ char2 = (char "\") => 1
+ char2 = (char "&") =>
substring?('"&\&", line, k) => 2
nil
- char2 = char 'i =>
+ char2 = char "i" =>
substring?('"item",line,k) => 3
nil
- char2 = char 'n =>
+ char2 = char "n" =>
substring?('"newline",line,k) => 4
nil
- char2 = char 't =>
+ char2 = char "t" =>
(k := k + 2) > n => nil
- line.(k - 1) = char 'a and line.k = char 'b =>
+ line.(k - 1) = char "a" and line.k = char "b" =>
(k := k + 1) > n => nil
line.k = char "{" => 6
substring?('"table",line,k - 3) => 5
nil
char2 = char "!" => 7
- char2 = char 'b =>
+ char2 = char "b" =>
substring?('"begin",line,k) => 8
nil
- char2 = (char 'e) =>
+ char2 = (char "e") =>
substring?('"end",line,k) => 9
nil
nil
@@ -355,8 +355,8 @@ writeSaturnTable line ==
findBalancingBrace(s,k,n,level) ==
k > n => nil
c := s . k
- c = char '_{ => findBalancingBrace(s, k + 1, n, level + 1)
- c = char '_} =>
+ c = char "{" => findBalancingBrace(s, k + 1, n, level + 1)
+ c = char "}" =>
level = 0 => k
findBalancingBrace(s, k + 1, n, level - 1)
findBalancingBrace(s, k + 1, n, level)
@@ -1499,7 +1499,7 @@ unTab s ==
[unTab1 first s, :rest s]
unTab1 s ==
- ('"\tab{" < s) = 5 and (k := charPosition(char '_}, s, 4)) =>
+ ('"\tab{" < s) = 5 and (k := charPosition(char "}", s, 4)) =>
subString(s, k + 1)
s
@@ -1635,7 +1635,7 @@ bcConform1 form == main where
s :=
string? form => strconc('"_"",form,'"_"")
STRINGIMAGE form
- (s.0 = char '_#) =>
+ (s.0 = char "#") =>
(n := POSN1(form, $FormalFunctionParameterList)) =>
htSay form2HtString ($FormalMapVariableList . n)
htSay '"\"
@@ -1718,9 +1718,9 @@ purgeNewConstructorLines(lines, conlist) ==
screenLocalLine(line, conlist) ==
k := dbKind line
con := makeSymbol
- k = char 'o or k = char 'a =>
+ k = char "o" or k = char "a" =>
s := dbPart(line,5,1)
- k := charPosition(char '_(,s,1)
+ k := charPosition(char "(",s,1)
subString(s,1,k - 1)
dbName line
MEMQ(con, conlist)
diff --git a/src/interp/br-search.boot b/src/interp/br-search.boot
index 7529f96e..ef927571 100644
--- a/src/interp/br-search.boot
+++ b/src/interp/br-search.boot
@@ -60,7 +60,7 @@ grepConstruct1(s,key) ==
--returns the name of file (WITHOUT .text.$SPADNUM on the end)
$key : local := key
if key = 'k and --convert 'k to 'y if name contains an "&"
- or/[s . i = char '_& for i in 0..maxIndex s] then key := 'y
+ or/[s . i = char "&" for i in 0..maxIndex s] then key := 'y
filter := pmTransFilter STRINGIMAGE s --parses and-or-not form
filter is ['error,:.] => filter --exit on parser error
pattern := mkGrepPattern(filter,key) --create string to pass to "grep"
@@ -77,13 +77,13 @@ grepConstructDo(x, key) ==
dbExposed?(line,kind) == -- does line come from an unexposed constructor?
conname := makeSymbol
- kind = char 'a or kind = char 'o => dbNewConname line --get conname from middle
+ kind = char "a" or kind = char "o" => dbNewConname line --get conname from middle
dbName line
isExposedConstructor conname
dbScreenForDefaultFunctions lines == [x for x in lines | not isDefaultOpAtt x]
-isDefaultOpAtt x == x.(1 + dbTickIndex(x,4,0)) = char 'x
+isDefaultOpAtt x == x.(1 + dbTickIndex(x,4,0)) = char "x"
grepForAbbrev(s,key) ==
--checks that filter s is not * and is all uppercase; if so, look for abbrevs
@@ -142,7 +142,7 @@ pmTransFilter s ==
or/[isFilterDelimiter? s.i or s.i = $charUnderscore for i in 0..maxIndex s]
=> (parse := pmParseFromString s) and checkPmParse parse or
['error,'"Illegal search string",'"\vspace{3}\center{{\em Your search string} ",escapeSpecialChars s,'" {\em has incorrect syntax}}"]
- or/[s . i = char '_* and s.(i + 1) = char '_*
+ or/[s . i = char "*" and s.(i + 1) = char "*"
and (i=0 or s . (i - 1) ~= char $charUnderscore) for i in 0..(maxIndex s - 1)]
=> ['error,'"Illegal search string",'"\vspace{3}\center{Consecutive {\em *}'s are not allowed in search patterns}"]
s
@@ -190,8 +190,8 @@ pmPreparse s == hn fn(s,0,#s) where--stupid insertion of chars to get correct pa
middle :=
t in '("and" "or" "not") => t
--the following 2 lines make commutative("*") parse correctly!!!!
- t.0 = char '_" => t
- j < siz - 1 and s.j = char '_( => t
+ t.0 = char "_"" => t
+ j < siz - 1 and s.j = char "(" => t
strconc('"_"",t,'"_"")
strconc(subString(s,n,i - n),middle,fn(s,j,siz))
gn(s,i,j) == --replace each underscore by 4 underscores!
@@ -216,15 +216,15 @@ grepSplit(lines,doc?) ==
line := READLINE instream2
kind := dbKind line
not $includeUnexposed? and not dbExposed?(line,kind) => 'skip
- (kind = char 'a or kind = char 'o) and isDefaultOpAtt line => 'skip
+ (kind = char "a" or kind = char "o") and isDefaultOpAtt line => 'skip
PROGN
- kind = char 'c => cats := insert(line,cats)
- kind = char 'd => doms := insert(line,doms)
- kind = char 'x => defs := insert(line,defs)
- kind = char 'p => paks := insert(line,paks)
- kind = char 'a => atts := insert(line,atts)
- kind = char 'o => ops := insert(line,ops)
- kind = char '_- => 'skip --for now
+ kind = char "c" => cats := insert(line,cats)
+ kind = char "d" => doms := insert(line,doms)
+ kind = char "x" => defs := insert(line,defs)
+ kind = char "p" => paks := insert(line,paks)
+ kind = char "a" => atts := insert(line,atts)
+ kind = char "o" => ops := insert(line,ops)
+ kind = char "-" => 'skip --for now
systemError 'kind
if doc? then CLOSE instream2
[['"attribute",:nreverse atts],
@@ -253,14 +253,14 @@ mkGrepPattern1(x,:options) == --called by mkGrepPattern (and grepConstructName?)
$options : local := options
s := STRINGIMAGE x
--s := DOWNCASE STRINGIMAGE x
- addOptions remUnderscores addWilds split(g s,char '_*) where
+ addOptions remUnderscores addWilds split(g s,char "*") where
addWilds sl == --add wild cards (sl is list of parts between *'s)
IFCAR sl = '"" => h(IFCDR sl,[$wild1])
h(sl,nil)
g s == --remove "*"s around pattern for text match
not ('w in $options) => s
- if s.0 = char '_* then s := subString(s,1)
- if s.(k := maxIndex s) = char '_* then s := subString(s,0,k)
+ if s.0 = char "*" then s := subString(s,1)
+ if s.(k := maxIndex s) = char "*" then s := subString(s,0,k)
s
h(sl,res) == --helper for wild cards
sl is [s,:r] => h(r,[$wild1,s,:res])
@@ -369,7 +369,7 @@ looksLikeDomainForm x ==
spadSys(x) == --called by \spadsyscom{x}
s := PNAME x
- if s.0 = char '_) then s := subString(s,1)
+ if s.0 = char ")" then s := subString(s,1)
form := ncParseFromString s or
systemError ['"Argument: ",s,'" to spadType won't parse"]
htSystemCommands PNAME opOf form
@@ -392,7 +392,7 @@ genSearch(filter,:options) == --"Complete" from HD (see man0.ht) and aokSearch
if includeDoc? then
docSearchAlist := grepConstruct(key,'w,true)
docSearchAlist is ['error,:.] => bcErrorPage docSearchAlist
- docSearchAlist := [x for x in docSearchAlist | x.0 ~= char 'x]--drop defaults
+ docSearchAlist := [x for x in docSearchAlist | x.0 ~= char "x"]--drop defaults
genSearch1(filter,genSearchTran regSearchAlist,genSearchTran docSearchAlist)
genSearchTran alist == [[x,y,:y] for [x,:y] in alist]
@@ -546,7 +546,7 @@ docSearch filter == --"Documentation" from HD (see man0.ht)
key := removeSurroundingStars filter
docSearchAlist := grepConstruct(filter,'w,true)
docSearchAlist is ['error,:.] => bcErrorPage docSearchAlist
- docSearchAlist := [x for x in docSearchAlist | x.0 ~= char 'x] --drop defaults
+ docSearchAlist := [x for x in docSearchAlist | x.0 ~= char "x"] --drop defaults
docSearch1(filter,genSearchTran docSearchAlist)
docSearch1(filter,doc) ==
@@ -570,8 +570,8 @@ docSearch1(filter,doc) ==
removeSurroundingStars filter ==
key := STRINGIMAGE filter
- if key.0 = char '_* then key := subString(key,1)
- if key.(max := maxIndex key) = char '_* then key := subString(key,0,max)
+ if key.0 = char "*" then key := subString(key,1)
+ if key.(max := maxIndex key) = char "*" then key := subString(key,0,max)
key
showNamedDoc([kind,:lines],index) ==
@@ -593,7 +593,7 @@ stripOffSegments(s,n) ==
progress := true
while n > 0 and progress = true repeat
n := n - 1
- k := charPosition(char '_`,s,0)
+ k := charPosition(char "`",s,0)
new := subString(s,k + 1)
#new < #s => s := new
progress := false
@@ -603,7 +603,7 @@ stripOffSegments(s,n) ==
replaceTicksBySpaces s ==
n := -1
max := maxIndex s
- while (n := charPosition(char '_`,s,n + 1)) <= max repeat
+ while (n := charPosition(char "`",s,n + 1)) <= max repeat
s.n := char " "
s
@@ -660,9 +660,9 @@ constructorSearch(filter,key,kind) ==
line := conPageFastPath DOWNCASE filter =>
code := dbKind line
newkind :=
- code = char 'p => '"package"
- code = char 'd => '"domain"
- code = char 'c => '"category"
+ code = char "p" => '"package"
+ code = char "d" => '"domain"
+ code = char "c" => '"category"
nil
kind = '"constructor" or kind = newkind => kPage line
page := htInitPage('"Query Page",nil)
@@ -706,7 +706,7 @@ dbWordFrom(l,i) ==
buf := '""
while k <= idxmax and not member(c := l.k, $dbDelimiters) repeat
ch :=
- c = char '__ => l.(k := 1+k) --this may exceed bounds
+ c = char "__" => l.(k := 1+k) --this may exceed bounds
c
buf := strconc(buf,ch)
k := k + 1
@@ -831,8 +831,8 @@ generalSearchDo(htPage,flag) ==
nargs:= generalSearchString(htPage,selectors.1)
npat := standardizeSignature generalSearchString(htPage,selectors.2)
kindCode :=
- which = 'ops => char 'o
- which = 'attrs => char 'a
+ which = 'ops => char "o"
+ which = 'attrs => char "a"
acc := '""
if htButtonOn?(htPage,'cats) then acc := strconc('"c",acc)
if htButtonOn?(htPage,'doms) then acc := strconc('"d",acc)
@@ -873,37 +873,37 @@ mkDetailedGrepPattern(kind,name,nargs,argOrSig) == main where
name := replaceGrepStar name
firstPart := strconc('"^",kind,name)
nargsPart := replaceGrepStar nargs
- exposedPart := char '_. --always get exposed/unexposed
+ exposedPart := char "." --always get exposed/unexposed
patPart := replaceGrepStar argOrSig
simp strconc(conc(firstPart,conc(nargsPart,conc(exposedPart, patPart))),$tick)
conc(a,b) ==
- b = '"[^`]*" or b = char '_. => a
+ b = '"[^`]*" or b = char "." => a
strconc(a,$tick,b)
simp a ==
m := maxIndex a
- m > 6 and a.(m-5) = char '_[ and a.(m-4) = char "^"
- and a.(m-3) = $tick and a.(m-2) = char '_]
- and a.(m-1) = char '_* and a.m = $tick
+ m > 6 and a.(m-5) = char "[" and a.(m-4) = char "^"
+ and a.(m-3) = $tick and a.(m-2) = char "]"
+ and a.(m-1) = char "*" and a.m = $tick
=> simp subString(a,0,m-5)
a
replaceGrepStar s ==
s = "" => s
final := maxIndex s
- i := charPosition(char '_*,s,0)
+ i := charPosition(char "*",s,0)
i > final => s
strconc(subString(s,0,i),'"[^`]*",replaceGrepStar subString(s,i + 1))
standardizeSignature(s) == underscoreDollars
- s.0 = char '_( => s
+ s.0 = char "(" => s
k := STRPOS('"->",s,0,nil) or return s --will fail except perhaps on constants
- s.(k - 1) = char '_) => strconc('"(",s)
+ s.(k - 1) = char ")" => strconc('"(",s)
strconc('"(",subString(s,0,k),'")",subString(s,k))
underscoreDollars(s) == fn(s,0,maxIndex s) where
fn(s,i,n) ==
i > n => '""
- (m := charPosition(char '_$,s,i)) > n => subString(s,i)
+ (m := charPosition(char "$",s,i)) > n => subString(s,i)
strconc(subString(s,i,m - i),'"___$",fn(s,m + 1,n))
--=======================================================================
@@ -982,7 +982,7 @@ grepFile(pattern,:options) ==
dbUnpatchLines lines
dbUnpatchLines lines == --concatenate long lines together, skip blank lines
- dash := char '_-
+ dash := char "-"
acc := nil
while lines is [line, :lines] repeat
#line = 0 => 'skip --skip blank lines
diff --git a/src/interp/br-util.boot b/src/interp/br-util.boot
index 5c8a5a15..960d0181 100644
--- a/src/interp/br-util.boot
+++ b/src/interp/br-util.boot
@@ -52,7 +52,7 @@ browserAutoloadOnceTrigger() == nil
----------------------> Global Variables <-----------------------
$includeUnexposed? := true --default setting
-$tick := char '_` --field separator for database files
+$tick := char "`" --field separator for database files
$charUnderscore := ('__) --needed because of parser bug
$wild1 := '"[^`]*" --phrase used to convert keys to grep strings
$browseCountThreshold := 10 --the maximum number of names that will display
@@ -75,11 +75,11 @@ $docTableHash := hashTable 'EQUAL --see dbExpandOpAlistIfNecessary
$groupChoice := nil --see dbShowOperationsFromConform
------------------> Initial Settings <---------------------
-$pmFilterDelimiters := [char '_(,char '_),char '_ ]
+$pmFilterDelimiters := [char "(",char ")",char " "]
$dbKindAlist :=
- [[char 'a,:'"attribute"],[char 'o,:'"operation"],
- [char 'd,:'"domain"],[char 'p,:'"package"],
- [char 'c,:'"category"],[char 'x,:'"default_ package"]]
+ [[char "a",:'"attribute"],[char "o",:'"operation"],
+ [char "d",:'"domain"],[char "p",:'"package"],
+ [char "c",:'"category"],[char "x",:'"default_ package"]]
$OpViewTable := '(
(names "Name" "Names" dbShowOpNames)
(documentation "Name" "Names" dbShowOpDocumentation)
@@ -348,7 +348,7 @@ bcStarSpaceOp(op,exposed?) ==
null $includeUnexposed? => nil
not exposed? =>
htSayUnexposed()
- if op.0 = char '_* then htSay '" "
+ if op.0 = char "*" then htSay '" "
htBlank()
bcStarConform form ==
@@ -371,7 +371,7 @@ asharpConstructors() ==
extractFileNameFromPath s == fn(s,0,#s) where
fn(s,i,m) ==
- k := charPosition(char '_/,s,i)
+ k := charPosition(char "/",s,i)
k = m => subString(s,i)
fn(s,k + 1,m)
@@ -604,7 +604,7 @@ dbNotAvailablePage(:options) ==
--=======================================================================
-- Utility Functions for Manipulating Browse Datalines
--=======================================================================
-dbpHasDefaultCategory? s == #s > 1 and s.1 = char 'x --s is part 3 of line
+dbpHasDefaultCategory? s == #s > 1 and s.1 = char "x" --s is part 3 of line
dbKind line == line.0
@@ -632,9 +632,9 @@ dbConname(line) == dbPart(line,5,1)
dbComments line == dbReadComments(string2Integer dbPart(line,7,1))
dbNewConname(line) == --dbName line unless kind is 'a or 'o => name in 5th pos.
- (kind := line.0) = char 'a or kind = char 'o =>
+ (kind := line.0) = char "a" or kind = char "o" =>
conform := dbPart(line,5,1)
- k := charPosition(char '_(,conform,1)
+ k := charPosition(char "(",conform,1)
subString(conform,1,k - 1)
dbName line
diff --git a/src/interp/c-doc.boot b/src/interp/c-doc.boot
index 6588afb1..8cc63229 100644
--- a/src/interp/c-doc.boot
+++ b/src/interp/c-doc.boot
@@ -257,7 +257,7 @@ checkExtractItemList l == --items are separated by commas or end of line
acc := nil --l is list of remaining lines
while l repeat --stop when you get to a line with a colon
m := maxIndex first l
- k := charPosition(char '_:,first l,0)
+ k := charPosition(char ":",first l,0)
k <= m => return nil
acc := [first l,:acc]
l := rest l
@@ -377,7 +377,7 @@ checkRecordHash u ==
HPUT($glossHash,htname,[first entry,:[[$name,:$origin],:rest entry]])
else if x is '"\spadsys" and (u := checkLookForLeftBrace IFCDR u) and (u := IFCDR u) then
s := checkGetStringBeforeRightBrace u
- if s.0 = char '_) then s := subString(s,1)
+ if s.0 = char ")" then s := subString(s,1)
parse := checkGetParse s
null parse => checkDocError ['"Unparseable \spadtype: ",s]
not member(opOf parse,$currentSysList) =>
@@ -441,8 +441,8 @@ checkIsValidType form == main where
checkGetLispFunctionName s ==
n := #s
- (k := charPosition(char '_|,s,1)) and k < n and
- (j := charPosition(char '_|,s,k + 1)) and j < n => subString(s,k + 1,j-k-1)
+ (k := charPosition(char "|",s,1)) and k < n and
+ (j := charPosition(char "|",s,k + 1)) and j < n => subString(s,k + 1,j-k-1)
checkDocError ['"Ill-formed lisp expression : ",s]
'illformed
@@ -527,11 +527,11 @@ checkRemoveComments lines ==
++ percent character (%%).
checkTrimCommented line ==
n := #line
- k := htcharPosition(char '_%,line,0)
+ k := htcharPosition(char "%",line,0)
--line beginning with % is a comment
k = 0 => '""
--remarks beginning with %% are comments
- k >= n - 1 or line.(k + 1) ~= char '_% => line
+ k >= n - 1 or line.(k + 1) ~= char "%" => line
k < #line => subString(line,0,k)
line
@@ -642,9 +642,9 @@ newWordFrom(l,i,m) ==
checkAddPeriod s == --No, just leave blank at the end (rdj: 10/18/91)
m := maxIndex s
lastChar := s . m
- lastChar = char "!" or lastChar = char '_? or lastChar = char '_. => s
- lastChar = char '_, or lastChar = char '_; =>
- s . m := (char '_.)
+ lastChar = char "!" or lastChar = char "?" or lastChar = char "." => s
+ lastChar = char "," or lastChar = char ";" =>
+ s . m := char "."
s
s
@@ -654,10 +654,10 @@ checkGetArgs u ==
k := firstNonBlankPosition(u)
k > 0 => checkGetArgs subString(u,k)
stringPrefix?('"\spad{",u) =>
- k := getMatchingRightPren(u,6,char '_{,char '_}) or m
+ k := getMatchingRightPren(u,6,char "{",char "}") or m
checkGetArgs subString(u,6,k-6)
- (i := charPosition(char '_(,u,0)) > m => nil
- (u . m) ~= char '_) => nil
+ (i := charPosition(char "(",u,0)) > m => nil
+ (u . m) ~= char ")" => nil
while (k := charPosition($charComma,u,i + 1)) < m repeat
acc := [trimString subString(u,i + 1,k - i - 1),:acc]
i := k
@@ -691,7 +691,7 @@ checkAddSpaceSegments(u,k) ==
i := charPosition($charBlank,u,k)
m < i => u
j := i
- while (j := j + 1) < m and u.j = (char '_ ) repeat 'continue
+ while (j := j + 1) < m and u.j = char " " repeat 'continue
n := j - i --number of blanks
n > 1 => strconc(subString(u,0,i),'"\space{",
STRINGIMAGE n,'"}",checkAddSpaceSegments(subString(u,i + n),0))
@@ -727,7 +727,7 @@ checkExtract(header,lines) ==
lines := rest lines
null lines => nil
u := first lines
- j := charPosition(char '_:,u,k)
+ j := charPosition(char ":",u,k)
margin := k
firstLines :=
(k := firstNonBlankPosition(u,j + 1)) ~= -1 =>
@@ -741,8 +741,8 @@ checkExtract(header,lines) ==
(k := firstNonBlankPosition line) = -1 => 'skip --include if blank
k > margin => 'skip --include if idented
not upperCase? line.k => 'skip --also if not upcased
- (j := charPosition(char '_:,line,k)) = m => 'skip --or if not colon, or
- (i := charPosition(char '_ ,line,k+1)) < j => 'skip --blank before colon
+ (j := charPosition(char ":",line,k)) = m => 'skip --or if not colon, or
+ (i := charPosition(char " ",line,k+1)) < j => 'skip --blank before colon
return nil
acc := [line,:acc]
nreverse acc
@@ -808,9 +808,9 @@ checkDecorate u ==
=>
u := v
acc
- char? x and x = char '_$ or x is '"$" => ['"\$",:acc]
- char? x and x = char '_% or x is '"%" => ['"\%",:acc]
- char? x and x = char '_, or x is '"," =>
+ char? x and x = char "$" or x is '"$" => ['"\$",:acc]
+ char? x and x = char "%" or x is '"%" => ['"\%",:acc]
+ char? x and x = char "," or x is '"," =>
spadflag => ['",",:acc]
['",{}",:acc]
x is '"\spad" => ['"\spad",:acc]
@@ -821,11 +821,11 @@ checkDecorate u ==
not spadflag and string? x and ((x.0 ~= $charBack and digit?(x.(maxIndex x))) or x in '("true" "false")) =>
[$charRbrace,x,$charLbrace,'"\spad",:acc] --wrap x1, alpha3, etc
xcount := (string? x => # x; 0)
- xcount = 3 and x.1 = char 't and x.2 = char 'h =>
+ xcount = 3 and x.1 = char "t" and x.2 = char "h" =>
['"th",$charRbrace,x.0,$charLbrace,'"\spad",:acc]
- xcount = 4 and x.1 = char '_- and x.2 = char 't and x.3 = char 'h =>
+ xcount = 4 and x.1 = char "-" and x.2 = char "t" and x.3 = char "h" =>
['"-th",$charRbrace,x.0,$charLbrace,'"\spad",:acc]
- not spadflag and (xcount = 2 and x.1 = char 'i or --wrap ei, xi, hi
+ not spadflag and (xcount = 2 and x.1 = char "i" or --wrap ei, xi, hi
xcount > 0 and xcount < 4 and not x in '("th" "rd" "st") and
hasNoVowels x) => --wrap words with no vowels
[$charRbrace,x,$charLbrace,'"\spad",:acc]
@@ -835,12 +835,12 @@ checkDecorate u ==
hasNoVowels x ==
max := maxIndex x
- x.max = char 'y => false
+ x.max = char "y" => false
and/[not isVowel(x.i) for i in 0..max]
isVowel c ==
- c=char 'a or c=char 'e or c=char 'i or c=char 'o or c=char 'u or
- c=char 'A or c=char 'E or c=char 'I or c=char 'O or c=char 'U
+ c=char "a" or c=char "e" or c=char "i" or c=char "o" or c=char "u" or
+ c=char "A" or c=char "E" or c=char "I" or c=char "O" or c=char "U"
checkAddBackSlashes s ==
@@ -905,8 +905,8 @@ checkIeEgfun x ==
m := maxIndex x
for k in 0..(m - 3) repeat
x.(k + 1) = $charPeriod and x.(k + 3) = $charPeriod and
- (x.k = char 'i and x.(k + 2) = char 'e and (key := '"that is")
- or x.k = char 'e and x.(k + 2) = char 'g and (key := '"for example")) =>
+ (x.k = char "i" and x.(k + 2) = char "e" and (key := '"that is")
+ or x.k = char "e" and x.(k + 2) = char "g" and (key := '"for example")) =>
firstPart := (k > 0 => [subString(x,0,k)]; nil)
result := [:firstPart,'"\spadignore{",subString(x,k,4),'"}",
:checkIeEgfun subString(x,k+4)]
@@ -1028,8 +1028,8 @@ checkBalance u ==
++ brace ::= '{' | '}'
++ bracket ::= '[' | ']'
checkSayBracket x ==
- x = char '_( or x = char '_) => '"pren"
- x = char '_{ or x = char '_} => '"brace"
+ x = char "(" or x = char ")" => '"pren"
+ x = char "{" or x = char "}" => '"brace"
'"bracket"
checkBeginEnd u ==
@@ -1132,14 +1132,14 @@ checkTransformFirsts(opname,u,margin) ==
i := checkSkipToken(u,0,m) or return u
j := checkSkipBlanks(u,i,m) or return u
open := u.j
- open = char '_[ and (close := char '_]) or
- open = char '_( and (close := char '_)) =>
+ open = char "[" and (close := char "]") or
+ open = char "(" and (close := char ")") =>
k := getMatchingRightPren(u,j + 1,open,close)
namestring ~= (firstWord := subString(u,0,i)) =>
checkDocError ['"Improper first word in comments: ",firstWord]
u
null k =>
- if open = char '_[
+ if open = char "["
then checkDocError ['"Missing close bracket on first line: ", u]
else checkDocError ['"Missing close parenthesis on first line: ", u]
u
@@ -1171,8 +1171,8 @@ checkTransformFirsts(opname,u,margin) ==
not GETL(prefixOp,'Nud) =>
u ---what could this be?
j := checkSkipBlanks(u,i,m) or return u
- u.j = char '_( => --case 4
- j := getMatchingRightPren(u,j + 1,char '_(,char '_))
+ u.j = char "(" => --case 4
+ j := getMatchingRightPren(u,j + 1,char "(",char ")")
j > m => u
strconc('"\spad{",subString(u,0,j + 1),'"}",subString(u,j + 1))
k := checkSkipToken(u,j,m) or return u
@@ -1242,7 +1242,7 @@ whoOwns(con) ==
null $exposeFlag => nil
--con=constructor name (id beginning with a capital), returns owner as a string
filename := getConstructorSourceFileFromDB con
- quoteChar := char '_"
+ quoteChar := char "_""
runCommand strconc('"awk '$2 == ",quoteChar,filename,quoteChar,'" {print $1}' whofiles > /tmp/temp")
instream := MAKE_-INSTREAM '"/tmp/temp"
value :=
diff --git a/src/interp/format.boot b/src/interp/format.boot
index ff7a9781..9fa054d5 100644
--- a/src/interp/format.boot
+++ b/src/interp/format.boot
@@ -579,7 +579,7 @@ linearFormat x ==
[linearFormat y for y in x]
numOfSpadArguments id ==
- char("*") = (s:= PNAME id).0 =>
+ char "*" = (s:= PNAME id).0 =>
+/[n for i in 1.. while integer? (n:=readInteger PNAME s.i)]
keyedSystemError("S2IF0012",[id])
diff --git a/src/interp/g-util.boot b/src/interp/g-util.boot
index 90e10318..dfc527b9 100644
--- a/src/interp/g-util.boot
+++ b/src/interp/g-util.boot
@@ -760,7 +760,7 @@ after(u,v) ==
r
-$blank == char ('_ )
+$blank == char " "
trimString s ==
leftTrim rightTrim s
@@ -816,12 +816,12 @@ $exposeFlag := false --if true, messages go to $outStream
$exposeFlagHeading := false --see htcheck.boot
$checkingXmptex? := false --see htcheck.boot
$exposeDocHeading:= nil --see htcheck.boot
-$charPlus == char '_+
-$charBlank == (char '_ )
-$charLbrace == char '_{
-$charRbrace == char '_}
-$charBack == char '_\
-$charDash == char '_-
+$charPlus == char "+"
+$charBlank == char " "
+$charLbrace == char "{"
+$charRbrace == char "}"
+$charBack == char "\"
+$charDash == char "-"
$charTab == abstractChar 9
$charNewline == abstractChar 10
@@ -829,16 +829,16 @@ $charFauxNewline == abstractChar 25
$stringNewline == charString abstractChar 10
$stringFauxNewline == charString abstractChar 25
-$charExclusions == [char 'a, char 'A]
-$charQuote == char '_'
-$charSemiColon == char '_;
-$charComma == char '_,
-$charPeriod == char '_.
-$checkPrenAlist := [[char '_(,:char '_)],[char '_{,:char '_}],[char '_[,:char '_]]]
-$charEscapeList:= [char '_%,char '_#,$charBack]
-$charIdentifierEndings := [char '__, char "!", char '_?]
-$charSplitList := [$charComma,$charPeriod,char '_[, char '_],$charLbrace, $charRbrace, char '_(, char '_), char '_$, char '_%]
-$charDelimiters := [$charBlank, char '_(, char '_), $charBack]
+$charExclusions == [char "a", char "A"]
+$charQuote == char "'"
+$charSemiColon == char ";"
+$charComma == char ","
+$charPeriod == char "."
+$checkPrenAlist := [[char "(",:char ")"],[char "{",:char "}"],[char "[",:char "]"]]
+$charEscapeList:= [char "%",char "#",$charBack]
+$charIdentifierEndings := [char "__", char "!", char "?"]
+$charSplitList := [$charComma,$charPeriod,char "[", char "]",$charLbrace, $charRbrace, char "(", char ")", char "$", char "%"]
+$charDelimiters := [$charBlank, char "(", char ")", $charBack]
$HTspadmacros := '("\spadtype" "\spadcommand" "\spadop" "\spadfun" "\spadatt" "\spadsyscom" "\spad" "\s")
$HTmacs := [
['"\beginmenu",$charRbrace,'"menu",$charLbrace,'"\begin"],
@@ -873,7 +873,7 @@ $beginEndList := '(
isDefaultPackageName x ==
s := symbolName x
- stringChar(s,maxIndex s) = char '_&
+ stringChar(s,maxIndex s) = char "&"
isDefaultPackageForm? x ==
x is [op,:.] and IDENTP op and isDefaultPackageName op
diff --git a/src/interp/ht-root.boot b/src/interp/ht-root.boot
index 5604cf01..2540662d 100644
--- a/src/interp/ht-root.boot
+++ b/src/interp/ht-root.boot
@@ -129,7 +129,7 @@ htSetSystemVariable(htPage,[name,value]) ==
htGloss(pattern) == htGlossPage(nil,dbNonEmptyPattern pattern or '"*",true)
htGlossPage(htPage,pattern,tryAgain?) ==
- $wildCard: local := char '_*
+ $wildCard: local := char "*"
pattern = '"*" => downlink 'GlossaryPage
filter := pmTransFilter pattern
grepForm := mkGrepPattern(filter,'none)
@@ -145,7 +145,7 @@ htGlossPage(htPage,pattern,tryAgain?) ==
['"Glossary items matching {\em ",pattern,'"}"]
null lines =>
tryAgain? and #pattern > 0 =>
- (pattern.(k := maxIndex(pattern))) = char 's =>
+ (pattern.(k := maxIndex(pattern))) = char "s" =>
htGlossPage(htPage,subString(pattern,0,k),true)
upperCase? pattern.0 =>
htGlossPage(htPage,DOWNCASE pattern,false)
diff --git a/src/interp/ht-util.boot b/src/interp/ht-util.boot
index 3e443a60..641fedd7 100644
--- a/src/interp/ht-util.boot
+++ b/src/interp/ht-util.boot
@@ -565,13 +565,13 @@ $funnyQuote := abstractChar 127
$funnyBacks := abstractChar 128
htEscapeString str ==
- str := SUBSTITUTE($funnyQuote, char '_", str)
- SUBSTITUTE($funnyBacks, char '_\, str)
+ str := SUBSTITUTE($funnyQuote, char "_"", str)
+ SUBSTITUTE($funnyBacks, char "\", str)
unescapeStringsInForm form ==
string? form =>
- str := NSUBSTITUTE(char '_", $funnyQuote, form)
- NSUBSTITUTE(char '_\, $funnyBacks, str)
+ str := NSUBSTITUTE(char "_"", $funnyQuote, form)
+ NSUBSTITUTE(char "\", $funnyBacks, str)
cons? form =>
unescapeStringsInForm first form
unescapeStringsInForm rest form
diff --git a/src/interp/htcheck.boot b/src/interp/htcheck.boot
index 843ab674..23bce74e 100644
--- a/src/interp/htcheck.boot
+++ b/src/interp/htcheck.boot
@@ -99,13 +99,13 @@ buildHtMacroTable() ==
getHtMacroItem line ==
not stringPrefix?('"\newcommand{",line) => nil
- k := charPosition(char '_},line,11)
+ k := charPosition(char "}",line,11)
command := subString(line,12,k - 12)
numOfArgs :=
m := #line
- i := charPosition(char '_[,line,k)
+ i := charPosition(char "[",line,k)
i = m => 0
- j := charPosition(char '_],line,i + 1)
+ j := charPosition(char "]",line,i + 1)
digitString := subString(line,i + 1,j - i - 1)
and/[digit? digitString.i for i in 0..maxIndex digitString]
=> readInteger digitString
diff --git a/src/interp/htsetvar.boot b/src/interp/htsetvar.boot
index 796760e5..4eaf1d46 100644
--- a/src/interp/htsetvar.boot
+++ b/src/interp/htsetvar.boot
@@ -76,8 +76,8 @@ htShowCount s == --# discounting {\em .. }
i := 0
count := 0
while i < m - 7 repeat
- s.i = char '_{ and s.(i+1) = char '_\ and s.(i+2) = char 'e
- and s.(i+3) = char 'm => i := i + 6 --discount {\em }
+ s.i = char "{" and s.(i+1) = char "\" and s.(i+2) = char "e"
+ and s.(i+3) = char "m" => i := i + 6 --discount {\em }
i := i + 1
count := count + 1
count + (m - i)
diff --git a/src/interp/i-map.boot b/src/interp/i-map.boot
index c373eaf9..7ffe222a 100644
--- a/src/interp/i-map.boot
+++ b/src/interp/i-map.boot
@@ -60,7 +60,7 @@ isInternalMapName name ==
-- this only returns true or false as a "best guess"
(not IDENTP(name)) or (name = "*") or (name = "**") => false
sz := # (name' := symbolName name)
- (sz < 7) or (char("*") ~= name'.0) => false
+ (sz < 7) or (char "*" ~= name'.0) => false
not digit? name'.1 => false
null STRPOS('"_;",name',1,NIL) => false
-- good enough
diff --git a/src/interp/i-output.boot b/src/interp/i-output.boot
index 0d84f83d..6ccde110 100644
--- a/src/interp/i-output.boot
+++ b/src/interp/i-output.boot
@@ -1039,7 +1039,7 @@ aggregateApp(u,x,y,d,s) ==
outformWidth u == --WIDTH as called from OUTFORM to do a COPY
string? u =>
u = $EmptyString => 0
- u.0 = char "%" and ((u.1 = char 'b) or (u.1 = char 'd)) => 1
+ u.0 = char "%" and ((u.1 = char "b") or (u.1 = char "d")) => 1
#u
atom u => # atom2String u
WIDTH COPY u
@@ -1047,7 +1047,7 @@ outformWidth u == --WIDTH as called from OUTFORM to do a COPY
WIDTH u ==
string? u =>
u = $EmptyString => 0
- u.0 = char "%" and ((u.1 = char 'b) or (u.1 = char 'd)) => 1
+ u.0 = char "%" and ((u.1 = char "b") or (u.1 = char "d")) => 1
#u
integer? u =>
if (u < 1) then
diff --git a/src/interp/i-syscmd.boot b/src/interp/i-syscmd.boot
index 2c540536..08f5e32e 100644
--- a/src/interp/i-syscmd.boot
+++ b/src/interp/i-syscmd.boot
@@ -2763,14 +2763,14 @@ removeUndoLines u == --called by writeInputLines
savedIOindex := $IOindex --save value
$IOindex := 1
for y in tails u repeat
- (x := first y).0 = char '_) =>
+ (x := first y).0 = char ")" =>
stringPrefix?('")undo",s := trimString x) => --parse "undo )option"
s1 := trimString subString(s,5)
if s1 ~= '")redo" then
- m := charPosition(char '_),s1,0)
+ m := charPosition(char ")",s1,0)
code :=
m < maxIndex s1 => s1.(m + 1)
- char 'a
+ char "a"
s2 := trimString subString(s1,0,m)
n :=
s1 = '")redo" => 0
@@ -2781,17 +2781,17 @@ removeUndoLines u == --called by writeInputLines
$IOindex := $IOindex + 1 --referenced by undoCount
acc := nil
for y in tails nreverse u repeat
- (x := first y).0 = char '_> =>
+ (x := first y).0 = char ">" =>
code := x . 1 --code = a,b, or r
n := readInteger subString(x,2) --n = number of undo steps
y := rest y --kill >n line
while y repeat
c := first y
- c.0 = char '_) or c.0 = char '_> => y := rest y --kill system commands
+ c.0 = char ")" or c.0 = char ">" => y := rest y --kill system commands
n = 0 => return nil --including undos
n := n - 1
y := rest y --kill command
- y and code ~= char 'b => acc := [c,:acc] --add last unless )before
+ y and code ~= char "b" => acc := [c,:acc] --add last unless )before
acc := [x,:acc]
$IOindex := savedIOindex
acc
@@ -3243,7 +3243,7 @@ getFirstWord string ==
ltrace l == trace l
stripSpaces str ==
- STRING_-TRIM([char '" "], str)
+ STRING_-TRIM('" ", str)
npProcessSynonym(str) ==
if str = '"" then printSynonyms(NIL)
diff --git a/src/interp/match.boot b/src/interp/match.boot
index 9897ff71..6abf163a 100644
--- a/src/interp/match.boot
+++ b/src/interp/match.boot
@@ -94,7 +94,7 @@ patternCheck pattern == main where
--checks for escape characters, maybe new $wildCard
main() ==
-- pattern := pmTransFilter pattern --should no longer need this (rdj:10/1/91)
- u := pos(char '__,pattern)
+ u := pos(char "__",pattern)
null u => pattern
not(and/[equal(pattern,i + 1,$wildCard) for i in u]) =>
sayBrightly ['"Invalid use of underscores in pattern: ",pattern]
diff --git a/src/interp/msgdb.boot b/src/interp/msgdb.boot
index 9700f7d5..9049c84b 100644
--- a/src/interp/msgdb.boot
+++ b/src/interp/msgdb.boot
@@ -196,36 +196,36 @@ substituteSegmentedMsg(msg,args) ==
q := NIL
for i in 2..(n-1) repeat q := [stringChar(x,i),:q]
-- Note 'f processing must come first.
- if char 'f in q then
+ if char "f" in q then
arg :=
cons? arg => apply(first arg, rest arg)
arg
- if char 'm in q then arg := [['"%m",:arg]]
- if char 's in q then arg := [['"%s",:arg]]
- if char 'p in q then
+ if char "m" in q then arg := [['"%m",:arg]]
+ if char "s" in q then arg := [['"%s",:arg]]
+ if char "p" in q then
$texFormatting => arg := prefix2StringAsTeX arg
arg := prefix2String arg
- if char 'P in q then
+ if char "P" in q then
arg := applyPrefix2String arg
- if char 'o in q and $texFormatting then
+ if char "o" in q and $texFormatting then
arg := operationLink(arg)
- if char 'c in q then arg := [['"%ce",:arg]]
- if char 'r in q then arg := [['"%rj",:arg]]
+ if char "c" in q then arg := [['"%ce",:arg]]
+ if char "r" in q then arg := [['"%rj",:arg]]
- if char 'l in q then l := ['"%l",:l]
- if char 'b in q then l := ['"%b",:l]
+ if char "l" in q then l := ['"%l",:l]
+ if char "b" in q then l := ['"%b",:l]
--we splice in arguments that are lists
--if y is not specified, then the adding of blanks is
--stifled after the first item in the list until the
--end of the list. (using %n and %y)
l :=
arg is [head,:tail] =>
- char 'y in q or (head is '"%y") or (tail = nil) =>
+ char "y" in q or (head is '"%y") or (tail = nil) =>
append(reverse arg, l)
['"%y",:append(reverse tail, ['"%n",head,:l ]) ]
[arg,:l]
- if char 'b in q then l := ['"%d",:l]
+ if char "b" in q then l := ['"%d",:l]
for ch in '(_. _, _! _: _; _?) repeat
if char ch in q then l := [ch,:l]
diff --git a/src/interp/record.boot b/src/interp/record.boot
index f1561208..5c7ad58c 100644
--- a/src/interp/record.boot
+++ b/src/interp/record.boot
@@ -59,7 +59,7 @@ namespace BOOT
--=======================================================================
-- Global Variables
--=======================================================================
-$backslash := char '_\
+$backslash := char "\"
$testOutputLineFlag := nil -- referenced by charyTop, prnd to stash lines
$testOutputLineStack := nil -- saves lines to be printed (needed to convert
-- lines for use in hypertex)
@@ -237,15 +237,15 @@ htFile2InputFile(pathname,:option) ==
htCommandToInputLine s == fn(s,0) where fn(s,init) ==
--similar to htTrimAtBackSlash except removes all \
- k := or/[i for i in init..maxIndex s | s.i = char '_\] =>
- member(s.(k + 1),[char 'f,char 'b]) => subString(s,init,k - init)
+ k := or/[i for i in init..maxIndex s | s.i = char "\"] =>
+ member(s.(k + 1),[char "f",char "b"]) => subString(s,init,k - init)
strconc(subString(s,init,k - init),fn(s,k + 1))
subString(s,init)
htTrimAtBackSlash s ==
- backslash := char '_\
+ backslash := char "\"
k := or/[i for i in 0..maxIndex s | s.i = backslash
- and member(s.(i + 1),[char 'f,char 'b])] => subString(s,0,k - 1)
+ and member(s.(i + 1),[char "f",char "b"])] => subString(s,0,k - 1)
s
htMkPath(directory,name,typ) ==
@@ -267,7 +267,7 @@ recordAndPrintTest md == --called by recordAndPrint
string? $currentLine => [$currentLine]
fn $currentLine where fn x ==
x is [y,:r] =>
- y.(k := maxIndex y) = char '__ =>
+ y.(k := maxIndex y) = char "__" =>
u := fn r
[strconc(subString(y,0,k),'" ",first u),:rest u]
[y,:fn r]
diff --git a/src/interp/topics.boot b/src/interp/topics.boot
index 40aa687c..5e9b04a6 100644
--- a/src/interp/topics.boot
+++ b/src/interp/topics.boot
@@ -96,14 +96,14 @@ mkTopicHashTable() == --given $groupAssoc = ((extended .
while blankLine? line repeat line := READLINE instream
m := maxIndex line --file "topics.data" has form:
m = -1 => 'skip --1 ConstructorName:
- line.0 = char '_- => 'skip --2 constructorName or operation name
+ line.0 = char "-" => 'skip --2 constructorName or operation name
line := trimString line --3-n ...
m := maxIndex line -- (blank line) ...
- line.m ~= (char '_:) => systemError('"wrong heading")
+ line.m ~= char ":" => systemError('"wrong heading")
con := makeSymbol subString(line,0,m)
alist := [lst while not EOFP instream and
not (blankLine? (line := READLINE instream)) and
- line.0 ~= char '_- for i in 1..
+ line.0 ~= char "-" for i in 1..
| lst := string2OpAlist line]
alist => HPUT($conTopicHash,con,alist)
--initialize table of topic classes
@@ -129,7 +129,7 @@ mkTopicHashTable() == --given $groupAssoc = ((extended .
$conTopicHash --keys are ops or 'constructor', values are codes
blankLine? line ==
- maxIndex line = -1 or and/[line . j = (char '_ ) for j in 0..maxIndex line]
+ maxIndex line = -1 or and/[line . j = char " " for j in 0..maxIndex line]
string2OpAlist s ==
m := #s
@@ -137,7 +137,7 @@ string2OpAlist s ==
upperCase? s.k => nil --skip constructor names
k := 0
while (k := skipBlanks(s,k,m)) repeat
- acc := [makeSymbol subString(s,k,-k + (k := charPosition(char '_ ,s,k + 1))),:acc]
+ acc := [makeSymbol subString(s,k,-k + (k := charPosition(char " ",s,k + 1))),:acc]
acc := nreverse acc
--now add defaults
if u := getDefaultProps first acc then acc := [first acc,:u,:rest acc]
@@ -145,7 +145,7 @@ string2OpAlist s ==
getDefaultProps name ==
u := HGET($defaultsHash,name)
- if (s := PNAME name).(m := maxIndex s) = char '? then u := ['p,:u]
+ if (s := PNAME name).(m := maxIndex s) = char "?" then u := ['p,:u]
if s.m = char "!" then u := ['destructive,:u]
u