diff --git a/books/bookvol5.pamphlet b/books/bookvol5.pamphlet index 97338eb..2e98195 100644 --- a/books/bookvol5.pamphlet +++ b/books/bookvol5.pamphlet @@ -34563,6 +34563,34 @@ searchCurrentEnv(x,currentEnv) == \end{chunk} +\defun{ioclear}{ioclear} +The IO state manipulation routines assume that +\begin{itemize} +\item one I/O stream pair is in effect at any moment +\item there is a current line +\item there is a current token and a next token +\item there is a reduction stack +\end{itemize} +\calls{ioclear}{line-clear} +\calls{ioclear}{token-stack-clear} +\calls{ioclear}{reduce-stack-clear} +\uses{ioclear}{current-fragment} +\uses{ioclear}{current-line} +\usesdollar{ioclear}{boot} +\usesdollar{ioclear}{spad} +\begin{chunk}{defun ioclear} +(defun ioclear (&optional (in t) (out t)) + (declare (special current-fragment current-line $boot $spad)) + (setq current-fragment nil) + (line-clear current-line) + (token-stack-clear) + (reduce-stack-clear) + (if (or $boot $spad) (next-lines-clear)) + nil) + +\end{chunk} + + \defun{next-lines-clear}{Set boot-line-stack to nil} \uses{next-lines-clear}{boot-line-stack} \begin{chunk}{defun next-lines-clear} @@ -40174,6 +40202,7 @@ This needs to work off the internal exposure list, not the file. \getchunk{defun intloopSpadProcess,interp} \getchunk{defun intProcessSynonyms} \getchunk{defun intSayKeyedMsg} +\getchunk{defun ioclear} \getchunk{defun isDomainOrPackage} \getchunk{defun isgenvar} \getchunk{defun isInterpOnlyMap} diff --git a/books/bookvol9.pamphlet b/books/bookvol9.pamphlet index a2b27d4..12deab8 100644 --- a/books/bookvol9.pamphlet +++ b/books/bookvol9.pamphlet @@ -11951,7 +11951,6 @@ Again we find a lot of redundant work. We finally end up calling \calls{compileSpad2Cmd}{error} \calls{compileSpad2Cmd}{strconc} \calls{compileSpad2Cmd}{object2String} -\calls{compileSpad2Cmd}{oldParserAutoloadOnceTrigger} \calls{compileSpad2Cmd}{browserAutoloadOnceTrigger} \calls{compileSpad2Cmd}{spad2AsTranslatorAutoloadOnceTrigger} \calls{compileSpad2Cmd}{convertSpadToAsFile} @@ -12744,6 +12743,24 @@ And the {\bf s-process} function which returns a parsed version of the input. \end{chunk} +\defun{print-defun}{print-defun} +\calls{print-defun}{is-console} +\calls{print-defun}{print-full} +\uses{print-defun}{vmlisp::optionlist} +\usesdollar{print-defun}{PrettyPrint} +\begin{chunk}{defun print-defun} +(defun print-defun (name body) + (let* ((sp (assoc 'vmlisp::compiler-output-stream vmlisp::optionlist)) + (st (if sp (cdr sp) *standard-output*))) + (declare (special vmlisp::optionlist |$PrettyPrint|)) + (when (and (is-console st) (symbolp name) (fboundp name) + (not (compiled-function-p (symbol-function name)))) + (compile name)) + (when (or |$PrettyPrint| (not (is-console st))) + (print-full body st) (force-output st)))) + +\end{chunk} + \defun{def-rename}{def-rename} \calls{def-rename}{def-rename1} \begin{chunk}{defun def-rename} @@ -14642,6 +14659,7 @@ if \verb|$InteractiveMode| then use a null outputstream \getchunk{defun preparseReadLine} \getchunk{defun preparseReadLine1} \getchunk{defun primitiveType} +\getchunk{defun print-defun} \getchunk{defun push-reduction} \getchunk{defun quote-if-string} diff --git a/changelog b/changelog index fd519b0..16cfc90 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,9 @@ +20110228 tpd src/axiom-website/patches.html 20110228.01.tpd.patch +20110228 tpd src/interp/util.lisp treeshake compiler +20110228 tpd src/interp/parsing.lisp treeshake compiler +20110228 tpd src/interp/g-util.lisp treeshake compiler +20110228 tpd books/bookvol9 treeshake compiler +20110228 tpd books/bookvol5 treeshake compiler 20110227 tpd src/axiom-website/patches.html 20110227.01.tpd.patch 20110227 tpd src/interp/parsing.lisp treeshake compiler 20110227 tpd books/bookvol9 treeshake compiler diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html index 40f8d51..697f02e 100644 --- a/src/axiom-website/patches.html +++ b/src/axiom-website/patches.html @@ -3405,5 +3405,7 @@ books/bookvol9 treeshake compiler
books/bookvol9 treeshake compiler
20110227.01.tpd.patch books/bookvol9 treeshake compiler
+20110228.01.tpd.patch +books/bookvol9 treeshake compiler
diff --git a/src/interp/g-util.lisp.pamphlet b/src/interp/g-util.lisp.pamphlet index 2ef35cf..c9019be 100644 --- a/src/interp/g-util.lisp.pamphlet +++ b/src/interp/g-util.lisp.pamphlet @@ -1231,13 +1231,8 @@ (SPADLET |$sysHash| (MAKE-HASH-TABLE)) -;$htSystemCommands := '( -; (boot . development) clear display (fin . development) edit help -; frame history load quit read set show synonym system -; trace what ) - -(SPADLET |$htSystemCommands| - '((|boot| . |development|) |clear| |display| +(spadlet |$htSystemCommands| + '(|clear| |display| (|fin| . |development|) |edit| |help| |frame| |history| |load| |quit| |read| |set| |show| |synonym| |system| |trace| |what|)) diff --git a/src/interp/parsing.lisp.pamphlet b/src/interp/parsing.lisp.pamphlet index aa0e959..d2c254f 100644 --- a/src/interp/parsing.lisp.pamphlet +++ b/src/interp/parsing.lisp.pamphlet @@ -376,19 +376,10 @@ top \end{chunk} \section{Routines for inspecting and resetting total I/O system state} -The package largely assumes that: -\begin{itemize} -\item One I/O stream pair is in effect at any moment. -\item There is a Current Line -\item There is a Current Token and a Next Token -\item There is a Reduction Stack -\end{itemize} -This state may be examined and reset with the procedures IOSTAT and IOCLEAR. \begin{chunk}{*} (defun IOStat () "Tell me what the current state of the parsing world is." - ;(IOStreams-show) (if (line-past-end-p Current-Line) (format t "~&The current line is empty.~%") (progn @@ -396,21 +387,10 @@ This state may be examined and reset with the procedures IOSTAT and IOCLEAR. (Line-Print Current-Line))) (if (or $BOOT $SPAD) (next-lines-show)) (token-stack-show) - ;(reduce-stack-show) - nil) - -(defun IOClear (&optional (in t) (out t)) - ;(IOStreams-clear in out) - (setq Current-Fragment nil) - (Line-Clear Current-Line) - (token-stack-clear) - (reduce-stack-clear) - (if (or $BOOT $SPAD) (next-lines-clear)) nil) -;; auxiliary functions needed by the parser - \end{chunk} + bootlex \begin{chunk}{*} @@ -422,41 +402,14 @@ bootlex ; *** 1. BOOT file handling -(defmacro test (x &rest y) - `(progn - (setq spaderrorstream t) - (in-boot) - (initialize-preparse *terminal-io*) - (,(intern (strconc "PARSE-" x)) . ,y))) - -(defun |oldParserAutoloadOnceTrigger| () nil) - -(defun print-defun (name body) - (let* ((sp (assoc 'vmlisp::compiler-output-stream vmlisp::optionlist)) - (st (if sp (cdr sp) *standard-output*))) - (if (and (is-console st) (symbolp name) (fboundp name) - (not (compiled-function-p (symbol-function name)))) - (compile name)) - (when (or |$PrettyPrint| (not (is-console st))) - (print-full body st) (force-output st)))) - -(defun boot-parse-1 (in-stream - &aux - (Echo-Meta nil) - (current-fragment nil) - ($INDEX 0) - ($LineList nil) - ($EchoLineStack nil) - ($preparse-last-line nil) - ($BOOT T) - (*EOF* NIL) - (OPTIONLIST NIL)) - (declare (special echo-meta *comp370-apply* *EOF* File-Closed - $index $linelist $echolinestack $preparse-last-line)) - (init-boot/spad-reader) - (let* ((Boot-Line-Stack (PREPARSE in-stream)) - (parseout (prog2 (|PARSE-Expression|) (pop-stack-1)) ) ) - parseout)) +;(defmacro test (x &rest y) +; `(progn +; (setq spaderrorstream t) +; (in-boot) +; (initialize-preparse *terminal-io*) +; (,(intern (strconc "PARSE-" x)) . ,y))) + +;(defun |oldParserAutoloadOnceTrigger| () nil) ;; note that this is no longer called or used. Boot has been removed. (defun boot (&optional diff --git a/src/interp/util.lisp.pamphlet b/src/interp/util.lisp.pamphlet index 0763d33..b2496b4 100644 --- a/src/interp/util.lisp.pamphlet +++ b/src/interp/util.lisp.pamphlet @@ -477,7 +477,6 @@ developers who translate boot code to Common Lisp. ;;; loadparser ; |oldParserAutoloadOnceTrigger| ; |PARSE-Expression| -; boot-parse-1 ; BOOT ; SPAD ; init-boot/spad-reader))