aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2010-12-30 12:10:11 +0000
committerdos-reis <gdr@axiomatics.org>2010-12-30 12:10:11 +0000
commitb1fb4cb58a886484e213bd1235f6de75713950c9 (patch)
tree9081e1cd5af4cc6af281259faed5352035a26dec
parente46eacc852aacf74de6d98ed5aad9249f41eabb0 (diff)
downloadopen-axiom-b1fb4cb58a886484e213bd1235f6de75713950c9.tar.gz
more string cleanups
-rw-r--r--src/boot/ast.boot4
-rw-r--r--src/boot/strap/ast.clisp5
-rw-r--r--src/interp/c-doc.boot4
-rw-r--r--src/interp/c-util.boot16
-rw-r--r--src/interp/clam.boot2
-rw-r--r--src/interp/compat.boot4
-rw-r--r--src/interp/define.boot2
-rw-r--r--src/interp/format.boot18
-rw-r--r--src/interp/functor.boot5
-rw-r--r--src/interp/g-util.boot33
-rw-r--r--src/interp/i-map.boot4
-rw-r--r--src/interp/i-output.boot12
-rw-r--r--src/interp/i-spec1.boot2
-rw-r--r--src/interp/mark.boot6
-rw-r--r--src/interp/match.boot2
-rw-r--r--src/interp/msgdb.boot4
-rw-r--r--src/interp/newfort.boot8
-rw-r--r--src/interp/nrunfast.boot6
-rw-r--r--src/interp/nrungo.boot5
-rw-r--r--src/interp/parse.boot2
-rw-r--r--src/interp/postpar.boot2
-rw-r--r--src/interp/pspad1.boot6
-rw-r--r--src/interp/pspad2.boot4
23 files changed, 81 insertions, 75 deletions
diff --git a/src/boot/ast.boot b/src/boot/ast.boot
index f1ad60cd..8d3f8c5c 100644
--- a/src/boot/ast.boot
+++ b/src/boot/ast.boot
@@ -748,11 +748,11 @@ bfChar? x ==
char? x or cons? x and first x in '(char CODE_-CHAR SCHAR)
bfSmintable x==
- integer? x or cons? x and first x in '(SIZE LENGTH)
+ integer? x or cons? x and first x in '(SIZE LENGTH CHAR_-CODE)
bfString? x ==
string? x
- or cons? x and first x in '(charString symbolName toString subString)
+ or cons? x and first x in '(STRING SYMBOL_-NAME subString)
bfQ(l,r)==
bfChar? l or bfChar? r => ["CHAR=",l,r]
diff --git a/src/boot/strap/ast.clisp b/src/boot/strap/ast.clisp
index 6a947261..9468fb13 100644
--- a/src/boot/strap/ast.clisp
+++ b/src/boot/strap/ast.clisp
@@ -1211,13 +1211,12 @@
(DEFUN |bfSmintable| (|x|)
(OR (INTEGERP |x|)
- (AND (CONSP |x|) (MEMQ (CAR |x|) '(SIZE LENGTH QENUM)))))
+ (AND (CONSP |x|) (MEMQ (CAR |x|) '(SIZE LENGTH CHAR-CODE)))))
(DEFUN |bfString?| (|x|)
(OR (STRINGP |x|)
(AND (CONSP |x|)
- (MEMQ (CAR |x|)
- '(|charString| |symbolName| |toString| |subString|)))))
+ (MEMQ (CAR |x|) '(STRING SYMBOL-NAME |subString|)))))
(DEFUN |bfQ| (|l| |r|)
(COND
diff --git a/src/interp/c-doc.boot b/src/interp/c-doc.boot
index bda050c0..734c4936 100644
--- a/src/interp/c-doc.boot
+++ b/src/interp/c-doc.boot
@@ -1148,7 +1148,7 @@ checkTransformFirsts(opname,u,margin) ==
namestring ~= (firstWord := subString(u,0,i)) =>
checkDocError ['"Improper first word in comments: ",firstWord]
u
- #(p := PNAME infixOp) = 1 and (open := p.0) and
+ #(p := symbolName infixOp) = 1 and (open := p.0) and
(close := LASSOC(open,$checkPrenAlist)) => --have an open bracket
l := getMatchingRightPren(u,k + 1,open,close)
if l > MAXINDEX u then l := k - 1
@@ -1156,7 +1156,7 @@ checkTransformFirsts(opname,u,margin) ==
strconc('"\spad{",subString(u,0,k),'"}",subString(u,k))
l := checkSkipBlanks(u,k,m) or return u
n := checkSkipToken(u,l,m) or return u
- namestring ~= PNAME infixOp =>
+ namestring ~= symbolName infixOp =>
checkDocError ['"Improper initial operator in comments: ",infixOp]
u
strconc('"\spad{",subString(u,0,n),'"}",subString(u,n)) --case 5
diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot
index a9f5f516..cc3f2f64 100644
--- a/src/interp/c-util.boot
+++ b/src/interp/c-util.boot
@@ -622,7 +622,8 @@ makeLiteral(x,e) ==
put(x,"isLiteral","true",e)
isSomeDomainVariable s ==
- IDENTP s and #(x:= PNAME s)>2 and x.0 = char "#" and x.1 = char "#"
+ IDENTP s and #(x:= symbolName s) > 2 and
+ stringChar(x,0) = char "#" and stringChar(x,1) = char "#"
++ Return non-nil is the domain form `x' is a `subset' of domain
++ form `y' in the environment `e'. The relation of subdomain
@@ -1391,7 +1392,8 @@ backendCompile2 code ==
++ identifiers starting with '$', except domain variable names.
backendFluidize x ==
IDENTP x and x ~= "$" and x ~= "$$" and
- (PNAME x).0 = char "$" and not digit?((PNAME x).1) => x
+ stringChar(symbolName x,0) = char "$" and
+ not digit? stringChar(symbolName x,1) => x
atomic? x => nil
first x = "FLUID" => second x
a := backendFluidize first x
@@ -1408,13 +1410,15 @@ $SpecialVars := []
++ push `x' into the list of local variables.
pushLocalVariable: %Symbol -> %List
pushLocalVariable x ==
- x ~= "$" and (p := PNAME x).0 = char "$" and
- p.1 ~= char "," and not digit? p.1 => nil
+ p := symbolName x
+ x ~= "$" and stringChar(p,0) = char "$" and
+ stringChar(p,1) ~= char "," and not digit? stringChar(p,1) => nil
PUSH(x,$LocalVars)
isLispSpecialVariable x ==
- s := PNAME x
- s.0 = char "$" and #s > 1 and alphabetic? s.1 and not readOnly? x
+ s := symbolName x
+ stringChar(s,0) = char "$" and #s > 1 and
+ alphabetic? stringChar(s,1) and not readOnly? x
noteSpecialVariable x ==
$SpecialVars := insert(x,$SpecialVars)
diff --git a/src/interp/clam.boot b/src/interp/clam.boot
index db2ad360..a4b2f8b9 100644
--- a/src/interp/clam.boot
+++ b/src/interp/clam.boot
@@ -356,7 +356,7 @@ clearCategoryCaches() ==
if getConstructorKindFromDB name = "category" then
if BOUNDP(cacheName:= mkCacheName name)
then setDynamicBinding(cacheName,nil)
- if BOUNDP(cacheName:= INTERNL strconc(PNAME name,'";CAT"))
+ if BOUNDP(cacheName:= INTERNL strconc(symbolName name,'";CAT"))
then setDynamicBinding(cacheName,nil)
clearCategoryCache catName ==
diff --git a/src/interp/compat.boot b/src/interp/compat.boot
index da938060..712037f4 100644
--- a/src/interp/compat.boot
+++ b/src/interp/compat.boot
@@ -40,11 +40,11 @@ namespace BOOT
-- RREAD which takes erroval to return if key is missing
rread(key,rstream,errorval) ==
- if IDENTP key then key := PNAME key
+ if IDENTP key then key := symbolName key
RREAD(key,rstream,errorval)
rwrite(key,val,stream) ==
- if IDENTP key then key := PNAME key
+ if IDENTP key then key := symbolName key
RWRITE(key,val,stream)
-- issuing commands to the operating system
diff --git a/src/interp/define.boot b/src/interp/define.boot
index 4e0787a2..4ce7412c 100644
--- a/src/interp/define.boot
+++ b/src/interp/define.boot
@@ -432,7 +432,7 @@ makeCategoryPredicates(form,u) ==
pl
mkCategoryPackage(form is [op,:argl],cat,def) ==
- packageName:= INTERN(strconc(PNAME op,'"&"))
+ packageName:= INTERN(strconc(symbolName op,'"&"))
packageAbb := INTERN(strconc(getConstructorAbbreviationFromDB op,'"-"))
$options:local := []
-- This stops the next line from becoming confused
diff --git a/src/interp/format.boot b/src/interp/format.boot
index c780041c..6dee53d3 100644
--- a/src/interp/format.boot
+++ b/src/interp/format.boot
@@ -422,7 +422,8 @@ form2String1 u ==
null rest argl => [ '":", form2String1 first argl ]
formDecl2String(argl.0,argl.1)
op = "#" and cons? argl and LISTP first argl =>
- STRINGIMAGE #first argl
+ -- FIXME: is the argument list always a simple atom?
+ toString #first argl
op = 'Join => formJoin2String argl
op = "ATTRIBUTE" => form2String1 first argl
op='Zero => '"0"
@@ -447,7 +448,7 @@ form2String1 u ==
argl := rest argl
(null argl) or null (first argl) => [lo, '".."]
[lo, '"..", form2String1 first argl]
- isBinaryInfix op => formatAsFortranExpresion [op,:argl]
+ isBinaryInfix op => formatAsFortranExpression [op,:argl]
-- COMPILED_-FUNCTION_-P(op) => form2String1 coerceMap2E(u1,NIL)
application2String(op,[form2String1 x for x in argl], u1)
@@ -621,11 +622,12 @@ formTuple2String argl ==
isInternalFunctionName(op) ==
(not IDENTP(op)) or (op = "*") or (op = "**") => NIL
- (1 = #(op':= PNAME op)) or (char("*") ~= op'.0) => NIL
+ op' := symbolName op
+ 1 = #op' or char "*" ~= stringChar(op',0) => NIL
-- if there is a semicolon in the name then it is the name of
-- a compiled spad function
null (e := STRPOS('"_;",op',1,NIL)) => NIL
- (char(" ") = (y := op'.1)) or (char("*") = y) => NIL
+ char " " = stringChar(op',1) or char "*" = stringChar(op',1) => NIL
table := MAKETRTTABLE('"0123456789",NIL)
s := STRPOSL(table,op',1,true)
null(s) or s > e => NIL
@@ -733,16 +735,16 @@ mathObject2String x ==
object2String x
object2String x ==
+ cons? x => strconc(object2String first x, object2String rest x)
string? x => x
- IDENTP x => PNAME x
null x => '""
- cons? x => strconc(object2String first x, object2String rest x)
+ symbol? x => symbolName x
+ char? x => charString x
toString x
object2Identifier x ==
IDENTP x => x
- string? x => INTERN x
- INTERN toString x
+ INTERN object2String x
blankList x == "append"/[[BLANK,y] for y in x]
diff --git a/src/interp/functor.boot b/src/interp/functor.boot
index 77dee1b1..595ed5e8 100644
--- a/src/interp/functor.boot
+++ b/src/interp/functor.boot
@@ -846,8 +846,7 @@ resolvePatternVars(p,args) ==
--% Code Processing Packages
isCategoryPackageName nam ==
- p := PNAME opOf nam
- p.(MAXINDEX p) = char '_&
+ isDefaultPackageName opOf nam
mkOperatorEntry(opSig is [op,sig,:flag],pred,count) ==
null flag => [opSig,pred,["ELT","$",count]]
@@ -906,7 +905,7 @@ mkRepititionAssoc l ==
encodeItem x ==
x is [op,:argl] => getCaps op
- IDENTP x => PNAME x
+ IDENTP x => symbolName x
STRINGIMAGE x
getCaps x ==
diff --git a/src/interp/g-util.boot b/src/interp/g-util.boot
index b3e1d1ac..9f5502b3 100644
--- a/src/interp/g-util.boot
+++ b/src/interp/g-util.boot
@@ -45,6 +45,7 @@ module g_-util where
isSubDomain: (%Mode,%Mode) -> %Form
expandToVMForm: %Thing -> %Thing
usedSymbol?: (%Symbol,%Code) -> %Boolean
+ isDefaultPackageName: %Symbol -> %Boolean
--%
@@ -586,10 +587,10 @@ $interpOnly := false
--% Utility Functions of General Use
mkCacheName(name) ==
- INTERN strconc(PNAME name,'";AL")
+ INTERN strconc(symbolName name,'";AL")
mkAuxiliaryName(name) ==
- INTERN strconc(PNAME name,'";AUX")
+ INTERN strconc(symbolName name,'";AUX")
homogeneousListToVector(t,l) ==
@@ -598,15 +599,16 @@ homogeneousListToVector(t,l) ==
++ tests if x is an identifier beginning with #
isSharpVar x ==
- IDENTP x and SCHAR(symbolName x,0) = char "#"
+ IDENTP x and stringChar(symbolName x,0) = char "#"
isSharpVarWithNum x ==
not isSharpVar x => nil
- (n := #(p := PNAME x)) < 2 => nil
+ p := symbolName x
+ (n := #p) < 2 => nil
ok := true
c := 0
for i in 1..(n-1) while ok repeat
- d := p.i
+ d := stringChar(p,i)
ok := digit? d => c := 10*c + DIG2FIX d
if ok then c else nil
@@ -984,7 +986,7 @@ stringPrefix?(pref,str) ==
ok := true
i := 0
while ok and (i < lp) repeat
- not EQ(SCHAR(pref,i),SCHAR(str,i)) => ok := NIL
+ stringChar(pref,i) ~= stringChar(str,i) => ok := NIL
i := i + 1
ok
@@ -992,10 +994,10 @@ stringChar2Integer(str,pos) ==
-- replaces GETSTRINGDIGIT in UT LISP
-- returns small integer represented by character in position pos
-- in string str. Returns NIL if not a digit or other error.
- if IDENTP str then str := PNAME str
+ if IDENTP str then str := symbolName str
not (string?(str) and
integer?(pos) and (pos >= 0) and (pos < #str)) => NIL
- not digit?(d := SCHAR(str,pos)) => NIL
+ not digit?(d := stringChar(str,pos)) => NIL
DIG2FIX d
dropLeadingBlanks str ==
@@ -1003,8 +1005,8 @@ dropLeadingBlanks str ==
l := # str
nb := NIL
i := 0
- while (i < l) and not nb repeat
- if SCHAR(str,i) ~= char " " then nb := i
+ while (i < l) and nb = nil repeat
+ if stringChar(str,i) ~= char " " then nb := i
else i := i + 1
nb = 0 => str
nb => subString(str,nb)
@@ -1376,8 +1378,12 @@ $beginEndList := '(
"verbatim"
"detail")
-isDefaultPackageName x == (s := PNAME x).(MAXINDEX s) = char '_&
+isDefaultPackageName x ==
+ s := symbolName x
+ stringChar(s,MAXINDEX s) = char '_&
+isDefaultPackageForm? x ==
+ x is [op,:.] and IDENTP op and isDefaultPackageName op
-- gensym utils
@@ -1391,9 +1397,10 @@ charDigitVal c ==
gensymInt g ==
not GENSYMP g => error '"Need a GENSYM"
- p := PNAME g
+ p := symbolName g
n := 0
- for i in 2..#p-1 repeat n := 10 * n + charDigitVal p.i
+ for i in 2..#p-1 repeat
+ n := 10 * n + charDigitVal stringChar(p,i)
n
++ Returns a newly allocated domain shell (a simple vector) of length `n'.
diff --git a/src/interp/i-map.boot b/src/interp/i-map.boot
index cb0593f2..ee477c60 100644
--- a/src/interp/i-map.boot
+++ b/src/interp/i-map.boot
@@ -58,7 +58,7 @@ makeInternalMapName(userName,numArgs,numMms,extraPart) ==
isInternalMapName name ==
-- this only returns true or false as a "best guess"
(not IDENTP(name)) or (name = "*") or (name = "**") => false
- sz := # (name' := PNAME name)
+ sz := # (name' := symbolName name)
(sz < 7) or (char("*") ~= name'.0) => false
not digit? name'.1 => false
null STRPOS('"_;",name',1,NIL) => false
@@ -68,7 +68,7 @@ isInternalMapName name ==
makeInternalMapMinivectorName(name) ==
string? name =>
INTERN strconc(name,'";MV")
- INTERN strconc(PNAME name,'";MV")
+ INTERN strconc(symbolName name,'";MV")
--% Adding a function definition
diff --git a/src/interp/i-output.boot b/src/interp/i-output.boot
index d4ddf4df..a5a52d2c 100644
--- a/src/interp/i-output.boot
+++ b/src/interp/i-output.boot
@@ -396,9 +396,9 @@ specialChar(symbol) ==
null (code := IFCDR ASSQ(symbol,$specialCharacterAlist)) => '"?"
$specialCharacters.code
-rbrkSch() == PNAME specialChar 'rbrk
-lbrkSch() == PNAME specialChar 'lbrk
-quadSch() == PNAME specialChar 'quad
+rbrkSch() == symbolName specialChar 'rbrk
+lbrkSch() == symbolName specialChar 'lbrk
+quadSch() == symbolName specialChar 'quad
isBinaryInfix x ==
member(x, '(_= _+ _- _* _/ _*_* _^ "=" "+" "-" "*" "/" "**" "^"))
@@ -431,7 +431,7 @@ APP(u,x,y,d) ==
appelse(u,x,y,d)
atom2String x ==
- IDENTP x => PNAME x
+ IDENTP x => symbolName x
string? x => x
stringer x
@@ -607,7 +607,7 @@ outputTran x ==
['PAREN,["|",['AGGLST,:l],pred]]
op="tuple" => ['PAREN,['AGGLST,:l]]
op='LISTOF => ['AGGLST,:l]
- IDENTP op and not (op in '(_* _*_*) ) and char "*" = (PNAME op).0 =>
+ IDENTP op and not (op in '(_* _*_*) ) and char "*" = (symbolName op).0 =>
mkSuperSub(op,l)
[outputTran op,:l]
@@ -1685,7 +1685,7 @@ printMap1(x,initialFlag) ==
printBasic x ==
x='(One) => PRIN1(1,$algebraOutputStream)
x='(Zero) => PRIN1(0,$algebraOutputStream)
- IDENTP x => PRINTEXP(PNAME x,$algebraOutputStream)
+ IDENTP x => PRINTEXP(symbolName x,$algebraOutputStream)
atom x => PRIN1(x,$algebraOutputStream)
PRIN1(x,$algebraOutputStream)
diff --git a/src/interp/i-spec1.boot b/src/interp/i-spec1.boot
index b308aa38..1a210e38 100644
--- a/src/interp/i-spec1.boot
+++ b/src/interp/i-spec1.boot
@@ -153,7 +153,7 @@ compileTargetedADEF(t,vars,types,body) ==
compileADEFBody(t,vars,types,body,computedResultType) ==
--+
$compiledOpNameList := [$mapName]
- minivectorName := makeInternalMapMinivectorName PNAME $mapName
+ minivectorName := makeInternalMapMinivectorName symbolName $mapName
body := substitute(["%dynval",MKQ minivectorName],"$$$",body)
setDynamicBinding(minivectorName,LIST2VEC $minivector)
diff --git a/src/interp/mark.boot b/src/interp/mark.boot
index e1fa19b0..332a2bf5 100644
--- a/src/interp/mark.boot
+++ b/src/interp/mark.boot
@@ -284,7 +284,7 @@ markImport(d,:option) == --from compFormWithModemap/genDeltaEntry/compImport
declared? := IFCAR option
null d or d = $Representation => nil
d is [op,:.] and op in '(Boolean Mapping Void Segment UniversalSegment) => nil
- string? d or (IDENTP d and (PNAME d).0 = char '_#) => nil
+ string? d or (IDENTP d and stringchar(symbolName d,0) = char '_#) => nil
d in '(_$ _$NoValueMode _$EmptyMode Void) => nil
-------=======+> WHY DOESN'T THIS WORK????????????
--if (d' := macroExpand(d,$e)) ~= d then markImport(d',declared?)
@@ -515,7 +515,7 @@ markOrigName x ==
op = 'TAGGEDreturn and x is [.,a,[y,:.]] => markOrigName y
for y in r repeat markOrigName y
IDENTP op =>
- s := PNAME op
+ s := symbolName op
k := charPosition(char '_;, s, 0)
k > MAXINDEX s => nil
origName := INTERN subString(s, k + 1)
@@ -702,7 +702,7 @@ markPathsEqual(x,y) ==
y is ['PROGN,.,repeet,:.] and repeet is ['REPEAT,:v] => markPathsEqual(u,v)
atom y or atom x =>
IDENTP y and IDENTP x and y = GETL(x,'ORIGNAME) => true --> see
--- IDENTP y and IDENTP x and anySubstring?(PNAME y,PNAME x,0) => true
+-- IDENTP y and IDENTP x and anySubstring?(symbolName y,symbolName x,0) => true
IDENTP y and (z := markPathsMacro y) => markPathsEqual(x,z)
false
"and"/[markPathsEqual(u,v) for u in x for v in y]
diff --git a/src/interp/match.boot b/src/interp/match.boot
index aee99c37..e146cd74 100644
--- a/src/interp/match.boot
+++ b/src/interp/match.boot
@@ -39,7 +39,7 @@ $wildCard := char "*"
maskMatch?(mask,subject) ==
null mask => true
- if null string? subject then subject := PNAME subject
+ if not string? subject then subject := PNAME subject
or/[match?(pattern,subject) for pattern in mask]
substring?(part, whole, startpos) ==
diff --git a/src/interp/msgdb.boot b/src/interp/msgdb.boot
index 36281057..efd961b4 100644
--- a/src/interp/msgdb.boot
+++ b/src/interp/msgdb.boot
@@ -641,7 +641,7 @@ brightPrint0AsTeX(x, out == $OutputStream) ==
blankIndicator x ==
if IDENTP x then x := symbolName x
not string? x or MAXINDEX x < 1 => nil
- x.0 = char '% and x.1 = char 'x =>
+ stringChar(x,0) = char '% and stringChar(x,1) = char 'x =>
MAXINDEX x > 1 => readInteger subString(x,2)
1
nil
@@ -795,7 +795,7 @@ sayBrightlyLength1 x ==
1
member(x,'("%l" %l)) => 0
string? x and # x > 2 and x.0 = char "%" and x.1 = char "x" =>
- readInteger(x,2)
+ readInteger subString(x,2)
string? x => # x
IDENTP x => # symbolName x
-- following line helps find certain bugs that slip through
diff --git a/src/interp/newfort.boot b/src/interp/newfort.boot
index a31aefe2..eb4864fe 100644
--- a/src/interp/newfort.boot
+++ b/src/interp/newfort.boot
@@ -364,10 +364,10 @@ fortexp0 x ==
l := [t,:l]
nreverse ['"...",:l]
-++ This formating routine is essentially used to print
-++ values/expreions used to instantiate constructors.
-formatAsFortranExpresion x ==
- $fortInts2Floats := false
+++ This formatting routine is essentially used to print
+++ values/expressions used to instantiate constructors.
+formatAsFortranExpression x ==
+ $fortInts2Floats: local := false
fortranCleanUp exp2Fort1 segment fortPre outputTran x
diff --git a/src/interp/nrunfast.boot b/src/interp/nrunfast.boot
index ea154adb..7d87308b 100644
--- a/src/interp/nrunfast.boot
+++ b/src/interp/nrunfast.boot
@@ -239,10 +239,6 @@ newLookupInTable(op,sig,dollar,[domain,opvec],flag) ==
nil
-isDefaultPackageForm? x == x is [op,:.]
- and IDENTP op and (s := PNAME op).(MAXINDEX s) = "&"
-
-
--=======================================================
-- Lookup Addlist (from lookupInDomainTable or lookupInDomain)
--=======================================================
@@ -454,7 +450,7 @@ lazyMatchArg2(s,a,dollar,domain,typeFlag) ==
string? a =>
string? s => a = s
s is ['QUOTE,y] and PNAME y = a
- IDENTP s and PNAME s = a
+ IDENTP s and symbolName s = a
atom a => a = s
op := opOf a
op = 'NRTEVAL => s = nrtEval(second a,domain)
diff --git a/src/interp/nrungo.boot b/src/interp/nrungo.boot
index 590bf246..4dea8353 100644
--- a/src/interp/nrungo.boot
+++ b/src/interp/nrungo.boot
@@ -194,8 +194,7 @@ defaultingFunction op ==
not (#dom > 0) => false
not (dom.0 is [packageName,:.]) => false
not IDENTP packageName => false
- pname := PNAME packageName
- pname.(MAXINDEX pname) = char "&"
+ isDefaultPackageName packageName
--=======================================================
-- Lookup In Domain (from lookupInAddChain)
@@ -291,7 +290,7 @@ compareSigEqual(s,t,dollar,domain) ==
isSharpVar t =>
vector? domain => rest(domain.0).(POSN1(t,$FormalMapVariableList))
rest(domain).(POSN1(t,$FormalMapVariableList))
- string? t and IDENTP s => (s := PNAME s; t)
+ string? t and IDENTP s => (s := symbolName s; t)
nil
s = '$ => compareSigEqual(dollar,u,dollar,domain)
u => compareSigEqual(s,u,dollar,domain)
diff --git a/src/interp/parse.boot b/src/interp/parse.boot
index 15d3a802..8433bd7f 100644
--- a/src/interp/parse.boot
+++ b/src/interp/parse.boot
@@ -420,7 +420,7 @@ superSub(name,x) ==
code:=
x is [[u]] => $quadSymbol
strconc('"_(",scriptTranRow first x,scriptTran rest x,'"_)")
- [INTERNL(PNAME name,"$",code),:y]
+ [INTERNL(symbolName name,"$",code),:y]
scriptTran: %List -> %String
scriptTran x ==
diff --git a/src/interp/postpar.boot b/src/interp/postpar.boot
index d164fb93..645f4162 100644
--- a/src/interp/postpar.boot
+++ b/src/interp/postpar.boot
@@ -331,7 +331,7 @@ getScriptName(op,a,numberOfFunctionalArgs) ==
if not IDENTP op then
postError ['" ",op,'" cannot have scripts"]
INTERNL("*",STRINGIMAGE numberOfFunctionalArgs,
- decodeScripts a,PNAME op)
+ decodeScripts a,symbolName op)
postTranScripts: %ParseTree -> %ParseForm
postTranScripts a ==
diff --git a/src/interp/pspad1.boot b/src/interp/pspad1.boot
index a89253f9..10461cc9 100644
--- a/src/interp/pspad1.boot
+++ b/src/interp/pspad1.boot
@@ -168,7 +168,7 @@ consBuffer item ==
if item = '"failed" then item := 'failed
n:=
string? item => 2+#item
- IDENTP item => #PNAME item
+ IDENTP item => #symbolName item
#STRINGIMAGE item
columnsLeft:= $lineLength-$c
if columnsLeft <= 0 and isCloseDelimiter item then $lineLength := $lineLength + 2
@@ -183,7 +183,7 @@ consBuffer item ==
consBuffer item
nil
$lineFragmentBuffer:=
- null item or IDENTP item => [PNAME item,:$lineFragmentBuffer]
+ null item or IDENTP item => [symbolName item,:$lineFragmentBuffer]
integer? item or CHARP item => [STRINGIMAGE item,:$lineFragmentBuffer]
string? item => ["_"",string2PrintImage item,"_"",:$lineFragmentBuffer]
sayBrightly ['"Unexpected line buffer item: ", STRINGIMAGE item]
@@ -421,7 +421,7 @@ formatHasDollarOp x ==
x is ["elt",a,b] and isTypeProbably? a
isTypeProbably? x ==
- IDENTP x and upperCase? PNAME(x).0
+ IDENTP x and upperCase? stringChar(symbolName x,0)
formatOpPren(op,x) == formatOp op and formatPren x
diff --git a/src/interp/pspad2.boot b/src/interp/pspad2.boot
index 6f23df70..a3106eab 100644
--- a/src/interp/pspad2.boot
+++ b/src/interp/pspad2.boot
@@ -450,7 +450,7 @@ formatSEGMENT ["SEGMENT",a,b] ==
formatSexpr x ==
atom x =>
- null x or IDENTP x => consBuffer ident2PrintImage PNAME x
+ null x or IDENTP x => consBuffer ident2PrintImage symbolName x
consBuffer x
spill("formatNonAtom",x)
@@ -576,7 +576,7 @@ ident2PrintImage s ==
isIdentifier x ==
IDENTP x =>
- s:= PNAME x
+ s:= symbolName x
#s = 0 => nil
alphabetic? s.0 => and/[s.i ~= char " " for i in 1..MAXINDEX s]
#s>1 =>