aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog34
-rw-r--r--src/interp/buildom.boot4
-rw-r--r--src/interp/c-util.boot4
-rw-r--r--src/interp/comp.lisp4
-rw-r--r--src/interp/compiler.boot16
-rw-r--r--src/interp/cparse.boot2
-rw-r--r--src/interp/def.lisp4
-rw-r--r--src/interp/define.boot22
-rw-r--r--src/interp/functor.boot12
-rw-r--r--src/interp/g-opt.boot6
-rw-r--r--src/interp/i-eval.boot2
-rw-r--r--src/interp/i-intern.boot8
-rw-r--r--src/interp/i-map.boot10
-rw-r--r--src/interp/i-spec1.boot6
-rw-r--r--src/interp/i-spec2.boot16
-rw-r--r--src/interp/iterator.boot10
-rw-r--r--src/interp/mark.boot38
-rw-r--r--src/interp/newaux.lisp2
-rw-r--r--src/interp/nruncomp.boot24
-rw-r--r--src/interp/nrunopt.boot2
-rw-r--r--src/interp/package.boot6
-rw-r--r--src/interp/parse.boot14
-rw-r--r--src/interp/pf2atree.boot4
-rw-r--r--src/interp/pf2sex.boot2
-rw-r--r--src/interp/postpar.boot2
-rw-r--r--src/interp/property.lisp8
-rw-r--r--src/interp/pspad1.boot2
-rw-r--r--src/interp/pspad2.boot4
-rw-r--r--src/interp/slam.boot24
-rw-r--r--src/interp/spad.lisp4
-rw-r--r--src/interp/wi1.boot16
-rw-r--r--src/interp/wi2.boot16
32 files changed, 181 insertions, 147 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index cd818564..3dd05eca 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,37 @@
+2008-08-09 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * interp/buildom.boot: Rename AST code LET to %LET throughout.
+ * interp/c-util.boot: Likewise.
+ * interp/comp.lisp: Likewise.
+ * interp/compiler.boot: Likewise.
+ * interp/cparse.boot: Likewise.
+ * interp/def.lisp: Likewise.
+ * interp/define.boot: Likewise.
+ * interp/functor.boot: Likewise.
+ * interp/g-opt.boot: Likewise.
+ * interp/i-eval.boot: Likewise.
+ * interp/i-intern.boot: Likewise.
+ * interp/i-map.boot: Likewise.
+ * interp/i-spec1.boot: Likewise.
+ * interp/i-spec2.boot: Likewise.
+ * interp/iterator.boot: Likewise.
+ * interp/mark.boot: Likewise.
+ * interp/newaux.lisp: Likewise.
+ * interp/nruncomp.boot: Likewise.
+ * interp/nrunopt.boot: Likewise.
+ * interp/package.boot: Likewise.
+ * interp/parse.boot: Likewise.
+ * interp/pf2atree.boot: Likewise.
+ * interp/pf2sex.boot: Likewise.
+ * interp/postpar.boot: Likewise.
+ * interp/property.lisp: Likewise.
+ * interp/pspad1.boot: Likewise.
+ * interp/pspad2.boot: Likewise.
+ * interp/slam.boot: Likewise.
+ * interp/spad.lisp: Likewise.
+ * interp/wi1.boot: Likewise.
+ * interp/wi2.boot: Likewise.
+
2008-08-08 Gabriel Dos Reis <gdr@cs.tamu.edu>
* interp/pf2sex.boot (pfMacro2Sex): New.
diff --git a/src/interp/buildom.boot b/src/interp/buildom.boot
index 13a2de6d..52e786a8 100644
--- a/src/interp/buildom.boot
+++ b/src/interp/buildom.boot
@@ -350,7 +350,7 @@ mkNewUnionFunList(name,form is ["Union",:listOfEntries],e) ==
$InteractiveMode =>
["XLAM",["#1"],["PROG1",["QCDR","#1"],
["check-union",["QEQCAR","#1",i],type,"#1"]]]
- ["XLAM",["#1"],["PROG2",["LET",gg,"#1"],["QCDR",gg],
+ ["XLAM",["#1"],["PROG2",["%LET",gg,"#1"],["QCDR",gg],
["check-union",["QEQCAR",gg,i],type,gg]]]
[cList,e]
@@ -395,7 +395,7 @@ mkUnionFunList(op,form is ["Union",:listOfEntries],e) ==
else
ref:=gg
q:= substitute(gg,"#1",p)
- ["XLAM",["#1"],["PROG2",["LET",gg,"#1"],ref,
+ ["XLAM",["#1"],["PROG2",["%LET",gg,"#1"],ref,
["check-union",q,t,gg]]]
downFun() ==
p is ["EQCAR",x,.] =>
diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot
index e8983fb2..88565415 100644
--- a/src/interp/c-util.boot
+++ b/src/interp/c-util.boot
@@ -427,9 +427,9 @@ isAlmostSimple x ==
[op,y,:l]:= x
op="has" => x
op="is" => x
- op="LET" =>
+ op="%LET" =>
IDENTP y => (setAssignment LIST x; y)
- (setAssignment [["LET",g:= genVariable(),:l],["LET",y,g]]; g)
+ (setAssignment [["%LET",g:= genVariable(),:l],["%LET",y,g]]; g)
op = "case" and IDENTP y => x
isSideEffectFree op => [op,:mapInto(rest x, function fn)]
$assignmentList:= "failed"
diff --git a/src/interp/comp.lisp b/src/interp/comp.lisp
index 307750ac..2a52d020 100644
--- a/src/interp/comp.lisp
+++ b/src/interp/comp.lisp
@@ -276,7 +276,7 @@
((AND (eq U 'MAKEPROP) $TRACELETFLAG (RPLAC (CAR X) 'MAKEPROP-SAY) NIL)
NIL)
; temporarily make TRACELET cause MAKEPROPs to be reported
- ((MEMQ U '(DCQ RELET PRELET SPADLET SETQ LET) )
+ ((MEMQ U '(DCQ RELET PRELET SPADLET SETQ %LET) )
(COND ((NOT (eq U 'DCQ))
(COND ((OR (AND (eq $NEWSPAD T))
(MEMQ $FUNNAME |$traceletFunctions|))
@@ -286,7 +286,7 @@
; looks only at global variables in top-level environment;
; thus SPADLET cannot itself test for such flags (7/83).
($TRACELETFLAG (RPLACA X '/TRACE-LET))
- ((eq U 'LET) (RPLACA X 'SPADLET)))))
+ ((eq U '%LET) (RPLACA X 'SPADLET)))))
(COMP-TRAN-1 (CDDR X))
(AND (NOT (MEMQ U '(setq RELET)))
(COND ((IDENTP (CADR X)) (PUSHLOCVAR (CADR X)))
diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot
index 4a3c4ca4..644a7f79 100644
--- a/src/interp/compiler.boot
+++ b/src/interp/compiler.boot
@@ -817,13 +817,13 @@ compCons1(["CONS",x,y],m,e) ==
compSetq: (%List,%Thing,%List) -> %List
compSetq1: (%Form,%Thing,%Mode,%List) -> %List
-compSetq(["LET",form,val],m,E) == compSetq1(form,val,m,E)
+compSetq(["%LET",form,val],m,E) == compSetq1(form,val,m,E)
compSetq1(form,val,m,E) ==
IDENTP form => setqSingle(form,val,m,E)
form is [":",x,y] =>
[.,.,E']:= compMakeDeclaration(form,$EmptyMode,E)
- compSetq(["LET",x,val],m,E')
+ compSetq(["%LET",x,val],m,E')
form is [op,:l] =>
op="CONS" => setqMultiple(uncons form,val,m,E)
op="%Comma" => setqMultiple(l,val,m,E)
@@ -868,13 +868,13 @@ setqSingle(id,val,m,E) ==
stackWarning("domain valued variable %1b has been reassigned within its scope",[id])
e':= augModemapsFromDomain1(id,val,e')
--all we do now is to allocate a slot number for lhs
- --e.g. the LET form below will be changed by putInLocalDomainReferences
+ --e.g. the %LET form below will be changed by putInLocalDomainReferences
--+
if (k:=NRTassocIndex(id))
then form:=['SETELT,"$",k,x]
else form:=
- $QuickLet => ["LET",id,x]
- ["LET",id,x,
+ $QuickLet => ["%LET",id,x]
+ ["%LET",id,x,
(isDomainForm(x,e') => ['ELT,id,0];CAR outputComp(id,e'))]
[form,m',e']
@@ -897,7 +897,7 @@ setqMultiple(nameList,val,m,e) ==
1.1 --exit if result is a list
m1 is ["List",D] =>
for y in nameList repeat e:= put(y,"value",[genSomeVariable(),D,$noEnv],e)
- convert([["PROGN",x,["LET",nameList,g],g],m',e],m)
+ convert([["PROGN",x,["%LET",nameList,g],g],m',e],m)
2 --verify that the #nameList = number of parts of right-hand-side
selectorModePairs:=
--list of modes
@@ -1558,7 +1558,7 @@ compCoerce1(x,m',e) ==
pred:=isSubset(m',T.mode,e) =>
gg:=GENSYM()
pred:= substitute(gg,"*",pred)
- code:= ['PROG1,['LET,gg,T.expr], ['check_-subtype,pred,MKQ m',gg]]
+ code:= ['PROG1,["%LET",gg,T.expr], ['check_-subtype,pred,MKQ m',gg]]
[code,m',T.env]
coerceByModemap([x,m,e],m') ==
@@ -1964,7 +1964,7 @@ for x in [["|", :"compSuchthat"],_
["is", :"compIs"],_
["Join", :"compJoin"],_
["leave", :"compLeave"],_
- ["LET", :"compSetq"],_
+ ["%LET", :"compSetq"],_
["MDEF", :"compMacro"],_
["not", :"compNot"],_
["pretend", :"compPretend"],_
diff --git a/src/interp/cparse.boot b/src/interp/cparse.boot
index 4a5291f7..85146e21 100644
--- a/src/interp/cparse.boot
+++ b/src/interp/cparse.boot
@@ -822,7 +822,7 @@ npQualified(f)==
else npLetQualified f
npLetQualified f==
- npEqKey "LET" and
+ npEqKey "%LET" and
(npDefinition() or npTrap()) and
npCompMissing "IN" and
(FUNCALL f or npTrap()) and
diff --git a/src/interp/def.lisp b/src/interp/def.lisp
index b6f7a920..f9613d94 100644
--- a/src/interp/def.lisp
+++ b/src/interp/def.lisp
@@ -464,10 +464,10 @@ foo defined inside of fum gets renamed as fum,foo.")
(setq RHS (DEF-IS-REMDUP1 (THIRD X)))
(setq LHS (DEF-IS-REMDUP1 (SECOND X)))
(LIST 'SPADLET LHS RHS))
- ((EQCAR X 'LET)
+ ((EQCAR X '%LET)
(setq RHS (DEF-IS-REMDUP1 (THIRD X)))
(setq LHS (DEF-IS-REMDUP1 (SECOND X)))
- (LIST 'LET LHS RHS))
+ (LIST '%LET LHS RHS))
((EQCAR X 'QUOTE) X)
((AND (EQCAR X 'EQUAL) (NOT (CDDR X)))
(PUSH (LIST 'EQUAL (setq G (IS-GENSYM)) (SECOND X)) $IS-EQLIST) G)
diff --git a/src/interp/define.boot b/src/interp/define.boot
index e92ca4d1..bc04b487 100644
--- a/src/interp/define.boot
+++ b/src/interp/define.boot
@@ -100,7 +100,7 @@ maybeInsertViewMorphisms body ==
-- Trick the rest of the compiler into believing that
-- that `Rep' was defined the old way, for the purpose of lookup.
- [:reverse before, ["LET","Rep",domainRep],
+ [:reverse before, ["%LET","Rep",domainRep],
:[repMorphism,perMorphism],:after]
@@ -329,7 +329,7 @@ compDefineCategory2(form,signature,specialCases,body,m,e,
['sublisV,['PAIR,['QUOTE,sargl],['LIST,:
[['devaluate,u] for u in sargl]]],body]
body:=
- ['PROG1,['LET,g:= GENSYM(),body],['SETELT,g,0,mkConstructor $form]]
+ ['PROG1,["%LET",g:= GENSYM(),body],['SETELT,g,0,mkConstructor $form]]
fun:= compile [op',['LAM,sargl,body]]
-- 5. give operator a 'modemap property
@@ -487,7 +487,7 @@ compDefineFunctor1(df is ['DEF,form,signature,$functorSpecialCases,body],
u:=
while cb repeat
ATOM cb => return nil
- cb is [['LET,'Rep,v,:.],:.] => return (u:=v)
+ cb is [["%LET",'Rep,v,:.],:.] => return (u:=v)
cb:=CDR cb
u
then $e:= augModemapsFromCategoryRep('_$,ab,cb,target,$e)
@@ -691,7 +691,7 @@ genDomainView(viewName,originalName,c,viewSelector) ==
c
$e:= augModemapsFromCategory(originalName,viewName,nil,c,$e)
--$alternateViewList:= ((viewName,:code),:$alternateViewList)
- cd:= ['LET,viewName,[viewSelector,originalName,mkDomainConstructor code]]
+ cd:= ["%LET",viewName,[viewSelector,originalName,mkDomainConstructor code]]
if null member(cd,$getDomainCode) then
$getDomainCode:= [cd,:$getDomainCode]
viewName
@@ -701,7 +701,7 @@ genDomainOps(viewName,dom,cat) ==
siglist:= [sig for [sig,:.] in oplist]
oplist:= substNames(dom,viewName,dom,oplist)
cd:=
- ['LET,viewName,['mkOpVec,dom,['LIST,:
+ ["%LET",viewName,['mkOpVec,dom,['LIST,:
[['LIST,MKQ op,['LIST,:[mkDomainConstructor mode for mode in sig]]]
for [op,sig] in siglist]]]]
$getDomainCode:= [cd,:$getDomainCode]
@@ -1067,7 +1067,7 @@ compileCases(x,$e) == -- $e is referenced in compile
FindNamesFor(R,R') ==
[R,:
[v
- for ['LET,v,u,:.] in $getDomainCode | CADR u=R and
+ for ["%LET",v,u,:.] in $getDomainCode | CADR u=R and
eval substitute(R',R,u)]]
isEltArgumentIn(Rlist,x) ==
atom x => nil
@@ -1338,10 +1338,10 @@ doIt(item,$predl) ==
RPLACA(item,first u)
RPLACD(item,rest u)
doIt(item,$predl)
- item is ['LET,lhs,rhs,:.] =>
+ item is ["%LET",lhs,rhs,:.] =>
not (compOrCroak(item,$EmptyMode,$e) is [code,.,$e]) =>
stackSemanticError(["cannot compile assigned value to",:bright lhs],nil)
- not (code is ['LET,lhs',rhs',:.] and atom lhs') =>
+ not (code is ["%LET",lhs',rhs',:.] and atom lhs') =>
code is ["PROGN",:.] =>
stackSemanticError(["multiple assignment ",item," not allowed"],nil)
RPLACA(item,first code)
@@ -1350,7 +1350,7 @@ doIt(item,$predl) ==
if not member(KAR rhs,$NonMentionableDomainNames) and
not MEMQ(lhs, $functorLocalParameters) then
$functorLocalParameters:= [:$functorLocalParameters,lhs]
- if code is ['LET,.,rhs',:.] and isDomainForm(rhs',$e) then
+ if code is ["%LET",.,rhs',:.] and isDomainForm(rhs',$e) then
if isFunctor rhs' then
$functorsUsed:= insert(opOf rhs',$functorsUsed)
$packagesUsed:= insert([opOf rhs'],$packagesUsed)
@@ -1364,7 +1364,7 @@ doIt(item,$predl) ==
$LocalDomainAlist:= --see genDeltaEntry
[[lhs,:SUBLIS($LocalDomainAlist,(get(lhs,'value,$e)).0)],:$LocalDomainAlist]
--+
- code is ['LET,:.] =>
+ code is ["%LET",:.] =>
RPLACA(item,"setShellEntry")
rhsCode:=
rhs'
@@ -1433,7 +1433,7 @@ doItIf(item is [.,p,x,y],$predl,$e) ==
nils:=[u,:nils]
else
gv := GENSYM()
- ans:=[['LET,gv,u],:ans]
+ ans:=[["%LET",gv,u],:ans]
nils:=[gv,:nils]
n:=n+1
$functorLocalParameters:=[:oldFLP,:NREVERSE nils]
diff --git a/src/interp/functor.boot b/src/interp/functor.boot
index e735ed17..af887d1a 100644
--- a/src/interp/functor.boot
+++ b/src/interp/functor.boot
@@ -419,17 +419,17 @@ mkDomainConstructor x ==
setVector4(catNames,catsig,conditions) ==
if $HackSlot4 then
- for ['LET,name,cond,:.] in $getDomainCode repeat
+ for ["%LET",name,cond,:.] in $getDomainCode repeat
$HackSlot4:=MSUSBT(name,cond,$HackSlot4)
code:=
--+
['SETELT,'$,4,'TrueDomain]
- code:=['(LET TrueDomain (NREVERSE TrueDomain)),:$HackSlot4,code]
+ code:=['(%LET TrueDomain (NREVERSE TrueDomain)),:$HackSlot4,code]
code:=
[:
[setVector4Onecat(u,v,w)
for u in catNames for v in catsig for w in conditions],:code]
- ['(LET TrueDomain NIL),:code]
+ ['(%LET TrueDomain NIL),:code]
setVector4Onecat(name,instantiator,info) ==
--generates code to create one item in the
@@ -578,7 +578,7 @@ DescendCodeAdd1(base,flag,target,formalArgs,formalArgModes) ==
[name,:count]:=u
v:=["setShellEntry",name,count,v]
code:=[v,:code]
- [['LET,instantiatedBase,base],:code]
+ [["%LET",instantiatedBase,base],:code]
DescendCode(code,flag,viewAssoc,EnvToPass) ==
-- flag = true if we are walking down code always executed;
@@ -617,7 +617,7 @@ DescendCode(code,flag,viewAssoc,EnvToPass) ==
c:=NREVERSE CDR NREVERSE c
null c => '(LIST)
['COND,:c]
- code is ['LET,name,body,:.] =>
+ code is ["%LET",name,body,:.] =>
--only keep the names that are useful
if body is [a,:.] and isFunctor a
then $packagesUsed:=[body,:$packagesUsed]
@@ -674,7 +674,7 @@ TryGDC cond ==
cond is ['HasCategory,:l] =>
solved:= nil
for u in $getDomainCode | not solved repeat
- if u is ['LET,name, =cond] then solved:= name
+ if u is ["%LET",name, =cond] then solved:= name
solved => solved
cond
cond
diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot
index 00d8c6e0..7ef701c4 100644
--- a/src/interp/g-opt.boot
+++ b/src/interp/g-opt.boot
@@ -121,7 +121,7 @@ optCatch (x is ["CATCH",g,a]) ==
s is ["THROW", =g,u] =>
changeThrowToGo(u,g)
rplac(first s,"PROGN")
- rplac(rest s,[["LET",CADR g,u],["GO",CADR g]])
+ rplac(rest s,[["%LET",CADR g,u],["GO",CADR g]])
changeThrowToGo(first s,g)
changeThrowToGo(rest s,g)
rplac(first x,"SEQ")
@@ -172,7 +172,7 @@ optCallSpecially(q,x,n,R) ==
lookup(a,l) ==
null l => nil
[l',:l]:= l
- l' is ["LET", =a,l',:.] => l'
+ l' is ["%LET", =a,l',:.] => l'
lookup(a,l)
nil
@@ -299,7 +299,7 @@ optSEQ ["SEQ",:l] ==
tryToRemoveSEQ SEQToCOND getRidOfTemps l where
getRidOfTemps l ==
null l => nil
- l is [["LET",g,x,:.],:r] and GENSYMP g and 2>numOfOccurencesOf(g,r) =>
+ l is [["%LET",g,x,:.],:r] and GENSYMP g and 2>numOfOccurencesOf(g,r) =>
getRidOfTemps substitute(x,g,r)
first l="/throwAway" => getRidOfTemps rest l
--this gets rid of unwanted labels generated by declarations in SEQs
diff --git a/src/interp/i-eval.boot b/src/interp/i-eval.boot
index fa8729dc..ed5da634 100644
--- a/src/interp/i-eval.boot
+++ b/src/interp/i-eval.boot
@@ -457,7 +457,7 @@ failCheck x ==
-- $StreamFrame: used in printing streams, it is the environment
-- where local stream variables are stored
-- $declaredMode: Weak type propagation for symbols, set in upCOERCE
--- and upLET. This variable is used to determine
+-- and up%LET. This variable is used to determine
-- the alternate polynomial types of Symbols.
-- $localVars: list of local variables in a map body
-- $MapArgumentTypeList: hack for stream compilation
diff --git a/src/interp/i-intern.boot b/src/interp/i-intern.boot
index 3116293f..681464a6 100644
--- a/src/interp/i-intern.boot
+++ b/src/interp/i-intern.boot
@@ -162,10 +162,10 @@ mkAtree2(x,op,argl) ==
(op="case") and (nargl = 2) =>
[mkAtreeNode "case",mkAtree1 first argl,unabbrev CADR argl]
op="REPEAT" => [mkAtreeNode op,:transformREPEAT argl]
- op="LET" and argl is [['construct,:.],rhs] =>
- [mkAtreeNode "LET",first argl,mkAtree1 rhs]
- op="LET" and argl is [[":",a,.],rhs] =>
- mkAtree1 ["SEQ",first argl,["LET",a,rhs]]
+ op="%LET" and argl is [['construct,:.],rhs] =>
+ [mkAtreeNode "%LET",first argl,mkAtree1 rhs]
+ op="%LET" and argl is [[":",a,.],rhs] =>
+ mkAtree1 ["SEQ",first argl,["%LET",a,rhs]]
op is ['_$elt,D,op1] =>
op1 is "=" =>
a' := [mkAtreeNode '_=,:[mkAtree1 arg for arg in argl]]
diff --git a/src/interp/i-map.boot b/src/interp/i-map.boot
index 547a8a2b..6ec3c5c6 100644
--- a/src/interp/i-map.boot
+++ b/src/interp/i-map.boot
@@ -718,13 +718,13 @@ genMapCode(op,body,sig,fnName,parms,isRecursive) ==
-- RSS: 6-21-94
-- The following code ensures that local variables really are local
- -- to a function. We will unnecessarily generate preliminary LETs for
- -- loop variables and variables that do have LET expressions, but that
+ -- to a function. We will unnecessarily generate preliminary %LETs for
+ -- loop variables and variables that do have %LET expressions, but that
-- can be finessed later.
locals := SETDIFFERENCE(COPY $localVars, parms)
if locals then
- lets := [['LET, l, ''UNINITIALIZED__VARIABLE, op] for l in locals]
+ lets := [["%LET", l, ''UNINITIALIZED__VARIABLE, op] for l in locals]
body := ['PROGN, :lets, body]
reportFunctionCompilation(op,fnName,parms,
@@ -999,10 +999,10 @@ findLocalVars1(op,form) ==
form is ['free, :vars] =>
for x in vars repeat
ATOM x => mkFreeVar(op, x)
- form is ['LET,a,b] =>
+ form is ["%LET",a,b] =>
(a is ["tuple",:vars]) and (b is ["tuple",:vals]) =>
for var in vars for val in vals repeat
- findLocalVars1(op,['LET,var,val])
+ findLocalVars1(op,["%LET",var,val])
a is ['construct,:pat] =>
for var in listOfVariables pat repeat mkLocalVar(op,var)
findLocalVars1(op,b)
diff --git a/src/interp/i-spec1.boot b/src/interp/i-spec1.boot
index 90942e57..1540cd68 100644
--- a/src/interp/i-spec1.boot
+++ b/src/interp/i-spec1.boot
@@ -40,7 +40,7 @@ namespace BOOT
$specialOps := '(
ADEF AlgExtension _and _case COERCE COLLECT construct Declare DEF Dollar
- equation error free has IF _is _isnt iterate _break LET _local MDEF _or
+ equation error free has IF _is _isnt iterate _break %LET _local MDEF _or
pretend QUOTE REDUCE REPEAT _return SEQ TARGET tuple typeOf _where
_[_|_|_] %Macro %MLambda)
@@ -822,9 +822,9 @@ checkForFreeVariables(v,locals) ==
$boundVariables := delete(var,$boundVariables)
r
["REPEAT",:[checkForFreeVariables(a,locals) for a in args]]
- op = "LET" =>
+ op = "%LET" =>
args is [var,form,name] =>
- -- This is some bizarre LET, not what one would expect in Common Lisp!
+ -- This is some bizarre %LET, not what one would expect in Common Lisp!
-- Treat var as a free variable, since it may be bound out of scope
-- if we are in a lambda within another lambda.
newvar :=
diff --git a/src/interp/i-spec2.boot b/src/interp/i-spec2.boot
index 27c6ad32..f8c2ab27 100644
--- a/src/interp/i-spec2.boot
+++ b/src/interp/i-spec2.boot
@@ -387,10 +387,10 @@ compileIs(val,pattern) ==
IDENTP(pat) and isLocalVar(pat) => vars:=[pat,:vars]
pat is [":",var] => vars:= [var,:vars]
pat is ["=",var] => vars:= [var,:vars]
- predCode:=["LET",g:=GENSYM(),["isPatternMatch",
+ predCode:=["%LET",g:=GENSYM(),["isPatternMatch",
getArgValue(val,computedMode val),MKQ removeConstruct pattern]]
for var in REMDUP vars repeat
- assignCode:=[["LET",var,["CDR",["ASSQ",MKQ var,g]]],:assignCode]
+ assignCode:=[["%LET",var,["CDR",["ASSQ",MKQ var,g]]],:assignCode]
null $opIsIs =>
["COND",[["EQ",predCode,MKQ "failed"],["SEQ",:assignCode,MKQ 'T]]]
["COND",[["NOT",["EQ",predCode,MKQ "failed"]],["SEQ",:assignCode,MKQ 'T]]]
@@ -477,9 +477,9 @@ upbreak t ==
putValue(op,objNew(code,$Void))
putModeSet(op,[$Void])
---% Handlers for LET
+--% Handlers for %LET
-upLET t ==
+up%LET t ==
-- analyzes and evaluates the righthand side, and does the variable
-- binding
t isnt [op,lhs,rhs] => nil
@@ -565,7 +565,7 @@ evalLETput(lhs,value) ==
compFailure ['" The type of the local variable",
:bright name,'"has changed in the computation."]
if dm and isSubDomain(dm,om) then put(name,'mode,om,$env)
- ['LET,name,objVal value,$mapName]
+ ["%LET",name,objVal value,$mapName]
-- $mapName is set in analyzeMap
om := objMode value
dm := get(name, 'mode, $env) or objMode(get(name, 'value, $e))
@@ -631,13 +631,13 @@ upLETWithFormOnLhs(op,lhs,rhs) ==
for lvar in temps repeat mkLocalVar($mapName,lvar)
for l in reverse rest lhs for t in temps repeat
transferPropsToNode(getUnname l,l)
- let := mkAtreeNode 'LET
+ let := mkAtreeNode "%LET"
t' := mkAtreeNode t
if m := getMode(l) then putMode(t',m)
seq := cons([let,l,t'],seq)
for t in temps for r in reverse rest rhs
for l in reverse rest lhs repeat
- let := mkAtreeNode 'LET
+ let := mkAtreeNode "%LET"
t' := mkAtreeNode t
if m := getMode(l) then putMode(t',m)
seq := cons([let,t',r],seq)
@@ -701,7 +701,7 @@ upTableSetelt(op,lhs is [htOp,:args],rhs) ==
putMode (htOp,['Table,keyMode,'(Any)])
-- if we are to use a new table, we must call the "table"
-- function to give it an initial value.
- bottomUp [mkAtreeNode 'LET,htOp,[mkAtreeNode 'table]]
+ bottomUp [mkAtreeNode "%LET",htOp,[mkAtreeNode 'table]]
tableCode := objVal getValue htOp
r := upSetelt(op, lhs, [mkAtreeNode "setelt",:lhs,rhs])
$genValue => r
diff --git a/src/interp/iterator.boot b/src/interp/iterator.boot
index 19ead302..7497b336 100644
--- a/src/interp/iterator.boot
+++ b/src/interp/iterator.boot
@@ -57,19 +57,19 @@ compReduce1(form is ["REDUCE",op,.,collectForm],m,e,$formalArgList) ==
acc:= GENSYM()
afterFirst:= GENSYM()
bodyVal:= GENSYM()
- [part1,m,e]:= comp(["LET",bodyVal,body],m,e) or return nil
- [part2,.,e]:= comp(["LET",acc,bodyVal],m,e) or return nil
- [part3,.,e]:= comp(["LET",acc,parseTran [op,acc,bodyVal]],m,e) or return nil
+ [part1,m,e]:= comp(["%LET",bodyVal,body],m,e) or return nil
+ [part2,.,e]:= comp(["%LET",acc,bodyVal],m,e) or return nil
+ [part3,.,e]:= comp(["%LET",acc,parseTran [op,acc,bodyVal]],m,e) or return nil
identityCode:=
id:= getIdentity(op,e) => u.expr where u() == comp(id,m,e) or return nil
["IdentityError",MKQ op]
finalCode:=
["PROGN",
- ["LET",afterFirst,nil],
+ ["%LET",afterFirst,nil],
["REPEAT",:itl,
["PROGN",part1,
["IF", afterFirst,part3,
- ["PROGN",part2,["LET",afterFirst,MKQ true]]]]],
+ ["PROGN",part2,["%LET",afterFirst,MKQ true]]]]],
["IF",afterFirst,acc,identityCode]]
if $until then
[untilCode,.,e]:= comp($until,$Boolean,e)
diff --git a/src/interp/mark.boot b/src/interp/mark.boot
index daba836e..11dfefe3 100644
--- a/src/interp/mark.boot
+++ b/src/interp/mark.boot
@@ -120,7 +120,7 @@ markCoerceChk x ==
markMultipleExplicit(nameList, valList, T) ==
tcheck T
[mkWi('setqMultipleExplicit, 'WI,
- ['LET, ["%Comma",:nameList], ["%Comma",:valList]],
+ ["%LET", ["%Comma",:nameList], ["%Comma",:valList]],
T.expr), :CDR T]
markRetract(x,T) ==
@@ -311,7 +311,7 @@ markMacroTran name == --called by markImport
markSetq(originalLet,T) == --for compSetq
BOUNDP '$convert2NewCompiler and $convert2NewCompiler =>
$coerceList : local := nil
- ['LET,form,originalBody] := originalLet
+ ["%LET",form,originalBody] := originalLet
id := markLhs form
not $insideCapsuleFunctionIfTrue =>
$from : local := '"Setq"
@@ -319,7 +319,7 @@ markSetq(originalLet,T) == --for compSetq
markEncodeChanges(code,nil)
noriginalLet := markSpliceInChanges originalBody
if IDENTP id then $domainLevelVariableList := insert(id,$domainLevelVariableList)
- nlet := ['LET,id,noriginalLet]
+ nlet := ["%LET",id,noriginalLet]
entry := [originalLet,:nlet]
$importStack := [nil,:$importStack]
$freeStack := [nil,:$freeStack]
@@ -526,7 +526,7 @@ markOrigName x ==
markEncodeLoop(i, r, s) ==
[.,:itl1, b1] := i --op is REPEAT or COLLECT
- if r is ['LET,.,a] then r := a
+ if r is ["%LET",.,a] then r := a
r is [op1,:itl2,b2] and MEMQ(op1, '(REPEAT COLLECT)) =>
for it1 in itl1 for it2 in itl2 repeat markEncodeChanges(it2,[it1,:s])
markEncodeChanges(b2, [b1,:s])
@@ -668,9 +668,9 @@ markPaths(x,y,s) == --x < y; find location s of x in y (initially s=nil)
x is [op,:u] and MEMQ(op,'(LIST VECTOR)) and y is ['construct,:v] and
(p := markPaths(['construct,:u],y,s)) => p
atom y => nil
- y is ['LET,a,b] and IDENTP a =>
+ y is ["%LET",a,b] and IDENTP a =>
markPaths(x,b,markCons(2,s)) --and IDENTP x
- y is ['LET,a,b] and GENSYMP a => markPaths(x,b,s) --for loops
+ y is ["%LET",a,b] and GENSYMP a => markPaths(x,b,s) --for loops
y is ['IF,a,b,:.] and GENSYMP a => markPaths(x,b,s) --for loops
y is ['IF,a,b,c] and (p := (markPathsEqual(x,b) => 2;
markPathsEqual(x,c) => 3;
@@ -691,7 +691,7 @@ markPathsEqual(x,y) ==
x is ["::",.,a] and y is ["::",.,b] and
a = $Integer and b = $NonNegativeInteger => true
y is [fn,.,z] and MEMQ(fn,'(PART CATCH THROW)) and markPathsEqual(x,z) => true
- y is ['LET,a,b] and GENSYMP a and markPathsEqual(x,b) => true
+ y is ["%LET",a,b] and GENSYMP a and markPathsEqual(x,b) => true
y is ['IF,a,b,:.] and GENSYMP a => markPathsEqual(x,b) -------> ???
y is ['call,:r] => markPathsEqual(IFCDR x,r)
x is ['REDUCE,.,.,c,:.] and c is ['COLLECT,:u] and
@@ -953,7 +953,7 @@ mkNewCapsuleItem(frees,i,x) ==
imports := REVERSE orderByContainment REMDUP SETDIFFERENCE(i,$finalImports)
importPart := [["import",d] for d in imports]
nbody :=
- ndef is ['LET,.,x] => x
+ ndef is ["%LET",.,x] => x
ndef is ['DEF,.,.,.,x] => x
ndef
newerBody :=
@@ -962,7 +962,7 @@ mkNewCapsuleItem(frees,i,x) ==
['SEQ,:newPart,['exit,1,nbody]]
nbody
newerDef :=
- ndef is ['LET,a,x] => ['LET,a,newerBody]
+ ndef is ["%LET",a,x] => ["%LET",a,newerBody]
ndef is ['DEF,a,b,c,x] => ['DEF,a,b,c,newerBody]
newerBody
entry := [originalDef,:newerDef]
@@ -997,9 +997,9 @@ markFinishItem x ==
foobum x
pp x
x
- x is ['LET,lhs,rhs] =>
+ x is ["%LET",lhs,rhs] =>
"or"/[new for [old,:new] in $capsuleStack |
- old is ['LET,olhs,orhs]
+ old is ["%LET",olhs,orhs]
and markCompare(lhs,olhs) and markCompare(rhs,orhs)]
or x
x is ['IF,p,a,b] => ['IF,p,markFinishItem a,markFinishItem b]
@@ -1144,12 +1144,12 @@ markInsertBodyParts u ==
['SEQ,:[markInsertBodyParts y for y in l],
['exit,n,markInsertBodyParts x]]
u is [op,:l] and MEMQ(op,'(REPEAT COLLECT)) => markInsertRepeat u
- u is ['LET,["%Comma",:s],b] =>
- ['LET,["%Comma",:[markWrapPart x for x in s]],markInsertBodyParts b]
---u is ['LET,a,b] and constructor? opOf b => u
- u is ['LET,a,b] and a is [op,:.] =>
- ['LET,[markWrapPart x for x in a],markInsertBodyParts b]
- u is [op,a,b] and MEMQ(op,'(_add _with IN LET)) =>
+ u is ["%LET",["%Comma",:s],b] =>
+ ["%LET",["%Comma",:[markWrapPart x for x in s]],markInsertBodyParts b]
+--u is ["%LET",a,b] and constructor? opOf b => u
+ u is ["%LET",a,b] and a is [op,:.] =>
+ ["%LET",[markWrapPart x for x in a],markInsertBodyParts b]
+ u is [op,a,b] and MEMQ(op,'(_add _with IN %LET)) =>
[op,markInsertBodyParts a,markInsertBodyParts b]
u is [op,a,b] and MEMQ(op,'(_: _:_: _pretend _@)) =>
[op,markInsertBodyParts a,b]
@@ -1381,7 +1381,7 @@ mkPaths(x,y) == --x < y; find location s of x in y (initially s=nil)
atom y => nil
x is [op, :u] and MEMQ(op,'(LIST VECTOR)) and y is ['construct,:v]
and markPathsEqual(['construct,:u],y) => [y]
- (y is ['LET,a,b] or y is ['IF,a,b,:.]) and GENSYMP a and markPathsEqual(x,b) => [y]
+ (y is ["%LET",a,b] or y is ['IF,a,b,:.]) and GENSYMP a and markPathsEqual(x,b) => [y]
y is ['call,:r] =>
-- markPathsEqual(x,y1) => [y]
mkPaths(x,r) => [y]
@@ -1497,7 +1497,7 @@ ppf x ==
--%
-for x in [["LET", :"compSetq"],_
+for x in [["%LET", :"compSetq"],_
["Join", :"compJoin"],_
["Record", :"compCat"],_
["Union", :"compCat"],_
diff --git a/src/interp/newaux.lisp b/src/interp/newaux.lisp
index df23d213..816d4e29 100644
--- a/src/interp/newaux.lisp
+++ b/src/interp/newaux.lisp
@@ -127,7 +127,7 @@
(== DEF 122 121)
(==\> MDEF 122 121)
(\| 108 111) ;was 190 190
- (\:- LETD 125 124) (\:= LET 125 124)))
+ (\:- LETD 125 124) (\:= %LET 125 124)))
(mapcar #'(LAMBDA (J) (MAKENEWOP J `|Nud|))
'((|for| 130 350 (|PARSE-Loop|))
diff --git a/src/interp/nruncomp.boot b/src/interp/nruncomp.boot
index ca5f4025..15900a1e 100644
--- a/src/interp/nruncomp.boot
+++ b/src/interp/nruncomp.boot
@@ -338,7 +338,7 @@ buildFunctor($definition is [name,:args],sig,code,$locals,$e) ==
-- $definition: constructor form, e.g. (SquareMatrix 10 (RationalNumber))
-- sig: signature of constructor form
-- code: result of "doIt", converting body of capsule to CodeDefine forms, e.g.
--- (PROGN (LET Rep ...)
+-- (PROGN (%LET Rep ...)
-- (: (ListOf x y) $)
-- (CodeDefine (<op> <signature> <functionName>))
-- (COND ((HasCategory $ ...) (PROGN ...))) ..)
@@ -431,14 +431,14 @@ buildFunctor($definition is [name,:args],sig,code,$locals,$e) ==
--CODE: part 1
codePart1:= [:devaluateCode,:domainFormCode,createDomainCode,
createViewCode,setVector0Code, slot3Code,:slamCode] where
- devaluateCode:= [['LET,b,['devaluate,a]] for [a,:b] in $devaluateList]
- domainFormCode := [['LET,a,b] for [a,:b] in NREVERSE $NRTdomainFormList]
+ devaluateCode:= [["%LET",b,['devaluate,a]] for [a,:b] in $devaluateList]
+ domainFormCode := [["%LET",a,b] for [a,:b] in NREVERSE $NRTdomainFormList]
--$NRTdomainFormList is unused now
createDomainCode:=
- ['LET,domname,['LIST,MKQ CAR $definition,:ASSOCRIGHT $devaluateList]]
- createViewCode:= ['LET,'$,["newShell", $NRTbase + $NRTdeltaLength]]
+ ["%LET",domname,['LIST,MKQ CAR $definition,:ASSOCRIGHT $devaluateList]]
+ createViewCode:= ["%LET",'$,["newShell", $NRTbase + $NRTdeltaLength]]
setVector0Code:=[$setelt,'$,0,'dv_$]
- slot3Code := ["setShellEntry",'$,3,['LET,'pv_$,predBitVectorCode1]]
+ slot3Code := ["setShellEntry",'$,3,["%LET",'pv_$,predBitVectorCode1]]
slamCode:=
isCategoryPackageName opOf $definition => nil
[NRTaddToSlam($definition,'$)]
@@ -508,15 +508,15 @@ NRTsetVector4(siglist,formlist,condlist) ==
code := ['mapConsDB,MKQ REVERSE REMDUP $uncondList]
if $condList then
localVariable := GENSYM()
- code := [['LET,localVariable,code]]
+ code := [["%LET",localVariable,code]]
for [pred,list] in $condList repeat
code :=
- [['COND,[pred,['LET,localVariable,
+ [['COND,[pred,["%LET",localVariable,
['mergeAppend,['mapConsDB,MKQ list],localVariable]]]],
:code]
code := ['PROGN,:NREVERSE [['NREVERSE,localVariable],:code]]
g := GENSYM()
- [$setelt,'$,4,['PROG2,['LET,g,code],
+ [$setelt,'$,4,['PROG2,["%LET",g,code],
['VECTOR,['catList2catPackageList,g],g]]]
NRTsetVector4Part1(siglist,formlist,condlist) ==
@@ -548,15 +548,15 @@ NRTsetVector4Part2(uncondList,condList) ==
code := ['mapConsDB,MKQ REVERSE REMDUP uncondList]
if condList then
localVariable := GENSYM()
- code := [['LET,localVariable,code]]
+ code := [["%LET",localVariable,code]]
for [pred,list] in condList repeat
code :=
- [['COND,[predicateBitRef SUBLIS($pairlis,pred),['LET,localVariable,
+ [['COND,[predicateBitRef SUBLIS($pairlis,pred),["%LET",localVariable,
['mergeAppend,['mapConsDB,MKQ list],localVariable]]]],
:code]
code := ['PROGN,:NREVERSE [['NREVERSE,localVariable],:code]]
g := GENSYM()
- [$setelt,'$,4,['PROG2,['LET,g,code],
+ [$setelt,'$,4,['PROG2,["%LET",g,code],
['VECTOR,['catList2catPackageList,g],g]]]
mergeAppend(l1,l2) ==
diff --git a/src/interp/nrunopt.boot b/src/interp/nrunopt.boot
index 38aed65f..124497ed 100644
--- a/src/interp/nrunopt.boot
+++ b/src/interp/nrunopt.boot
@@ -305,7 +305,7 @@ mungeAddGensyms(u,gal) ==
['LIST,:[fn(x,gal,0) for x in u]] where fn(x,gal,n) ==
atom x => x
g := LASSOC(x,gal) =>
- n = 0 => ['LET,g,x]
+ n = 0 => ["%LET",g,x]
g
[first x,:[fn(y,gal,n + 1) for y in rest x]]
diff --git a/src/interp/package.boot b/src/interp/package.boot
index 6217d639..4faad1be 100644
--- a/src/interp/package.boot
+++ b/src/interp/package.boot
@@ -100,7 +100,7 @@ processPackage($definition is [name,:args],[$catsig,:argssig],code,locals,$e) ==
code:=[["setShellEntry","$",i,u'],:code]
nreverse code
code:=
- ["PROGN",:$getDomainCode,["LET","$",["newShell",#locals]],
+ ["PROGN",:$getDomainCode,["%LET","$",["newShell",#locals]],
--It is important to place this code here,
--after $ is set up
--slam functor with shell
@@ -116,7 +116,7 @@ processPackage($definition is [name,:args],[$catsig,:argssig],code,locals,$e) ==
(LIST (GENSYM)));[]) ],
"$"]
for u in $getDomainCode repeat
- u is ['LET,.,u'] and u' is ['getDomainView,.,u''] =>
+ u is ["%LET",.,u'] and u' is ['getDomainView,.,u''] =>
$packagesUsed:=union(CategoriesFromGDC u'',$packagesUsed)
$packagesUsed:=union($functorLocalParameters,$packagesUsed)
$getDomainCode:= nil
@@ -158,7 +158,7 @@ PackageDescendCode(code,flag,viewAssoc) ==
else viewAssoc) for v in rest u])] for u in condlist]]
TruthP CAADR c => ["PROGN",:CDADR c]
c
- code is ["LET",name,body,:.] =>
+ code is ["%LET",name,body,:.] =>
if not MEMQ(name,$ResetItems) then $ResetItems:= [name,:$ResetItems]
if body is [a,:.] and isFunctor a
then $packagesUsed:=[body,:$packagesUsed]
diff --git a/src/interp/parse.boot b/src/interp/parse.boot
index d403931c..74b52394 100644
--- a/src/interp/parse.boot
+++ b/src/interp/parse.boot
@@ -92,7 +92,7 @@ parseUpArrow u ==
-- ??? This parser is unused at the moment.
parseLeftArrow: %ParseForm -> %Form
parseLeftArrow u ==
- parseTran ["LET",:rest u]
+ parseTran ["%LET",:rest u]
parseIs: %ParseForm -> %Form
parseIs t ==
@@ -133,9 +133,9 @@ transIs1 u ==
parseLET: %ParseForm -> %Form
parseLET t ==
- t isnt ["LET",x,y] => systemErrorHere "parseLET"
- p := ["LET",parseTran x,parseTranCheckForRecord(y,opOf x)]
- opOf x = "cons" => ["LET",transIs p.1,p.2]
+ t isnt ["%LET",x,y] => systemErrorHere "parseLET"
+ p := ["%LET",parseTran x,parseTranCheckForRecord(y,opOf x)]
+ opOf x = "cons" => ["%LET",transIs p.1,p.2]
p
@@ -445,7 +445,7 @@ makeSimplePredicateOrNil: %ParseForm -> %Form
makeSimplePredicateOrNil p ==
isSimple p => nil
u:= isAlmostSimple p => u
- true => wrapSEQExit [["LET",g:= GENSYM(),p],g]
+ true => wrapSEQExit [["%LET",g:= GENSYM(),p],g]
parseWhere: %List -> %Form
@@ -468,7 +468,7 @@ transSeq l ==
null rest l => decExitLevel first l
[item,:tail]:= l
item is ["SEQ",:l,["exit",1,["IF",p,["exit", =2,q],"%noBranch"]]] and
- (and/[x is ["LET",:.] for x in l]) =>
+ (and/[x is ["%LET",:.] for x in l]) =>
["SEQ",:[decExitLevel x for x in l],["exit",1,["IF",decExitLevel p,
decExitLevel q,transSeq tail]]]
item is ["IF",a,["exit",1,b],"%noBranch"] =>
@@ -551,7 +551,7 @@ for x in [["<=", :"parseLessEqual"],_
["isnt", :"parseIsnt"],_
["Join", :"parseJoin"],_
["leave", :"parseLeave"],_
- ["LET", :"parseLET"],_
+ ["%LET", :"parseLET"],_
["LETD", :"parseLETD"],_
["MDEF", :"parseMDEF"],_
["or", :"parseOr"],_
diff --git a/src/interp/pf2atree.boot b/src/interp/pf2atree.boot
index c3995a5e..bc46bc76 100644
--- a/src/interp/pf2atree.boot
+++ b/src/interp/pf2atree.boot
@@ -178,7 +178,7 @@ pf2Atree1 pf ==
(pfAssign?)(pf) =>
-- declarations on the lhs are broken out into another
- -- statement preceding the LET of the id(s)
+ -- statement preceding the %LET of the id(s)
lhsThings := (pf0AssignLhsItems)(pf)
if #lhsThings = 1 and (pfTuple?)(first lhsThings) then
lhsThings := (pf0TupleParts)(first lhsThings)
@@ -193,7 +193,7 @@ pf2Atree1 pf ==
if #idList ^= 1 then idList :=
[mkAtreeNodeWithSrcPos("tuple",pf), :idList]
else idList := first idList
- x := [mkAtreeNodeWithSrcPos("LET",pf),
+ x := [mkAtreeNodeWithSrcPos("%LET",pf),
idList, pf2Atree1 (pfAssignRhs)(pf)]
decls =>
[mkAtreeNodeWithSrcPos("SEQ",pf),
diff --git a/src/interp/pf2sex.boot b/src/interp/pf2sex.boot
index bcb9d514..936f93ed 100644
--- a/src/interp/pf2sex.boot
+++ b/src/interp/pf2sex.boot
@@ -120,7 +120,7 @@ pf2Sex1 pf ==
idList := [pf2Sex1 x for x in pf0AssignLhsItems pf]
if #idList ^= 1 then idList := ["tuple", :idList]
else idList := first idList
- ["LET", idList, pf2Sex1 pfAssignRhs pf]
+ ["%LET", idList, pf2Sex1 pfAssignRhs pf]
pfDefinition? pf =>
pfDefinition2Sex pf
pfLambda? pf =>
diff --git a/src/interp/postpar.boot b/src/interp/postpar.boot
index 32afc6b3..9ba73705 100644
--- a/src/interp/postpar.boot
+++ b/src/interp/postpar.boot
@@ -374,7 +374,7 @@ postMapping u ==
postOp: %ParseTree -> %ParseForm
postOp x ==
- x=":=" => "LET"
+ x=":=" => "%LET"
x=":-" => "LETD"
x="%Attribute" => "ATTRIBUTE"
x
diff --git a/src/interp/property.lisp b/src/interp/property.lisp
index 6eef2a01..1e012666 100644
--- a/src/interp/property.lisp
+++ b/src/interp/property.lisp
@@ -58,14 +58,14 @@
(MAKEPROP 'TAG 'Led '(TAG TAG 122 121))
(MAKEPROP 'EQUATNUM '|Nud| '(|dummy| |dummy| 0 0))
(MAKEPROP 'EQUATNUM '|Led| '(|dummy| |dummy| 10000 0))
-(MAKEPROP 'LET '|Led| '(|:=| LET 125 124))
+(MAKEPROP '%LET '|Led| '(|:=| %LET 125 124))
(MAKEPROP 'RARROW '|Led| '(== DEF 122 121))
(MAKEPROP 'SEGMENT '|Led| '(|..| SEGMENT 401 699 (|P:Seg|)))
(MAKEPROP 'SEGMENT '|isSuffix| 'T)
(MAKEPROP 'EQUAL1 'CHRYBNAM 'EQ)
(REPEAT (IN X '(
- (LET " := ")
+ (%LET " := ")
(= "=")
(|/| "/")
(+ "+")
@@ -286,7 +286,7 @@
(|::| |DEF-::|)
(ELT DEF-ELT)
(SETELT DEF-SETELT)
- (LET DEF-LET)
+ (%LET DEF-LET)
(COLLECT DEF-COLLECT)
(LESSP DEF-LESSP)
(|<| DEF-LESSP)
@@ -469,6 +469,6 @@
(\: |compColonInteractive|)
(DEF |compDefineInteractive|)
(|construct| |compConstructInteractive|)
- (LET |compSetqInteractive|)
+ (%LET |compSetqInteractive|)
)) (MAKEPROP (CAR X) 'INTERACTIVE (CADR X)))
diff --git a/src/interp/pspad1.boot b/src/interp/pspad1.boot
index 284d5705..2ad7b5d2 100644
--- a/src/interp/pspad1.boot
+++ b/src/interp/pspad1.boot
@@ -477,7 +477,7 @@ formatLeft(fn,x,op,key) ==
formatRight(fn,x,op,key) ==
--are there exceptional cases where piles are ok?
- x is ['LET,:.] => FUNCALL(fn,x)
+ x is ["%LET",:.] => FUNCALL(fn,x)
--decide on basis of binding power whether prens are needed
rbp := formatOpBindingPower(op,key,"right")
lbp := formatOpBindingPower(opOf x,key,"left")
diff --git a/src/interp/pspad2.boot b/src/interp/pspad2.boot
index e6528a19..074af02f 100644
--- a/src/interp/pspad2.boot
+++ b/src/interp/pspad2.boot
@@ -116,7 +116,7 @@ formatDeftranRepper([op,a],SEQflag) ==
a is ['SEQ,:r] => ['SEQ,:[formatSeqRepper(op,x) for x in r]]
a is ['IF,p,b,c] =>
formatDeftran(['IF,p,[op,b],[op, c]], SEQflag)
- a is ['LET,a,b] => formatDeftran(['LET,a,[op,b]],SEQflag)
+ a is ["%LET",a,b] => formatDeftran(["%LET",a,[op,b]],SEQflag)
a is ['not,[op,a,b]] and (op1 := LASSOC(op,$pspadRelationAlist)) =>
formatDeftran([op1,a,b],SEQflag)
a is ["return",n,r] =>
@@ -330,7 +330,7 @@ formatTail1 x ==
-- x = "." => format " "
formatConstructItem x == format x
-formatLET ["LET",a,b] ==
+formatLET ["%LET",a,b] ==
$insideTypeExpression: local := true
a = "Rep" or atom a and constructor? opOf b =>
tryBreakNB(formatAtom a and format " == ",b,":=","Led")
diff --git a/src/interp/slam.boot b/src/interp/slam.boot
index 7ffac994..672acb96 100644
--- a/src/interp/slam.boot
+++ b/src/interp/slam.boot
@@ -175,11 +175,11 @@ compileRecurrenceRelation(op,nam,argl,junk,[body,sharpArg,n,:initCode]) ==
stateVal:= GENSYM()
lastArg := INTERNL STRCONC('"#",STRINGIMAGE QSADD1 LENGTH argl)
decomposeCode:=
- [["LET",gIndex,["ELT",lastArg,0]],:[["LET",g,["ELT",lastArg,i]]
+ [["%LET",gIndex,["ELT",lastArg,0]],:[["%LET",g,["ELT",lastArg,i]]
for g in gsList for i in 1..]]
gsRev:= REVERSE gsList
- rotateCode:= [["LET",p,q] for p in gsRev for q in [:rest gsRev,g]]
- advanceCode:= ["LET",gIndex,['ADD1,gIndex]]
+ rotateCode:= [["%LET",p,q] for p in gsRev for q in [:rest gsRev,g]]
+ advanceCode:= ["%LET",gIndex,['ADD1,gIndex]]
newTripleCode := ["LIST",sharpArg,:gsList]
newStateCode :=
@@ -192,16 +192,16 @@ compileRecurrenceRelation(op,nam,argl,junk,[body,sharpArg,n,:initCode]) ==
cbody:=
endTest:=
["COND", [["EQL",sharpArg,gIndex],['RETURN,returnValue]]]
- newValueCode:= ["LET",g,substitute(gIndex,sharpArg,
+ newValueCode:= ["%LET",g,substitute(gIndex,sharpArg,
EQSUBSTLIST(gsList,rest $TriangleVariableList,body))]
["PROGN",:decomposeCode,
["REPEAT",["WHILE",'T],["PROGN",endTest,advanceCode,
newValueCode,:rotateCode]]]
fromScratchInit:=
- [["LET",gIndex,n],:[["LET",g,x] for g in gsList for x in initCode]]
+ [["%LET",gIndex,n],:[["%LET",g,x] for g in gsList for x in initCode]]
continueInit:=
- [["LET",gIndex,["ELT",stateVar,0]],
- :[["LET",g,["ELT",stateVar,i]] for g in gsList for i in 1..]]
+ [["%LET",gIndex,["%ELT",stateVar,0]],
+ :[["%LET",g,["%ELT",stateVar,i]] for g in gsList for i in 1..]]
mainFunction:= [nam,["LAM",margl,mbody]] where
margl:= [:argl,'envArg]
max:= GENSYM()
@@ -216,20 +216,20 @@ compileRecurrenceRelation(op,nam,argl,junk,[body,sharpArg,n,:initCode]) ==
cacheResetCode := ["SETQ",stateNam,initialValueCode]
["COND",[["NULL",["AND",["BOUNDP",MKQ stateNam], _
["PAIRP",stateNam]]], _
- ["LET",stateVar,cacheResetCode]], _
- [''T, ["LET",stateVar,stateNam]]]
+ ["%LET",stateVar,cacheResetCode]], _
+ [''T, ["%LET",stateVar,stateNam]]]
-- when there are extra arguments, initialResetCode resets "stateVar"
-- to the hashtable entry for the extra arguments
initialResetCode :=
null extraArguments => nil
- [["LET",stateVar,["OR",
+ [["%LET",stateVar,["OR",
["HGET",stateVar,extraArgumentCode],
["HPUT",stateVar,extraArgumentCode,tripleCode]]]]
mbody :=
- preset := [initialSetCode,:initialResetCode,["LET",max,["ELT",stateVar,0]]]
- phrase1:= [["AND",["LET",max,["ELT",stateVar,0]],["GE",sharpArg,max]],
+ preset := [initialSetCode,:initialResetCode,["%LET",max,["ELT",stateVar,0]]]
+ phrase1:= [["AND",["%LET",max,["ELT",stateVar,0]],["GE",sharpArg,max]],
[auxfn,:argl,stateVar]]
phrase2:= [["GT",sharpArg,["SETQ",max,["DIFFERENCE",max,k]]],
["ELT",stateVar,["QSADD1",["QSDIFFERENCE",k,["DIFFERENCE",sharpArg,max]]]]]
diff --git a/src/interp/spad.lisp b/src/interp/spad.lisp
index dcc42f3c..8967781b 100644
--- a/src/interp/spad.lisp
+++ b/src/interp/spad.lisp
@@ -381,7 +381,7 @@
'((COMMENT |formatCOMMENT|)
(SEQ |formatSEQ|)
(DEF |formatDEF|)
- (LET |formatLET|)
+ (%LET |formatLET|)
(\: |formatColon|)
(ELT |formatELT|)
(SEGMENT |formatSEGMENT|)
@@ -469,7 +469,7 @@
(MAKEPROP 'TAG '|Led| '(TAG TAG 122 121))
(MAKEPROP 'EQUATNUM '|Nud| '(|dummy| |dummy| 0 0))
(MAKEPROP 'EQUATNUM '|Led| '(|dummy| |dummy| 10000 0))
-(MAKEPROP 'LET '|Led| '(:= LET 125 124))
+(MAKEPROP '%LET '|Led| '(:= %LET 125 124))
(MAKEPROP 'RARROW '|Led| '(== DEF 122 121))
(MAKEPROP 'SEGMENT '|Led| '(\.\. SEGMENT 401 699 (|boot-Seg|)))
diff --git a/src/interp/wi1.boot b/src/interp/wi1.boot
index c1b48904..b76c2ba9 100644
--- a/src/interp/wi1.boot
+++ b/src/interp/wi1.boot
@@ -528,7 +528,7 @@ compMacro(form,m,e) ==
-- ["/throwAway",$NoValueMode,put(first lhs,"macro",rhs,e)]
compSetq(oform,m,E) ==
- ["LET",form,val] := oform
+ ["%LET",form,val] := oform
T := compSetq1(form,val,m,E) => markSetq(oform,T)
nil
@@ -537,7 +537,7 @@ compSetq1(oform,val,m,E) ==
IDENTP form => setqSingle(form,val,m,E)
form is [":",x,y] =>
[.,.,E']:= compMakeDeclaration(form,$EmptyMode,E)
- compSetq(["LET",x,val],m,E')
+ compSetq(["%LET",x,val],m,E')
form is [op,:l] =>
op="CONS" => setqMultiple(uncons form,val,m,E)
op="%Comma" => setqMultiple(l,val,m,E)
@@ -588,8 +588,8 @@ setqSingle(id,val,m,E) ==
$markFreeStack := [id,:$markFreeStack]
form:=['SETELT,"$",k,x]
else form:=
- $QuickLet => ["LET",id,x]
- ["LET",id,x,
+ $QuickLet => ["%LET",id,x]
+ ["%LET",id,x,
(isDomainForm(x,e') => ['ELT,id,0];CAR outputComp(id,e'))]
[form,m',e']
@@ -606,7 +606,7 @@ setqMultiple(nameList,val,m,e) ==
--1.1 exit if result is a list
m1 is ["List",D] =>
for y in nameList repeat e:= put(y,"value",[genSomeVariable(),D,$noEnv],e)
- convert([["PROGN",x,["LET",nameList,g],g],m',e],m)
+ convert([["PROGN",x,["%LET",nameList,g],g],m',e],m)
--2. verify that the #nameList = number of parts of right-hand-side
selectorModePairs:=
--list of modes
@@ -923,7 +923,7 @@ compCoerce1(x,m',e) ==
pred:=isSubset(m',T.mode,e) =>
gg:=GENSYM()
pred:= substitute(gg,"*",pred)
- code:= ['PROG1,['LET,gg,T.expr], ['check_-subtype,pred,MKQ m',gg]]
+ code:= ['PROG1,["%LET",gg,T.expr], ['check_-subtype,pred,MKQ m',gg]]
[code,m',T.env]
coerceByModemap([x,m,e],m') ==
@@ -977,7 +977,7 @@ comp3(x,m,$e) ==
yyyyy x == x
compExpression(x,m,e) ==
$insideExpressionIfTrue: local:= true
- if x is ['LET,['PART,.,w],[['elt,B,'new],['PART,.,["#",['PART,.,l]]],:.],:.] then yyyyy x
+ if x is ["%LET",['PART,.,w],[['elt,B,'new],['PART,.,["#",['PART,.,l]]],:.],:.] then yyyyy x
x := compRenameOp x
atom first x and (fn:= GETL(first x,"SPECIAL")) =>
FUNCALL(fn,x,m,e)
@@ -1225,7 +1225,7 @@ compDefineCategory2(form,signature,specialCases,body,m,e,
['sublisV,['PAIR,['QUOTE,sargl],['LIST,:
[['devaluate,u] for u in sargl]]],body]
body:=
- ['PROG1,['LET,g:= GENSYM(),body],['SETELT,g,0,mkConstructor $functorForm]]
+ ['PROG1,["%LET",g:= GENSYM(),body],['SETELT,g,0,mkConstructor $functorForm]]
fun:= compile [op',['LAM,sargl,body]]
-- 5. give operator a 'modemap property
diff --git a/src/interp/wi2.boot b/src/interp/wi2.boot
index ec25e771..633912ce 100644
--- a/src/interp/wi2.boot
+++ b/src/interp/wi2.boot
@@ -144,7 +144,7 @@ compDefineFunctor1(df, m,$e,$prefix,$formalArgList) ==
u:=
while cb repeat
ATOM cb => return nil
- cb is [['LET,'Rep,v,:.],:.] => return (u:=v)
+ cb is [["%LET",'Rep,v,:.],:.] => return (u:=v)
cb:=CDR cb
u
then $e:= augModemapsFromCategoryRep('_$,ab,cb,target,$e)
@@ -477,7 +477,7 @@ getInverseEnvironment(a,E) ==
E
unLet x ==
- x is ['LET,u,:.] => unLet u
+ x is ["%LET",u,:.] => unLet u
x
corrupted? u ==
@@ -1049,7 +1049,7 @@ doIt(item,$predl) ==
-------------------------------------
item is ['SEQ,:.] => doItSeq item
isDomainForm(item,$e) => doItDomain item
- item is ['LET,:.] => doItLet item
+ item is ["%LET",:.] => doItLet item
item is [":",a,t] => [.,.,$e]:=
markDeclaredImport markKillAll t
compOrCroak(item,$EmptyMode,$e)
@@ -1096,7 +1096,7 @@ doItIf(item is [.,p,x,y],$predl,$e) ==
nils:=[u,:nils]
else
gv := GENSYM()
- ans:=[['LET,gv,u],:ans]
+ ans:=[["%LET",gv,u],:ans]
nils:=[gv,:nils]
n:=n+1
@@ -1133,12 +1133,12 @@ doItLet item ==
res
doItLet1 item ==
- ['LET,lhs,rhs,:.] := item
+ ["%LET",lhs,rhs,:.] := item
not (compOrCroak(item,$EmptyMode,$e) is [code,.,$e]) =>
stackSemanticError(["cannot compile assigned value to",:bright lhs],nil)
qe(5,$e)
code := markKillAll code
- not (code is ['LET,lhs',rhs',:.] and atom lhs') =>
+ not (code is ["%LET",lhs',rhs',:.] and atom lhs') =>
code is ["PROGN",:.] =>
stackSemanticError(["multiple assignment ",item," not allowed"],nil)
wiReplaceNode(item, code, 24)
@@ -1162,14 +1162,14 @@ doItLet1 item ==
[[lhs,:SUBLIS($LocalDomainAlist,(get(lhs,'value,$e)).0)],:$LocalDomainAlist]
--+
qe(6,$e)
- code is ['LET,:.] =>
+ code is ["%LET",:.] =>
rhsCode:= rhs'
op := "setShellEntry"
wiReplaceNode(item,[op,'$,NRTgetLocalIndex lhs,rhsCode], 16)
wiReplaceNode(item, code, 18)
rhsOfLetIsDomainForm code ==
- code is ['LET,.,rhs',:.] =>
+ code is ["%LET",.,rhs',:.] =>
isDomainForm(rhs',$e) => rhs'
isDomainForm(rhs' := markKillAll rhs',$e) => rhs'
false