diff options
Diffstat (limited to 'src/interp')
-rw-r--r-- | src/interp/cattable.boot | 3 | ||||
-rw-r--r-- | src/interp/lisplib.boot | 16 | ||||
-rw-r--r-- | src/interp/parse.boot | 22 | ||||
-rw-r--r-- | src/interp/postpar.boot | 13 |
4 files changed, 19 insertions, 35 deletions
diff --git a/src/interp/cattable.boot b/src/interp/cattable.boot index 74faac7c..a25c91b5 100644 --- a/src/interp/cattable.boot +++ b/src/interp/cattable.boot @@ -384,8 +384,7 @@ categoryParts(conform,category,:options) == main where res := applySubst(pairList(tvl,$FormalMapVariableList),res) res build(item,pred) == - item is ['SIGNATURE,op,sig,:.] => $oplist := [[opOf op,sig,:pred],:$oplist] - --note: opOf is needed!!! Bug in compiler puts in (One) and (Zero) + item is ['SIGNATURE,op,sig,:.] => $oplist := [[op,sig,:pred],:$oplist] item is ['ATTRIBUTE,attr] => constructor? opOf attr => $conslist := [[attr,:pred],:$conslist] diff --git a/src/interp/lisplib.boot b/src/interp/lisplib.boot index c23056a0..c7d3bfdb 100644 --- a/src/interp/lisplib.boot +++ b/src/interp/lisplib.boot @@ -526,7 +526,7 @@ finalizeLisplib(ctor,libName) == mm := getConstructorModemap ctor writeConstructorForm(ctor,form,$libFile) writeKind(ctor,kind,$libFile) - writeConstructorModemap(ctor,removeZeroOne mm,$libFile) + writeConstructorModemap(ctor,mm,$libFile) writeDualSignature(db,$libFile) $lisplibCategory := $lisplibCategory or mm.mmTarget -- set to target of mm for package/domain constructors; @@ -534,22 +534,22 @@ finalizeLisplib(ctor,libName) == if dbConstructorKind db = 'category then writeCategory(ctor,$lisplibCategory,$libFile) lisplibWrite('"sourceFile",namestring _/EDITFILE,$libFile) - lisplibWrite('"modemaps",removeZeroOne $lisplibModemapAlist,$libFile) + lisplibWrite('"modemaps",$lisplibModemapAlist,$libFile) opsAndAtts := getConstructorOpsAndAtts(form,kind,mm) - writeOperations(ctor,removeZeroOne first opsAndAtts,$libFile) + writeOperations(ctor,first opsAndAtts,$libFile) if kind='category then $pairlis : local := pairList(form,$FormalMapVariableList) $NRTslot1PredicateList : local := [] NRTgenInitialAttributeAlist(db,rest opsAndAtts) writeSuperDomain(ctor,dbSuperDomain db,$libFile) lisplibWrite('"signaturesAndLocals", - removeZeroOne mergeSignatureAndLocalVarAlists($lisplibSignatureAlist, + mergeSignatureAndLocalVarAlists($lisplibSignatureAlist, $lisplibVariableAlist),$libFile) - writeAttributes(ctor,removeZeroOne dbAttributes db,$libFile) - writePredicates(ctor,removeZeroOne $lisplibPredicates,$libFile) + writeAttributes(ctor,dbAttributes db,$libFile) + writePredicates(ctor,$lisplibPredicates,$libFile) writeAbbreviation(db,$libFile) - writePrincipals(ctor,removeZeroOne dbPrincipals db,$libFile) - writeAncestors(ctor,removeZeroOne dbAncestors db,$libFile) + writePrincipals(ctor,dbPrincipals db,$libFile) + writeAncestors(ctor,dbAncestors db,$libFile) if not $bootStrapMode then lisplibWrite('"documentation",finalizeDocumentation ctor,$libFile) if $profileCompiler then profileWrite() diff --git a/src/interp/parse.boot b/src/interp/parse.boot index c6e4bbe2..158e2dbf 100644 --- a/src/interp/parse.boot +++ b/src/interp/parse.boot @@ -378,28 +378,6 @@ transSeq l == (y:= transSeq tail) is ["SEQ",:s] => ["SEQ",item,:s] ["SEQ",item,["exit",1,incExitLevel y]] -transCategoryItem: %ParseForm -> %Form -transCategoryItem x == - x is ["SIGNATURE",lhs,rhs] => - lhs is ["LISTOF",:y] => - "append" /[transCategoryItem ["SIGNATURE",z,rhs] for z in y] - lhs isnt [.,:.] => - lhs := washOperatorName lhs - rhs is ["Mapping",:m] => - m is [.,"constant"] => [["SIGNATURE",lhs,[first m],"constant"]] - [["SIGNATURE",lhs,m]] - $transCategoryAssoc:= [[lhs,:rhs],:$transCategoryAssoc] - postError ['" Invalid signature: ",x] - [op,:argl]:= lhs - extra := nil - if rhs is ["Mapping",:m] then - if rest m then extra:= rest m - --should only be 'constant' or 'variable' - rhs:= first m - [["SIGNATURE",op,[rhs,:applySubst($transCategoryAssoc,argl)],:extra]] - [x] - - superSub: (%Symbol, %List %Form ) -> %Form superSub(name,x) == for u in x repeat y:= [:y,:u] diff --git a/src/interp/postpar.boot b/src/interp/postpar.boot index 07619132..17a89fe8 100644 --- a/src/interp/postpar.boot +++ b/src/interp/postpar.boot @@ -421,11 +421,18 @@ postSequence t == postSignature: %ParseTree -> %ParseForm postSignature t == t isnt ["%Signature",op,sig] => systemErrorHere ["postSignature",t] + op := + op is 0 => 'Zero + op is 1 => 'One + postAtom + string? op => + stackWarning('"String syntax for %1b in signature is deprecated.",[op]) + makeSymbol op + op sig is ["->",:.] => - sig1:= postType sig - op:= postAtom (string? op => makeSymbol op; op) + sig1 := postType sig ["SIGNATURE",op,:removeSuperfluousMapping killColons sig1] - ["SIGNATURE",postAtom op,:postType ["->","constant",sig]] + ["SIGNATURE",op,:postType ["->","constant",sig]] killColons: %ParseTree -> %ParseForm killColons x == |