diff --git a/books/bookvol9.pamphlet b/books/bookvol9.pamphlet index 9691716..a28087d 100644 --- a/books/bookvol9.pamphlet +++ b/books/bookvol9.pamphlet @@ -3276,14 +3276,6 @@ is [[+]] for Integers. '(- = * |rem| |mod| |quo| |div| / ** |exquo| + - < > <= >= ^= )) @ -\subsection{Character Syntax Table} -<>= -(defun specialcasesyntax () (or (and (char= tok '#\#) (digitp chr)))) - -(defun terminator (chr) - (member chr '(#\ #\( #\) #\. #\; #\, #\Return)) :test #'char=) - -@ \section{Giant steps, Baby steps} We will walk through the compiler with the EQ.spad example using a @@ -3973,8 +3965,7 @@ The READLOOP calls preparseReadLine which returns a pair of the form ) (prog (($linelist linelist) $echolinestack num line i l psloc instring pcount comsym strsym oparsym cparsym n ncomsym - (sloc -1) (continue nil) (parenlev 0) (ncomblock ()) - (lines ()) (locs ()) (nums ()) functor) + (sloc -1) continue (parenlev 0) ncomblock locs nums functor) (declare (special $linelist $echolinestack |$byConstructors| $skipme |$constructorsSeen| $preparse-last-line)) READLOOP @@ -9904,6 +9895,60 @@ nothing (see boot2Lisp) yet still allow function call (lisp2BootAndComp). @ +\defplist{elt}{def-elt} +<>= +(eval-when (eval load) + (setf (get 'elt 'def-tran) 'def-elt)) + +@ + +\defun{def-elt}{def-elt} +<>= +(defun def-elt (args) + (let ((expr (car args)) (sel (cadr args)) y) + (if (and (symbolp sel) (setq y (get sel 'sel\,function))) + (if (integerp y) + (list 'elt expr y) + (list y expr)) + (list 'elt expr sel)))) + +@ + +\defplist{isnt}{def-isnt} +<>= +(eval-when (eval load) + (setf (get '|isnt| 'def-tran) 'def-isnt)) + +@ + +\defun{def-isnt}{def-isnt} +\calls{def-isnt}{deftran} +<>= +(defun def-isnt (x) + (deftran (list 'null (cons 'is x)))) + +@ + +\defplist{setelt}{def-setelt} +<>= +(eval-when (eval load) + (setf (get 'setelt 'def-tran) 'def-setelt)) + +@ + +\defun{def-setelt}{def-setelt} +<>= +(defun def-setelt (args) + (let ((var (first args)) (sel (second args)) (expr (third args))) + (let ((y (and (symbolp sel) (get sel 'sel\,function)))) + (if y + (if (integerp y) + (list 'setelt var y expr) + (list 'rplac (list y var) expr)) + (list 'setelt var sel expr))))) + +@ + \chapter{PARSE forms} \section{The original meta specification} This package provides routines to support the Metalanguage @@ -15027,6 +15072,7 @@ if \verb|$InteractiveMode| then use a null outputstream <> <> <> +<> <> <> <> @@ -15035,6 +15081,7 @@ if \verb|$InteractiveMode| then use a null outputstream <> <> <> +<> <> <> <> @@ -15051,6 +15098,7 @@ if \verb|$InteractiveMode| then use a null outputstream <> <> <> +<> <> <> <> diff --git a/changelog b/changelog index 99f7cb7..f1651e2 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,8 @@ +20101220 tpd src/axiom-website/patches.html 20101220.01.tpd.patch +20101220 tpd src/interp/vmlisp.lisp treeshake compiler +20101220 tpd src/interp/parsing.lisp treeshake compiler +20101220 tpd src/interp/interp-proclaims.lisp treeshake compiler +20101220 tpd books/bookvol9 treeshake compiler 20101219 tpd src/axiom-website/patches.html 20101219.02.tpd.patch 20101219 tpd src/interp/vmlisp.lisp cleaning 20101219 tpd src/interp/parsing.lisp cleaning vmlisp diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html index 7c6050e..a5d8cf1 100644 --- a/src/axiom-website/patches.html +++ b/src/axiom-website/patches.html @@ -3327,5 +3327,7 @@ src/interp/vmlisp.lisp cleaning vmlisp
src/interp/vmlisp.lisp cleaning vmlisp
20101219.02.tpd.patch src/interp/vmlisp.lisp cleaning vmlisp
+20101220.01.tpd.patch +books/bookvol9 treeshake compiler
diff --git a/src/interp/interp-proclaims.lisp b/src/interp/interp-proclaims.lisp index ba86973..b83fbc8 100644 --- a/src/interp/interp-proclaims.lisp +++ b/src/interp/interp-proclaims.lisp @@ -1878,7 +1878,7 @@ BOOT::|npConditional| BOOT::|stackMessageIfNone| BOOT::PREPARSEREADLINE BOOT::|npElse| BOOT::|translateYesNoToTrueFalse| BOOT::|npMissing| - BOOT::PREPARSEREADLINE1 BOOT::|npDDInfKey| VMLISP:RPACKFILE + BOOT::|npDDInfKey| VMLISP:RPACKFILE BOOT::SKIP-IFBLOCK BOOT::|tokPart| BOOT::|npInfKey| VMLISP:RECOMPILE-LIB-FILE-IF-NECESSARY BOOT::|npWith| BOOT::|optimizeFunctionDef| BOOT::PREPARSE-ECHO diff --git a/src/interp/parsing.lisp.pamphlet b/src/interp/parsing.lisp.pamphlet index 5c4372c..6adfa66 100644 --- a/src/interp/parsing.lisp.pamphlet +++ b/src/interp/parsing.lisp.pamphlet @@ -1094,8 +1094,6 @@ foo defined inside of fum gets renamed as fum,foo.") (defun LET_ERROR (FORM VAL) (|systemError| (format nil "~S is not matched by structure ~S~%" FORM VAL))) -(defun DEF-ISNT (X) (DEFTRAN (LIST 'NULL (CONS 'IS X)))) - (defun IS-GENSYM () (if (NOT (CDR $IS-GENSYMLIST)) (RPLACD $IS-GENSYMLIST (LIST (GENSYM)))) (pop $IS-GENSYMLIST)) @@ -1134,30 +1132,6 @@ foo defined inside of fum gets renamed as fum,foo.") (|source| CDR) (|target| CAR) (|first| CAR) (|rest| CDR))) -(defun DEF-ELT (args) - (let ((EXPR (car args)) (SEL (cadr args))) - (let (Y) - (COND ((and (symbolp sel) (setq Y (GET SEL 'SEL\,FUNCTION))) - (COND ((integerp Y) (LIST 'ELT EXPR Y)) - ((LIST Y EXPR)))) - ((LIST 'ELT EXPR SEL)))))) - -(defun DEF-SETELT (args) - (let ((VAR (first args)) (SEL (second args)) (EXPR (third args))) - (let ((y (and (symbolp sel) (get sel 'sel\,function)))) - (COND (y (COND ((integerp Y) (LIST 'SETELT VAR Y EXPR)) - ((LIST 'RPLAC (LIST Y VAR) EXPR)))) - ((LIST 'SETELT VAR SEL EXPR)))))) - -(defun DEF-CATEGORY (L) - (let (siglist atlist) - (mapcar #'(lambda (x) (if (EQCAR (KADR X) 'Signature) - (PUSH X SIGLIST) - (PUSH X ATLIST))) - L) - (LIST 'CATEGORY (MKQ (NREVERSE SIGLIST)) (MKQ (NREVERSE ATLIST))))) - - (defvar |$new2OldRenameAssoc| '((\QUAD . \.) (\' . QUOTE) (|nil| . NIL) (|append| . APPEND) (|union| . UNION) (|cons| . CONS))) diff --git a/src/interp/vmlisp.lisp.pamphlet b/src/interp/vmlisp.lisp.pamphlet index bb41b92..f33a73b 100644 --- a/src/interp/vmlisp.lisp.pamphlet +++ b/src/interp/vmlisp.lisp.pamphlet @@ -6254,8 +6254,8 @@ o there is some code at the end of SPECEVAL BOOT that puts "up" (REPEAT (IN X '( (|:| |DEF-:|) (|::| |DEF-::|) - (ELT DEF-ELT) - (SETELT DEF-SETELT) +; (ELT DEF-ELT) +; (SETELT DEF-SETELT) (LET DEF-LET) (COLLECT DEF-COLLECT) (LESSP DEF-LESSP)