aboutsummaryrefslogtreecommitdiff
path: root/src/boot
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2009-09-25 20:48:45 +0000
committerdos-reis <gdr@axiomatics.org>2009-09-25 20:48:45 +0000
commit489cfd14dccfcaf7b0ebd41e9d0f8e081a9d1d9f (patch)
tree84a87ab3bdba58fe9fd2975efc829d1ed10b8781 /src/boot
parent7704713134cb251be6129f38833930228e09eee2 (diff)
downloadopen-axiom-489cfd14dccfcaf7b0ebd41e9d0f8e081a9d1d9f.tar.gz
* boot/ast.boot (bfMember): Improve a bit.
* boot/tokens.boot: Don't rename 'is' and 'inst'. * boot/parser.boot: Use 'in' instead of 'MEMQ' where approrpriate. * interp/: Likewise.
Diffstat (limited to 'src/boot')
-rw-r--r--src/boot/ast.boot3
-rw-r--r--src/boot/parser.boot4
-rw-r--r--src/boot/strap/ast.clisp5
-rw-r--r--src/boot/strap/tokens.clisp12
-rw-r--r--src/boot/tokens.boot3
5 files changed, 15 insertions, 12 deletions
diff --git a/src/boot/ast.boot b/src/boot/ast.boot
index 195ec126..e4501f1b 100644
--- a/src/boot/ast.boot
+++ b/src/boot/ast.boot
@@ -689,6 +689,7 @@ bfMember(var,seq) ==
["MEMQ",var,seq]
var is ["QUOTE",var'] and SYMBOLP var' =>
["MEMQ",var,seq]
+ var is ["char",.] => ["MEMBER",var,seq,KEYWORD::TEST,"EQL"]
["MEMBER",var,seq]
bfInfApplication(op,left,right)==
@@ -918,7 +919,7 @@ shoeCompTran1 x==
MEMQ(second l,$fluidVars)=>$fluidVars
cons(second l,$fluidVars)
RPLACA (rest x,second l)
- MEMQ(U,'(PROG LAMBDA))=>
+ U in '(PROG LAMBDA) =>
newbindings:=nil
for y in second x repeat
not MEMQ(y,$locVars)=>
diff --git a/src/boot/parser.boot b/src/boot/parser.boot
index 036f6375..fbe8724c 100644
--- a/src/boot/parser.boot
+++ b/src/boot/parser.boot
@@ -370,7 +370,7 @@ bpName() ==
++ QUOTE S-Expression
++ STRING
bpConstTok() ==
- MEMQ(shoeTokType $stok, '(INTEGER FLOAT)) =>
+ shoeTokType $stok in '(INTEGER FLOAT) =>
bpPush $ttok
bpNext()
$stok is ["LISP",:.] => bpPush %Lisp $ttok and bpNext()
@@ -530,7 +530,7 @@ bpAnyId()==
bpEqKey "MINUS" and ($stok is ["INTEGER",:.] or bpTrap()) and
bpPush MINUS $ttok and bpNext() or
bpSexpKey() or
- MEMQ(shoeTokType $stok, '(ID INTEGER STRING FLOAT))
+ shoeTokType $stok in '(ID INTEGER STRING FLOAT)
and bpPush $ttok and bpNext()
bpSexp()==
diff --git a/src/boot/strap/ast.clisp b/src/boot/strap/ast.clisp
index f4633457..e60ca665 100644
--- a/src/boot/strap/ast.clisp
+++ b/src/boot/strap/ast.clisp
@@ -1098,6 +1098,11 @@
(PROGN (SETQ |var'| (CAR |ISTMP#1|)) T)))
(SYMBOLP |var'|))
(LIST 'MEMQ |var| |seq|))
+ ((AND (CONSP |var|) (EQ (CAR |var|) '|char|)
+ (PROGN
+ (SETQ |ISTMP#1| (CDR |var|))
+ (AND (CONSP |ISTMP#1|) (NULL (CDR |ISTMP#1|)))))
+ (LIST 'MEMBER |var| |seq| :TEST 'EQL))
(T (LIST 'MEMBER |var| |seq|))))))
(DEFUN |bfInfApplication| (|op| |left| |right|)
diff --git a/src/boot/strap/tokens.clisp b/src/boot/strap/tokens.clisp
index 6cec8254..da929d44 100644
--- a/src/boot/strap/tokens.clisp
+++ b/src/boot/strap/tokens.clisp
@@ -206,11 +206,11 @@
(LIST '|exit| 'EXIT) (LIST '|false| 'NIL)
(LIST '|first| 'CAR) (LIST '|fourth| 'CADDDR)
(LIST '|function| 'FUNCTION)
- (LIST '|genvar| 'GENVAR) (LIST '|is| 'IS)
- (LIST '|isnt| 'ISNT) (LIST '|lastNode| 'LAST)
- (LIST 'LAST '|last|) (LIST '|list| 'LIST)
- (LIST '|mkpf| 'MKPF) (LIST '|nconc| 'NCONC)
- (LIST '|nil| NIL) (LIST '|not| 'NOT)
+ (LIST '|genvar| 'GENVAR)
+ (LIST '|lastNode| 'LAST) (LIST 'LAST '|last|)
+ (LIST '|list| 'LIST) (LIST '|mkpf| 'MKPF)
+ (LIST '|nconc| 'NCONC) (LIST '|nil| NIL)
+ (LIST '|not| 'NOT)
(LIST '|nreverse| 'NREVERSE)
(LIST '|null| 'NULL) (LIST '|or| 'OR)
(LIST '|otherwise| 'T) (LIST 'PAIRP 'CONSP)
@@ -220,7 +220,7 @@
(LIST '|setDifference| 'SETDIFFERENCE)
(LIST '|setIntersection| 'INTERSECTION)
(LIST '|setPart| 'SETELT)
- (LIST '|setUnion| 'UNION) (LIST '|size| 'SIZE)
+ (LIST '|setUnion| 'UNION)
(LIST '|strconc| 'CONCAT)
(LIST '|substitute| 'SUBST)
(LIST '|take| 'TAKE) (LIST '|third| 'CADDR)
diff --git a/src/boot/tokens.boot b/src/boot/tokens.boot
index ca8c33e7..c5990f0e 100644
--- a/src/boot/tokens.boot
+++ b/src/boot/tokens.boot
@@ -248,8 +248,6 @@ for i in [ _
["fourth", "CADDDR"] , _
["function","FUNCTION"] , _
["genvar", "GENVAR"] , _
- ["is", "IS"] , _
- ["isnt", "ISNT"] , _
["lastNode", "LAST"] , _
["LAST", "last"] , _
["list", "LIST"] , _
@@ -270,7 +268,6 @@ for i in [ _
["setIntersection", "INTERSECTION"] , _
["setPart", "SETELT"] , _
["setUnion", "UNION"] , _
- ["size", "SIZE"] , _
["strconc", "CONCAT"] , _
["substitute", "SUBST"] , _
["take", "TAKE"] ,