Some global variables and a few routines have been collected, documented, and added to bookvol5 ======================================================================= diff --git a/books/bookvol5.pamphlet b/books/bookvol5.pamphlet index ed8f089..ec72c99 100644 --- a/books/bookvol5.pamphlet +++ b/books/bookvol5.pamphlet @@ -496,6 +496,11 @@ information is initialized. '|EndOfSpad|)) @ +\defdollar{quitTag} +<<initvars>>= +(defvar |$quitTag| system::*quit-tag*) + +@ \defun{runspad}{runspad} <<defun runspad>>= (defun |runspad| () @@ -516,12 +521,58 @@ information is initialized. (setq mode (catch '|top_level| (|ncTopLevel|)))))))))))))) @ +\defun{resetStackLimits}{Reset the stack limits} +<<defun resetStackLimits>>= +(defun |resetStackLimits| () + "Reset the stack limits" + (system:reset-stack-limits)) + +@ \chapter{Handling Input} -\defun{ncTopLevel}{ncTopLevel} +\section{Streams} +\defvar{curinstream} +The curinstream variable is set to the value of the +\verb|*standard-input*| common lisp +variable in ncIntLoop. While not using the +``dollar'' convention this variable is still ``global''. +<<initvars>>= +(defvar curinstream (make-synonym-stream '*standard-input*)) + +@ +\defvar{curoutstream} +The curoutstream variable is set to the value of the +\verb|*standard-output*| common lisp variable in ncIntLoop. +While not using the ``dollar'' convention this variable is still ``global''. +<<initvars>>= +(defvar curoutstream (make-synonym-stream '*standard-output*)) + +@ +\defvar{errorinstream} +<<initvars>>= +(defvar errorinstream (make-synonym-stream '*terminal-io*)) + +@ +\defvar{erroroutstream} +<<initvars>>= +(defvar erroroutstream (make-synonym-stream '*terminal-io*)) + +@ +\defvar{*eof*} +<<initvars>>= +(defvar *eof* nil) + +@ +\defdollar{InteractiveMode} +<<initvars>>= +(defvar |$InteractiveMode| t) + +@ +\defunsec{ncTopLevel}{Top-level read-parse-eval-print loop} Top-level read-parse-eval-print loop for the interpreter. Uses the Bill Burge's parser. <<defun ncTopLevel>>= (defun |ncTopLevel| () + "Top-level read-parse-eval-print loop" (let (|$e| $spad $newspad $boot |$InteractiveMode| *eof* in-stream) (declare (special |$e| $spad $newspad $boot |$InteractiveMode| *eof* in-stream |$InteractiveFrame|)) @@ -17200,7 +17251,6 @@ $directory-list |$inclAssertions| |$InitialModemapFrame|)) in-stream -|$InteractiveMode| |$InteractiveFrame| |$internalHistoryTable| |$interpreterFrameName| @@ -17724,6 +17774,7 @@ stringimage <<defun resetCounters>> <<defun resetInCoreHist>> <<defun resetSpacers>> +<<defun resetStackLimits>> <<defun resetTimers>> <<defun resetWorkspaceVariables>> <<defun restart>> @@ -17941,7 +17992,6 @@ curoutstream & ncIntLoop & \\ & undo & recordFrame \\ & undoSteps & undoSteps \\ & & reportUndo \\ -\$InteractiveMode & ncTopLevel & \\ \$internalHistoryTable & initvars & \\ \$interpreterFrameName & initializeInterpreterFrameRing & \\ \$interpreterFrameRing & initializeInterpreterFrameRing & \\ @@ -18002,17 +18052,6 @@ The \verb|$boot| variable is set to NIL in ncTopLevel. The coerceFailure symbol is a catch tag used in runspad to catch an exit from ncTopLevel. -\subsection{curinstream} -The curinstream variable is set to the value of the -\verb|*standard-input*| common lisp -variable in ncIntLoop. While not using the -``dollar'' convention this variable is still ``global''. - -\subsection{curinstream} -The curoutstream variable is set to the value of the -\verb|*standard-output*| common lisp variable in ncIntLoop. -While not using the ``dollar'' convention this variable is still ``global''. - \subsection{\$current-directory} This is set to the value returned by the \verb|get-current-directory| function in \fnref{restart}. It is set to the argument of the @@ -18169,9 +18208,6 @@ The \verb|$InteractiveFrame| is set in restart to the value of the call to the makeInitialModemapFrame function. This function simply returns a copy of the variable \verb|$InitialModemapFrame| -\subsection{\$InteractiveMode} -The \verb|$InteractiveMode| is set to T in ncTopLevel. - \subsection{\$intRestart} The \verb|$intRestart| variable is used in intloop but has no value. This is probably a bug. While the variable's value is unchanged the diff --git a/changelog b/changelog index 11f8639..a57f6df 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,16 @@ +20090416 tpd src/axiom-website/patches.html 20090416.02.tpd.patch +20090416 tpd src/interp/vmlisp.lisp move more interpreter code +20090416 tpd src/interp/spaderror.lisp move more interpreter code +20090416 tpd src/interp/spad.lisp move more interpreter code +20090416 tpd src/interp/setq.lisp move more interpreter code +20090416 tpd books/bookvol5 collect more interpreter to code +20090416 tpd src/axiom-website/patches.html 20090416.01.tpd.patch +20090416 tpd src/input/overload.input fix test numbering +20090416 tpd src/input/contfrac.input fix test numbering +20090416 tpd books/bookvol5 fix test numbering +20090416 tpd books/bookvol10.4 fix test numbering +20090416 tpd books/bookvol10.3 fix test numbering +20090416 tpd src/interp/regress.lisp tighten checks on regression tests 20090415 tpd src/axiom-website/patches.html 20090415.01.tpd.patch 20090415 tpd src/input/r20bugs.input fixup bezier 20090415 tpd src/input/cmds.input fixup bezier diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html index 4b6e6b4..6f83681 100644 --- a/src/axiom-website/patches.html +++ b/src/axiom-website/patches.html @@ -1090,5 +1090,7 @@ bookvol10.4 add Bezier package<br/> bookvol5 add \defunsec, section titles, docstrings<br/> <a href="patches/20090416.01.tpd.patch">20090416.01.tpd.patch</a> regress.lisp tighten checks on regression tests<br/> +<a href="patches/20090416.02.tpd.patch">20090416.02.tpd.patch</a> +bookvol5 move more interpreter code<br/> </body> </html> diff --git a/src/interp/setq.lisp.pamphlet b/src/interp/setq.lisp.pamphlet index cb5d56f..86bf635 100644 --- a/src/interp/setq.lisp.pamphlet +++ b/src/interp/setq.lisp.pamphlet @@ -46,13 +46,6 @@ <<*>>= <<license>> -(setq copyrights '( - "Copyright The Numerical Algorithms Group Limited 1991-94." - "All rights reserved" - "Certain derivative-work portions Copyright (C) 1998 by Leslie Lamport." - "Portions (c) Copyright Taiichi Yuasa and Masami Hagiya, 1984." - "All rights reserved")) - (in-package "BOOT") (SETQ |/MAJOR-VERSION| 7) @@ -135,7 +128,6 @@ (SETQ INITCOLUMN 0) (SETQ |$functionTable| NIL) (SETQ |$spaddefs| NIL) -(SETQ |$InteractiveMode| T) (SETQ |$xeditIsConsole| NIL) (SETQ |$echoInputLines| NIL) ;; This is in SETVART also (SETQ |$Slot1DataBase| (MAKE-HASHTABLE 'ID)) ;; See NRUNTIME BOOT diff --git a/src/interp/spad.lisp.pamphlet b/src/interp/spad.lisp.pamphlet index cfc828f..717a70a 100644 --- a/src/interp/spad.lisp.pamphlet +++ b/src/interp/spad.lisp.pamphlet @@ -123,7 +123,6 @@ (defvar xtrans '|boot-new|) (defvar |$IOAlist| '((|%i| . (|gauss| 0 1)))) (setq |$useBFasDefault| T) -(defvar |InteractiveMode|) (defvar |New-LEXPR|) (defvar |NewFLAG| t) (defvar |uc| 'UC) diff --git a/src/interp/spaderror.lisp.pamphlet b/src/interp/spaderror.lisp.pamphlet index 3db7dcd..8d76741 100644 --- a/src/interp/spaderror.lisp.pamphlet +++ b/src/interp/spaderror.lisp.pamphlet @@ -56,15 +56,6 @@ ;;(defmacro |trappedSpadEval| (form) form) ;;nop for now -#+:akcl -(setq |$quitTag| system::*quit-tag*) -#+:akcl -(defun |resetStackLimits| () (system:reset-stack-limits)) -#-:akcl -(setq |$quitTag| (gensym)) -#-:akcl -(defun |resetStackLimits| () nil) - ;; failed union branch -- value returned for numeric failure (setq |$numericFailure| (cons 1 "failed")) diff --git a/src/interp/vmlisp.lisp.pamphlet b/src/interp/vmlisp.lisp.pamphlet index 0b998a3..ccd83f2 100644 --- a/src/interp/vmlisp.lisp.pamphlet +++ b/src/interp/vmlisp.lisp.pamphlet @@ -198,17 +198,9 @@ the calculation by repeated divisions using the radix itself. ;; DEFVARS -(defvar *comp370-apply* nil "function (name def) for comp370 to apply") - -(defvar curinstream (make-synonym-stream '*standard-input*)) - -(defvar curoutstream (make-synonym-stream '*standard-output*)) - (defvar *embedded-functions* nil) -(defvar errorinstream (make-synonym-stream '*terminal-io*)) - -(defvar erroroutstream (make-synonym-stream '*terminal-io*)) +(defvar *comp370-apply* nil "function (name def) for comp370 to apply") (defvar *fileactq-apply* nil "function to apply in fileactq")
_______________________________________________ Axiom-developer mailing list Axiom-developer@nongnu.org http://lists.nongnu.org/mailman/listinfo/axiom-developer