diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 8 | ||||
-rw-r--r-- | src/boot/initial-env.lisp | 3 | ||||
-rw-r--r-- | src/boot/scanner.boot | 8 | ||||
-rw-r--r-- | src/boot/strap/tokens.clisp | 17 | ||||
-rw-r--r-- | src/boot/tokens.boot | 28 |
5 files changed, 37 insertions, 27 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 2f25113c..220def3d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2010-12-18 Gabriel Dos Reis <gdr@cs.tamu.edu> + + * boot/initial-env.lisp (VEC-SETELT): Remove. + * boot/scanner.boot (shoeIntValue): Tidy. + (shoeSubString): Likewise. + * boot/tokens.boot (shoeInsert): Likewise. + (shoeDictCons): Likewise. + 2010-12-15 Gabriel Dos Reis <gdr@cs.tamu.edu> * interp/format.boot (form2String1): Handle string literals diff --git a/src/boot/initial-env.lisp b/src/boot/initial-env.lisp index d72041f2..df85b398 100644 --- a/src/boot/initial-env.lisp +++ b/src/boot/initial-env.lisp @@ -184,9 +184,6 @@ :test-not #'(lambda (x y) (position y x)) :start sint))) -(defun VEC-SETELT (vec ind val) - (setf (elt vec ind) val)) - (defun bvec-make-full (n x) (make-array (list n) :element-type 'bit diff --git a/src/boot/scanner.boot b/src/boot/scanner.boot index 03db838b..748fbe0b 100644 --- a/src/boot/scanner.boot +++ b/src/boot/scanner.boot @@ -404,7 +404,7 @@ shoeIntValue(s) == ns := #s ival := 0 for i in 0..ns-1 repeat - d := shoeOrdToNum ELT(s,i) + d := shoeOrdToNum s.i ival := 10*ival + d ival @@ -471,18 +471,18 @@ shoeMatch(l,i) == shoeSubStringMatch (l,d,i)== h := QENUM(l, i) - u := ELT(d,h) + u := d.h ll := SIZE l done := false s1 := '"" for j in 0.. SIZE u - 1 while not done repeat - s := ELT(u,j) + s := u.j ls := SIZE s done := ls+i > ll => false eql := true for k in 1..ls-1 while eql repeat - eql := EQL(QENUM(s,k),QENUM(l,k+i)) + eql := QENUM(s,k) = QENUM(l,k+i) eql => s1:=s true diff --git a/src/boot/strap/tokens.clisp b/src/boot/strap/tokens.clisp index de719a77..04f5b124 100644 --- a/src/boot/strap/tokens.clisp +++ b/src/boot/strap/tokens.clisp @@ -89,16 +89,16 @@ (LOOP (COND ((> |i| |bfVar#2|) (RETURN NIL)) - (T (VEC-SETELT |v| |i| (ELT |u| |i|)))) + (T (SETF (ELT |v| |i|) (ELT |u| |i|)))) (SETQ |i| (+ |i| 1)))) - (VEC-SETELT |v| |k| |s|) + (SETF (ELT |v| |k|) |s|) (LET ((|bfVar#3| (- |n| 1)) (|i| |k|)) (LOOP (COND ((> |i| |bfVar#3|) (RETURN NIL)) - (T (VEC-SETELT |v| (+ |i| 1) (ELT |u| |i|)))) + (T (SETF (ELT |v| (+ |i| 1)) (ELT |u| |i|)))) (SETQ |i| (+ |i| 1)))) - (VEC-SETELT |d| |h| |v|) + (SETF (ELT |d| |h|) |v|) |s|)))) (DEFUN |shoeDictCons| () @@ -110,12 +110,12 @@ (PROGN (SETQ |a| (MAKE-VEC 256)) (SETQ |b| (MAKE-VEC 1)) - (VEC-SETELT |b| 0 (MAKE-CVEC 0)) + (SETF (ELT |b| 0) (MAKE-CVEC 0)) (LET ((|i| 0)) (LOOP (COND ((> |i| 255) (RETURN NIL)) - (T (VEC-SETELT |a| |i| |b|))) + (T (SETF (ELT |a| |i|) |b|))) (SETQ |i| (+ |i| 1)))) |a|)) (LET ((|bfVar#4| |l|) (|s| NIL)) @@ -234,8 +234,9 @@ (LIST '|strconc| 'CONCAT) (LIST '|string?| 'STRINGP) (LIST '|substitute| 'SUBST) (LIST '|substitute!| 'NSUBST) - (LIST '|symbol?| 'SYMBOLP) (LIST '|take| 'TAKE) - (LIST '|third| 'CADDR) + (LIST '|symbol?| 'SYMBOLP) + (LIST '|symbolName| 'SYMBOL-NAME) + (LIST '|take| 'TAKE) (LIST '|third| 'CADDR) (LIST '|toString| 'WRITE-TO-STRING) (LIST '|true| 'T) (LIST '|upperCase?| 'UPPER-CASE-P) (LIST '|vector?| 'SIMPLE-VECTOR-P) diff --git a/src/boot/tokens.boot b/src/boot/tokens.boot index 789a2002..9103d5e9 100644 --- a/src/boot/tokens.boot +++ b/src/boot/tokens.boot @@ -140,27 +140,31 @@ shoeTAB == 9 shoeInsert(s,d) == l := #s h := QENUM(s,0) - u := ELT(d,h) + u := d.h n := #u k:=0 - while l <= #(ELT(u,k)) repeat + while l <= #u.k repeat k:=k+1 v := MAKE_-VEC(n+1) - for i in 0..k-1 repeat VEC_-SETELT(v,i,ELT(u,i)) - VEC_-SETELT(v,k,s) - for i in k..n-1 repeat VEC_-SETELT(v,i+1,ELT(u,i)) - VEC_-SETELT(d,h,v) + for i in 0..k-1 repeat + v.i := u.i + v.k := s + for i in k..n-1 repeat + v.(i+1) := u.i + d.h := v s shoeDictCons()== - l:= HKEYS shoeKeyTable + l := HKEYS shoeKeyTable d := - a:=MAKE_-VEC(256) - b:=MAKE_-VEC(1) - VEC_-SETELT(b,0,MAKE_-CVEC 0) - for i in 0..255 repeat VEC_-SETELT(a,i,b) + a := MAKE_-VEC(256) + b := MAKE_-VEC(1) + b.0 := MAKE_-CVEC 0 + for i in 0..255 repeat + a.i := b a - for s in l repeat shoeInsert(s,d) + for s in l repeat + shoeInsert(s,d) d shoeDict:=shoeDictCons() |