diff --git a/books/bookvol5.pamphlet b/books/bookvol5.pamphlet index a30f4f2..17dc2be 100644 --- a/books/bookvol5.pamphlet +++ b/books/bookvol5.pamphlet @@ -91,7 +91,7 @@ effort, some in large ways and some in small ways. Any and all effort deserves recognition. There is no other criteria than contribution of effort. We would like to acknowledge and thank the following people: \defvar{credits} -<>= +\begin{chunk}{initvars} (defvar credits '( "An alphabetical listing of contributors to AXIOM:" "Cyril Alberga Roy Adler Christian Aistleitner" @@ -181,7 +181,7 @@ of effort. We would like to acknowledge and thank the following people: "Bruno Zuercher Dan Zwillinger" )) -@ +\end{chunk} \chapter{The Interpreter} The Axiom interpreter is a large common lisp program. @@ -210,10 +210,10 @@ $current-directory = "/research/test/" \end{verbatim} \defdollar{current-directory} -<>= +\begin{chunk}{initvars} (defvar $current-directory nil) -@ +\end{chunk} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \defdollar{defaultMsgDatabaseName} @@ -235,10 +235,10 @@ An example of a runtime value is: \end{verbatim} \defdollar{defaultMsgDatabaseName} -<>= +\begin{chunk}{initvars} (defvar |$defaultMsgDatabaseName| nil) -@ +\end{chunk} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \defdollar{directory-list} @@ -260,10 +260,10 @@ $directory-list = \end{verbatim} \defdollar{directory-list} -<>= +\begin{chunk}{initvars} (defvar $directory-list nil) -@ +\end{chunk} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \defdollar{InitialModemapFrame} @@ -278,10 +278,10 @@ $InitialModemapFrame = '((nil)) \end{verbatim} \defdollar{InitialModemapFrame} -<>= +\begin{chunk}{initvars} (defvar |$InitialModemapFrame| '((nil))) -@ +\end{chunk} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \defdollar{library-directory-list} @@ -297,10 +297,10 @@ $library-directory-list = ("/research/test/mnt/ubuntu/algebra/") \end{verbatim} \defdollar{library-directory-list} -<>= +\begin{chunk}{initvars} (defvar $library-directory-list '("/algebra/")) -@ +\end{chunk} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \defdollar{msgDatabaseName} @@ -314,10 +314,10 @@ An example of a runtime value is: \end{verbatim} \defdollar{msgDatabaseName} -<>= +\begin{chunk}{initvars} (defvar |$msgDatabaseName| nil) -@ +\end{chunk} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \defdollar{openServerIfTrue} @@ -335,10 +335,10 @@ $openServerIfTrue = nil \end{verbatim} \defdollar{openServerIfTrue} -<>= +\begin{chunk}{initvars} (defvar $openServerIfTrue nil) -@ +\end{chunk} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \defdollar{relative-directory-list} @@ -364,7 +364,7 @@ $relative-directory-list = \end{verbatim} \defdollar{relative-directory-list} -<>= +\begin{chunk}{initvars} (defvar $relative-directory-list '("/../../src/input/" "/doc/msgs/" @@ -372,7 +372,7 @@ $relative-directory-list = "/../../src/interp/" ; for lisp files (helps fd) "/doc/spadhelp/" )) -@ +\end{chunk} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \defdollar{relative-library-directory-list} @@ -388,10 +388,10 @@ $relative-library-directory-list = ("/algebra/") \end{verbatim} \defdollar{relative-library-directory-list} -<>= +\begin{chunk}{initvars} (defvar $relative-library-directory-list '("/algebra/")) -@ +\end{chunk} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \defdollar{spadroot} @@ -409,10 +409,10 @@ $spadroot = "/research/test/mnt/ubuntu" \end{verbatim} \defdollar{spadroot} -<>= +\begin{chunk}{initvars} (defvar $spadroot nil) -@ +\end{chunk} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \defdollar{SpadServer} @@ -427,10 +427,10 @@ $SpadServer = nil \end{verbatim} \defdollar{SpadServer} -<>= +\begin{chunk}{initvars} (defvar $SpadServer nil "t means Axiom acts as a remote server") -@ +\end{chunk} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \defdollar{SpadServerName} @@ -446,10 +446,10 @@ $SpadServerName = "/tmp/.d" \end{verbatim} \defdollar{SpadServerName} -<>= +\begin{chunk}{initvars} (defvar $SpadServerName "/tmp/.d" "the name of the spad server socket") -@ +\end{chunk} \chapter{Starting Axiom} Axiom starts by invoking a function value of the lisp symbol @@ -474,15 +474,14 @@ itself (don't break this) and never exits. When a lisp image containing code is reloaded there is a hook to allow a function to be called. In our case it is the restart function which is the entry to the Axiom interpreter. -<>= +\begin{chunk}{defun set-restart-hook 0} (defun set-restart-hook () "Set the restart hook" #+KCL (setq system::*top-level-hook* 'restart) #+Lucid (setq boot::restart-hook 'restart) 'restart ) - -@ +\end{chunk} \pagehead{restart function}{The restart function} \pagepic{ps/v5restart.ps}{Restart}{1.00} The restart function is the real root of the world. It sets up memory @@ -556,7 +555,7 @@ information is initialized. \usesdollar{restart}{current-directory} \usesdollar{restart}{displayStartMsgs} \usesdollar{restart}{currentLine} -<>= +\begin{chunk}{defun restart} (defun restart () (declare (special $openServerIfTrue $SpadServerName |$SpadServer| |$IOindex| |$InteractiveFrame| |$printLoadMsgs| $current-directory @@ -586,8 +585,7 @@ information is initialized. (restart0) (|readSpadProfileIfThere|) (|spad|)) - -@ +\end{chunk} \defun{restart0}{Non-interactive restarts} \calls{restart0}{compressopen} @@ -596,15 +594,14 @@ information is initialized. \calls{restart0}{categoryopen} \calls{restart0}{browseopen} \calls{restart0}{getEnv} -<>= +\begin{chunk}{defun restart0} (defun restart0 () (compressopen) ;; set up the compression tables (interpopen) ;; open up the interpreter database (operationopen) ;; all of the operations known to the system (categoryopen) ;; answer hasCategory question (browseopen)) - -@ +\end{chunk} \defun{spadStartUpMsgs}{The startup banner messages} \calls{spadStartUpMsgs}{fillerSpaces} @@ -616,7 +613,7 @@ information is initialized. \usesdollar{spadStartUpMsgs}{linelength} \uses{spadStartUpMsgs}{*yearweek*} \uses{spadStartUpMsgs}{*build-version*} -<>= +\begin{chunk}{defun spadStartUpMsgs} (defun |spadStartUpMsgs| () (let (bar) (declare (special |$msgAlist| |$opSysName| $linelength *yearweek* @@ -632,25 +629,23 @@ information is initialized. (|sayMSG| bar) (setq |$msgAlist| nil) (|sayMSG| '| |)))) - -@ +\end{chunk} \defun{fillerSpaces}{Make a vector of filler characters} \calls{fillerSpaces}{ifcar} -<>= +\begin{chunk}{defun fillerSpaces} (defun |fillerSpaces| (&rest arglist &aux charPart n) (dsetq (n . charPart) arglist) (if (<= n 0) "" (make-string n :initial-element (character (or (ifcar charPart) " "))))) - -@ +\end{chunk} \defunsec{spad}{Starts the interpreter but do not read in profiles} \calls{spad}{setOutputAlgebra} \calls{spad}{runspad} \usesdollar{spad}{PrintCompilerMessageIfTrue} -<>= +\begin{chunk}{defun spad} (defun |spad| () "Starts the interpreter but do not read in profiles" (let (|$PrintCompilerMessageIfTrue|) @@ -659,13 +654,12 @@ information is initialized. (|setOutputAlgebra| '|%initialize%|) (|runspad|) '|EndOfSpad|)) - -@ +\end{chunk} \defdollar{quitTag} -<>= +\begin{chunk}{initvars} (defvar |$quitTag| system::*quit-tag*) -@ +\end{chunk} \defun{runspad}{runspad} \catches{runspad}{quitTag} \catches{runspad}{coerceFailure} @@ -675,7 +669,7 @@ information is initialized. \calls{runspad}{resetStackLimits} \calls{runspad}{ncTopLevel} \usesdollar{runspad}{quitTag} -<>= +\begin{chunk}{defun runspad} (defun |runspad| () (prog (mode) (declare (special |$quitTag|)) @@ -692,16 +686,14 @@ information is initialized. (catch |$quitTag| (catch '|coerceFailure| (setq mode (catch '|top_level| (|ncTopLevel|)))))))))))))) - -@ +\end{chunk} \defun{resetStackLimits}{Reset the stack limits} \calls{resetStackLimits}{reset-stack-limits} -<>= +\begin{chunk}{defun resetStackLimits 0} (defun |resetStackLimits| () "Reset the stack limits" (system:reset-stack-limits)) - -@ +\end{chunk} \chapter{Handling Terminal Input} \section{Streams} \defvar{curinstream} @@ -709,52 +701,52 @@ 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''. -<>= +\begin{chunk}{initvars} (defvar curinstream (make-synonym-stream '*standard-input*)) -@ +\end{chunk} \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''. -<>= +\begin{chunk}{initvars} (defvar curoutstream (make-synonym-stream '*standard-output*)) -@ +\end{chunk} \defvar{errorinstream} -<>= +\begin{chunk}{initvars} (defvar errorinstream (make-synonym-stream '*terminal-io*)) -@ +\end{chunk} \defvar{erroroutstream} -<>= +\begin{chunk}{initvars} (defvar erroroutstream (make-synonym-stream '*terminal-io*)) -@ +\end{chunk} \defvar{*eof*} -<>= +\begin{chunk}{initvars} (defvar *eof* nil) -@ +\end{chunk} \defvar{*whitespace*} -<>= +\begin{chunk}{initvars} (defvar *whitespace* '(#\Space #\Newline #\Tab #\Page #\Linefeed #\Return #\Backspace) "A list of characters used by string-trim considered as whitespace") -@ +\end{chunk} \defdollar{InteractiveMode} -<>= +\begin{chunk}{initvars} (defvar |$InteractiveMode| t) -@ +\end{chunk} \defdollar{boot} -<>= +\begin{chunk}{initvars} (defvar $boot nil) -@ +\end{chunk} \defunsec{ncTopLevel}{Top-level read-parse-eval-print loop} Top-level read-parse-eval-print loop for the interpreter. Uses @@ -768,7 +760,7 @@ the Bill Burge's parser. \usesdollar{ncTopLevel}{InteractiveFrame} \uses{ncTopLevel}{*eof*} \uses{ncTopLevel}{in-stream} -<>= +\begin{chunk}{defun ncTopLevel} (defun |ncTopLevel| () "Top-level read-parse-eval-print loop" (let (|$e| $spad $newspad $boot |$InteractiveMode| *eof* in-stream) @@ -782,32 +774,30 @@ the Bill Burge's parser. (setq $spad t) (setq |$e| |$InteractiveFrame|) (|ncIntLoop|))) - -@ +\end{chunk} \defun{ncIntLoop}{ncIntLoop} \calls{ncIntLoop}{intloop} \uses{ncIntLoop}{curinstream} \uses{ncIntLoop}{curoutstream} -<>= +\begin{chunk}{defun ncIntLoop} (defun |ncIntLoop| () (let ((curinstream *standard-output*) (curoutstream *standard-input*)) (declare (special curinstream curoutstream)) (|intloop|))) - -@ +\end{chunk} \defdollar{intTopLevel} -<>= +\begin{chunk}{initvars} (defvar |$intTopLevel| '|top_level|) -@ +\end{chunk} \defdollar{intRestart} -<>= +\begin{chunk}{initvars} (defvar |$intRestart| '|restart|) -@ +\end{chunk} \defun{intloop}{intloop} Note that the SpadInterpretStream function uses a list of @@ -818,7 +808,7 @@ no use and can eventually be removed. \calls{intloop}{resetStackLimits} \usesdollar{intloop}{intTopLevel} \usesdollar{intloop}{intRestart} -<>= +\begin{chunk}{defun intloop} (defun |intloop| () (prog (mode) (declare (special |$intTopLevel| |$intRestart|)) @@ -837,13 +827,12 @@ no use and can eventually be removed. (catch |$intTopLevel| (|SpadInterpretStream| 1 (list 'tim 'daly '?) t))))))))))))) - -@ +\end{chunk} \defdollar{ncMsgList} -<>= +\begin{chunk}{initvars} (defvar |$ncMsgList| nil) -@ +\end{chunk} \defun{SpadInterpretStream}{SpadInterpretStream} The SpadInterpretStream function takes three arguments @@ -865,21 +854,21 @@ The \verb|$promptMsg| variable is set to the constant S2CTP023. This constant points to a message in src/doc/msgs/s2-us.msgs. This message does nothing but print the argument value. \defdollar{promptMsg} -<>= +\begin{chunk}{initvars} (defvar |$promptMsg| 'S2CTP023) -@ +\end{chunk} \defdollar{newcompErrorCount} -<>= +\begin{chunk}{initvars} (defvar |$newcompErrorCount| 0) -@ +\end{chunk} \defdollar{nopos} -<>= +\begin{chunk}{initvars} (defvar |$nopos| (list '|noposition|)) -@ +\end{chunk} \calls{SpadInterpretStream}{mkprompt} \calls{SpadInterpretStream}{intloopReadConsole} \calls{SpadInterpretStream}{intloopInclude} @@ -894,7 +883,7 @@ does nothing but print the argument value. \usesdollar{SpadInterpretStream}{libQuiet} \usesdollar{SpadInterpretStream}{fn} \usesdollar{SpadInterpretStream}{nopos} -<>= +\begin{chunk}{defun SpadInterpretStream} (defun |SpadInterpretStream| (str source interactive?) (let (|$promptMsg| |$systemCommandFunction| |$ncMsgList| |$erMsgToss| |$lastPos| |$inclAssertions| @@ -919,8 +908,7 @@ does nothing but print the argument value. (princ (mkprompt)) (|intloopReadConsole| "" str)) (|intloopInclude| source 0)))) - -@ +\end{chunk} \section{The Read-Eval-Print Loop} \defun{intloopReadConsole}{intloopReadConsole} @@ -966,7 +954,7 @@ will end up as a recursive call to ourselves. \calls{intloopReadConsole}{ncloopEscaped} \calls{intloopReadConsole}{intloopProcessString} \usesdollar{intloopReadConsole}{dalymode} -<>= +\begin{chunk}{defun intloopReadConsole} (defun |intloopReadConsole| (b n) (declare (special $dalymode)) (let (c d pfx input) @@ -993,12 +981,11 @@ will end up as a recursive call to ourselves. (setq c (|intloopProcessString| input n)) (princ (mkprompt)) (|intloopReadConsole| "" c))) - -@ +\end{chunk} \section{Helper Functions} \defunsec{getenviron}{Get the value of an evironment variable} \calls{getenviron}{getenv} -<>= +\begin{chunk}{defun getenviron 0} (defun getenviron (var) "Get the value of an evironment variable" #+allegro (sys::getenv (string var)) @@ -1012,40 +999,39 @@ will end up as a recursive call to ourselves. #+mcl (ccl::getenv var) #+sbcl (sb-ext:posix-getenv var) ) -@ +\end{chunk} \defdollar{intCoerceFailure} -<>= +\begin{chunk}{initvars} (defvar |$intCoerceFailure| '|coerceFailure|) -@ +\end{chunk} \defdollar{intSpadReader} -<>= +\begin{chunk}{initvars} (defvar |$intSpadReader| 'SPAD_READER) -@ +\end{chunk} \defun{InterpExecuteSpadSystemCommand}{InterpExecuteSpadSystemCommand} \catches{InterpExecuteSpadSystemCommand}{intCoerceFailure} \catches{InterpExecuteSpadSystemCommand}{intSpadReader} \calls{InterpExecuteSpadSystemCommand}{ExecuteInterpSystemCommand} \usesdollar{InterpExecuteSpadSystemCommand}{intSpadReader} \usesdollar{InterpExecuteSpadSystemCommand}{intCoerceFailure} -<>= +\begin{chunk}{defun InterpExecuteSpadSystemCommand} (defun |InterpExecuteSpadSystemCommand| (string) (declare (special |$intSpadReader| |$intCoerceFailure|)) (catch |$intCoerceFailure| (catch |$intSpadReader| (|ExecuteInterpSystemCommand| string)))) - -@ +\end{chunk} \defun{ExecuteInterpSystemCommand}{ExecuteInterpSystemCommand} \calls{ExecuteInterpSystemCommand}{intProcessSynonyms} \calls{ExecuteInterpSystemCommand}{substring} \calls{ExecuteInterpSystemCommand}{doSystemCommand} \usesdollar{ExecuteInterpSystemCommand}{currentLine} -<>= +\begin{chunk}{defun ExecuteInterpSystemCommand} (defun |ExecuteInterpSystemCommand| (string) (let (|$currentLine|) (declare (special |$currentLine|)) @@ -1053,20 +1039,18 @@ will end up as a recursive call to ourselves. (setq |$currentLine| string) (setq string (substring string 1 nil)) (unless (equal string "") (|doSystemCommand| string)))) - -@ +\end{chunk} \defun{intProcessSynonyms}{Handle Synonyms} \calls{intProcessSynonyms}{processSynonyms} \uses{intProcessSynonyms}{line} -<>= +\begin{chunk}{defun intProcessSynonyms} (defun |intProcessSynonyms| (str) (let ((line str)) (declare (special line)) (|processSynonyms|) line)) - -@ +\end{chunk} \defun{processSynonyms}{Synonym File Reader} \calls{processSynonyms}{strpos} @@ -1081,7 +1065,7 @@ will end up as a recursive call to ourselves. \calls{processSynonyms}{processSynonyms} \usesdollar{processSynonyms}{CommandSynonymAlist} \uses{processSynonyms}{line} -<>= +\begin{chunk}{defun processSynonyms} (defun |processSynonyms| () (let (fill p aline synstr syn to opt fun cl chr) (declare (special |$CommandSynonymAlist| line)) @@ -1113,8 +1097,7 @@ will end up as a recursive call to ourselves. (setq line cl) (setq chr (elt line (1+ p))) (|processSynonyms|)))) - -@ +\end{chunk} \defun{init-memory-config}{init-memory-config} Austin-Kyoto Common Lisp (AKCL), now known as Gnu Common Lisp (GCL) @@ -1124,7 +1107,7 @@ This function performs those setup commands. \calls{init-memory-config}{allocate-contiguous-pages} \calls{init-memory-config}{allocate-relocatable-pages} \calls{init-memory-config}{set-hole-size} -<>= +\begin{chunk}{defun init-memory-config 0} (defun init-memory-config (&key (cons 500) (fixnum 200) @@ -1151,8 +1134,7 @@ This function performs those setup commands. (system:set-hole-size hole)) #-:AKCL nil) - -@ +\end{chunk} \defunsec{initroot}{Set spadroot to be the AXIOM shell variable} Sets up the system to use the {\bf AXIOM} shell variable if we can @@ -1162,19 +1144,18 @@ of the {\bf AXIOM} shell variable at build time) if we can't. \calls{initroot}{reroot} \calls{initroot}{getenviron} \usesdollar{initroot}{spadroot} -<>= +\begin{chunk}{defun initroot} (defun initroot (&optional (newroot (getenviron "AXIOM"))) "Set spadroot to be the AXIOM shell variable" (declare (special $spadroot)) (reroot (or newroot $spadroot (error "setenv AXIOM or (setq $spadroot)")))) - -@ +\end{chunk} \defunsec{intloopPrefix?}{Does the string start with this prefix?} If the prefix string is the same as the whole string initial characters --R(ignoring spaces in the whole string) then we return the whole string minus any leading spaces. -<>= +\begin{chunk}{defun intloopPrefix? 0} (defun |intloopPrefix?| (prefix whole) "Does the string start with this prefix?" (let ((newprefix (string-left-trim '(#\space) prefix)) @@ -1182,83 +1163,81 @@ minus any leading spaces. (when (<= (length newprefix) (length newwhole)) (when (string= newprefix newwhole :end2 (length prefix)) newwhole)))) - -@ +\end{chunk} \defun{intnplisp}{Interpret a line of lisp code} This is used to hande {\tt )lisp} top level commands \calls{intnplisp}{nplisp} \usesdollar{intnplisp}{currentLine} -<>= +\begin{chunk}{defun intnplisp} (defun |intnplisp| (s) (declare (special |$currentLine|)) (setq |$currentLine| s) (|nplisp| |$currentLine|)) - -@ +\end{chunk} \defunsec{get-current-directory}{Get the current directory} -<>= +\begin{chunk}{defun get-current-directory 0} (defun get-current-directory () "Get the current directory" (namestring (truename ""))) -@ +\end{chunk} \defunsec{make-absolute-filename}{Prepend the absolute path to a filename} Prefix a filename with the {\bf AXIOM} shell variable. \usesdollar{make-absolute-filename}{spadroot} -<>= +\begin{chunk}{defun make-absolute-filename 0} (defun make-absolute-filename (name) "Prepend the absolute path to a filename" (declare (special $spadroot)) (concatenate 'string $spadroot name)) -@ +\end{chunk} \defunsec{makeInitialModemapFrame}{Make the initial modemap frame} \calls{makeInitialModemapFrame}{copy} \usesdollar{makeInitialModemapFrame}{InitialModemapFrame} -<>= +\begin{chunk}{defun makeInitialModemapFrame 0} (defun |makeInitialModemapFrame| () "Make the initial modemap frame" (declare (special |$InitialModemapFrame|)) (copy |$InitialModemapFrame|)) -@ +\end{chunk} \defun{ncloopEscaped}{ncloopEscaped} The ncloopEscaped function will return true if the last non-blank character of a line is an underscore, the Axiom line-continuation character. Otherwise, it returns nil. -<>= +\begin{chunk}{defun ncloopEscaped 0} (defun |ncloopEscaped| (x) (let ((l (length x))) (dotimes (i l) (when (char= (char x (- l i 1)) #\_) (return t)) (unless (char= (char x (- l i 1)) #\space) (return nil))))) -@ +\end{chunk} \defun{intloopProcessString}{intloopProcessString} \calls{intloopProcessString}{setCurrentLine} \calls{intloopProcessString}{intloopProcess} \calls{intloopProcessString}{next} \calls{intloopProcessString}{incString} -<>= +\begin{chunk}{defun intloopProcessString} (defun |intloopProcessString| (s n) (|setCurrentLine| s) (|intloopProcess| n t (|next| #'|ncloopParse| (|next| #'|lineoftoks| (|incString| s))))) -@ +\end{chunk} \defun{ncloopParse}{ncloopParse} \calls{ncloopParse}{ncloopDQlines} \calls{ncloopParse}{npParse} \calls{ncloopParse}{dqToList} -<>= +\begin{chunk}{defun ncloopParse} (defun |ncloopParse| (s) (let (cudr lines stream dq t1) (setq t1 (car s)) @@ -1269,22 +1248,22 @@ character. Otherwise, it returns nil. (setq cudr (cadr t1)) (cons (list (list lines (|npParse| (|dqToList| dq)))) (cdr s)))) -@ +\end{chunk} \defun{next}{next} \calls{next}{Delay} \calls{next}{next1} -<>= +\begin{chunk}{defun next} (defun |next| (f s) (|Delay| #'|next1| (list f s))) -@ +\end{chunk} \defun{next1}{next1} \calls{next1}{StreamNull} \calls{next1}{incAppend} \calls{next1}{next} -<>= +\begin{chunk}{defun next1} (defun |next1| (&rest z) (let (h s f) (setq f (car z)) @@ -1295,22 +1274,22 @@ character. Otherwise, it returns nil. (setq h (apply f (list s))) (|incAppend| (car h) (|next| f (cdr h))))))) -@ +\end{chunk} \defun{incString}{incString} \calls{incString}{incRenumber} \calls{incString}{incLude} \uses{incString}{Top} -<>= +\begin{chunk}{defun incString} (defun |incString| (s) (declare (special |Top|)) (|incRenumber| (|incLude| 0 (list s) 0 (list "strings") (list |Top|)))) -@ +\end{chunk} \defunsec{reclaim}{Call the garbage collector} Call the garbage collector on various platforms. -<>= +\begin{chunk}{defun reclaim 0} #+abcl (defun reclaim () "Call the garbage collector" (ext::gc)) #+:allegro @@ -1333,7 +1312,8 @@ Call the garbage collector on various platforms. (defun reclaim () "Call the garbage collector" (lcl::gc)) #+sbcl (defun reclaim () "Call the garbage collector" (sb-ext::gc)) -@ + +\end{chunk} \defun{reroot}{reroot} The reroot function is used to reset the important variables used by @@ -1394,7 +1374,7 @@ $current-directory = "/research/test/" \usesdollar{reroot}{defaultMsgDatabaseName} \usesdollar{reroot}{msgDatabaseName} \usesdollar{reroot}{current-directory} -<>= +\begin{chunk}{defun reroot} (defun reroot (dir) (declare (special $spadroot $directory-list $relative-directory-list $library-directory-list $relative-library-directory-list @@ -1409,7 +1389,7 @@ $current-directory = "/research/test/" (setq |$msgDatabaseName| ()) (setq $current-directory $spadroot)) -@ +\end{chunk} \defun{setCurrentLine}{setCurrentLine} Remember the current line. The cases are: @@ -1425,7 +1405,7 @@ Note I suspect the last two cases do not occur in practice since they result in a dotted pair if the input is not a cons. However, this is what the current code does so I won't change it. \usesdollar{setCurrentLine}{currentLine} -<>= +\begin{chunk}{defun setCurrentLine 0} (defun |setCurrentLine| (s) (declare (special |$currentLine|)) (cond @@ -1437,7 +1417,7 @@ this is what the current code does so I won't change it. (t (rplacd (last |$currentLine|) s))) |$currentLine|) -@ +\end{chunk} \defunsec{mkprompt}{Show the Axiom prompt} \calls{mkprompt}{concat} @@ -1446,7 +1426,7 @@ this is what the current code does so I won't change it. \usesdollar{mkprompt}{inputPromptType} \usesdollar{mkprompt}{IOindex} \usesdollar{mkprompt}{interpreterFrameName} -<>= +\begin{chunk}{defun mkprompt} (defun mkprompt () "Show the Axiom prompt" (declare (special |$inputPromptType| |$IOindex| |$interpreterFrameName|)) @@ -1461,41 +1441,41 @@ this is what the current code does so I won't change it. (substring (currenttime) 8 nil) "] [" (princ-to-string |$IOindex|) "] -> ")))) -@ +\end{chunk} \defdollar{frameAlist} -<>= +\begin{chunk}{initvars} (defvar |$frameAlist| nil) -@ +\end{chunk} \defdollar{frameNumber} -<>= +\begin{chunk}{initvars} (defvar |$frameNumber| 0) -@ +\end{chunk} \defdollar{currentFrameNum} -<>= +\begin{chunk}{initvars} (defvar |$currentFrameNum| 0) -@ +\end{chunk} \defdollar{EndServerSession} -<>= +\begin{chunk}{initvars} (defvar |$EndServerSession| nil) -@ +\end{chunk} \defdollar{NeedToSignalSessionManager} -<>= +\begin{chunk}{initvars} (defvar |$NeedToSignalSessionManager| nil) -@ +\end{chunk} \defdollar{sockBufferLength} -<>= +\begin{chunk}{initvars} (defvar |$sockBufferLength| 9217) -@ +\end{chunk} \defunsec{serverReadLine}{READ-LINE in an Axiom server system} \catches{serverReadLine}{coerceFailure} @@ -1539,7 +1519,7 @@ this is what the current code does so I won't change it. \usesdollar{serverReadLine}{SpadServer} \uses{serverReadLine}{*eof*} \uses{serverReadLine}{in-stream} -<>= +\begin{chunk}{defun serverReadLine} (defun |serverReadLine| (stream) "used in place of READ-LINE in a Axiom server system." (let (in-stream *eof* l framename currentframe form stringbuf line action) @@ -1609,12 +1589,12 @@ this is what the current code does so I won't change it. (line line) (t '||)))))) -@ +\end{chunk} \defun{protectedEVAL}{protectedEVAL} \calls{protectedEVAL}{resetStackLimits} \calls{protectedEVAL}{sendHTErrorSignal} -<>= +\begin{chunk}{defun protectedEVAL} (defun |protectedEVAL| (x) (let (val (error t)) (unwind-protect @@ -1626,13 +1606,13 @@ this is what the current code does so I won't change it. (|sendHTErrorSignal|))) (unless error val))) -@ +\end{chunk} \defdollar{QuietCommand} -<>= +\begin{chunk}{initvars} (defvar |$QuietCommand| nil "If true, produce no top level output") -@ +\end{chunk} \defun{executeQuietCommand}{executeQuietCommand} When \verb|$QuiteCommand| is true Spad will not produce any output from @@ -1646,7 +1626,7 @@ a top level command \calls{executeQuietCommand}{parseAndInterpret} \usesdollar{executeQuietCommand}{MenuServer} \usesdollar{executeQuietCommand}{QuietCommand} -<>= +\begin{chunk}{defun executeQuietCommand} (defun |executeQuietCommand| () (let (|$QuietCommand| stringBuf) (declare (special |$QuietCommand| |$MenuServer|)) @@ -1657,7 +1637,7 @@ a top level command (catch '|top_level| (catch 'spad_reader (|parseAndInterpret| stringBuf)))))) -@ +\end{chunk} \defun{parseAndInterpret}{parseAndInterpret} \calls{parseAndInterpret}{ncParseAndInterpretString} @@ -1666,7 +1646,7 @@ a top level command \usesdollar{parseAndInterpret}{spad} \usesdollar{parseAndInterpret}{e} \usesdollar{parseAndInterpret}{InteractiveFrame} -<>= +\begin{chunk}{defun parseAndInterpret} (defun |parseAndInterpret| (str) (let (|$InteractiveMode| $boot $spad |$e|) (declare (special |$InteractiveMode| $boot $spad |$e| @@ -1677,17 +1657,17 @@ a top level command (setq |$e| |$InteractiveFrame|) (|ncParseAndInterpretString| str))) -@ +\end{chunk} \defun{ncParseAndInterpretString}{ncParseAndInterpretString} \calls{ncParseAndInterpretString}{processInteractive} \calls{ncParseAndInterpretString}{packageTran} \calls{ncParseAndInterpretString}{parseFromString} -<>= +\begin{chunk}{defun ncParseAndInterpretString} (defun |ncParseAndInterpretString| (s) (|processInteractive| (|packageTran| (|parseFromString| s)) nil)) -@ +\end{chunk} \defun{parseFromString}{parseFromString} \calls{parseFromString}{next} @@ -1697,30 +1677,30 @@ a top level command \calls{parseFromString}{StreamNull} \calls{parseFromString}{pf2Sex} \calls{parseFromString}{macroExpanded} -<>= +\begin{chunk}{defun parseFromString} (defun |parseFromString| (s) (setq s (|next| #'|ncloopParse| (|next| #'|lineoftoks| (|incString| s)))) (unless (|StreamNull| s) (|pf2Sex| (|macroExpanded| (cadar s))))) -@ +\end{chunk} \defdollar{interpOnly} -<>= +\begin{chunk}{initvars} (defvar |$interpOnly| nil) -@ +\end{chunk} \defdollar{minivectorNames} -<>= +\begin{chunk}{initvars} (defvar |$minivectorNames| nil) -@ +\end{chunk} \defdollar{domPvar} -<>= +\begin{chunk}{initvars} (defvar |$domPvar| nil) -@ +\end{chunk} \defun{processInteractive}{processInteractive} Parser Output {\tt -->} Interpreter @@ -1766,7 +1746,7 @@ This function receives the output from the parser. \usesdollar{processInteractive}{defaultFortVar} \usesdollar{processInteractive}{interpreterTimedNames} \usesdollar{processInteractive}{interpreterTimedClasses} -<>= +\begin{chunk}{defun processInteractive} (defun |processInteractive| (form posnForm) (let (|$op| |$Coerce| |$compErrorMessageStack| |$freeVars| |$mapList| |$compilingMap| |$compilingLoop| @@ -1825,19 +1805,19 @@ This function receives the output from the parser. (|updateHist|)) object)) -@ +\end{chunk} \defdollar{ProcessInteractiveValue} -<>= +\begin{chunk}{initvars} (defvar |$ProcessInteractiveValue| nil "If true, no output or record") -@ +\end{chunk} \defdollar{HTCompanionWindowID} -<>= +\begin{chunk}{initvars} (defvar |$HTCompanionWindowID| nil) -@ +\end{chunk} \defun{processInteractive1}{processInteractive1} This calls the analysis and output printing routines @@ -1851,7 +1831,7 @@ This calls the analysis and output printing routines \usesdollar{processInteractive1}{e} \usesdollar{processInteractive1}{ProcessInteractiveValue} \usesdollar{processInteractive1}{InteractiveFrame} -<>= +\begin{chunk}{defun processInteractive1} (defun |processInteractive1| (form posnForm) (let (|$e| object) (declare (special |$e| |$ProcessInteractiveValue| |$InteractiveFrame|)) @@ -1867,7 +1847,7 @@ This calls the analysis and output printing routines (|stopTimingProcess| '|print|) object)) -@ +\end{chunk} \defun{interpretTopLevel}{interpretTopLevel} \catches{interpretTopLevel}{interpreter} @@ -1876,7 +1856,7 @@ This calls the analysis and output printing routines \calls{interpretTopLevel}{peekTimedName} \calls{interpretTopLevel}{interpretTopLevel} \usesdollar{interpretTopLevel}{timedNameStack} -<>= +\begin{chunk}{defun interpretTopLevel} (defun |interpretTopLevel| (x posnForm) (let (savedTimerStack c) (declare (special |$timedNameStack|)) @@ -1889,16 +1869,16 @@ This calls the analysis and output printing routines (|interpretTopLevel| x posnForm) c))) -@ +\end{chunk} \defdollar{genValue} If the \verb|$genValue| variable is true then evaluate generated code, otherwise leave code unevaluated. If \verb|$genValue| is false then we are compiling. This variable is only defined and used locally. -<>= +\begin{chunk}{initvars} (defvar |$genValue| nil "evaluate generated code if true") -@ +\end{chunk} \defun{interpret}{Type analyzes and evaluates expression x, returns object} \calls{interpret}{pairp} @@ -1906,7 +1886,7 @@ are compiling. This variable is only defined and used locally. \usesdollar{interpret}{env} \usesdollar{interpret}{eval} \usesdollar{interpret}{genValue} -<>= +\begin{chunk}{defun interpret} (defun |interpret| (&rest arg &aux restargs x) (dsetq (x . restargs) arg) (let (|$env| |$eval| |$genValue| posnForm) @@ -1919,7 +1899,7 @@ are compiling. This variable is only defined and used locally. (setq |$genValue| t) ; evaluate all generated code (|interpret1| x nil posnForm))) -@ +\end{chunk} \defun{interpret1}{Dispatcher for the type analysis routines} This is the dispatcher for the type analysis routines. It type analyzes and @@ -1936,7 +1916,7 @@ modeset otherwise. It creates the attributed tree. \calls{interpret1}{keyedSystemError} \usesdollar{interpret1}{genValue} \usesdollar{interpret1}{eval} -<>= +\begin{chunk}{defun interpret1} (defun |interpret1| (x rootMode posnForm) (let (node modeSet newRootMode argVal val) (declare (special |$genValue| |$eval|)) @@ -1958,7 +1938,7 @@ modeset otherwise. It creates the attributed tree. (t (|keyedSystemError| 'S2IS0053 (list x)))))))) -@ +\end{chunk} \defun{interpret2}{interpret2} This is the late interpretCoerce. I removed the call to @@ -1973,7 +1953,7 @@ coerceInteractive, so it only does the JENKS cases ALBI \calls{interpret2}{throwKeyedMsgCannotCoerceWithValue} \usesdollar{interpret2}{EmptyMode} \usesdollar{interpret2}{ThrowAwayMode} -<>= +\begin{chunk}{defun interpret2} (defun |interpret2| (object m1 posnForm) (declare (ignore posnForm)) (let (x m op ans) @@ -2000,7 +1980,7 @@ coerceInteractive, so it only does the JENKS cases ALBI (|throwKeyedMsgCannotCoerceWithValue| x m m1))) (t object)))))) -@ +\end{chunk} \defun{recordAndPrint}{Result Output Printing} Prints out the value x which is of type m, and records the changes @@ -2034,7 +2014,7 @@ It is controlled with the {\tt )se me any} command. \usesdollar{recordAndPrint}{printVoidIfTrue} \usesdollar{recordAndPrint}{outputMode} \usesdollar{recordAndPrint}{printAnyIfTrue} -<>= +\begin{chunk}{defun recordAndPrint} (defun |recordAndPrint| (x md) (let (|$outputMode| xp mdp mode) (declare (special |$outputMode| |$mkTestOutputType| |$runTestFlag| |$e| @@ -2070,26 +2050,26 @@ It is controlled with the {\tt )se me any} command. '|done|) (t '|done|)))) -@ +\end{chunk} \defun{printStatisticsSummary}{printStatisticsSummary} \calls{printStatisticsSummary}{sayKeyedMsg} \calls{printStatisticsSummary}{statisticsSummary} \usesdollar{printStatisticsSummary}{collectOutput} -<>= +\begin{chunk}{defun printStatisticsSummary} (defun |printStatisticsSummary| () (declare (special |$collectOutput|)) (unless |$collectOutput| (|sayKeyedMsg| 'S2GL0017 (list (|statisticsSummary|))))) -@ +\end{chunk} \defun{printStorage}{printStorage} \calls{printStorage}{makeLongSpaceString} \usesdollar{printStorage}{interpreterTimedClasses} \usesdollar{printStorage}{collectOutput} \usesdollar{printStorage}{interpreterTimedNames} -<>= +\begin{chunk}{defun printStorage} (defun |printStorage| () (declare (special |$interpreterTimedClasses| |$collectOutput| |$interpreterTimedNames|)) @@ -2100,20 +2080,20 @@ It is controlled with the {\tt )se me any} command. |$interpreterTimedNames| |$interpreterTimedClasses|))))) -@ +\end{chunk} \defun{printTypeAndTime}{printTypeAndTime} \calls{printTypeAndTime}{printTypeAndTimeSaturn} \calls{printTypeAndTime}{printTypeAndTimeNormal} \usesdollar{printTypeAndTime}{saturn} -<>= +\begin{chunk}{defun printTypeAndTime} (defun |printTypeAndTime| (x m) (declare (special |$saturn|)) (if |$saturn| (|printTypeAndTimeSaturn| x m) (|printTypeAndTimeNormal| x m))) -@ +\end{chunk} \defun{printTypeAndTimeNormal}{printTypeAndTimeNormal} \calls{printTypeAndTimeNormal}{qcar} @@ -2133,7 +2113,7 @@ It is controlled with the {\tt )se me any} command. \usesdollar{printTypeAndTimeNormal}{outputLines} \usesdollar{printTypeAndTimeNormal}{interpreterTimedNames} \usesdollar{printTypeAndTimeNormal}{interpreterTimedClasses} -<>= +\begin{chunk}{defun printTypeAndTimeNormal} (defun |printTypeAndTimeNormal| (x m) (let (xp mp timeString result) (declare (special |$outputLines| |$collectOutput| |$printTypeIfTrue| @@ -2166,7 +2146,7 @@ It is controlled with the {\tt )se me any} command. (push (|justifyMyType| (|msgText| 'S2GL0012 (list m))) |$outputLines|) (|sayKeyedMsg| 'S2GL0012 (list m))))))) -@ +\end{chunk} \defun{printTypeAndTimeSaturn}{printTypeAndTimeSaturn} \calls{printTypeAndTimeSaturn}{makeLongTimeString} @@ -2177,7 +2157,7 @@ It is controlled with the {\tt )se me any} command. \usesdollar{printTypeAndTimeSaturn}{printTypeIfTrue} \usesdollar{printTypeAndTimeSaturn}{interpreterTimedClasses} \usesdollar{printTypeAndTimeSaturn}{interpreterTimedNames} -<>= +\begin{chunk}{defun printTypeAndTimeSaturn} (defun |printTypeAndTimeSaturn| (x m) (declare (ignore x)) (let (timeString typeString) @@ -2203,16 +2183,16 @@ It is controlled with the {\tt )se me any} command. (|printAsTeX| timeString) (|printAsTeX| "}")))) -@ +\end{chunk} \defun{printAsTeX}{printAsTeX} \usesdollar{printAsTeX}{texOutputStream} -<>= +\begin{chunk}{defun printAsTeX 0} (defun |printAsTeX| (x) (declare (special |$texOutputStream|)) (princ x |$texOutputStream|)) -@ +\end{chunk} \defun{sameUnionBranch}{sameUnionBranch} \begin{verbatim} @@ -2220,7 +2200,7 @@ sameUnionBranch(uArg, m) == uArg is [":", ., t] => t = m uArg = m \end{verbatim} -<>= +\begin{chunk}{defun sameUnionBranch 0} (defun |sameUnionBranch| (uArg m) (let (t1 t2 t3) (cond @@ -2237,8 +2217,7 @@ sameUnionBranch(uArg, m) == (equal t3 m)) (t (equal uArg m))))) - -@ +\end{chunk} \defun{msgText}{msgText} \calls{msgText}{segmentKeyedMsg} @@ -2248,7 +2227,7 @@ sameUnionBranch(uArg, m) == \calls{msgText}{stringimage} \usesdollar{msgText}{linelength} \usesdollar{msgText}{margin} -<>= +\begin{chunk}{defun msgText} (defun |msgText| (key args) (let (msg) (declare (special $linelength $margin)) @@ -2257,12 +2236,12 @@ sameUnionBranch(uArg, m) == (setq msg (|flowSegmentedMsg| msg $linelength $margin)) (apply #'concat (mapcar #'stringimage (cdar msg))))) -@ +\end{chunk} \defun{justifyMyType}{Right-justify the Type output} \calls{justifyMyType}{fillerSpaces} \usesdollar{justifyMyType}{linelength} -<>= +\begin{chunk}{defun justifyMyType} (defun |justifyMyType| (arg) (let (len) (declare (special $linelength)) @@ -2271,13 +2250,13 @@ sameUnionBranch(uArg, m) == arg (concat (|fillerSpaces| (- $linelength len)) arg)))) -@ +\end{chunk} \defun{unescapeStringsInForm}{Destructively fix quotes in strings} \calls{unescapeStringsInForm}{unescapeStringsInForm} \usesdollar{unescapeStringsInForm}{funnyBacks} \usesdollar{unescapeStringsInForm}{funnyQuote} -<>= +\begin{chunk}{defun unescapeStringsInForm} (defun |unescapeStringsInForm| (form) (let (str) (declare (special |$funnyBacks| |$funnyQuote|)) @@ -2291,17 +2270,17 @@ sameUnionBranch(uArg, m) == form) (t form)))) -@ +\end{chunk} \defunsec{intloopInclude}{Include a file into the stream} \calls{intloopInclude}{ST} \calls{intloopInclude}{intloopInclude0} -<>= +\begin{chunk}{defun intloopInclude} (defun |intloopInclude| (name n) "Include a file into the stream" (with-open-file (st name) (|intloopInclude0| st name n))) -@ +\end{chunk} \defun{intloopInclude0}{intloopInclude0} \calls{intloopInclude0}{incStream} @@ -2311,7 +2290,7 @@ sameUnionBranch(uArg, m) == \calls{intloopInclude0}{insertpile} \calls{intloopInclude0}{lineoftoks} \usesdollar{intloopInclude0}{lines} -<>= +\begin{chunk}{defun intloopInclude0} (defun |intloopInclude0| (|st| |name| |n|) (let (|$lines|) (declare (special |$lines|)) @@ -2322,7 +2301,7 @@ sameUnionBranch(uArg, m) == (|next| #'|lineoftoks| |$lines|)))))) -@ +\end{chunk} \defun{intloopProcess}{intloopProcess} \calls{intloopProcess}{StreamNull} @@ -2333,7 +2312,7 @@ sameUnionBranch(uArg, m) == \calls{intloopProcess}{intloopSpadProcess} \callsdollar{intloopProcess}{systemCommandFunction} \usesdollar{intloopProcess}{systemCommandFunction} -<>= +\begin{chunk}{defun intloopProcess} (defun |intloopProcess| (n interactive s) (let (ptree lines t1) (declare (special |$systemCommandFunction|)) @@ -2353,7 +2332,7 @@ sameUnionBranch(uArg, m) == (|intloopSpadProcess| n lines ptree interactive) interactive (cdr s)))))))) -@ +\end{chunk} \defun{intloopSpadProcess}{intloopSpadProcess} \catches{intloopSpadProcess}{flung} @@ -2372,7 +2351,7 @@ sameUnionBranch(uArg, m) == \usesdollar{intloopSpadProcess}{stepNo} \usesdollar{intloopSpadProcess}{NeedToSignalSessionManager} \uses{intloopSpadProcess}{flung} -<>= +\begin{chunk}{defun intloopSpadProcess} (defun |intloopSpadProcess| (stepNo lines ptree interactive?) (let (|$stepNo| result cc) (declare (special |$stepNo| |$prevCarrier| |$intSpadReader| |flung| @@ -2397,13 +2376,13 @@ sameUnionBranch(uArg, m) == ((eq result '|ncEndItem|) stepNo) (t (1+ stepNo))))) -@ +\end{chunk} \defun{intloopSpadProcess,interp}{intloopSpadProcess,interp} \calls{intloopSpadProcess,interp}{ncConversationPhase} \calls{intloopSpadProcess,interp}{ncEltQ} \calls{intloopSpadProcess,interp}{ncError} -<>= +\begin{chunk}{defun intloopSpadProcess,interp} (defun |intloopSpadProcess,interp| (cc ptree interactive?) (|ncConversationPhase| #'|phParse| (list cc ptree)) (|ncConversationPhase| #'|phMacro| (list cc)) @@ -2411,7 +2390,7 @@ sameUnionBranch(uArg, m) == (|ncConversationPhase| #'|phInterpret| (list cc)) (unless (eql (length (|ncEltQ| cc '|messages|)) 0) (|ncError|))) -@ +\end{chunk} \defun{phParse}{phParse} \tpdhere{The pform function has a leading percent sign. fix this} @@ -2421,25 +2400,25 @@ phParse: carrier[tokens,...] -> carrier[ptree, tokens,...] \calls{phParse}{intSayKeyedMsg} \calls{phParse}{pform} \calls{phParse}{ncPutQ} -<>= +\begin{chunk}{defun phParse} (defun |phParse| (carrier ptree) (|ncPutQ| carrier '|ptree| ptree) 'ok) -@ +\end{chunk} \defun{intSayKeyedMsg}{intSayKeyedMsg} \calls{intSayKeyedMsg}{sayKeyedMsg} \calls{intSayKeyedMsg}{packageTran} -<>= +\begin{chunk}{defun intSayKeyedMsg} (defun |intSayKeyedMsg| (key args) (|sayKeyedMsg| (|packageTran| key) (|packageTran| args))) -@ +\end{chunk} \defun{packageTran}{packageTran} \calls{packageTran}{packageTran} -<>= +\begin{chunk}{defun packageTran 0} (defun |packageTran| (sex) (cond ((symbolp sex) @@ -2452,7 +2431,7 @@ phParse: carrier[tokens,...] -> carrier[ptree, tokens,...] sex) (t sex))) -@ +\end{chunk} \defun{phIntReportMsgs}{phIntReportMsgs} \begin{verbatim} @@ -2463,7 +2442,7 @@ carrier[lines,messages,..]-> carrier[lines,messages,..] \calls{phIntReportMsgs}{processMsgList} \calls{phIntReportMsgs}{intSayKeyedMsg} \usesdollar{phIntReportMsgs}{erMsgToss} -<>= +\begin{chunk}{defun phIntReportMsgs} (defun |phIntReportMsgs| (carrier interactive?) (declare (ignore interactive?)) (let (nerr msgs lines) @@ -2482,44 +2461,44 @@ carrier[lines,messages,..]-> carrier[lines,messages,..] (|intSayKeyedMsg| 'S2CTP010 (list nerr)) 'ok)))))) -@ +\end{chunk} \defun{phInterpret}{phInterpret} \calls{phInterpret}{ncEltQ} \calls{phInterpret}{intInterpretPform} \calls{phInterpret}{ncPutQ} -<>= +\begin{chunk}{defun phInterpret} (defun |phInterpret| (carrier) (let (val ptree) (setq ptree (|ncEltQ| carrier '|ptree|)) (setq val (|intInterpretPform| ptree)) (|ncPutQ| carrier '|value| val))) -@ +\end{chunk} \defun{intInterpretPform}{intInterpretPform} \calls{intInterpretPform}{processInteractive} \calls{intInterpretPform}{zeroOneTran} \calls{intInterpretPform}{packageTran} \calls{intInterpretPform}{pf2Sex} -<>= +\begin{chunk}{defun intInterpretPform} (defun |intInterpretPform| (pf) (|processInteractive| (|zeroOneTran| (|packageTran| (|pf2Sex| pf))) pf)) -@ +\end{chunk} \defun{zeroOneTran}{zeroOneTran} \calls{zeroOneTran}{nsubst} -<>= +\begin{chunk}{defun zeroOneTran 0} (defun |zeroOneTran| (sex) (nsubst '|$EmptyMode| '? sex)) -@ +\end{chunk} \defun{ncConversationPhase}{ncConversationPhase} \calls{ncConversationPhase}{ncConversationPhase,wrapup} \usesdollar{ncConversationPhase}{ncMsgList} -<>= +\begin{chunk}{defun ncConversationPhase} (defun |ncConversationPhase| (fn args) (let (|$ncMsgList| carrier) (declare (special |$ncMsgList|)) @@ -2529,11 +2508,11 @@ carrier[lines,messages,..]-> carrier[lines,messages,..] (apply fn args) (|ncConversationPhase,wrapup| carrier)))) -@ +\end{chunk} \defun{ncConversationPhase,wrapup}{ncConversationPhase,wrapup} \usesdollar{ncConversationPhase,wrapup}{ncMsgList} -<>= +\begin{chunk}{defun ncConversationPhase,wrapup} (defun |ncConversationPhase,wrapup| (carrier) (declare (special |$ncMsgList|)) ((lambda (Var5 m) @@ -2546,15 +2525,15 @@ carrier[lines,messages,..]-> carrier[lines,messages,..] (setq Var5 (cdr Var5)))) |$ncMsgList| nil)) -@ +\end{chunk} \defun{ncError}{ncError} \throws{ncError}{SpadCompileItem} -<>= +\begin{chunk}{defun ncError 0} (defun |ncError| () (throw '|SpadCompileItem| '|ncError|)) -@ +\end{chunk} \defun{intloopEchoParse}{intloopEchoParse} \calls{intloopEchoParse}{ncloopDQlines} @@ -2565,7 +2544,7 @@ carrier[lines,messages,..]-> carrier[lines,messages,..] \calls{intloopEchoParse}{dqToList} \usesdollar{intloopEchoParse}{EchoLines} \usesdollar{intloopEchoParse}{lines} -<>= +\begin{chunk}{defun intloopEchoParse} (defun |intloopEchoParse| (s) (let (cudr lines stream dq t1) (declare (special |$EchoLines| |$lines|)) @@ -2580,7 +2559,7 @@ carrier[lines,messages,..]-> carrier[lines,messages,..] (setq |$lines| cudr) (cons (list (list lines (|npParse| (|dqToList| dq)))) (cdr s)))) -@ +\end{chunk} \defun{ncloopPrintLines}{ncloopPrintLines} \begin{verbatim} @@ -2588,7 +2567,7 @@ carrier[lines,messages,..]-> carrier[lines,messages,..] ; for line in lines repeat WRITE_-LINE CDR line ; WRITE_-LINE '" " \end{verbatim} -<>= +\begin{chunk}{defun ncloopPrintLines 0} (defun |ncloopPrintLines| (lines) ((lambda (Var4 line) (loop @@ -2600,7 +2579,7 @@ carrier[lines,messages,..]-> carrier[lines,messages,..] lines nil) (write-line " ")) -@ +\end{chunk} \defun{mkLineList}{mkLineList} \begin{verbatim} @@ -2609,7 +2588,7 @@ carrier[lines,messages,..]-> carrier[lines,messages,..] ; #l = 1 => CAR l ; l \end{verbatim} -<>= +\begin{chunk}{defun mkLineList} (defun |mkLineList| (lines) (let (l) (setq l @@ -2627,7 +2606,7 @@ carrier[lines,messages,..]-> carrier[lines,messages,..] ((eql (length l) 1) (car l)) (t l)))) -@ +\end{chunk} \defun{nonBlank}{nonBlank} \begin{verbatim} @@ -2639,7 +2618,7 @@ carrier[lines,messages,..]-> carrier[lines,messages,..] ; return value ; value \end{verbatim} -<>= +\begin{chunk}{defun nonBlank 0} (defun |nonBlank| (str) (let (value) ((lambda (Var3 i) @@ -2654,14 +2633,14 @@ carrier[lines,messages,..]-> carrier[lines,messages,..] (maxindex str) 0) value)) -@ +\end{chunk} \defun{ncloopDQlines}{ncloopDQlines} \calls{ncloopDQlines}{StreamNull} \calls{ncloopDQlines}{poGlobalLinePosn} \calls{ncloopDQlines}{tokPosn} \calls{ncloopDQlines}{streamChop} -<>= +\begin{chunk}{defun ncloopDQlines} (defun |ncloopDQlines| (dq stream) (let (b a) (|StreamNull| stream) @@ -2669,19 +2648,19 @@ carrier[lines,messages,..]-> carrier[lines,messages,..] (setq b (|poGlobalLinePosn| (caar stream))) (|streamChop| (+ (- a b) 1) stream))) -@ +\end{chunk} \defun{poGlobalLinePosn}{poGlobalLinePosn} \calls{poGlobalLinePosn}{lnGlobalNum} \calls{poGlobalLinePosn}{poGetLineObject} \calls{poGlobalLinePosn}{ncBug} -<>= +\begin{chunk}{defun poGlobalLinePosn} (defun |poGlobalLinePosn| (posn) (if posn (|lnGlobalNum| (|poGetLineObject| posn)) (|ncBug| "old style pos objects have no global positions" nil))) -@ +\end{chunk} \defun{streamChop}{streamChop} Note that changing the name ``lyne'' to ``line'' will break the system. @@ -2690,7 +2669,7 @@ contiguous comment spanning enough lines to overflow the stack. \calls{streamChop}{StreamNull} \calls{streamChop}{streamChop} \calls{streamChop}{ncloopPrefix?} -<>= +\begin{chunk}{defun streamChop} (defun |streamChop| (n s) (let (d c lyne b a tmp1) (cond @@ -2705,7 +2684,7 @@ contiguous comment spanning enough lines to overflow the stack. (setq d (cons (car lyne) (cond (c c) (t (cdr lyne))))) (list (cons d a) b))))) -@ +\end{chunk} \defun{ncloopInclude0}{ncloopInclude0} \calls{ncloopInclude0}{incStream} @@ -2715,7 +2694,7 @@ contiguous comment spanning enough lines to overflow the stack. \calls{ncloopInclude0}{insertpile} \calls{ncloopInclude0}{lineoftoks} \usesdollar{ncloopInclude0}{lines} -<>= +\begin{chunk}{defun ncloopInclude0} (defun |ncloopInclude0| (st name n) (let (|$lines|) (declare (special |$lines|)) @@ -2726,42 +2705,42 @@ contiguous comment spanning enough lines to overflow the stack. (|next| #'|lineoftoks| |$lines|)))))) -@ +\end{chunk} \defun{incStream}{incStream} \calls{incStream}{incRenumber} \calls{incStream}{incLude} \calls{incStream}{incRgen} \uses{incStream}{Top} -<>= +\begin{chunk}{defun incStream} (defun |incStream| (st fn) (declare (special |Top|)) (|incRenumber| (|incLude| 0 (|incRgen| st) 0 (list fn) (list |Top|)))) -@ +\end{chunk} \defun{incRenumber}{incRenumber} \calls{incRenumber}{incZip} \calls{incRenumber}{incIgen} -<>= +\begin{chunk}{defun incRenumber} (defun |incRenumber| (ssx) (|incZip| #'|incRenumberLine| ssx (|incIgen| 0))) -@ +\end{chunk} \defun{incZip}{incZip} \calls{incZip}{Delay} \calls{incZip}{incZip1} -<>= +\begin{chunk}{defun incZip} (defun |incZip| (g f1 f2) (|Delay| #'|incZip1| (list g f1 f2))) -@ +\end{chunk} \defun{incZip1}{incZip1} \calls{incZip1}{StreamNull} \calls{incZip1}{incZip} -<>= +\begin{chunk}{defun incZip1} (defun |incZip1| (&rest z) (let (f2 f1 g) (setq g (car z)) @@ -2775,53 +2754,53 @@ contiguous comment spanning enough lines to overflow the stack. (funcall g (car f1) (car f2)) (|incZip| g (cdr f1) (cdr f2))))))) -@ +\end{chunk} \defun{incIgen}{incIgen} \calls{incIgen}{Delay} \calls{incIgen}{incIgen1} -<>= +\begin{chunk}{defun incIgen} (defun |incIgen| (n) (|Delay| #'|incIgen1| (list n))) -@ +\end{chunk} \defun{incIgen1}{incIgen1} \calls{incIgen1}{incIgen} -<>= +\begin{chunk}{defun incIgen1} (defun |incIgen1| (&rest z) (let (n) (setq n (car z)) (setq n (+ n 1)) (cons n (|incIgen| n)))) -@ +\end{chunk} \defun{incRenumberLine}{incRenumberLine} \calls{incRenumberLine}{incRenumberItem} \calls{incRenumberLine}{incHandleMessage} -<>= +\begin{chunk}{defun incRenumberLine} (defun |incRenumberLine| (xl gno) (let (l) (setq l (|incRenumberItem| (elt xl 0) gno)) (|incHandleMessage| xl) l)) -@ +\end{chunk} \defun{incRenumberItem}{incRenumberItem} \calls{incRenumberItem}{lnSetGlobalNum} -<>= +\begin{chunk}{defun incRenumberItem} (defun |incRenumberItem| (f i) (let (l) (setq l (caar f)) (|lnSetGlobalNum| l i) f)) -@ +\end{chunk} \defun{incHandleMessage}{incHandleMessage} \calls{incHandleMessage}{ncSoftError} \calls{incHandleMessage}{ncBug} -<>= +\begin{chunk}{defun incHandleMessage 0} (defun |incHandleMessage| (x) "Message handling for the source includer" (let ((msgtype (elt (elt x 1) 1)) @@ -2836,135 +2815,135 @@ contiguous comment spanning enough lines to overflow the stack. ((eq msgtype '|say|) (|ncSoftError| pos key args)) (t (|ncBug| key args))))) -@ +\end{chunk} \defun{incLude}{incLude} \calls{incLude}{Delay} \calls{include}{incLude1} -<>= +\begin{chunk}{defun incLude} (defun |incLude| (eb ss ln ufos states) (|Delay| #'|incLude1| (list eb ss ln ufos states))) -@ +\end{chunk} \defmacro{Rest} -<>= +\begin{chunk}{defmacro Rest} (defmacro |Rest| () "used in incLude1 for parsing; s is not used." '(|incLude| eb (cdr ss) lno ufos states)) -@ +\end{chunk} \defvar{Top} -<>= +\begin{chunk}{initvars} (defvar |Top| 1 "used in incLude1 for parsing") -@ +\end{chunk} \defvar{IfSkipToEnd} -<>= +\begin{chunk}{initvars} (defvar |IfSkipToEnd| 10 "used in incLude1 for parsing") -@ +\end{chunk} \defvar{IfKeepPart} -<>= +\begin{chunk}{initvars} (defvar |IfKeepPart| 11 "used in incLude1 for parsing") -@ +\end{chunk} \defvar{IfSkipPart} -<>= +\begin{chunk}{initvars} (defvar |IfSkipPart| 12 "used in incLude1 for parsing") -@ +\end{chunk} \defvar{ElseifSkipToEnd} -<>= +\begin{chunk}{initvars} (defvar |ElseifSkipToEnd| 20 "used in incLude1 for parsing") -@ +\end{chunk} \defvar{ElseifKeepPart} -<>= +\begin{chunk}{initvars} (defvar |ElseifKeepPart| 21 "used in incLude1 for parsing") -@ +\end{chunk} \defvar{ElseifSkipPart} -<>= +\begin{chunk}{initvars} (defvar |ElseifSkipPart| 22 "used in incLude1 for parsing") -@ +\end{chunk} \defvar{ElseSkipToEnd} -<>= +\begin{chunk}{initvars} (defvar |ElseSkipToEnd| 30 "used in incLude1 for parsing") -@ +\end{chunk} \defvar{ElseKeepPart} -<>= +\begin{chunk}{initvars} (defvar |ElseKeepPart| 31 "used in incLude1 for parsing") -@ +\end{chunk} \defvar{Top?} \calls{Top?}{quotient} -<>= +\begin{chunk}{defun Top? 0} (defun |Top?| (|st|) "used in incLude1 for parsing" (eql (quotient |st| 10) 0)) -@ +\end{chunk} \defvar{If?} \calls{If?}{quotient} -<>= +\begin{chunk}{defun If?} (defun |If?| (|st|) "used in incLude1 for parsing" (eql (quotient |st| 10) 1)) -@ +\end{chunk} \defvar{Elseif?} \calls{Elseif?}{QUOTIENT} -<>= +\begin{chunk}{defun Elseif?} (defun |Elseif?| (|st|) "used in incLude1 for parsing" (eql (quotient |st| 10) 2)) -@ +\end{chunk} \defvar{Else?} \calls{Else?}{QUOTIENT} -<>= +\begin{chunk}{defun Else?} (defun |Else?| (|st|) "used in incLude1 for parsing" (eql (quotient |st| 10) 3)) -@ +\end{chunk} \defvar{SkipEnd?} \calls{SkipEnd?}{remainder} -<>= +\begin{chunk}{defun SkipEnd?} (defun |SkipEnd?| (|st|) "used in incLude1 for parsing" (eql (remainder |st| 10) 0)) -@ +\end{chunk} \defvar{KeepPart?} \calls{KeepPart?}{remainder} -<>= +\begin{chunk}{defun KeepPart?} (defun |KeepPart?| (|st|) "used in incLude1 for parsing" (eql (remainder |st| 10) 1)) -@ +\end{chunk} \defvar{SkipPart?} \calls{SkipPart?}{remainder} -<>= +\begin{chunk}{defun SkipPart?} (defun |SkipPart?| (|st|) "used in incLude1 for parsing" (eql (remainder |st| 10) 2)) -@ +\end{chunk} \defvar{Skipping?} \calls{Skipping?}{KeepPart?} -<>= +\begin{chunk}{defun Skipping?} (defun |Skipping?| (|st|) "used in incLude1 for parsing" (null (|KeepPart?| |st|))) -@ +\end{chunk} \defun{incLude1}{incLude1} \calls{incLude1}{StreamNull} @@ -3005,7 +2984,7 @@ contiguous comment spanning enough lines to overflow the stack. \calls{incLude1}{xlCmdBug} \calls{incLude1}{expand-tabs} \calls{incLude1}{incClassify} -<>= +\begin{chunk}{defun incLude1} (defun |incLude1| (&rest z) (let (pred s1 n tail head includee fn1 info str state lno states ufos ln ss eb) @@ -3174,58 +3153,58 @@ contiguous comment spanning enough lines to overflow the stack. (|incLude| eb (cdr ss) lno ufos (cdr states)))))) (t (cons (|xlCmdBug| eb str lno ufos) |StreamNil|)))))))) -@ +\end{chunk} \defun{xlPrematureEOF}{xlPrematureEOF} \calls{xlPrematureEOF}{xlMsg} \calls{xlPrematureEOF}{inclmsgPrematureEOF} -<>= +\begin{chunk}{defun xlPrematureEOF} (defun |xlPrematureEOF| (eb str lno ufos) (|xlMsg| eb str lno (elt ufos 0) (list (|inclmsgPrematureEOF| (elt ufos 0)) '|error|))) -@ +\end{chunk} \defun{xlMsg}{xlMsg} \calls{xlMsg}{incLine} -<>= +\begin{chunk}{defun xlMsg} (defun |xlMsg| (extrablanks string localnum fileobj mess) (let ((globalnum -1)) (list (incLine extrablanks string globalnum localnum fileobj) mess))) -@ +\end{chunk} \defun{xlOK}{xlOK} \calls{xlOK}{lxOK1} -<>= +\begin{chunk}{defun xlOK} (defun |xlOK| (extrablanks string localnum fileobj) (|xlOK1| extrablanks string string localnum fileobj)) -@ +\end{chunk} \defun{xlOK1}{xlOK1} \calls{xlOK1}{incLine1} -<>= +\begin{chunk}{defun xlOK1} (defun |xlOK1| (extrablanks string string1 localnum fileobj) (let ((globalnum -1)) (list (incLine1 extrablanks string string1 globalnum localnum fileobj) (list nil '|none|)))) -@ +\end{chunk} \defun{incAppend}{incAppend} \calls{incAppend}{Delay} \calls{incAppend}{incAppend1} -<>= +\begin{chunk}{defun incAppend} (defun |incAppend| (x y) (|Delay| #'|incAppend1| (list x y))) -@ +\end{chunk} \defun{incAppend1}{incAppend1} \calls{incAppend1}{StreamNull} \calls{incAppend1}{incAppend} -<>= +\begin{chunk}{defun incAppend1} (defun |incAppend1| (&rest z) (let (y x) (setq x (car z)) @@ -3236,54 +3215,54 @@ contiguous comment spanning enough lines to overflow the stack. (t (cons (car x) (|incAppend| (cdr x) y)))))) -@ +\end{chunk} \defun{incLine}{incLine} \calls{incLine}{incLine1} -<>= +\begin{chunk}{defun incLine} (defun incLine (extrablanks string globalnum localnum fileobj) (incLine1 extrablanks string string globalnum localnum fileobj)) -@ +\end{chunk} \defun{incLine1}{incLine1} \calls{incLine1}{lnCreate} -<>= +\begin{chunk}{defun incLine1} (defun incLine1 (extrablanks string string1 globalnum localnum fileobj) (cons (cons (|lnCreate| extrablanks string globalnum localnum fileobj) 1) string1)) -@ +\end{chunk} \defun{inclmsgPrematureEOF}{inclmsgPrematureEOF} \calls{inclmsgPrematureEOF}{origin} -<>= +\begin{chunk}{defun inclmsgPrematureEOF 0} (defun |inclmsgPrematureEOF| (ufo) (list 'S2CI0002 (list (|theorigin| ufo)))) -@ +\end{chunk} \defun{theorigin}{theorigin} -<>= +\begin{chunk}{defun theorigin 0} (defun |theorigin| (x) (list #'|porigin| x)) -@ +\end{chunk} \defun{porigin}{porigin} \calls{porigin}{stringp} -<>= +\begin{chunk}{defun porigin} (defun |porigin| (x) (if (stringp x) x (|pfname| x))) -@ +\end{chunk} \defun{ifCond}{ifCond} \calls{ifCond}{MakeSymbol} \calls{ifCond}{incCommandTail} \usesdollar{ifCond}{inclAssertions} -<>= +\begin{chunk}{defun ifCond} (defun |ifCond| (s info) (let (word) (declare (special |$inclAssertions|)) @@ -3291,100 +3270,100 @@ contiguous comment spanning enough lines to overflow the stack. (|MakeSymbol| (string-trim *whitespace* (|incCommandTail| s info)))) (member word |$inclAssertions|))) -@ +\end{chunk} \defun{xlSkip}{xlSkip} \calls{xlSkip}{incLine} \calls{xlSkip}{CONCAT} -<>= +\begin{chunk}{defun xlSkip} (defun |xlSkip| (extrablanks str localnum fileobj) (let ((string (concat "-- Omitting:" str)) (globalnum -1)) (list (incLine extrablanks string globalnum localnum fileobj) (list nil '|none|)))) -@ +\end{chunk} \defun{xlSay}{xlSay} \calls{xlSay}{xlMsg} \calls{xlSay}{inclmsgSay} -<>= +\begin{chunk}{defun xlSay} (defun |xlSay| (eb str lno ufos x) (|xlMsg| eb str lno (elt ufos 0) (list (|inclmsgSay| x) '|say|))) -@ +\end{chunk} \defun{inclmsgSay}{inclmsgSay} \calls{inclmsgSay}{id} -<>= +\begin{chunk}{defun inclmsgSay} (defun |inclmsgSay| (str) (list 'S2CI0001 (list (|theid| str)))) -@ +\end{chunk} \defun{theid}{theid} -<>= +\begin{chunk}{defun theid 0} (defun |theid| (a) (list identity a)) -@ +\end{chunk} \defun{xlNoSuchFile}{xlNoSuchFile} \calls{xlNoSuchFile}{xlMsg} \calls{xlNoSuchFile}{inclmsgNoSuchFile} -<>= +\begin{chunk}{defun xlNoSuchFile} (defun |xlNoSuchFile| (eb str lno ufos fn) (|xlMsg| eb str lno (elt ufos 0) (list (|inclmsgNoSuchFile| fn) '|error|))) -@ +\end{chunk} \defun{inclmsgNoSuchFile}{inclmsgNoSuchFile} \calls{inclmsgNoSuchFile}{thefname} -<>= +\begin{chunk}{defun inclmsgNoSuchFile} (defun |inclmsgNoSuchFile| (fn) (list 'S2CI0010 (list (|thefname| fn)))) -@ +\end{chunk} \defun{thefname}{thefname} \calls{thefname}{pfname} -<>= +\begin{chunk}{defun thefname 0} (defun |thefname| (x) (list #'|pfname| x)) -@ +\end{chunk} \defun{pfname}{pfname} \calls{pfname}{PathnameString} -<>= +\begin{chunk}{defun pfname} (defun |pfname| (x) (|PathnameString| x)) -@ +\end{chunk} \defun{xlCannotRead}{xlCannotRead} \calls{xlCannotRead}{xlMsg} \calls{xlCannotRead}{inclmsgCannotRead} -<>= +\begin{chunk}{defun xlCannotRead} (defun |xlCannotRead| (eb str lno ufos fn) (|xlMsg| eb str lno (elt ufos 0) (list (|inclmsgCannotRead| fn) '|error|))) -@ +\end{chunk} \defun{inclmsgCannotRead}{inclmsgCannotRead} \calls{inclmsgCannotRead}{thefname} -<>= +\begin{chunk}{defun inclmsgCannotRead} (defun |inclmsgCannotRead| (fn) (list 'S2CI0011 (list (|thefname| fn)))) -@ +\end{chunk} \defun{xlFileCycle}{xlFileCycle} \calls{xlFileCycle}{xlMsg} \calls{xlFileCycle}{inclmsgFileCycle} -<>= +\begin{chunk}{defun xlFileCycle} (defun |xlFileCycle| (eb str lno ufos fn) (|xlMsg| eb str lno (elt ufos 0) (list (|inclmsgFileCycle| ufos fn) '|error|))) -@ +\end{chunk} \defun{inclmsgFileCycle}{inclmsgFileCycle} \begin{verbatim} @@ -3397,7 +3376,7 @@ contiguous comment spanning enough lines to overflow the stack. \end{verbatim} \calls{inclmsgFileCycle}{porigin} \calls{inclmsgFileCycle}{id} -<>= +\begin{chunk}{defun inclmsgFileCycle} (defun |inclmsgFileCycle| (ufos fn) (let (cycle f1 flist) (setq flist @@ -3425,99 +3404,99 @@ contiguous comment spanning enough lines to overflow the stack. (cons f1 nil))) (list 'S2CI0004 (list (|theid| cycle) (|theid| f1))))) -@ +\end{chunk} \defun{xlConActive}{xlConActive} \calls{xlConActive}{xlMsg} \calls{xlConActive}{inclmsgConActive} -<>= +\begin{chunk}{defun xlConActive} (defun |xlConActive| (eb str lno ufos n) (|xlMsg| eb str lno (elt ufos 0) (list (|inclmsgConActive| n) '|warning|))) -@ +\end{chunk} \defun{inclmsgConActive}{inclmsgConActive} \calls{inclmsgConActive}{id} -<>= +\begin{chunk}{defun inclmsgConActive} (defun |inclmsgConActive| (n) (list 'S2CI0006 (list (|theid| n)))) -@ +\end{chunk} \defun{xlConStill}{xlConStill} \calls{xlConStill}{xlMsg} \calls{xlConStill}{inclmsgConStill} -<>= +\begin{chunk}{defun xlConStill} (defun |xlConStill| (eb str lno ufos n) (|xlMsg| eb str lno (elt ufos 0) (list (|inclmsgConStill| n) '|say|))) -@ +\end{chunk} \defun{inclmsgConStill}{inclmsgConStill} \calls{inclmsgConStill}{id} -<>= +\begin{chunk}{defun inclmsgConStill} (defun |inclmsgConStill| (n) (list 'S2CI0007 (list (|theid| n)))) -@ +\end{chunk} \defun{xlConsole}{xlConsole} \calls{xlConsole}{xlMsg} \calls{xlConsole}{inclmsgConsole} -<>= +\begin{chunk}{defun xlConsole} (defun |xlConsole| (eb str lno ufos) (|xlMsg| eb str lno (elt ufos 0) (list (|inclmsgConsole|) '|say|))) -@ +\end{chunk} \defun{inclmsgConsole}{inclmsgConsole} -<>= +\begin{chunk}{defun inclmsgConsole 0} (defun |inclmsgConsole| () (list 'S2CI0005 nil)) -@ +\end{chunk} \defun{xlSkippingFin}{xlSkippingFin} \calls{xlSkippingFin}{xlMsg} \calls{xlSkippingFin}{inclmsgFinSkipped} -<>= +\begin{chunk}{defun xlSkippingFin} (defun |xlSkippingFin| (eb str lno ufos) (|xlMsg| eb str lno (elt ufos 0) (list (|inclmsgFinSkipped|) '|warning|))) -@ +\end{chunk} \defun{inclmsgFinSkipped}{inclmsgFinSkipped} -<>= +\begin{chunk}{defun inclmsgFinSkipped 0} (defun |inclmsgFinSkipped| () (list 'S2CI0008 nil)) -@ +\end{chunk} \defun{xlPrematureFin}{xlPrematureFin} \calls{xlPrematureFin}{xlMsg} \calls{xlPrematureFin}{inclmsgPrematureFin} -<>= +\begin{chunk}{defun xlPrematureFin} (defun |xlPrematureFin| (eb str lno ufos) (|xlMsg| eb str lno (elt ufos 0) (list (|inclmsgPrematureFin| (elt ufos 0)) '|error|))) -@ +\end{chunk} \defun{inclmsgPrematureFin}{inclmsgPrematureFin} \calls{inclmsgPrematureFin}{origin} -<>= +\begin{chunk}{defun inclmsgPrematureFin} (defun |inclmsgPrematureFin| (ufo) (list 'S2CI0003 (list (|theorigin| ufo)))) -@ +\end{chunk} \defun{assertCond}{assertCond} \calls{assertCond}{MakeSymbol} \calls{assertCond}{incCommandTail} \usesdollar{assertCond}{inclAssertions} \uses{assertCond}{*whitespace*} -<>= +\begin{chunk}{defun assertCond} (defun |assertCond| (s info) (let (word) (declare (special |$inclAssertions| *whitespace*)) @@ -3526,14 +3505,14 @@ contiguous comment spanning enough lines to overflow the stack. (unless (member word |$inclAssertions|) (setq |$inclAssertions| (cons word |$inclAssertions|))))) -@ +\end{chunk} \defun{xlIfSyntax}{xlIfSyntax} \calls{xlIfSyntax}{Top?} \calls{xlIfSyntax}{Else?} \calls{xlIfSyntax}{xlMsg} \calls{xlIfSyntax}{inclmsgIfSyntax} -<>= +\begin{chunk}{defun xlIfSyntax} (defun |xlIfSyntax| (eb str lno ufos info sts) (let (context found st) (setq st (elt sts 0)) @@ -3546,61 +3525,61 @@ contiguous comment spanning enough lines to overflow the stack. (|xlMsg| eb str lno (elt ufos 0) (list (|inclmsgIfSyntax| (elt ufos 0) found context) '|error|)))) -@ +\end{chunk} \defun{inclmsgIfSyntax}{inclmsgIfSyntax} \calls{inclmsgIfSyntax}{concat} \calls{inclmsgIfSyntax}{id} \calls{inclmsgIfSyntax}{origin} -<>= +\begin{chunk}{defun inclmsgIfSyntax} (defun |inclmsgIfSyntax| (ufo found context) (setq found (concat ")" found)) (list 'S2CI0009 (list (|theid| found) (|theid| context) (|theorigin| ufo)))) -@ +\end{chunk} \defun{xlIfBug}{xlIfBug} \calls{xlIfBug}{xlMsg} \calls{xlIfBug}{inclmsgIfBug} -<>= +\begin{chunk}{defun xlIfBug} (defun |xlIfBug| (eb str lno ufos) (|xlMsg| eb str lno (elt ufos 0) (list (|inclmsgIfBug|) '|bug|))) -@ +\end{chunk} \defun{inclmsgIfBug}{inclmsgIfBug} -<>= +\begin{chunk}{defun inclmsgIfBug 0} (defun |inclmsgIfBug| () (list 'S2CB0002 nil)) -@ +\end{chunk} \defun{xlCmdBug}{xlCmdBug} \calls{xlCmdBug}{xlMsg} \calls{xlCmdBug}{inclmsgCmdBug} -<>= +\begin{chunk}{defun xlCmdBug} (defun |xlCmdBug| (eb str lno ufos) (|xlMsg| eb str lno (elt ufos 0) (list (|inclmsgCmdBug|) '|bug|))) -@ +\end{chunk} \defun{inclmsgCmdBug}{inclmsgCmdBug} -<>= +\begin{chunk}{defun inclmsgCmdBug 0} (defun |inclmsgCmdBug| () (list 'S2CB0003 nil)) -@ +\end{chunk} \defvar{incCommands} This is a list of commands that can be in an include file -<>= +\begin{chunk}{postvars} (eval-when (eval load) (setq |incCommands| (list "say" "include" "console" "fin" "assert" "if" "elseif" "else" "endif"))) -@ +\end{chunk} \defdollar{pfMacros} The \$pfMacros variable is an alist [ [id, state, body-pform], ...] @@ -3618,10 +3597,10 @@ b ==> 7 (|a| |mbody| ((|integer| (|posn| (0 "a ==> 3" 1 1 "strings") . 6)) . "3")) ) \end{verbatim} -<>= -(defvar |$pfMacros| nil)) +\begin{chunk}{initvars} +(defvar |$pfMacros| nil) -@ +\end{chunk} \defun{incClassify}{incClassify} @@ -3641,7 +3620,7 @@ b ==> 7 \end{verbatim} \calls{incClassify}{incCommand?} \uses{incClassify}{incCommands} -<>= +\begin{chunk}{defun incClassify} (defun |incClassify| (s) (let (p1 bad eb n i) (declare (special |incCommands|)) @@ -3683,16 +3662,16 @@ b ==> 7 (list t 0 "other") (list t eb p1)))))))) -@ +\end{chunk} \defun{incCommand?}{incCommand?} \calls{incCommand?}{char} -<>= +\begin{chunk}{defun incCommand? 0} (defun |incCommand?| (s) "does this start with a close paren?" (and (< 0 (length s)) (equal (elt s 0) (|char| '|)|)))) -@ +\end{chunk} \defun{incPrefix?}{incPrefix?} \begin{verbatim} @@ -3703,7 +3682,7 @@ b ==> 7 ; good:= prefix.i = whole.j ; good \end{verbatim} -<>= +\begin{chunk}{defun incPrefix? 0} (defun |incPrefix?| (prefix start whole) (let (good) (cond @@ -3720,102 +3699,102 @@ b ==> 7 (- (length prefix) 1) 0 start) good)))) -@ +\end{chunk} \defun{incCommandTail}{incCommandTail} \calls{incCommandTail}{incDrop} -<>= +\begin{chunk}{defun incCommandTail} (defun |incCommandTail| (s info) (let ((start (elt info 1))) (when (= start 0) (setq start 1)) (|incDrop| (+ start (length (elt info 2)) 1) s))) -@ +\end{chunk} \defun{incDrop}{incDrop} \calls{incDrop}{substring} -<>= +\begin{chunk}{defun incDrop 0} (defun |incDrop| (n b) (if (>= n (length b)) '|| (substring b n nil))) -@ +\end{chunk} \defun{inclFname}{inclFname} \calls{inclFname}{incFileName} \calls{inclFname}{incCommandTail} -<>= +\begin{chunk}{defun inclFname} (defun |inclFname| (s info) (|incFileName| (|incCommandTail| s info))) -@ +\end{chunk} \defun{incFileInput}{incFileInput} \calls{incFileInput}{incRgen} \calls{incFileInput}{make-instream} -<>= +\begin{chunk}{defun incFileInput} (defun |incFileInput| (fn) (|incRgen| (make-instream fn))) -@ +\end{chunk} \defun{incConsoleInput}{incConsoleInput} \calls{incConsoleInput}{incRgen} \calls{incConsoleInput}{make-instream} -<>= +\begin{chunk}{defun incConsoleInput} (defun |incConsoleInput| () (|incRgen| (make-instream 0))) -@ +\end{chunk} \defun{incNConsoles}{incNConsoles} \calls{incNConsoles}{incNConsoles} -<>= +\begin{chunk}{defun incNConsoles} (defun |incNConsoles| (ufos) (let ((a (member "console" ufos))) (if a (+ 1 (|incNConsoles| (cdr a))) 0))) -@ +\end{chunk} \defun{incActive?}{incActive?} -<>= +\begin{chunk}{defun incActive? 0} (defun |incActive?| (fn ufos) (member fn ufos)) -@ +\end{chunk} \defun{incRgen}{incRgen} Note that incRgen1 recursively calls this function. \calls{incRgen}{Delay} \calls{incRgen}{incRgen1} -<>= +\begin{chunk}{defun incRgen} (defun |incRgen| (s) (|Delay| #'|incRgen1| (list s))) -@ +\end{chunk} \defun{Delay}{Delay} -<>= +\begin{chunk}{defun Delay 0} (defun |Delay| (f x) (cons '|nonnullstream| (cons f x))) -@ +\end{chunk} \defvar{StreamNil} -<>= +\begin{chunk}{initvars} (defvar |StreamNil| (list '|nullstream|)) -@ +\end{chunk} \defvar{StreamNil} -<>= +\begin{chunk}{postvars} (eval-when (eval load) (setq |StreamNil| (list '|nullstream|))) -@ +\end{chunk} \defun{incRgen1}{incRgen1} This function reads a line from the stream and then conses it up @@ -3823,7 +3802,7 @@ with a recursive call to incRgen. Note that incRgen recursively wraps this function in a delay list. \calls{incRgen1}{incRgen} \uses{incRgen1}{StreamNil} -<>= +\begin{chunk}{defun incRgen1} (defun |incRgen1| (&rest z) (let (a s) (declare (special |StreamNil|)) @@ -3835,96 +3814,96 @@ Note that incRgen recursively wraps this function in a delay list. |StreamNil|) (cons a (|incRgen| s))))) -@ +\end{chunk} \chapter{The Token Scanner} \defvar{space} -<>= +\begin{chunk}{postvars} (eval-when (eval load) (defvar space (qenum " " 0))) -@ +\end{chunk} \defvar{escape} -<>= +\begin{chunk}{postvars} (eval-when (eval load) (defvar escape (qenum "_ " 0))) -@ +\end{chunk} \defvar{stringchar} -<>= +\begin{chunk}{postvars} (eval-when (eval load) (defvar stringchar (qenum "\" " 0))) -@ +\end{chunk} \defvar{pluscomment} -<>= +\begin{chunk}{postvars} (eval-when (eval load) (defvar pluscomment (qenum "+ " 0))) -@ +\end{chunk} \defvar{minuscomment} -<>= +\begin{chunk}{postvars} (eval-when (eval load) (defvar minuscomment (qenum "- " 0))) -@ +\end{chunk} \defvar{radixchar} -<>= +\begin{chunk}{postvars} (eval-when (eval load) (defvar radixchar (qenum "r " 0))) -@ +\end{chunk} \defvar{dot} -<>= +\begin{chunk}{postvars} (eval-when (eval load) (defvar dot (qenum ". " 0))) -@ +\end{chunk} \defvar{exponent1} -<>= +\begin{chunk}{postvars} (eval-when (eval load) (defvar exponent1 (qenum "E " 0))) -@ +\end{chunk} \defvar{exponent2} -<>= +\begin{chunk}{postvars} (eval-when (eval load) (defvar exponent2 (qenum "e " 0))) -@ +\end{chunk} \defvar{closeparen} -<>= +\begin{chunk}{postvars} (eval-when (eval load) (defvar closeparen (qenum ") " 0))) -@ +\end{chunk} \defvar{closeangle} -<>= +\begin{chunk}{postvars} (eval-when (eval load) (defvar closeangle (qenum "> " 0))) -@ +\end{chunk} \defvar{question} -<>= +\begin{chunk}{postvars} (eval-when (eval load) (defvar question (qenum "? " 0))) -@ +\end{chunk} \defvar{scanKeyWords} -<>= +\begin{chunk}{postvars} (eval-when (eval load) (defvar |scanKeyWords| (list @@ -4023,10 +4002,10 @@ Note that incRgen recursively wraps this function in a delay list. (list "'" '|'|) (list "`" 'backquote)))) -@ +\end{chunk} \defvar{infgeneric} -<>= +\begin{chunk}{postvars} (eval-when (eval load) (prog () (return @@ -4069,7 +4048,8 @@ Note that incRgen recursively wraps this function in a delay list. (list 'bar '|\||) (list 'seg '|..|)) nil)))) -@ + +\end{chunk} \defun{lineoftoks}{lineoftoks} lineoftoks bites off a token-dq from a line-stream @@ -4114,7 +4094,7 @@ returning the token-dq and the rest of the line-stream \usesdollar{lineoftoks}{r} \usesdollar{lineoftoks}{n} \usesdollar{lineoftoks}{ln} -<>= +\begin{chunk}{defun lineoftoks} (defun |lineoftoks| (s) (let (|$floatok| |$sz| |$n| |$linepos| |$ln| |$r| |$f| |b| |a| |toks|) (declare (special |$floatok| |$f| |$sz| |$linepos| |$r| |$n| |$ln|)) @@ -4147,7 +4127,7 @@ returning the token-dq and the rest of the line-stream ((null |toks|) (cons nil |$r|)) (t (cons (list (list |toks| s)) |$r|))))))))) -@ +\end{chunk} \defun{nextline}{nextline} \calls{nextline}{npNull} @@ -4158,7 +4138,7 @@ returning the token-dq and the rest of the line-stream \usesdollar{nextline}{ln} \usesdollar{nextline}{r} \usesdollar{nextline}{f} -<>= +\begin{chunk}{defun nextline} (defun |nextline| (s) (declare (special |$sz| |$n| |$linepos| |$ln| |$r| |$f|)) (cond @@ -4172,12 +4152,12 @@ returning the token-dq and the rest of the line-stream (setq |$sz| (length |$ln|)) t))) -@ +\end{chunk} \defun{scanIgnoreLine}{scanIgnoreLine} \calls{scanIgnoreLine}{qenum} \calls{scanIgnoreLine}{incPrefix?} -<>= +\begin{chunk}{defun scanIgnoreLine} (defun |scanIgnoreLine| (ln n) (let (fst) (cond @@ -4191,11 +4171,11 @@ returning the token-dq and the rest of the line-stream (t nil))) (t n)))))) -@ +\end{chunk} \defun{constoken}{constoken} \calls{constoken}{ncPutQ} -<>= +\begin{chunk}{defun constoken} (defun |constoken| (ln lp b n) (declare (ignore ln)) (let (a) @@ -4203,7 +4183,7 @@ returning the token-dq and the rest of the line-stream (|ncPutQ| a '|posn| (cons lp n)) a)) -@ +\end{chunk} \defun{scanToken}{scanToken} \calls{scanToken}{qenum} @@ -4228,7 +4208,7 @@ returning the token-dq and the rest of the line-stream \usesdollar{scanToken}{linepos} \usesdollar{scanToken}{n} \usesdollar{scanToken}{ln} -<>= +\begin{chunk}{defun scanToken} (defun |scanToken| () (let (b ch n linepos c ln) (declare (special |$linepos| |$n| |$ln|)) @@ -4257,15 +4237,15 @@ returning the token-dq and the rest of the line-stream (|dqUnit| (|constoken| ln linepos b (+ n (|lnExtraBlanks| linepos)))))))) -@ +\end{chunk} \defun{lfid}{lfid} To pair badge and badgee -<>= +\begin{chunk}{defun lfid 0} (defun |lfid| (x) (list '|id| (intern x "BOOT"))) -@ +\end{chunk} \defun{startsComment?}{startsComment?} \calls{startsComment?}{qenum} @@ -4273,7 +4253,7 @@ To pair badge and badgee \usesdollar{startsComment?}{sz} \usesdollar{startsComment?}{n} \uses{startsComment?}{pluscomment} -<>= +\begin{chunk}{defun startsComment?} (defun |startsComment?| () (let (www) (declare (special |$ln| |$sz| |$n| pluscomment)) @@ -4288,7 +4268,7 @@ To pair badge and badgee (t nil))) (t nil)))) -@ +\end{chunk} \defun{scanComment}{scanComment} \calls{scanComment}{lfcomment} @@ -4296,7 +4276,7 @@ To pair badge and badgee \usesdollar{scanComment}{ln} \usesdollar{scanComment}{sz} \usesdollar{scanComment}{n} -<>= +\begin{chunk}{defun scanComment} (defun |scanComment| () (let (n) (declare (special |$ln| |$sz| |$n|)) @@ -4304,21 +4284,21 @@ To pair badge and badgee (setq |$n| |$sz|) (|lfcomment| (substring |$ln| n nil)))) -@ +\end{chunk} \defun{lfcomment}{lfcomment} -<>= +\begin{chunk}{defun lfcomment 0} (defun |lfcomment| (x) (list '|comment| x)) -@ +\end{chunk} \defun{startsNegComment?}{startsNegComment?} \calls{startsNegComment?}{qenum} \usesdollar{startsNegComment?}{ln} \usesdollar{startsNegComment?}{sz} \usesdollar{startsNegComment?}{n} -<>= +\begin{chunk}{defun startsNegComment?} (defun |startsNegComment?| () (let (www) (declare (special |$ln| |$sz| |$n|)) @@ -4333,7 +4313,7 @@ To pair badge and badgee (t nil))) (t nil)))) -@ +\end{chunk} \defun{scanNegComment}{scanNegComment} \calls{scanNegComment}{lfnegcomment} @@ -4341,7 +4321,7 @@ To pair badge and badgee \usesdollar{scanNegComment}{ln} \usesdollar{scanNegComment}{sz} \usesdollar{scanNegComment}{n} -<>= +\begin{chunk}{defun scanNegComment} (defun |scanNegComment| () (let (n) (declare (special |$ln| |$sz| |$n|)) @@ -4349,20 +4329,21 @@ To pair badge and badgee (setq |$n| |$sz|) (|lfnegcomment| (substring |$ln| n nil)))) -@ +\end{chunk} \defun{lfnegcomment}{lfnegcomment} -<>= +\begin{chunk}{defun lfnegcomment 0} (defun |lfnegcomment| (x) (list '|negcomment| x)) -@ +\end{chunk} \defun{punctuation?}{punctuation?} -<>= +\begin{chunk}{defun punctuation?} (defun |punctuation?| (c) (eql (elt |scanPun| c) 1)) -@ + +\end{chunk} \defun{scanPunct}{scanPunct} \calls{scanPunct}{subMatch} @@ -4370,7 +4351,7 @@ To pair badge and badgee \calls{scanPunct}{scanKeyTr} \usesdollar{scanPunct}{n} \usesdollar{scanPunct}{ln} -<>= +\begin{chunk}{defun scanPunct} (defun |scanPunct| () (let (a sss) (declare (special |$n| |$ln|)) @@ -4380,15 +4361,15 @@ To pair badge and badgee ((eql a 0) (|scanError|)) (t (setq |$n| (+ |$n| a)) (|scanKeyTr| sss))))) -@ +\end{chunk} \defun{subMatch}{subMatch} \calls{subMatch}{substringMatch} -<>= +\begin{chunk}{defun subMatch} (defun |subMatch| (a b) (|substringMatch| a |scanDict| b)) -@ +\end{chunk} \defun{substringMatch}{substringMatch} \begin{verbatim} @@ -4416,7 +4397,7 @@ To pair badge and badgee \end{verbatim} \calls{substringMatch}{qenum} \calls{substringMatch}{size} -<>= +\begin{chunk}{defun substringMatch} (defun |substringMatch| (l dict i) (let (equl ls s s1 done ll u h) (setq h (qenum l i)) @@ -4448,7 +4429,7 @@ To pair badge and badgee (- (size u) 1) 0) s1)) -@ +\end{chunk} \defun{scanKeyTr}{scanKeyTr} \calls{scanKeyTr}{keyword} @@ -4456,7 +4437,7 @@ To pair badge and badgee \calls{scanKeyTr}{lfkey} \calls{scanKeyTr}{scanCloser?} \usesdollar{scanKeyTr}{floatok} -<>= +\begin{chunk}{defun scanKeyTr} (defun |scanKeyTr| (w) (declare (special |$floatok|)) (cond @@ -4466,23 +4447,23 @@ To pair badge and badgee (t (|lfkey| w)))) (t (setq |$floatok| (null (|scanCloser?| w))) (|lfkey| w)))) -@ +\end{chunk} \defun{keyword}{keyword} \calls{keyword}{hget} -<>= +\begin{chunk}{defun keyword 0} (defun |keyword| (st) (hget |scanKeyTable| st)) -@ +\end{chunk} \defun{keyword?}{keyword?} \calls{keyword?}{hget} -<>= +\begin{chunk}{defun keyword? 0} (defun |keyword?| (st) (null (null (hget |scanKeyTable| st)))) -@ +\end{chunk} \defun{scanPossFloat}{scanPossFloat} \calls{scanPossFloat}{digit?} @@ -4492,7 +4473,7 @@ To pair badge and badgee \usesdollar{scanPossFloat}{ln} \usesdollar{scanPossFloat}{sz} \usesdollar{scanPossFloat}{n} -<>= +\begin{chunk}{defun scanPossFloat} (defun |scanPossFloat| (w) (declare (special |$ln| |$sz| |$n|)) (cond @@ -4501,31 +4482,31 @@ To pair badge and badgee (t (setq w (|spleI| #'|digit?|)) (|scanExponent| "0" w)))) -@ +\end{chunk} \defun{digit?}{digit?} \calls{digit?}{digitp} -<>= +\begin{chunk}{defun digit?} (defun |digit?| (x) (digitp x)) -@ +\end{chunk} \defun{lfkey}{lfkey} \calls{lfkey}{keyword} -<>= +\begin{chunk}{defun lfkey} (defun |lfkey| (x) (list '|key| (|keyword| x))) -@ +\end{chunk} \defun{spleI}{spleI} \calls{spleI}{spleI1} -<>= +\begin{chunk}{defun spleI} (defun |spleI| (dig) (|spleI1| dig nil)) -@ +\end{chunk} \defun{spleI1}{spleI1} \calls{spleI1}{qenum} @@ -4536,7 +4517,7 @@ To pair badge and badgee \usesdollar{spleI1}{ln} \usesdollar{spleI1}{sz} \usesdollar{spleI1}{n} -<>= +\begin{chunk}{defun spleI1} (defun |spleI1| (dig zro) (let (bb a str l n) (declare (special |$ln| |$sz| |$n|)) @@ -4562,7 +4543,7 @@ To pair badge and badgee (setq bb (|spleI1| dig zro)) ; escape, any number of spaces are ignored (concat str bb))))) -@ +\end{chunk} \defun{scanEsc}{scanEsc} \begin{verbatim} @@ -4609,7 +4590,7 @@ To pair badge and badgee \usesdollar{scanEsc}{r} \usesdollar{scanEsc}{sz} \usesdollar{scanEsc}{n} -<>= +\begin{chunk}{defun scanEsc} (defun |scanEsc| () (let (n1) (declare (special |$ln| |$r| |$sz| |$n|)) @@ -4653,23 +4634,24 @@ To pair badge and badgee nil)) (t nil)))))))) -@ +\end{chunk} \defvar{scanCloser} -<>= +\begin{chunk}{postvars} (eval-when (eval load) (defvar |scanCloser| (list '|)| '} '] '|\|)| '|\|}| '|\|]|))) -@ + +\end{chunk} \defun{scanCloser?}{scanCloser?} \calls{scanCloser?}{keyword} \uses{scanCloser?}{scanCloser} -<>= +\begin{chunk}{defun scanCloser? 0} (defun |scanCloser?| (w) (declare (special |scanCloser|)) (member (|keyword| w) |scanCloser|)) -@ +\end{chunk} \defun{scanWord}{scanWord} \calls{scanWord}{scanW} @@ -4677,7 +4659,7 @@ To pair badge and badgee \calls{scanWord}{keyword?} \calls{scanWord}{lfkey} \usesdollar{scanWord}{floatok} -<>= +\begin{chunk}{defun scanWord} (defun |scanWord| (esp) (let (w aaa) (declare (special |$floatok|)) @@ -4693,7 +4675,7 @@ To pair badge and badgee (t (|lfid| w))))) -@ +\end{chunk} \defun{scanExponent}{scanExponent} \calls{scanExponent}{lffloat} @@ -4704,7 +4686,7 @@ To pair badge and badgee \usesdollar{scanExponent}{ln} \usesdollar{scanExponent}{sz} \usesdollar{scanExponent}{n} -<>= +\begin{chunk}{defun scanExponent} (defun |scanExponent| (a w) (let (c1 e c n) (declare (special |$ln| |$sz| |$n|)) @@ -4744,22 +4726,22 @@ To pair badge and badgee (|lffloat| a w "0")))))))) (t (|lffloat| a w "0"))))))) -@ +\end{chunk} \defun{lffloat}{lffloat} \calls{lffloat}{concat} -<>= +\begin{chunk}{defun lffloat 0} (defun |lffloat| (a w e) (list '|float| (concat a "." w "e" e))) -@ +\end{chunk} \defmacro{idChar?} -<>= +\begin{chunk}{defmacro idChar? 0} (defmacro |idChar?| (x) `(or (alphanumericp ,x) (member ,x '(#\? #\% #\' #\!) :test #'char=))) - -@ + +\end{chunk} \defun{scanW}{scanW} \calls{scanW}{posend} @@ -4772,7 +4754,7 @@ To pair badge and badgee \usesdollar{scanW}{ln} \usesdollar{scanW}{sz} \usesdollar{scanW}{n} -<>= +\begin{chunk}{defun scanW} (defun |scanW| (b) (let (bb a str endid l n1) (declare (special |$ln| |$sz| |$n|)) @@ -4796,7 +4778,7 @@ To pair badge and badgee (t (list b "")))) (list (or (elt bb 0) b) (concat str (elt bb 1))))))) -@ +\end{chunk} \defun{posend}{posend} \begin{verbatim} @@ -4805,7 +4787,7 @@ To pair badge and badgee ; n \end{verbatim} NOTE: do not replace ``lyne'' with ``line'' -<>= +\begin{chunk}{defun posend} (defun |posend| (lyne n) ((lambda () (loop @@ -4815,7 +4797,7 @@ NOTE: do not replace ``lyne'' with ``line'' (t (setq n (+ n 1))))))) n) -@ +\end{chunk} \defun{scanSpace}{scanSpace} \calls{scanSpace}{strposl} @@ -4823,7 +4805,7 @@ NOTE: do not replace ``lyne'' with ``line'' \usesdollar{scanSpace}{floatok} \usesdollar{scanSpace}{ln} \usesdollar{scanSpace}{n} -<>= +\begin{chunk}{defun scanSpace} (defun |scanSpace| () (let (n) (declare (special |$floatok| |$ln| |$n|)) @@ -4833,37 +4815,37 @@ NOTE: do not replace ``lyne'' with ``line'' (setq |$floatok| t) (|lfspaces| (- |$n| n)))) -@ +\end{chunk} \defun{lfspaces}{lfspaces} -<>= +\begin{chunk}{defun lfspaces 0} (defun |lfspaces| (x) (list '|spaces| x)) -@ +\end{chunk} \defun{scanString}{scanString} \calls{scanString}{lfstring} \calls{scanString}{scanS} \usesdollar{scanString}{floatok} \usesdollar{scanString}{n} -<>= +\begin{chunk}{defun scanString} (defun |scanString| () (declare (special |$floatok| |$n|)) (setq |$n| (+ |$n| 1)) (setq |$floatok| nil) (|lfstring| (|scanS|))) -@ +\end{chunk} \defun{lfstring}{lfstring} -<>= +\begin{chunk}{defun lfstring 0} (defun |lfstring| (x) (if (eql (length x) 1) (list '|char| x) (list '|string| x))) -@ +\end{chunk} \defun{scanS}{scanS} \calls{scanS}{ncSoftError} @@ -4878,7 +4860,7 @@ NOTE: do not replace ``lyne'' with ``line'' \usesdollar{scanS}{linepos} \usesdollar{scanS}{sz} \usesdollar{scanS}{n} -<>= +\begin{chunk}{defun scanS} (defun |scanS| () (let (b a str mn escsym strsym n) (declare (special |$ln| |$linepos| |$sz| |$n|)) @@ -4912,13 +4894,13 @@ NOTE: do not replace ``lyne'' with ``line'' (t (|scanS|)))) (concat str b))))))) -@ +\end{chunk} \defun{scanTransform}{scanTransform} -<>= +\begin{chunk}{defun scanTransform} (defun |scanTransform| (x) x) -@ +\end{chunk} \defun{scanNumber}{scanNumber} \calls{scanNumber}{spleI} @@ -4933,7 +4915,7 @@ NOTE: do not replace ``lyne'' with ``line'' \usesdollar{scanNumber}{ln} \usesdollar{scanNumber}{sz} \usesdollar{scanNumber}{n} -<>= +\begin{chunk}{defun scanNumber} (defun |scanNumber| () (let (v w n a) (declare (special |$floatok| |$ln| |$sz| |$n|)) @@ -4974,30 +4956,30 @@ NOTE: do not replace ``lyne'' with ``line'' (|scanExponent| (concat a "r" w) v)))) (t (|lfrinteger| a w))))))) -@ +\end{chunk} \defun{rdigit?}{rdigit?} \calls{rdigit?}{strpos} -<>= +\begin{chunk}{defun rdigit? 0} (defun |rdigit?| (x) (strpos x "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" 0 nil)) -@ +\end{chunk} \defun{lfinteger}{lfinteger} -<>= +\begin{chunk}{defun lfinteger 0} (defun |lfinteger| (x) (list '|integer| x)) -@ +\end{chunk} \defun{lfrinteger}{lfrinteger} \calls{lfrinteger}{concat} -<>= +\begin{chunk}{defun lfrinteger 0} (defun |lfrinteger| (r x) (list '|integer| (concat r (concat "r" x)))) -@ +\end{chunk} \defun{scanCheckRadix}{scanCheckRadix} \begin{verbatim} @@ -5012,7 +4994,7 @@ NOTE: do not replace ``lyne'' with ``line'' \end{verbatim} \usesdollar{scanCheckRadix}{n} \usesdollar{scanCheckRadix}{linepos} -<>= +\begin{chunk}{defun scanCheckRadix} (defun |scanCheckRadix| (r w) (let (a ns) (declare (special |$n| |$linepos|)) @@ -5031,19 +5013,19 @@ NOTE: do not replace ``lyne'' with ``line'' (setq i (+ i 1)))) (- ns 1) 0))) -@ +\end{chunk} \defun{scanEscape}{scanEscape} \calls{scanEscape}{scanEsc} \calls{scanEscape}{scanWord} \usesdollar{scanEscape}{n} -<>= +\begin{chunk}{defun scanEscape} (defun |scanEscape| () (declare (special |$n|)) (setq |$n| (+ |$n| 1)) (when (|scanEsc|) (|scanWord| t))) -@ +\end{chunk} \defun{scanError}{scanError} \calls{scanError}{ncSoftError} @@ -5052,7 +5034,7 @@ NOTE: do not replace ``lyne'' with ``line'' \usesdollar{scanError}{ln} \usesdollar{scanError}{linepos} \usesdollar{scanError}{n} -<>= +\begin{chunk}{defun scanError} (defun |scanError| () (let (n) (declare (special |$ln| |$linepos| |$n|)) @@ -5063,20 +5045,21 @@ NOTE: do not replace ``lyne'' with ``line'' 'S2CN0003 (list (elt |$ln| n))) (|lferror| (elt |$ln| n)))) -@ +\end{chunk} \defun{lferror}{lferror} -<>= +\begin{chunk}{defun lferror 0} (defun |lferror| (x) (list '|error| x)) -@ +\end{chunk} \defvar{scanKeyTable} -<>= +\begin{chunk}{postvars} (eval-when (eval load) (defvar |scanKeyTable| (|scanKeyTableCons|))) -@ + +\end{chunk} \defun{scanKeyTableCons}{scanKeyTableCons} This function is used to build the scanKeyTable @@ -5087,7 +5070,7 @@ This function is used to build the scanKeyTable ; HPUT(KeyTable,CAR st,CADR st) ; KeyTable \end{verbatim} -<>= +\begin{chunk}{defun scanKeyTableCons} (defun |scanKeyTableCons| () (let (KeyTable) (setq KeyTable (make-hash-table :test #'equal)) @@ -5102,13 +5085,14 @@ This function is used to build the scanKeyTable |scanKeyWords| nil) KeyTable)) -@ +\end{chunk} \defvar{scanDict} -<>= +\begin{chunk}{postvars} (eval-when (eval load) (defvar |scanDict| (|scanDictCons|))) -@ + +\end{chunk} \defun{scanDictCons}{scanDictCons} \begin{verbatim} @@ -5124,7 +5108,7 @@ This function is used to build the scanKeyTable ; d \end{verbatim} \calls{scanDictCons}{hkeys} -<>= +\begin{chunk}{defun scanDictCons} (defun |scanDictCons| () (let (d b a l) (setq l (hkeys |scanKeyTable|)) @@ -5152,7 +5136,7 @@ This function is used to build the scanKeyTable l nil) d)) -@ +\end{chunk} \defun{scanInsert}{scanInsert} \begin{verbatim} @@ -5172,7 +5156,7 @@ This function is used to build the scanKeyTable ; s \end{verbatim} \calls{scanInsert}{qenum} -<>= +\begin{chunk}{defun scanInsert} (defun |scanInsert| (s d) (let (v k n u h l) (setq l (length s)) @@ -5204,14 +5188,14 @@ This function is used to build the scanKeyTable (setf (svref d h) v) s)) -@ +\end{chunk} \defvar{scanPun} -<>= +\begin{chunk}{postvars} (eval-when (eval load) (defvar |scanPun| (|scanPunCons|))) -@ +\end{chunk} \defun{scanPunCons}{scanPunCons} \begin{verbatim} @@ -5225,7 +5209,7 @@ This function is used to build the scanKeyTable ; a \end{verbatim} \calls{scanPunCons}{hkeys} -<>= +\begin{chunk}{defun scanPunCons} (defun |scanPunCons| () (let (a listing) (setq listing (hkeys |scanKeyTable|)) @@ -5250,7 +5234,7 @@ This function is used to build the scanKeyTable listing nil) a)) -@ +\end{chunk} \chapter{Input Stream Parser} @@ -5267,7 +5251,7 @@ This function is used to build the scanKeyTable \usesdollar{npParse}{stok} \usesdollar{npParse}{stack} \usesdollar{npParse}{inputStream} -<>= +\begin{chunk}{defun npParse} (defun |npParse| (stream) (let (|$ttok| |$stok| |$stack| |$inputStream| found) (declare (special |$ttok| |$stack| |$inputStream| |$stok|)) @@ -5291,7 +5275,7 @@ This function is used to build the scanKeyTable (|pfWrong| (|pfDocument| (list "stack empty")) (|pfListOf| nil))) (t (car |$stack|))))) -@ +\end{chunk} \defun{npItem}{npItem} \calls{npItem}{npQualDef} @@ -5301,7 +5285,7 @@ This function is used to build the scanKeyTable \calls{npItem}{pfEnSequence} \calls{npItem}{npPush} \calls{npItem}{pfNovalue} -<>= +\begin{chunk}{defun npItem} (defun |npItem| () (let (c b a tmp1) (when (|npQualDef|) @@ -5316,14 +5300,14 @@ This function is used to build the scanKeyTable (|npPush| (|pfNovalue| c)))) (|npPush| (|pfEnSequence| (|npPop1|))))))) -@ +\end{chunk} \defun{npItem1}{npItem1} \calls{npItem1}{npQualDef} \calls{npItem1}{npEqKey} \calls{npItem1}{npItem1} \calls{npItem1}{npPop1} -<>= +\begin{chunk}{defun npItem1} (defun |npItem1| (c) (let (b a tmp1) (if (|npQualDef|) @@ -5336,7 +5320,7 @@ This function is used to build the scanKeyTable (list t (append c (|npPop1|)))) (list nil c)))) -@ +\end{chunk} \defun{npFirstTok}{npFirstTok} Sets the current leaf (\$stok) to the next leaf in the input stream. @@ -5349,7 +5333,7 @@ where head is either an id or (id . alist) \usesdollar{npFirstTok}{ttok} \usesdollar{npFirstTok}{stok} \usesdollar{npFirstTok}{inputStream} -<>= +\begin{chunk}{defun npFirstTok} (defun |npFirstTok| () (declare (special |$ttok| |$stok| |$inputStream|)) (if (null |$inputStream|) @@ -5357,64 +5341,65 @@ where head is either an id or (id . alist) (setq |$stok| (car |$inputStream|))) (setq |$ttok| (|tokPart| |$stok|))) -@ +\end{chunk} \defun{npPush}{Push one item onto \$stack} \usesdollar{npPush}{stack} -<>= +\begin{chunk}{defun npPush 0} (defun |npPush| (x) (declare (special |$stack|)) (push x |$stack|)) -@ +\end{chunk} \defun{npPop1}{Pop one item off \$stack} \usesdollar{npPop1}{stack} -<>= +\begin{chunk}{defun npPop1 0} (defun |npPop1| () (declare (special |$stack|)) (pop |$stack|)) -@ +\end{chunk} \defun{npPop2}{Pop the second item off \$stack} \usesdollar{npPop2}{stack} -<>= +\begin{chunk}{defun npPop2 0} (defun |npPop2| () (let (a) (declare (special |$stack|)) (setq a (cadr |$stack|)) (rplacd |$stack| (cddr |$stack|)) a)) -@ + +\end{chunk} \defun{npPop3}{Pop the third item off \$stack} \usesdollar{npPop3}{stack} -<>= +\begin{chunk}{defun npPop3 0} (defun |npPop3| () (let (a) (declare (special |$stack|)) (setq a (caddr |$stack|)) (rplacd (cdr |$stack|) (cdddr |$stack|)) a)) -@ +\end{chunk} \defun{npQualDef}{npQualDef} \calls{npQualDef}{npComma} \calls{npQualDef}{npPush} \calls{npQualDef}{npPop1} -<>= +\begin{chunk}{defun npQualDef} (defun |npQualDef| () (and (|npComma|) (|npPush| (list (|npPop1|))))) -@ +\end{chunk} \defun{npEqKey}{Advance over a keyword} Test for the keyword, if found advance the token stream \calls{npEqKey}{npNext} \usesdollar{npEqKey}{ttok} \usesdollar{npEqKey}{stok} -<>= +\begin{chunk}{defun npEqKey} (defun |npEqKey| (keyword) (declare (special |$ttok| |$stok|)) (and @@ -5422,7 +5407,7 @@ Test for the keyword, if found advance the token stream (eq keyword |$ttok|) (|npNext|))) -@ +\end{chunk} \defun{npNext}{Advance the input stream} This advances the input stream. The call to npFirstTok picks off the @@ -5430,51 +5415,51 @@ next token in the input stream and updates the current leaf (\$stok) and the current token (\$ttok) \calls{npNext}{npFirstTok} \usesdollar{npNext}{inputStream} -<>= +\begin{chunk}{defun npNext} (defun |npNext| () (declare (special |$inputStream|)) (setq |$inputStream| (cdr |$inputStream|)) (|npFirstTok|)) -@ +\end{chunk} \defun{npComma}{npComma} \calls{npComma}{npTuple} \calls{npComma}{npQualifiedDefinition} -<>= +\begin{chunk}{defun npComma} (defun |npComma| () (|npTuple| #'|npQualifiedDefinition|)) -@ +\end{chunk} \defun{npTuple}{npTuple} \calls{npTuple}{npListofFun} \calls{npTuple}{npCommaBackSet} \calls{npTuple}{pfTupleListOf} -<>= +\begin{chunk}{defun npTuple} (defun |npTuple| (|p|) (|npListofFun| |p| #'|npCommaBackSet| #'|pfTupleListOf|)) -@ +\end{chunk} \defun{npCommaBackSet}{npCommaBackSet} \calls{npCommaBackSet}{npEqKey} -<>= +\begin{chunk}{defun npCommaBackSet} (defun |npCommaBackSet| () (and (|npEqKey| 'comma) (or (|npEqKey| 'backset) t))) -@ +\end{chunk} \defun{npQualifiedDefinition}{npQualifiedDefinition} \calls{npQualifiedDefinition}{npQualified} \calls{npQualifiedDefinition}{npDefinitionOrStatement} -<>= +\begin{chunk}{defun npQualifiedDefinition} (defun |npQualifiedDefinition| () (|npQualified| #'|npDefinitionOrStatement|)) -@ +\end{chunk} \defun{npQualified}{npQualified} \calls{npQualified}{npEqKey} @@ -5484,7 +5469,7 @@ and the current token (\$ttok) \calls{npQualified}{pfWhere} \calls{npQualified}{npPop1} \calls{npQualified}{npLetQualified} -<>= +\begin{chunk}{defun npQualified} (defun |npQualified| (f) (if (funcall f) (progn @@ -5494,24 +5479,24 @@ and the current token (\$ttok) t) (|npLetQualified| f))) -@ +\end{chunk} \defun{npDefinitionOrStatement}{npDefinitionOrStatement} \calls{npDefinitionOrStatement}{npBackTrack} \calls{npDefinitionOrStatement}{npGives} \calls{npDefinitionOrStatement}{npDef} -<>= +\begin{chunk}{defun npDefinitionOrStatement} (defun |npDefinitionOrStatement| () (|npBackTrack| #'|npGives| 'def #'|npDef|)) -@ +\end{chunk} \defun{npBackTrack}{npBackTrack} \calls{npBackTrack}{npState} \calls{npBackTrack}{npEqPeek} \calls{npBackTrack}{npRestore} \calls{npBackTrack}{npTrap} -<>= +\begin{chunk}{defun npBackTrack} (defun |npBackTrack| (p1 p2 p3) (let (a) (setq a (|npState|)) @@ -5522,17 +5507,17 @@ and the current token (\$ttok) (or (apply p3 nil) (|npTrap|))) (t t))))) -@ +\end{chunk} \defun{npGives}{npGives} \calls{npGives}{npBackTrack} \calls{npGives}{npExit} \calls{npGives}{npLambda} -<>= +\begin{chunk}{defun npGives} (defun |npGives| () (|npBackTrack| #'|npExit| 'gives #'|npLambda|)) -@ +\end{chunk} \defun{npLambda}{npLambda} \calls{npLambda}{npVariable} @@ -5546,7 +5531,7 @@ and the current token (\$ttok) \calls{npLambda}{npDefinitionOrStatement} \calls{npLambda}{npType} \calls{npLambda}{pfReturnTyped} -<>= +\begin{chunk}{defun npLambda} (defun |npLambda| () (or (and @@ -5563,14 +5548,14 @@ and the current token (\$ttok) (or (|npDefinitionOrStatement|) (|npTrap|)) (|npPush| (|pfReturnTyped| (|npPop2|) (|npPop1|)))))) -@ +\end{chunk} \defun{npType}{npType} \calls{npType}{npMatch} \calls{npType}{npPop1} \calls{npType}{npWith} \calls{npType}{npPush} -<>= +\begin{chunk}{defun npType} (defun |npType| () (and (|npMatch|) @@ -5579,25 +5564,25 @@ and the current token (\$ttok) (|npWith| a) (|npPush| a))))) -@ +\end{chunk} \defun{npMatch}{npMatch} \calls{npMatch}{npLeftAssoc} \calls{npMatch}{npSuch} -<>= +\begin{chunk}{defun npMatch} (defun |npMatch| () (|npLeftAssoc| '(is isnt) #'|npSuch|)) -@ +\end{chunk} \defun{npSuch}{npSuch} \calls{npSuch}{npLeftAssoc} \calls{npSuch}{npLogical} -<>= +\begin{chunk}{defun npSuch} (defun |npSuch| () (|npLeftAssoc| '(bar) #'|npLogical|)) -@ +\end{chunk} \defun{npWith}{npWith} \calls{npWith}{npEqKey} @@ -5613,7 +5598,7 @@ and the current token (\$ttok) \calls{npWith}{npPop2} \calls{npWith}{npPop1} \calls{npWith}{pfNothing} -<>= +\begin{chunk}{defun npWith} (defun |npWith| (extra) (let (a) (and @@ -5631,16 +5616,16 @@ and the current token (\$ttok) (|npPush| (|pfWith| (|npPop2|) (|npPop1|) extra)))) (|npPush| (|pfWith| (|pfNothing|) (|npPop1|) extra))))))) -@ +\end{chunk} \defun{npCompMissing}{npCompMissing} \calls{npCompMissing}{npEqKey} \calls{npCompMissing}{npMissing} -<>= +\begin{chunk}{defun npCompMissing} (defun |npCompMissing| (s) (or (|npEqKey| s) (|npMissing| s))) -@ +\end{chunk} \defun{npMissing}{npMissing} \throws{npMissing}{trappoint} @@ -5648,19 +5633,19 @@ and the current token (\$ttok) \calls{npMissing}{tokPosn} \calls{npMissing}{pname} \usesdollar{npMissing}{stok} -<>= +\begin{chunk}{defun npMissing} (defun |npMissing| (s) (declare (special |$stok|)) (|ncSoftError| (|tokPosn| |$stok|) 'S2CY0007 (list (pname s))) (throw 'trappoint 'trapped))))) -@ +\end{chunk} \defun{npRestore}{npRestore} \calls{npRestore}{npFirstTok} \usesdollar{npRestore}{stack} \usesdollar{npRestore}{inputStream} -<>= +\begin{chunk}{defun npRestore} (defun |npRestore| (x) (declare (special |$stack| |$inputStream|)) (setq |$inputStream| (car x)) @@ -5668,39 +5653,39 @@ and the current token (\$ttok) (setq |$stack| (cdr x)) t) -@ +\end{chunk} \defun{npEqPeek}{Peek for keyword s, no advance of token stream} \usesdollar{npEqPeek}{ttok} \usesdollar{npEqPeek}{stok} -<>= +\begin{chunk}{defun npEqPeek 0} (defun |npEqPeek| (s) (declare (special |$ttok| |$stok|)) (and (eq (caar |$stok|) '|key|) (eq s |$ttok|))) -@ +\end{chunk} \defun{npCategoryL}{npCategoryL} \calls{npCategoryL}{npCategory} \calls{npCategoryL}{npPush} \calls{npCategoryL}{pfUnSequence} \calls{npCategoryL}{npPop1} -<>= +\begin{chunk}{defun npCategoryL} (defun |npCategoryL| () (and (|npCategory|) (|npPush| (|pfUnSequence| (|npPop1|))))) -@ +\end{chunk} \defun{npCategory}{npCategory} \calls{npCategory}{npPP} \calls{npCategory}{npSCategory} -<>= +\begin{chunk}{defun npCategory} (defun |npCategory| () (|npPP| #'|npSCategory|)) -@ +\end{chunk} \defun{npSCategory}{npSCategory} \calls{npSCategory}{npWConditional} @@ -5716,7 +5701,7 @@ and the current token (\$ttok) \calls{npSCategory}{npApplication} \calls{npSCategory}{pfAttribute} \calls{npSCategory}{npTrap} -<>= +\begin{chunk}{defun npSCategory} (defun |npSCategory| () (let (a) (cond @@ -5735,7 +5720,7 @@ and the current token (\$ttok) (|npTrap|))))) (t nil)))))) -@ +\end{chunk} \defun{npSignature}{npSignature} \calls{npSignature}{npSigItemlist} @@ -5743,11 +5728,11 @@ and the current token (\$ttok) \calls{npSignature}{pfWDec} \calls{npSignature}{pfNothing} \calls{npSignature}{npPop1} -<>= +\begin{chunk}{defun npSignature} (defun |npSignature| () (and (|npSigItemlist|) (|npPush| (|pfWDec| (|pfNothing|) (|npPop1|))))) -@ +\end{chunk} \defun{npSigItemlist}{npSigItemlist} \calls{npSigItemlist}{npListing} @@ -5757,22 +5742,22 @@ and the current token (\$ttok) \calls{npSigItemlist}{pfAppend} \calls{npSigItemlist}{pfParts} \calls{npSigItemlist}{npPop1} -<>= +\begin{chunk}{defun npSigItemlist} (defun |npSigItemlist| () (and (|npListing| #'|npSigItem|) (|npPush| (|pfListOf| (|pfAppend| (|pfParts| (|npPop1|))))))) -@ +\end{chunk} \defun{npListing}{npListing} \calls{npListing}{npList} \calls{npListing}{pfListOf} -<>= +\begin{chunk}{defun npListing} (defun |npListing| (p) (|npList| p 'comma #'|pfListOf|)) -@ +\end{chunk} \defun{npList}{Always produces a list, fn is applied to it} \calls{npList}{npEqKey} @@ -5782,7 +5767,7 @@ and the current token (\$ttok) \calls{npList}{npPop2} \calls{npList}{npPop1} \usesdollar{npList}{stack} -<>= +\begin{chunk}{defun npList} (defun |npList| (f str1 fn) (let (a) (declare (special |$stack|)) @@ -5805,17 +5790,17 @@ and the current token (\$ttok) (t (|npPush| (funcall fn (list (|npPop1|))))))) (t (|npPush| (funcall fn nil)))))) -@ +\end{chunk} \defun{npSigItem}{npSigItem} \calls{npSigItem}{npTypeVariable} \calls{npSigItem}{npSigDecl} \calls{npSigItem}{npTrap} -<>= +\begin{chunk}{defun npSigItem} (defun |npSigItem| () (and (|npTypeVariable|) (or (|npSigDecl|) (|npTrap|)))) -@ +\end{chunk} \defun{npTypeVariable}{npTypeVariable} \calls{npTypeVariable}{npParenthesized} @@ -5824,32 +5809,32 @@ and the current token (\$ttok) \calls{npTypeVariable}{npPush} \calls{npTypeVariable}{pfListOf} \calls{npTypeVariable}{npPop1} -<>= +\begin{chunk}{defun npTypeVariable} (defun |npTypeVariable| () (or (|npParenthesized| #'|npTypeVariablelist|) (and (|npSignatureDefinee|) (|npPush| (|pfListOf| (list (|npPop1|))))))) -@ +\end{chunk} \defun{npSignatureDefinee}{npSignatureDefinee} \calls{npSignatureDefinee}{npName} \calls{npSignatureDefinee}{npInfixOperator} \calls{npSignatureDefinee}{npPrefixColon} -<>= +\begin{chunk}{defun npSignatureDefinee} (defun |npSignatureDefinee| () (or (|npName|) (|npInfixOperator|) (|npPrefixColon|))) -@ +\end{chunk} \defun{npTypeVariablelist}{npTypeVariablelist} \calls{npTypeVariablelist}{npListing} \calls{npTypeVariablelist}{npSignatureDefinee} -<>= +\begin{chunk}{defun npTypeVariablelist} (defun |npTypeVariablelist| () (|npListing| #'|npSignatureDefinee|)) -@ +\end{chunk} \defun{npSigDecl}{npSigDecl} \calls{npSigDecl}{npEqKey} @@ -5860,23 +5845,23 @@ and the current token (\$ttok) \calls{npSigDecl}{pfParts} \calls{npSigDecl}{npPop2} \calls{npSigDecl}{npPop1} -<>= +\begin{chunk}{defun npSigDecl} (defun |npSigDecl| () (and (|npEqKey| 'colon) (or (|npType|) (|npTrap|)) (|npPush| (|pfSpread| (|pfParts| (|npPop2|)) (|npPop1|))))) -@ +\end{chunk} \defun{npPrimary}{npPrimary} \calls{npPrimary}{npPrimary1} \calls{npPrimary}{npPrimary2} -<>= +\begin{chunk}{defun npPrimary} (defun |npPrimary| () (or (|npPrimary1|) (|npPrimary2|))) -@ +\end{chunk} \defun{npPrimary2}{npPrimary2} \calls{npPrimary2}{npEncAp} @@ -5884,14 +5869,14 @@ and the current token (\$ttok) \calls{npPrimary2}{npAdd} \calls{npPrimary2}{pfNothing} \calls{npPrimary2}{npWith} -<>= +\begin{chunk}{defun npPrimary2} (defun |npPrimary2| () (or (|npEncAp| #'|npAtom2|) (|npAdd| (|pfNothing|)) (|npWith| (|pfNothing|)))) -@ +\end{chunk} \defun{npADD}{npADD} \tpdhere{Note that there is also an npAdd function} @@ -5899,7 +5884,7 @@ and the current token (\$ttok) \calls{npADD}{npPop1} \calls{npADD}{npAdd} \calls{npADD}{npPush} -<>= +\begin{chunk}{defun npADD} (defun |npADD| () (let (a) (and @@ -5910,7 +5895,7 @@ and the current token (\$ttok) (|npAdd| a) (|npPush| a)))))) -@ +\end{chunk} \defun{npAdd}{npAdd} \tpdhere{Note that there is also an npADD function} @@ -5928,7 +5913,7 @@ and the current token (\$ttok) \calls{npAdd}{npPop2} \calls{npAdd}{npPop1} \calls{npAdd}{pfNothing} -<>= +\begin{chunk}{defun npAdd} (defun |npAdd| (extra) (let (a) (and @@ -5948,20 +5933,20 @@ and the current token (\$ttok) (t (|npPush| (|pfAdd| (|pfNothing|) (|npPop1|) extra)))))))) -@ +\end{chunk} \defun{npAtom2}{npAtom2} \calls{npAtom2}{npInfixOperator} \calls{npAtom2}{npAmpersand} \calls{npAtom2}{npPrefixColon} \calls{npAtom2}{npFromdom} -<>= +\begin{chunk}{defun npAtom2} (defun |npAtom2| () (and (or (|npInfixOperator|) (|npAmpersand|) (|npPrefixColon|)) (|npFromdom|))) -@ +\end{chunk} \defun{npInfixOperator}{npInfixOperator} \calls{npInfixOperator}{npInfixOp} @@ -5976,7 +5961,7 @@ and the current token (\$ttok) \calls{npInfixOperator}{tokConstruct} \calls{npInfixOperator}{tokPart} \usesdollar{npInfixOperator}{stok} -<>= +\begin{chunk}{defun npInfixOperator} (defun |npInfixOperator| () (let (b a) (declare (special |$stok|)) @@ -5997,13 +5982,13 @@ and the current token (\$ttok) (|npRestore| a) nil)))))))) -@ +\end{chunk} \defun{npInfixOp}{npInfixOp} \calls{npInfixOp}{npPushId} \usesdollar{npInfixOp}{ttok} \usesdollar{npInfixOp}{stok} -<>= +\begin{chunk}{defun npInfixOp} (defun |npInfixOp| () (declare (special |$ttok| |$stok|)) (and @@ -6011,7 +5996,7 @@ and the current token (\$ttok) (get |$ttok| 'infgeneric) (|npPushId|))) -@ +\end{chunk} \defun{npPrefixColon}{npPrefixColon} \calls{npPrefixColon}{npEqPeek} @@ -6020,7 +6005,7 @@ and the current token (\$ttok) \calls{npPrefixColon}{tokPosn} \calls{npPrefixColon}{npNext} \usesdollar{npPrefixColon}{stok} -<>= +\begin{chunk}{defun npPrefixColon} (defun |npPrefixColon| () (declare (special |$stok|)) (and @@ -6029,7 +6014,7 @@ and the current token (\$ttok) (|npPush| (|tokConstruct| '|id| '|:| (|tokPosn| |$stok|))) (|npNext|)))) -@ +\end{chunk} \defun{npApplication}{npApplication} \calls{npApplication}{npDotted} @@ -6039,7 +6024,7 @@ and the current token (\$ttok) \calls{npApplication}{pfApplication} \calls{npApplication}{npPop2} \calls{npApplication}{npPop1} -<>= +\begin{chunk}{defun npApplication} (defun |npApplication| () (and (|npDotted| #'|npPrimary|) @@ -6049,24 +6034,24 @@ and the current token (\$ttok) (|npPush| (|pfApplication| (|npPop2|) (|npPop1|)))) t))) -@ +\end{chunk} \defun{npDotted}{npDotted} \calls{npDotted}{} -<>= +\begin{chunk}{defun npDotted} (defun |npDotted| (f) (and (apply f nil) (|npAnyNo| #'|npSelector|))) -@ +\end{chunk} \defun{npAnyNo}{npAnyNo} fn must transform the head of the stack -<>= +\begin{chunk}{defun npAnyNo 0} (defun |npAnyNo| (fn) (do () ((not (apply fn nil)))) ; while apply do... t) -@ +\end{chunk} \defun{npSelector}{npSelector} \calls{npSelector}{npEqKey} @@ -6076,14 +6061,14 @@ fn must transform the head of the stack \calls{npSelector}{pfApplication} \calls{npSelector}{npPop2} \calls{npSelector}{npPop1} -<>= +\begin{chunk}{defun npSelector} (defun |npSelector| () (and (|npEqKey| 'dot) (or (|npPrimary|) (|npTrap|)) (|npPush| (|pfApplication| (|npPop2|) (|npPop1|))))) -@ +\end{chunk} \defun{npApplication2}{npApplication2} \calls{npApplication2}{npDotted} @@ -6093,7 +6078,7 @@ fn must transform the head of the stack \calls{npApplication2}{pfApplication} \calls{npApplication2}{npPop2} \calls{npApplication2}{npPop1} -<>= +\begin{chunk}{defun npApplication2} (defun |npApplication2| () (and (|npDotted| #'|npPrimary1|) @@ -6103,7 +6088,7 @@ fn must transform the head of the stack (|npPush| (|pfApplication| (|npPop2|) (|npPop1|)))) t))) -@ +\end{chunk} \defun{npPrimary1}{npPrimary1} \calls{npPrimary1}{npEncAp} @@ -6114,7 +6099,7 @@ fn must transform the head of the stack \calls{npPrimary1}{npBPileDefinition} \calls{npPrimary1}{npDefn} \calls{npPrimary1}{npRule} -<>= +\begin{chunk}{defun npPrimary1} (defun |npPrimary1| () (or (|npEncAp| #'|npAtom1|) @@ -6125,18 +6110,18 @@ fn must transform the head of the stack (|npDefn|) (|npRule|))) -@ +\end{chunk} \defun{npMacro}{npMacro} \calls{npMacro}{npPP} \calls{npMacro}{npMdef} -<>= +\begin{chunk}{defun npMacro} (defun |npMacro| () (and (|npEqKey| 'macro) (|npPP| #'|npMdef|))) -@ +\end{chunk} \defun{npMdef}{npMdef} \tpdhere{Beware that this function occurs with uppercase also} @@ -6149,7 +6134,7 @@ fn must transform the head of the stack \calls{npMdef}{npPush} \calls{npMdef}{pfMacro} \calls{npMdef}{pfPushMacroBody} -<>= +\begin{chunk}{defun npMdef} (defun |npMdef| () (let (body arg op tmp) (when (|npQuiver|) ;[op,arg]:= pfCheckMacroOut(npPop1()) @@ -6162,27 +6147,27 @@ fn must transform the head of the stack (|npPush| (|pfMacro| op body)) (|npPush| (|pfMacro| op (|pfPushMacroBody| arg body))))))) -@ +\end{chunk} \defun{npMDEF}{npMDEF} \tpdhere{Beware that this function occurs with lowercase also} \calls{npMDEF}{npBackTrack} \calls{npMDEF}{npStatement} \calls{npMDEF}{npMDEFinition} -<>= +\begin{chunk}{defun npMDEF} (defun |npMDEF| () (|npBackTrack| #'|npStatement| 'mdef #'|npMDEFinition|)) -@ +\end{chunk} \defun{npMDEFinition}{npMDEFinition} \calls{npMDEFinition}{npPP} \calls{npMDEFinition}{npMdef} -<>= +\begin{chunk}{defun npMDEFinition} (defun |npMDEFinition| () (|npPP| #'|npMdef|)) -@ +\end{chunk} \defun{npFix}{npFix} \calls{npFix}{npEqKey} @@ -6190,23 +6175,23 @@ fn must transform the head of the stack \calls{npFix}{npPush} \calls{npFix}{pfFix} \calls{npFix}{npPop1} -<>= +\begin{chunk}{defun npFix} (defun |npFix| () (and (|npEqKey| 'fix) (|npPP| #'|npDef|) (|npPush| (|pfFix| (|npPop1|))))) -@ +\end{chunk} \defun{npLet}{npLet} \calls{npLet}{npLetQualified} \calls{npLet}{npDefinitionOrStatement} -<>= +\begin{chunk}{defun npLet} (defun |npLet| () (|npLetQualified| #'|npDefinitionOrStatement|)) -@ +\end{chunk} \defun{npLetQualified}{npLetQualified} \calls{npLetQualified}{npEqKey} @@ -6217,7 +6202,7 @@ fn must transform the head of the stack \calls{npLetQualified}{pfWhere} \calls{npLetQualified}{npPop2} \calls{npLetQualified}{npPop1} -<>= +\begin{chunk}{defun npLetQualified} (defun |npLetQualified| (f) (and (|npEqKey| 'let) @@ -6226,7 +6211,7 @@ fn must transform the head of the stack (or #'f (|npTrap|)) (|npPush| (|pfWhere| (|npPop2|) (|npPop1|))))) -@ +\end{chunk} \defun{npDefinition}{npDefinition} \calls{npDefinition}{npPP} @@ -6234,13 +6219,13 @@ fn must transform the head of the stack \calls{npDefinition}{npPush} \calls{npDefinition}{pfSequenceToList} \calls{npDefinition}{npPop1} -<>= +\begin{chunk}{defun npDefinition} (defun |npDefinition| () (and (|npPP| #'|npDefinitionItem|) (|npPush| (|pfSequenceToList| (|npPop1|))))) -@ +\end{chunk} \defun{npDefinitionItem}{npDefinitionItem} \calls{npDefinitionItem}{npTyping} @@ -6253,7 +6238,7 @@ fn must transform the head of the stack \calls{npDefinitionItem}{npMacro} \calls{npDefinitionItem}{npDefn} \calls{npDefinitionItem}{npTrap} -<>= +\begin{chunk}{defun npDefinitionItem} (defun |npDefinitionItem| () (let (a) (or (|npTyping|) @@ -6271,7 +6256,7 @@ fn must transform the head of the stack (or (|npMacro|) (|npDefn|))))) (t (|npTrap|))))))) -@ +\end{chunk} \defun{npTyping}{npTyping} \calls{npTyping}{npEqKey} @@ -6280,14 +6265,14 @@ fn must transform the head of the stack \calls{npTyping}{npPush} \calls{npTyping}{pfTyping} \calls{npTyping}{npPop1} -<>= +\begin{chunk}{defun npTyping} (defun |npTyping| () (and (|npEqKey| 'default) (or (|npDefaultItemlist|) (|npTrap|)) (|npPush| (|pfTyping| (|npPop1|))))) -@ +\end{chunk} \defun{npDefaultItemlist}{npDefaultItemlist} \calls{npDefaultItemlist}{npPC} @@ -6295,13 +6280,13 @@ fn must transform the head of the stack \calls{npDefaultItemlist}{npPush} \calls{npDefaultItemlist}{pfUnSequence} \calls{npDefaultItemlist}{npPop1} -<>= +\begin{chunk}{defun npDefaultItemlist} (defun |npDefaultItemlist| () (and (|npPC| #'|npSDefaultItem|) (|npPush| (|pfUnSequence| (|npPop1|))))) -@ +\end{chunk} \defun{npSDefaultItem}{npSDefaultItem} \calls{npSDefaultItem}{npListing} @@ -6310,25 +6295,25 @@ fn must transform the head of the stack \calls{npSDefaultItem}{pfAppend} \calls{npSDefaultItem}{pfParts} \calls{npSDefaultItem}{npPop1} -<>= +\begin{chunk}{defun npSDefaultItem} (defun |npSDefaultItem| () (and (|npListing| #'|npDefaultItem|) (|npPush| (|pfAppend| (|pfParts| (|npPop1|)))))) -@ +\end{chunk} \defun{npDefaultItem}{npDefaultItem} \calls{npDefaultItem}{npTypeVariable} \calls{npDefaultItem}{npDefaultDecl} \calls{npDefaultItem}{npTrap} -<>= +\begin{chunk}{defun npDefaultItem} (defun |npDefaultItem| () (and (|npTypeVariable|) (or (|npDefaultDecl|) (|npTrap|)))) -@ +\end{chunk} \defun{npDefaultDecl}{npDefaultDecl} \calls{npDefaultDecl}{npEqKey} @@ -6339,14 +6324,14 @@ fn must transform the head of the stack \calls{npDefaultDecl}{pfParts} \calls{npDefaultDecl}{npPop2} \calls{npDefaultDecl}{npPop1} -<>= +\begin{chunk}{defun npDefaultDecl} (defun |npDefaultDecl| () (and (|npEqKey| 'colon) (or (|npType|) (|npTrap|)) (|npPush| (|pfSpread| (|pfParts| (|npPop2|)) (|npPop1|))))) -@ +\end{chunk} \defun{npStatement}{npStatement} \calls{npStatement}{npExpress} @@ -6361,7 +6346,7 @@ fn must transform the head of the stack \calls{npStatement}{npExport} \calls{npStatement}{npTyping} \calls{npStatement}{npVoid} -<>= +\begin{chunk}{defun npStatement} (defun |npStatement| () (or (|npExpress|) @@ -6377,7 +6362,7 @@ fn must transform the head of the stack (|npTyping|) (|npVoid|))) -@ +\end{chunk} \defun{npExport}{npExport} \calls{npExport}{npEqKey} @@ -6386,14 +6371,14 @@ fn must transform the head of the stack \calls{npExport}{npPush} \calls{npExport}{pfExport} \calls{npExport}{npPop1} -<>= +\begin{chunk}{defun npExport} (defun |npExport| () (and (|npEqKey| 'export) (or (|npLocalItemlist|) (|npTrap|)) (|npPush| (|pfExport| (|npPop1|))))) -@ +\end{chunk} \defun{npLocalItemlist}{npLocalItemlist} \calls{npLocalItemlist}{npPC} @@ -6401,13 +6386,13 @@ fn must transform the head of the stack \calls{npLocalItemlist}{npPush} \calls{npLocalItemlist}{pfUnSequence} \calls{npLocalItemlist}{npPop1} -<>= +\begin{chunk}{defun npLocalItemlist} (defun |npLocalItemlist| () (and (|npPC| #'|npSLocalItem|) (|npPush| (|pfUnSequence| (|npPop1|))))) -@ +\end{chunk} \defun{npSLocalItem}{npSLocalItem} \calls{npSLocalItem}{npListing} @@ -6416,24 +6401,24 @@ fn must transform the head of the stack \calls{npSLocalItem}{pfAppend} \calls{npSLocalItem}{pfParts} \calls{npSLocalItem}{npPop1} -<>= +\begin{chunk}{defun npSLocalItem} (defun |npSLocalItem| () (and (|npListing| #'|npLocalItem|) (|npPush| (|pfAppend| (|pfParts| (|npPop1|)))))) -@ +\end{chunk} \defun{npLocalItem}{npLocalItem} \calls{npLocalItem}{npTypeVariable} \calls{npLocalItem}{npLocalDecl} -<>= +\begin{chunk}{defun npLocalItem} (defun |npLocalItem| () (and (|npTypeVariable|) (|npLocalDecl|))))) -@ +\end{chunk} \defun{npLocalDecl}{npLocalDecl} \calls{npLocalDecl}{npEqKey} @@ -6445,7 +6430,7 @@ fn must transform the head of the stack \calls{npLocalDecl}{npPop2} \calls{npLocalDecl}{npPop1} \calls{npLocalDecl}{pfNothing} -<>= +\begin{chunk}{defun npLocalDecl} (defun |npLocalDecl| () (or (and @@ -6454,7 +6439,7 @@ fn must transform the head of the stack (|npPush| (|pfSpread| (|pfParts| (|npPop2|)) (|npPop1|)))) (|npPush| (|pfSpread| (|pfParts| (|npPop1|)) (|pfNothing|))))) -@ +\end{chunk} \defun{npLocal}{npLocal} \calls{npLocal}{npEqKey} @@ -6463,14 +6448,14 @@ fn must transform the head of the stack \calls{npLocal}{npPush} \calls{npLocal}{pfLocal} \calls{npLocal}{npPop1} -<>= +\begin{chunk}{defun npLocal} (defun |npLocal| () (and (|npEqKey| '|local|) (or (|npLocalItemlist|) (|npTrap|)) (|npPush| (|pfLocal| (|npPop1|))))) -@ +\end{chunk} \defun{npFree}{npFree} \calls{npFree}{npEqKey} @@ -6479,46 +6464,46 @@ fn must transform the head of the stack \calls{npFree}{npPush} \calls{npFree}{pfFree} \calls{npFree}{npPop1} -<>= +\begin{chunk}{defun npFree} (defun |npFree| () (and (|npEqKey| 'free) (or (|npLocalItemlist|) (|npTrap|)) (|npPush| (|pfFree| (|npPop1|))))) -@ +\end{chunk} \defun{npInline}{npInline} \calls{npInline}{npAndOr} \calls{npInline}{npQualTypelist} \calls{npInline}{pfInline} -<>= +\begin{chunk}{defun npInline} (defun |npInline| () (|npAndOr| 'inline #'|npQualTypelist| #'|pfInline|)) -@ +\end{chunk} \defun{npIterate}{npIterate} \calls{npIterate}{npEqKey} \calls{npIterate}{npPush} \calls{npIterate}{pfIterate} \calls{npIterate}{pfNothing} -<>= +\begin{chunk}{defun npIterate} (defun |npIterate| () (and (|npEqKey| 'iterate) (|npPush| (|pfIterate| (|pfNothing|))))) -@ +\end{chunk} \defun{npBreak}{npBreak} \calls{npBreak}{npEqKey} \calls{npBreak}{npPush} \calls{npBreak}{pfBreak} \calls{npBreak}{pfNothing} -<>= +\begin{chunk}{defun npBreak} (defun |npBreak| () (and (|npEqKey| 'break) (|npPush| (|pfBreak| (|pfNothing|))))) -@ +\end{chunk} \defun{npLoop}{npLoop} \calls{npLoop}{npIterators} @@ -6531,7 +6516,7 @@ fn must transform the head of the stack \calls{npLoop}{npPop1} \calls{npLoop}{npEqKey} \calls{npLoop}{pfLoop1} -<>= +\begin{chunk}{defun npLoop} (defun |npLoop| () (or (and @@ -6544,7 +6529,7 @@ fn must transform the head of the stack (or (|npAssign|) (|npTrap|)) (|npPush| (|pfLoop1| (|npPop1|)))))) -@ +\end{chunk} \defun{npIterators}{npIterators} \calls{npIterators}{npForIn} @@ -6555,7 +6540,7 @@ fn must transform the head of the stack \calls{npIterators}{npPop1} \calls{npIterators}{npWhile} \calls{npIterators}{npIterators} -<>= +\begin{chunk}{defun npIterators} (defun |npIterators| () (or (and @@ -6568,37 +6553,37 @@ fn must transform the head of the stack (and (|npIterators|) (|npPush| (cons (|npPop2|) (|npPop1|)))) (|npPush| (list (|npPop1|))))))) -@ +\end{chunk} \defun{npIterator}{npIterator} \calls{npIterator}{npForIn} \calls{npIterator}{npSuchThat} \calls{npIterator}{npWhile} -<>= +\begin{chunk}{defun npIterator} (defun |npIterator| () (or (|npForIn|) (|npSuchThat|) (|npWhile|))))) -@ +\end{chunk} \defun{npSuchThat}{npSuchThat} \calls{npSuchThat}{npAndOr} \calls{npSuchThat}{npLogical} \calls{npSuchThat}{pfSuchthat} -<>= +\begin{chunk}{defun npSuchThat} (defun |npSuchThat| () (|npAndOr| 'bar #'|npLogical| #'|pfSuchthat|)) -@ +\end{chunk} \defun{npZeroOrMore}{Apply argument 0 or more times} \calls{npZeroOrMore}{npPush} \calls{npZeroOrMore}{npPop2} \calls{npZeroOrMore}{npPop1} \usesdollar{npZeroOrMore}{stack} -<>= +\begin{chunk}{defun npZeroOrMore} (defun |npZeroOrMore| (f) (let (a) (declare (special |$stack|)) @@ -6611,17 +6596,17 @@ fn must transform the head of the stack (|npPush| (cons (|npPop2|) (|npPop1|)))) (t (progn (|npPush| nil) t))))) -@ +\end{chunk} \defun{npWhile}{npWhile} \calls{npWhile}{npAndOr} \calls{npWhile}{npLogical} \calls{npWhile}{pfWhile} -<>= +\begin{chunk}{defun npWhile} (defun |npWhile| () (|npAndOr| 'while #'|npLogical| #'|pfWhile|)) -@ +\end{chunk} \defun{npForIn}{npForIn} \calls{npForIn}{npEqKey} @@ -6633,7 +6618,7 @@ fn must transform the head of the stack \calls{npForIn}{pfForin} \calls{npForIn}{npPop2} \calls{npForIn}{npPop1} -<>= +\begin{chunk}{defun npForIn} (defun |npForIn| () (and (|npEqKey| 'for) @@ -6642,7 +6627,7 @@ fn must transform the head of the stack (or (|npBy|) (|npTrap|)) (|npPush| (|pfForin| (|npPop2|) (|npPop1|))))) -@ +\end{chunk} \defun{npReturn}{npReturn} \calls{npReturn}{npEqKey} @@ -6656,7 +6641,7 @@ fn must transform the head of the stack \calls{npReturn}{npPop2} \calls{npReturn}{npPop1} \calls{npReturn}{pfReturnNoName} -<>= +\begin{chunk}{defun npReturn} (defun |npReturn| () (and (|npEqKey| 'return) @@ -6670,17 +6655,17 @@ fn must transform the head of the stack (|npPush| (|pfReturn| (|npPop2|) (|npPop1|)))) (|npPush| (|pfReturnNoName| (|npPop1|)))))) -@ +\end{chunk} \defun{npVoid}{npVoid} \calls{npVoid}{npAndOr} \calls{npVoid}{npStatement} \calls{npVoid}{pfNovalue} -<>= +\begin{chunk}{defun npVoid} (defun |npVoid| () (|npAndOr| 'do #'|npStatement| #'|pfNovalue|)) -@ +\end{chunk} \defun{npExpress}{npExpress} \calls{npExpress}{npExpress1} @@ -6690,7 +6675,7 @@ fn must transform the head of the stack \calls{npExpress}{npPop2} \calls{npExpress}{pfListOf} \calls{npExpress}{npPop1} -<>= +\begin{chunk}{defun npExpress} (defun |npExpress| () (and (|npExpress1|) @@ -6700,35 +6685,35 @@ fn must transform the head of the stack (|npPush| (|pfCollect| (|npPop2|) (|pfListOf| (|npPop1|))))) t))) -@ +\end{chunk} \defun{npExpress1}{npExpress1} \calls{npExpress1}{npConditionalStatement} \calls{npExpress1}{npADD} -<>= +\begin{chunk}{defun npExpress1} (defun |npExpress1| () (or (|npConditionalStatement|) (|npADD|))) -@ +\end{chunk} \defun{npConditionalStatement}{npConditionalStatement} \calls{npConditionalStatement}{npConditional} \calls{npConditionalStatement}{npQualifiedDefinition} -<>= +\begin{chunk}{defun npConditionalStatement} (defun |npConditionalStatement| () (|npConditional| #'|npQualifiedDefinition|)) -@ +\end{chunk} \defun{npImport}{npImport} \calls{npImport}{npAndOr} \calls{npImport}{npQualTypelist} \calls{npImport}{pfImport} -<>= +\begin{chunk}{defun npImport} (defun |npImport| () (|npAndOr| 'import #'|npQualTypelist| #'|pfImport|)) -@ +\end{chunk} \defun{npQualTypelist}{npQualTypelist} \calls{npQualTypelist}{npPC} @@ -6736,13 +6721,13 @@ fn must transform the head of the stack \calls{npQualTypelist}{npPush} \calls{npQualTypelist}{pfUnSequence} \calls{npQualTypelist}{npPop1} -<>= +\begin{chunk}{defun npQualTypelist} (defun |npQualTypelist| () (and (|npPC| #'|npSQualTypelist|) (|npPush| (|pfUnSequence| (|npPop1|))))) -@ +\end{chunk} \defun{npSQualTypelist}{npSQualTypelist} \calls{npSQualTypelist}{npListing} @@ -6750,13 +6735,13 @@ fn must transform the head of the stack \calls{npSQualTypelist}{npPush} \calls{npSQualTypelist}{pfParts} \calls{npSQualTypelist}{npPop1} -<>= +\begin{chunk}{defun npSQualTypelist} (defun |npSQualTypelist| () (and (|npListing| #'|npQualType|) (|npPush| (|pfParts| (|npPop1|))))) -@ +\end{chunk} \defun{npQualType}{npQualType} \calls{npQualType}{npType} @@ -6764,37 +6749,37 @@ fn must transform the head of the stack \calls{npQualType}{pfQualType} \calls{npQualType}{npPop1} \calls{npQualType}{pfNothing} -<>= +\begin{chunk}{defun npQualType} (defun |npQualType| () (and (|npType|) (|npPush| (|pfQualType| (|npPop1|) (|pfNothing|))))) -@ +\end{chunk} \defun{npAndOr}{npAndOr} \calls{npAndOr}{npEqKey} \calls{npAndOr}{npTrap} \calls{npAndOr}{npPush} \calls{npAndOr}{npPop1} -<>= +\begin{chunk}{defun npAndOr} (defun |npAndOr| (keyword p f) (and (|npEqKey| keyword) (or (apply p nil) (|npTrap|)) (|npPush| (funcall f (|npPop1|))))) -@ +\end{chunk} \defun{npEncAp}{npEncAp} \calls{npEncAp}{npAnyNo} \calls{npEncAp}{npEncl} \calls{npEncAp}{npFromdom} -<>= +\begin{chunk}{defun npEncAp} (defun |npEncAp| (f) (and (apply f nil) (|npAnyNo| #'|npEncl|) (|npFromdom|))) -@ +\end{chunk} \defun{npEncl}{npEncl} \calls{npEncl}{npBDefinition} @@ -6802,13 +6787,13 @@ fn must transform the head of the stack \calls{npEncl}{pfApplication} \calls{npEncl}{npPop2} \calls{npEncl}{npPop1} -<>= +\begin{chunk}{defun npEncl} (defun |npEncl| () (and (|npBDefinition|) (|npPush| (|pfApplication| (|npPop2|) (|npPop1|))))) -@ +\end{chunk} \defun{npAtom1}{npAtom1} \calls{npAtom1}{npPDefinition} @@ -6817,7 +6802,7 @@ fn must transform the head of the stack \calls{npAtom1}{npDollar} \calls{npAtom1}{npBDefinition} \calls{npAtom1}{npFromdom} -<>= +\begin{chunk}{defun npAtom1} (defun |npAtom1| () (or (|npPDefinition|) @@ -6825,7 +6810,7 @@ fn must transform the head of the stack (or (|npName|) (|npConstTok|) (|npDollar|) (|npBDefinition|)) (|npFromdom|)))) -@ +\end{chunk} \defun{npPDefinition}{npPDefinition} \calls{npPDefinition}{npParenthesized} @@ -6833,13 +6818,13 @@ fn must transform the head of the stack \calls{npPDefinition}{npPush} \calls{npPDefinition}{pfEnSequence} \calls{npPDefinition}{npPop1} -<>= +\begin{chunk}{defun npPDefinition} (defun |npPDefinition| () (and (|npParenthesized| #'|npDefinitionlist|) (|npPush| (|pfEnSequence| (|npPop1|))))) -@ +\end{chunk} \defun{npDollar}{npDollar} \calls{npDollar}{npEqPeek} @@ -6848,7 +6833,7 @@ fn must transform the head of the stack \calls{npDollar}{tokPosn} \calls{npDollar}{npNext} \usesdollar{npDollar}{stok} -<>= +\begin{chunk}{defun npDollar} (defun |npDollar| () (declare (special |$stok|)) (and (|npEqPeek| '$) @@ -6856,7 +6841,7 @@ fn must transform the head of the stack (|npPush| (|tokConstruct| '|id| '$ (|tokPosn| |$stok|))) (|npNext|)))) -@ +\end{chunk} \defun{npConstTok}{npConstTok} \calls{npConstTok}{tokType} @@ -6870,7 +6855,7 @@ fn must transform the head of the stack \calls{npConstTok}{tokPosn} \calls{npConstTok}{npRestore} \usesdollar{npConstTok}{stok} -<>= +\begin{chunk}{defun npConstTok} (defun |npConstTok| () (let (b a) (declare (special |$stok|)) @@ -6889,26 +6874,26 @@ fn must transform the head of the stack (t (|npRestore| b) nil))) (t nil)))) -@ +\end{chunk} \defun{npBDefinition}{npBDefinition} \calls{npBDefinition}{npPDefinition} \calls{npBDefinition}{npBracketed} \calls{npBDefinition}{npDefinitionlist} -<>= +\begin{chunk}{defun npBDefinition} (defun |npBDefinition| () (or (|npPDefinition|) (|npBracketed| #'|npDefinitionlist|))) -@ +\end{chunk} \defun{npBracketed}{npBracketed} \calls{npBracketed}{npParened} \calls{npBracketed}{npBracked} \calls{npBracketed}{npBraced} \calls{npBracketed}{npAngleBared} -<>= +\begin{chunk}{defun npBracketed} (defun |npBracketed| (f) (or (|npParened| f) @@ -6916,60 +6901,60 @@ fn must transform the head of the stack (|npBraced| f) (|npAngleBared| f))) -@ +\end{chunk} \defun{npParened}{npParened} \calls{npParened}{npEnclosed} \calls{npParened}{pfParen} -<>= +\begin{chunk}{defun npParened} (defun |npParened| (f) (or (|npEnclosed| '|(| '|)| #'|pfParen| f) (|npEnclosed| '|(\|| '|\|)| #'|pfParen| f))) -@ +\end{chunk} \defun{npBracked}{npBracked} \calls{npBracked}{npEnclosed} \calls{npBracked}{pfBracket} \calls{npBracked}{pfBracketBar} -<>= +\begin{chunk}{defun npBracked} (defun |npBracked| (f) (or (|npEnclosed| '[ '] #'|pfBracket| f) (|npEnclosed| '|[\|| '|\|]| #'|pfBracketBar| f))) -@ +\end{chunk} \defun{npBraced}{npBraced} \calls{npBraced}{npEnclosed} \calls{npBraced}{pfBrace} \calls{npBraced}{pfBraceBar} -<>= +\begin{chunk}{defun npBraced} (defun |npBraced| (f) (or (|npEnclosed| '{ '} #'|pfBrace| f) (|npEnclosed| '|{\|| '|\|}| #'|pfBraceBar| f))) -@ +\end{chunk} \defun{npAngleBared}{npAngleBared} \calls{npAngleBared}{npEnclosed} \calls{npAngleBared}{pfHide} -<>= +\begin{chunk}{defun npAngleBared} (defun |npAngleBared| (f) (|npEnclosed| '|<\|| '|\|>| #'|pfHide| f)) -@ +\end{chunk} \defun{npDefn}{npDefn} \calls{npDefn}{npEqKey} \calls{npDefn}{npPP} \calls{npDefn}{npDef} -<>= +\begin{chunk}{defun npDefn} (defun |npDefn| () (and (|npEqKey| 'defn) (|npPP| #'|npDef|))) -@ +\end{chunk} \defun{npDef}{npDef} \calls{npDef}{npMatch} @@ -6981,7 +6966,7 @@ fn must transform the head of the stack \calls{npDef}{npPush} \calls{npDef}{pfDefinition} \calls{npDef}{pfPushBody} -<>= +\begin{chunk}{defun npDef} (defun |npDef| () (let (body rt arg op tmp1) (when (|npMatch|) @@ -6996,7 +6981,7 @@ fn must transform the head of the stack (|npPush| (|pfDefinition| op body)) (|npPush| (|pfDefinition| op (|pfPushBody| rt arg body))))))) -@ +\end{chunk} \defun{npBPileDefinition}{npBPileDefinition} \calls{npBPileDefinition}{npPileBracketed} @@ -7005,13 +6990,13 @@ fn must transform the head of the stack \calls{npBPileDefinition}{pfSequence} \calls{npBPileDefinition}{pfListOf} \calls{npBPileDefinition}{npPop1} -<>= +\begin{chunk}{defun npBPileDefinition} (defun |npBPileDefinition| () (and (|npPileBracketed| #'|npPileDefinitionlist|) (|npPush| (|pfSequence| (|pfListOf| (|npPop1|)))))) -@ +\end{chunk} \defun{npPileBracketed}{npPileBracketed} \calls{npPileBracketed}{npEqKey} @@ -7020,7 +7005,7 @@ fn must transform the head of the stack \calls{npPileBracketed}{npMissing} \calls{npPileBracketed}{pfPile} \calls{npPileBracketed}{npPop1} -<>= +\begin{chunk}{defun npPileBracketed} (defun |npPileBracketed| (f) (cond ((|npEqKey| 'settab) @@ -7032,7 +7017,7 @@ fn must transform the head of the stack (t nil))) (t nil))) -@ +\end{chunk} \defun{npPileDefinitionlist}{npPileDefinitionlist} \calls{npPileDefinitionlist}{npListAndRecover} @@ -7040,13 +7025,13 @@ fn must transform the head of the stack \calls{npPileDefinitionlist}{npPush} \calls{npPileDefinitionlist}{pfAppend} \calls{npPileDefinitionlist}{npPop1} -<>= +\begin{chunk}{defun npPileDefinitionlist} (defun |npPileDefinitionlist| () (and (|npListAndRecover| #'|npDefinitionlist|) (|npPush| (|pfAppend| (|npPop1|))))) -@ +\end{chunk} \defun{npListAndRecover}{npListAndRecover} \catches{npListAndRecover}{trappoint} @@ -7059,7 +7044,7 @@ fn must transform the head of the stack \calls{npListAndRecover}{npPush} \usesdollar{npListAndRecover}{inputStream} \usesdollar{npListAndRecover}{stack} -<>= +\begin{chunk}{defun npListAndRecover} (defun |npListAndRecover| (f) (let (found c done b savestack) (declare (special |$inputStream| |$stack|)) @@ -7092,7 +7077,7 @@ fn must transform the head of the stack (setq |$stack| savestack) (|npPush| (nreverse b)))) -@ +\end{chunk} \defun{npRecoverTrap}{npRecoverTrap} \calls{npRecoverTrap}{npFirstTok} @@ -7104,7 +7089,7 @@ fn must transform the head of the stack \calls{npRecoverTrap}{pfDocument} \calls{npRecoverTrap}{pfListOf} \usesdollar{npRecoverTrap}{stok} -<>= +\begin{chunk}{defun npRecoverTrap} (defun |npRecoverTrap| () (let (pos2 pos1) (declare (special |$stok|)) @@ -7117,7 +7102,7 @@ fn must transform the head of the stack (list (|pfWrong| (|pfDocument| (list "pile syntax error")) (|pfListOf| nil)))))) -@ +\end{chunk} \defun{npMoveTo}{npMoveTo} \calls{npMoveTo}{npEqPeek} @@ -7125,7 +7110,7 @@ fn must transform the head of the stack \calls{npMoveTo}{npMoveTo} \calls{npMoveTo}{npEqKey} \usesdollar{npMoveTo}{inputStream} -<>= +\begin{chunk}{defun npMoveTo} (defun |npMoveTo| (|n|) (declare (special |$inputStream|)) (cond @@ -7141,7 +7126,7 @@ fn must transform the head of the stack ((|npEqKey| 'settab) (|npMoveTo| (+ |n| 1))) (t (|npNext|) (|npMoveTo| |n|)))) -@ +\end{chunk} \defun{syIgnoredFromTo}{syIgnoredFromTo} \calls{syIgnoredFromTo}{pfGlobalLinePosn} @@ -7149,7 +7134,7 @@ fn must transform the head of the stack \calls{syIgnoredFromTo}{FromTo} \calls{syIgnoredFromTo}{From} \calls{syIgnoredFromTo}{To} -<>= +\begin{chunk}{defun syIgnoredFromTo} (defun |syIgnoredFromTo| (pos1 pos2) (cond ((equal (|pfGlobalLinePosn| pos1) (|pfGlobalLinePosn| pos2)) @@ -7158,73 +7143,73 @@ fn must transform the head of the stack (|ncSoftError| (|From| pos1) 'S2CY0003 nil) (|ncSoftError| (|To| pos2) 'S2CY0004 nil)))) -@ +\end{chunk} \defun{syGeneralErrorHere}{syGeneralErrorHere} \calls{syGeneralErrorHere}{sySpecificErrorHere} -<>= +\begin{chunk}{defun syGeneralErrorHere} (defun |syGeneralErrorHere| () (|sySpecificErrorHere| 'S2CY0002 nil)) -@ +\end{chunk} \defun{sySpecificErrorHere}{sySpecificErrorHere} \calls{sySpecificErrorHere}{sySpecificErrorAtToken} \usesdollar{sySpecificErrorHere}{stok} -<>= +\begin{chunk}{defun sySpecificErrorHere} (defun |sySpecificErrorHere| (key args) (declare (special |$stok|)) (|sySpecificErrorAtToken| |$stok| key args)) -@ +\end{chunk} \defun{sySpecificErrorAtToken}{sySpecificErrorAtToken} \calls{sySpecificErrorAtToken}{ncSoftError} \calls{sySpecificErrorAtToken}{tokPosn} -<>= +\begin{chunk}{defun sySpecificErrorAtToken} (defun |sySpecificErrorAtToken| (tok key args) (|ncSoftError| (|tokPosn| tok) key args)) -@ +\end{chunk} \defun{npDefinitionlist}{npDefinitionlist} \calls{npDefinitionlist}{npSemiListing} \calls{npDefinitionlist}{npQualDef} -<>= +\begin{chunk}{defun npDefinitionlist} (defun |npDefinitionlist| () (|npSemiListing| #'|npQualDef|)) -@ +\end{chunk} \defun{npSemiListing}{npSemiListing} \calls{npSemiListing}{npListofFun} \calls{npSemiListing}{npSemiBackSet} \calls{npSemiListing}{pfAppend} -<>= +\begin{chunk}{defun npSemiListing} (defun |npSemiListing| (p) (|npListofFun| p #'|npSemiBackSet| #'|pfAppend|)) -@ +\end{chunk} \defun{npSemiBackSet}{npSemiBackSet} \calls{npSemiBackSet}{npEqKey} -<>= +\begin{chunk}{defun npSemiBackSet} (defun |npSemiBackSet| () (and (|npEqKey| 'semicolon) (or (|npEqKey| 'backset) t))) -@ +\end{chunk} \defun{npRule}{npRule} \calls{npRule}{npEqKey} \calls{npRule}{npPP} \calls{npRule}{npSingleRule} -<>= +\begin{chunk}{defun npRule} (defun |npRule| () (and (|npEqKey| 'rule) (|npPP| #'|npSingleRule|))) -@ +\end{chunk} \defun{npSingleRule}{npSingleRule} \calls{npSingleRule}{npQuiver} @@ -7234,24 +7219,24 @@ fn must transform the head of the stack \calls{npSingleRule}{pfRule} \calls{npSingleRule}{npPop2} \calls{npSingleRule}{npPop1} -<>= +\begin{chunk}{defun npSingleRule} (defun |npSingleRule| () (when (|npQuiver|) (or (|npDefTail|) (|npTrap|)) (|npPush| (|pfRule| (|npPop2|) (|npPop1|))))) -@ +\end{chunk} \defun{npDefTail}{npDefTail} \calls{npDefTail}{npEqKey} \calls{npDefTail}{npDefinitionOrStatement} -<>= +\begin{chunk}{defun npDefTail} (defun |npDefTail| () (and (or (|npEqKey| 'def) (|npEqKey| 'mdef)) (|npDefinitionOrStatement|))) -@ +\end{chunk} \defun{npDefaultValue}{npDefaultValue} \calls{npDefaultValue}{npEqKey} @@ -7261,25 +7246,25 @@ fn must transform the head of the stack \calls{npDefaultValue}{pfAdd} \calls{npDefaultValue}{pfNothing} \calls{npDefaultValue}{npPop1} -<>= +\begin{chunk}{defun npDefaultValue} (defun |npDefaultValue| () (and (|npEqKey| 'default) (or (|npDefinitionOrStatement|) (|npTrap|)) (|npPush| (list (|pfAdd| (|pfNothing|) (|npPop1|) (|pfNothing|)))))) -@ +\end{chunk} \defun{npWConditional}{npWConditional} \calls{npWConditional}{npConditional} \calls{npWConditional}{npPush} \calls{npWConditional}{pfTweakIf} \calls{npWConditional}{npPop1} -<>= +\begin{chunk}{defun npWConditional} (defun |npWConditional| (f) (when (|npConditional| f) (|npPush| (|pfTweakIf| (|npPop1|))))) -@ +\end{chunk} \defun{npConditional}{npConditional} \calls{npConditional}{npEqKey} @@ -7287,7 +7272,7 @@ fn must transform the head of the stack \calls{npConditional}{npTrap} \calls{npConditional}{npMissing} \calls{npConditional}{npElse} -<>= +\begin{chunk}{defun npConditional} (defun |npConditional| (f) (cond ((and (|npEqKey| 'IF) @@ -7306,7 +7291,7 @@ fn must transform the head of the stack (t (|npMissing| '|then|)))) (t nil))) -@ +\end{chunk} \defun{npElse}{npElse} \calls{npElse}{npState} @@ -7319,7 +7304,7 @@ fn must transform the head of the stack \calls{npElse}{npPop1} \calls{npElse}{npRestore} \calls{npElse}{pfIfThenOnly} -<>= +\begin{chunk}{defun npElse} (defun |npElse| (f) (let (a) (setq a (|npState|)) @@ -7332,63 +7317,63 @@ fn must transform the head of the stack (|npRestore| a) (|npPush| (|pfIfThenOnly| (|npPop2|) (|npPop1|))))))) -@ +\end{chunk} \defun{npBacksetElse}{npBacksetElse} \tpdhere{Well this makes no sense.} \calls{npBacksetElse}{npEqKey} -<>= +\begin{chunk}{defun npBacksetElse} (defun |npBacksetElse| () (if (|npEqKey| 'backset) (|npEqKey| 'else) (|npEqKey| 'else))) -@ +\end{chunk} \defun{npLogical}{npLogical} \calls{npLogical}{npLeftAssoc} \calls{npLogical}{npDisjand} -<>= +\begin{chunk}{defun npLogical} (defun |npLogical| () (|npLeftAssoc| '(or) #'|npDisjand|)) -@ +\end{chunk} \defun{npDisjand}{npDisjand} \calls{npDisjand}{npLeftAssoc} \calls{npDisjand}{npDiscrim} -<>= +\begin{chunk}{defun npDisjand} (defun |npDisjand| () (|npLeftAssoc| '(and) #'|npDiscrim|)) -@ +\end{chunk} \defun{npDiscrim}{npDiscrim} \calls{npDiscrim}{npLeftAssoc} \calls{npDiscrim}{npQuiver} -<>= +\begin{chunk}{defun npDiscrim} (defun |npDiscrim| () (|npLeftAssoc| '(case has) #'|npQuiver|)) -@ +\end{chunk} \defun{npQuiver}{npQuiver} \calls{npQuiver}{npRightAssoc} \calls{npQuiver}{npRelation} -<>= +\begin{chunk}{defun npQuiver} (defun |npQuiver| () (|npRightAssoc| '(arrow larrow) #'|npRelation|)) -@ +\end{chunk} \defun{npRelation}{npRelation} \calls{npRelation}{npLeftAssoc} \calls{npRelation}{npSynthetic} -<>= +\begin{chunk}{defun npRelation} (defun |npRelation| () (|npLeftAssoc| '(equal notequal lt le gt ge oangle cangle) #'|npSynthetic|)) -@ +\end{chunk} \defun{npSynthetic}{npSynthetic} \calls{npSynthetic}{npBy} @@ -7398,7 +7383,7 @@ fn must transform the head of the stack \calls{npSynthetic}{npPop2} \calls{npSynthetic}{npPop1} \calls{npSynthetic}{pfInfApplication} -<>= +\begin{chunk}{defun npSynthetic} (defun |npSynthetic| () (cond ((|npBy|) @@ -7416,16 +7401,16 @@ fn must transform the head of the stack t) (t nil))) -@ +\end{chunk} \defun{npBy}{npBy} \calls{npBy}{npLeftAssoc} \calls{npBy}{npInterval} -<>= +\begin{chunk}{defun npBy} (defun |npBy| () (|npLeftAssoc| '(by) #'|npInterval|)) -@ +\end{chunk} \defun{npInterval}{} \calls{npInterval}{npArith} @@ -7436,7 +7421,7 @@ fn must transform the head of the stack \calls{npInterval}{npPop1} \calls{npInterval}{pfInfApplication} \calls{npInterval}{npPop2} -<>= +\begin{chunk}{defun npInterval} (defun |npInterval| () (and (|npArith|) @@ -7453,35 +7438,35 @@ fn must transform the head of the stack (|npPush| (|pfApplication| (|npPop1|) (|npPop1|))))) t))) -@ +\end{chunk} \defun{npSegment}{npSegment} \calls{npSegment}{npEqPeek} \calls{npSegment}{npPushId} \calls{npSegment}{npFromdom} -<>= +\begin{chunk}{defun npSegment} (defun |npSegment| () (and (|npEqPeek| 'seg) (|npPushId|) (|npFromdom|))) -@ +\end{chunk} \defun{npArith}{npArith} \calls{npArith}{npLeftAssoc} \calls{npArith}{npSum} -<>= +\begin{chunk}{defun npArith} (defun |npArith| () (|npLeftAssoc| '(mod) #'|npSum|)) -@ +\end{chunk} \defun{npSum}{npSum} \calls{npSum}{npLeftAssoc} \calls{npSum}{npTerm} -<>= +\begin{chunk}{defun npSum} (defun |npSum| () (|npLeftAssoc| '(plus minus) #'|npTerm|)) -@ +\end{chunk} \defun{npTerm}{npTerm} \calls{npTerm}{npInfGeneric} @@ -7490,7 +7475,7 @@ fn must transform the head of the stack \calls{npTerm}{pfApplication} \calls{npTerm}{npPop2} \calls{npTerm}{npPop1} -<>= +\begin{chunk}{defun npTerm} (defun |npTerm| () (or (and @@ -7500,46 +7485,46 @@ fn must transform the head of the stack t)) (|npRemainder|))) -@ +\end{chunk} \defun{npRemainder}{npRemainder} \calls{npRemainder}{npLeftAssoc} \calls{npRemainder}{npProduct} -<>= +\begin{chunk}{defun npRemainder} (defun |npRemainder| () (|npLeftAssoc| '(rem quo) #'|npProduct|)) -@ +\end{chunk} \defun{npProduct}{npProduct} \calls{npProduct}{npLeftAssoc} \calls{npProduct}{npPower} -<>= +\begin{chunk}{defun npProduct} (defun |npProduct| () (|npLeftAssoc| '(times slash backslash slashslash backslashbackslash slashbackslash backslashslash) #'|npPower|)) -@ +\end{chunk} \defun{npPower}{npPower} \calls{npPower}{npRightAssoc} \calls{npPower}{npColon} -<>= +\begin{chunk}{defun npPower} (defun |npPower| () (|npRightAssoc| '(power carat) #'|npColon|)) -@ +\end{chunk} \defun{npAmpersandFrom}{npAmpersandFrom} \calls{npAmpersandFrom}{npAmpersand} \calls{npAmpersandFrom}{npFromdom} -<>= +\begin{chunk}{defun npAmpersandFrom} (defun |npAmpersandFrom| () (and (|npAmpersand|) (|npFromdom|))) -@ +\end{chunk} \defun{npFromdom}{npFromdom} \calls{npFromdom}{npEqKey} @@ -7549,7 +7534,7 @@ fn must transform the head of the stack \calls{npFromdom}{npPop1} \calls{npFromdom}{npPush} \calls{npFromdom}{pfFromDom} -<>= +\begin{chunk}{defun npFromdom} (defun |npFromdom| () (or (and @@ -7559,7 +7544,7 @@ fn must transform the head of the stack (|npPush| (|pfFromDom| (|npPop1|) (|npPop1|)))) t)) -@ +\end{chunk} \defun{npFromdom1}{npFromdom1} \calls{npFromdom1}{npEqKey} @@ -7569,7 +7554,7 @@ fn must transform the head of the stack \calls{npFromdom1}{npPop1} \calls{npFromdom1}{npPush} \calls{npFromdom1}{pfFromDom} -<>= +\begin{chunk}{defun npFromdom1} (defun |npFromdom1| (c) (or (and @@ -7579,34 +7564,34 @@ fn must transform the head of the stack (|npPush| (|pfFromDom| (|npPop1|) c))) (|npPush| c))))) -@ +\end{chunk} \defun{npAmpersand}{npAmpersand} \calls{npAmpersand}{npEqKey} \calls{npAmpersand}{npName} \calls{npAmpersand}{npTrap} -<>= +\begin{chunk}{defun npAmpersand} (defun |npAmpersand| () (and (|npEqKey| 'ampersand) (or (|npName|) (|npTrap|)))) -@ +\end{chunk} \defun{npName}{npName} \calls{npName}{npId} \calls{npName}{npSymbolVariable} -<>= +\begin{chunk}{defun npName} (defun |npName| () (or (|npId|) (|npSymbolVariable|))) -@ +\end{chunk} \defvar{npPParg} -<>= +\begin{chunk}{initvars} (defvar |$npTokToNames| (list '~ '|#| '[] '{} '|[\|\|]| '|{\|\|}|)) -@ +\end{chunk} \defun{npId}{npId} \calls{npId}{npPush} @@ -7616,7 +7601,7 @@ fn must transform the head of the stack \usesdollar{npId}{npTokToNames} \usesdollar{npId}{ttok} \usesdollar{npId}{stok} -<>= +\begin{chunk}{defun npId} (defun |npId| () (declare (special |$npTokToNames| |$ttok| |$stok|)) (cond @@ -7628,7 +7613,7 @@ fn must transform the head of the stack (|npNext|)) (t nil))) -@ +\end{chunk} \defun{npSymbolVariable}{npSymbolVariable} \calls{npSymbolVariable}{npState} @@ -7640,7 +7625,7 @@ fn must transform the head of the stack \calls{npSymbolVariable}{tokPart} \calls{npSymbolVariable}{tokPosn} \calls{npSymbolVariable}{npRestore} -<>= +\begin{chunk}{defun npSymbolVariable} (defun |npSymbolVariable| () (let (a) (setq a (|npState|)) @@ -7650,7 +7635,7 @@ fn must transform the head of the stack (|npPush| (|tokConstruct| '|idsy| (|tokPart| a) (|tokPosn| a)))) (t (|npRestore| a) nil)))) -@ +\end{chunk} \defun{npRightAssoc}{npRightAssoc} \calls{npRightAssoc}{npState} @@ -7662,7 +7647,7 @@ fn must transform the head of the stack \calls{npRightAssoc}{npPop1} \calls{npRightAssoc}{pfInfApplication} \calls{npRightAssoc}{npRestore} -<>= +\begin{chunk}{defun npRightAssoc} (defun |npRightAssoc| (o p) (let (a) (setq a (|npState|)) @@ -7685,7 +7670,7 @@ fn must transform the head of the stack (|npRestore| a) nil)))) -@ +\end{chunk} \defun{npLeftAssoc}{p o p o p o p = (((p o p) o p) o p)} \begin{verbatim} @@ -7708,7 +7693,7 @@ p o p o = (p o p) o \calls{npLeftAssoc}{npPop2} \calls{npLeftAssoc}{npPop1} \calls{npLeftAssoc}{pfInfApplication} -<>= +\begin{chunk}{defun npLeftAssoc} (defun |npLeftAssoc| (operations parser) (when (apply parser nil) ((lambda nil @@ -7725,18 +7710,18 @@ p o p o = (p o p) o (|npPush| (|pfInfApplication| (|npPop2|) (|npPop2|) (|npPop1|)))))))) t)) -@ +\end{chunk} \defun{npInfGeneric}{npInfGeneric} \calls{npInfGeneric}{npDDInfKey} \calls{npInfGeneric}{npEqKey} -<>= +\begin{chunk}{defun npInfGeneric} (defun |npInfGeneric| (s) (and (|npDDInfKey| s) (or (|npEqKey| 'backset) t))) -@ +\end{chunk} \defun{npDDInfKey}{npDDInfKey} \calls{npDDInfKey}{npInfKey} @@ -7750,7 +7735,7 @@ p o p o = (p o p) o \calls{npDDInfKey}{tokConstruct} \calls{npDDInfKey}{tokPart} \usesdollar{npDDInfKey}{stok} -<>= +\begin{chunk}{defun npDDInfKey} (defun |npDDInfKey| (s) (let (b a) (declare (special |$stok|)) @@ -7772,18 +7757,18 @@ p o p o = (p o p) o (|npRestore| a) nil)))))))) -@ +\end{chunk} \defun{npInfKey}{npInfKey} \calls{npInfKey}{npPushId} \usesdollar{npInfKey}{stok} \usesdollar{npInfKey}{ttok} -<>= +\begin{chunk}{defun npInfKey} (defun |npInfKey| (s) (declare (special |$ttok| |$stok|)) (and (eq (caar |$stok|) '|key|) (member |$ttok| s) (|npPushId|))) -@ +\end{chunk} \defun{npPushId}{npPushId} \calls{npPushId}{tokConstruct} @@ -7792,7 +7777,7 @@ p o p o = (p o p) o \usesdollar{npPushId}{stack} \usesdollar{npPushId}{stok} \usesdollar{npPushId}{ttok} -<>= +\begin{chunk}{defun npPushId} (defun |npPushId| () (let (a) (declare (special |$stack| |$stok| |$ttok|)) @@ -7802,13 +7787,13 @@ p o p o = (p o p) o (cons (|tokConstruct| '|id| |$ttok| (|tokPosn| |$stok|)) |$stack|)) (|npNext|))) -@ +\end{chunk} \defvar{npPParg} -<>= +\begin{chunk}{initvars} (defvar *npPParg* nil "rewrite npPP without flets, using global scoping") -@ +\end{chunk} \defun{npPP}{npPP} This was rewritten by NAG to remove flet. @@ -7820,7 +7805,7 @@ This was rewritten by NAG to remove flet. \calls{npPP}{pfEnSequence} \calls{npPP}{npPop1} \uses{npPP}{npPParg} -<>= +\begin{chunk}{defun npPP} (defun |npPP| (f) (declare (special *npPParg*)) (setq *npPParg* f) @@ -7829,17 +7814,17 @@ This was rewritten by NAG to remove flet. (and (|npPileBracketed| #'npPPg) (|npPush| (|pfEnSequence| (|npPop1|)))) (funcall f))) -@ +\end{chunk} \defun{npPPff}{npPPff} \calls{npPPff}{npPop1} \calls{npPPff}{npPush} \usesdollar{npPPff}{npPParg} -<>= +\begin{chunk}{defun npPPff} (defun npPPff () (and (funcall *npPParg*) (|npPush| (list (|npPop1|))))) -@ +\end{chunk} \defun{npPPg}{npPPg} \calls{npPPg}{npListAndRecover} @@ -7847,21 +7832,21 @@ This was rewritten by NAG to remove flet. \calls{npPPg}{npPush} \calls{npPPg}{pfAppend} \calls{npPPg}{npPop1} -<>= +\begin{chunk}{defun npPPg} (defun npPPg () (and (|npListAndRecover| #'npPPf)) (|npPush| (|pfAppend| (|npPop1|)))) -@ +\end{chunk} \defun{npPPf}{npPPf} \calls{npPPf}{npSemiListing} \calls{npPPf}{npPPff} -<>= +\begin{chunk}{defun npPPf} (defun npPPf () (|npSemiListing| #'npPPff)) -@ +\end{chunk} \defun{npEnclosed}{npEnclosed} \calls{npEnclosed}{npEqKey} @@ -7872,7 +7857,7 @@ This was rewritten by NAG to remove flet. \calls{npEnclosed}{pfEnSequence} \calls{npEnclosed}{npPop1} \usesdollar{npEnclosed}{stok} -<>= +\begin{chunk}{defun npEnclosed} (defun |npEnclosed| (open close fn f) (let (a) (declare (special |$stok|)) @@ -7887,30 +7872,30 @@ This was rewritten by NAG to remove flet. (|npPush| (funcall fn a (|pfEnSequence| (|npPop1|))))) ('t nil))))) -@ +\end{chunk} \defun{npState}{npState} \usesdollar{npState}{stack} \usesdollar{npState}{inputStream} -<>= +\begin{chunk}{defun npState} (defun |npState| () (declare (special |$stack| |$inputStream|)) (cons |$inputStream| |$stack|)) -@ +\end{chunk} \defun{npTrap}{npTrap} \throws{npTrap}{trappoint} \calls{npTrap}{tokPosn} \calls{npTrap}{ncSoftError} \usesdollar{npTrap}{stok} -<>= +\begin{chunk}{defun npTrap} (defun |npTrap| () (declare (special |$stok|)) (|ncSoftError| (|tokPosn| |$stok|) 'S2CY0002 nil) (throw 'trappoint 'trapped)) -@ +\end{chunk} \defun{npTrapForm}{npTrapForm} \throws{npTrapForm}{trappoint} @@ -7918,7 +7903,7 @@ This was rewritten by NAG to remove flet. \calls{npTrapForm}{syGeneralErrorHere} \calls{npTrapForm}{ncSoftError} \calls{npTrapForm}{tokPosn} -<>= +\begin{chunk}{defun npTrapForm} (defun |npTrapForm| (x) (let (a) (setq a (|pfSourceStok| x)) @@ -7930,7 +7915,7 @@ This was rewritten by NAG to remove flet. (|ncSoftError| (|tokPosn| a) 'S2CY0002 nil) (throw 'trappoint 'trapped))))) -@ +\end{chunk} \defun{npVariable}{npVariable} \calls{npVariable}{npParenthesized} @@ -7939,22 +7924,22 @@ This was rewritten by NAG to remove flet. \calls{npVariable}{npPush} \calls{npVariable}{pfListOf} \calls{npVariable}{npPop1} -<>= +\begin{chunk}{defun npVariable} (defun |npVariable| () (or (|npParenthesized| #'|npVariablelist|) (and (|npVariableName|) (|npPush| (|pfListOf| (list (|npPop1|))))))) -@ +\end{chunk} \defun{npVariablelist}{npVariablelist} \calls{npVariablelist}{npListing} \calls{npVariablelist}{npVariableName} -<>= +\begin{chunk}{defun npVariablelist} (defun |npVariablelist| () (|npListing| #'|npVariableName|)) -@ +\end{chunk} \defun{npVariableName}{npVariableName} \calls{npVariableName}{npName} @@ -7963,13 +7948,13 @@ This was rewritten by NAG to remove flet. \calls{npVariableName}{pfTyped} \calls{npVariableName}{npPop1} \calls{npVariableName}{pfNothing} -<>= +\begin{chunk}{defun npVariableName} (defun |npVariableName| () (and (|npName|) (or (|npDecl|) (|npPush| (|pfTyped| (|npPop1|) (|pfNothing|)))))) -@ +\end{chunk} \defun{npDecl}{npDecl} \calls{npDecl}{npEqKey} @@ -7979,29 +7964,29 @@ This was rewritten by NAG to remove flet. \calls{npDecl}{pfTyped} \calls{npDecl}{npPop2} \calls{npDecl}{npPop1} -<>= +\begin{chunk}{defun npDecl} (defun |npDecl| () (and (|npEqKey| 'colon) (or (|npType|) (|npTrap|)) (|npPush| (|pfTyped| (|npPop2|) (|npPop1|))))) -@ +\end{chunk} \defun{npParenthesized}{npParenthesized} \calls{npParenthesized}{npParenthesize} -<>= +\begin{chunk}{defun npParenthesized} (defun |npParenthesized| (f) (or (|npParenthesize| '|(| '|)| f) (|npParenthesize| '|(\|| '|\|)| f))) -@ +\end{chunk} \defun{npParenthesize}{npParenthesize} \calls{npParenthesize}{npEqKey} \calls{npParenthesize}{npMissingMate} \calls{npParenthesize}{npPush} \usesdollar{npParenthesize}{stok} -<>= +\begin{chunk}{defun npParenthesize} (defun |npParenthesize| (open close f) (let (a) (declare (special |$stok|)) @@ -8017,28 +8002,28 @@ This was rewritten by NAG to remove flet. (t (|npMissingMate| close a)))) (t nil)))) -@ +\end{chunk} \defun{npMissingMate}{npMissingMate} \calls{npMissingMate}{ncSoftError} \calls{npMissingMate}{tokPosn} \calls{npMissingMate}{npMissing} -<>= +\begin{chunk}{defun npMissingMate} (defun |npMissingMate| (close open) (|ncSoftError| (|tokPosn| open) 'S2CY0008 nil) (|npMissing| close)) -@ +\end{chunk} \defun{npExit}{npExit} \calls{npExit}{npBackTrack} \calls{npExit}{npAssign} \calls{npExit}{npPileExit} -<>= +\begin{chunk}{defun npExit} (defun |npExit| () (|npBackTrack| #'|npAssign| 'exit #'|npPileExit|)) -@ +\end{chunk} \defun{npPileExit}{npPileExit} \calls{npPileExit}{npAssign} @@ -8048,7 +8033,7 @@ This was rewritten by NAG to remove flet. \calls{npPileExit}{pfExit} \calls{npPileExit}{npPop2} \calls{npPileExit}{npPop1} -<>= +\begin{chunk}{defun npPileExit} (defun |npPileExit| () (and (|npAssign|) @@ -8056,17 +8041,17 @@ This was rewritten by NAG to remove flet. (or (|npStatement|) (|npTrap|)) (|npPush| (|pfExit| (|npPop2|) (|npPop1|))))) -@ +\end{chunk} \defun{npAssign}{npAssign} \calls{npAssign}{npBackTrack} \calls{npAssign}{npMDEF} \calls{npAssign}{npAssignment} -<>= +\begin{chunk}{defun npAssign} (defun |npAssign| () (|npBackTrack| #'|npMDEF| 'becomes #'|npAssignment|)) -@ +\end{chunk} \defun{npAssignment}{npAssignment} \calls{npAssignment}{npAssignVariable} @@ -8077,7 +8062,7 @@ This was rewritten by NAG to remove flet. \calls{npAssignment}{pfAssign} \calls{npAssignment}{npPop2} \calls{npAssignment}{npPop1} -<>= +\begin{chunk}{defun npAssignment} (defun |npAssignment| () (and (|npAssignVariable|) @@ -8085,37 +8070,37 @@ This was rewritten by NAG to remove flet. (or (|npGives|) (|npTrap|)) (|npPush| (|pfAssign| (|npPop2|) (|npPop1|))))) -@ +\end{chunk} \defun{npAssignVariable}{npAssignVariable} \calls{npAssignVariable}{npColon} \calls{npAssignVariable}{npPush} \calls{npAssignVariable}{pfListOf} \calls{npAssignVariable}{npPop1} -<>= +\begin{chunk}{defun npAssignVariable} (defun |npAssignVariable| () (and (|npColon|) (|npPush| (|pfListOf| (list (|npPop1|)))))) -@ +\end{chunk} \defun{npColon}{npColon} \calls{npColon}{npTypified} \calls{npColon}{npAnyNo} \calls{npColon}{npTagged} -<>= +\begin{chunk}{defun npColon} (defun |npColon| () (and (|npTypified|) (|npAnyNo| #'|npTagged|))) -@ +\end{chunk} \defun{npTagged}{npTagged} \calls{npTagged}{npTypedForm1} \calls{npTagged}{pfTagged} -<>= +\begin{chunk}{defun npTagged} (defun |npTagged| () (|npTypedForm1| 'colon #'|pfTagged|)) -@ +\end{chunk} \defun{npTypedForm1}{npTypedForm1} \calls{npTypedForm1}{npEqKey} @@ -8124,62 +8109,62 @@ This was rewritten by NAG to remove flet. \calls{npTypedForm1}{npPush} \calls{npTypedForm1}{npPop2} \calls{npTypedForm1}{npPop1} -<>= +\begin{chunk}{defun npTypedForm1} (defun |npTypedForm1| (sy fn) (and (|npEqKey| sy) (or (|npType|) (|npTrap|)) (|npPush| (funcall fn (|npPop2|) (|npPop1|))))) -@ +\end{chunk} \defun{npTypified}{npTypified} \calls{npTypified}{npApplication} \calls{npTypified}{npAnyNo} \calls{npTypified}{npTypeStyle} -<>= +\begin{chunk}{defun npTypified} (defun |npTypified| () (and (|npApplication|) (|npAnyNo| #'|npTypeStyle|))) -@ +\end{chunk} \defun{npTypeStyle}{npTypeStyle} \calls{npTypeStyle}{npCoerceTo} \calls{npTypeStyle}{npRestrict} \calls{npTypeStyle}{npPretend} \calls{npTypeStyle}{npColonQuery} -<>= +\begin{chunk}{defun npTypeStyle} (defun |npTypeStyle| () (or (|npCoerceTo|) (|npRestrict|) (|npPretend|) (|npColonQuery|))) -@ +\end{chunk} \defun{npPretend}{npPretend} \calls{npPretend}{npTypedForm} \calls{npPretend}{pfPretend} -<>= +\begin{chunk}{defun npPretend} (defun |npPretend| () (|npTypedForm| 'pretend #'|pfPretend|)) -@ +\end{chunk} \defun{npColonQuery}{npColonQuery} \calls{npColonQuery}{npTypedForm} \calls{npColonQuery}{pfRetractTo} -<>= +\begin{chunk}{defun npColonQuery} (defun |npColonQuery| () (|npTypedForm| 'atat #'|pfRetractTo|)) -@ +\end{chunk} \defun{npCoerceTo}{npCoerceTo} \calls{npCoerceTo}{npTypedForm} \calls{npCoerceTo}{pfCoerceto} -<>= +\begin{chunk}{defun npCoerceTo} (defun |npCoerceTo| () (|npTypedForm| 'coerce #'|pfCoerceto|)) -@ +\end{chunk} \defun{npTypedForm}{npTypedForm} \calls{npTypedForm}{npEqKey} @@ -8188,23 +8173,23 @@ This was rewritten by NAG to remove flet. \calls{npTypedForm}{npPush} \calls{npTypedForm}{npPop2} \calls{npTypedForm}{npPop1} -<>= +\begin{chunk}{defun npTypedForm} (defun |npTypedForm| (sy fn) (and (|npEqKey| sy) (or (|npApplication|) (|npTrap|)) (|npPush| (funcall fn (|npPop2|) (|npPop1|))))) -@ +\end{chunk} \defun{npRestrict}{npRestrict} \calls{npRestrict}{npTypedForm} \calls{npRestrict}{pfRestrict} -<>= +\begin{chunk}{defun npRestrict} (defun |npRestrict| () (|npTypedForm| 'at #'|pfRestrict|)) -@ +\end{chunk} \defun{npListofFun}{npListofFun} \calls{npListofFun}{npTrap} @@ -8213,7 +8198,7 @@ This was rewritten by NAG to remove flet. \calls{npListofFun}{npPop2} \calls{npListofFun}{npPop1} \usesdollar{npListofFun}{stack} -<>= +\begin{chunk}{defun npListofFun} (defun |npListofFun| (f h g) (let (a) (declare (special |$stack|)) @@ -8231,7 +8216,7 @@ This was rewritten by NAG to remove flet. (t t))) (t nil)))) -@ +\end{chunk} \section{Macro handling} \defun{phMacro}{phMacro} @@ -8244,7 +8229,7 @@ carrier[ptree,...] -> carrier[ptree, ptreePremacro,...] \calls{phMacro}{macroExpanded} \calls{phMacro}{intSayKeyedMsg} \calls{phMacro}{pform} -<>= +\begin{chunk}{defun phMacro} (defun |phMacro| (carrier) (let (ptree) (setq ptree (|ncEltQ| carrier '|ptree|)) @@ -8253,7 +8238,7 @@ carrier[ptree,...] -> carrier[ptree, ptreePremacro,...] (|ncPutQ| carrier '|ptree| ptree) 'ok)) -@ +\end{chunk} \defun{macroExpanded}{macroExpanded} \$macActive is a list of the bodies being expanded. @@ -8261,7 +8246,7 @@ carrier[ptree,...] -> carrier[ptree, ptreePremacro,...] \calls{macroExpanded}{macExpand} \usesdollar{macroExpanded}{posActive} \usesdollar{macroExpanded}{macActive} -<>= +\begin{chunk}{defun macroExpanded} (defun |macroExpanded| (pf) (let (|$posActive| |$macActive|) (declare (special |$posActive| |$macActive|)) @@ -8269,7 +8254,7 @@ carrier[ptree,...] -> carrier[ptree, ptreePremacro,...] (setq |$posActive| nil) (|macExpand| pf))) -@ +\end{chunk} \defun{macExpand}{macExpand} \calls{macExpand}{pfWhere?} @@ -8284,7 +8269,7 @@ carrier[ptree,...] -> carrier[ptree, ptreePremacro,...] \calls{macExpand}{macApplication} \calls{macExpand}{pfMapParts} \calls{macExpand}{macExpand} -<>= +\begin{chunk}{defun macExpand} (defun |macExpand| (pf) (cond ((|pfWhere?| pf) (|macWhere| pf)) @@ -8294,7 +8279,7 @@ carrier[ptree,...] -> carrier[ptree, ptreePremacro,...] ((|pfApplication?| pf) (|macApplication| pf)) (t (|pfMapParts| #'|macExpand| pf)))) -@ +\end{chunk} \defun{macApplication}{macApplication} \calls{macApplication}{pfMapParts} @@ -8304,7 +8289,7 @@ carrier[ptree,...] -> carrier[ptree, ptreePremacro,...] \calls{macApplication}{pf0ApplicationArgs} \calls{macApplication}{mac0MLambdaApply} \usesdollar{macApplication}{pfMacros} -<>= +\begin{chunk}{defun macApplication} (defun |macApplication| (pf) (let (args op) (declare (special |$pfMacros|)) @@ -8316,7 +8301,7 @@ carrier[ptree,...] -> carrier[ptree, ptreePremacro,...] (setq args (|pf0ApplicationArgs| pf)) (|mac0MLambdaApply| op args pf |$pfMacros|))))) -@ +\end{chunk} \defun{mac0MLambdaApply}{mac0MLambdaApply} \tpdhere{The pform function has a leading percent sign. fix this} @@ -8331,7 +8316,7 @@ carrier[ptree,...] -> carrier[ptree, ptreePremacro,...] \usesdollar{mac0MLambdaApply}{pfMacros} \usesdollar{mac0MLambdaApply}{posActive} \usesdollar{mac0MLambdaApply}{macActive} -<>= +\begin{chunk}{defun mac0MLambdaApply} (defun |mac0MLambdaApply| (mlambda args opf |$pfMacros|) (declare (special |$pfMacros|)) (let (pos body params) @@ -8363,7 +8348,7 @@ carrier[ptree,...] -> carrier[ptree, ptreePremacro,...] params nil args nil) (|mac0ExpandBody| body opf |$macActive| |$posActive|))))) -@ +\end{chunk} \defun{mac0ExpandBody}{mac0ExpandBody} \calls{mac0ExpandBody}{pfSourcePosition} @@ -8371,7 +8356,7 @@ carrier[ptree,...] -> carrier[ptree, ptreePremacro,...] \calls{mac0ExpandBody}{macExpand} \usesdollar{mac0ExpandBody}{posActive} \usesdollar{mac0ExpandBody}{macActive} -<>= +\begin{chunk}{defun mac0ExpandBody} (defun |mac0ExpandBody| (body opf |$macActive| |$posActive|) (declare (special |$macActive| |$posActive|)) (let (posn pf) @@ -8385,14 +8370,14 @@ carrier[ptree,...] -> carrier[ptree, ptreePremacro,...] (setq |$posActive| (cons opf |$posActive|)) (|macExpand| body))))) -@ +\end{chunk} \defun{mac0InfiniteExpansion}{mac0InfiniteExpansion} \tpdhere{The pform function has a leading percent sign. fix this} \calls{mac0InfiniteExpansion}{mac0InfiniteExpansion,name} \calls{mac0InfiniteExpansion}{ncSoftError} \calls{mac0InfiniteExpansion}{pform} -<>= +\begin{chunk}{defun mac0InfiniteExpansion} (defun |mac0InfiniteExpansion| (posn body active) (let (rnames fname tmp1 blist result) (setq blist (cons body active)) @@ -8406,12 +8391,12 @@ carrier[ptree,...] -> carrier[ptree, ptreePremacro,...] fname (|%pform| body))) body)) -@ +\end{chunk} \defun{mac0InfiniteExpansion,name}{mac0InfiniteExpansion,name} \calls{mac0InfiniteExpansion,name}{mac0GetName} \calls{mac0InfiniteExpansion,name}{pname} -<>= +\begin{chunk}{defun mac0InfiniteExpansion,name 0} (defun |mac0InfiniteExpansion,name| (b) (let (st sy got) (setq got (|mac0GetName| b)) @@ -8424,14 +8409,14 @@ carrier[ptree,...] -> carrier[ptree, ptreePremacro,...] (concat (pname sy) "(...)") (pname sy)))))) -@ +\end{chunk} \defun{mac0GetName}{mac0GetName} Returns [state, body] or NIL. Returns [sy, state] or NIL. \calls{mac0GetName}{pfMLambdaBody} \usesdollar{mac0GetName}{pfMacros} -<>= +\begin{chunk}{defun mac0GetName} (defun |mac0GetName| (body) (let (bd tmp1 st tmp2 sy name) (declare (special |$pfMacros|)) @@ -8464,7 +8449,7 @@ Returns [sy, state] or NIL. |$pfMacros| nil) name)) -@ +\end{chunk} \defun{macId}{macId} \calls{macId}{pfIdSymbol} @@ -8474,7 +8459,7 @@ Returns [sy, state] or NIL. \calls{macId}{mac0ExpandBody} \usesdollar{macId}{posActive} \usesdollar{macId}{macActive} -<>= +\begin{chunk}{defun macId} (defun |macId| (pf) (let (body state got sy) (declare (special |$posActive| |$macActive|)) @@ -8492,59 +8477,59 @@ Returns [sy, state] or NIL. (|mac0ExpandBody| body pf |$macActive| |$posActive|) (|pfSourcePosition| pf)))))))) -@ +\end{chunk} \defun{mac0Get}{mac0Get} \calls{mac0Get}{ifcdr} \usesdollar{mac0Get}{pfMacros} -<>= +\begin{chunk}{defun mac0Get} (defun |mac0Get| (sy) (declare (special |$pfMacros|)) (ifcdr (assoc sy |$pfMacros|))) -@ +\end{chunk} \defun{macWhere}{macWhere} \calls{macWhere}{macWhere,mac} \usesdollar{macWhere}{pfMacros} -<>= +\begin{chunk}{defun macWhere} (defun |macWhere| (pf) (declare (special |$pfMacros|)) (|macWhere,mac| pf |$pfMacros|)) -@ +\end{chunk} \defun{macWhere,mac}{macWhere,mac} \calls{macWhere,mac}{pfMapParts} \calls{macWhere,mac}{macExpand} \usesdollar{macWhere,mac}{pfMacros} -<>= +\begin{chunk}{defun macWhere,mac} (defun |macWhere,mac| (pf |$pfMacros|) (declare (special |$pfMacros|)) (|pfMapParts| #'|macExpand| pf)) -@ +\end{chunk} \defun{macLambda}{macLambda} \calls{macLambda}{macLambda,mac} \usesdollar{macLambda}{pfMacros} -<>= +\begin{chunk}{defun macLambda} (defun |macLambda| (pf) (declare (special |$pfMacros|)) (|macLambda,mac| pf |$pfMacros|)) -@ +\end{chunk} \defun{macLambda,mac}{macLambda,mac} \calls{macLambda,mac}{pfMapParts} \calls{macLambda,mac}{macExpand} \usesdollar{macLambda,mac}{pfMacros} -<>= +\begin{chunk}{defun macLambda,mac} (defun |macLambda,mac| (pf |$pfMacros|) (declare (special |$pfMacros|)) (|pfMapParts| #'|macExpand| pf)) -@ +\end{chunk} \defun{macMacro}{Add appropriate definition the a Macro pform} This function adds the appropriate definition and returns @@ -8563,7 +8548,7 @@ the original Macro pform. \calls{macMacro}{pfNothing?} \calls{macMacro}{pfMacro} \calls{macMacro}{pfNothing} -<>= +\begin{chunk}{defun macMacro} (defun |macMacro| (pf) (let (sy rhs lhs) (setq lhs (|pfMacroLhs| pf)) @@ -8583,25 +8568,25 @@ the original Macro pform. ((|pfNothing?| rhs) pf) (t (|pfMacro| lhs (|pfNothing|)))))))) -@ +\end{chunk} \defun{mac0Define}{Add a macro to the global pfMacros list} \usesdollar{mac0Define}{pfMacros} -<>= +\begin{chunk}{defun mac0Define 0} (defun |mac0Define| (sy state body) (declare (special |$pfMacros|)) (setq |$pfMacros| (cons (list sy state body) |$pfMacros|))) -@ +\end{chunk} \defun{macSubstituteOuter}{macSubstituteOuter} \calls{macSubstituteOuter}{mac0SubstituteOuter} \calls{macSubstituteOuter}{macLambdaParameterHandling} -<>= +\begin{chunk}{defun macSubstituteOuter} (defun |macSubstituteOuter| (pform) (|mac0SubstituteOuter| (|macLambdaParameterHandling| nil pform) pform)) -@ +\end{chunk} \defun{mac0SubstituteOuter}{mac0SubstituteOuter} \calls{mac0SubstituteOuter}{pfId?} @@ -8611,7 +8596,7 @@ the original Macro pform. \calls{mac0SubstituteOuter}{macLambdaParameterHandling} \calls{mac0SubstituteOuter}{mac0SubstituteOuter} \calls{mac0SubstituteOuter}{pfParts} -<>= +\begin{chunk}{defun mac0SubstituteOuter} (defun |mac0SubstituteOuter| (replist pform) (let (tmplist) (cond @@ -8625,7 +8610,7 @@ the original Macro pform. (dolist (p (|pfParts| pform)) (|mac0SubstituteOuter| replist p)) pform)))) -@ +\end{chunk} \defun{macLambdaParameterHandling}{macLambdaParameterHandling} \calls{macLambdaParameterHandling}{pfLeaf?} @@ -8640,7 +8625,7 @@ the original Macro pform. \calls{macLambdaParameterHandling}{pfLeafPosition} \calls{macLambdaParameterHandling}{pfParts} \calls{macLambdaParameterHandling}{macLambdaParameterHandling} -<>= +\begin{chunk}{defun macLambdaParameterHandling} (defun |macLambdaParameterHandling| (replist pform) (let (parlist symlist result) (cond @@ -8664,11 +8649,11 @@ the original Macro pform. (dolist (p (|pfParts| pform)) (|macLambdaParameterHandling| replist p)))))) -@ +\end{chunk} \defun{macSubstituteId}{macSubstituteId} \calls{macSubstituteId}{pfIdSymbol} -<>= +\begin{chunk}{defun macSubstituteId} (defun |macSubstituteId| (replist pform) (let (ex) (setq ex (assoc (|pfIdSymbol| pform) replist :test #'eq)) @@ -8678,7 +8663,7 @@ the original Macro pform. pform) (t pform)))) -@ +\end{chunk} \chapter{Pftrees} \section{Abstract Syntax Trees Overview} @@ -8797,35 +8782,35 @@ of the form ('expression expr position) \defun{pfGlobalLinePosn}{pfGlobalLinePosn} \calls{pfGlobalLinePosn}{poGlobalLinePosn} -<>= +\begin{chunk}{defun pfGlobalLinePosn} (defun |pfGlobalLinePosn| (posn) (|poGlobalLinePosn| posn)) -@ +\end{chunk} \defun{pfCharPosn}{pfCharPosn} \calls{pfCharPosn}{poCharPosn} -<>= +\begin{chunk}{defun pfCharPosn} (defun |pfCharPosn| (posn) (|poCharPosn| posn)) -@ +\end{chunk} \defun{pfLinePosn}{pfLinePosn} \calls{pfLinePosn}{poLinePosn} -<>= +\begin{chunk}{defun pfLinePosn} (defun |pfLinePosn| (posn) (|poLinePosn| posn)) -@ +\end{chunk} \defun{pfFileName}{pfFileName} \calls{pfFileName}{poFileName} -<>= +\begin{chunk}{defun pfFileName} (defun |pfFileName| (posn) (|poFileName| posn)) -@ +\end{chunk} \defun{pfCopyWithPos}{pfCopyWithPos} \calls{pfCopyWithPos}{pfLeaf?} @@ -8835,7 +8820,7 @@ of the form ('expression expr position) \calls{pfCopyWithPos}{pfTree} \calls{pfCopyWithPos}{pfParts} \calls{pfCopyWithPos}{pfCopyWithPos} -<>= +\begin{chunk}{defun pfCopyWithPos} (defun |pfCopyWithPos| (pform pos) (if (|pfLeaf?| pform) (|pfLeaf| (|pfAbSynOp| pform) (|tokPart| pform) pos) @@ -8843,14 +8828,14 @@ of the form ('expression expr position) (loop for p in (|pfParts| pform) collect (|pfCopyWithPos| p pos))))) -@ +\end{chunk} \defun{pfMapParts}{pfMapParts} \calls{pfMapParts}{pfLeaf?} \calls{pfMapParts}{pfParts} \calls{pfMapParts}{pfTree} \calls{pfMapParts}{pfAbSynOp} -<>= +\begin{chunk}{defun pfMapParts} (defun |pfMapParts| (f pform) (let (same parts1 parts0) (if (|pfLeaf?| pform) @@ -8862,22 +8847,22 @@ of the form ('expression expr position) pform (|pfTree| (|pfAbSynOp| pform) parts1)))))) -@ +\end{chunk} \defun{pf0ApplicationArgs}{pf0ApplicationArgs} \calls{pf0ApplicationArgs}{pf0FlattenSyntacticTuple} \calls{pf0ApplicationArgs}{pfApplicationArg} -<>= +\begin{chunk}{defun pf0ApplicationArgs} (defun |pf0ApplicationArgs| (pform) (|pf0FlattenSyntacticTuple| (|pfApplicationArg| pform))) -@ +\end{chunk} \defun{pf0FlattenSyntacticTuple}{pf0FlattenSyntacticTuple} \calls{pf0FlattenSyntacticTuple}{pfTuple?} \calls{pf0FlattenSyntacticTuple}{pf0FlattenSyntacticTuple} \calls{pf0FlattenSyntacticTuple}{pf0TupleParts} -<>= +\begin{chunk}{defun pf0FlattenSyntacticTuple} (defun |pf0FlattenSyntacticTuple| (pform) (if (null (|pfTuple?| pform)) (list pform) @@ -8892,7 +8877,7 @@ of the form ('expression expr position) (setq arg1 (cdr arg1)))) nil (|pf0TupleParts| pform) nil))) -@ +\end{chunk} \defun{pfSourcePosition}{pfSourcePosition} \calls{pfSourcePosition}{pfLeaf?} @@ -8901,7 +8886,7 @@ of the form ('expression expr position) \calls{pfSourcePosition}{pfSourcePosition} \calls{pfSourcePosition}{pfParts} \usesdollar{pfSourcePosition}{nopos} -<>= +\begin{chunk}{defun pfSourcePosition} (defun |pfSourcePosition| (form) (let (pos) (declare (special |$nopos|)) @@ -8921,27 +8906,27 @@ of the form ('expression expr position) (|pfParts| form) nil) pos)))) -@ +\end{chunk} \defun{pfSequenceToList}{Convert a Sequence node to a list} \calls{pfSequenceToList}{pfSequence?} \calls{pfSequenceToList}{pfSequenceArgs} \calls{pfSequenceToList}{pfListOf} -<>= +\begin{chunk}{defun pfSequenceToList} (defun |pfSequenceToList| (x) (if (|pfSequence?| x) (|pfSequenceArgs| x) (|pfListOf| (list x)))) -@ +\end{chunk} \defun{pfSpread}{pfSpread} \calls{pfSpread}{pfTyped} -<>= +\begin{chunk}{defun pfSpread} (defun |pfSpread| (arg1 arg2) (mapcar #'(lambda (i) (|pfTyped| i arg2)) arg1)) -@ +\end{chunk} \defun{pfCheckItOut}{Deconstruct nodes to lists} \calls{pfCheckItOut}{pfTagged?} @@ -8962,7 +8947,7 @@ of the form ('expression expr position) \calls{pfCheckItOut}{pfTaggedToTyped1} \calls{pfCheckItOut}{pfTransformArg} \calls{pfCheckItOut}{npTrapForm} -<>= +\begin{chunk}{defun pfCheckItOut} (defun |pfCheckItOut| (x) (let (args op ls form rt result) (if (|pfTagged?| x) @@ -8992,7 +8977,7 @@ of the form ('expression expr position) (list (|pfListOf| (list op)) args rt)) (t (|npTrapForm| form))))) -@ +\end{chunk} \defun{pfCheckMacroOut}{pfCheckMacroOut} \calls{pfCheckMacroOut}{pfId?} @@ -9001,7 +8986,7 @@ of the form ('expression expr position) \calls{pfCheckMacroOut}{pfCheckId} \calls{pfCheckMacroOut}{pfCheckArg} \calls{pfCheckMacroOut}{npTrapForm} -<>= +\begin{chunk}{defun pfCheckMacroOut} (defun |pfCheckMacroOut| (form) (let (args op ls) (cond @@ -9013,14 +8998,14 @@ of the form ('expression expr position) (list op args)) (t (|npTrapForm| form))))) -@ +\end{chunk} \defun{pfCheckArg}{pfCheckArg} \calls{pfCheckArg}{pfTuple?} \calls{pfCheckArg}{pf0TupleParts} \calls{pfCheckArg}{pfListOf} \calls{pfCheckArg}{pfCheckId} -<>= +\begin{chunk}{defun pfCheckArg} (defun |pfCheckArg| (args) (let (argl) (if (|pfTuple?| args) @@ -9028,18 +9013,18 @@ of the form ('expression expr position) (setq argl (list args))) (|pfListOf| (mapcar #'|pfCheckId| argl)))) -@ +\end{chunk} \defun{pfCheckId}{pfCheckId} \calls{pfCheckId}{pfId?} \calls{pfCheckId}{npTrapForm} -<>= +\begin{chunk}{defun pfCheckId} (defun |pfCheckId| (form) (if (null (|pfId?| form)) (|npTrapForm| form) form)) -@ +\end{chunk} \defun{pfFlattenApp}{pfFlattenApp} \calls{pfFlattenApp}{pfApplication?} @@ -9047,7 +9032,7 @@ of the form ('expression expr position) \calls{pfFlattenApp}{pfFlattenApp} \calls{pfFlattenApp}{pfApplicationOp} \calls{pfFlattenApp}{pfApplicationArg} -<>= +\begin{chunk}{defun pfFlattenApp} (defun |pfFlattenApp| (x) (cond ((|pfApplication?| x) @@ -9058,21 +9043,21 @@ of the form ('expression expr position) (|pfFlattenApp| (|pfApplicationArg| x)))))) (t (list x)))) -@ +\end{chunk} \defun{pfCollect1?}{pfCollect1?} \calls{pfCollect1?}{pfApplication?} \calls{pfCollect1?}{pfApplicationOp} \calls{pfCollect1?}{pfId?} \calls{pfCollect1?}{pfIdSymbol} -<>= +\begin{chunk}{defun pfCollect1?} (defun |pfCollect1?| (x) (let (a) (when (|pfApplication?| x) (setq a (|pfApplicationOp| x)) (when (|pfId?| a) (eq (|pfIdSymbol| a) '|\||))))) -@ +\end{chunk} \defun{pfCollectVariable1}{pfCollectVariable1} \calls{pfCollectVariable1}{pfApplicationArg} @@ -9082,7 +9067,7 @@ of the form ('expression expr position) \calls{pfCollectVariable1}{pfSuch} \calls{pfCollectVariable1}{pfTypedId} \calls{pfCollectVariable1}{pfTypedType} -<>= +\begin{chunk}{defun pfCollectVariable1} (defun |pfCollectVariable1| (x) (let (id var a) (setq a (|pfApplicationArg| x)) @@ -9092,39 +9077,39 @@ of the form ('expression expr position) (|pfSuch| (|pfTypedId| id) (cadr (|pf0TupleParts| a))) (|pfTypedType| id)))) -@ +\end{chunk} \defun{pfPushMacroBody}{pfPushMacroBody} \calls{pfPushMacroBody}{pfMLambda} \calls{pfPushMacroBody}{pfPushMacroBody} -<>= +\begin{chunk}{defun pfPushMacroBody} (defun |pfPushMacroBody| (args body) (if (null args) body (|pfMLambda| (car args) (|pfPushMacroBody| (cdr args) body)))) -@ +\end{chunk} \defun{pfSourceStok}{pfSourceStok} \calls{pfSourceStok}{pfLeaf?} \calls{pfSourceStok}{pfParts} \calls{pfSourceStok}{pfSourceStok} \calls{pfSourceStok}{pfFirst} -<>= +\begin{chunk}{defun pfSourceStok} (defun |pfSourceStok| (x) (cond ((|pfLeaf?| x) x) ((null (|pfParts| x)) '|NoToken|) (t (|pfSourceStok| (|pfFirst| x))))) -@ +\end{chunk} \defun{pfTransformArg}{pfTransformArg} \calls{pfTransformArg}{pfTuple?} \calls{pfTransformArg}{pf0TupleParts} \calls{pfTransformArg}{pfListOf} \calls{pfTransformArg}{pfTaggedToTyped1} -<>= +\begin{chunk}{defun pfTransformArg} (defun |pfTransformArg| (args) (let (arglist result) (if (|pfTuple?| args) @@ -9134,7 +9119,7 @@ of the form ('expression expr position) (dolist (|i| arglist (nreverse result)) (push (|pfTaggedToTyped1| |i|) result))))) -@ +\end{chunk} \defun{pfTaggedToTyped1}{pfTaggedToTyped1} \calls{pfTaggedToTyped1}{pfCollect1?} @@ -9143,172 +9128,172 @@ of the form ('expression expr position) \calls{pfTaggedToTyped1}{pfTyped} \calls{pfTaggedToTyped1}{pfNothing} \calls{pfTaggedToTyped1}{pfTaggedToTyped} -<>= +\begin{chunk}{defun pfTaggedToTyped1} (defun |pfTaggedToTyped1| (arg) (cond ((|pfCollect1?| arg) (|pfCollectVariable1| arg)) ((|pfDefinition?| arg) (|pfTyped| arg (|pfNothing|))) (t (|pfTaggedToTyped| arg)))) -@ +\end{chunk} \defun{pfSuch}{pfSuch} \calls{pfSuch}{pfInfApplication} \calls{pfSuch}{pfId} -<>= +\begin{chunk}{defun pfSuch} (defun |pfSuch| (x y) (|pfInfApplication| (|pfId| '|\||) x y)) -@ +\end{chunk} \section{Special Nodes} \defun{pfListOf}{Create a Listof node} \calls{pfListOf}{pfTree} -<>= +\begin{chunk}{defun pfListOf} (defun |pfListOf| (x) (|pfTree| '|listOf| x)) -@ +\end{chunk} \defun{pfNothing}{pfNothing} \calls{pfNothing}{pfTree} -<>= +\begin{chunk}{defun pfNothing} (defun |pfNothing| () (|pfTree| '|nothing| nil)) -@ +\end{chunk} \defun{pfNothing?}{Is this a Nothing node?} \calls{pfNothing?}{pfAbSynOp?} -<>= +\begin{chunk}{defun pfNothing?} (defun |pfNothing?| (form) (|pfAbSynOp?| form '|nothing|)) -@ +\end{chunk} \section{Leaves} \defun{pfDocument}{Create a Document node} \calls{pfDocument}{pfLeaf} -<>= +\begin{chunk}{defun pfDocument} (defun |pfDocument| (strings) (|pfLeaf| '|Document| strings)) -@ +\end{chunk} \defun{pfId}{Construct an Id node} \calls{pfId}{pfLeaf} -<>= +\begin{chunk}{defun pfId} (defun |pfId| (expr) (|pfLeaf| '|id| expr)) -@ +\end{chunk} \defun{pfId?}{Is this an Id node?} \calls{pfId?}{pfAbSynOp?} -<>= +\begin{chunk}{defun pfId?} (defun |pfId?| (form) (or (|pfAbSynOp?| form '|id|) (|pfAbSynOp?| form '|idsy|))) -@ +\end{chunk} \defun{pfIdPos}{Construct an Id leaf node} \calls{pfIdPos}{pfLeaf} -<>= +\begin{chunk}{defun pfIdPos} (defun |pfIdPos| (expr pos) (|pfLeaf| '|id| expr pos)) -@ +\end{chunk} \defun{pfIdSymbol}{Return the Id part} \calls{pfIdSymbol}{tokPart} -<>= +\begin{chunk}{defun pfIdSymbol} (defun |pfIdSymbol| (form) (|tokPart| form)) -@ +\end{chunk} \defun{pfLeaf}{Construct a Leaf node} \calls{pfLeaf}{tokConstruct} \calls{pfLeaf}{ifcar} \calls{pfLeaf}{pfNoPosition} -<>= +\begin{chunk}{defun pfLeaf} (defun |pfLeaf| (x y &rest z) (|tokConstruct| x y (or (ifcar z) (|pfNoPosition|)))) -@ +\end{chunk} \defun{pfLeaf?}{Is this a leaf node?} \calls{pfLeaf?}{pfAbSynOp} -<>= +\begin{chunk}{defun pfLeaf?} (defun |pfLeaf?| (form) (member (|pfAbSynOp| form) '(|id| |idsy| |symbol| |string| |char| |float| |expression| |integer| |Document| |error|))) -@ +\end{chunk} \defun{pfLeafPosition}{Return the token position of a leaf node} \calls{pfLeafPosition}{tokPosn} -<>= +\begin{chunk}{defun pfLeafPosition} (defun |pfLeafPosition| (form) (|tokPosn| form)) -@ +\end{chunk} \defun{pfLeafToken}{Return the Leaf Token} \calls{pfLeafToken}{tokPart} -<>= +\begin{chunk}{defun pfLeafToken} (defun |pfLeafToken| (form) (|tokPart| form)) -@ +\end{chunk} \defun{pfLiteral?}{Is this a Literal node?} \calls{pfLiteral?}{pfAbSynOp} -<>= +\begin{chunk}{defun pfLiteral? 0} (defun |pfLiteral?| (form) (member (|pfAbSynOp| form) '(|integer| |symbol| |expression| |one| |zero| |char| |string| |float|))) -@ +\end{chunk} \defun{pfLiteralClass}{Create a LiteralClass node} \calls{pfLiteralClass}{pfAbSynOp} -<>= +\begin{chunk}{defun pfLiteralClass} (defun |pfLiteralClass| (form) (|pfAbSynOp| form)) -@ +\end{chunk} \defun{pfLiteralString}{Return the LiteralString} \calls{pfLiteralString}{tokPart} -<>= +\begin{chunk}{defun pfLiteralString} (defun |pfLiteralString| (form) (|tokPart| form)) -@ +\end{chunk} \defun{pfParts}{Return the parts of a tree node} -<>= +\begin{chunk}{defun pfParts 0} (defun |pfParts| (form) (cdr form)) -@ +\end{chunk} \defun{pfPile}{Return the argument unchanged} -<>= +\begin{chunk}{defun pfPile 0} (defun |pfPile| (part) part) -@ +\end{chunk} \defun{pfPushBody}{pfPushBody} \calls{pfPushBody}{pfLambda} \calls{pfPushBody}{pfNothing} \calls{pfPushBody}{pfPushBody} -<>= +\begin{chunk}{defun pfPushBody} (defun |pfPushBody| (rt args body) (cond ((null args) body) @@ -9317,15 +9302,15 @@ of the form ('expression expr position) (|pfLambda| (car args) (|pfNothing|) (|pfPushBody| rt (cdr args) body))))) -@ +\end{chunk} \defun{pfSexpr}{An S-expression which people can read.} \calls{pfSexpr}{pfSexpr,strip} -<>= +\begin{chunk}{defun pfSexpr} (defun |pfSexpr| (pform) (|pfSexpr,strip| pform)) -@ +\end{chunk} \defun{pfSexpr,strip}{Create a human readable S-expression} \calls{pfSexpr,strip}{pfId?} @@ -9342,7 +9327,7 @@ of the form ('expression expr position) \calls{pfSexpr,strip}{pfSexpr,strip} \calls{pfSexpr,strip}{pfAbSynOp} \calls{pfSexpr,strip}{pfParts} -<>= +\begin{chunk}{defun pfSexpr,strip} (defun |pfSexpr,strip| (pform) (let (args a result) (cond @@ -9361,7 +9346,7 @@ of the form ('expression expr position) (dolist (p (|pfParts| pform) (nreverse result)) (push (|pfSexpr,strip| p) result))))))) -@ +\end{chunk} \defun{pfSymb}{Construct a Symbol or Expression node} \calls{pfSymb}{pfLeaf?} @@ -9370,52 +9355,52 @@ of the form ('expression expr position) \calls{pfSymb}{ifcar} \calls{pfSymb}{pfExpression} \calls{pfSymb}{pfSexpr} -<>= +\begin{chunk}{defun pfSymb} (defun |pfSymb| (expr &REST optpos) (if (|pfLeaf?| expr) (|pfSymbol| (|tokPart| expr) (ifcar optpos)) (|pfExpression| (|pfSexpr| expr) (ifcar optpos)))) -@ +\end{chunk} \defun{pfSymbol}{Construct a Symbol leaf node} \calls{pfSymbol}{pfLeaf} \calls{pfSymbol}{ifcar} -<>= +\begin{chunk}{defun pfSymbol} (defun |pfSymbol| (expr &rest optpos) (|pfLeaf| '|symbol| expr (ifcar optpos))) -@ +\end{chunk} \defun{pfSymbol?}{Is this a Symbol node?} \calls{pfSymbol?}{pfAbSynOp?} -<>= +\begin{chunk}{defun pfSymbol?} (defun |pfSymbol?| (form) (|pfAbSynOp?| form '|symbol|)) -@ +\end{chunk} \defun{pfSymbolSymbol}{Return the Symbol part} \calls{pfSymbolSymbol}{tokPart} -<>= +\begin{chunk}{defun pfSymbolSymbol} (defun |pfSymbolSymbol| (form) (|tokPart| form)) -@ +\end{chunk} \section{Trees} \defun{pfTree}{Construct a tree node} -<>= +\begin{chunk}{defun pfTree 0} (defun |pfTree| (x y) (cons x y)))) -@ +\end{chunk} \defun{pfAdd}{Construct an Add node} \calls{pfAdd}{pfNothing} \calls{pfAdd}{pfTree} -<>= +\begin{chunk}{defun pfAdd} (defun |pfAdd| (pfbase pfaddin &rest addon) (let (lhs) (if addon @@ -9423,453 +9408,453 @@ of the form ('expression expr position) (setq lhs (|pfNothing|))) (|pfTree| '|Add| (list pfbase pfaddin lhs)))) -@ +\end{chunk} \defun{pfAnd}{Construct an And node} \calls{pfAnd}{pfTree} -<>= +\begin{chunk}{defun pfAnd} (defun |pfAnd| (pfleft pfright) (|pfTree| '|And| (list pfleft pfright))) -@ +\end{chunk} \defun{pfAttribute}{pfAttribute} \calls{pfAttribute}{pfTree} -<>= +\begin{chunk}{defun pfAttribute} (defun |pfAttribute| (pfexpr) (|pfTree| '|Attribute| (list pfexpr))) -@ +\end{chunk} \defun{pfApplication}{Return an Application node} \calls{pfApplication}{pfTree} -<>= +\begin{chunk}{defun pfApplication} (defun |pfApplication| (pfop pfarg) (|pfTree| '|Application| (list pfop pfarg))) -@ +\end{chunk} \defun{pfApplicationArg}{Return the Arg part of an Application node} -<>= +\begin{chunk}{defun pfApplicationArg 0} (defun |pfApplicationArg| (pf) (caddr pf)) -@ +\end{chunk} \defun{pfApplicationOp}{Return the Op part of an Application node} -<>= +\begin{chunk}{defun pfApplicationOp 0} (defun |pfApplicationOp| (pf) (cadr pf)) -@ +\end{chunk} \defun{pfAnd?}{Is this an And node?} \calls{pfAnd?}{pfAbSynOp?} -<>= +\begin{chunk}{defun pfAnd?} (defun |pfAnd?| (pf) (|pfAbSynOp?| pf '|And|)) -@ +\end{chunk} \defun{pfAndLeft}{Return the Left part of an And node} -<>= +\begin{chunk}{defun pfAndLeft 0} (defun |pfAndLeft| (pf) (cadr pf)) -@ +\end{chunk} \defun{pfAndRight}{Return the Right part of an And node} -<>= +\begin{chunk}{defun pfAndRight 0} (defun |pfAndRight| (pf) (caddr pf)) -@ +\end{chunk} \defun{pfAppend}{Flatten a list of lists} -<>= +\begin{chunk}{defun pfAppend 0} (defun |pfAppend| (list) (apply #'append list)) -@ +\end{chunk} \defun{pfApplication?}{Is this an Application node?} \calls{pfApplication?}{pfAbSynOp?} -<>= +\begin{chunk}{defun pfApplication?} (defun |pfApplication?| (pf) (|pfAbSynOp?| pf '|Application|)) -@ +\end{chunk} \defun{pfAssign}{Create an Assign node} \calls{pfAssign}{pfTree} -<>= +\begin{chunk}{defun pfAssign} (defun |pfAssign| (pflhsitems pfrhs) (|pfTree| '|Assign| (list pflhsitems pfrhs))) -@ +\end{chunk} \defun{pfAssign?}{Is this an Assign node?} \calls{pfAssign?}{pfAbSynOp?} -<>= +\begin{chunk}{defun pfAssign?} (defun |pfAssign?| (pf) (|pfAbSynOp?| pf '|Assign|)) -@ +\end{chunk} \defun{pf0AssignLhsItems}{Return the parts of an LhsItem of an Assign node} \calls{pf0AssignLhsItems}{pfParts} \calls{pf0AssignLhsItems}{pfAssignLhsItems} -<>= +\begin{chunk}{defun pf0AssignLhsItems 0} (defun |pf0AssignLhsItems| (pf) (|pfParts| (|pfAssignLhsItems| pf))) -@ +\end{chunk} \defun{pfAssignLhsItems}{Return the LhsItem of an Assign node} -<>= +\begin{chunk}{defun pfAssignLhsItems 0} (defun |pfAssignLhsItems| (pf) (cadr pf)) -@ +\end{chunk} \defun{pfAssignRhs}{Return the RHS of an Assign node} -<>= +\begin{chunk}{defun pfAssignRhs 0} (defun |pfAssignRhs| (pf) (caddr pf)) -@ +\end{chunk} \defun{pfBrace}{Construct an application node for a brace} \calls{pfBrace}{pfApplication} \calls{pfBrace}{pfIdPos} \calls{pfBrace}{tokPosn} -<>= +\begin{chunk}{defun pfBrace} (defun |pfBrace| (a part) (|pfApplication| (|pfIdPos| '{} (|tokPosn| a)) part)) -@ +\end{chunk} \defun{pfBraceBar}{Construct an Application node for brace-bars} \calls{pfBraceBar}{pfApplication} \calls{pfBraceBar}{pfIdPos} \calls{pfBraceBar}{tokPosn} -<>= +\begin{chunk}{defun pfBraceBar} (defun |pfBraceBar| (a part) (|pfApplication| (|pfIdPos| '|{\|\|}| (|tokPosn| a)) part)) -@ +\end{chunk} \defun{pfBracket}{Construct an Application node for a bracket} \calls{pfBracket}{pfApplication} \calls{pfBracket}{pfIdPos} \calls{pfBracket}{tokPosn} -<>= +\begin{chunk}{defun pfBracket} (defun |pfBracket| (a part) (|pfApplication| (|pfIdPos| '[] (|tokPosn| a)) part)) -@ +\end{chunk} \defun{pfBracketBar}{Construct an Application node for bracket-bars} \calls{pfBracketBar}{pfApplication} \calls{pfBracketBar}{pfIdPos} \calls{pfBracketBar}{tokPosn} -<>= +\begin{chunk}{defun pfBracketBar} (defun |pfBracketBar| (a part) (|pfApplication| (|pfIdPos| '|[\|\|]| (|tokPosn| a)) part)) -@ +\end{chunk} \defun{pfBreak}{Create a Break node} \calls{pfBreak}{pfTree} -<>= +\begin{chunk}{defun pfBreak} (defun |pfBreak| (pffrom) (|pfTree| '|Break| (list pffrom))) -@ +\end{chunk} \defun{pfBreak?}{Is this a Break node?} \calls{pfBreak?}{pfAbSynOp?} -<>= +\begin{chunk}{defun pfBreak?} (defun |pfBreak?| (pf) (|pfAbSynOp?| pf '|Break|)) -@ +\end{chunk} \defun{pfBreakFrom}{Return the From part of a Break node} -<>= +\begin{chunk}{defun pfBreakFrom 0} (defun |pfBreakFrom| (pf) (cadr pf)) -@ +\end{chunk} \defun{pfCoerceto}{Construct a Coerceto node} \calls{pfCoerceto}{pfTree} -<>= +\begin{chunk}{defun pfCoerceto} (defun |pfCoerceto| (pfexpr pftype) (|pfTree| '|Coerceto| (list pfexpr pftype))) -@ +\end{chunk} \defun{pfCoerceto?}{Is this a CoerceTo node?} \calls{pfCoerceto?}{pfAbSynOp?} -<>= +\begin{chunk}{defun pfCoerceto?} (defun |pfCoerceto?| (pf) (|pfAbSynOp?| pf '|Coerceto|)) -@ +\end{chunk} \defun{pfCoercetoExpr}{Return the Expression part of a CoerceTo node} -<>= +\begin{chunk}{defun pfCoercetoExpr 0} (defun |pfCoercetoExpr| (pf) (cadr pf)) -@ +\end{chunk} \defun{pfCoercetoType}{Return the Type part of a CoerceTo node} -<>= +\begin{chunk}{defun pfCoercetoType 0} (defun |pfCoercetoType| (pf) (caddr pf)) -@ +\end{chunk} \defun{pfCollectBody}{Return the Body of a Collect node} -<>= +\begin{chunk}{defun pfCollectBody 0} (defun |pfCollectBody| (pf) (cadr pf)) -@ +\end{chunk} \defun{pfCollectIterators}{Return the Iterators of a Collect node} -<>= +\begin{chunk}{defun pfCollectIterators 0} (defun |pfCollectIterators| (pf) (caddr pf)) -@ +\end{chunk} \defun{pfCollect}{Create a Collect node} \calls{pfCollect}{pfTree} -<>= +\begin{chunk}{defun pfCollect} (defun |pfCollect| (pfbody pfiterators) (|pfTree| '|Collect| (list pfbody pfiterators))) -@ +\end{chunk} \defun{pfCollect?}{Is this a Collect node?} \calls{pfCollect?}{pfAbSynOp?} -<>= +\begin{chunk}{defun pfCollect?} (defun |pfCollect?| (pf) (|pfAbSynOp?| pf '|Collect|)) -@ +\end{chunk} \defun{pfDefinition}{pfDefinition} \calls{pfDefinition}{pfTree} -<>= +\begin{chunk}{defun pfDefinition} (defun |pfDefinition| (pflhsitems pfrhs) (|pfTree| '|Definition| (list pflhsitems pfrhs))) -@ +\end{chunk} \defun{pfDefinitionLhsItems}{Return the Lhs of a Definition node} -<>= +\begin{chunk}{defun pfDefinitionLhsItems 0} (defun |pfDefinitionLhsItems| (pf) (cadr pf)) -@ +\end{chunk} \defun{pfDefinitionRhs}{Return the Rhs of a Definition node} -<>= +\begin{chunk}{defun pfDefinitionRhs 0} (defun |pfDefinitionRhs| (pf) (caddr pf)) -@ +\end{chunk} \defun{pfDefinition?}{Is this a Definition node?} \calls{pfDefinition?}{pfAbSynOp?} -<>= +\begin{chunk}{defun pfDefinition?} (defun |pfDefinition?| (pf) (|pfAbSynOp?| pf '|Definition|)) -@ +\end{chunk} \defun{pf0DefinitionLhsItems}{Return the parts of a Definition node} \calls{pf0DefinitionLhsItems}{pfParts} \calls{pf0DefinitionLhsItems}{pfDefinitionLhsItems} -<>= +\begin{chunk}{defun pf0DefinitionLhsItems} (defun |pf0DefinitionLhsItems| (pf) (|pfParts| (|pfDefinitionLhsItems| pf))) -@ +\end{chunk} \defun{pfDo}{Create a Do node} \calls{pfDo}{pfTree} -<>= +\begin{chunk}{defun pfDo} (defun |pfDo| (pfbody) (|pfTree| '|Do| (list pfbody))) -@ +\end{chunk} \defun{pfDo?}{Is this a Do node?} \calls{pfDo?}{pfAbSynOp?} -<>= +\begin{chunk}{defun pfDo?} (defun |pfDo?| (pf) (|pfAbSynOp?| pf '|Do|)) -@ +\end{chunk} \defun{pfDoBody}{Return the Body of a Do node} -<>= +\begin{chunk}{defun pfDoBody 0} (defun |pfDoBody| (pf) (cadr pf)) -@ +\end{chunk} \defun{pfEnSequence}{Construct a Sequence node} \calls{pfEnSequence}{pfTuple} \calls{pfEnSequence}{pfListOf} \calls{pfEnSequence}{pfSequence} -<>= +\begin{chunk}{defun pfEnSequence} (defun |pfEnSequence| (a) (cond ((null a) (|pfTuple| (|pfListOf| a))) ((null (cdr a)) (car a)) (t (|pfSequence| (|pfListOf| a))))) -@ +\end{chunk} \defun{pfExit}{Construct an Exit node} \calls{pfExit}{pfTree} -<>= +\begin{chunk}{defun pfExit} (defun |pfExit| (pfcond pfexpr) (|pfTree| '|Exit| (list pfcond pfexpr))) -@ +\end{chunk} \defun{pfExit?}{Is this an Exit node?} \calls{pfExit?}{pfAbSynOp?} -<>= +\begin{chunk}{defun pfExit?} (defun |pfExit?| (pf) (|pfAbSynOp?| pf '|Exit|)) -@ +\end{chunk} \defun{pfExitCond}{Return the Cond part of an Exit} -<>= +\begin{chunk}{defun pfExitCond 0} (defun |pfExitCond| (pf) (cadr pf)) -@ +\end{chunk} \defun{pfExitExpr}{Return the Expression part of an Exit} -<>= +\begin{chunk}{defun pfExitExpr 0} (defun |pfExitExpr| (pf) (caddr pf)) -@ +\end{chunk} \defun{pfExport}{Create an Export node} \calls{pfExport}{pfTree} -<>= +\begin{chunk}{defun pfExport} (defun |pfExport| (pfitems) (|pfTree| '|Export| (list pfitems))) -@ +\end{chunk} \defun{pfExpression}{Construct an Expression leaf node} \calls{pfExpression}{pfLeaf} \calls{pfExpression}{ifcar} -<>= +\begin{chunk}{defun pfExpression} (defun |pfExpression| (expr &rest optpos) (|pfLeaf| '|expression| expr (ifcar optpos))) -@ +\end{chunk} \defun{pfFirst}{pfFirst} -<>= +\begin{chunk}{defun pfFirst 0} (defun |pfFirst| (form) (cadr form)) -@ +\end{chunk} \defun{pfFix}{Create an Application Fix node} \calls{pfFix}{pfApplication} \calls{pfFix}{pfId} -<>= +\begin{chunk}{defun pfFix} (defun |pfFix| (pf) (|pfApplication| (|pfId| 'Y) pf)) -@ +\end{chunk} \defun{pfFree}{Create a Free node} \calls{pfFree}{pfTree} -<>= +\begin{chunk}{defun pfFree} (defun |pfFree| (pfitems) (|pfTree| '|Free| (list pfitems))) -@ +\end{chunk} \defun{pfFree?}{Is this a Free node?} \calls{pfFree?}{pfAbSynOp?} -<>= +\begin{chunk}{defun pfFree?} (defun |pfFree?| (pf) (|pfAbSynOp?| pf '|Free|)) -@ +\end{chunk} \defun{pf0FreeItems}{Return the parts of the Items of a Free node} \calls{pf0FreeItems}{pfParts} \calls{pf0FreeItems}{pfFreeItems} -<>= +\begin{chunk}{defun pf0FreeItems} (defun |pf0FreeItems| (pf) (|pfParts| (|pfFreeItems| pf))) -@ +\end{chunk} \defun{pfFreeItems}{Return the Items of a Free node} -<>= +\begin{chunk}{defun pfFreeItems 0} (defun |pfFreeItems| (pf) (cadr pf)) -@ +\end{chunk} \defun{pfForin}{Construct a Forin node} \calls{pfForin}{pfTree} -<>= +\begin{chunk}{defun pfForin} (defun |pfForin| (pflhs pfwhole) (|pfTree| '|Forin| (list pflhs pfwhole))) -@ +\end{chunk} \defun{pfForin?}{Is this a ForIn node?} \calls{pfForin?}{pfAbSynOp?} -<>= +\begin{chunk}{defun pfForin?} (defun |pfForin?| (pf) (|pfAbSynOp?| pf '|Forin|)) -@ +\end{chunk} \defun{pf0ForinLhs}{Return all the parts of the LHS of a ForIn node} \calls{pf0ForinLhs}{pfParts} \calls{pf0ForinLhs}{pfForinLhs} -<>= +\begin{chunk}{defun pf0ForinLhs} (defun |pf0ForinLhs| (pf) (|pfParts| (|pfForinLhs| pf))) -@ +\end{chunk} \defun{pfForinLhs}{Return the LHS part of a ForIn node} -<>= +\begin{chunk}{defun pfForinLhs 0} (defun |pfForinLhs| (pf) (cadr pf)) -@ +\end{chunk} \defun{pfForinWhole}{Return the Whole part of a ForIn node} -<>= +\begin{chunk}{defun pfForinWhole 0} (defun |pfForinWhole| (pf) (caddr pf)) -@ +\end{chunk} \defun{pfFromDom}{pfFromDom} \calls{pfFromDom}{pfApplication?} @@ -9877,7 +9862,7 @@ of the form ('expression expr position) \calls{pfFromDom}{pfApplicationOp} \calls{pfFromDom}{pfApplicationArg} \calls{pfFromDom}{pfFromdom} -<>= +\begin{chunk}{defun pfFromDom} (defun |pfFromDom| (dom expr) (cond ((|pfApplication?| expr) @@ -9886,116 +9871,116 @@ of the form ('expression expr position) (|pfApplicationArg| expr))) (t (|pfFromdom| expr dom)))) -@ +\end{chunk} \defun{pfFromdom}{Construct a Fromdom node} \calls{pfFromdom}{pfTree} -<>= +\begin{chunk}{defun pfFromdom} (defun |pfFromdom| (pfwhat pfdomain) (|pfTree| '|Fromdom| (list pfwhat pfdomain))) -@ +\end{chunk} \defun{pfFromdom?}{Is this a Fromdom mode?} \calls{pfFromdom?}{pfAbSynOp?} -<>= +\begin{chunk}{defun pfFromdom?} (defun |pfFromdom?| (pf) (|pfAbSynOp?| pf '|Fromdom|)) -@ +\end{chunk} \defun{pfFromdomWhat}{Return the What part of a Fromdom node} -<>= +\begin{chunk}{defun pfFromdomWhat 0} (defun |pfFromdomWhat| (pf) (cadr pf)) -@ +\end{chunk} \defun{pfFromdomDomain}{Return the Domain part of a Fromdom node} -<>= +\begin{chunk}{defun pfFromdomDomain 0} (defun |pfFromdomDomain| (pf) (caddr pf)) -@ +\end{chunk} \defun{pfHide}{Construct a Hide node} \calls{pfHide}{pfTree} -<>= +\begin{chunk}{defun pfHide} (defun |pfHide| (a part) (declare (ignore a)) (|pfTree| '|Hide| (list part))) -@ +\end{chunk} \defun{pfIf}{pfIf} \calls{pfIf}{pfTree} -<>= +\begin{chunk}{defun pfIf} (defun |pfIf| (pfcond pfthen pfelse) (|pfTree| '|If| (list pfcond pfthen pfelse))) -@ +\end{chunk} \defun{pfIf?}{Is this an If node?} \calls{pfIf?}{pfAbSynOp?} -<>= +\begin{chunk}{defun pfIf?} (defun |pfIf?| (pf) (|pfAbSynOp?| pf '|If|)) -@ +\end{chunk} \defun{pfIfCond}{Return the Cond part of an If} -<>= +\begin{chunk}{defun pfIfCond 0} (defun |pfIfCond| (pf) (cadr pf)) -@ +\end{chunk} \defun{pfIfThen}{Return the Then part of an If} -<>= +\begin{chunk}{defun pfIfThen 0} (defun |pfIfThen| (pf) (caddr pf)) -@ +\end{chunk} \defun{pfIfThenOnly}{pfIfThenOnly} \calls{pfIfThenOnly}{pfIf} \calls{pfIfThenOnly}{pfNothing} -<>= +\begin{chunk}{defun pfIfThenOnly} (defun |pfIfThenOnly| (pred cararg) (|pfIf| pred cararg (|pfNothing|))) -@ +\end{chunk} \defun{pfIfElse}{Return the Else part of an If} -<>= +\begin{chunk}{defun pfIfElse 0} (defun |pfIfElse| (pf) (cadddr pf)) -@ +\end{chunk} \defun{pfImport}{Construct an Import node} \calls{pfImport}{pfTree} -<>= +\begin{chunk}{defun pfImport} (defun |pfImport| (pfitems) (|pfTree| '|Import| (list pfitems))) -@ +\end{chunk} \defun{pfIterate}{Construct an Iterate node} \calls{pfIterate}{pfTree} -<>= +\begin{chunk}{defun pfIterate} (defun |pfIterate| (pffrom) (|pfTree| '|Iterate| (list pffrom))) -@ +\end{chunk} \defun{pfIterate?}{Is this an Iterate node?} \calls{pfIterate?}{pfAbSynOp?} -<>= +\begin{chunk}{defun pfIterate?} (defun |pfIterate?| (pf) (|pfAbSynOp?| pf '|Iterate|)) -@ +\end{chunk} \defun{pfInfApplication}{Handle an infix application} \calls{pfInfApplication}{pfListOf} @@ -10004,22 +9989,22 @@ of the form ('expression expr position) \calls{pfInfApplication}{pfOr} \calls{pfInfApplication}{pfApplication} \calls{pfInfApplication}{pfTuple} -<>= +\begin{chunk}{defun pfInfApplication} (defun |pfInfApplication| (op left right) (cond ((eq (|pfIdSymbol| op) '|and|) (|pfAnd| left right)) ((eq (|pfIdSymbol| op) '|or|) (|pfOr| left right)) (t (|pfApplication| op (|pfTuple| (|pfListOf| (list left right))))))) -@ +\end{chunk} \defun{pfInline}{Create an Inline node} \calls{pfInline}{pfTree} -<>= +\begin{chunk}{defun pfInline} (defun |pfInline| (pfitems) (|pfTree| '|Inline| (list pfitems))) -@ +\end{chunk} \defun{pfLam}{pfLam} \calls{pfLam}{pfAbSynOp?} @@ -10027,7 +10012,7 @@ of the form ('expression expr position) \calls{pfLam}{pfNothing} \calls{pfLam}{pfSecond} \calls{pfLam}{pfLambda} -<>= +\begin{chunk}{defun pfLam} (defun |pfLam| (variable body) (let (bdy rets) (if (|pfAbSynOp?| body '|returntyped|) @@ -10038,518 +10023,518 @@ of the form ('expression expr position) (setq bdy body)) (|pfLambda| variable rets bdy))) -@ +\end{chunk} \defun{pfLambda}{pfLambda} \calls{pfLambda}{pfTree} -<>= +\begin{chunk}{defun pfLambda} (defun |pfLambda| (pfargs pfrets pfbody) (|pfTree| '|Lambda| (list pfargs pfrets pfbody))) -@ +\end{chunk} \defun{pfLambdaBody}{Return the Body part of a Lambda node} -<>= +\begin{chunk}{defun pfLambdaBody 0} (defun |pfLambdaBody| (pf) (cadddr pf)) -@ +\end{chunk} \defun{pfLambdaRets}{Return the Rets part of a Lambda node} -<>= +\begin{chunk}{defun pfLambdaRets 0} (defun |pfLambdaRets| (pf) (caddr pf)) -@ +\end{chunk} \defun{pfLambda?}{Is this a Lambda node?} \calls{pfLambda?}{pfAbSynOp?} -<>= +\begin{chunk}{defun pfLambda?} (defun |pfLambda?| (pf) (|pfAbSynOp?| pf '|Lambda|)) -@ +\end{chunk} \defun{pfLambdaArgs}{Return the Args part of a Lambda node} -<>= +\begin{chunk}{defun pfLambdaArgs 0} (defun |pfLambdaArgs| (pf) (cadr pf)) -@ +\end{chunk} \defun{pf0LambdaArgs}{Return the Args of a Lambda Node} \calls{pf0LambdaArgs}{pfParts} \calls{pf0LambdaArgs}{pfLambdaArgs} -<>= +\begin{chunk}{defun pf0LambdaArgs} (defun |pf0LambdaArgs| (pf) (|pfParts| (|pfLambdaArgs| pf))) -@ +\end{chunk} \defun{pfLocal}{Construct a Local node} \calls{pfLocal}{pfTree} -<>= +\begin{chunk}{defun pfLocal} (defun |pfLocal| (pfitems) (|pfTree| '|Local| (list pfitems))) -@ +\end{chunk} \defun{pfLocal?}{Is this a Local node?} \calls{pfLocal?}{pfAbSynOp?} -<>= +\begin{chunk}{defun pfLocal?} (defun |pfLocal?| (pf) (|pfAbSynOp?| pf '|Local|)) -@ +\end{chunk} \defun{pf0LocalItems}{Return the parts of Items of a Local node} \calls{pf0LocalItems}{pfParts} \calls{pf0LocalItems}{pfLocalItems} -<>= +\begin{chunk}{defun pf0LocalItems} (defun |pf0LocalItems| (pf) (|pfParts| (|pfLocalItems| pf))) -@ +\end{chunk} \defun{pfLocalItems}{Return the Items of a Local node} -<>= +\begin{chunk}{defun pfLocalItems 0} (defun |pfLocalItems| (pf) (cadr pf)) -@ +\end{chunk} \defun{pfLoop}{Construct a Loop node} \calls{pfLoop}{pfTree} -<>= +\begin{chunk}{defun pfLoop} (defun |pfLoop| (pfiterators) (|pfTree| '|Loop| (list pfiterators))) -@ +\end{chunk} \defun{pfLoop1}{pfLoop1} \calls{pfLoop1}{pfLoop} \calls{pfLoop1}{pfListOf} \calls{pfLoop1}{pfDo} -<>= +\begin{chunk}{defun pfLoop1} (defun |pfLoop1| (body) (|pfLoop| (|pfListOf| (list (|pfDo| body))))) -@ +\end{chunk} \defun{pfLoop?}{Is this a Loop node?} \calls{pfLoop?}{pfAbSynOp?} -<>= +\begin{chunk}{defun pfLoop?} (defun |pfLoop?| (pf) (|pfAbSynOp?| pf '|Loop|)) -@ +\end{chunk} \defun{pfLoopIterators}{Return the Iterators of a Loop node} -<>= +\begin{chunk}{defun pfLoopIterators 0} (defun |pfLoopIterators| (pf) (cadr pf)) -@ +\end{chunk} \defun{pf0LoopIterators}{pf0LoopIterators} \calls{pf0LoopIterators}{pfParts} \calls{pf0LoopIterators}{pf0LoopIterators} -<>= +\begin{chunk}{defun pf0LoopIterators} (defun |pf0LoopIterators| (pf) (|pfParts| (|pfLoopIterators| pf))) -@ +\end{chunk} \defun{pfLp}{pfLp} \calls{pfLp}{pfLoop} \calls{pfLp}{pfListOf} \calls{pfLp}{pfDo} -<>= +\begin{chunk}{defun pfLp} (defun |pfLp| (iterators body) (|pfLoop| (|pfListOf| (append iterators (list (|pfDo| body)))))) -@ +\end{chunk} \defun{pfMacro}{Create a Macro node} \calls{pfMacro}{pfTree} -<>= +\begin{chunk}{defun pfMacro} (defun |pfMacro| (pflhs pfrhs) (|pfTree| '|Macro| (list pflhs pfrhs))) -@ +\end{chunk} \defun{pfMacro?}{Is this a Macro node?} \calls{pfMacro?}{pfAbSynOp?} -<>= +\begin{chunk}{defun pfMacro?} (defun |pfMacro?| (pf) (|pfAbSynOp?| pf '|Macro|)) -@ +\end{chunk} \defun{pfMacroLhs}{Return the Lhs of a Macro node} -<>= +\begin{chunk}{defun pfMacroLhs 0} (defun |pfMacroLhs| (pf) (cadr pf)) -@ +\end{chunk} \defun{pfMacroRhs}{Return the Rhs of a Macro node} -<>= +\begin{chunk}{defun pfMacroRhs 0} (defun |pfMacroRhs| (pf) (caddr pf)) -@ +\end{chunk} \defun{pfMLambda}{Construct an MLambda node} \calls{pfMLambda}{pfTree} -<>= +\begin{chunk}{defun pfMLambda} (defun |pfMLambda| (pfargs pfbody) (|pfTree| '|MLambda| (list pfargs pfbody))) -@ +\end{chunk} \defun{pfMLambda?}{Is this an MLambda node?} \calls{pfMLambda?}{pfAbSynOp?} -<>= +\begin{chunk}{defun pfMLambda?} (defun |pfMLambda?| (pf) (|pfAbSynOp?| pf '|MLambda|)) -@ +\end{chunk} \defun{pfMLambdaArgs}{Return the Args of an MLambda} -<>= +\begin{chunk}{defun pfMLambdaArgs 0} (defun |pfMLambdaArgs| (pf) (cadr pf)) -@ +\end{chunk} \defun{pf0MLambdaArgs}{Return the parts of an MLambda argument} \calls{pf0MLambdaArgs}{pfParts} -<>= +\begin{chunk}{defun pf0MLambdaArgs} (defun |pf0MLambdaArgs| (pf) (|pfParts| (|pfMLambdaArgs| pf))) -@ +\end{chunk} \defun{pfMLambdaBody}{pfMLambdaBody} -<>= +\begin{chunk}{defun pfMLambdaBody 0} (defun |pfMLambdaBody| (pf) (caddr pf)) -@ +\end{chunk} \defun{pfNot?}{Is this a Not node?} \calls{pfNot?}{pfAbSynOp?} -<>= +\begin{chunk}{defun pfNot?} (defun |pfNot?| (pf) (|pfAbSynOp?| pf '|Not|)) -@ +\end{chunk} \defun{pfNotArg}{Return the Arg part of a Not node} -<>= +\begin{chunk}{defun pfNotArg 0} (defun |pfNotArg| (pf) (cadr pf)) -@ +\end{chunk} \defun{pfNovalue}{Construct a NoValue node} \calls{pfNovalue}{pfTree} -<>= +\begin{chunk}{defun pfNovalue} (defun |pfNovalue| (pfexpr) (|pfTree| '|Novalue| (list pfexpr))) -@ +\end{chunk} \defun{pfNovalue?}{Is this a Novalue node?} \calls{pfNovalue?}{pfAbSynOp?} -<>= +\begin{chunk}{defun pfNovalue?} (defun |pfNovalue?| (pf) (|pfAbSynOp?| pf '|Novalue|)) -@ +\end{chunk} \defun{pfNovalueExpr}{Return the Expr part of a Novalue node} -<>= +\begin{chunk}{defun pfNovalueExpr 0} (defun |pfNovalueExpr| (pf) (cadr pf)) -@ +\end{chunk} \defun{pfOr}{Construct an Or node} \calls{pfOr}{pfTree} -<>= +\begin{chunk}{defun pfOr} (defun |pfOr| (pfleft pfright) (|pfTree| '|Or| (list pfleft pfright))) -@ +\end{chunk} \defun{pfOr?}{Is this an Or node?} \calls{pfOr?}{pfAbSynOp?} -<>= +\begin{chunk}{defun pfOr?} (defun |pfOr?| (pf) (|pfAbSynOp?| pf '|Or|)) -@ +\end{chunk} \defun{pfOrLeft}{Return the Left part of an Or node} -<>= +\begin{chunk}{defun pfOrLeft 0} (defun |pfOrLeft| (pf) (cadr pf)) -@ +\end{chunk} \defun{pfOrRight}{Return the Right part of an Or node} -<>= +\begin{chunk}{defun pfOrRight 0} (defun |pfOrRight| (pf) (caddr pf)) -@ +\end{chunk} \defun{pfParen}{Return the part of a parenthesised expression} -<>= +\begin{chunk}{defun pfParen} (defun |pfParen| (a part) part) -@ +\end{chunk} \defun{pfPretend}{pfPretend} \calls{pfPretend}{pfTree} -<>= +\begin{chunk}{defun pfPretend} (defun |pfPretend| (pfexpr pftype) (|pfTree| '|Pretend| (list pfexpr pftype))) -@ +\end{chunk} \defun{pfPretend?}{Is this a Pretend node?} \calls{pfPretend?}{pfAbSynOp?} -<>= +\begin{chunk}{defun pfPretend?} (defun |pfPretend?| (pf) (|pfAbSynOp?| pf '|Pretend|)) -@ +\end{chunk} \defun{pfPretendExpr}{Return the Expression part of a Pretend node} -<>= +\begin{chunk}{defun pfPretendExpr 0} (defun |pfPretendExpr| (pf) (cadr pf)) -@ +\end{chunk} \defun{pfPretendType}{Return the Type part of a Pretend node} -<>= +\begin{chunk}{defun pfPretendType 0} (defun |pfPretendType| (pf) (caddr pf)) -@ +\end{chunk} \defun{pfQualType}{Construct a QualType node} \calls{pfQualType}{pfTree} -<>= +\begin{chunk}{defun pfQualType} (defun |pfQualType| (pftype pfqual) (|pfTree| '|QualType| (list pftype pfqual))) -@ +\end{chunk} \defun{pfRestrict}{Construct a Restrict node} \calls{pfRestrict}{pfTree} -<>= +\begin{chunk}{defun pfRestrict} (defun |pfRestrict| (pfexpr pftype) (|pfTree| '|Restrict| (list pfexpr pftype))) -@ +\end{chunk} \defun{pfRestrict?}{Is this a Restrict node?} \calls{pfRestrict?}{pfAbSynOp?} -<>= +\begin{chunk}{defun pfRestrict?} (defun |pfRestrict?| (pf) (|pfAbSynOp?| pf '|Restrict|)) -@ +\end{chunk} \defun{pfRestrictExpr}{Return the Expr part of a Restrict node} -<>= +\begin{chunk}{defun pfRestrictExpr 0} (defun |pfRestrictExpr| (pf) (cadr pf)) -@ +\end{chunk} \defun{pfRestrictType}{Return the Type part of a Restrict node} -<>= +\begin{chunk}{defun pfRestrictType 0} (defun |pfRestrictType| (pf) (caddr pf)) -@ +\end{chunk} \defun{pfRetractTo}{Construct a RetractTo node} \calls{pfRetractTo}{pfTree} -<>= +\begin{chunk}{defun pfRetractTo} (defun |pfRetractTo| (pfexpr pftype) (|pfTree| '|RetractTo| (list pfexpr pftype))) -@ +\end{chunk} \defun{pfReturn}{Construct a Return node} \calls{pfReturn}{pfTree} -<>= +\begin{chunk}{defun pfReturn} (defun |pfReturn| (pfexpr pffrom) (|pfTree| '|Return| (list pfexpr pffrom))) -@ +\end{chunk} \defun{pfReturn?}{Is this a Return node?} \calls{pfReturn?}{pfAbSynOp?} -<>= +\begin{chunk}{defun pfReturn?} (defun |pfReturn?| (pf) (|pfAbSynOp?| pf '|Return|)) -@ +\end{chunk} \defun{pfReturnExpr}{Return the Expr part of a Return node} -<>= +\begin{chunk}{defun pfReturnExpr 0} (defun |pfReturnExpr| (pf) (cadr pf)) -@ +\end{chunk} \defun{pfReturnNoName}{pfReturnNoName} \calls{pfReturnNoName}{pfReturn} \calls{pfReturnNoName}{pfNothing} -<>= +\begin{chunk}{defun pfReturnNoName} (defun |pfReturnNoName| (|value|) (|pfReturn| |value| (|pfNothing|))) -@ +\end{chunk} \defun{pfReturnTyped}{Construct a ReturnTyped node} \calls{pfReturnTyped}{pfTree} -<>= +\begin{chunk}{defun pfReturnTyped} (defun |pfReturnTyped| (type body) (|pfTree| '|returntyped| (list type body))) -@ +\end{chunk} \defun{pfRule}{Construct a Rule node} \calls{pfRule}{pfTree} -<>= +\begin{chunk}{defun pfRule} (defun |pfRule| (pflhsitems pfrhs) (|pfTree| '|Rule| (list pflhsitems pfrhs))) -@ +\end{chunk} \defun{pfRuleLhsItems}{Return the Lhs of a Rule node} -<>= +\begin{chunk}{defun pfRuleLhsItems 0} (defun |pfRuleLhsItems| (pf) (cadr pf)) -@ +\end{chunk} \defun{pfRuleRhs}{Return the Rhs of a Rule node} -<>= +\begin{chunk}{defun pfRuleRhs 0} (defun |pfRuleRhs| (pf) (caddr pf)) -@ +\end{chunk} \defun{pfRule?}{Is this a Rule node?} \calls{pfRule?}{pfAbSynOp?} -<>= +\begin{chunk}{defun pfRule?} (defun |pfRule?| (pf) (|pfAbSynOp?| pf '|Rule|)) -@ +\end{chunk} \defun{pfSecond}{pfSecond} -<>= +\begin{chunk}{defun pfSecond 0} (defun |pfSecond| (form) (caddr form)) -@ +\end{chunk} \defun{pfSequence}{Construct a Sequence node} \calls{pfSequence}{pfTree} -<>= +\begin{chunk}{defun pfSequence} (defun |pfSequence| (pfargs) (|pfTree| '|Sequence| (list pfargs))) -@ +\end{chunk} \defun{pfSequenceArgs}{Return the Args of a Sequence node} -<>= +\begin{chunk}{defun pfSequenceArgs 0} (defun |pfSequenceArgs| (pf) (cadr pf)) -@ +\end{chunk} \defun{pfSequence?}{ Is this a Sequence node?} \calls{pfSequence?}{pfAbSynOp?} -<>= +\begin{chunk}{defun pfSequence?} (defun |pfSequence?| (pf) (|pfAbSynOp?| pf '|Sequence|)) -@ +\end{chunk} \defun{pf0SequenceArgs}{Return the parts of the Args of a Sequence node} \calls{pf0SequenceArgs}{pfParts} \calls{pf0SequenceArgs}{pfSequenceArgs} -<>= +\begin{chunk}{defun pf0SequenceArgs} (defun |pf0SequenceArgs| (pf) (|pfParts| (|pfSequenceArgs| pf))) -@ +\end{chunk} \defun{pfSuchthat}{Create a Suchthat node} \calls{pfSuchthat}{pfTree} -<>= +\begin{chunk}{defun pfSuchthat} (defun |pfSuchthat| (pfcond) (|pfTree| '|Suchthat| (list pfcond))) -@ +\end{chunk} \defun{pfSuchthat?}{Is this a SuchThat node?} \calls{pfSuchthat?}{pfAbSynOp?} -<>= +\begin{chunk}{defun pfSuchthat?} (defun |pfSuchthat?| (pf) (|pfAbSynOp?| pf '|Suchthat|)) -@ +\end{chunk} \defun{pfSuchthatCond}{Return the Cond part of a SuchThat node} -<>= +\begin{chunk}{defun pfSuchthatCond 0} (defun |pfSuchthatCond| (pf) (cadr pf)) -@ +\end{chunk} \defun{pfTagged}{Create a Tagged node} \calls{pfTagged}{pfTree} -<>= +\begin{chunk}{defun pfTagged} (defun |pfTagged| (pftag pfexpr) (|pfTree| '|Tagged| (list pftag pfexpr))) -@ +\end{chunk} \defun{pfTagged?}{Is this a Tagged node?} \calls{pfTagged?}{pfAbSynOp?} -<>= +\begin{chunk}{defun pfTagged?} (defun |pfTagged?| (pf) (|pfAbSynOp?| pf '|Tagged|)) -@ +\end{chunk} \defun{pfTaggedExpr}{Return the Expression portion of a Tagged node} -<>= +\begin{chunk}{defun pfTaggedExpr 0} (defun |pfTaggedExpr| (pf) (caddr pf)) -@ +\end{chunk} \defun{pfTaggedTag}{Return the Tag of a Tagged node} -<>= +\begin{chunk}{defun pfTaggedTag 0} (defun |pfTaggedTag| (pf) (cadr pf)) -@ +\end{chunk} \defun{pfTaggedToTyped}{pfTaggedToTyped} \calls{pfTaggedToTyped}{pfTagged?} @@ -10561,7 +10546,7 @@ of the form ('expression expr position) \calls{pfTaggedToTyped}{pfTyped} \calls{pfTaggedToTyped}{pfSuch} \calls{pfTaggedToTyped}{pfInfApplication} -<>= +\begin{chunk}{defun pfTaggedToTyped} (defun |pfTaggedToTyped| (arg) (let (a form rt) (if (|pfTagged?| arg) @@ -10576,7 +10561,7 @@ of the form ('expression expr position) (|pfTyped| (|pfSuch| a (|pfInfApplication| (|pfId| '=) a form)) rt)) (t (|pfTyped| form rt))))) -@ +\end{chunk} \defun{pfTweakIf}{pfTweakIf} \calls{pfTweakIf}{pfIfElse} @@ -10585,209 +10570,209 @@ of the form ('expression expr position) \calls{pfTweakIf}{pfTree} \calls{pfTweakIf}{pfIfCond} \calls{pfTweakIf}{pfIfThen} -<>= +\begin{chunk}{defun pfTweakIf} (defun |pfTweakIf| (form) (let (b a) (setq a (|pfIfElse| form)) (setq b (if (|pfNothing?| a) (|pfListOf| NIL) a)) (|pfTree| '|WIf| (list (|pfIfCond| form) (|pfIfThen| form) b)))) -@ +\end{chunk} \defun{pfTyped}{Construct a Typed node} \calls{pfTyped}{pfTree} -<>= +\begin{chunk}{defun pfTyped} (defun |pfTyped| (pfid pftype) (|pfTree| '|Typed| (list pfid pftype))) -@ +\end{chunk} \defun{pfTyped?}{Is this a Typed node?} \calls{pfTyped?}{pfAbSynOp?} -<>= +\begin{chunk}{defun pfTyped?} (defun |pfTyped?| (pf) (|pfAbSynOp?| pf '|Typed|)) -@ +\end{chunk} \defun{pfTypedType}{Return the Type of a Typed node} -<>= +\begin{chunk}{defun pfTypedType 0} (defun |pfTypedType| (pf) (caddr pf)) -@ +\end{chunk} \defun{pfTypedId}{Return the Id of a Typed node} -<>= +\begin{chunk}{defun pfTypedId 0} (defun |pfTypedId| (pf) (cadr pf)) -@ +\end{chunk} \defun{pfTyping}{Construct a Typing node} \calls{pfTyping}{pfTree} -<>= +\begin{chunk}{defun pfTyping} (defun |pfTyping| (pfitems) (|pfTree| '|Typing| (list pfitems))) -@ +\end{chunk} \defun{pfTuple}{Return a Tuple node} \calls{pfTuple}{pfTree} -<>= +\begin{chunk}{defun pfTuple} (defun |pfTuple| (pfparts) (|pfTree| '|Tuple| (list pfparts))) -@ +\end{chunk} \defun{pfTupleListOf}{Return a Tuple from a List} \calls{pfTupleListOf}{pfTuple} \calls{pfTupleListOf}{pfListOf} -<>= +\begin{chunk}{defun pfTupleListOf} (defun |pfTupleListOf| (pfparts) (|pfTuple| (|pfListOf| pfparts))) -@ +\end{chunk} \defun{pfTuple?}{Is this a Tuple node?} \calls{pfTuple?}{pfAbSynOp?} -<>= +\begin{chunk}{defun pfTuple?} (defun |pfTuple?| (pf) (|pfAbSynOp?| pf '|Tuple|)) -@ +\end{chunk} \defun{pfTupleParts}{Return the Parts of a Tuple node} -<>= +\begin{chunk}{defun pfTupleParts 0} (defun |pfTupleParts| (pf) (cadr pf)) -@ +\end{chunk} \defun{pf0TupleParts}{Return the parts of a Tuple} \calls{pf0TupleParts}{pfParts} \calls{pf0TupleParts}{pfTupleParts} -<>= +\begin{chunk}{defun pf0TupleParts} (defun |pf0TupleParts| (pf) (|pfParts| (|pfTupleParts| pf))) -@ +\end{chunk} \defun{pfUnSequence}{Return a list from a Sequence node} \calls{pfUnSequence}{pfSequence?} \calls{pfUnSequence}{pfAppend} \calls{pfUnSequence}{pf0SequenceArgs} \calls{pfUnSequence}{pfListOf} -<>= +\begin{chunk}{defun pfUnSequence} (defun |pfUnSequence| (x) (if (|pfSequence?| x) (|pfListOf| (|pfAppend| (|pf0SequenceArgs| x))) (|pfListOf| x))) -@ +\end{chunk} \defun{pfWDec}{The comment is attached to all signatutres} \calls{pfWDec}{pfWDeclare} \calls{pfWDec}{pfParts} -<>= +\begin{chunk}{defun pfWDec} (defun |pfWDec| (doc name) (mapcar #'(lambda (i) (|pfWDeclare| i doc)) (|pfParts| name))) -@ +\end{chunk} \defun{pfWDeclare}{Construct a WDeclare node} \calls{pfWDeclare}{pfTree} -<>= +\begin{chunk}{defun pfWDeclare} (defun |pfWDeclare| (pfsignature pfdoc) (|pfTree| '|WDeclare| (list pfsignature pfdoc))) -@ +\end{chunk} \defun{pfWhere}{Construct a Where node} \calls{pfWhere}{pfTree} -<>= +\begin{chunk}{defun pfWhere} (defun |pfWhere| (pfcontext pfexpr) (|pfTree| '|Where| (list pfcontext pfexpr))) -@ +\end{chunk} \defun{pfWhere?}{Is this a Where node?} \calls{pfWhere?}{pfAbSynOp?} -<>= +\begin{chunk}{defun pfWhere?} (defun |pfWhere?| (pf) (|pfAbSynOp?| pf '|Where|)) -@ +\end{chunk} \defun{pf0WhereContext}{Return the parts of the Context of a Where node} \calls{pf0WhereContext}{pfParts} \calls{pf0WhereContext}{pfWhereContext} -<>= +\begin{chunk}{defun pf0WhereContext} (defun |pf0WhereContext| (pf) (|pfParts| (|pfWhereContext| pf))) -@ +\end{chunk} \defun{pfWhereContext}{Return the Context of a Where node} -<>= +\begin{chunk}{defun pfWhereContext 0} (defun |pfWhereContext| (pf) (cadr pf)) -@ +\end{chunk} \defun{pfWhereExpr}{Return the Expr part of a Where node} -<>= +\begin{chunk}{defun pfWhereExpr 0} (defun |pfWhereExpr| (pf) (caddr pf)) -@ +\end{chunk} \defun{pfWhile}{Construct a While node} \calls{pfWhile}{pfTree} -<>= +\begin{chunk}{defun pfWhile} (defun |pfWhile| (pfcond) (|pfTree| '|While| (list pfcond))) -@ +\end{chunk} \defun{pfWhile?}{Is this a While node?} \calls{pfWhile?}{pfAbSynOp?} -<>= +\begin{chunk}{defun pfWhile?} (defun |pfWhile?| (pf) (|pfAbSynOp?| pf '|While|)) -@ +\end{chunk} \defun{pfWhileCond}{Return the Cond part of a While node} -<>= +\begin{chunk}{defun pfWhileCond 0} (defun |pfWhileCond| (pf) (cadr pf)) -@ +\end{chunk} \defun{pfWith}{Construct a With node} \calls{pfWith}{pfTree} -<>= +\begin{chunk}{defun pfWith} (defun |pfWith| (pfbase pfwithin pfwithon) (|pfTree| '|With| (list pfbase pfwithin pfwithon))) -@ +\end{chunk} \defun{pfWrong}{Create a Wrong node} \calls{pfWrong}{pfTree} -<>= +\begin{chunk}{defun pfWrong} (defun |pfWrong| (pfwhy pfrubble) (|pfTree| '|Wrong| (list pfwhy pfrubble))) -@ +\end{chunk} \defun{pfWrong?}{Is this a Wrong node?} \calls{pfWrong?}{pfAbSynOp?} -<>= +\begin{chunk}{defun pfWrong?} (defun |pfWrong?| (pf) (|pfAbSynOp?| pf '|Wrong|)) -@ +\end{chunk} \chapter{Pftree to s-expression translation} Pftree to s-expression translation. Used to interface the new parser @@ -10800,7 +10785,7 @@ output is an old-parser-style s-expression. \usesdollar{pf2Sex}{insideApplication} \usesdollar{pf2Sex}{insideRule} \usesdollar{pf2Sex}{QuietCommand} -<>= +\begin{chunk}{defun pf2Sex} (defun |pf2Sex| (pf) (let (|$insideSEQ| |$insideApplication| |$insideRule|) (declare (special |$insideSEQ| |$insideApplication| |$insideRule| @@ -10811,7 +10796,7 @@ output is an old-parser-style s-expression. (setq |$insideSEQ| nil) (|pf2Sex1| pf))) -@ +\end{chunk} \defun{pf2Sex1}{Pftree to s-expression translation inner function} \calls{pf2Sex1}{pfNothing?} @@ -10908,7 +10893,7 @@ output is an old-parser-style s-expression. \usesdollar{pf2Sex1}{insideSEQ} \usesdollar{pf2Sex1}{insideRule} \usesdollar{pf2Sex1}{QuietCommand} -<>= +\begin{chunk}{defun pf2Sex1} (defun |pf2Sex1| (pf) (let (args idList type op tagPart tag s) (declare (special |$insideSEQ| |$insideRule| |$QuietCommand|)) @@ -11017,7 +11002,7 @@ output is an old-parser-style s-expression. ((eq (|pfAbSynOp| pf) '|command|) (|tokPart| pf)) (t (|keyedSystemError| "S2GE0017" (list "pf2Sex1")))))) -@ +\end{chunk} \defun{pfLiteral2Sex}{Convert a Literal to an S-expression} \calls{pfLiteral2Sex}{pfLiteralClass} @@ -11027,7 +11012,7 @@ output is an old-parser-style s-expression. \calls{pfLiteral2Sex}{pfLeafToken} \calls{pfLiteral2Sex}{keyedSystemError} \usesdollar{pfLiteral2Sex}{insideRule} -<>= +\begin{chunk}{defun pfLiteral2Sex} (defun |pfLiteral2Sex| (pf) (let (s type) (declare (special |$insideRule|)) @@ -11047,11 +11032,11 @@ output is an old-parser-style s-expression. (t (|keyedSystemError| 'S2GE0017 (list "pfLiteral2Sex: unexpected form")))))) -@ +\end{chunk} \defun{float2Sex}{Convert a float to an S-expression} \usesdollar{float2Sex}{useBFasDefault} -<>= +\begin{chunk}{defun float2Sex} (defun |float2Sex| (num) (let (exp frac bfForm fracPartString intPart dotIndex expPart mantPart eIndex) (declare (special |$useBFasDefault|)) @@ -11079,7 +11064,7 @@ output is an old-parser-style s-expression. (list (list '|$elt| (list '|Float|) '|float|) frac exp 10)) bfForm))) -@ +\end{chunk} \defun{pfApplication2Sex}{Change an Application node to an S-expression} \calls{pfApplication2Sex}{pfOp2Sex} @@ -11094,7 +11079,7 @@ output is an old-parser-style s-expression. \calls{pfApplication2Sex}{hasOptArgs?} \usesdollar{pfApplication2Sex}{insideApplication} \usesdollar{pfApplication2Sex}{insideRule} -<>= +\begin{chunk}{defun pfApplication2Sex} (defun |pfApplication2Sex| (pf) (let (|$insideApplication| x val realOp tmp1 qt argSex typeList args op) (declare (special |$insideApplication| |$insideRule|)) @@ -11165,14 +11150,14 @@ output is an old-parser-style s-expression. ((eq op '|by|) (list 'by (|pf2Sex1| args))) (t (list op (|pf2Sex1| args)))))))) -@ +\end{chunk} \defun{pfSuchThat2Sex}{Convert a SuchThat node to an S-expression} \calls{pfSuchThat2Sex}{pf0TupleParts} \calls{pfSuchThat2Sex}{pf2Sex1} \calls{pfSuchThat2Sex}{pf2Sex} \usesdollar{pfSuchThat2Sex}{predicateList} -<>= +\begin{chunk}{defun pfSuchThat2Sex} (defun |pfSuchThat2Sex| (args) (let (rhsSex lhsSex argList name) (declare (special |$predicateList|)) @@ -11184,7 +11169,7 @@ output is an old-parser-style s-expression. (cons (cons name (cons lhsSex rhsSex)) |$predicateList|)) name)) -@ +\end{chunk} \defun{pfOp2Sex}{pfOp2Sex} \calls{pfOp2Sex}{pf2Sex1} @@ -11192,7 +11177,7 @@ output is an old-parser-style s-expression. \calls{pfOp2Sex}{pfSymbol?} \usesdollar{pfOp2Sex}{quotedOpList} \usesdollar{pfOp2Sex}{insideRule} -<>= +\begin{chunk}{defun pfOp2Sex} (defun |pfOp2Sex| (pf) (let (realOp tmp1 op alreadyQuoted) (declare (special |$quotedOpList| |$insideRule|)) @@ -11221,10 +11206,10 @@ output is an old-parser-style s-expression. (t op))) (t op)))) -@ +\end{chunk} \defun{pmDontQuote?}{pmDontQuote?} -<>= +\begin{chunk}{defun pmDontQuote? 0} (defun |pmDontQuote?| (sy) (member sy '(+ - * ** ^ / |log| |exp| |pi| |sqrt| |ei| |li| |erf| |ci| @@ -11233,10 +11218,10 @@ output is an old-parser-style s-expression. |coth| |sech| |csch| |asinh| |acosh| |atanh| |acoth| |asech| |acsc|))) -@ +\end{chunk} \defun{hasOptArgs?}{hasOptArgs?} -<>= +\begin{chunk}{defun hasOptArgs? 0} (defun |hasOptArgs?| (argSex) (let (rhs lhs opt nonOpt tmp1 tmp2) (dolist (arg argSex) @@ -11259,13 +11244,13 @@ output is an old-parser-style s-expression. (when opt (nconc (nreverse nonOpt) (list (cons '|construct| (nreverse opt))))))) -@ +\end{chunk} \defun{pfSequence2Sex}{Convert a Sequence node to an S-expression} \calls{pfSequence2Sex}{pf2Sex1} \calls{pfSequence2Sex}{pf0SequenceArgs} \usesdollar{pfSequence2Sex}{insideSEQ} -<>= +\begin{chunk}{defun pfSequence2Sex} (defun |pfSequence2Sex| (pf) (let (|$insideSEQ| tmp1 ruleList seq) (declare (special |$insideSEQ|)) @@ -11282,7 +11267,7 @@ output is an old-parser-style s-expression. (list '|ruleset| (cons '|construct| ruleList))) (t seq)))) -@ +\end{chunk} \defun{pfSequence2Sex0}{pfSequence2Sex0} \tpdhere{rewrite this using (dolist (item seqList)...)} @@ -11302,7 +11287,7 @@ output is an old-parser-style s-expression. ; ["SEQ", :nreverse seqTranList] \end{verbatim} \calls{pfSequence2Sex0}{pfSequence2Sex0} -<>= +\begin{chunk}{defun pfSequence2Sex0} (defun |pfSequence2Sex0| (seqList) (let (value tmp2 cond tmp1 item seqTranList) (if (null seqList) @@ -11340,7 +11325,7 @@ output is an old-parser-style s-expression. (car seqTranList) (cons 'seq (nreverse seqTranList))))))) -@ +\end{chunk} \defun{loopIters2Sex}{Convert a loop node to an S-expression} \tpdhere{rewrite using dsetq} @@ -11359,7 +11344,7 @@ output is an old-parser-style s-expression. ; nreverse result \end{verbatim} \calls{loopIters2Sex}{pf2Sex1} -<>= +\begin{chunk}{defun loopIters2Sex} (defun |loopIters2Sex| (iterList) (let (j incr i var sex result tmp1 tmp2 tmp3 tmp4 tmp5 tmp6 tmp7 tmp8) (dolist (iter iterList (nreverse result)) @@ -11467,7 +11452,7 @@ output is an old-parser-style s-expression. (setq result (cons (list 'step var i 1 j) result))) (t (setq result (cons sex result))))))) -@ +\end{chunk} \defun{pfCollect2Sex}{Change a Collect node to an S-expression} \calls{pfCollect2Sex}{loopIters2Sex} @@ -11475,7 +11460,7 @@ output is an old-parser-style s-expression. \calls{pfCollect2Sex}{pfCollectIterators} \calls{pfCollect2Sex}{pf2Sex1} \calls{pfCollect2Sex}{pfCollectBody} -<>= +\begin{chunk}{defun pfCollect2Sex} (defun |pfCollect2Sex| (pf) (let (var cond sex tmp1 tmp2 tmp3 tmp4) (setq sex @@ -11508,8 +11493,7 @@ output is an old-parser-style s-expression. (list '|\|| var cond)) (t sex)))) - -@ +\end{chunk} \defun{pfDefinition2Sex}{Convert a Definition node to an S-expression} \calls{pfDefinition2Sex}{pf2Sex1} @@ -11518,7 +11502,7 @@ output is an old-parser-style s-expression. \calls{pfDefinition2Sex}{systemError} \calls{pfDefinition2Sex}{pfLambdaTran} \usesdollar{pfDefinition2Sex}{insideApplication} -<>= +\begin{chunk}{defun pfDefinition2Sex} (defun |pfDefinition2Sex| (pf) (let (body argList tmp1 rhs id idList) (declare (special |$insideApplication|)) @@ -11544,7 +11528,7 @@ output is an old-parser-style s-expression. (cons id argList)) body)))))))) -@ +\end{chunk} \defun{pfLambdaTran}{Convert a Lambda node to an S-expression} \calls{pfLambdaTran}{pfLambda?} @@ -11558,7 +11542,7 @@ output is an old-parser-style s-expression. \calls{pfLambdaTran}{systemError} \calls{pfLambdaTran}{pfLambdaRets} \calls{pfLambdaTran}{pfLambdaBody} -<>= +\begin{chunk}{defun pfLambdaTran} (defun |pfLambdaTran| (pf) (let (retType argList argTypeList) (cond @@ -11583,7 +11567,7 @@ output is an old-parser-style s-expression. (|pf2Sex1| (|pfLambdaBody| pf))))) (t (cons '|id| (list '(nil) '(nil) (|pf2Sex1| pf))))))) -@ +\end{chunk} \defun{pfCollectArgTran}{pfCollectArgTran} \calls{pfCollectArgTran}{pfCollect?} @@ -11591,7 +11575,7 @@ output is an old-parser-style s-expression. \calls{pfCollectArgTran}{pfParts} \calls{pfCollectArgTran}{pfCollectIterators} \calls{pfCollectArgTran}{pfCollectBody} -<>= +\begin{chunk}{defun pfCollectArgTran} (defun |pfCollectArgTran| (pf) (let (cond tmp2 tmp1 id conds) (cond @@ -11616,11 +11600,11 @@ output is an old-parser-style s-expression. (t (cons id conds)))) (t (|pf2Sex1| pf))))) -@ +\end{chunk} \defun{pfLambda2Sex}{Convert a Lambda node to an S-expression} \calls{pfLambda2Sex}{pfLambdaTran} -<>= +\begin{chunk}{defun pfLambda2Sex} (defun |pfLambda2Sex| (pf) (let (body argList tmp1) (setq tmp1 (|pfLambdaTran| pf)) @@ -11628,7 +11612,7 @@ output is an old-parser-style s-expression. (setq body (cdr tmp1)) (cons 'adef (cons argList body)))) -@ +\end{chunk} \defun{pfRule2Sex}{Convert a Rule node to an S-expression} \calls{pfRule2Sex}{pfLhsRule2Sex} @@ -11640,7 +11624,7 @@ output is an old-parser-style s-expression. \usesdollar{pfRule2Sex}{multiVarPredicateList} \usesdollar{pfRule2Sex}{predicateList} \usesdollar{pfRule2Sex}{quotedOpList} -<>= +\begin{chunk}{defun pfRule2Sex} (defun |pfRule2Sex| (pf) (let (|$multiVarPredicateList| |$predicateList| |$quotedOpList| rhs lhs) (declare (special |$multiVarPredicateList| |$predicateList| |$quotedOpList|)) @@ -11655,31 +11639,31 @@ output is an old-parser-style s-expression. (list '|rule| lhs rhs (cons '|construct| |$quotedOpList|)) (list '|rule| lhs rhs))))) -@ +\end{chunk} \defun{pfLhsRule2Sex}{Convert the Lhs of a Rule to an S-expression} \calls{pfLhsRule2Sex}{pf2Sex1} \usesdollar{pfLhsRule2Sex}{insideRule} -<>= +\begin{chunk}{defun pfLhsRule2Sex} (defun |pfLhsRule2Sex| (lhs) (let (|$insideRule|) (declare (special |$insideRule|)) (setq |$insideRule| '|left|) (|pf2Sex1| lhs))) -@ +\end{chunk} \defun{pfRhsRule2Sex}{Convert the Rhs of a Rule to an S-expression} \calls{pfRhsRule2Sex}{pf2Sex1} \usesdollar{pfRhsRule2Sex}{insideRule} -<>= +\begin{chunk}{defun pfRhsRule2Sex} (defun |pfRhsRule2Sex| (rhs) (let (|$insideRule|) (declare (special |$insideRule|)) (setq |$insideRule| '|right|) (|pf2Sex1| rhs))) -@ +\end{chunk} \defun{rulePredicateTran}{Convert a Rule predicate to an S-expression} \begin{verbatim} @@ -11701,7 +11685,7 @@ output is an old-parser-style s-expression. \calls{rulePredicateTran}{patternVarsOf} \calls{rulePredicateTran}{pvarPredTran} \usesdollar{rulePredicateTran}{multiVarPredicateList} -<>= +\begin{chunk}{defun rulePredicateTran} (defun |rulePredicateTran| (rule) (let (predBody varList rhs tmp1 result) (declare (special |$multiVarPredicateList|)) @@ -11766,19 +11750,19 @@ output is an old-parser-style s-expression. (|List| (|Expression| (|Integer|)))) '(nil nil) predBody)))))) -@ +\end{chunk} \defun{patternVarsOf}{patternVarsOf} \calls{patternVarsOf}{patternVarsOf1} -<>= +\begin{chunk}{defun patternVarsOf} (defun |patternVarsOf| (expr) (|patternVarsOf1| expr nil)) -@ +\end{chunk} \defun{patternVarsOf1}{patternVarsOf1} \calls{patternVarsOf1}{patternVarsOf1} -<>= +\begin{chunk}{defun patternVarsOf1} (defun |patternVarsOf1| (expr varList) (let (argl op) (cond @@ -11799,23 +11783,23 @@ output is an old-parser-style s-expression. varList)) (t varList)))) -@ +\end{chunk} \defun{pvarPredTran}{pvarPredTran} -<>= +\begin{chunk}{defun pvarPredTran} (defun |pvarPredTran| (rhs varList) (let ((i 0)) (dolist (var varList rhs) (setq rhs (nsubst (list '|elt| '|predicateVariable| (incf i)) var rhs))))) -@ +\end{chunk} \defun{ruleLhsTran}{Convert the Lhs of a Rule node to an S-expression} \calls{ruleLhsTran}{patternVarsOf} \calls{ruleLhsTran}{nsubst} \usesdollar{ruleLhsTran}{predicateList} \usesdollar{ruleLhsTran}{multiVarPredicateList} -<>= +\begin{chunk}{defun ruleLhsTran} (defun |ruleLhsTran| (ruleLhs) (let (predicate var vars predRhs predLhs name) (declare (special |$predicateList| |$multiVarPredicateList|)) @@ -11836,17 +11820,17 @@ output is an old-parser-style s-expression. (setq ruleLhs (nsubst predicate name ruleLhs))))) ruleLhs)) -@ +\end{chunk} \defvar{dotdot} -<>= +\begin{chunk}{initvars} (defvar |$dotdot| '|..|) -@ +\end{chunk} \defun{opTran}{Translate ops into internal symbols} \usesdollar{opTran}{dotdot} -<>= +\begin{chunk}{defun opTran 0} (defun |opTran| (op) (declare (special |$dotdot|)) (cond @@ -11856,7 +11840,7 @@ output is an old-parser-style s-expression. ((eq op 'is) '|is|) (t op))) -@ +\end{chunk} \chapter{Keyed Message Handling} Throughout the interpreter there are messages printed using a symbol @@ -11913,69 +11897,69 @@ above for examples. \defdollar{cacheMessages} This is used for debugging -<>= +\begin{chunk}{initvars} (defvar |$cacheMessages| t) -@ +\end{chunk} \defdollar{msgAlist} -<>= +\begin{chunk}{initvars} (defvar |$msgAlist| nil) -@ +\end{chunk} \defdollar{msgDatabaseName} -<>= +\begin{chunk}{initvars} (defvar |$msgDatabaseName| nil) -@ +\end{chunk} \defdollar{testingErrorPrefix} -<>= +\begin{chunk}{initvars} (defvar |$testingErrorPrefix| "Daly Bug") -@ +\end{chunk} \defdollar{texFormatting} -<>= +\begin{chunk}{initvars} (defvar |$texFormatting| nil) -@ +\end{chunk} \defvar{*msghash*} -<>= +\begin{chunk}{initvars} (defvar *msghash* nil "hash table keyed by msg number") -@ +\end{chunk} \defdollar{msgdbPrims} -<>= +\begin{chunk}{initvars} (defvar |$msgdbPrims| '(|%b| |%d| |%l| |%i| |%u| %U |%n| |%x| |%ce| |%rj| "%U" "%b" "%d" "%l" "%i" "%u" "%U" "%n" "%x" "%ce" "%rj")) -@ +\end{chunk} \defdollar{msgdbPunct} -<>= +\begin{chunk}{initvars} (defvar |$msgdbPunct| '(|.| |,| ! |:| |;| ? ] |)| "." "," "!" ":" ";" "?" "]" ")")) -@ +\end{chunk} \defdollar{msgdbNoBlanksBeforeGroup} -<>= +\begin{chunk}{initvars} (defvar |$msgdbNoBlanksBeforeGroup| `(" " | | "%" % ,@|$msgdbPrims| ,@|$msgdbPunct|)) -@ +\end{chunk} \defdollar{msgdbNoBlanksAfterGroup} -<>= +\begin{chunk}{initvars} (defvar |$msgdbNoBlanksAfterGroup| `(" " | | "%" % ,@|$msgdbPrims| [ |(| "[" "(")) -@ +\end{chunk} \defun{fetchKeyedMsg}{Fetch a message from the message database} If the {\tt *msghash*} hash table is empty we call {\tt cacheKeyedMsg} @@ -11984,7 +11968,7 @@ to fill the table, otherwise we do a key lookup in the hash table. \calls{fetchKeyedMsg}{cacheKeyedMsg} \usesdollar{fetchKeyedMsg}{defaultMsgDatabaseName} \uses{fetchKeyedMsg}{*msghash*} -<>= +\begin{chunk}{defun fetchKeyedMsg} (defun |fetchKeyedMsg| (key ignore) (declare (ignore ignore) (special *msghash* |$defaultMsgDatabaseName|)) (setq key (|object2Identifier| key)) @@ -11993,13 +11977,13 @@ to fill the table, otherwise we do a key lookup in the hash table. (cacheKeyedMsg |$defaultMsgDatabaseName|)) (gethash key *msghash*)) -@ +\end{chunk} \defun{cacheKeyedMsg}{Cache messages read from message database} \catches{cacheKeyedMsg}{done} \throws{cacheKeyedMsg}{done} \uses{cacheKeyedMsg}{*msghash*} -<>= +\begin{chunk}{defun cacheKeyedMsg} (defun cacheKeyedMsg (file) (let ((line "") (msg "") key) (declare (special *msghash*)) @@ -12019,25 +12003,26 @@ to fill the table, otherwise we do a key lookup in the hash table. ('else (setq msg (concatenate 'string msg line))))))))) -@ +\end{chunk} \defun{getKeyedMsg}{getKeyedMsg} \calls{getKeyedMsg}{fetchKeyedMsg} -<>= +\begin{chunk}{defun getKeyedMsg} (defun |getKeyedMsg| (key) (|fetchKeyedMsg| key nil)) -@ +\end{chunk} \defun{sayKeyedMsg}{Say a message using a keyed lookup} \calls{sayKeyedMsg}{sayKeyedMsgLocal} \usesdollar{sayKeyedMsg}{texFormatting} -<>= +\begin{chunk}{defun sayKeyedMsg} (defun |sayKeyedMsg| (key args) (let (|$texFormatting|) (declare (special |$texFormatting|)) (setq |$texFormatting| nil) (|sayKeyedMsgLocal| key args))) -@ + +\end{chunk} \defun{sayKeyedMsgLocal}{Handle msg formatting and print to file} \calls{sayKeyedMsgLocal}{segmentKeyedMsg} @@ -12050,7 +12035,7 @@ to fill the table, otherwise we do a key lookup in the hash table. \usesdollar{sayKeyedMsgLocal}{linelength} \usesdollar{sayKeyedMsgLocal}{margin} \usesdollar{sayKeyedMsgLocal}{displayMsgNumber} -<>= +\begin{chunk}{defun sayKeyedMsgLocal} (defun |sayKeyedMsgLocal| (key args) (let (msg msgp) (declare (special |$printMsgsToFile| $linelength $margin |$displayMsgNumber|)) @@ -12061,21 +12046,21 @@ to fill the table, otherwise we do a key lookup in the hash table. (when |$printMsgsToFile| (|sayMSG2File| msgp)) (|sayMSG| msgp))) -@ +\end{chunk} \defun{segmentKeyedMsg}{Break a message into words} \calls{segmentKeyedMsg}{string2Words} -<>= +\begin{chunk}{defun segmentKeyedMsg} (defun |segmentKeyedMsg| (msg) (|string2Words| msg)) -@ +\end{chunk} \defun{sayMSG2File}{Write a msg into spadmsg.listing file} \calls{sayMSG2File}{makePathname} \calls{sayMSG2File}{defiostream} \calls{sayMSG2File}{sayBrightly1} \calls{sayMSG2File}{shut} -<>= +\begin{chunk}{defun sayMSG2File} (defun |sayMSG2File| (msg) (let (file str) (setq file (|makePathname| '|spadmsg| '|listing| 'a)) @@ -12083,17 +12068,17 @@ to fill the table, otherwise we do a key lookup in the hash table. (sayBrightly1 msg str) (shut str))) -@ +\end{chunk} \defun{sayMSG}{sayMSG} \calls{saymsg}{saybrightly1} \usesdollar{sayMSG}{algebraOutputStream} -<>= +\begin{chunk}{defun sayMSG} (defun |sayMSG| (x) (declare (special |$algebraOutputStream|)) (when x (sayBrightly1 x |$algebraOutputStream|))) -@ +\end{chunk} \chapter{Stream Utilities} The input stream is parsed into a large s-expression by repeated calls @@ -12113,14 +12098,14 @@ explains the strange parsing technique). \defun{npNull}{npNull} \calls{npNull}{StreamNull} -<>= +\begin{chunk}{defun npNull} (defun |npNull| (x) (|StreamNull| x)) -@ +\end{chunk} \defun{StreamNull}{StreamNull} \calls{StreamNull}{eqcar} -<>= +\begin{chunk}{defun StreamNull 0} (defun |StreamNull| (x) (let (st) (cond @@ -12136,7 +12121,7 @@ explains the strange parsing technique). (rplacd x (cdr st))))))) (eqcar x '|nullstream|))))) -@ +\end{chunk} \chapter{Code Piles} The insertpiles function converts a line-list to a line-forest where @@ -12156,7 +12141,7 @@ column t is the number of spaces before the first non-space in line t \calls{insertpile}{pilePlusComments} \calls{insertpile}{pileTree} \calls{insertpile}{pileCforest} -<>= +\begin{chunk}{defun insertpile} (defun |insertpile| (s) (let (stream a t1 h1 t2 h tmp1) (cond @@ -12179,20 +12164,20 @@ column t is the number of spaces before the first non-space in line t (setq a (|pileTree| -1 s)) (cons (list (list (elt a 2) stream)) (elt a 3)))))))) -@ +\end{chunk} \defun{pilePlusComment}{pilePlusComment} \calls{pilePlusComment}{tokType} \calls{pilePlusComments}{npNull} \calls{pilePlusComments}{pilePlusComment} \calls{pilePlusComments}{pilePlusComments} -<>= +\begin{chunk}{defun pilePlusComment} (defun |pilePlusComment| (arg) (eq (|tokType| (caar arg)) '|comment|)) -@ +\end{chunk} \defun{pilePlusComments}{pilePlusComments} -<>= +\begin{chunk}{defun pilePlusComments} (defun |pilePlusComments| (s) (let (t1 h1 t2 h tmp1) (cond @@ -12210,13 +12195,13 @@ column t is the number of spaces before the first non-space in line t (t (list nil s))))))) -@ +\end{chunk} \defun{pileTree}{pileTree} \calls{pileTree}{npNull} \calls{pileTree}{pileColumn} \calls{pileTree}{pileForests} -<>= +\begin{chunk}{defun pileTree} (defun |pileTree| (n s) (let (hh t1 h tmp1) (cond @@ -12230,22 +12215,22 @@ column t is the number of spaces before the first non-space in line t ((< n hh) (|pileForests| (car h) hh t1)) (t (list nil n nil s))))))) -@ +\end{chunk} \defun{pileColumn}{pileColumn} \calls{pileColumn}{tokPosn} -<>= +\begin{chunk}{defun pileColumn} (defun |pileColumn| (arg) (cdr (|tokPosn| (caar arg)))) -@ +\end{chunk} \defun{pileForests}{pileForests} \calls{pileForests}{pileForest} \calls{pileForests}{npNull} \calls{pileForests}{pileForests} \calls{pileForests}{pileCtree} -<>= +\begin{chunk}{defun pileForests} (defun |pileForests| (h n s) (let (t1 h1 tmp1) (setq tmp1 (|pileForest| n s)) @@ -12255,12 +12240,12 @@ column t is the number of spaces before the first non-space in line t ((|npNull| h1) (list t n h s)) (t (|pileForests| (|pileCtree| h h1) n t1))))) -@ +\end{chunk} \defun{pileForest}{pileForest} \calls{pileForest}{pileTree} \calls{pileForest}{pileForest1} -<>= +\begin{chunk}{defun pileForest} (defun |pileForest| (n s) (let (t1 h1 t2 h hh b tmp) (setq tmp (|pileTree| n s)) @@ -12277,12 +12262,12 @@ column t is the number of spaces before the first non-space in line t (t (list nil s))))) -@ +\end{chunk} \defun{pileForest1}{pileForest1} \calls{pileForest1}{eqpileTree} \calls{pileForest1}{pileForest1} -<>= +\begin{chunk}{defun pileForest1} (defun |pileForest1| (n s) (let (t1 h1 t2 h n1 b tmp) (setq tmp (|eqpileTree| n s)) @@ -12298,13 +12283,13 @@ column t is the number of spaces before the first non-space in line t (list (cons h h1) t1)) (t (list nil s))))) -@ +\end{chunk} \defun{eqpileTree}{eqpileTree} \calls{eqpileTree}{npNull} \calls{eqpileTree}{pileColumn} \calls{eqpileTree}{pileForests} -<>= +\begin{chunk}{defun eqpileTree} (defun |eqpileTree| (n s) (let (hh t1 h tmp) (cond @@ -12318,23 +12303,23 @@ column t is the number of spaces before the first non-space in line t ((equal hh n) (|pileForests| (car h) hh t1)) (t (list nil n nil s))))))) -@ +\end{chunk} \defun{pileCtree}{pileCtree} \calls{pileCtree}{dqAppend} \calls{pileCtree}{pileCforest} -<>= +\begin{chunk}{defun pileCtree} (defun |pileCtree| (x y) (|dqAppend| x (|pileCforest| y))) -@ +\end{chunk} \defun{pileCforest}{pileCforest} Only enpiles forests with $>=2$ trees \calls{pileCforest}{tokPart} \calls{pileCforest}{enPile} \calls{pileCforest}{separatePiles} -<>= +\begin{chunk}{defun pileCforest} (defun |pileCforest| (x) (let (f) (cond @@ -12345,7 +12330,7 @@ Only enpiles forests with $>=2$ trees (t f))) (t (|enPile| (|separatePiles| x)))))) -@ +\end{chunk} \defun{enPile}{enPile} \calls{enPile}{dqConcat} @@ -12353,7 +12338,7 @@ Only enpiles forests with $>=2$ trees \calls{enPile}{tokConstruct} \calls{enPile}{firstTokPosn} \calls{enPile}{lastTokPosn} -<>= +\begin{chunk}{defun enPile} (defun |enPile| (x) (|dqConcat| (list @@ -12361,21 +12346,21 @@ Only enpiles forests with $>=2$ trees x (|dqUnit| (|tokConstruct| '|key| 'backtab (|lastTokPosn| x)))))) -@ +\end{chunk} \defun{firstTokPosn}{firstTokPosn} \calls{firstTokPosn}{tokPosn} -<>= +\begin{chunk}{defun firstTokPosn} (defun |firstTokPosn| (arg) (|tokPosn| (caar arg))) -@ +\end{chunk} \defun{lastTokPosn}{lastTokPosn} \calls{lastTokPosn}{tokPosn} -<>= +\begin{chunk}{defun lastTokPosn} (defun |lastTokPosn| (arg) (|tokPosn| (cadr arg))) -@ +\end{chunk} \defun{separatePiles}{separatePiles} \calls{separatePiles}{dqUnit} @@ -12383,7 +12368,7 @@ Only enpiles forests with $>=2$ trees \calls{separatePiles}{lastTokPosn} \calls{separatePiles}{dqConcat} \calls{separatePiles}{separatePiles} -<>= +\begin{chunk}{defun separatePiles} (defun |separatePiles| (x) (let (semicolon a) (cond @@ -12395,35 +12380,35 @@ Only enpiles forests with $>=2$ trees (|dqUnit| (|tokConstruct| '|key| 'backset (|lastTokPosn| a)))) (|dqConcat| (list a semicolon (|separatePiles| (cdr x)))))))) -@ +\end{chunk} \chapter{Dequeue Functions} The dqUnit makes a unit dq i.e. a dq with one item, from the item \defun{dqUnit}{dqUnit} -<>= +\begin{chunk}{defun dqUnit 0} (defun |dqUnit| (s) (let (a) (setq a (list s)) (cons a a))) -@ +\end{chunk} \defun{dqConcat}{dqConcat} The dqConcat function concatenates a list of dq's, destroying all but the last \calls{dqConcat}{dqAppend} \calls{dqConcat}{dqConcat} -<>= +\begin{chunk}{defun dqConcat} (defun |dqConcat| (ld) (cond ((null ld) nil) ((null (cdr ld)) (car ld)) (t (|dqAppend| (car ld) (|dqConcat| (cdr ld)))))) -@ +\end{chunk} \defun{dqAppend}{dqAppend} The dqAppend function appends 2 dq's, destroying the first -<>= +\begin{chunk}{defun dqAppend 0} (defun |dqAppend| (x y) (cond ((null x) y) @@ -12432,14 +12417,14 @@ The dqAppend function appends 2 dq's, destroying the first (rplacd (cdr x) (car y)) (rplacd x (cdr y)) x))) -@ +\end{chunk} \defun{dqToList}{dqToList} -<>= +\begin{chunk}{defun dqToList 0} (defun |dqToList| (s) (when s (car s))) -@ +\end{chunk} \chapter{Message Handling} @@ -12447,77 +12432,78 @@ The dqAppend function appends 2 dq's, destroying the first \defun{lnCreate}{Line object creation} This is called in only one place, the incLine1 function. -<>= +\begin{chunk}{defun lnCreate 0} (defun |lnCreate| (extraBlanks string globalNum &rest optFileStuff) (let ((localNum (first optFileStuff)) (filename (second optFileStuff))) (unless localNum (setq localNum 0)) (list extraBlanks string globalNum localNum filename))) -@ +\end{chunk} \defun{lnExtraBlanks}{Line element 0; Extra blanks} -<>= +\begin{chunk}{defun lnExtraBlanks 0} (defun |lnExtraBlanks| (lineObject) (elt lineObject 0)) -@ +\end{chunk} \defun{lnString}{Line element 1; String} -<>= +\begin{chunk}{defun lnString 0} (defun |lnString| (lineObject) (elt lineObject 1)) -@ +\end{chunk} \defun{lnGlobalNum}{Line element 2; Globlal number} -<>= +\begin{chunk}{defun lnGlobalNum 0} (defun |lnGlobalNum| (lineObject) (elt lineObject 2)) -@ +\end{chunk} \defun{lnSetGlobalNum}{Line element 2; Set Global number} -<>= +\begin{chunk}{defun lnSetGlobalNum 0} (defun |lnSetGlobalNum| (lineObject num) (setf (elt lineObject 2) num)) -@ +\end{chunk} \defun{lnLocalNum}{Line elemnt 3; Local number} -<>= +\begin{chunk}{defun lnLocalNum 0} (defun |lnLocalNum| (lineObject) (elt lineObject 3)) -@ +\end{chunk} \defun{lnPlaceOfOrigin}{Line element 4; Place of origin} -<>= +\begin{chunk}{defun lnPlaceOfOrigin 0} (defun |lnPlaceOfOrigin| (lineObject) (elt lineObject 4)) -@ +\end{chunk} \defun{lnImmediate?}{Line element 4: Is it a filename?} \calls{lnImmediate?}{lnFileName?} -<>= +\begin{chunk}{defun lnImmediate? 0} (defun |lnImmediate?| (lineObject) (null (|lnFileName?| lineObject))) -@ +\end{chunk} \defun{lnFileName?}{Line element 4: Is it a filename?} -<>= +\begin{chunk}{defun lnFileName? 0} (defun |lnFileName?| (lineObject) (let (filename) (when (consp (setq filename (elt lineObject 4))) filename))) -@ +\end{chunk} \defun{lnFileName}{Line element 4; Get filename} \calls{lnFileName}{lnFileName?} \calls{lnFileName}{ncBug} -<>= +\begin{chunk}{defun lnFileName} (defun |lnFileName| (lineObject) (let (fN) (if (setq fN (|lnFileName?| lineObject)) fN (|ncBug| "there is no file name in %1" (list lineObject))))) -@ + +\end{chunk} \section{Messages} @@ -12539,7 +12525,7 @@ msgObject tag -- catagory of msg \calls{msgCreate}{putDatabaseStuff} \calls{msgCreate}{initImPr} \calls{msgCreate}{initToWhere} -<>= +\begin{chunk}{defun msgCreate} (defun |msgCreate| (tag posWTag key argL optPre &rest optAttr) (let (msg) (when (consp key) (setq tag '|old|)) @@ -12550,99 +12536,99 @@ msgObject tag -- catagory of msg (|initToWhere| msg) msg)) -@ +\end{chunk} \defun{getMsgPosTagOb}{getMsgPosTagOb} -<>= +\begin{chunk}{defun getMsgPosTagOb 0} (defun |getMsgPosTagOb| (msg) (elt msg 1)) -@ +\end{chunk} \defun{getMsgKey}{getMsgKey} -<>= +\begin{chunk}{defun getMsgKey 0} (defun |getMsgKey| (msg) (elt msg 2)) -@ +\end{chunk} \defun{getMsgArgL}{getMsgArgL} -<>= +\begin{chunk}{defun getMsgArgL 0} (defun |getMsgArgL| (msg) (elt msg 3)) -@ +\end{chunk} \defun{getMsgPrefix}{getMsgPrefix} -<>= +\begin{chunk}{defun getMsgPrefix 0} (defun |getMsgPrefix| (msg) (elt msg 4)) -@ +\end{chunk} \defun{setMsgPrefix}{setMsgPrefix} -<>= +\begin{chunk}{defun setMsgPrefix 0} (defun |setMsgPrefix| (msg val) (setf (elt msg 4) val)) -@ +\end{chunk} \defun{getMsgText}{getMsgText} -<>= +\begin{chunk}{defun getMsgText 0} (defun |getMsgText| (msg) (elt msg 5)) -@ +\end{chunk} \defun{setMsgText}{setMsgText} -<>= +\begin{chunk}{defun setMsgText 0} (defun |setMsgText| (msg val) (setf (elt msg 5) val)) -@ +\end{chunk} \defun{getMsgPrefix?}{getMsgPrefix?} -<>= +\begin{chunk}{defun getMsgPrefix? 0} (defun |getMsgPrefix?| (msg) (let ((pre (|getMsgPrefix| msg))) (unless (eq pre '|noPre|) pre))) -@ +\end{chunk} \defun{getMsgTag}{getMsgTag} The valid message tags are: line, old, error, warn, bug, unimple, remark, stat, say, debug \calls{getMsgTag}{ncTag} -<>= +\begin{chunk}{defun getMsgTag 0} (defun |getMsgTag| (msg) (|ncTag| msg)) -@ +\end{chunk} \defun{getMsgTag?}{getMsgTag?} \calls{getMsgTag?}{IFCAR} \calls{getMsgTag?}{getMsgTag} -<>= +\begin{chunk}{defun getMsgTag? 0} (defun |getMsgTag?| (|msg|) (ifcar (member (|getMsgTag| |msg|) (list '|line| '|old| '|error| '|warn| '|bug| '|unimple| '|remark| '|stat| '|say| '|debug|)))) -@ +\end{chunk} \defun{line?}{line?} \calls{line?}{getMsgTag} -<>= +\begin{chunk}{defun line?} (defun |line?| (msg) (eq (|getMsgTag| msg) '|line|)) -@ +\end{chunk} \defun{leader?}{leader?} \calls{leader?}{getMsgTag} -<>= +\begin{chunk}{defun leader?} (defun |leader?| (msg) (eq (|getMsgTag| msg) '|leader|)) -@ +\end{chunk} \defun{toScreen?}{toScreen?} \calls{toScreen?}{getMsgToWhere} -<>= +\begin{chunk}{defun toScreen?} (defun |toScreen?| (msg) (not (eq (|getMsgToWhere| msg) '|fileOnly|))) -@ +\end{chunk} \defun{ncSoftError}{ncSoftError} Messages for the USERS of the compiler. @@ -12652,7 +12638,7 @@ Give a message and continue processing. \calls{ncSoftError}{processKeyedError} \calls{ncSoftError}{msgCreate} \usesdollar{ncSoftError}{newcompErrorCount} -<>= +\begin{chunk}{defun ncSoftError} (defun |ncSoftError| (pos erMsgKey erArgL &rest optAttr) (declare (special |$newcompErrorCount|)) (setq |$newcompErrorCount| (+ |$newcompErrorCount| 1)) @@ -12661,7 +12647,7 @@ Give a message and continue processing. (|msgCreate| '|error| pos erMsgKey erArgL "Error" optAttr)))) -@ +\end{chunk} \defun{ncHardError}{ncHardError} The program being compiled is seriously incorrect. @@ -12671,7 +12657,7 @@ Give message and throw to a recovery point. \calls{ncHardError}{msgCreate} \calls{ncHardError}{ncError} \usesdollar{ncHardError}{newcompErrorCount} -<>= +\begin{chunk}{defun ncHardError} (defun |ncHardError| (pos erMsgKey erArgL &rest optAttr) (let (erMsg) (declare (special |$newcompErrorCount|)) @@ -12682,16 +12668,16 @@ Give message and throw to a recovery point. (|msgCreate| '|error| pos erMsgKey erArgL "Error" optAttr))) (|ncError|)))) -@ +\end{chunk} \defun{desiredMsg}{desiredMsg} -<>= +\begin{chunk}{defun desiredMsg 0} (defun |desiredMsg| (erMsgKey &rest optCatFlag) (cond ((null (null optCatFlag)) (car optCatFlag)) (t t))) -@ +\end{chunk} \defun{processKeyedError}{processKeyedError} \calls{processKeyedError}{getMsgTag?} @@ -12702,7 +12688,7 @@ Give message and throw to a recovery point. \calls{processKeyedError}{msgImPr?} \calls{processKeyedError}{msgOutputter} \usesdollar{processKeyedError}{ncMsgList} -<>= +\begin{chunk}{defun processKeyedError} (defun |processKeyedError| (msg) (prog (pre erMsg) (declare (special |$ncMsgList|)) @@ -12716,7 +12702,7 @@ Give message and throw to a recovery point. ((|msgImPr?| msg) (|msgOutputter| msg)) (t (setq |$ncMsgList| (cons msg |$ncMsgList|)))))) -@ +\end{chunk} \defun{msgOutputter}{msgOutputter} \calls{msgOutputter}{getStFromMsg} @@ -12728,7 +12714,7 @@ Give message and throw to a recovery point. \calls{msgOutputter}{toFile?} \calls{msgOutputter}{alreadyOpened?} \usesdollar{msgOutputter}{linelength} -<>= +\begin{chunk}{defun msgOutputter} (defun |msgOutputter| (msg) (let (alreadyOpened shouldFlow st) (declare (special $linelength)) @@ -12741,16 +12727,16 @@ Give message and throw to a recovery point. (when shouldFlow (setq st (|flowSegmentedMsg| st (- $linelength 6) 0))) (setq alreadyOpened (|alreadyOpened?| msg))))) -@ +\end{chunk} \defun{listOutputter}{listOutputter} \calls{listOutputter}{msgOutputter} -<>= +\begin{chunk}{defun listOutputter} (defun |listOutputter| (outputList) (dolist (msg outputList) (|msgOutputter| msg))) -@ +\end{chunk} \defun{getStFromMsg}{getStFromMsg} \calls{getStFromMsg}{getPreStL} @@ -12762,7 +12748,7 @@ Give message and throw to a recovery point. \calls{getStFromMsg}{pname} \calls{getStFromMsg}{getMsgLitSym} \calls{getStFromMsg}{tabbing} -<>= +\begin{chunk}{defun getStFromMsg} (defun |getStFromMsg| (msg) (let (st msgKey posStL preStL) (setq preStL (|getPreStL| (|getMsgPrefix?| msg))) @@ -12780,18 +12766,18 @@ Give message and throw to a recovery point. (cons (|tabbing| msg) (|getMsgText| msg))))))))))) -@ +\end{chunk} \defdollar{preLength} -<>= +\begin{chunk}{initvars} (defvar |$preLength| 11) -@ +\end{chunk} \defun{getPreStL}{getPreStL} \calls{getPreStL}{size} \usesdollar{getPreStL}{preLength} -<>= +\begin{chunk}{defun getPreStL 0} (defun |getPreStL| (optPre) (let (spses extraPlaces) (declare (special |$preLength|)) @@ -12805,7 +12791,7 @@ Give message and throw to a recovery point. (t ""))) (list '|%b| optPre spses ":" '|%d|))))) -@ +\end{chunk} \defun{getPosStL}{getPosStL} \calls{getPosStL}{showMsgPos?} @@ -12817,7 +12803,7 @@ Give message and throw to a recovery point. \calls{getPosStL}{remLine} \calls{getPosStL}{remFile} \usesdollar{getPosStL}{lastPos} -<>= +\begin{chunk}{defun getPosStL} (defun |getPosStL| (msg) (let (printedOrigin printedLineNum printedFileName fullPrintedPos howMuch msgPos) @@ -12854,7 +12840,7 @@ Give message and throw to a recovery point. (cons '|%l| nil))))))) (t "")))))) -@ +\end{chunk} \defun{ppos}{ppos} \calls{ppos}{pfNoPosition?} @@ -12863,7 +12849,7 @@ Give message and throw to a recovery point. \calls{ppos}{pfLinePosn} \calls{ppos}{porigin} \calls{ppos}{pfFileName} -<>= +\begin{chunk}{defun ppos} (defun |ppos| (p) (let (org lpos cpos) (cond @@ -12874,70 +12860,71 @@ Give message and throw to a recovery point. (setq lpos (|pfLinePosn| p)) (setq org (|porigin| (|pfFileName| p))) (list org " " "line" " " lpos))))) - -@ + +\end{chunk} \defun{remFile}{remFile} \calls{remFile}{IFCDR} \calls{remLine}{IFCAR} -<>= +\begin{chunk}{defun remFile} (defun |remFile| (positionList) (ifcdr (ifcdr positionList))) -@ +\end{chunk} \defun{showMsgPos?}{showMsgPos?} \calls{showMsgPos?}{msgImPr?} \calls{showMsgPos?}{leader?} \usesdollar{showMsgPos?}{erMsgToss} -<>= +\begin{chunk}{defun showMsgPos? 0} (defun |showMsgPos?| (msg) (declare (special |$erMsgToss|)) (or |$erMsgToss| (and (null (|msgImPr?| msg)) (null (|leader?| msg))))) -@ +\end{chunk} \defdollar{imPrGuys} -<>= +\begin{chunk}{initvars} (defvar |$imPrGuys| (list '|imPr|)) -@ +\end{chunk} + \defun{msgImPr?}{msgImPr?} \calls{msgImPr?}{getMsgCatAttr} -<>= +\begin{chunk}{defun msgImPr?} (defun |msgImPr?| (msg) (eq (|getMsgCatAttr| msg '|$imPrGuys|) '|imPr|)) -@ +\end{chunk} \defun{getMsgCatAttr}{getMsgCatAttr} \calls{getMsgCatAttr}{ifcdr} \calls{getMsgCatAttr}{qassq} \calls{getMsgCatAttr}{ncAlist} -<>= +\begin{chunk}{defun getMsgCatAttr} (defun |getMsgCatAttr| (msg cat) (ifcdr (qassq cat (|ncAlist| msg)))) -@ +\end{chunk} \defun{getMsgPos}{getMsgPos} \calls{getMsgPos}{getMsgFTTag?} \calls{getMsgPos}{getMsgPosTagOb} -<>= +\begin{chunk}{defun getMsgPos} (defun |getMsgPos| (msg) (if (|getMsgFTTag?| msg) (cadr (|getMsgPosTagOb| msg)) (|getMsgPosTagOb| msg))) -@ +\end{chunk} \defun{getMsgFTTag?}{getMsgFTTag?} \calls{getMsgFTTag?}{ifcar} \calls{getMsgFTTag?}{getMsgPosTagOb} -<>= +\begin{chunk}{defun getMsgFTTag?} (defun |getMsgFTTag?| (msg) (ifcar (member (ifcar (|getMsgPosTagOb| msg)) (list 'from 'to 'fromto)))) -@ +\end{chunk} \defun{decideHowMuch}{decideHowMuch} When printing a msg, we wish not to show pos information that was @@ -12947,7 +12934,7 @@ org prints out the word noposition or console \calls{decideHowMuch}{poPosImmediate?} \calls{decideHowMuch}{poFileName} \calls{decideHowMuch}{poLinePosn} -<>= +\begin{chunk}{defun decideHowMuch} (defun |decideHowMuch| (pos oldPos) (cond ((or (and (|poNopos?| pos) (|poNopos?| oldPos)) @@ -12959,59 +12946,59 @@ org prints out the word noposition or console ((not (equal (|poLinePosn| oldPos) (|poLinePosn| pos))) 'line) (t 'none))) -@ +\end{chunk} \defun{poNopos?}{poNopos?} -<>= +\begin{chunk}{defun poNopos? 0} (defun |poNopos?| (posn) (equal posn (list '|noposition|))) -@ +\end{chunk} \defun{poPosImmediate?}{poPosImmediate?} \calls{poPosImmediate?}{poNopos?} \calls{poPosImmediate?}{lnImmediate?} \calls{poPosImmediate?}{poGetLineObject} -<>= +\begin{chunk}{defun poPosImmediate?} (defun |poPosImmediate?| (txp) (unless (|poNopos?| txp) (|lnImmediate?| (|poGetLineObject| txp)))) -@ +\end{chunk} \defun{poFileName}{poFileName} \calls{poFileName}{lnFileName} \calls{poFileName}{poGetLineObject} -<>= +\begin{chunk}{defun poFileName} (defun |poFileName| (posn) (if posn (|lnFileName| (|poGetLineObject| posn)) (caar posn))) -@ +\end{chunk} \defun{poGetLineObject}{poGetLineObject} -<>= +\begin{chunk}{defun poGetLineObject 0} (defun |poGetLineObject| (posn) (car posn)) -@ +\end{chunk} \defun{poLinePosn}{poLinePosn} \calls{poLinePosn}{lnLocalNum} \calls{poLinePosn}{poGetLineObject} -<>= +\begin{chunk}{defun poLinePosn} (defun |poLinePosn| (posn) (if posn (|lnLocalNum| (|poGetLineObject| posn)) (cdar posn))) -@ +\end{chunk} \defun{listDecideHowMuch}{listDecideHowMuch} \calls{listDecideHowMuch}{poNopos?} \calls{listDecideHowMuch}{poPosImmediate?} \calls{listDecideHowMuch}{poGlobalLinePosn} -<>= +\begin{chunk}{defun listDecideHowMuch} (defun |listDecideHowMuch| (pos oldPos) (cond ((or (and (|poNopos?| pos) (|poNopos?| oldPos)) @@ -13023,35 +13010,35 @@ org prints out the word noposition or console (if (|poPosImmediate?| pos) 'org 'line)) (t 'none))) -@ +\end{chunk} \defun{remLine}{remLine} -<>= +\begin{chunk}{defun remLine 0} (defun |remLine| (positionList) (list (ifcar positionList))) -@ +\end{chunk} \defun{getMsgKey?}{getMsgKey?} \calls{getMsgKey?}{identp} -<>= +\begin{chunk}{defun getMsgKey? 0} (defun |getMsgKey?| (msg) (let ((val (|getMsgKey| msg))) (when (identp val) val))) -@ +\end{chunk} \defun{getMsgLitSym}{getMsgLitSym} \calls{getMsgLitSym}{getMsgKey?} -<>= +\begin{chunk}{defun getMsgLitSym} (defun |getMsgLitSym| (msg) (if (|getMsgKey?| msg) " " "*")) -@ +\end{chunk} \defun{tabbing}{tabbing} \calls{tabbing}{getMsgPrefix?} \usesdollar{tabbing}{preLength} -<>= +\begin{chunk}{defun tabbing} (defun |tabbing| (msg) (let (chPos) (declare (special |$preLength|)) @@ -13059,69 +13046,69 @@ org prints out the word noposition or console (when (|getMsgPrefix?| msg) (setq chPos (- (+ chPos |$preLength|) 1))) (cons '|%t| chPos))) -@ +\end{chunk} \defdollar{toWhereGuys} -<>= +\begin{chunk}{initvars} (defvar |$toWhereGuys| (list '|fileOnly| '|screenOnly|)) -@ +\end{chunk} \defun{getMsgToWhere}{getMsgToWhere} \calls{getMsgToWhere}{getMsgCatAttr} -<>= +\begin{chunk}{defun getMsgToWhere} (defun |getMsgToWhere| (msg) (|getMsgCatAttr| msg '|$toWhereGuys|)) -@ +\end{chunk} \defun{toFile?}{toFile?} \calls{toFile?}{getMsgToWhere} \usesdollar{toFile?}{fn} -<>= +\begin{chunk}{defun toFile?} (defun |toFile?| (msg) (declare (special |$fn|)) (and (consp |$fn|) (not (eq (|getMsgToWhere| msg) '|screenOnly|)))) -@ +\end{chunk} \defun{alreadyOpened?}{alreadyOpened?} \calls{alreadyOpened?}{msgImPr?} -<>= +\begin{chunk}{defun alreadyOpened?} (defun |alreadyOpened?| (msg) (null (|msgImPr?| msg))) -@ +\end{chunk} \defun{setMsgForcedAttrList}{setMsgForcedAttrList} \calls{setMsgForcedAttrList}{setMsgForcedAttr} \calls{setMsgForcedAttrList}{whichCat} -<>= +\begin{chunk}{defun setMsgForcedAttrList} (defun |setMsgForcedAttrList| (msg attrlist) (dolist (attr attrlist) (|setMsgForcedAttr| msg (|whichCat| attr) attr))) -@ +\end{chunk} \defun{setMsgForcedAttr}{setMsgForcedAttr} \calls{setMsgForcedAttr}{setMsgCatlessAttr} \calls{setMsgForcedAttr}{ncPutQ} -<>= +\begin{chunk}{defun setMsgForcedAttr} (defun |setMsgForcedAttr| (msg cat attr) (if (eq cat '|catless|) (|setMsgCatlessAttr| msg attr) (|ncPutQ| msg cat attr))) -@ +\end{chunk} \defdollar{attrCats} -<>= +\begin{chunk}{initvars} (defvar |$attrCats| (list '|$imPrGuys| '|$toWhereGuys| '|$repGuys|)) -@ +\end{chunk} \defun{whichCat}{whichCat} \calls{whichCat}{ListMember?} \usesdollar{whichCat}{attrCats} -<>= +\begin{chunk}{defun whichCat} (defun |whichCat| (attr) (let ((found '|catless|) done) (declare (special |$attrCats|)) @@ -13132,7 +13119,7 @@ org prints out the word noposition or console until done) found)) -@ +\end{chunk} \defun{setMsgCatlessAttr}{setMsgCatlessAttr} \tpdhere{Changed from |catless| to '|catless|} @@ -13140,19 +13127,19 @@ org prints out the word noposition or console \calls{setMsgCatlessAttr}{ifcdr} \calls{setMsgCatlessAttr}{qassq} \calls{setMsgCatlessAttr}{ncAlist} -<>= +\begin{chunk}{defun setMsgCatlessAttr} (defun |setMsgCatlessAttr| (msg attr) (|ncPutQ| msg '|catless| (cons attr (ifcdr (qassq |catless| (|ncAlist| msg)))))) -@ +\end{chunk} \defun{putDatabaseStuff}{putDatabaseStuff} \tpdhere{The variable al is undefined} \calls{putDatabaseStuff}{getMsgInfoFromKey} \calls{putDatabaseStuff}{setMsgUnforcedAttrList} \calls{putDatabaseStuff}{setMsgText} -<>= +\begin{chunk}{defun putDatabaseStuff} (defun |putDatabaseStuff| (msg) (let (attributes text tmp) (setq tmp (|getMsgInfoFromKey| msg)) @@ -13161,7 +13148,7 @@ org prints out the word noposition or console (when attributes (|setMsgUnforcedAttrList| msg al)) (|setMsgText| msg text))) -@ +\end{chunk} \defun{getMsgInfoFromKey}{getMsgInfoFromKey} \calls{getMsgInfoFromKey}{getMsgKey?} @@ -13172,7 +13159,7 @@ org prints out the word noposition or console \calls{getMsgInfoFromKey}{substituteSegmentedMsg} \calls{getMsgInfoFromKey}{getMsgArgL} \usesdollar{getMsgInfoFromKey}{msgDatabaseName} -<>= +\begin{chunk}{defun getMsgInfoFromKey} (defun |getMsgInfoFromKey| (msg) (let (|$msgDatabaseName| attributes tmp msgText dbl msgKey) (declare (special |$msgDatabaseName|)) @@ -13189,58 +13176,59 @@ org prints out the word noposition or console (setq msgText (|substituteSegmentedMsg| msgText (|getMsgArgL| msg))) (list msgText attributes))) -@ +\end{chunk} \defun{setMsgUnforcedAttrList}{setMsgUnforcedAttrList} \calls{setMsgUnforcedAttrList}{setMsgUnforcedAttr} \calls{setMsgUnforcedAttrList}{whichCat} -<>= +\begin{chunk}{defun setMsgUnforcedAttrList} (defun |setMsgUnforcedAttrList| (msg attrlist) (dolist (attr attrlist) (|setMsgUnforcedAttr| msg (|whichCat| attr) attr))) -@ +\end{chunk} \defun{setMsgUnforcedAttr}{setMsgUnforcedAttr} \calls{setMsgUnforcedAttr}{setMsgCatlessAttr} \calls{setMsgUnforcedAttr}{qassq} \calls{setMsgUnforcedAttr}{ncAlist} \calls{setMsgUnforcedAttr}{ncPutQ} -<>= +\begin{chunk}{defun setMsgUnforcedAttr} (defun |setMsgUnforcedAttr| (msg cat attr) (cond ((eq cat '|catless|) (|setMsgCatlessAttr| msg attr)) ((null (qassq cat (|ncAlist| msg))) (|ncPutQ| msg cat attr)))) -@ +\end{chunk} \defdollar{imPrTagGuys} -<>= +\begin{chunk}{initvars} (defvar |$imPrTagGuys| (list '|unimple| '|bug| '|debug| '|say| '|warn|)) -@ +\end{chunk} + \defun{initImPr}{initImPr} \calls{initImPr}{getMsgTag} \calls{initImPr}{setMsgUnforcedAttr} \usesdollar{initImPr}{imPrTagGuys} \usesdollar{initImPr}{erMsgToss} -<>= +\begin{chunk}{defun initImPr} (defun |initImPr| (msg) (declare (special |$imPrTagGuys| |$erMsgToss|)) (when (or |$erMsgToss| (member (|getMsgTag| msg) |$imPrTagGuys|)) (|setMsgUnforcedAttr| msg '|$imPrGuys| '|imPr|))) -@ +\end{chunk} \defun{initToWhere}{initToWhere} \calls{initToWhere}{getMsgCatAttr} \calls{initToWhere}{setMsgUnforcedAttr} -<>= +\begin{chunk}{defun initToWhere} (defun |initToWhere| (msg) (if (member '|trace| (|getMsgCatAttr| msg '|catless|)) (|setMsgUnforcedAttr| msg '|$toWhereGuys| '|screenOnly|))) -@ +\end{chunk} \defun{ncBug}{ncBug} Bug in the compiler: something which shouldn't have happened did. @@ -13250,7 +13238,7 @@ Bug in the compiler: something which shouldn't have happened did. \calls{ncBug}{ncAbort} \usesdollar{ncBug}{nopos} \usesdollar{ncBug}{newcompErrorCount} -<>= +\begin{chunk}{defun ncBug} (defun |ncBug| (erMsgKey erArgL &rest optAttr) (let (erMsg) (declare (special |$nopos| |$newcompErrorCount|)) @@ -13262,7 +13250,7 @@ Bug in the compiler: something which shouldn't have happened did. (break) (|ncAbort|))) -@ +\end{chunk} \defun{processMsgList}{processMsgList} \calls{processMsgList}{erMsgSort} @@ -13273,7 +13261,7 @@ Bug in the compiler: something which shouldn't have happened did. \calls{processMsgList}{listOutputter} \usesdollar{processMsgList}{noRepList} \usesdollar{processMsgList}{outputList} -<>= +\begin{chunk}{defun processMsgList} (defun |processMsgList| (erMsgList lineList) (let (|$noRepList| |$outputList| st globalNumOfLine msgLine) (declare (special |$noRepList| |$outputList|)) @@ -13289,12 +13277,12 @@ Bug in the compiler: something which shouldn't have happened did. (setq st "---------SOURCE-TEXT-&-ERRORS------------------------") (|listOutputter| (reverse |$outputList|)))) -@ +\end{chunk} \defun{erMsgSort}{erMsgSort} \calls{erMsgSort}{erMsgSep} \calls{erMsgSort}{listSort} -<>= +\begin{chunk}{defun erMsgSort} (defun |erMsgSort| (erMsgList) (let (msgWOPos msgWPos tmp) (setq tmp (|erMsgSep| erMsgList)) @@ -13304,21 +13292,21 @@ Bug in the compiler: something which shouldn't have happened did. (setq msgWOPos (reverse msgWOPos)) (append msgWPos msgWOPos))) -@ +\end{chunk} \defun{erMsgCompare}{erMsgCompare} \calls{erMsgCompare}{compareposns} \calls{erMsgCompare}{getMsgPos} -<>= +\begin{chunk}{defun erMsgCompare} (defun |erMsgCompare| (ob1 ob2) (|compareposns| (|getMsgPos| ob2) (|getMsgPos| ob1))) -@ +\end{chunk} \defun{compareposns}{compareposns} \calls{compareposns}{poGlobalLinePosn} \calls{compareposns}{poCharPosn} -<>= +\begin{chunk}{defun compareposns} (defun |compareposns| (a b) (let (c d) (setq c (|poGlobalLinePosn| a)) @@ -13327,12 +13315,12 @@ Bug in the compiler: something which shouldn't have happened did. (not (< (|poCharPosn| a) (|poCharPosn| b))) (not (< c d))))) -@ +\end{chunk} \defun{erMsgSep}{erMsgSep} \calls{erMsgSep}{poNopos?} \calls{erMsgSep}{getMsgPos} -<>= +\begin{chunk}{defun erMsgSep} (defun |erMsgSep| (erMsgList) (let (msgWOPos msgWPos) (dolist (msg erMsgList) @@ -13341,7 +13329,7 @@ Bug in the compiler: something which shouldn't have happened did. (setq msgWPos (cons msg msgWPos)))) (list msgWPos msgWOPos))) -@ +\end{chunk} \defun{makeMsgFromLine}{makeMsgFromLine} \calls{makeMsgFromLine}{getLinePos} @@ -13354,7 +13342,7 @@ Bug in the compiler: something which shouldn't have happened did. \calls{makeMsgFromLine}{char} \calls{makeMsgFromLine}{size} \usesdollar{makeMsgFromLine}{preLength} -<>= +\begin{chunk}{defun makeMsgFromLine} (defun |makeMsgFromLine| (line) (let (localNumOfLine stNum globalNumOfLine textOfLine posOfLine) (declare (special |$preLength|)) @@ -13366,29 +13354,29 @@ Bug in the compiler: something which shouldn't have happened did. (strconc (|rep| #\space (- |$preLength| 7 (size stNum))) stNum)) (list '|line| posOfLine nil nil (strconc "Line" localNumOfLine) textOfLine))) -@ +\end{chunk} \defun{rep}{rep} \tpdhere{This function should be replaced by fillerspaces} -<>= +\begin{chunk}{defun rep 0} (defun |rep| (c n) (if (< 0 n) (make-string n :initial-element (character c)) "")) -@ +\end{chunk} \defun{getLinePos}{getLinePos} -<>= +\begin{chunk}{defun getLinePos 0} (defun |getLinePos| (line) (car line)) -@ +\end{chunk} \defun{getLineText}{getLineText} -<>= +\begin{chunk}{defun getLineText 0} (defun |getLineText| (line) (cdr line)) -@ +\end{chunk} \defun{queueUpErrors}{queueUpErrors} \begin{verbatim} @@ -13415,7 +13403,7 @@ Bug in the compiler: something which shouldn't have happened did. \end{verbatim} \calls{queueUpErrors}{processChPosesForOneLine} \usesdollar{queueUpErrors}{outputList} -<>= +\begin{chunk}{defun queueUpErrors} (DEFUN |queueUpErrors| (|globalNumOfLine| |msgList|) (PROG (|notThisPosMsgs| |notThisLineMsgs| |thisPosMsgs|) (DECLARE (SPECIAL |$outputList|)) @@ -13467,25 +13455,25 @@ Bug in the compiler: something which shouldn't have happened did. (NCONC |notThisPosMsgs| |$outputList|)))) |msgList|)))) -@ +\end{chunk} \defun{thisPosIsLess}{thisPosIsLess} \calls{thisPosIsLess}{poNopos?} \calls{thisPosIsLess}{poGlobalLinePosn} -<>= +\begin{chunk}{defun thisPosIsLess} (defun |thisPosIsLess| (pos num) (unless (|poNopos?| pos) (< (|poGlobalLinePosn| pos) num))) -@ +\end{chunk} \defun{thisPosIsEqual}{thisPosIsEqual} \calls{thisPosIsEqual}{poNopos?} \calls{thisPosIsEqual}{poGlobalLinePosn} -<>= +\begin{chunk}{defun thisPosIsEqual} (defun |thisPosIsEqual| (pos num) (unless (|poNopos?| pos) (equal (|poGlobalLinePosn| pos) num))) -@ +\end{chunk} \defun{redundant}{redundant} \begin{verbatim} @@ -13500,7 +13488,7 @@ redundant(msg,thisPosMsgs) == \calls{redundant}{msgNoRep?} \calls{redundant}{sameMsg?} \usesdollar{redundant}{noRepList} -<>= +\begin{chunk}{defun redundant} (defun |redundant| (msg thisPosMsgs) (prog (found) (declare (special |$noRepList|)) @@ -13521,30 +13509,30 @@ redundant(msg,thisPosMsgs) == (setq |$noRepList| (list msg |$noRepList|)))) (or found (member msg thisPosMsgs)))))) -@ +\end{chunk} \defdollar{repGuys} -<>= +\begin{chunk}{initvars} (defvar |$repGuys| (list '|noRep| '|rep|)) -@ +\end{chunk} \defun{msgNoRep?}{msgNoRep?} \calls{msgNoRep?}{getMsgCatAttr} -<>= +\begin{chunk}{defun msgNoRep?} (defun |msgNoRep?| (msg) (eq (|getMsgCatAttr| msg '|$repGuys|) '|noRep|)) -@ +\end{chunk} \defun{sameMsg?}{sameMsg?} \calls{sameMsg?}{getMsgKey} \calls{sameMsg?}{getMsgArgL} -<>= +\begin{chunk}{defun sameMsg?} (defun |sameMsg?| (msg1 msg2) (and (equal (|getMsgKey| msg1) (|getMsgKey| msg2)) (equal (|getMsgArgL| msg1) (|getMsgArgL| msg2)))) -@ +\end{chunk} \defun{processChPosesForOneLine}{processChPosesForOneLine} \calls{processChPosesForOneLine}{posPointers} @@ -13558,7 +13546,7 @@ redundant(msg,thisPosMsgs) == \calls{processChPosesForOneLine}{size} \calls{processChPosesForOneLine}{makeLeaderMsg} \usesdollar{processChPosesForOneLine}{preLength} -<>= +\begin{chunk}{defun processChPosesForOneLine} (defun |processChPosesForOneLine| (msgList) (let (leaderMsg oldPre posLetter chPosList) (declare (special |$preLength|)) @@ -13573,13 +13561,14 @@ redundant(msg,thisPosMsgs) == (setq leaderMsg (|makeLeaderMsg| chPosList)) (nconc msgList (list leaderMsg)))) -@ +\end{chunk} \defun{poCharPosn}{poCharPosn} -<>= +\begin{chunk}{defun poCharPosn 0} (defun |poCharPosn| (posn) (cdr posn)) -@ + +\end{chunk} \defun{makeLeaderMsg}{makeLeaderMsg} \begin{verbatim} @@ -13594,7 +13583,7 @@ makeLeaderMsg chPosList == \end{verbatim} \usesdollar{makeLeaderMsg}{nopos} \usesdollar{makeLeaderMsg}{preLength} -<>= +\begin{chunk}{defun makeLeaderMsg} (defun |makeLeaderMsg| (chPosList) (let (posLetter posNum oldPos st) (declare (special |$nopos| |$preLength|)) @@ -13619,7 +13608,7 @@ makeLeaderMsg chPosList == (reverse chPosList) nil) (list '|leader| |$nopos| '|nokey| nil nil (list st)))) -@ +\end{chunk} \defun{posPointers}{posPointers} \tpdhere{getMsgFTTag is nonsense} @@ -13628,7 +13617,7 @@ makeLeaderMsg chPosList == \calls{posPointers}{IFCAR} \calls{posPointers}{getMsgPos2} \calls{posPointers}{insertPos} -<>= +\begin{chunk}{defun posPointers} (defun |posPointers| (msgList) (let (posLetterList pos ftPosList posList increment pointers) (setq pointers "ABCDEFGHIJKLMONPQRS") @@ -13649,25 +13638,25 @@ makeLeaderMsg chPosList == (setq increment (+ increment 1))) posLetterList)) -@ +\end{chunk} \defun{getMsgPos2}{getMsgPos2} \calls{getMsgPos2}{getMsgFTTag?} \calls{getMsgPos2}{getMsgPosTagOb} \calls{getMsgPos2}{ncBug} -<>= +\begin{chunk}{defun getMsgPos2} (defun |getMsgPos2| (msg) (if (|getMsgFTTag?| msg) (caddr (|getMsgPosTagOb| msg)) (|ncBug| "not a from to" nil))) -@ +\end{chunk} \defun{insertPos}{insertPos} This function inserts a position in the proper place of a position list. This is used for the 2nd pos of a fromto \calls{insertPos}{done} -<>= +\begin{chunk}{defun insertPos 0} (defun |insertPos| (newPos posList) (let (pos top bot done) (setq bot (cons 0 posList)) @@ -13684,7 +13673,7 @@ This is used for the 2nd pos of a fromto t)))) (cons (cdr (reverse top)) bot))) -@ +\end{chunk} \defun{putFTText}{putFTText} \calls{putFTText}{getMsgFTTag?} @@ -13693,7 +13682,7 @@ This is used for the 2nd pos of a fromto \calls{putFTText}{setMsgText} \calls{putFTText}{getMsgText} \calls{putFTText}{getMsgPos2} -<>= +\begin{chunk}{defun putFTText} (defun |putFTText| (msg chPosList) (let (charMarker2 pos2 markingText charMarker pos tag) (setq tag (|getMsgFTTag?| msg)) @@ -13712,28 +13701,28 @@ This is used for the 2nd pos of a fromto (setq markingText (list "(from " charMarker " up to " charMarker2 ") ")) (|setMsgText| msg (append markingText (|getMsgText| msg))))))) -@ +\end{chunk} \defun{From}{From} This is called from parameter list of nc message functions -<>= +\begin{chunk}{defun From 0} (defun |From| (pos) (list 'from pos)) -@ +\end{chunk} \defun{To}{To} This is called from parameter list of nc message functions -<>= +\begin{chunk}{defun To 0} (defun |To| (pos) (list 'to pos)) -@ +\end{chunk} \defun{FromTo}{FromTo} This is called from parameter list of nc message functions -<>= +\begin{chunk}{defun FromTo 0} (defun |FromTo| (pos1 pos2) (list 'fromto pos1 pos2)) -@ +\end{chunk} \chapter{The Interpreter Syntax} \section{syntax assignment} @@ -13741,7 +13730,7 @@ This is called from parameter list of nc message functions \index{assignment} \index{syntax!assignment} \index{assignment!syntax} -<>= +\begin{chunk}{assignment.help} Immediate, Delayed, and Multiple Assignment @@ -13894,14 +13883,14 @@ The variable y now has the previous value of x. There is no syntactic form for multiple delayed assignments. -@ +\end{chunk} \section{syntax blocks} \label{blocks} \index{blocks} \index{syntax!blocks} \index{blocks!syntax} -<>= +\begin{chunk}{blocks.help} ==================================================================== Blocks ==================================================================== @@ -13986,7 +13975,7 @@ o )help suchthat o )help parallel o )help lists -@ +\end{chunk} \footnote{ \fnref{if} \fnref{repeat} @@ -14001,7 +13990,7 @@ o )help lists \index{clef} \index{syntax!clef} \index{clef!syntax} -<>= +\begin{chunk}{clef.help} Entering printable keys generally inserts new text into the buffer (unless in overwrite mode, see below). Other special keys can be used to modify @@ -14047,14 +14036,14 @@ DOS and ANSI terminal arrow key sequences are recognized, and act like: left : same as ^B right : same as ^F -@ +\end{chunk} \section{syntax collection} \label{collection} \index{collection} \index{syntax!collection} \index{collection!syntax} -<>= +\begin{chunk}{collection.help} ==================================================================== Collection -- Creating Lists and Streams with Iterators ==================================================================== @@ -14122,14 +14111,14 @@ of terms computed and displayed for power series. For the purposes of these examples we have use this system command to display fewer than ten terms. -@ +\end{chunk} \section{syntax for} \label{for} \index{for} \index{syntax!for} \index{for!syntax} -<>= +\begin{chunk}{for.help} ==================================================================== for loops ==================================================================== @@ -14331,14 +14320,14 @@ This displays each of the factors of 2400000: [factor= 5, exponent= 5] Type: Void -@ +\end{chunk} \section{syntax if} \label{if} \index{if} \index{syntax!if} \index{if!syntax} -<>= +\begin{chunk}{if.help} ==================================================================== If-then-else ==================================================================== @@ -14436,14 +14425,14 @@ These are both equivalent to the following: if i > 0 then (j := sin(i * pi()); exp(j + 1/j)) else (j := cos(i * 0.5 * pi()); log(abs(j)**5 + i)) -@ +\end{chunk} \section{syntax iterate} \label{iterate} \index{iterate} \index{syntax!iterate} \index{iterate!syntax} -<>= +\begin{chunk}{iterate.help} ==================================================================== iterate in loops ==================================================================== @@ -14467,14 +14456,14 @@ Display the even integers from 2 to 5: 4 Type: Void -@ +\end{chunk} \section{syntax leave} \label{leave} \index{leave} \index{syntax!leave} \index{leave!syntax} -<>= +\begin{chunk}{leave.help} ==================================================================== leave in loops ==================================================================== @@ -14546,14 +14535,14 @@ and both the block and the loop will terminate. This is one of the reasons why both "=>" and leave are provided. Using a while clase with the "=>" lets you simulate the action of leave. -@ +\end{chunk} \section{syntax parallel} \label{parallel} \index{parallel} \index{syntax!parallel} \index{parallel!syntax} -<>= +\begin{chunk}{parallel.help} ==================================================================== parallel iteration ==================================================================== @@ -14656,14 +14645,14 @@ Here are useful rules for composing loop expressions: global (or in an outer scope) or defined in the modified for clause or any for clause to the left. -@ +\end{chunk} \section{syntax repeat} \label{repeat} \index{repeat} \index{syntax!repeat} \index{repeat!syntax} -<>= +\begin{chunk}{repeat.help} ==================================================================== Repeat Loops ==================================================================== @@ -14847,7 +14836,7 @@ o )help suchthat o )help parallel o )help lists -@ +\end{chunk} \footnote{ \fnref{blocks} \fnref{if} @@ -14862,7 +14851,7 @@ o )help lists \index{suchthat} \index{syntax!suchthat} \index{suchthat!syntax} -<>= +\begin{chunk}{suchthat.help} ==================================================================== Such that predicates ==================================================================== @@ -14901,11 +14890,11 @@ Any variable in an outer scope can be part of the predicate. [3,1] Type: Void -@ +\end{chunk} \section{syntax syntax} \label{syntax} -<>= +\begin{chunk}{syntax.help} The Axiom Interactive Language has the following features documented here. @@ -14927,14 +14916,14 @@ where feature is one of: suchthat -- suchthat predicates while -- while loops -@ +\end{chunk} \section{syntax while} \label{while} \index{while} \index{syntax!while} \index{while!syntax} -<>= +\begin{chunk}{while.help} ==================================================================== while loops ==================================================================== @@ -15005,7 +14994,7 @@ even if the predicate in any while clauses are not false. [2,3] Type: Void -@ +\end{chunk} \chapter{Abstract Syntax Trees (ptrees)} \begin{verbatim} @@ -15031,7 +15020,7 @@ where head is either an id or (id . alist) \calls{tokConstruct}{ifcar} \calls{tokConstruct}{pfNoPosition?} \calls{tokConstruct}{ncPutQ} -<>= +\begin{chunk}{defun tokConstruct} (defun |tokConstruct| (head token &rest position) (let (result) (setq result (cons head token)) @@ -15042,62 +15031,62 @@ where head is either an id or (id . alist) (t (|ncPutQ| result '|posn| (car position)) result))) (t result)))) -@ +\end{chunk} \defun{pfAbSynOp}{Return a part of a node} \calls{pfAbSynOp}{ifcar} -<>= +\begin{chunk}{defun pfAbSynOp} (defun |pfAbSynOp| (form) (let (hd) (setq hd (car form)) (or (ifcar hd) hd))) -@ +\end{chunk} \defun{pfAbSynOp?}{Compare a part of a node} \calls{pfAbSynOp?}{eqcar} -<>= +\begin{chunk}{defun pfAbSynOp?} (defun |pfAbSynOp?| (form op) (let (hd) (setq hd (car form)) (or (eq hd op) (eqcar hd op)))) -@ +\end{chunk} \defun{pfNoPosition?}{pfNoPosition?} \calls{pfNoPosition?}{poNoPosition?} -<>= +\begin{chunk}{defun pfNoPosition?} (defun |pfNoPosition?| (pos) (|poNoPosition?| pos)) -@ +\end{chunk} \defun{poNoPosition?}{poNoPosition?} \calls{poNoPosition?}{eqcar} -<>= +\begin{chunk}{defun poNoPosition? 0} (defun |poNoPosition?| (pos) (eqcar pos '|noposition|)) -@ +\end{chunk} \defun{tokType}{tokType} \calls{tokType}{ncTag} -<>= +\begin{chunk}{defun tokType} (defun |tokType| (x) (|ncTag| x)) -@ +\end{chunk} \defun{tokPart}{tokPart} -<>= +\begin{chunk}{defun tokPart 0} (defun |tokPart| (x) (cdr x)) -@ +\end{chunk} \defun{tokPosn}{tokPosn} \calls{tokPosn}{qassq} \calls{tokPosn}{ncAlist} \calls{tokPosn}{pfNoPosition} -<>= +\begin{chunk}{defun tokPosn} (defun |tokPosn| (x) (let (a) (setq a (qassq '|posn| (|ncAlist| x))) @@ -15105,23 +15094,23 @@ where head is either an id or (id . alist) (a (cdr a)) (t (|pfNoPosition|))))) -@ +\end{chunk} \defun{pfNoPosition}{pfNoPosition} \calls{pfNoPosition}{poNoPosition} -<>= +\begin{chunk}{defun pfNoPosition} (defun |pfNoPosition| () (|poNoPosition|)) -@ +\end{chunk} \defun{poNoPosition}{poNoPosition} \usesdollar{poNoPosition}{nopos} -<>= +\begin{chunk}{defun poNoPosition 0} (defun |poNoPosition| () (declare (special |$nopos|)) |$nopos|) -@ +\end{chunk} \chapter{Attributed Structures} For objects which are pairs where the CAR field is either just a tag @@ -15132,7 +15121,7 @@ Pick off the tag \calls{ncTag}{ncBug} \calls{ncTag}{qcar} \calls{ncTag}{identp} -<>= +\begin{chunk}{defun ncTag} (defun |ncTag| (x) (cond ((null (consp x)) (|ncBug| 's2cb0031 nil)) @@ -15143,7 +15132,7 @@ Pick off the tag ((null (consp x)) (|ncBug| 's2cb0031 nil)) (t (qcar x)))))) -@ +\end{chunk} \defun{ncAlist}{ncAlist} Pick off the property list @@ -15151,7 +15140,7 @@ Pick off the property list \calls{ncAlist}{qcar} \calls{ncAlist}{identp} \calls{ncAlist}{qcdr} -<>= +\begin{chunk}{defun ncAlist} (defun |ncAlist| (x) (cond ((null (consp x)) (|ncBug| 's2cb0031 nil)) @@ -15162,14 +15151,14 @@ Pick off the property list ((null (consp x)) (|ncBug| 's2cb0031 nil)) (t (qcdr x)))))) -@ +\end{chunk} \defun{ncEltQ}{ncEltQ} Get the entry for key k on x's association list \calls{ncEltQ}{qassq} \calls{ncEltQ}{ncAlist} \calls{ncEltQ}{ncBug} -<>= +\begin{chunk}{defun ncEltQ} (defun |ncEltQ| (x k) (let (r) (setq r (qassq k (|ncAlist| x))) @@ -15177,7 +15166,7 @@ Get the entry for key k on x's association list ((null r) (|ncBug| 's2cb0007 (list k))) (t (cdr r))))) -@ +\end{chunk} \defun{ncPutQ}{ncPutQ} \begin{verbatim} @@ -15200,7 +15189,7 @@ Get the entry for key k on x's association list \calls{ncPutQ}{qassq} \calls{ncPutQ}{ncAlist} \calls{ncPutQ}{ncTag} -<>= +\begin{chunk}{defun ncPutQ} (defun |ncPutQ| (x k v) (let (r) (cond @@ -15229,7 +15218,7 @@ Get the entry for key k on x's association list (rplacd r v))) v)))) -@ +\end{chunk} \chapter{System Command Handling} The system commands are the top-level commands available in Axiom @@ -15284,12 +15273,12 @@ See:\\ \section{Variables Used} \defdollar{systemCommands} -<>= +\begin{chunk}{initvars} (defvar |$systemCommands| nil) -@ +\end{chunk} -<>= +\begin{chunk}{postvars} (eval-when (eval load) (setq |$systemCommands| '( @@ -15332,37 +15321,37 @@ See:\\ (|zsystemdevelopment| . |interpreter|) ))) -@ +\end{chunk} \defdollar{syscommands} This table is used to look up a symbol to see if it might be a command. -<>= +\begin{chunk}{initvars} (defvar $syscommands nil) -@ +\end{chunk} -<>= +\begin{chunk}{postvars} (eval-when (eval load) (setq $syscommands (mapcar #'car |$systemCommands|))) -@ +\end{chunk} \defdollar{noParseCommands} This is a list of the commands which have their arguments passed verbatim. Certain functions, such as the lisp function need to be able to handle all kinds of input that will not be acceptable to the interpreter. -<>= +\begin{chunk}{initvars} (defvar |$noParseCommands| nil) -@ +\end{chunk} -<>= +\begin{chunk}{postvars} (eval-when (eval load) (setq |$noParseCommands| '(|boot| |copyright| |credits| |fin| |lisp| |pquit| |quit| |synonym| |system| |trademark| ))) -@ +\end{chunk} \section{Functions} \defun{handleNoParseCommands}{handleNoParseCommands} @@ -15411,7 +15400,7 @@ new system commands provided you handle the argument parsing. \usesdollar{doSystemCommand}{tokenCommands} \usesdollar{doSystemCommand}{noParseCommands} \uses{doSystemCommand}{line} -<>= +\begin{chunk}{defun doSystemCommand} (defun |doSystemCommand| (string) (let (line tok unab optionList) (declare (special line |$tokenCommands| |$noParseCommands|)) @@ -15440,11 +15429,11 @@ new system commands provided you handle the argument parsing. nil))))) (t nil)))))) -@ +\end{chunk} \defun{splitIntoOptionBlocks}{Split block into option block} \calls{splitIntoOptionBlocks}{stripSpaces} -<>= +\begin{chunk}{defun splitIntoOptionBlocks} (defun |splitIntoOptionBlocks| (str) (let (inString block (blockStart 0) (parenCount 0) blockList) (dotimes (i (1- (|#| str))) @@ -15466,13 +15455,13 @@ new system commands provided you handle the argument parsing. (setq blockList (cons (|stripSpaces| (subseq str blockStart)) blockList)) (nreverse blockList))) -@ +\end{chunk} \defun{handleTokensizeSystemCommands}{Tokenize a system command} \calls{handleTokensizeSystemCommands}{dumbTokenize} \calls{handleTokensizeSystemCommands}{tokTran} \calls{handleTokensizeSystemCommands}{systemCommand} -<>= +\begin{chunk}{defun handleTokensizeSystemCommands} (defun |handleTokensizeSystemCommands| (unabr optionList) (declare (ignore unabr)) (let (parcmd) @@ -15482,7 +15471,7 @@ new system commands provided you handle the argument parsing. optionLIst)) (when parcmd (|systemCommand| parcmd)))) -@ +\end{chunk} \defun{systemCommand}{Handle system commands} You can type ``)?'' and see trivial help information. @@ -15496,7 +15485,7 @@ You can type ``)? compile'' and see compiler related information \usesdollar{systemCommand}{systemCommands} \usesdollar{systemCommand}{syscommands} \usesdollar{systemCommand}{CategoryFrame} -<>= +\begin{chunk}{defun systemCommand} (defun |systemCommand| (cmd) (let (|$options| |$e| op argl options fun) (declare (special |$options| |$e| |$systemCommands| $syscommands @@ -15515,7 +15504,7 @@ You can type ``)? compile'' and see compiler related information '|commandUserLevelError|)) (funcall fun argl))))) -@ +\end{chunk} \defun{commandsForUserLevel}{Select commands matching this user level} The \verb|$UserLevel| variable contains one of three values: @@ -15524,7 +15513,7 @@ is used to select a subset of commands from the list stored in \verb|$systemCommands|, representing all of the commands that are valid for this level. \calls{commandsForUserLevel}{satisfiesUserLevel} -<>= +\begin{chunk}{defun commandsForUserLevel} (defun |commandsForUserLevel| (arg) (let (c) (dolist (pair arg) @@ -15532,29 +15521,29 @@ valid for this level. (setq c (cons (car pair) c)))) (nreverse c))) -@ +\end{chunk} \defun{commandError}{No command begins with this string} \calls{commandError}{commandErrorMessage} -<>= +\begin{chunk}{defun commandError} (defun |commandError| (x u) (|commandErrorMessage| '|command| x u)) -@ +\end{chunk} \defun{optionError}{No option begins with this string} \calls{optionError}{commandErrorMessage} -<>= +\begin{chunk}{defun optionError} (defun |optionError| (x u) (|commandErrorMessage| '|option| x u)) -@ +\end{chunk} \defdollar{oldline} -<>= +\begin{chunk}{initvars} (defvar $oldline nil "used to output command lines") -@ +\end{chunk} \defun{commandErrorMessage}{No command/option begins with this string} \calls{commandErrorMessage}{commandAmbiguityError} @@ -15562,7 +15551,7 @@ valid for this level. \calls{commandErrorMessage}{terminateSystemCommand} \usesdollar{commandErrorMessage}{oldline} \uses{commandErrorMessage}{line} -<>= +\begin{chunk}{defun commandErrorMessage} (defun |commandErrorMessage| (kind x u) (declare (special $oldline line)) (setq $oldline line) @@ -15572,30 +15561,30 @@ valid for this level. (|sayKeyedMsg| 'S2IZ0008 (list kind x)) (|terminateSystemCommand|)))) -@ +\end{chunk} \defun{optionUserLevelError}{Option not available at this user level} \calls{optionUserLevelError}{userLevelErrorMessage} -<>= +\begin{chunk}{defun optionUserLevelError} (defun |optionUserLevelError| (x u) (|userLevelErrorMessage| '|option| x u)) -@ +\end{chunk} \defun{commandUserLevelError}{Command not available at this user level} \calls{commandUserLevelError}{userLevelErrorMessage} -<>= +\begin{chunk}{defun commandUserLevelError} (defun |commandUserLevelError| (x u) (|userLevelErrorMessage| '|command| x u)) -@ +\end{chunk} \defun{userLevelErrorMessage}{Command not available error message} \calls{userLevelErrorMessage}{commandAmbiguityError} \calls{userLevelErrorMessage}{sayKeyedMsg} \calls{userLevelErrorMessage}{terminateSystemCommand} \usesdollar{userLevelErrorMessage}{UserLevel} -<>= +\begin{chunk}{defun userLevelErrorMessage} (defun |userLevelErrorMessage| (kind x u) (declare (special |$UserLevel|)) (if u @@ -15604,11 +15593,11 @@ valid for this level. (|sayKeyedMsg| 'S2IZ0007 (list |$UserLevel| kind)) (|terminateSystemCommand|)))) -@ +\end{chunk} \defun{satisfiesUserLevel}{satisfiesUserLevel} \usesdollar{satisfiesUserLevel}{UserLevel} -<>= +\begin{chunk}{defun satisfiesUserLevel 0} (defun |satisfiesUserLevel| (x) (declare (special |$UserLevel|)) (cond @@ -15618,12 +15607,12 @@ valid for this level. ((eq |$UserLevel| '|compiler|) nil) (t t))) -@ +\end{chunk} \defun{hasOption}{hasOption} \calls{hasOption}{stringPrefix?} \calls{hasOption}{pname} -<>= +\begin{chunk}{defun hasOption} (defun |hasOption| (al opt) (let ((optPname (pname opt)) found) (loop for pair in al do @@ -15631,48 +15620,48 @@ valid for this level. until found) found)) -@ +\end{chunk} \defun{terminateSystemCommand}{terminateSystemCommand} \calls{terminateSystemCommand}{tersyscommand} -<>= +\begin{chunk}{defun terminateSystemCommand} (defun |terminateSystemCommand| nil (tersyscommand)) -@ +\end{chunk} \defun{tersyscommand}{Terminate a system command} \calls{tersyscommand}{spadThrow} -<>= +\begin{chunk}{defun tersyscommand} (defun tersyscommand () (fresh-line) (setq chr 'endoflinechr) (setq tok 'end_unit) (|spadThrow|)) -@ +\end{chunk} \defun{commandAmbiguityError}{commandAmbiguityError} \calls{commandAmbiguityError}{sayKeyedMsg} \calls{commandAmbiguityError}{sayMSG} \calls{commandAmbiguityError}{bright} \calls{commandAmbiguityError}{terminateSystemCommand} -<>= +\begin{chunk}{defun commandAmbiguityError} (defun |commandAmbiguityError| (kind x u) (|sayKeyedMsg| 's2iz0009 (list kind x)) (dolist (a u) (|sayMSG| (cons " " (|bright| a)))) (|terminateSystemCommand|)) -@ +\end{chunk} \defun{getParserMacroNames}{getParserMacroNames} The \verb|$pfMacros| is a list of all of the user-defined macros. \usesdollar{getParserMacroNames}{pfMacros} -<>= +\begin{chunk}{defun getParserMacroNames 0} (defun |getParserMacroNames| () (declare (special |$pfMacros|)) (remove-duplicates (mapcar #'car |$pfMacros|))) -@ +\end{chunk} \defun{clearParserMacro}{clearParserMacro} Note that if a macro is defined twice this will clear the last instance. @@ -15693,13 +15682,13 @@ Thus: \calls{clearParserMacro}{assoc} \calls{clearParserMacro}{remalist} \usesdollar{clearParserMacro}{pfMacros} -<>= +\begin{chunk}{defun clearParserMacro} (defun |clearParserMacro| (macro) (declare (special |$pfMacros|)) (when (ifcdr (|assoc| macro |$pfMacros|)) (setq |$pfMacros| (remalist |$pfMacros| macro)))) -@ +\end{chunk} \defun{displayMacro}{displayMacro} \calls{displayMacro}{isInterpMacro} @@ -15709,7 +15698,7 @@ Thus: \calls{displayMacro}{object2String} \calls{displayMacro}{mathprint} \usesdollar{displayMacro}{op} -<>= +\begin{chunk}{defun displayMacro} (defun |displayMacro| (name) (let (|$op| m body args) (declare (special |$op|)) @@ -15730,7 +15719,7 @@ Thus: (t (cons '|Tuple| args)))) (|mathprint| (cons 'map (cons (cons args body) nil))))))) -@ +\end{chunk} \defun{displayWorkspaceNames}{displayWorkspaceNames} \calls{displayWorkspaceNames}{getInterpMacroNames} @@ -15741,7 +15730,7 @@ Thus: \calls{displayWorkspaceNames}{sayAsManyPerLineAsPossible} \calls{displayWorkspaceNames}{sayBrightly} \calls{displayWorkspaceNames}{setdifference} -<>= +\begin{chunk}{defun displayWorkspaceNames} (defun |displayWorkspaceNames| () (let (pmacs names imacs) (setq imacs (|getInterpMacroNames|)) @@ -15756,7 +15745,7 @@ Thus: (|sayMessage| "Names of System-Defined Objects in the Workspace:") (|sayAsManyPerLineAsPossible| (mapcar #'|object2String| imacs))))) -@ +\end{chunk} \defun{getWorkspaceNames}{getWorkspaceNames} \begin{verbatim} @@ -15769,7 +15758,7 @@ Thus: \calls{getWorkspaceNames}{nmsort} \calls{getWorkspaceNames}{exit} \usesdollar{getWorkspaceNames}{InteractiveFrame} -<>= +\begin{chunk}{defun getWorkspaceNames} (defun |getWorkspaceNames| () (PROG (n) (declare (special |$InteractiveFrame|)) @@ -15796,7 +15785,7 @@ Thus: (SETQ G166322 (CONS n G166322)))))))))))))) -@ +\end{chunk} \defun{fixObjectForPrinting}{fixObjectForPrinting} The \verb|$msgdbPrims| variable is set to: @@ -15809,7 +15798,7 @@ The \verb|$msgdbPrims| variable is set to: \calls{fixObjectForPrinting}{strconc} \calls{fixObjectForPrinting}{pname} \usesdollar{fixObjectForPrinting}{msgdbPrims} -<>= +\begin{chunk}{defun fixObjectForPrinting} (defun |fixObjectForPrinting| (v) (let (vp) (declare (special |$msgdbPrims|)) @@ -15819,7 +15808,7 @@ The \verb|$msgdbPrims| variable is set to: ((|member| vp |$msgdbPrims|) (strconc "\\" (pname vp))) (t v)))) -@ +\end{chunk} \defun{displayProperties,sayFunctionDeps}{displayProperties,sayFunctionDeps} \begin{verbatim} @@ -15909,7 +15898,7 @@ The \verb|$msgdbPrims| variable is set to: \calls{displayProperties,sayFunctionDeps}{bright} \usesdollar{displayProperties,sayFunctionDeps}{dependeeAlist} \usesdollar{displayProperties,sayFunctionDeps}{dependentAlist} -<>= +\begin{chunk}{defun displayProperties,sayFunctionDeps} (defun |displayProperties,sayFunctionDeps| (x) (prog (dependents dependees msg) (declare (special |$dependeeAlist| |$dependentAlist|)) @@ -15943,7 +15932,7 @@ The \verb|$msgdbPrims| variable is set to: (exit (|sayMSG| (append (nreverse msg) (cons '|%d| nil))))) nil)))))) -@ +\end{chunk} \defun{displayValue}{displayValue} \calls{displayValue}{sayMSG} @@ -15963,7 +15952,7 @@ The \verb|$msgdbPrims| variable is set to: \calls{displayValue}{objMode} \usesdollar{displayValue}{op} \usesdollar{displayValue}{EmptyMode} -<>= +\begin{chunk}{defun displayValue} (defun |displayValue| (|$op| u omitVariableNameIfTrue) (declare (special |$op|)) (let (expr op rhs label labmode) @@ -15996,7 +15985,7 @@ The \verb|$msgdbPrims| variable is set to: (cons (|outputFormat| expr (|objMode| u)) nil))))))) nil)))))) -@ +\end{chunk} \defun{displayType}{displayType} \calls{displayType}{sayMSG} @@ -16006,7 +15995,7 @@ The \verb|$msgdbPrims| variable is set to: \calls{displayType}{objMode} \calls{displayType}{concat} \usesdollar{displayType}{op} -<>= +\begin{chunk}{defun displayType} (defun |displayType| (|$op| u omitVariableNameIfTrue) (declare (special |$op|) (ignore omitVariableNameIfTrue)) (let (type) @@ -16024,19 +16013,19 @@ The \verb|$msgdbPrims| variable is set to: (cons ": " type))))) nil)))) -@ +\end{chunk} \defun{getAndSay}{getAndSay} \calls{getAndSay}{getI} \calls{getAndSay}{sayMSG} -<>= +\begin{chunk}{defun getAndSay} (defun |getAndSay| (v prop) (let (val) (if (setq val (|getI| v prop)) (|sayMSG| (cons '| | (cons val (cons '|%l| nil)))) (|sayMSG| (cons '| none| (cons '|%l| nil)))))) -@ +\end{chunk} \defun{displayProperties}{displayProperties} \calls{displayProperties}{getInterpMacroNames} @@ -16074,7 +16063,7 @@ The \verb|$msgdbPrims| variable is set to: \usesdollar{displayProperties}{dependeeAlist} \usesdollar{displayProperties}{frameMessages} \usesdollar{displayProperties}{interpreterFrameName} -<>= +\begin{chunk}{defun displayProperties} (defun |displayProperties| (option al) (let (|$dependentAlist| |$dependeeAlist| tmp1 opt imacs pmacs macros vl pl tmp2 vone prop val propsSeen) @@ -16189,25 +16178,25 @@ The \verb|$msgdbPrims| variable is set to: (|sayKeyedMsg| 'S2IZ0068 (cons option nil))))))))) (|terminateSystemCommand|))))) -@ +\end{chunk} \defun{displayParserMacro}{displayParserMacro} \calls{displayParserMacro}{pfPrintSrcLines} \usesdollar{displayParserMacro}{pfMacros} -<>= +\begin{chunk}{defun displayParserMacro} (defun |displayParserMacro| (m) (let ((m (assq m |$pfMacros|))) (declare (special |$pfMacros|)) (when m (|pfPrintSrcLines| (caddr m))))) -@ +\end{chunk} \defun{displayCondition}{displayCondition} \calls{displayCondition}{bright} \calls{displayCondition}{sayBrightly} \calls{displayCondition}{concat} \calls{displayCondition}{pred2English} -<>= +\begin{chunk}{defun displayCondition} (defun |displayCondition| (v condition giveVariableIfNil) (let (varPart condPart) (when giveVariableIfNil (setq varPart (cons '| of| (|bright| v)))) @@ -16215,7 +16204,7 @@ The \verb|$msgdbPrims| variable is set to: (|sayBrightly| (|concat| '| condition| varPart '|: | (|pred2English| condPart))))) -@ +\end{chunk} \defun{interpFunctionDepAlists}{interpFunctionDepAlists} \calls{interpFunctionDepAlists}{putalist} @@ -16225,7 +16214,7 @@ The \verb|$msgdbPrims| variable is set to: \usesdollar{interpFunctionDepAlists}{dependeeAlist} \usesdollar{interpFunctionDepAlists}{dependentAlist} \usesdollar{interpFunctionDepAlists}{InteractiveFrame} -<>= +\begin{chunk}{defun interpFunctionDepAlists} (defun |interpFunctionDepAlists| () (let (|$e|) (declare (special |$e| |$dependeeAlist| |$dependentAlist| @@ -16246,14 +16235,14 @@ The \verb|$msgdbPrims| variable is set to: (|getFlag| '|$dependencies|)))) -@ +\end{chunk} \defun{displayModemap}{displayModemap} \calls{displayModemap}{bright} \calls{displayModemap}{sayBrightly} \calls{displayModemap}{concat} \calls{displayModemap}{formatSignature} -<>= +\begin{chunk}{defun displayModemap} (defun |displayModemap| (v val giveVariableIfNil) (labels ( (g (v mm giveVariableIfNil) @@ -16268,7 +16257,7 @@ The \verb|$msgdbPrims| variable is set to: (|sayBrightly| (|concat| prefix (|formatSignature| signature))))))) (mapcar #'(lambda (x) (g v x giveVariableIfNil)) val))) -@ +\end{chunk} \defun{displayMode}{displayMode} \calls{displayMode}{bright} @@ -16276,7 +16265,7 @@ The \verb|$msgdbPrims| variable is set to: \calls{displayMode}{sayBrightly} \calls{displayMode}{concat} \calls{displayMode}{prefix2String} -<>= +\begin{chunk}{defun displayMode} (defun |displayMode| (v mode giveVariableIfNil) (let (varPart) (when mode @@ -16286,11 +16275,11 @@ The \verb|$msgdbPrims| variable is set to: (|concat| '| Declared type or mode| varPart '|: | (|prefix2String| mode)))))) -@ +\end{chunk} \defun{dumbTokenize}{Split into tokens delimted by spaces} \calls{dumbTokenize}{stripSpaces} -<>= +\begin{chunk}{defun dumbTokenize} (defun |dumbTokenize| (str) (let (inString token (tokenStart 0) previousSpace tokenList) (dotimes (i (1- (|#| str))) @@ -16309,11 +16298,11 @@ The \verb|$msgdbPrims| variable is set to: (setq tokenList (cons (|stripSpaces| (subseq str tokenStart)) tokenList)) (nreverse tokenList))) -@ +\end{chunk} \defun{tokTran}{Convert string tokens to their proper type} \calls{tokTran}{isIntegerString} -<>= +\begin{chunk}{defun tokTran} (defun |tokTran| (tok) (let (tmp) (if (stringp tok) @@ -16324,22 +16313,22 @@ The \verb|$msgdbPrims| variable is set to: (t (intern tok))) tok))) -@ +\end{chunk} \defun{isIntegerString}{Is the argument string an integer?} -<>= +\begin{chunk}{defun isIntegerString 0} (defun |isIntegerString| (tok) (multiple-value-bind (int len) (parse-integer tok :junk-allowed t) (when (and int (= len (length tok))) int))) -@ +\end{chunk} \defun{handleParsedSystemCommands}{Handle parsed system commands} \calls{handleParsedSystemCommands}{dumbTokenize} \calls{handleParsedSystemCommands}{parseSystemCmd} \calls{handleParsedSystemCommands}{tokTran} \calls{handleParsedSystemCommands}{systemCommand} -<>= +\begin{chunk}{defun handleParsedSystemCommands} (defun |handleParsedSystemCommands| (unabr optionList) (declare (ignore unabr)) (let (restOptionList parcmd trail) @@ -16350,14 +16339,14 @@ The \verb|$msgdbPrims| variable is set to: (mapcar #'(lambda (tok) (|tokTran| tok)) opt)) restOptionList)) (|systemCommand| (cons parcmd trail))))) -@ +\end{chunk} \defun{parseSystemCmd}{Parse a system command} \calls{parseSystemCmd}{tokTran} \calls{parseSystemCmd}{stripSpaces} \calls{parseSystemCmd}{parseFromString} \calls{parseSystemCmd}{dumbTokenize} -<>= +\begin{chunk}{defun parseSystemCmd} (defun |parseSystemCmd| (opt) (let (spaceIndex) (if (setq spaceIndex (search " " opt)) @@ -16366,12 +16355,12 @@ The \verb|$msgdbPrims| variable is set to: (|parseFromString| (|stripSpaces| (subseq opt spaceIndex)))) (mapcar #'|tokTran| (|dumbTokenize| opt))))) -@ +\end{chunk} \defun{getFirstWord}{Get first word in a string} \calls{getFirstWord}{subseq} \calls{getFirstWord}{stringSpaces} -<>= +\begin{chunk}{defun getFirstWord} (defun |getFirstWord| (string) (let (spaceIndex) (setq spaceIndex (search " " string)) @@ -16379,7 +16368,7 @@ The \verb|$msgdbPrims| variable is set to: (|stripSpaces| (subseq string 0 spaceIndex)) string))) -@ +\end{chunk} \defun{unAbbreviateKeyword}{Unabbreviate keywords in commands} \calls{unAbbreviateKeyword}{selectOptionLC} @@ -16389,7 +16378,7 @@ The \verb|$msgdbPrims| variable is set to: \usesdollar{unAbbreviateKeyword}{currentLine} \usesdollar{unAbbreviateKeyword}{syscommands} \uses{unAbbreviateKeyword}{line} -<>= +\begin{chunk}{defun unAbbreviateKeyword} (defun |unAbbreviateKeyword| (x) (let (xp) (declare (special |$systemCommands| |$currentLine| $syscommands line)) @@ -16402,20 +16391,20 @@ The \verb|$msgdbPrims| variable is set to: (|selectOption| xp (|commandsForUserLevel| |$systemCommands|) '|commandUserLevelError|))) -@ +\end{chunk} \defun{commandErrorIfAmbiguous}{The command is ambiguous error} \calls{commandErrorIfAmbiguous}{commandAmbiguityError} \usesdollar{commandErrorIfAmbiguous}{oldline} \uses{commandErrorIfAmbiguous}{line} -<>= +\begin{chunk}{defun commandErrorIfAmbiguous} (defun |commandErrorIfAmbiguous| (x u) (declare (special $oldline line)) (when u (setq $oldline line) (|commandAmbiguityError| '|command| x u))) -@ +\end{chunk} \calls{handleNoParseCommands}{stripSpaces} \calls{handleNoParseCommands}{nplisp} @@ -16426,7 +16415,7 @@ The \verb|$msgdbPrims| variable is set to: \calls{handleNoParseCommands}{npsynonym} \calls{handleNoParseCommands}{member} \calls{handleNoParseCommands}{concat} -<>= +\begin{chunk}{defun handleNoParseCommands} (defun |handleNoParseCommands| (unab string) (let (spaceindex funname) (setq string (|stripSpaces| string)) @@ -16456,50 +16445,50 @@ The \verb|$msgdbPrims| variable is set to: (setq funname (intern (concat "np" (string unab)))) (funcall funname (subseq string (1+ spaceindex))))))) -@ +\end{chunk} \defun{stripSpaces}{Remove the spaces surrounding a string} \tpdhere{This should probably be a macro or eliminated} -<>= +\begin{chunk}{defun stripSpaces 0} (defun |stripSpaces| (str) (string-trim '(#\space) str)) -@ +\end{chunk} \defun{stripLisp}{Remove the lisp command prefix} -<>= +\begin{chunk}{defun stripLisp 0} (defun |stripLisp| (str) (if (string= (subseq str 0 4) "lisp") (subseq str 4) str)) -@ +\end{chunk} \defun{nplisp}{Handle the )lisp command} \usesdollar{nplisp}{ans} -<>= +\begin{chunk}{defun nplisp 0} (defun |nplisp| (str) (declare (special |$ans|)) (setq |$ans| (eval (read-from-string str))) (format t "~&Value = ~S~%" |$ans|)) -@ +\end{chunk} \defun{npboot}{The )boot command is no longer supported} \tpdhere{Remove all boot references from top level} -<>= +\begin{chunk}{defun npboot 0} (defun |npboot| (str) (declare (ignore str)) (format t "The )boot command is no longer supported~%")) -@ +\end{chunk} \defun{npsystem}{Handle the )system command} Note that unAbbreviateKeyword returns the word ``system'' for unknown words so we have to search for this case. This complication may never arrive in practice. \calls{npsystem}{sayKeyedMsg} -<>= +\begin{chunk}{defun npsystem} (defun |npsystem| (unab str) (let (spaceIndex sysPart) (setq spaceIndex (search " " str)) @@ -16511,16 +16500,16 @@ in practice. (obey (subseq str (1+ spaceIndex))) (|sayKeyedMsg| 'S2IZ0080 (list sysPart))))))) -@ +\end{chunk} \defun{npsynonym}{Handle the )synonym command} \calls{npsynonym}{npProcessSynonym} -<>= +\begin{chunk}{defun npsynonym} (defun |npsynonym| (unab str) (declare (ignore unab)) (|npProcessSynonym| str)) -@ +\end{chunk} \defun{npProcessSynonym}{Handle the synonym system command} \calls{npProcessSynonym}{printSynonyms} @@ -16528,7 +16517,7 @@ in practice. \calls{npProcessSynonym}{putalist} \calls{npProcessSynonym}{terminateSystemCommand} \usesdollar{npProcessSynonym}{CommandSynonymAlist} -<>= +\begin{chunk}{defun npProcessSynonym} (defun |npProcessSynonym| (str) (let (pair) (declare (special |$CommandSynonymAlist|)) @@ -16541,7 +16530,7 @@ in practice. (setq |$CommandSynonymAlist| (cons pair nil)))) (|terminateSystemCommand|))) -@ +\end{chunk} \defun{printSynonyms}{printSynonyms} \calls{printSynonyms}{centerAndHighlight} @@ -16552,7 +16541,7 @@ in practice. \calls{printSynonyms}{printLabelledList} \usesdollar{printSynonyms}{CommandSynonymAlist} \usesdollar{printSynonyms}{linelength} -<>= +\begin{chunk}{defun printSynonyms} (defun |printSynonyms| (patterns) (prog (ls t1) (declare (special |$CommandSynonymAlist| $linelength)) @@ -16566,7 +16555,7 @@ in practice. (|function| car))) (|printLabelledList| ls "user" "synonyms" ")" patterns))) -@ +\end{chunk} \defun{printLabelledList}{Print a list of each matching synonym} The prefix goes before each element on each side of the list, eg, ")" @@ -16577,7 +16566,7 @@ The prefix goes before each element on each side of the list, eg, ")" \calls{printLabelledList}{sayBrightly} \calls{printLabelledList}{concat} \calls{printLabelledList}{fillerSpaces} -<>= +\begin{chunk}{defun printLabelledList} (defun |printLabelledList| (ls label1 label2 prefix patterns) (let (comm syn wid) (if (null ls) @@ -16604,18 +16593,18 @@ The prefix goes before each element on each side of the list, eg, ")" " " prefix comm))) (|sayBrightly| ""))))) -@ +\end{chunk} \defdollar{tokenCommands} This is a list of the commands that expect the interpreter to parse their arguments. Thus the history command expects that Axiom will have tokenized and validated the input before calling the history function. -<>= +\begin{chunk}{initvars} (defvar |$tokenCommands| nil) -@ +\end{chunk} -<>= +\begin{chunk}{postvars} (eval-when (eval load) (setq |$tokenCommands| '( |abbreviations| @@ -16646,26 +16635,27 @@ tokenized and validated the input before calling the history function. |zsystemdevelopment| ))) -@ +\end{chunk} \defdollar{InitialCommandSynonymAlist} Axiom can create ``synonyms'' for commands. We create an initial table of synonyms which are in common use. -<>= +\begin{chunk}{initvars} (defvar |$InitialCommandSynonymAlist| nil) -@ +\end{chunk} + \defun{axiomVersion}{Print the current version information} \uses{axiomVersion}{*yearweek*} \uses{axiomVersion}{*build-version*} -<>= +\begin{chunk}{defun axiomVersion 0} (defun axiomVersion () (declare (special *build-version* *yearweek*)) (concatenate 'string "Axiom " *build-version* " built on " *yearweek*)) -@ +\end{chunk} -<>= +\begin{chunk}{postvars} (eval-when (eval load) (setq |$InitialCommandSynonymAlist| '( @@ -16720,21 +16710,22 @@ of synonyms which are in common use. (|ws| . "what synonyms") ))) -@ +\end{chunk} + \defdollar{CommandSynonymAlist} The actual list of synonyms is initialized to be the same as the above initial list of synonyms. The user synonyms that are added during a session are pushed onto this list for later lookup. -<>= +\begin{chunk}{initvars} (defvar |$CommandSynonymAlist| nil) -@ +\end{chunk} -<>= +\begin{chunk}{postvars} (eval-when (eval load) (setq |$CommandSynonymAlist| (copy-alist |$InitialCommandSynonymAlist|))) -@ +\end{chunk} \defun{ncloopCommand}{ncloopCommand} The \$systemCommandFunction is set in SpadInterpretStream @@ -16751,7 +16742,7 @@ for processing \verb|)read| of input files. \calls{ncloopCommand}{ncloopInclude1} \callsdollar{ncloopCommand}{systemCommandFunction} \usesdollar{ncloopCommand}{systemCommandFunction} -<>= +\begin{chunk}{defun ncloopCommand} (defun |ncloopCommand| (line n) (let (a) (declare (special |$systemCommandFunction|)) @@ -16761,27 +16752,27 @@ for processing \verb|)read| of input files. (funcall |$systemCommandFunction| line) n)))) -@ +\end{chunk} \defun{ncloopPrefix?}{ncloopPrefix?} If we find the prefix string in the whole string starting at position zero we return the remainder of the string without the leading prefix. -<>= +\begin{chunk}{defun ncloopPrefix? 0} (defun |ncloopPrefix?| (prefix whole) (when (eql (search prefix whole) 0) (subseq whole (length prefix)))) -@ +\end{chunk} \defun{selectOptionLC}{selectOptionLC} \calls{selectOptionLC}{selectOption} \calls{selectOptionLC}{downcase} \calls{selectOptionLC}{object2Identifier} -<>= +\begin{chunk}{defun selectOptionLC} (defun |selectOptionLC| (x l errorFunction) (|selectOption| (downcase (|object2Identifier| x)) l errorFunction)) -@ +\end{chunk} \defun{selectOption}{selectOption} \calls{selectOption}{member} @@ -16791,7 +16782,7 @@ we return the remainder of the string without the leading prefix. \calls{selectOption}{pairp} \calls{selectOption}{qcdr} \calls{selectOption}{qcar} -<>= +\begin{chunk}{defun selectOption} (defun |selectOption| (x l errorfunction) (let (u y) (cond @@ -16812,11 +16803,11 @@ we return the remainder of the string without the leading prefix. (errorfunction (funcall errorfunction x u)) (t nil)))))) -@ +\end{chunk} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{abbreviations help page} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -<>= +\begin{chunk}{abbreviations.help} ==================================================================== A.2. )abbreviation ==================================================================== @@ -16887,16 +16878,16 @@ from the system: Also See: o )compile -@ +\end{chunk} \section{Functions} \defun{abbreviations}{abbreviations} \calls{abbreviations}{abbreviationsSpad2Cmd} -<>= +\begin{chunk}{defun abbreviations} (defun |abbreviations| (l) (|abbreviationsSpad2Cmd| l)) -@ +\end{chunk} \defun{abbreviationsSpad2Cmd}{abbreviationsSpad2Cmd} \calls{abbreviationsSpad2Cmd}{listConstructorAbbreviations} \calls{abbreviationsSpad2Cmd}{abbreviation?} @@ -16915,7 +16906,7 @@ o )compile \calls{abbreviationsSpad2Cmd}{qcar} \calls{abbreviationsSpad2Cmd}{qcdr} \usesdollar{abbreviationsSpad2Cmd}{options} -<>= +\begin{chunk}{defun abbreviationsSpad2Cmd} (defun |abbreviationsSpad2Cmd| (arg) (let (abopts quiet opt key type constructor t2 a b al) (declare (special |$options|)) @@ -16967,7 +16958,7 @@ o )compile (unless quiet (|sayKeyedMsg| 's2iz0001 (list a type (|opOf| b))))))))))) -@ +\end{chunk} \defun{listConstructorAbbreviations}{listConstructorAbbreviations} \calls{listConstructorAbbreviations}{upcase} @@ -16975,7 +16966,7 @@ o )compile \calls{listConstructorAbbreviations}{string2id-n} \calls{listConstructorAbbreviations}{whatSpad2Cmd} \calls{listConstructorAbbreviations}{sayKeyedMsg} -<>= +\begin{chunk}{defun listConstructorAbbreviations} (defun |listConstructorAbbreviations| () (let (x) (setq x (upcase (|queryUserKeyedMsg| 's2iz0056 nil))) @@ -16986,12 +16977,12 @@ o )compile (|whatSpad2Cmd| '(|packages|))) (|sayKeyedMsg| 's2iz0057 nil)))) -@ +\end{chunk} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{boot help page} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -<>= +\begin{chunk}{boot.help} ==================================================================== A.3. )boot ==================================================================== @@ -17018,7 +17009,7 @@ o )lisp o )set o )system -@ +\end{chunk} \footnote{ \fnref{fin} \fnref{lisp} @@ -17035,7 +17026,7 @@ verbatim. This will eventually result in a call to the function %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{browse help page} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -<>= +\begin{chunk}{browse.help} User Level Required: development @@ -17048,7 +17039,7 @@ Command Description: This command is used by Axiom system users to start the Axiom top level loop listening for browser connections. -@ +\end{chunk} \section{Overview} The Axiom book on the help browser is a complete rewrite of the hyperdoc mechanism. There are several components that were needed @@ -17224,7 +17215,7 @@ Axiom supplies the arguments as a list. \calls{browse}{loadLib} \calls{browse}{AxiomServer} \calls{browse}{AXSERV;axServer;IMV;2} -<>= +\begin{chunk}{defun browse} (defun |browse| (socket) (let (axserv browser) (if socket @@ -17238,7 +17229,7 @@ Axiom supplies the arguments as a list. (|AXSERV;axServer;IMV;2| socket (cons #'|AXSERV;multiServ;SeV;3| axserv) axserv)))) -@ +\end{chunk} Now we have to bolt it into Axiom. This involves two lookups. We create the lisp pair @@ -17256,7 +17247,7 @@ if the token is a command. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{cd help page} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -<>= +\begin{chunk}{cd.help} ==================================================================== A.4. )cd ==================================================================== @@ -17290,7 +17281,7 @@ o )library o )read o )spool -@ +\end{chunk} \footnote{ \fnref{edit} \fnref{history} @@ -17304,7 +17295,7 @@ o )spool %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{clear help page} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -<>= +\begin{chunk}{clear.help} ==================================================================== A.6. )clear ==================================================================== @@ -17385,7 +17376,7 @@ o )display o )history o )undo -@ +\end{chunk} \footnote{ \fnref{display} \fnref{history} @@ -17393,25 +17384,25 @@ o )undo \section{Variables Used} \defdollar{clearOptions} -<>= +\begin{chunk}{initvars} (defvar |$clearOptions| '(|modes| |operations| |properties| |types| |values|)) -@ +\end{chunk} \section{Functions} \defun{clear}{clear} \calls{clear}{clearSpad2Cmd} -<>= +\begin{chunk}{defun clear} (defun |clear| (l) (|clearSpad2Cmd| l)) -@ +\end{chunk} \defdollar{clearExcept} -<>= +\begin{chunk}{initvars} (defvar |$clearExcept| nil) -@ +\end{chunk} \defun{clearSpad2Cmd}{clearSpad2Cmd} TPDHERE: Note that this function also seems to parse out )except @@ -17427,7 +17418,7 @@ TPDHERE: Note that this function also seems to parse out )except \usesdollar{clearSpad2Cmd}{clearExcept} \usesdollar{clearSpad2Cmd}{options} \usesdollar{clearSpad2Cmd}{clearOptions} -<>= +\begin{chunk}{defun clearSpad2Cmd} (defun |clearSpad2Cmd| (l) (let (|$clearExcept| opt optlist arg) (declare (special |$clearExcept| |$options| |$clearOptions|)) @@ -17472,7 +17463,7 @@ TPDHERE: Note that this function also seems to parse out )except (|clearCmdParts| l) (|updateCurrentInterpreterFrame|))))))) -@ +\end{chunk} \defun{clearCmdSortedCaches}{clearCmdSortedCaches} \calls{clearCmdSortedCaches}{compiledLookupCheck} @@ -17480,7 +17471,7 @@ TPDHERE: Note that this function also seems to parse out )except \usesdollar{clearCmdSortedCaches}{lookupDefaults} \usesdollar{clearCmdSortedCaches}{Void} \usesdollar{clearCmdSortedCaches}{ConstructorCache} -<>= +\begin{chunk}{defun clearCmdSortedCaches} (defun |clearCmdSortedCaches| () (let (|$lookupDefaults| domain pair) (declare (special |$lookupDefaults| |$Void| |$ConstructorCache|)) @@ -17495,13 +17486,13 @@ TPDHERE: Note that this function also seems to parse out )except (setq pair (|compiledLookupCheck| '|clearCache| (list |$Void|) domain)) (spadcall pair)))) -@ +\end{chunk} \defdollar{functionTable} -<>= +\begin{chunk}{initvars} (defvar |$functionTable| nil) -@ +\end{chunk} \defun{clearCmdCompletely}{clearCmdCompletely} \calls{clearCmdCompletely}{clearCmdAll} @@ -17519,7 +17510,7 @@ TPDHERE: Note that this function also seems to parse out )except \usesdollar{clearCmdCompletely}{functionTable} \usesdollar{clearCmdCompletely}{existingFiles} \usesdollar{clearCmdCompletely}{localExposureDataDefault} -<>= +\begin{chunk}{defun clearCmdCompletely} (defun |clearCmdCompletely| () (declare (special |$localExposureData| |$xdatabase| |$CatOfCatDatabase| |$DomOfCatDatabase| |$JoinOfCatDatabase| |$JoinOfDomDatabase| @@ -17542,7 +17533,7 @@ TPDHERE: Note that this function also seems to parse out )except (reclaim) (|sayKeyedMsg| 's2iz0015 nil)) -@ +\end{chunk} \defun{clearCmdAll}{clearCmdAll} \calls{clearCmdAll}{clearCmdSortedCaches} @@ -17562,7 +17553,7 @@ TPDHERE: Note that this function also seems to parse out )except \usesdollar{clearCmdAll}{frameMessages} \usesdollar{clearCmdAll}{interpreterFrameName} \usesdollar{clearCmdAll}{currentLine} -<>= +\begin{chunk}{defun clearCmdAll} (defun |clearCmdAll| () (declare (special |$frameRecord| |$previousBindings| |$variableNumberAlist| |$InteractiveFrame| |$useInternalHistoryTable| |$internalHistoryTable| @@ -17585,16 +17576,16 @@ TPDHERE: Note that this function also seems to parse out )except (|sayKeyedMsg| 's2iz0011 (list |$interpreterFrameName|)) (|sayKeyedMsg| 's2iz0012 nil))) -@ +\end{chunk} \defun{clearMacroTable}{clearMacroTable} \usesdollar{clearMacroTable}{pfMacros} -<>= +\begin{chunk}{defun clearMacroTable 0} (defun |clearMacroTable| () (declare (special |$pfMacros|)) (setq |$pfMacros| nil)) -@ +\end{chunk} \defun{clearCmdExcept}{clearCmdExcept} Clear all the options except the argument. @@ -17602,7 +17593,7 @@ Clear all the options except the argument. \calls{clearCmdExcept}{object2String} \calls{clearCmdExcept}{clearCmdParts} \usesdollar{clearCmdExcept}{clearOptions} -<>= +\begin{chunk}{defun clearCmdExcept} (defun |clearCmdExcept| (arg) (let ((opt (car arg)) (vl (cdr arg))) (declare (special |$clearOptions|)) @@ -17610,7 +17601,7 @@ Clear all the options except the argument. (unless (|stringPrefix?| (|object2String| opt) (|object2String| option)) (|clearCmdParts| (cons option vl)))))) -@ +\end{chunk} \defun{clearCmdParts}{clearCmdParts} \calls{clearCmdParts}{selectOptionLC} @@ -17642,7 +17633,7 @@ Clear all the options except the argument. \usesdollar{clearCmdParts}{e} \usesdollar{clearCmdParts}{InteractiveFrame} \usesdollar{clearCmdParts}{clearOptions} -<>= +\begin{chunk}{defun clearCmdParts} (defun |clearCmdParts| (arg) (let (|$e| (opt (car arg)) option pmacs imacs (vl (cdr arg)) p1 lm prop p2) (declare (special |$e| |$InteractiveFrame| |$clearOptions|)) @@ -17702,12 +17693,12 @@ Clear all the options except the argument. (rplacd p2 nil)))))) nil)))) -@ +\end{chunk} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{close help page} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -<>= +\begin{chunk}{close.help} ==================================================================== A.5. )close ==================================================================== @@ -17746,7 +17737,7 @@ Also See: o )quit o )pquit -@ +\end{chunk} \footnote{ \fnref{quit} \fnref{pquit}} @@ -17758,13 +17749,13 @@ Returns the number of active scratchpad clients \calls{queryClients}{sockGetInt} \usesdollar{queryClients}{SessionManager} \usesdollar{queryClients}{QueryClients} -<>= +\begin{chunk}{defun queryClients} (defun |queryClients| () (declare (special |$SessionManager| |$QueryClients|)) (|sockSendInt| |$SessionManager| |$QueryClients|) (|sockGetInt| |$SessionManager|)) -@ +\end{chunk} \defun{close}{close} \calls{close}{throwKeyedMsg} @@ -17780,7 +17771,7 @@ Returns the number of active scratchpad clients \usesdollar{close}{CloseClient} \usesdollar{close}{currentFrameNum} \usesdollar{close}{options} -<>= +\begin{chunk}{defun close} (defun |close| (args) (declare (ignore args)) (let (numClients opt fullopt quiet x) @@ -17812,12 +17803,12 @@ Returns the number of active scratchpad clients (setq x (upcase (|queryUserKeyedMsg| 's2iz0072 nil))) (when (member (string2id-n x 1) '(yes y)) (bye))))))))) -@ +\end{chunk} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{compile help page} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -<>= +\begin{chunk}{compile.help} ==================================================================== A.7. )compile ==================================================================== @@ -17931,7 +17922,7 @@ o )abbreviation o )edit o )library -@ +\end{chunk} \footnote{ \fnref{abbreviation} \fnref{edit} @@ -17940,16 +17931,16 @@ o )library \section{Functions} \defvar{/editfile} -<>= +\begin{chunk}{initvars} (defvar /editfile nil) -@ +\end{chunk} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{copyright help page} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -<>= +\begin{chunk}{copyright.help} The term Axiom, in the field of computer algebra software, along with AXIOM and associated images are common-law trademarks. While the software license allows copies, the @@ -18204,26 +18195,26 @@ Portions Copyright (c) 2003-2010 Jocelyn Guidry Portions Copyright (c) 2001-2010 Timothy Daly -@ +\end{chunk} \section{Functions} \defun{copyright}{copyright} \calls{copyright}{obey} \calls{copyright}{concat} \calls{copyright}{getenviron} -<>= +\begin{chunk}{defun copyright} (defun |copyright| () (obey (concat "cat " (getenviron "AXIOM") "/doc/spadhelp/copyright.help"))) -@ +\end{chunk} \defun{trademark}{trademark} -<>= +\begin{chunk}{defun trademark 0} (defun |trademark| () (format t "The term Axiom, in the field of computer algebra software, ~%") (format t "along with AXIOM and associated images are common-law ~%") (format t "trademarks. While the software license allows copies, the ~%") (format t "trademarks may only be used when referring to this project ~%")) -@ +\end{chunk} This command is in the list of \verb|$noParseCommands| \ref{noParseCommands} which means that its arguments are passed @@ -18238,12 +18229,12 @@ verbatim. This will eventually result in a call to the function \section{Functions} \defun{credits}{credits} \uses{credits}{credits} -<>= +\begin{chunk}{defun credits 0} (defun |credits| () (declare (special credits)) (mapcar #'(lambda (x) (princ x) (terpri)) credits)) -@ +\end{chunk} This command is in the list of \verb|$noParseCommands| \ref{noParseCommands} which means that its arguments are passed @@ -18253,7 +18244,7 @@ verbatim. This will eventually result in a call to the function %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{describe help page} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -<>= +\begin{chunk}{describe.help} ==================================================================== )describe ==================================================================== @@ -18284,14 +18275,14 @@ or package requested. If 'internal' is requested, then the internal format of the domain or package is described. Categories do not have an internal representation. -@ +\end{chunk} \defdollar{describeOptions} The current value of \$describeOptions is -<>= +\begin{chunk}{initvars} (defvar $describeOptions '(|category| |domain| |package|)) -@ +\end{chunk} \section{Functions} \defun{describe}{Print comment strings from algebra libraries} @@ -18299,11 +18290,11 @@ This trivial function satisfies the standard pattern of making a user command match the name of the function which implements the command. That command immediatly invokes a ``Spad2Cmd'' version. \calls{describe}{describespad2cmd} -<>= +\begin{chunk}{defun describe} (defun |describe| (l) (describeSpad2Cmd l)) -@ +\end{chunk} \defun{describeSpad2Cmd}{describeSpad2Cmd} The describe command prints cleaned-up comment strings from the algebra @@ -18328,7 +18319,7 @@ in the Category, Domain, or Package source code. \usesdollar{describeSpad2Cmd}{e} \usesdollar{describeSpad2Cmd}{EmptyEnvironment} \usesdollar{describeSpad2Cmd}{describeOptions} -<>= +\begin{chunk}{defun describeSpad2Cmd} (defun describeSpad2Cmd (l) (labels ( (fullname (arg) @@ -18352,10 +18343,10 @@ in the Category, Domain, or Package source code. (mapcar #'(lambda (x) (format nil "~% ~a" x)) $describeOptions) (format nil "~% or abbreviations thereof"))))))) -@ +\end{chunk} \defun{cleanline}{cleanline} -<>= +\begin{chunk}{defun cleanline} (defun cleanline (line) (labels ( (replaceInLine (thing other line) @@ -18430,10 +18421,10 @@ in the Category, Domain, or Package source code. (setq line (addSpaces str line))) (reflowParagraph line))) -@ +\end{chunk} \defun{flatten}{flatten} -<>= +\begin{chunk}{defun flatten 0} (defun flatten (x) (labels ( (rec (x acc) @@ -18443,12 +18434,12 @@ in the Category, Domain, or Package source code. (t (rec (car x) (rec (cdr x) acc)))))) (rec x nil))) -@ +\end{chunk} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{display help page} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -<>= +\begin{chunk}{display.help} ==================================================================== A.8. )display ==================================================================== @@ -18521,7 +18512,7 @@ o )set o )show o )what -@ +\end{chunk} \footnote{ \fnref{clear} \fnref{history} @@ -18531,12 +18522,12 @@ o )what \defdollar{displayOptions} The current value of \$displayOptions is -<>= +\begin{chunk}{initvars} (defvar |$displayOptions| '(|abbreviations| |all| |macros| |modes| |names| |operations| |properties| |types| |values|)) -@ +\end{chunk} \section{Functions} \defun{display}{display} @@ -18544,11 +18535,11 @@ This trivial function satisfies the standard pattern of making a user command match the name of the function which implements the command. That command immediatly invokes a ``Spad2Cmd'' version. \calls{display}{displayspad2cmd} -<>= +\begin{chunk}{defun display} (defun |display| (l) (displaySpad2Cmd l)) -@ +\end{chunk} \subsection{displaySpad2Cmd} We process the options to the command and call the appropriate @@ -18576,7 +18567,7 @@ and tell the user what options are available. \usesdollar{displaySpad2Cmd}{e} \usesdollar{displaySpad2Cmd}{EmptyEnvironment} \usesdollar{displaySpad2Cmd}{displayOptions} -<>= +\begin{chunk}{defun displaySpad2Cmd} (defun displaySpad2Cmd (l) (let ((|$e| |$EmptyEnvironment|) (opt (car l)) (vl (cdr l)) option) (declare (special |$e| |$EmptyEnvironment| |$displayOptions|)) @@ -18608,12 +18599,12 @@ and tell the user what options are available. (mapcar #'(lambda (x) (format nil "~% ~a" x)) |$displayOptions|) (format nil "~% or abbreviations thereof")))))) -@ +\end{chunk} \defun{abbQuery}{abbQuery} \calls{abbQuery}{getdatabase} \calls{abbQuery}{sayKeyedMsg} -<>= +\begin{chunk}{defun abbQuery} (defun |abbQuery| (x) (let (abb) (cond @@ -18624,7 +18615,7 @@ and tell the user what options are available. (t (|sayKeyedMsg| 's2iz0003 (list x)))))) -@ +\end{chunk} \defun{displayOperations}{displayOperations} This function takes a list of operation names. If the list is null we query the user to see if they want all operations printed. Otherwise @@ -18632,7 +18623,7 @@ we print the information for the requested symbols. \calls{displayOperations}{reportOpSymbol} \calls{displayOperations}{yesanswer} \calls{displayOperations}{sayKeyedMsg} -<>= +\begin{chunk}{defun displayOperations} (defun |displayOperations| (l) (if l (dolist (op l) (|reportOpSymbol| op)) @@ -18640,7 +18631,7 @@ we print the information for the requested symbols. (dolist (op (|allOperations|)) (|reportOpSymbol| op)) (|sayKeyedMsg| 's2iz0059 nil)))) -@ +\end{chunk} \defun{yesanswer}{yesanswer} This is a trivial function to simplify the logic of displaySpad2Cmd. If the user didn't supply an argument to the )display op command @@ -18649,12 +18640,12 @@ displayed. If the answer is either Y or YES we return true else nil. \calls{yesanswer}{string2id-n} \calls{yesanswer}{upcase} \calls{yesanswer}{queryUserKeyedMsg} -<>= +\begin{chunk}{defun yesanswer} (defun yesanswer () (member (string2id-n (upcase (|queryUserKeyedMsg| 's2iz0058 nil)) 1) '(y yes))) -@ +\end{chunk} \defun{displayMacros}{displayMacros} \calls{displayMacros}{getInterpMacroNames} @@ -18666,7 +18657,7 @@ displayed. If the answer is either Y or YES we return true else nil. \calls{displayMacros}{seq} \calls{displayMacros}{exit} \calls{displayMacros}{displayMacro} -<>= +\begin{chunk}{defun displayMacros} (defun |displayMacros| (names) (let (imacs pmacs macros first) (setq imacs (|getInterpMacroNames|)) @@ -18714,7 +18705,7 @@ displayed. If the answer is either Y or YES we return true else nil. ((|member| macro pmacs) '|iterate|))))) nil)))) -@ +\end{chunk} \defun{sayExample}{sayExample} This function expects 2 arguments, the documentation string and @@ -18760,7 +18751,7 @@ splitting them up at the delimiter. If there is only one then we clean it up and print it. \calls{sayexample}{cleanupline} \calls{sayexample}{sayNewLine} -<>= +\begin{chunk}{defun sayExample} (defun sayExample (docstring) (let (line point) (when (setq point (search "spad{X}" docstring)) @@ -18774,7 +18765,7 @@ If there is only one then we clean it up and print it. (|sayNewLine|) (|sayNewLine|)))) -@ +\end{chunk} \defun{cleanupLine}{cleanupLine} This function expects example lines in internal format that has been @@ -18801,7 +18792,7 @@ We remove all of the \verb|spad{...}| delimiters which will occur around other spad variables. Technically we should search recursively for the matching delimiter rather than the next brace but the problem does not arise in practice. -<>= +\begin{chunk}{defun cleanupLine 0} (defun cleanupLine (line) (do ((mark (search "{}" line) (search "{}" line))) ((null mark)) @@ -18821,12 +18812,12 @@ next brace but the problem does not arise in practice. (setq line (concatenate 'string left mid right)))) line) -@ +\end{chunk} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{edit help page} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -<>= +\begin{chunk}{edit.help} ==================================================================== A.9. )edit ==================================================================== @@ -18871,7 +18862,7 @@ o )system o )compile o )read -@ +\end{chunk} \footnote{ \fnref{system} \fnref{read}} @@ -18879,10 +18870,10 @@ o )read \section{Functions} \defun{edit}{edit} \calls{edit}{editSpad2Cmd} -<>= +\begin{chunk}{defun edit} (defun |edit| (l) (|editSpad2Cmd| l)) -@ +\end{chunk} \defun{editSpad2Cmd}{editSpad2Cmd} \calls{editSpad2Cmd}{pathname} @@ -18893,7 +18884,7 @@ o )read \calls{editSpad2Cmd}{editFile} \calls{editSpad2Cmd}{updateSourceFiles} \uses{editSpad2Cmd}{/editfile} -<>= +\begin{chunk}{defun editSpad2Cmd} (defun |editSpad2Cmd| (l) (let (olddir filetypes ll rc) (declare (special /editfile)) @@ -18918,14 +18909,14 @@ o )read (|updateSourceFiles| l) rc)) -@ +\end{chunk} \defun{editFile}{Implement the )edit command} \calls{editFile}{strconc} \calls{editFile}{namestring} \calls{editFile}{pathname} \calls{editFile}{obey} -<>= +\begin{chunk}{defun editFile} (defun |editFile| (file) (cond ((member (intern "WIN32" (find-package 'keyword)) *features*) @@ -18934,7 +18925,7 @@ o )read (obey (strconc "$AXIOM/lib/SPADEDIT " (|namestring| (|pathname| file))))))) -@ +\end{chunk} \defun{updateSourceFiles}{updateSourceFiles} \calls{updateSourceFiles}{pathname} @@ -18945,7 +18936,7 @@ o )read \calls{updateSourceFiles}{pathnameTypeId} \calls{updateSourceFiles}{insert} \usesdollar{updateSourceFiles}{sourceFiles} -<>= +\begin{chunk}{defun updateSourceFiles} (defun |updateSourceFiles| (arg) (declare (special |$sourceFiles|)) (setq arg (|pathname| arg)) @@ -18955,12 +18946,12 @@ o )read (setq |$sourceFiles| (|insert| arg |$sourceFiles|))) arg) -@ +\end{chunk} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{fin help page} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -<>= +\begin{chunk}{fin.help} ==================================================================== A.10. )fin ==================================================================== @@ -18981,7 +18972,7 @@ Also See: o )pquit o )quit -@ +\end{chunk} \footnote{ \fnref{pquit} \fnref{quit}} @@ -18989,12 +18980,12 @@ o )quit \defun{fin}{Exit from the interpreter to lisp} \throws{fin}{spad-reader} \uses{fin}{eof} -<>= +\begin{chunk}{defun fin 0} (defun |fin| () (setq *eof* t) (throw 'spad_reader nil)) -@ +\end{chunk} \section{Functions} @@ -19006,7 +18997,7 @@ verbatim. This will eventually result in a call to the function %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{frame help page} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -<>= +\begin{chunk}{frame.help} ==================================================================== A.11. )frame ==================================================================== @@ -19099,7 +19090,7 @@ Also See: o )history o )set -@ +\end{chunk} \footnote{ \fnref{history} \fnref{set}} @@ -19172,65 +19163,65 @@ These could be macros but we wish to export them to the API code in the algebra so we keep them as functions. \subsection{0th Frame Component -- frameName} \defun{frameName}{frameName} -<>= +\begin{chunk}{defun frameName 0} (defun frameName (frame) (car frame)) -@ +\end{chunk} \subsection{1st Frame Component -- frameInteractive} -<>= +\begin{chunk}{defun frameInteractive 0} (defun frameInteractive (frame) (nth 1 frame)) -@ +\end{chunk} \subsection{2nd Frame Component -- frameIOIndex} -<>= +\begin{chunk}{defun frameIOIndex 0} (defun frameIOIndex (frame) (nth 2 frame)) -@ +\end{chunk} \subsection{3rd Frame Component -- frameHiFiAccess} -<>= +\begin{chunk}{defun frameHiFiAccess 0} (defun frameHiFiAccess (frame) (nth 3 frame)) -@ +\end{chunk} \subsection{4th Frame Component -- frameHistList} -<>= +\begin{chunk}{defun frameHistList 0} (defun frameHistList (frame) (nth 4 frame)) -@ +\end{chunk} \subsection{5th Frame Component -- frameHistListLen} -<>= +\begin{chunk}{defun frameHistListLen 0} (defun frameHistListLen (frame) (nth 5 frame)) -@ +\end{chunk} \subsection{6th Frame Component -- frameHistListAct} -<>= +\begin{chunk}{defun frameHistListAct 0} (defun frameHistListAct (frame) (nth 6 frame)) -@ +\end{chunk} \subsection{7th Frame Component -- frameHistRecord} -<>= +\begin{chunk}{defun frameHistRecord 0} (defun frameHistRecord (frame) (nth 7 frame)) -@ +\end{chunk} \subsection{8th Frame Component -- frameHistoryTable} -<>= +\begin{chunk}{defun frameHistoryTable 0} (defun frameHistoryTable (frame) (nth 8 frame)) -@ +\end{chunk} \subsection{9th Frame Component -- frameExposureData} -<>= +\begin{chunk}{defun frameExposureData 0} (defun frameExposureData (frame) (nth 9 frame)) -@ +\end{chunk} \section{Functions} \defunsec{initializeInterpreterFrameRing} @@ -19250,7 +19241,7 @@ initial values. \calls{initializeInterpreterFrameRing}{updateFromCurrentInterpreterFrame} \usesdollar{initializeInterpreterFrameRing}{interpreterFrameName} \usesdollar{initializeInterpreterFrameRing}{interpreterFrameRing} -<>= +\begin{chunk}{defun initializeInterpreterFrameRing} (defun |initializeInterpreterFrameRing| () "Initializing the Interpreter Frame Ring" (declare (special |$interpreterFrameName| |$interpreterFrameRing|)) @@ -19260,18 +19251,18 @@ initial values. (|updateFromCurrentInterpreterFrame|) nil) -@ +\end{chunk} \defunsec{frameNames}{Creating a List of all of the Frame Names} This function simply walks across the frame in the frame ring and returns a list of the name of each frame. \usesdollar{frameNames}{interpreterFrameRing} -<>= +\begin{chunk}{defun frameNames 0} (defun |frameNames| () "Creating a List of all of the Frame Names" (declare (special |$interpreterFrameRing|)) (mapcar #'frameName |$interpreterFrameRing|)) -@ +\end{chunk} \defunsec{frameEnvironment}{Get Named Frame Environment (aka Interactive)} If the frame is found we return the environment portion of the frame @@ -19279,7 +19270,7 @@ otherwise we construct an empty environment and return it. The initial values of an empty frame are created here. This function returns a single frame that will be placed in the frame ring. \calls{frameEnvironment}{frameInteractive} -<>= +\begin{chunk}{defun frameEnvironment} (defun |frameEnvironment| (fname) "Get Named Frame Environment (aka Interactive)" (let ((frame (|findFrameInRing| fname))) @@ -19287,7 +19278,7 @@ returns a single frame that will be placed in the frame ring. (frameInteractive frame) (list (list nil))))) -@ +\end{chunk} \defunsec{emptyInterpreterFrame}{Create a new, empty Interpreter Frame} \usesdollar{emptyInterpreterFrame}{HiFiAccess} \usesdollar{emptyInterpreterFrame}{HistList} @@ -19295,7 +19286,7 @@ returns a single frame that will be placed in the frame ring. \usesdollar{emptyInterpreterFrame}{HistListAct} \usesdollar{emptyInterpreterFrame}{HistRecord} \usesdollar{emptyInterpreterFrame}{localExposureDataDefault} -<>= +\begin{chunk}{defun emptyInterpreterFrame 0} (defun |emptyInterpreterFrame| (name) "Create a new, empty Interpreter Frame" (declare (special |$HiFiAccess| |$HistList| |$HistListLen| |$HistListAct| @@ -19311,7 +19302,7 @@ returns a single frame that will be placed in the frame ring. nil ; $internalHistoryTable (copy-seq |$localExposureDataDefault|))) ; $localExposureData -@ +\end{chunk} \defunsec{createCurrentInterpreterFrame} {Collecting up the Environment into a Frame} @@ -19329,7 +19320,7 @@ values of the global variables and returns this as a frame element. \usesdollar{createCurrentInterpreterFrame}{HistRecord} \usesdollar{createCurrentInterpreterFrame}{internalHistoryTable} \usesdollar{createCurrentInterpreterFrame}{localExposureData} -<>= +\begin{chunk}{defun createCurrentInterpreterFrame 0} (defun |createCurrentInterpreterFrame| () "Collecting up the Environment into a Frame" (declare (special |$interpreterFrameName| |$InteractiveFrame| |$IOindex| @@ -19347,7 +19338,7 @@ values of the global variables and returns this as a frame element. |$internalHistoryTable| |$localExposureData|)) -@ +\end{chunk} \defunsec{updateFromCurrentInterpreterFrame}{Update from the Current Frame} The frames are kept on a circular list. The first element on that @@ -19366,7 +19357,7 @@ of the interesting interpreter data structures from that frame. \usesdollar{updateFromCurrentInterpreterFrame}{internalHistoryTable} \usesdollar{updateFromCurrentInterpreterFrame}{localExposureData} \usesdollar{updateFromCurrentInterpreterFrame}{frameMessages} -<>= +\begin{chunk}{defun updateFromCurrentInterpreterFrame} (defun |updateFromCurrentInterpreterFrame| () "Update from the Current Frame" (let (tmp1) @@ -19390,14 +19381,14 @@ of the interesting interpreter data structures from that frame. `(" Current interpreter frame is called" ,#(|bright| |$interpreterFrameName|)))))) -@ +\end{chunk} \defunsec{findFrameInRing}{Find a Frame in the Frame Ring by Name} Each frame contains its name as the 0th element. We simply walk all the frames and if we find one we return it. \calls{findFrameInRing}{boot-equal} \calls{findFrameInRing}{frameName} \usesdollar{findFrameInRing}{interpreterFrameRing} -<>= +\begin{chunk}{defun findFrameInRing 0} (defun |findFrameInRing| (name) "Find a Frame in the Frame Ring by Name" (let (result) @@ -19407,7 +19398,7 @@ the frames and if we find one we return it. (setq result frame))) result)) -@ +\end{chunk} \defunsec{updateCurrentInterpreterFrame}{Update the Current Interpreter Frame} This function collects the normal contents of the world into a @@ -19416,14 +19407,14 @@ the current values of the world from the frame object. \calls{updateCurrentInterpreterFrame}{createCurrentInterpreterFrame} \calls{updateCurrentInterpreterFrame}{updateFromCurrentInterpreterFrame} \usesdollar{updateCurrentInterpreterFrame}{interpreterFrameRing} -<>= +\begin{chunk}{defun updateCurrentInterpreterFrame} (defun |updateCurrentInterpreterFrame| () "Update the Current Interpreter Frame" (declare (special |$interpreterFrameRing|)) (rplaca |$interpreterFrameRing| (|createCurrentInterpreterFrame|)) (|updateFromCurrentInterpreterFrame|)) -@ +\end{chunk} \defunsec{nextInterpreterFrame}{Move to the next Interpreter Frame in Ring} This function updates the current frame to make sure all of the current information is recorded. If there are more frame elements @@ -19435,7 +19426,7 @@ end of the first. \calls{nextInterpreterFrame}{nconc2} \calls{nextInterpreterFrame}{updateFromCurrentInterpreterFrame} \usesdollar{nextInterpreterFrame}{interpreterFrameRing} -<>= +\begin{chunk}{defun nextInterpreterFrame} (defun |nextInterpreterFrame| () "Move to the next Interpreter Frame in Ring" (declare (special |$interpreterFrameRing|)) @@ -19445,14 +19436,14 @@ end of the first. (list (car |$interpreterFrameRing|)))) (|updateFromCurrentInterpreterFrame|))) -@ +\end{chunk} \defunsec{changeToNamedInterpreterFrame}{Change to the Named Interpreter Frame} \calls{changeToNamedInterpreterFrame}{updateCurrentInterpreterFrame} \calls{changeToNamedInterpreterFrame}{findFrameInRing} \calls{changeToNamedInterpreterFrame}{nremove} \calls{changeToNamedInterpreterFrame}{updateFromCurrentInterpreterFrame} \usesdollar{changeToNamedInterpreterFrame}{interpreterFrameRing} -<>= +\begin{chunk}{defun changeToNamedInterpreterFrame} (defun |changeToNamedInterpreterFrame| (name) "Change to the Named Interpreter Frame" (let (frame) @@ -19464,14 +19455,14 @@ end of the first. (cons frame (nremove |$interpreterFrameRing| frame))) (|updateFromCurrentInterpreterFrame|)))) -@ +\end{chunk} \defunsec{previousInterpreterFrame} {Move to the previous Interpreter Frame in Ring} \calls{previousInterpreterFrame}{updateCurrentInterpreterFrame} \calls{previousInterpreterFrame}{nconc2} \calls{previousInterpreterFrame}{updateFromCurrentInterpreterFrame} \usesdollar{previousInterpreterFrame}{interpreterFrameRing} -<>= +\begin{chunk}{defun previousInterpreterFrame} (defun |previousInterpreterFrame| () "Move to the previous Interpreter Frame in Ring" (let (tmp1 l b) @@ -19484,7 +19475,7 @@ end of the first. (setq |$interpreterFrameRing| (nconc2 (cons l nil) b)) (|updateFromCurrentInterpreterFrame|)))) -@ +\end{chunk} \defunsec{addNewInterpreterFrame}{Add a New Interpreter Frame} \calls{addNewInterpreterFrame}{boot-equal} \calls{addNewInterpreterFrame}{framename} @@ -19496,7 +19487,7 @@ end of the first. \callsdollar{addNewInterpreterFrame}{erase} \calls{addNewInterpreterFrame}{histFileName} \usesdollar{addNewInterpreterFrame}{interpreterFrameRing} -<>= +\begin{chunk}{defun addNewInterpreterFrame} (defun |addNewInterpreterFrame| (name) "Add a New Interpreter Frame" (declare (special |$interpreterFrameRing|)) @@ -19513,7 +19504,7 @@ end of the first. (|updateFromCurrentInterpreterFrame|) ($erase (|histFileName|))))) -@ +\end{chunk} \defunsec{closeInterpreterFrame}{Close an Interpreter Frame} \calls{closeInterpreterFrame}{nequal} \calls{closeInterpreterFrame}{framename} @@ -19523,7 +19514,7 @@ end of the first. \calls{closeInterpreterFrame}{updateFromCurrentInterpreterFrame} \usesdollar{closeInterpreterFrame}{interpreterFrameRing} \usesdollar{closeInterpreterFrame}{interpreterFrameName} -<>= +\begin{chunk}{defun closeInterpreterFrame} (defun |closeInterpreterFrame| (name) "Close an Interpreter Frame" (declare (special |$interpreterFrameRing| |$interpreterFrameName|)) @@ -19550,13 +19541,13 @@ end of the first. (setq |$interpreterFrameRing| (nreverse ifr)))))) (|updateFromCurrentInterpreterFrame|))))) -@ +\end{chunk} \defunsec{displayFrameNames}{Display the Frame Names} \calls{displayFrameNames}{bright} \calls{displayFrameNames}{framename} \calls{displayFrameNames}{sayKeyedMsg} \usesdollar{displayFrameNames}{interpreterFrameRing} -<>= +\begin{chunk}{defun displayFrameNames} (defun |displayFrameNames| () "Display the Frame Names" (declare (special |$interpreterFrameRing|)) @@ -19566,7 +19557,7 @@ end of the first. |$interpreterFrameRing|)) (|sayKeyedMsg| 's2iz0024 (list (apply #'append t1))))) -@ +\end{chunk} \defunsec{importFromFrame}{Import items from another frame} \calls{importFromFrame}{member} \calls{importFromFrame}{frameNames} @@ -19586,7 +19577,7 @@ end of the first. \calls{importFromFrame}{get} \calls{importFromFrame}{getalist} \usesdollar{importFromFrame}{interpreterFrameRing} -<>= +\begin{chunk}{defun importFromFrame} (defun |importFromFrame| (args) "Import items from another frame" (prog (temp1 fname fenv x v props vars plist prop val m) @@ -19668,15 +19659,15 @@ end of the first. (|sayKeyedMsg| 'S2IZ0078 ; import complete (cons fname nil)))))))))) -@ +\end{chunk} \defunsec{frame}{The top level frame command} \calls{frame}{frameSpad2Cmd} -<>= +\begin{chunk}{defun frame} (defun |frame| (l) "The top level frame command" (|frameSpad2Cmd| l)) -@ +\end{chunk} \defunsec{frameSpad2Cmd}{The top level frame command handler} \calls{frameSpad2Cmd}{throwKeyedMsg} \calls{frameSpad2Cmd}{helpSpad2Cmd} @@ -19698,7 +19689,7 @@ end of the first. \calls{frameSpad2Cmd}{next} \calls{frameSpad2Cmd}{nextInterpreterFrame} \usesdollar{frameSpad2Cmd}{options} -<>= +\begin{chunk}{defun frameSpad2Cmd} (defun |frameSpad2Cmd| (args) "The top level frame command handler" (let (frameArgs arg a) @@ -19734,9 +19725,9 @@ end of the first. (|next| (|nextInterpreterFrame|)) (t nil)))))) -@ +\end{chunk} \section{Frame File Messages} -<>= +\begin{chunk}{Frame File Messages} S2IZ0016 The %1b system command takes arguments but no options. S2IZ0017 @@ -19787,12 +19778,12 @@ S2IZ0078 if you wish to see the contents of the current frame. S2IZ0079 AXIOM cannot import %1b from frame %2b because it cannot be found. -@ +\end{chunk} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{help help page} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -<>= +\begin{chunk}{help.help} ==================================================================== A.12. )help ==================================================================== @@ -19925,28 +19916,28 @@ while Available algebra help topics are: -@ +\end{chunk} \section{Functions} \defunsec{help}{The top level help command} \calls{help}{helpSpad2Cmd} -<>= +\begin{chunk}{defun help} (defun |help| (l) "The top level help command" (|helpSpad2Cmd| l)) -@ +\end{chunk} \defunsec{helpSpad2Cmd}{The top level help command handler} \calls{helpSpad2Cmd}{newHelpSpad2Cmd} \calls{helpSpad2Cmd}{sayKeyedMsg} -<>= +\begin{chunk}{defun helpSpad2Cmd} (defun |helpSpad2Cmd| (args) "The top level help command handler" (unless (|newHelpSpad2Cmd| args) (|sayKeyedMsg| 's2iz0025 (cons args nil)))) -@ +\end{chunk} \defun{newHelpSpad2Cmd}{newHelpSpad2Cmd} \calls{newHelpSpad2Cmd}{makeInputFilename} @@ -19961,7 +19952,7 @@ Available algebra help topics are: \calls{newHelpSpad2Cmd}{selectOptionLC} \usesdollar{newHelpSpad2Cmd}{syscommands} \usesdollar{newHelpSpad2Cmd}{useFullScreenHelp} -<>= +\begin{chunk}{defun newHelpSpad2Cmd} (defun |newHelpSpad2Cmd| (args) (let (sarg arg narg helpfile filestream line) (declare (special $syscommands |$useFullScreenHelp|)) @@ -19989,12 +19980,12 @@ Available algebra help topics are: ((null line) (shut filestream)) (say line)))))))) -@ +\end{chunk} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{history help page} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -<>= +\begin{chunk}{history.help} ==================================================================== A.13. )history ==================================================================== @@ -20132,7 +20123,7 @@ o )read o )set o )undo -@ +\end{chunk} \footnote{ \fnref{frame} \fnref{read} @@ -20165,63 +20156,64 @@ interpreter step. The putHist function records all changes in the environment to \verb|$HistList| and \verb|$HistRecord|. \defdollar{oldHistoryFileName} -<>= +\begin{chunk}{initvars} (defvar |$oldHistoryFileName| '|last| "vm/370 filename name component") -@ +\end{chunk} \defdollar{historyFileType} -<>= +\begin{chunk}{initvars} (defvar |$historyFileType| '|axh| "vm/370 filename type component") -@ +\end{chunk} \defdollar{historyDirectory} -<>= +\begin{chunk}{initvars} (defvar |$historyDirectory| 'A "vm/370 filename disk component") -@ +\end{chunk} \defdollar{useInternalHistoryTable} -<>= +\begin{chunk}{initvars} (defvar |$useInternalHistoryTable| t "t means keep history in core") -@ +\end{chunk} \section{Data Structures} \section{Functions} \defun{makeHistFileName}{makeHistFileName} \calls{makeHistFileName}{makePathname} -<>= +\begin{chunk}{defun makeHistFileName} (defun |makeHistFileName| (fname) (|makePathname| fname |$historyFileType| |$historyDirectory|)) -@ +\end{chunk} \defun{oldHistFileName}{oldHistFileName} \calls{oldHistFileName}{makeHistFileName} \usesdollar{oldHistFileName}{oldHistoryFileName} -<>= +\begin{chunk}{defun oldHistFileName} (defun |oldHistFileName| () (declare (special |$oldHistoryFileName|)) (|makeHistFileName| |$oldHistoryFileName|)) -@ +\end{chunk} \defun{histFileName}{histFileName} \calls{histFileName}{makeHistFileName} \usesdollar{histFileName}{interpreterFrameName} -<>= +\begin{chunk}{defun histFileName} (defun |histFileName| () (declare (special |$interpreterFrameName|)) (|makeHistFileName| |$interpreterFrameName|)) -@ +\end{chunk} \defun{histInputFileName}{histInputFileName} \calls{histInputFileName}{makePathname} \usesdollar{histInputFileName}{interpreterFrameName} \usesdollar{histInputFileName}{historyDirectory} -<>= +\begin{chunk}{defun histInputFileName} (defun |histInputFileName| (fn) (declare (special |$interpreterFrameName| |$historyDirectory|)) (if (null fn) (|makePathname| |$interpreterFrameName| 'input |$historyDirectory|) (|makePathname| fn 'input |$historyDirectory|))) -@ + +\end{chunk} \defun{initHist}{initHist} \calls{initHist}{initHistList} @@ -20232,7 +20224,7 @@ environment to \verb|$HistList| and \verb|$HistRecord|. \callsdollar{initHist}{replace} \usesdollar{initHist}{useInternalHistoryTable} \usesdollar{initHist}{HiFiAccess} -<>= +\begin{chunk}{defun initHist} (defun |initHist| () (let (oldFile newFile) (declare (special |$useInternalHistoryTable| |$HiFiAccess|)) @@ -20246,13 +20238,13 @@ environment to \verb|$HistList| and \verb|$HistRecord|. (setq |$HiFiAccess| t) (|initHistList|))))) -@ +\end{chunk} \defun{initHistList}{initHistList} \usesdollar{initHistList}{HistListLen} \usesdollar{initHistList}{HistList} \usesdollar{initHistList}{HistListAct} \usesdollar{initHistList}{HistRecord} -<>= +\begin{chunk}{defun initHistList} (defun |initHistList| () (let (li) (declare (special |$HistListLen| |$HistList| |$HistListAct| |$HistRecord|)) @@ -20266,12 +20258,12 @@ environment to \verb|$HistList| and \verb|$HistRecord|. (setq |$HistListAct| 0) (setq |$HistRecord| nil))) -@ +\end{chunk} \defunsec{history}{The top level history command} \calls{history}{sayKeyedMsg} \calls{history}{historySpad2Cmd} \usesdollar{history}{options} -<>= +\begin{chunk}{defun history} (defun |history| (l) "The top level history command" (declare (special |$options|)) @@ -20279,7 +20271,7 @@ environment to \verb|$HistList| and \verb|$HistRecord|. (|sayKeyedMsg| 's2ih0006 nil) ; syntax error (|historySpad2Cmd|))) -@ +\end{chunk} \defunsec{historySpad2Cmd}{The top level history command handler} \calls{historySpad2Cmd}{selectOptionLC} \calls{historySpad2Cmd}{member} @@ -20304,7 +20296,7 @@ environment to \verb|$HistList| and \verb|$HistRecord|. \usesdollar{historySpad2Cmd}{options} \usesdollar{historySpad2Cmd}{HiFiAccess} \usesdollar{historySpad2Cmd}{IOindex} -<>= +\begin{chunk}{defun historySpad2Cmd} (defun |historySpad2Cmd| () "The top level history command handler" (let (histOptions opts opt optargs x) @@ -20388,7 +20380,7 @@ environment to \verb|$HistList| and \verb|$HistRecord|. ((eq opt '|write|) (|writeInputLines| optargs 1)))))) '|done|)) -@ +\end{chunk} \defun{setHistoryCore}{setHistoryCore} We case on the inCore argument value \begin{list}{} @@ -20422,7 +20414,7 @@ file and then write the in-memory history to a new file \usesdollar{setHistoryCore}{internalHistoryTable} \usesdollar{setHistoryCore}{HiFiAccess} \usesdollar{setHistoryCore}{IOindex} -<>= +\begin{chunk}{defun setHistoryCore} (defun |setHistoryCore| (inCore) (let (l vec str n rec) (declare (special |$useInternalHistoryTable| |$internalHistoryTable| @@ -20480,13 +20472,13 @@ file and then write the in-memory history to a new file (setq |$useInternalHistoryTable| nil) (|sayKeyedMsg| 's2ih0031 nil))))) ; use file history -@ +\end{chunk} \defdollar{underbar} Also used in the output routines. -<>= +\begin{chunk}{initvars} (defvar underbar "_") -@ +\end{chunk} \defun{writeInputLines}{writeInputLines} \calls{writeInputLines}{sayKeyedMsg} @@ -20505,7 +20497,7 @@ Also used in the output routines. \uses{writeInputLines}{underbar} \usesdollar{writeInputLines}{HiFiAccess} \usesdollar{writeInputLines}{IOindex} -<>= +\begin{chunk}{defun writeInputLines} (defun |writeInputLines| (fn initial) (let (maxn breakChars vecl k svec done n lineList file inp) (declare (special underbar |$HiFiAccess| |$IOindex|)) @@ -20552,12 +20544,12 @@ Also used in the output routines. (shut inp) nil)))) -@ +\end{chunk} \defun{resetInCoreHist}{resetInCoreHist} \usesdollar{resetInCoreHist}{HistListAct} \usesdollar{resetInCoreHist}{HistListLen} \usesdollar{resetInCoreHist}{HistList} -<>= +\begin{chunk}{defun resetInCoreHist} (defun |resetInCoreHist| () (declare (special |$HistListAct| |$HistListLen| |$HistList|)) (setq |$HistListAct| 0) @@ -20566,14 +20558,14 @@ Also used in the output routines. (setq |$HistList| (cdr |$HistList|)) (rplaca |$HistList| nil))) -@ +\end{chunk} \defun{changeHistListLen}{changeHistListLen} \calls{changeHistListLen}{sayKeyedMsg} \calls{changeHistListLen}{spaddifference} \usesdollar{changeHistListLen}{HistListLen} \usesdollar{changeHistListLen}{HistList} \usesdollar{changeHistListLen}{HistListAct} -<>= +\begin{chunk}{defun changeHistListLen} (defun |changeHistListLen| (n) (let (dif l) (declare (special |$HistListLen| |$HistList| |$HistListAct|)) @@ -20599,7 +20591,7 @@ Also used in the output routines. (rplacd |$HistList| l) '|done|)))) -@ +\end{chunk} \defun{updateHist}{updateHist} \calls{updateHist}{startTimingProcess} \calls{updateHist}{updateInCoreHist} @@ -20612,7 +20604,7 @@ Also used in the output routines. \usesdollar{updateHist}{HistRecord} \usesdollar{updateHist}{mkTestInputStack} \usesdollar{updateHist}{currentLine} -<>= +\begin{chunk}{defun updateHist} (defun |updateHist| () (declare (special |$IOindex| |$HiFiAccess| |$HistRecord| |$mkTestInputStack| |$currentLine|)) @@ -20628,12 +20620,12 @@ Also used in the output routines. (setq |$currentLine| nil) (|stopTimingProcess| '|history|))) -@ +\end{chunk} \defun{updateInCoreHist}{updateInCoreHist} \usesdollar{updateInCoreHist}{HistList} \usesdollar{updateInCoreHist}{HistListLen} \usesdollar{updateInCoreHist}{HistListAct} -<>= +\begin{chunk}{defun updateInCoreHist} (defun |updateInCoreHist| () (declare (special |$HistList| |$HistListLen| |$HistListAct|)) (setq |$HistList| (cdr |$HistList|)) @@ -20641,36 +20633,36 @@ Also used in the output routines. (when (> |$HistListLen| |$HistListAct|) (setq |$HistListAct| (1+ |$HistListAct|)))) -@ +\end{chunk} \defun{putHist}{putHist} \calls{putHist}{recordOldValue} \calls{putHist}{get} \calls{putHist}{recordNewValue} \calls{putHist}{putIntSymTab} \usesdollar{putHist}{HiFiAccess} -<>= +\begin{chunk}{defun putHist} (defun |putHist| (x prop val e) (declare (special |$HiFiAccess|)) (when (null (eq x '%)) (|recordOldValue| x prop (|get| x prop e))) (when |$HiFiAccess| (|recordNewValue| x prop val)) (|putIntSymTab| x prop val e)) -@ +\end{chunk} \defun{recordNewValue}{recordNewValue} \calls{recordNewValue}{startTimingProcess} \calls{recordNewValue}{recordNewValue0} \calls{recordNewValue}{stopTimingProcess} -<>= +\begin{chunk}{defun recordNewValue} (defun |recordNewValue| (x prop val) (|startTimingProcess| '|history|) (|recordNewValue0| x prop val) (|stopTimingProcess| '|history|)) -@ +\end{chunk} \defun{recordNewValue0}{recordNewValue0} \calls{recordNewValue0}{assq} \usesdollar{recordNewValue0}{HistRecord} -<>= +\begin{chunk}{defun recordNewValue0} (defun |recordNewValue0| (x prop val) (let (p1 p2 p) (declare (special |$HistRecord|)) @@ -20682,22 +20674,22 @@ Also used in the output routines. (setq p (cons x (list (cons prop val)))) (setq |$HistRecord| (cons p |$HistRecord|)))))) -@ +\end{chunk} \defun{recordOldValue}{recordOldValue} \calls{recordOldValue}{startTimingProcess} \calls{recordOldValue}{recordOldValue0} \calls{recordOldValue}{stopTimingProcess} \calls{recordOldValue0}{assq} -<>= +\begin{chunk}{defun recordOldValue} (defun |recordOldValue| (x prop val) (|startTimingProcess| '|history|) (|recordOldValue0| x prop val) (|stopTimingProcess| '|history|)) -@ +\end{chunk} \defun{recordOldValue0}{recordOldValue0} \usesdollar{recordOldValue0}{HistList} -<>= +\begin{chunk}{defun recordOldValue0} (defun |recordOldValue0| (x prop val) (let (p1 p) (declare (special |$HistList|)) @@ -20707,7 +20699,7 @@ Also used in the output routines. (setq p (cons x (list (cons prop val)))) (rplaca |$HistList| (cons p (car |$HistList|))))) -@ +\end{chunk} \defun{undoInCore}{undoInCore} \calls{undoInCore}{undoChanges} \calls{undoInCore}{spaddifference} @@ -20722,7 +20714,7 @@ Also used in the output routines. \usesdollar{undoInCore}{IOindex} \usesdollar{undoInCore}{HiFiAccess} \usesdollar{undoInCore}{InteractiveFrame} -<>= +\begin{chunk}{defun undoInCore} (defun |undoInCore| (n) (let (li vec p p1 val) (declare (special |$HistList| |$HistListLen| |$IOindex| |$HiFiAccess| @@ -20747,14 +20739,14 @@ Also used in the output routines. (setq |$InteractiveFrame| (|putHist| '% '|value| val |$InteractiveFrame|)) (|updateHist|))) -@ +\end{chunk} \defun{undoChanges}{undoChanges} \calls{undoChanges}{boot-equal} \calls{undoChanges}{undoChanges} \calls{undoChanges}{putHist} \usesdollar{undoChanges}{HistList} \usesdollar{undoChanges}{InteractiveFrame} -<>= +\begin{chunk}{defun undoChanges} (defun |undoChanges| (li) (let (x) (declare (special |$HistList| |$InteractiveFrame|)) @@ -20764,7 +20756,7 @@ Also used in the output routines. (dolist (p2 (cdr p1)) (|putHist| x (car p2) (cdr p2) |$InteractiveFrame|))))) -@ +\end{chunk} \defun{undoFromFile}{undoFromFile} \calls{undoFromFile}{seq} \calls{undoFromFile}{exit} @@ -20777,7 +20769,7 @@ Also used in the output routines. \calls{undoFromFile}{updateHist} \usesdollar{undoFromFile}{InteractiveFrame} \usesdollar{undoFromFile}{HiFiAccess} -<>= +\begin{chunk}{defun undoFromFile} (defun |undoFromFile| (n) (let (varl prop vec x p p1 val) (declare (special |$InteractiveFrame| |$HiFiAccess|)) @@ -20826,7 +20818,7 @@ Also used in the output routines. (setq |$InteractiveFrame| (|putHist| '% '|value| val |$InteractiveFrame|)) (|updateHist|))) -@ +\end{chunk} \defun{saveHistory}{saveHistory} \calls{saveHistory}{sayKeyedMsg} \calls{saveHistory}{makeInputFilename} @@ -20845,7 +20837,7 @@ Also used in the output routines. \usesdollar{saveHistory}{HiFiAccess} \usesdollar{saveHistory}{useInternalHistoryTable} \usesdollar{saveHistory}{internalHistoryTable} -<>= +\begin{chunk}{defun saveHistory} (defun |saveHistory| (fn) (let (|$seen| savefile inputfile saveStr n rec val) (declare (special |$seen| |$HiFiAccess| |$useInternalHistoryTable| @@ -20889,7 +20881,7 @@ Also used in the output routines. (cons (|namestring| savefile) nil)) nil)))) -@ +\end{chunk} \defun{restoreHistory}{restoreHistory} \calls{restoreHistory}{pairp} \calls{restoreHistory}{qcdr} @@ -20919,7 +20911,7 @@ Also used in the output routines. \usesdollar{restoreHistory}{useInternalHistoryTable} \usesdollar{restoreHistory}{InteractiveFrame} \usesdollar{restoreHistory}{oldHistoryFileName} -<>= +\begin{chunk}{defun restoreHistory} (defun |restoreHistory| (fn) (let (|$options| fnq restfile curfile l oldInternal vec line x a) (declare (special |$options| |$internalHistoryTable| |$HiFiAccess| |$e| @@ -20987,22 +20979,22 @@ Also used in the output routines. (|clearCmdSortedCaches|) nil)))) -@ +\end{chunk} \defun{setIOindex}{setIOindex} \usesdollar{setIOindex}{IOindex} -<>= +\begin{chunk}{defun setIOindex} (defun |setIOindex| (n) (declare (special |$IOindex|)) (setq |$IOindex| n)) -@ +\end{chunk} \defun{showInput}{showInput} \calls{showInput}{tab} \calls{showInput}{readHiFi} \calls{showInput}{disableHist} \calls{showInput}{sayMSG} -<>= +\begin{chunk}{defun showInput} (defun |showInput| (mini maxi) (let (vec l) (do ((|ind| mini (+ |ind| 1))) @@ -21021,7 +21013,7 @@ Also used in the output routines. ((or (atom tmp0) (progn (setq ln (car tmp0)) nil)) nil) (|sayMSG| (list " " ln)))))))) -@ +\end{chunk} \defun{showInOut}{showInOut} \calls{showInOut}{assq} \calls{showInOut}{spadPrint} @@ -21030,7 +21022,7 @@ Also used in the output routines. \calls{showInOut}{readHiFi} \calls{showInOut}{disableHist} \calls{showInOut}{sayMSG} -<>= +\begin{chunk}{defun showInOut} (defun |showInOut| (mini maxi) (let (vec Alist triple) (do ((ind mini (+ ind 1))) @@ -21043,7 +21035,7 @@ Also used in the output routines. (setq |$IOindex| ind) (|spadPrint| (|objValUnwrap| triple) (|objMode| triple))))))) -@ +\end{chunk} \defun{fetchOutput}{fetchOutput} \calls{fetchOutput}{boot-equal} \calls{fetchOutput}{spaddifference} @@ -21052,7 +21044,7 @@ Also used in the output routines. \calls{fetchOutput}{readHiFi} \calls{fetchOutput}{disableHist} \calls{fetchOutput}{assq} -<>= +\begin{chunk}{defun fetchOutput} (defun |fetchOutput| (n) (let (vec Alist val) (cond @@ -21080,7 +21072,7 @@ Also used in the output routines. (t (|throwKeyedMsg| 's2ih0003 (cons n nil))))))) ; no step value (t (|throwKeyedMsg| 's2ih0004 nil))))) ; history not on -@ +\end{chunk} \defunsec{readHiFi}{Read the history file using index n} \calls{readHiFi}{assoc} \calls{readHiFi}{keyedSystemError} @@ -21092,7 +21084,7 @@ Also used in the output routines. \calls{readHiFi}{rshut} \usesdollar{readHiFi}{useInternalHistoryTable} \usesdollar{readHiFi}{internalHistoryTable} -<>= +\begin{chunk}{defun readHiFi} (defun |readHiFi| (n) "Read the history file using index n" (let (pair HiFi vec) @@ -21114,7 +21106,7 @@ Also used in the output routines. (rshut HiFi))) vec)) -@ +\end{chunk} \defunsec{writeHiFi}{Write information of the current step to history file} \calls{writeHiFi}{rdefiostream} \calls{writeHiFi}{histFileName} @@ -21126,7 +21118,7 @@ Also used in the output routines. \usesdollar{writeHiFi}{IOindex} \usesdollar{writeHiFi}{HistRecord} \usesdollar{writeHiFi}{currentLine} -<>= +\begin{chunk}{defun writeHiFi} (defun |writeHiFi| () "Writes information of the current step to history file" (let (HiFi) @@ -21148,12 +21140,12 @@ Also used in the output routines. (cons |$currentLine| |$HistRecord|) HiFi) (rshut HiFi))))) -@ +\end{chunk} \defunsec{disableHist}{Disable history if an error occurred} \calls{disableHist}{histFileErase} \calls{disableHist}{histFileName} \usesdollar{disableHist}{HiFiAccess} -<>= +\begin{chunk}{defun disableHist} (defun |disableHist| () "Disable history if an error occurred" (declare (special |$HiFiAccess|)) @@ -21162,12 +21154,12 @@ Also used in the output routines. (|histFileErase| (|histFileName|))) (t nil))) -@ +\end{chunk} \defun{writeHistModesAndValues}{writeHistModesAndValues} \calls{writeHistModesAndValues}{get} \calls{writeHistModesAndValues}{putHist} \usesdollar{writeHistModesAndValues}{InteractiveFrame} -<>= +\begin{chunk}{defun writeHistModesAndValues} (defun |writeHistModesAndValues| () (let (a x) (declare (special |$InteractiveFrame|)) @@ -21188,7 +21180,7 @@ Also used in the output routines. ((setq x (|get| a '|mode| |$InteractiveFrame|)) (|putHist| a '|mode| x |$InteractiveFrame|)))))) -@ +\end{chunk} \section{Lisplib output transformations} Lisplib output transformations @@ -21197,7 +21189,7 @@ These functions transform an object to a writable form and back. \defun{spadrwrite0}{spadrwrite0} \calls{spadrwrite0}{safeWritify} \calls{spadrwrite0}{rwrite} -<>= +\begin{chunk}{defun spadrwrite0} (defun spadrwrite0 (vec item stream) (let (val) (setq val (|safeWritify| item)) @@ -21207,23 +21199,23 @@ These functions transform an object to a writable form and back. (|rwrite| vec val stream) item)))) -@ +\end{chunk} \defun{rwrite}{Random write to a stream} \calls{rwrite}{rwrite} \calls{rwrite}{pname} \calls{rwrite}{identp} -<>= +\begin{chunk}{defun rwrite} (defun |rwrite| (key val stream) (when (identp key) (setq key (pname key))) (rwrite key val stream))) -@ +\end{chunk} \defun{spadrwrite}{spadrwrite} \calls{spadrwrite}{spadrwrite0} \calls{spadrwrite}{throwKeyedMsg} -<>= +\begin{chunk}{defun spadrwrite} (defun spadrwrite (vec item stream) (let (val) (setq val (spadrwrite0 vec item stream)) @@ -21231,33 +21223,33 @@ These functions transform an object to a writable form and back. (|throwKeyedMsg| 's2ih0036 nil) ; cannot save value to file item))) -@ +\end{chunk} \defun{spadrread}{spadrread} \calls{SPADRREAD}{dewritify} \calls{SPADRREAD}{rread} -<>= +\begin{chunk}{defun spadrread} (defun spadrread (vec stream) (|dewritify| (|rread| vec stream nil))) -@ +\end{chunk} \defun{rread}{Random read a key from a stream} RREAD takes erroval to return if key is missing \calls{rread}{rread} \calls{rwrite}{identp} \calls{rwrite}{pname} -<>= +\begin{chunk}{defun rread} (defun |rread| (key rstream errorval) (when (identp key) (setq key (pname key))) (rread key rstream errorval)) -@ +\end{chunk} \defun{unwritable?}{unwritable?} \calls{unwritable?}{pairp} \calls{unwritable?}{vecp} \calls{unwritable?}{placep} -<>= +\begin{chunk}{defun unwritable?} (defun |unwritable?| (ob) (cond ((or (pairp ob) (vecp ob)) nil) @@ -21266,7 +21258,7 @@ RREAD takes erroval to return if key is missing ((floatp ob) t) (t nil))) -@ +\end{chunk} \defun{writifyComplain}{writifyComplain} Create a full isomorphic object which can be saved in a lisplib. Note that {\tt dewritify(writify(x))} preserves UEQUALity of hashtables. @@ -21274,22 +21266,22 @@ HASHTABLEs go both ways. READTABLEs cannot presently be transformed back. \calls{writifyComplain}{sayKeyedMsg} \usesdollar{writifyComplain}{writifyComplained} -<>= +\begin{chunk}{defun writifyComplain} (defun |writifyComplain| (s) (declare (special |$writifyComplained|)) (unless |$writifyComplained| (setq |$writifyComplained| t) (|sayKeyedMsg| 's2ih0027 (list s)))) ; cannot save value -@ +\end{chunk} \defun{safeWritify}{safeWritify} \catches{safeWritify}{writifyTag} \calls{safeWritify}{writify} -<>= +\begin{chunk}{defun safeWritify} (defun |safeWritify| (ob) (catch '|writifyTag| (|writify| ob))) -@ +\end{chunk} \defun{writify,writifyInner}{writify,writifyInner} \throws{writify,writifyInner}{writifyTag} \calls{writify,writifyInner}{seq} @@ -21318,7 +21310,7 @@ back. \usesdollar{writify,writifyInner}{seen} \usesdollar{writify,writifyInner}{NonNullStream} \usesdollar{writify,writifyInner}{NullStream} -<>= +\begin{chunk}{defun writify,writifyInner} (defun |writify,writifyInner| (ob) (prog (e name tmp1 tmp2 tmp3 x qcar qcdr d n keys nob) (declare (special |$seen| |$NonNullStream| |$NullStream|)) @@ -21450,14 +21442,14 @@ back. (multiple-value-list (integer-decode-float ob))))))))) (exit ob))))) -@ +\end{chunk} \defun{writify}{writify} \calls{writify}{ScanOrPairVec} \calls{writify}{function} \calls{writify}{writify,writifyInner} \usesdollar{writify}{seen} \usesdollar{writify}{writifyComplained} -<>= +\begin{chunk}{defun writify} (defun |writify| (ob) (let (|$seen| |$writifyComplained|) (declare (special |$seen| |$writifyComplained|)) @@ -21468,13 +21460,13 @@ back. (setq |$writifyComplained| nil) (|writify,writifyInner| ob))))) -@ +\end{chunk} \defun{spadClosure?}{spadClosure?} \calls{spadClosure?}{qcar} \calls{spadClosure?}{bpiname} \calls{spadClosure?}{qcdr} \calls{spadClosure?}{vecp} -<>= +\begin{chunk}{defun spadClosure?} (defun |spadClosure?| (ob) (let (fun name vec) (setq fun (qcar ob)) @@ -21486,25 +21478,25 @@ back. nil name))))) -@ +\end{chunk} \defun{dewritify,is?}{dewritify,is?} -<>= +\begin{chunk}{defun dewritify,is?} (defun |dewritify,is?| (a) (eq a 'writified!!)) -@ +\end{chunk} \defdollar{NonNullStream} -<>= +\begin{chunk}{initvars} (defvar |$NonNullStream| "NonNullStream") -@ +\end{chunk} \defdollar{NullStream} -<>= +\begin{chunk}{initvars} (defvar |$NullStream| "NullStream") -@ +\end{chunk} \defun{dewritify,dewritifyInner}{dewritify,dewritifyInner} \calls{dewritify,dewritifyInner}{seq} @@ -21533,7 +21525,7 @@ back. \usesdollar{dewritify,dewritifyInner}{seen} \usesdollar{dewritify,dewritifyInner}{NullStream} \usesdollar{dewritify,dewritifyInner}{NonNullStream} -<>= +\begin{chunk}{defun dewritify,dewritifyInner} (defun |dewritify,dewritifyInner| (ob) (prog (e type oname f vec name tmp1 signif expon sign fval qcar qcdr n nob) (declare (special |$seen| |$NullStream| |$NonNullStream|)) @@ -21662,14 +21654,14 @@ back. (exit nob)))) (exit ob))))) -@ +\end{chunk} \defun{dewritify}{dewritify} \calls{dewritify}{ScanOrPairVec} \calls{dewritify}{function} \calls{dewritify}{dewritify,dewritifyInner} \usesdollar{dewritify}{seen} -<>= +\begin{chunk}{defun dewritify} (defun |dewritify| (ob) (let (|$seen|) (declare (special |$seen|)) @@ -21679,7 +21671,7 @@ back. (setq |$seen| (make-hash-table :test #'eq)) (|dewritify,dewritifyInner| ob))))) -@ +\end{chunk} \defun{ScanOrPairVec,ScanOrInner}{ScanOrPairVec,ScanOrInner} \throws{ScanOrPairVec,ScanOrInner}{ScanOrPairVecAnswer} @@ -21691,7 +21683,7 @@ back. \calls{ScanOrPairVec,ScanOrInner}{qcdr} \calls{ScanOrPairVec,ScanOrInner}{vecp} \usesdollar{ScanOrPairVec,ScanOrInner}{seen} -<>= +\begin{chunk}{defun ScanOrPairVec,ScanOrInner} (defun |ScanOrPairVec,ScanOrInner| (f ob) (declare (special |$seen|)) (when (hget |$seen| ob) nil) @@ -21707,26 +21699,26 @@ back. (when (funcall f ob) (throw '|ScanOrPairVecAnswer| t)) nil) -@ +\end{chunk} \defun{ScanOrPairVec}{ScanOrPairVec} \catches{ScanOrPairVec}{ScanOrPairVecAnswer} \calls{ScanOrPairVec}{ScanOrPairVec,ScanOrInner} \usesdollar{ScanOrPairVec}{seen} -<>= +\begin{chunk}{defun ScanOrPairVec} (defun |ScanOrPairVec| (f ob) (let (|$seen|) (declare (special |$seen|)) (setq |$seen| (make-hash-table :test #'eq)) (catch '|ScanOrPairVecAnswer| (|ScanOrPairVec,ScanOrInner| f ob)))) -@ +\end{chunk} \defun{gensymInt}{gensymInt} \calls{gensymInt}{gensymp} \calls{gensymInt}{error} \calls{gensymInt}{pname} \calls{gensymInt}{charDigitVal} -<>= +\begin{chunk}{defun gensymInt} (defun |gensymInt| (g) (let (p n) (if (null (gensymp g)) @@ -21739,11 +21731,11 @@ back. (setq n (+ (* 10 n) (|charDigitVal| (elt p i))))) n)))) -@ +\end{chunk} \defun{charDigitVal}{charDigitVal} \calls{charDigitVal}{spaddifference} \calls{charDigitVal}{error} -<>= +\begin{chunk}{defun charDigitVal} (defun |charDigitVal| (c) (let (digits n) (setq digits "0123456789") @@ -21757,15 +21749,15 @@ back. (|error| "Character is not a digit") n))) -@ +\end{chunk} \defun{histFileErase}{histFileErase} -<>= +\begin{chunk}{defun histFileErase} (defun |histFileErase| (file) (when (probe-file file) (delete-file file))) -@ +\end{chunk} \section{History File Messages} -<>= +\begin{chunk}{History File Messages} S2IH0001 You have not reached step %1b yet, and so its value cannot be supplied. @@ -21848,12 +21840,12 @@ S2IH0037 You must specify a file name to the history save command S2IH0038 You must specify a file name to the history write command -@ +\end{chunk} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{include help page} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -<>= +\begin{chunk}{include.help} User Level Required: interpreter @@ -21867,24 +21859,24 @@ The )include command can be used in .input files to place the contents of another file inline with the current file. The path can be an absolute or relative pathname. -@ +\end{chunk} \section{Functions} \defun{ncloopInclude1}{ncloopInclude1} \calls{ncloopInclude1}{ncloopIncFileName} \calls{ncloopInclude1}{ncloopInclude} -<>= +\begin{chunk}{defun ncloopInclude1} (defun |ncloopInclude1| (name n) (let (a) (if (setq a (|ncloopIncFileName| name)) (|ncloopInclude| a n) n))) -@ +\end{chunk} \defunsec{ncloopIncFileName} {Returns the first non-blank substring of the given string} \calls{ncloopIncFileName}{incFileName} \calls{ncloopIncFileName}{concat} -<>= +\begin{chunk}{defun ncloopIncFileName} (defun |ncloopIncFileName| (string) "Returns the first non-blank substring of the given string" (let (fn) @@ -21892,36 +21884,36 @@ absolute or relative pathname. (write-line (concat string " not found"))) fn)) -@ +\end{chunk} \defunsec{ncloopInclude}{Open the include file and read it in} The ncloopInclude0 function is part of the parser and lives in int-top.boot. \calls{ncloopInclude}{ncloopInclude0} -<>= +\begin{chunk}{defun ncloopInclude} (defun |ncloopInclude| (name n) "Open the include file and read it in" (with-open-file (st name) (|ncloopInclude0| st name n))) -@ +\end{chunk} \defunsec{incFileName}{Return the include filename} Given a string we return the first token from the string which is the first non-blank substring. \calls{incFileName}{incBiteOff} -<>= +\begin{chunk}{defun incFileName} (defun |incFileName| (x) "Return the include filename" (car (|incBiteOff| x))) -@ +\end{chunk} \defunsec{incBiteOff}{Return the next token} Takes a sequence and returns the a list of the first token and the remaining string characters. If there are no remaining string characters the second string is of length 0. Effectively it "bites off" the first token in the string. If the string only 0 or more blanks it returns nil. -<>= +\begin{chunk}{defun incBiteOff} (defun |incBiteOff| (x) "Return the next token" (let (blank nonblank) @@ -21932,12 +21924,12 @@ token in the string. If the string only 0 or more blanks it returns nil. (list (subseq x nonblank blank) (subseq x blank)) (list (subseq x nonblank) ""))))) -@ +\end{chunk} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{library help page} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -<>= +\begin{chunk}{library.help} ==================================================================== A.14. )library ==================================================================== @@ -21992,7 +21984,7 @@ o )compile o )frame o )set -@ +\end{chunk} \footnote{ \fnref{cd} \fnref{frame} @@ -22001,7 +21993,7 @@ o )set %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{lisp help page} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -<>= +\begin{chunk}{lisp.help} ==================================================================== A.15. )lisp ==================================================================== @@ -22028,7 +22020,7 @@ o )system o )boot o )fin -@ +\end{chunk} \footnote{ \fnref{system} \fnref{boot} @@ -22044,7 +22036,7 @@ verbatim. This will eventually result in a call to the function %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{load help page} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -<>= +\begin{chunk}{load.help} ==================================================================== A.16. )load ==================================================================== @@ -22055,22 +22047,22 @@ Command Description: This command is obsolete. Use )library instead. -@ +\end{chunk} \defun{load}{The )load command (obsolete)} We keep this command around in case anyone has the original Axiom book. \calls{load}{sayKeyedMsg} -<>= +\begin{chunk}{defun load} (defun |load| (ignore) (declare (ignore ignore)) (|sayKeyedMsg| 'S2IU0003 nil)) -@ +\end{chunk} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{ltrace help page} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -<>= +\begin{chunk}{ltrace.help} ==================================================================== A.17. )ltrace ==================================================================== @@ -22091,7 +22083,7 @@ o )boot o )lisp o )trace -@ +\end{chunk} \footnote{ \fnref{boot} \fnref{lisp} @@ -22099,17 +22091,17 @@ o )trace \defun{ltrace}{The top level )ltrace function} \calls{ltrace}{trace} -<>= +\begin{chunk}{defun ltrace} (defun |ltrace| (arg) (|trace| arg)) -@ +\end{chunk} \section{Variables Used} \section{Functions} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{pquit help page} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -<>= +\begin{chunk}{pquit.help} ==================================================================== A.18. )pquit ==================================================================== @@ -22154,7 +22146,7 @@ o )close o )quit o )system -@ +\end{chunk} \footnote{ \fnref{fin} \fnref{history} @@ -22165,24 +22157,24 @@ o )system \section{Functions} \defunsec{pquit}{The top level pquit command} \calls{pquit}{pquitSpad2Cmd} -<>= +\begin{chunk}{defun pquit} (defun |pquit| () "The top level pquit command" (|pquitSpad2Cmd|)) -@ +\end{chunk} \defunsec{pquitSpad2Cmd}{The top level pquit command handler} \calls{pquitSpad2Cmd}{quitSpad2Cmd} \usesdollar{pquitSpad2Cmd}{quitCommandType} -<>= +\begin{chunk}{defun pquitSpad2Cmd} (defun |pquitSpad2Cmd| () "The top level pquit command handler" (let ((|$quitCommandType| '|protected|)) (declare (special |$quitCommandType|)) (|quitSpad2Cmd|))) -@ +\end{chunk} This command is in the list of \verb|$noParseCommands| \ref{noParseCommands} which means that its arguments are passed @@ -22192,7 +22184,7 @@ verbatim. This will eventually result in a call to the function %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{quit help page} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -<>= +\begin{chunk}{quit.help} ==================================================================== A.19. )quit ==================================================================== @@ -22234,7 +22226,7 @@ o )close o )pquit o )system -@ +\end{chunk} \footnote{ \fnref{fin} \fnref{history} @@ -22245,12 +22237,12 @@ o )system \section{Functions} \defunsec{quit}{The top level quit command} \calls{quit}{quitSpad2Cmd} -<>= +\begin{chunk}{defun quit} (defun |quit| () "The top level quit command" (|quitSpad2Cmd|)) -@ +\end{chunk} \defunsec{quitSpad2Cmd}{The top level quit command handler} \calls{quitSpad2Cmd}{upcase} \calls{quitSpad2Cmd}{queryUserKeyedMsg} @@ -22259,7 +22251,7 @@ o )system \calls{quitSpad2Cmd}{sayKeyedMsg} \calls{quitSpad2Cmd}{tersyscommand} \usesdollar{quitSpad2Cmd}{quitCommandType} -<>= +\begin{chunk}{defun quitSpad2Cmd} (defun |quitSpad2Cmd| () "The top level quit command handler" (declare (special |$quitCommandType|)) @@ -22271,15 +22263,15 @@ o )system (tersyscommand)) (|leaveScratchpad|))) -@ +\end{chunk} \defunsec{leaveScratchpad}{Leave the Axiom interpreter} -<>= +\begin{chunk}{defun leaveScratchpad} (defun |leaveScratchpad| () "Leave the Axiom interpreter" (bye)) -@ +\end{chunk} This command is in the list of \verb|$noParseCommands| \ref{noParseCommands} which means that its arguments are passed @@ -22289,7 +22281,7 @@ verbatim. This will eventually result in a call to the function %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{read help page} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -<>= +\begin{chunk}{read.help} ==================================================================== A.20. )read ==================================================================== @@ -22326,17 +22318,17 @@ o )compile o )edit o )history -@ +\end{chunk} \footnote{ \fnref{edit} \fnref{history}} \defun{read}{The )read command} \calls{read}{readSpad2Cmd} -<>= +\begin{chunk}{defun read} (defun |read| (arg) (|readSpad2Cmd| arg)) -@ +\end{chunk} \defun{readSpad2Cmd}{Implement the )read command} \calls{readSpad2Cmd}{selectOptionLC} @@ -22357,7 +22349,7 @@ o )history \usesdollar{readSpad2Cmd}{UserLevel} \usesdollar{readSpad2Cmd}{options} \uses{readSpad2Cmd}{/editfile} -<>= +\begin{chunk}{defun readSpad2Cmd} (defun |readSpad2Cmd| (arg) (prog (|$InteractiveMode| fullopt ifthere quiet ef devFTs fileTypes ll ft upft fs) @@ -22401,12 +22393,12 @@ o )history (when (string= upft "BOOT") (setq |$InteractiveMode| nil)) (/read ll quiet))))) -@ +\end{chunk} \defun{/read}{/read} \calls{/read}{} \uses{/read}{/editfile} -<>= +\begin{chunk}{defun /read} (defun /read (l q) (declare (special /editfile)) (setq /editfile l) @@ -22418,12 +22410,12 @@ o )history (|spadPrompt|)) -@ +\end{chunk} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{savesystem help page} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -<>= +\begin{chunk}{savesystem.help} ==================================================================== A.8. )savesystem ==================================================================== @@ -22454,24 +22446,24 @@ were already loaded when the system was saved. There is currently a restriction that only systems started with the command "AXIOMsys" may be saved. -@ +\end{chunk} \defun{savesystem}{The )savesystem command} \calls{savesystem}{nequal} \calls{savesystem}{helpSpad2Cmd} \calls{savesystem}{spad-save} -<>= +\begin{chunk}{defun savesystem} (defun |savesystem| (arg) (if (or (nequal (|#| arg) 1) (null (symbolp (car arg)))) (|helpSpad2Cmd| '(|savesystem|)) (spad-save (symbol-name (car arg))))) -@ +\end{chunk} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{set help page} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -<>= +\begin{chunk}{set.help} ==================================================================== A.21. )set ==================================================================== @@ -22525,7 +22517,7 @@ prompted for verification), you need only issue Also See: o )quit -@ +\end{chunk} \footnote{\fnref{quit}} \section{Overview} @@ -22572,7 +22564,7 @@ explanations see the list structure section \ref{Theliststructure}. \calls{initializeSetVariables}{translateYesNo2TrueFalse} \calls{initializeSetVariables}{tree} \calls{initializeSetVariables}{initializeSetVariables} -<>= +\begin{chunk}{defun initializeSetVariables} (defun |initializeSetVariables| (settree) "Initialize the set variables" (dolist (setdata settree) @@ -22588,7 +22580,7 @@ explanations see the list structure section \ref{Theliststructure}. (set (fifth setdata) (|translateYesNo2TrueFalse| (seventh setdata)))) (tree (|initializeSetVariables| (sixth setdata)))))) -@ +\end{chunk} \defunsec{resetWorkspaceVariables}{Reset the workspace variables} \calls{resetWorkspaceVariables}{copy} @@ -22619,7 +22611,7 @@ explanations see the list structure section \ref{Theliststructure}. \usesdollar{resetWorkspaceVariables}{e} \usesdollar{resetWorkspaceVariables}{env} \usesdollar{resetWorkspaceVariables}{setOptions} -<>= +\begin{chunk}{defun resetWorkspaceVariables} (defun |resetWorkspaceVariables| () "Reset the workspace variables" (declare (special /countlist /editfile /sourcefiles |$sourceFiles| /pretty @@ -22655,7 +22647,7 @@ explanations see the list structure section \ref{Theliststructure}. (setq |$env| (cons (cons nil nil) nil)) (|initializeSetVariables| |$setOptions|)) -@ +\end{chunk} \defunsec{displaySetOptionInformation}{Display the set option information} \calls{displaySetOptionInformation}{displaySetVariableSettings} @@ -22672,7 +22664,7 @@ explanations see the list structure section \ref{Theliststructure}. \calls{displaySetOptionInformation}{literals} \calls{displaySetOptionInformation}{translateTrueFalse2YesNo} \usesdollar{displaySetOptionInformation}{linelength} -<>= +\begin{chunk}{defun displaySetOptionInformation} (defun |displaySetOptionInformation| (arg setdata) "Display the set option information" (let (current) @@ -22717,7 +22709,7 @@ explanations see the list structure section \ref{Theliststructure}. (|sayBrightly| (list " " (|object2String| name))))) (|sayMessage| " The current setting is indicated."))))))) -@ +\end{chunk} \defunsec{displaySetVariableSettings}{Display the set variable settings} \calls{displaySetVariableSettings}{concat} @@ -22738,7 +22730,7 @@ explanations see the list structure section \ref{Theliststructure}. \calls{displaySetVariableSettings}{translateTrueFalse2YesNo} \calls{displaySetVariableSettings}{tree} \usesdollar{displaySetVariableSettings}{linelength} -<>= +\begin{chunk}{defun displaySetVariableSettings} (defun |displaySetVariableSettings| (settree label) "Display the set variable settings" (let (setoption opt subtree subname) @@ -22801,11 +22793,11 @@ explanations see the list structure section \ref{Theliststructure}. " to see what the options are for" ,@(|bright| subname) "." |%l| "For more information, issue" ,@(|bright| ")help set") "."))))) -@ +\end{chunk} \defunsec{translateYesNo2TrueFalse}{Translate options values to t or nil} \calls{translateYesNo2TrueFalse}{member} -<>= +\begin{chunk}{defun translateYesNo2TrueFalse} (defun |translateYesNo2TrueFalse| (x) "Translate options values to t or nil" (cond @@ -22813,10 +22805,10 @@ explanations see the list structure section \ref{Theliststructure}. ((|member| x '(|no| |off|)) nil) (t x))) -@ +\end{chunk} \defunsec{translateTrueFalse2YesNo}{Translate t or nil to option values} -<>= +\begin{chunk}{defun translateTrueFalse2YesNo} (defun |translateTrueFalse2YesNo| (x) "Translate t or nil to option values" (cond @@ -22824,7 +22816,7 @@ explanations see the list structure section \ref{Theliststructure}. ((null x) '|off|) (t x))) -@ +\end{chunk} \section{The list structure} \label{Theliststructure} The structure of each list item consists of 7 items. Consider this @@ -22898,11 +22890,11 @@ These commands are restricted to keep the user from causing damage. \end{verbatim} \defdollar{BreakMode} -<>= +\begin{chunk}{initvars} (defvar |$BreakMode| '|nobreak| "execute break processing on error") -@ -<>= +\end{chunk} +\begin{chunk}{breakmode} (|breakmode| "execute break processing on error" |interpreter| @@ -22910,7 +22902,7 @@ These commands are restricted to keep the user from causing damage. |$BreakMode| (|nobreak| |break| |query| |resume| |fastlinks| |quit|) |nobreak|) ; needed to avoid possible startup looping -@ +\end{chunk} \section{debug} \begin{verbatim} Current Values of debug Variables @@ -22921,17 +22913,17 @@ lambdatype Show type information for #1 syntax off dalymode Interpret leading open paren as lisp off \end{verbatim} -<>= +\begin{chunk}{debug} (|debug| "debug options" |interpreter| TREE |novar| ( -<> -<> +\getchunk{debuglambdatype} +\getchunk{debugdalymode} )) -@ +\end{chunk} \section{debug lambda type} \begin{verbatim} ---------------------- The lambdatype Option ---------------------- @@ -22940,11 +22932,12 @@ dalymode Interpret leading open paren as lisp off \end{verbatim} \defdollar{lambdatype} -<>= +\begin{chunk}{initvars} (defvar $lambdatype nil "show type information for #1 syntax") -@ -<>= +\end{chunk} + +\begin{chunk}{debuglambdatype} (|lambdatype| "show type information for #1 syntax" |interpreter| @@ -22952,7 +22945,7 @@ dalymode Interpret leading open paren as lisp off $lambdatype (|on| |off|) |off|) -@ +\end{chunk} \section{debug dalymode} The \verb|$dalymode| variable is used in a case statement in intloopReadConsole. This variable can be set to any non-nil @@ -22973,11 +22966,11 @@ interpreter as parens are used for grouping expressions. \end{verbatim} \defdollar{dalymode} -<>= +\begin{chunk}{initvars} (defvar $dalymode nil "Interpret leading open paren as lisp") -@ -<>= +\end{chunk} +\begin{chunk}{debugdalymode} (|dalymode| "Interpret leading open paren as lisp" |interpreter| @@ -22985,7 +22978,7 @@ interpreter as parens are used for grouping expressions. $dalymode (|on| |off|) |off|) -@ +\end{chunk} \section{compile} \begin{verbatim} Current Values of compiler Variables @@ -22996,17 +22989,17 @@ output library in which to place compiled code input controls libraries from which to load compiled code \end{verbatim} -<>= +\begin{chunk}{compile} (|compiler| "Library compiler options" |interpreter| TREE |novar| ( -<> -<> +\getchunk{compileoutput} +\getchunk{compileinput} )) -@ +\end{chunk} \section{compile output} \begin{verbatim} ---------------------- The output Option ---------------------- @@ -23014,7 +23007,7 @@ input controls libraries from which to load compiled code Description: library in which to place compiled code \end{verbatim} -<>= +\begin{chunk}{compileoutput} (|output| "library in which to place compiled code" |interpreter| @@ -23023,7 +23016,7 @@ input controls libraries from which to load compiled code NIL |htSetOutputLibrary| ) -@ +\end{chunk} \section{Variables Used} \section{Functions} \defunsec{setOutputLibrary}{The set output command handler} @@ -23032,7 +23025,7 @@ input controls libraries from which to load compiled code \calls{setOutputLibrary}{filep} \calls{setOutputLibrary}{openOutputLibrary} \usesdollar{setOutputLibrary}{outputLibraryName} -<>= +\begin{chunk}{defun setOutputLibrary} (defun |setOutputLibrary| (arg) "The set output command handler" (let (fn) @@ -23047,11 +23040,11 @@ input controls libraries from which to load compiled code (setq fn (truename fn))) (|openOutputLibrary| (setq |$outputLibraryName| fn)))))) -@ +\end{chunk} \defunsec{describeOutputLibraryArgs}{Describe the set output library arguments} \calls{describeOutputLibraryArgs}{sayBrightly} -<>= +\begin{chunk}{defun describeOutputLibraryArgs} (defun |describeOutputLibraryArgs| () "Describe the set output library arguments" (|sayBrightly| (list @@ -23062,20 +23055,20 @@ input controls libraries from which to load compiled code '|%b| "user.lib" '|%d| "in the current directory."))) -@ +\end{chunk} \defvar{output-library} -<>= +\begin{chunk}{initvars} (defvar output-library nil) -@ +\end{chunk} \defunsec{openOutputLibrary}{Open the output library} The input-libraries and output-library are now truename based. \calls{openOutputLibrary}{dropInputLibrary} \uses{openOutputLibrary}{output-library} \uses{openOutputLibrary}{input-libraries} -<>= +\begin{chunk}{defun openOutputLibrary} (defun |openOutputLibrary| (lib) "Open the output library" (declare (special output-library input-libraries)) @@ -23083,7 +23076,7 @@ The input-libraries and output-library are now truename based. (setq output-library (truename lib)) (push output-library input-libraries)) -@ +\end{chunk} \section{compile input} \begin{verbatim} @@ -23097,7 +23090,7 @@ The input-libraries and output-library are now truename based. )set compile input drop library is used to tell AXIOM to remove library from this path. \end{verbatim} -<>= +\begin{chunk}{compileinput} (|input| "controls libraries from which to load compiled code" |interpreter| @@ -23105,7 +23098,7 @@ The input-libraries and output-library are now truename based. |setInputLibrary| NIL |htSetInputLibrary|) -@ +\end{chunk} \section{Variables Used} \section{Functions} @@ -23120,7 +23113,7 @@ The input-libraries is now maintained as a list of truenames. \calls{setInputLibrary}{dropInputLibrary} \calls{setInputLibrary}{setInputLibrary} \uses{setInputLibrary}{input-libraries} -<>= +\begin{chunk}{defun setInputLibrary} (defun |setInputLibrary| (arg) "The set input library command handler" (declare (special input-libraries)) @@ -23145,11 +23138,11 @@ The input-libraries is now maintained as a list of truenames. (|dropInputLibrary| (truename (princ-to-string filename)))))) (t (|setInputLibrary| nil))))) -@ +\end{chunk} \defunsec{describeInputLibraryArgs}{Describe the set input library arguments} \calls{describeInputLibraryArgs}{sayBrightly} -<>= +\begin{chunk}{defun describeInputLibraryArgs} (defun |describeInputLibraryArgs| () "Describe the set input library arguments" (|sayBrightly| (list @@ -23165,36 +23158,36 @@ The input-libraries is now maintained as a list of truenames. '|%d| '|%l| "from this path."))) -@ +\end{chunk} \defunsec{addInputLibrary}{Add the input library to the list} The input-libraries variable is now maintained as a list of truenames. \calls{addInputLibrary}{dropInputLibrary} \uses{addInputLibrary}{input-libraries} -<>= +\begin{chunk}{defun addInputLibrary} (defun |addInputLibrary| (lib) "Add the input library to the list" (declare (special input-libraries)) (|dropInputLibrary| lib) (push (truename lib) input-libraries)) -@ +\end{chunk} \defvar{input-libraries} -<>= +\begin{chunk}{initvars} (defvar input-libraries nil) -@ +\end{chunk} \defunsec{dropInputLibrary}{Drop an input library from the list} \uses{dropInputLibrary}{input-libraries} -<>= +\begin{chunk}{defun dropInputLibrary} (defun |dropInputLibrary| (lib) "Drop an input library from the list" (declare (special input-libraries)) (setq input-libraries (delete (truename lib) input-libraries :test #'equal))) -@ +\end{chunk} \section{expose} \begin{verbatim} @@ -23226,7 +23219,7 @@ The input-libraries variable is now maintained as a list of truenames. )set expose add or )set expose drop for more information. \end{verbatim} -<>= +\begin{chunk}{expose} (|expose| "control interpreter constructor exposure" |interpreter| @@ -23234,14 +23227,14 @@ The input-libraries variable is now maintained as a list of truenames. |setExpose| NIL |htSetExpose|) -@ +\end{chunk} \section{Variables Used} NOTE: If you add new algebra you must also update this list otherwise the new algebra won't be loaded by the interpreter when needed. \defdollar{globalExposureGroupAlist} -<>= +\begin{chunk}{initvars} (defvar |$globalExposureGroupAlist| '( ;;define the groups |basic| |naglink| |anna| |categories| |Hidden| |defaults| @@ -24523,10 +24516,10 @@ otherwise the new algebra won't be loaded by the interpreter when needed. (|VectorCategory&| . VECTCAT-) (|VectorSpace&| . VSPACE-)))) -@ +\end{chunk} \defdollar{localExposureDataDefault} -<>= +\begin{chunk}{initvars} (defvar |$localExposureDataDefault| (vector ;;These groups will be exposed @@ -24536,13 +24529,13 @@ otherwise the new algebra won't be loaded by the interpreter when needed. ;;These constructors will be explicitly hidden (list ))) -@ +\end{chunk} \defdollar{localExposureData} -<>= +\begin{chunk}{initvars} (defvar |$localExposureData| (copy-seq |$localExposureDataDefault|)) -@ +\end{chunk} \section{Functions} \defunsec{setExpose}{The top level set expose command handler} @@ -24560,7 +24553,7 @@ otherwise the new algebra won't be loaded by the interpreter when needed. \calls{setExpose}{setExposeAdd} \calls{setExpose}{setExposeDrop} \calls{setExpose}{setExpose} -<>= +\begin{chunk}{defun setExpose} (defun |setExpose| (arg) "The top level set expose command handler" (let (fnargs fn) @@ -24583,7 +24576,7 @@ otherwise the new algebra won't be loaded by the interpreter when needed. (t nil))) (t (|setExpose| nil))))) -@ +\end{chunk} \defunsec{setExposeAdd}{The top level set expose add command handler} \calls{setExposeAdd}{centerAndHighlight} @@ -24600,7 +24593,7 @@ otherwise the new algebra won't be loaded by the interpreter when needed. \calls{setExposeAdd}{setExposeAddConstr} \calls{setExposeAdd}{setExposeAdd} \usesdollar{setExposeAdd}{linelength} -<>= +\begin{chunk}{defun setExposeAdd} (defun |setExposeAdd| (arg) "The top level set expose add command handler" (declare (special $linelength)) @@ -24623,7 +24616,7 @@ otherwise the new algebra won't be loaded by the interpreter when needed. (t nil))) (t (|setExposeAdd| nil))))) -@ +\end{chunk} \defunsec{setExposeAddGroup}{Expose a group} Note that \verb|$localExposureData| is a vector of lists. @@ -24650,7 +24643,7 @@ It consists of [exposed groups,exposed constructors,hidden constructors] \usesdollar{setExposeAddGroup}{localExposureData} \usesdollar{setExposeAddGroup}{interpreterFrameName} \usesdollar{setExposeAddGroup}{linelength} -<>= +\begin{chunk}{defun setExposeAddGroup} (defun |setExposeAddGroup| (arg) "Expose a group" (declare (special |$globalExposureGroupAlist| |$localExposureData| @@ -24688,7 +24681,7 @@ It consists of [exposed groups,exposed constructors,hidden constructors] (|sayKeyedMsg| 's2iz0049r (list x |$interpreterFrameName|)) (|clearClams|)))))) -@ +\end{chunk} \defunsec{setExposeAddConstr}{The top level set expose add constructor handler} \calls{setExposeAddConstr}{unabbrev} @@ -24707,7 +24700,7 @@ It consists of [exposed groups,exposed constructors,hidden constructors] \usesdollar{setExposeAddConstr}{linelength} \usesdollar{setExposeAddConstr}{localExposureData} \usesdollar{setExposeAddConstr}{interpreterFrameName} -<>= +\begin{chunk}{defun setExposeAddConstr} (defun |setExposeAddConstr| (arg) "The top level set expose add constructor handler" (declare (special $linelength |$localExposureData| |$interpreterFrameName|)) @@ -24733,7 +24726,7 @@ It consists of [exposed groups,exposed constructors,hidden constructors] (|clearClams|) (|sayKeyedMsg| 's2iz0049p (list x |$interpreterFrameName| ))))))) -@ +\end{chunk} \defunsec{setExposeDrop}{The top level set expose drop handler} \calls{setExposeDrop}{centerAndHighlight} @@ -24749,7 +24742,7 @@ It consists of [exposed groups,exposed constructors,hidden constructors] \calls{setExposeDrop}{setExposeDropConstr} \calls{setExposeDrop}{setExposeDrop} \usesdollar{setExposeDrop}{linelength} -<>= +\begin{chunk}{defun setExposeDrop} (defun |setExposeDrop| (arg) "The top level set expose drop handler" (declare (special $linelength)) @@ -24770,7 +24763,7 @@ It consists of [exposed groups,exposed constructors,hidden constructors] (t nil))) (t (|setExposeDrop| nil))))) -@ +\end{chunk} \defunsec{setExposeDropGroup}{The top level set expose drop group handler} \calls{setExposeDropGroup}{pairp} @@ -24791,7 +24784,7 @@ It consists of [exposed groups,exposed constructors,hidden constructors] \usesdollar{setExposeDropGroup}{localExposureData} \usesdollar{setExposeDropGroup}{interpreterFrameName} \usesdollar{setExposeDropGroup}{globalExposureGroupAlist} -<>= +\begin{chunk}{defun setExposeDropGroup} (defun |setExposeDropGroup| (arg) "The top level set expose drop group handler" (declare (special $linelength |$localExposureData| |$interpreterFrameName| @@ -24825,7 +24818,7 @@ It consists of [exposed groups,exposed constructors,hidden constructors] (|sayKeyedMsg| 's2iz0049i (list x |$interpreterFrameName| ))) (t (|sayKeyedMsg| 's2iz0049h (list x ))))))) -@ +\end{chunk} \defunsec{setExposeDropConstr} {The top level set expose drop constructor handler} \calls{setExposeDropConstr}{unabbrev} @@ -24846,7 +24839,7 @@ It consists of [exposed groups,exposed constructors,hidden constructors] \usesdollar{setExposeDropConstr}{linelength} \usesdollar{setExposeDropConstr}{localExposureData} \usesdollar{setExposeDropConstr}{interpreterFrameName} -<>= +\begin{chunk}{defun setExposeDropConstr} (defun |setExposeDropConstr| (arg) "The top level set expose drop constructor handler" (declare (special $linelength |$localExposureData| |$interpreterFrameName|)) @@ -24876,14 +24869,14 @@ It consists of [exposed groups,exposed constructors,hidden constructors] (|clearClams|) (|sayKeyedMsg| 's2iz0049q (list x |$interpreterFrameName|))))))) -@ +\end{chunk} \defunsec{displayExposedGroups}{Display exposed groups} \calls{displayExposedGroups}{sayKeyedMsg} \calls{displayExposedGroups}{centerAndHighlight} \usesdollar{displayExposedGroups}{interpreterFrameName} \usesdollar{displayExposedGroups}{localExposureData} -<>= +\begin{chunk}{defun displayExposedGroups} (defun |displayExposedGroups| () "Display exposed groups" (declare (special |$interpreterFrameName| |$localExposureData|)) @@ -24893,13 +24886,13 @@ It consists of [exposed groups,exposed constructors,hidden constructors] (dolist (c (elt |$localExposureData| 0)) (|centerAndHighlight| c)))) -@ +\end{chunk} \defunsec{displayExposedConstructors}{Display exposed constructors} \calls{displayExposedConstructors}{sayKeyedMsg} \calls{displayExposedConstructors}{centerAndHighlight} \usesdollar{displayExposedConstructors}{localExposureData} -<>= +\begin{chunk}{defun displayExposedConstructors} (defun |displayExposedConstructors| () "Display exposed constructors" (declare (special |$localExposureData|)) @@ -24909,13 +24902,13 @@ It consists of [exposed groups,exposed constructors,hidden constructors] (dolist (c (elt |$localExposureData| 1)) (|centerAndHighlight| c)))) -@ +\end{chunk} \defunsec{displayHiddenConstructors}{Display hidden constructors} \calls{displayHiddenConstructors}{sayKeyedMsg} \calls{displayHiddenConstructors}{centerAndHighlight} \usesdollar{displayHiddenConstructors}{localExposureData} -<>= +\begin{chunk}{defun displayHiddenConstructors} (defun |displayHiddenConstructors| () "Display hidden constructors" (declare (special |$localExposureData|)) @@ -24925,7 +24918,7 @@ It consists of [exposed groups,exposed constructors,hidden constructors] (dolist (c (elt |$localExposureData| 2)) (|centerAndHighlight| c)))) -@ +\end{chunk} \section{functions} \begin{verbatim} Current Values of functions Variables @@ -24937,18 +24930,19 @@ compile compile, don't just define function bodies off recurrence specially compile recurrence relations on \end{verbatim} -<>= +\begin{chunk}{functions} (|functions| "some interpreter function options" |interpreter| TREE |novar| ( -<> -<> -<> +\getchunk{functionscache} +\getchunk{functionscompile} +\getchunk{functionsrecurrence} )) -@ + +\end{chunk} \section{functions cache} \begin{verbatim} ---------------------- The cache Option ----------------------- @@ -24971,7 +24965,7 @@ recurrence specially compile recurrence relations on In general, functions will cache no returned values. \end{verbatim} -<>= +\begin{chunk}{functionscache} (|cache| "number of function results to cache" |interpreter| @@ -24979,13 +24973,13 @@ recurrence specially compile recurrence relations on |setFunctionsCache| NIL |htSetCache|) -@ +\end{chunk} \section{Variables Used} \defdollar{cacheAlist} -<>= +\begin{chunk}{initvars} (defvar |$cacheAlist| nil) -@ +\end{chunk} \section{Functions} \defunsec{setFunctionsCache}{The top level set functions cache handler} @@ -25001,7 +24995,7 @@ recurrence specially compile recurrence relations on \usesdollar{setFunctionsCache}{options} \usesdollar{setFunctionsCache}{cacheCount} \usesdollar{setFunctionsCache}{cacheAlist} -<>= +\begin{chunk}{defun setFunctionsCache} (defun |setFunctionsCache| (arg) "The top level set functions cache handler" (let (|$options| n) @@ -25030,7 +25024,7 @@ recurrence specially compile recurrence relations on (when (cdr arg) (list (cons '|vars| (cdr arg)))) (|countCache| n))))))) -@ +\end{chunk} \defunsec{countCache}{Display a particular cache count} \calls{countCache}{pairp} @@ -25045,7 +25039,7 @@ recurrence specially compile recurrence relations on \usesdollar{countCache}{options} \usesdollar{countCache}{cacheAlist} \usesdollar{countCache}{cacheCount} -<>= +\begin{chunk}{defun countCache} (defun |countCache| (n) "Display a particular cache count" (let (tmp1 l cachecountname) @@ -25072,11 +25066,11 @@ recurrence specially compile recurrence relations on (t (|sayCacheCount| nil (setq |$cacheCount| n)))))) -@ +\end{chunk} \defunsec{describeSetFunctionsCache}{Describe the set functions cache} \calls{describeSetFunctionsCache}{sayBrightly} -<>= +\begin{chunk}{defun describeSetFunctionsCache} (defun |describeSetFunctionsCache| () "Describe the set functions cache" (|sayBrightly| (list @@ -25099,14 +25093,14 @@ recurrence specially compile recurrence relations on '|%l| " Examples:" '|%l| " )set fun cache all )set fun cache 10 f g Legendre"))) -@ +\end{chunk} \defunsec{sayAllCacheCounts}{Display all cache counts} \calls{sayAllCacheCounts}{sayCacheCount} \calls{sayAllCacheCounts}{nequal} \usesdollar{sayAllCacheCounts}{cacheCount} \usesdollar{sayAllCacheCounts}{cacheAlist} -<>= +\begin{chunk}{defun sayAllCacheCounts} (defun |sayAllCacheCounts| () "Display all cache counts" (let (x n) @@ -25122,13 +25116,13 @@ recurrence specially compile recurrence relations on nil) (when (nequal n |$cacheCount|) (|sayCacheCount| x n)))))) -@ +\end{chunk} \defunsec{sayCacheCount}{Describe the cache counts} \calls{sayCacheCount}{bright} \calls{sayCacheCount}{linearFormatName} \calls{sayCacheCount}{sayBrightly} -<>= +\begin{chunk}{defun sayCacheCount} (defun |sayCacheCount| (fn n) "Describe the cache counts" (let (prefix phrase) @@ -25155,7 +25149,7 @@ recurrence specially compile recurrence relations on (|sayBrightly| `(" " ,@prefix "will cache" ,@phrase)))))) -@ +\end{chunk} \section{functions compile} \begin{verbatim} @@ -25172,12 +25166,12 @@ recurrence specially compile recurrence relations on \end{verbatim} \defdollar{compileDontDefineFunctions} -<>= +\begin{chunk}{initvars} (defvar |$compileDontDefineFunctions| t "compile, don't just define function bodies") -@ -<>= +\end{chunk} +\begin{chunk}{functionscompile} (|compile| "compile, don't just define function bodies" |interpreter| @@ -25185,7 +25179,7 @@ recurrence specially compile recurrence relations on |$compileDontDefineFunctions| (|on| |off|) |on|) -@ +\end{chunk} \section{functions recurrence} \begin{verbatim} -------------------- The recurrence Option -------------------- @@ -25202,11 +25196,11 @@ recurrence specially compile recurrence relations on \end{verbatim} \defdollar{compileRecurrence} -<>= +\begin{chunk}{initvars} (defvar |$compileRecurrence| t "specially compile recurrence relations") -@ -<>= +\end{chunk} +\begin{chunk}{functionsrecurrence} (|recurrence| "specially compile recurrence relations" |interpreter| @@ -25214,7 +25208,7 @@ recurrence specially compile recurrence relations on |$compileRecurrence| (|on| |off|) |on|) -@ +\end{chunk} \section{fortran} \begin{verbatim} Current Values of fortran Variables @@ -25239,27 +25233,28 @@ For example, issue )set calling to see what the options are for calling. For more information, issue )help set . \end{verbatim} -<>= +\begin{chunk}{fortran} (|fortran| "view and set options for FORTRAN output" |interpreter| TREE |novar| ( -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> +\getchunk{fortranints2floats} +\getchunk{fortranfortindent} +\getchunk{fortranfortlength} +\getchunk{fortrantypedecs} +\getchunk{fortrandefaulttype} +\getchunk{fortranprecision} +\getchunk{fortranintrinsic} +\getchunk{fortranexplength} +\getchunk{fortransegment} +\getchunk{fortranoptlevel} +\getchunk{fortranstartindex} +\getchunk{fortrancalling} )) -@ + +\end{chunk} \subsection{ints2floats} \begin{verbatim} ------------------- The ints2floats Option -------------------- @@ -25276,11 +25271,11 @@ For more information, issue )help set . \end{verbatim} \defdollar{fortInts2Floats} -<>= +\begin{chunk}{initvars} (defvar |$fortInts2Floats| t "where sensible, coerce integers to reals") -@ -<>= +\end{chunk} +\begin{chunk}{fortranints2floats} (|ints2floats| "where sensible, coerce integers to reals" |interpreter| @@ -25288,7 +25283,7 @@ For more information, issue )help set . |$fortInts2Floats| (|on| |off|) |on|) -@ +\end{chunk} \subsection{fortindent} \begin{verbatim} -------------------- The fortindent Option -------------------- @@ -25300,11 +25295,11 @@ For more information, issue )help set . \end{verbatim} \defdollar{fortIndent} -<>= +\begin{chunk}{initvars} (defvar |$fortIndent| 6 "the number of characters indented") -@ -<>= +\end{chunk} +\begin{chunk}{fortranfortindent} (|fortindent| "the number of characters indented" |interpreter| @@ -25312,7 +25307,7 @@ For more information, issue )help set . |$fortIndent| (0 NIL) 6) -@ +\end{chunk} \subsection{fortlength} \begin{verbatim} -------------------- The fortlength Option -------------------- @@ -25324,11 +25319,11 @@ For more information, issue )help set . \end{verbatim} \defdollar{fortLength} -<>= +\begin{chunk}{initvars} (defvar |$fortLength| 72 "the number of characters on a line") -@ -<>= +\end{chunk} +\begin{chunk}{fortranfortlength} (|fortlength| "the number of characters on a line" |interpreter| @@ -25336,7 +25331,7 @@ For more information, issue )help set . |$fortLength| (1 NIL) 72) -@ +\end{chunk} \subsection{typedecs} \begin{verbatim} --------------------- The typedecs Option --------------------- @@ -25353,11 +25348,11 @@ For more information, issue )help set . \end{verbatim} \defdollar{printFortranDecs} -<>= +\begin{chunk}{initvars} (defvar |$printFortranDecs| t "print type and dimension lines") -@ -<>= +\end{chunk} +\begin{chunk}{fortrantypedecs} (|typedecs| "print type and dimension lines" |interpreter| @@ -25365,7 +25360,7 @@ For more information, issue )help set . |$printFortranDecs| (|on| |off|) |on|) -@ +\end{chunk} \subsection{defaulttype} \begin{verbatim} ------------------- The defaulttype Option -------------------- @@ -25385,11 +25380,11 @@ For more information, issue )help set . \end{verbatim} \defdollar{defaultFortranType} -<>= +\begin{chunk}{initvars} (defvar |$defaultFortranType| 'real "default generic type for FORTRAN object") -@ -<>= +\end{chunk} +\begin{chunk}{fortrandefaulttype} (|defaulttype| "default generic type for FORTRAN object" |interpreter| @@ -25397,7 +25392,7 @@ For more information, issue )help set . |$defaultFortranType| (REAL INTEGER COMPLEX LOGICAL CHARACTER) REAL) -@ +\end{chunk} \subsection{precision} \begin{verbatim} -------------------- The precision Option --------------------- @@ -25414,11 +25409,11 @@ For more information, issue )help set . \end{verbatim} \defdollar{fortranPrecision} -<>= +\begin{chunk}{initvars} (defvar |$fortranPrecision| '|double| "precision of generated FORTRAN objects") -@ -<>= +\end{chunk} +\begin{chunk}{fortranprecision} (|precision| "precision of generated FORTRAN objects" |interpreter| @@ -25426,7 +25421,7 @@ For more information, issue )help set . |$fortranPrecision| (|single| |double|) |double|) -@ +\end{chunk} \subsection{intrinsic} \begin{verbatim} -------------------- The intrinsic Option --------------------- @@ -25443,12 +25438,12 @@ For more information, issue )help set . \end{verbatim} \defdollar{useIntrinsicFunctions} -<>= +\begin{chunk}{initvars} (defvar |$useIntrinsicFunctions| nil "whether to use INTRINSIC FORTRAN functions") -@ -<>= +\end{chunk} +\begin{chunk}{fortranintrinsic} (|intrinsic| "whether to use INTRINSIC FORTRAN functions" |interpreter| @@ -25456,7 +25451,7 @@ For more information, issue )help set . |$useIntrinsicFunctions| (|on| |off|) |off|) -@ +\end{chunk} \subsection{explength} \begin{verbatim} -------------------- The explength Option --------------------- @@ -25468,12 +25463,12 @@ For more information, issue )help set . \end{verbatim} \defdollar{maximumFortranExpressionLength} -<>= +\begin{chunk}{initvars} (defvar |$maximumFortranExpressionLength| 1320 "character limit for FORTRAN expressions") -@ -<>= +\end{chunk} +\begin{chunk}{fortranexplength} (|explength| "character limit for FORTRAN expressions" |interpreter| @@ -25481,7 +25476,7 @@ For more information, issue )help set . |$maximumFortranExpressionLength| (0 NIL) 1320) -@ +\end{chunk} \subsection{segment} \begin{verbatim} --------------------- The segment Option ---------------------- @@ -25497,11 +25492,11 @@ For more information, issue )help set . \end{verbatim} \defdollar{fortranSegment} -<>= +\begin{chunk}{initvars} (defvar |$fortranSegment| t "split long FORTRAN expressions") -@ -<>= +\end{chunk} +\begin{chunk}{fortransegment} (|segment| "split long FORTRAN expressions" |interpreter| @@ -25509,7 +25504,7 @@ For more information, issue )help set . |$fortranSegment| (|on| |off|) |on|) -@ +\end{chunk} \subsection{optlevel} \begin{verbatim} --------------------- The optlevel Option --------------------- @@ -25521,11 +25516,11 @@ For more information, issue )help set . \end{verbatim} \defdollar{fortranOptimizationLevel} -<>= +\begin{chunk}{initvars} (defvar |$fortranOptimizationLevel| 0 "FORTRAN optimisation level") -@ -<>= +\end{chunk} +\begin{chunk}{fortranoptlevel} (|optlevel| "FORTRAN optimisation level" |interpreter| @@ -25533,7 +25528,7 @@ For more information, issue )help set . |$fortranOptimizationLevel| (0 2) 0) -@ +\end{chunk} \subsection{startindex} \begin{verbatim} -------------------- The startindex Option -------------------- @@ -25545,11 +25540,11 @@ For more information, issue )help set . \end{verbatim} \defdollar{fortranArrayStartingIndex} -<>= +\begin{chunk}{initvars} (defvar |$fortranArrayStartingIndex| 1 "starting index for FORTRAN arrays") -@ -<>= +\end{chunk} +\begin{chunk}{fortranstartindex} (|startindex| "starting index for FORTRAN arrays" |interpreter| @@ -25557,7 +25552,7 @@ For more information, issue )help set . |$fortranArrayStartingIndex| (0 1) 1) -@ +\end{chunk} \subsection{calling} \begin{verbatim} Current Values of calling Variables @@ -25569,19 +25564,20 @@ directory set location of generated FORTRAN files ./ linker linker arguments (e.g. libraries to search) -lxlf \end{verbatim} -<>= +\begin{chunk}{fortrancalling} (|calling| "options for external FORTRAN calls" |interpreter| TREE |novar| ( -<> -<> -<> +\getchunk{callingtempfile} +\getchunk{callingdirectory} +\getchunk{callinglinker} ) ) -@ + +\end{chunk} \subsubsection{tempfile} \begin{verbatim} --------------------- The tempfile Option --------------------- @@ -25599,11 +25595,11 @@ linker linker arguments (e.g. libraries to search) -lxlf The current setting is /tmp/ \end{verbatim} \defdollar{fortranTmpDir} -<>= +\begin{chunk}{initvars} (defvar |$fortranTmpDir| "/tmp/" "set location of temporary data files") -@ -<>= +\end{chunk} +\begin{chunk}{callingtempfile} (|tempfile| "set location of temporary data files" |interpreter| @@ -25615,7 +25611,7 @@ linker linker arguments (e.g. libraries to search) -lxlf |chkDirectory| "/tmp/")) NIL) -@ +\end{chunk} \defunsec{setFortTmpDir}{The top level set fortran calling tempfile handler} \calls{setFortTmpDir}{pname} @@ -25624,7 +25620,7 @@ linker linker arguments (e.g. libraries to search) -lxlf \calls{setFortTmpDir}{sayBrightly} \calls{setFortTmpDir}{bright} \usesdollar{setFortTmpDir}{fortranTmpDir} -<>= +\begin{chunk}{defun setFortTmpDir} (defun |setFortTmpDir| (arg) "The top level set fortran calling tempfile handler" (let (mode) @@ -25644,22 +25640,22 @@ linker linker arguments (e.g. libraries to search) -lxlf (|describeSetFortTmpDir|)) (t (setq |$fortranTmpDir| mode))))) -@ +\end{chunk} \defunsec{validateOutputDirectory}{Validate the output directory} -<>= +\begin{chunk}{defun validateOutputDirectory} (defun |validateOutputDirectory| (x) "Validate the output directory" (let ((dirname (car x))) (when (and (pathname-directory dirname) (null (probe-file dirname))) dirname))) -@ +\end{chunk} \defunsec{describeSetFortTmpDir}{Describe the set fortran calling tempfile} \calls{describeSetFortTmpDir}{sayBrightly} \usesdollar{describeSetFortTmpDir}{fortranTmpDir} -<>= +\begin{chunk}{defun describeSetFortTmpDir} (defun |describeSetFortTmpDir| () "Describe the set fortran calling tempfile" (declare (special |$fortranTmpDir|)) @@ -25677,7 +25673,7 @@ linker linker arguments (e.g. libraries to search) -lxlf '|%b| |$fortranTmpDir| '|%d|))) -@ +\end{chunk} \subsubsection{directory} @@ -25697,11 +25693,11 @@ linker linker arguments (e.g. libraries to search) -lxlf The current setting is ./ \end{verbatim} \defdollar{fortranDirectory} -<>= +\begin{chunk}{initvars} (defvar |$fortranDirectory| "./" "set location of generated FORTRAN files") -@ -<>= +\end{chunk} +\begin{chunk}{callingdirectory} (|directory| "set location of generated FORTRAN files" |interpreter| @@ -25713,7 +25709,7 @@ linker linker arguments (e.g. libraries to search) -lxlf |chkDirectory| "./")) NIL) -@ +\end{chunk} \defun{setFortDir}{setFortDir} \calls{setFortDir}{pname} @@ -25722,7 +25718,7 @@ linker linker arguments (e.g. libraries to search) -lxlf \calls{setFortDir}{sayBrightly} \calls{setFortDir}{bright} \usesdollar{setFortDir}{fortranDirectory} -<>= +\begin{chunk}{defun setFortDir} (defun |setFortDir| (arg) (declare (special |$fortranDirectory|)) (let (mode) @@ -25741,11 +25737,11 @@ linker linker arguments (e.g. libraries to search) -lxlf (|describeSetFortDir|)) (t (setq |$fortranDirectory| mode))))) -@ +\end{chunk} \defun{describeSetFortDir}{describeSetFortDir} \calls{describeSetFortDir}{sayBrightly} \usesdollar{describeSetFortDir}{fortranDirectory} -<>= +\begin{chunk}{defun describeSetFortDir} (defun |describeSetFortDir| () (declare (special |$fortranDirectory|)) (|sayBrightly| (list @@ -25762,7 +25758,7 @@ linker linker arguments (e.g. libraries to search) -lxlf '|%b| |$fortranDirectory| '|%d|))) -@ +\end{chunk} \subsubsection{linker} \begin{verbatim} ---------------------- The linker Option ---------------------- @@ -25781,12 +25777,12 @@ linker linker arguments (e.g. libraries to search) -lxlf The current setting is -lxlf \end{verbatim} \defdollar{fortranLibraries} -<>= +\begin{chunk}{initvars} (defvar |$fortranLibraries| "-lxlf" "linker arguments (e.g. libraries to search)") -@ -<>= +\end{chunk} +\begin{chunk}{callinglinker} (|linker| "linker arguments (e.g. libraries to search)" |interpreter| @@ -25799,13 +25795,13 @@ linker linker arguments (e.g. libraries to search) -lxlf "-lxlf")) NIL ) -@ +\end{chunk} \defun{setLinkerArgs}{setLinkerArgs} \calls{setLinkerArgs}{object2String} \calls{setLinkerArgs}{describeSetLinkerArgs} \usesdollar{setLinkerArgs}{fortranLibraries} -<>= +\begin{chunk}{defun setLinkerArgs} (defun |setLinkerArgs| (arg) (declare (special |$fortranLibraries|)) (cond @@ -25817,12 +25813,12 @@ linker linker arguments (e.g. libraries to search) -lxlf (setq |$fortranLibraries| (car arg))) (t (|describeSetLinkerArgs|)))) -@ +\end{chunk} \defun{describeSetLinkerArgs}{describeSetLinkerArgs} \calls{describeSetLinkerArgs}{sayBrightly} \usesdollar{describeSetLinkerArgs}{fortranLibraries} -<>= +\begin{chunk}{defun describeSetLinkerArgs} (defun |describeSetLinkerArgs| () (declare (special |$fortranLibraries|)) (|sayBrightly| (list @@ -25842,7 +25838,7 @@ linker linker arguments (e.g. libraries to search) -lxlf '|%b| |$fortranLibraries| '|%d|))) -@ +\end{chunk} \section{kernel} \begin{verbatim} @@ -25854,18 +25850,19 @@ warn warn when re-definition is attempted off protect prevent re-definition of kernel functions off \end{verbatim} -<>= +\begin{chunk}{kernel} (|kernel| "library functions built into the kernel for efficiency" |interpreter| TREE |novar| ( -<> -<> +\getchunk{kernelwarn} +\getchunk{kernelprotect} ) ) -@ + +\end{chunk} \subsection{kernelwarn} \begin{verbatim} ----------------------- The warn Option ----------------------- @@ -25882,7 +25879,7 @@ To restore the default behaviour, he or she should issue the command: )set kernel warn off \end{verbatim} -<>= +\begin{chunk}{kernelwarn} (|warn| "warn when re-definition is attempted" |interpreter| @@ -25890,12 +25887,12 @@ command: |protectedSymbolsWarning| NIL |htSetKernelWarn|) -@ +\end{chunk} \defun{protectedSymbolsWarning}{protectedSymbolsWarning} \calls{protectedSymbolsWarning}{protected-symbol-warn} \calls{protectedSymbolsWarning}{describeProtectedSymbolsWarning} \calls{protectedSymbolsWarning}{translateYesNo2TrueFalse} -<>= +\begin{chunk}{defun protectedSymbolsWarning} (defun |protectedSymbolsWarning| (arg) (let (v) (cond @@ -25908,11 +25905,11 @@ command: (|describeProtectedSymbolsWarning|)) (t (protected-symbol-warn (|translateYesNo2TrueFalse| (car arg))))))) -@ +\end{chunk} \defun{describeProtectedSymbolsWarning}{describeProtectedSymbolsWarning} \calls{describeProtectedSymbolsWarning}{sayBrightly} -<>= +\begin{chunk}{defun describeProtectedSymbolsWarning} (defun |describeProtectedSymbolsWarning| () (|sayBrightly| (list "Some AXIOM library functions are compiled into the kernel for efficiency" @@ -25925,7 +25922,7 @@ command: '|%l| "To restore the default behaviour, he or she should issue the command:" '|%l| " )set kernel warn off"))) -@ +\end{chunk} \subsection{kernelprotect} \begin{verbatim} --------------------- The protect Option ---------------------- @@ -25941,7 +25938,7 @@ To restore the default behaviour, he or she should issue the command: )set kernel protect on \end{verbatim} -<>= +\begin{chunk}{kernelprotect} (|protect| "prevent re-definition of kernel functions" |interpreter| @@ -25949,13 +25946,13 @@ command: |protectSymbols| NIL |htSetKernelProtect|) -@ +\end{chunk} \defun{protectSymbols}{protectSymbols} \calls{protectSymbols}{protect-symbols} \calls{protectSymbols}{describeProtectSymbols} \calls{protectSymbols}{translateYesNo2TrueFalse} -<>= +\begin{chunk}{defun protectSymbols} (defun |protectSymbols| (arg) (let (v) (cond @@ -25968,10 +25965,10 @@ command: (|describeProtectSymbols|)) (t (protect-symbols (|translateYesNo2TrueFalse| (car arg))))))) -@ +\end{chunk} \defun{describeProtectSymbols}{describeProtectSymbols} \calls{describeProtectSymbols}{sayBrightly} -<>= +\begin{chunk}{defun describeProtectSymbols} (defun |describeProtectSymbols| () (|sayBrightly| (list "Some AXIOM library functions are compiled into the kernel for efficiency" @@ -25984,7 +25981,7 @@ command: "To restore the default behaviour, he or she should issue the command:" '|%l| " )set kernel protect on"))) -@ +\end{chunk} \section{hyperdoc} \begin{verbatim} Current Values of hyperdoc Variables @@ -25995,17 +25992,17 @@ fullscreen use full screen for this facility off mathwidth screen width for history output 120 \end{verbatim} -<>= +\begin{chunk}{hyperdoc} (|hyperdoc| "options in using HyperDoc" |interpreter| TREE |novar| ( -<> -<> +\getchunk{hyperdocfullscreen} +\getchunk{hyperdocmathwidth} )) -@ +\end{chunk} \subsection{fullscreen} \begin{verbatim} -------------------- The fullscreen Option -------------------- @@ -26022,11 +26019,11 @@ mathwidth screen width for history output 120 \end{verbatim} \defdollar{fullScreenSysVars} -<>= +\begin{chunk}{initvars} (defvar |$fullScreenSysVars| nil "use full screen for this facility") -@ -<>= +\end{chunk} +\begin{chunk}{hyperdocfullscreen} (|fullscreen| "use full screen for this facility" |interpreter| @@ -26034,7 +26031,7 @@ mathwidth screen width for history output 120 |$fullScreenSysVars| (|on| |off|) |off|) -@ +\end{chunk} \subsection{mathwidth} \begin{verbatim} -------------------- The mathwidth Option --------------------- @@ -26046,11 +26043,11 @@ mathwidth screen width for history output 120 \end{verbatim} \defdollar{historyDisplayWidth} -<>= +\begin{chunk}{initvars} (defvar |$historyDisplayWidth| 120 "screen width for history output") -@ -<>= +\end{chunk} +\begin{chunk}{hyperdocmathwidth} (|mathwidth| "screen width for history output" |interpreter| @@ -26058,7 +26055,7 @@ mathwidth screen width for history output 120 |$historyDisplayWidth| (0 NIL) 120) -@ +\end{chunk} \section{help} \begin{verbatim} Current Values of help Variables @@ -26068,16 +26065,17 @@ Variable Description Current Value fullscreen use fullscreen facility, if possible on \end{verbatim} -<>= +\begin{chunk}{help} (|help| "view and set some help options" |interpreter| TREE |novar| ( -<> +\getchunk{helpfullscreen} )) -@ + +\end{chunk} \subsection{fullscreen} \begin{verbatim} -------------------- The fullscreen Option -------------------- @@ -26094,11 +26092,11 @@ fullscreen use fullscreen facility, if possible on \end{verbatim} \defdollar{useFullScreenHelp} -<>= +\begin{chunk}{initvars} (defvar |$useFullScreenHelp| t "use fullscreen facility, if possible") -@ -<>= +\end{chunk} +\begin{chunk}{helpfullscreen} (|fullscreen| "use fullscreen facility, if possible" |interpreter| @@ -26106,7 +26104,7 @@ fullscreen use fullscreen facility, if possible on |$useFullScreenHelp| (|on| |off|) |on|) -@ +\end{chunk} \section{history} \begin{verbatim} --------------------- The history Option ---------------------- @@ -26123,11 +26121,11 @@ fullscreen use fullscreen facility, if possible on \end{verbatim} \defdollar{HiFiAccess} -<>= +\begin{chunk}{initvars} (defvar |$HiFiAccess| t "save workspace values in a history file") -@ -<>= +\end{chunk} +\begin{chunk}{history} (|history| "save workspace values in a history file" |interpreter| @@ -26135,7 +26133,7 @@ fullscreen use fullscreen facility, if possible on |$HiFiAccess| (|on| |off|) |on|) -@ +\end{chunk} \section{messages} \begin{verbatim} Current Values of messages Variables @@ -26167,38 +26165,39 @@ any print the internal type of objects of domain Any on naglink show NAGLink messages on \end{verbatim} -<>= +\begin{chunk}{messages} (|messages| "show messages for various system features" |interpreter| TREE |novar| ( -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> +\getchunk{messagesany} +\getchunk{messagesautoload} +\getchunk{messagesbottomup} +\getchunk{messagescoercion} +\getchunk{messagesdropmap} +\getchunk{messagesexpose} +\getchunk{messagesfile} +\getchunk{messagesframe} +\getchunk{messageshighlighting} +\getchunk{messagesinstant} +\getchunk{messagesinsteach} +\getchunk{messagesinterponly} +\getchunk{messagesnaglink} +\getchunk{messagesnumber} +\getchunk{messagesprompt} +\getchunk{messagesselection} +\getchunk{messagesset} +\getchunk{messagesstartup} +\getchunk{messagessummary} +\getchunk{messagestesting} +\getchunk{messagestime} +\getchunk{messagestype} +\getchunk{messagesvoid} )) -@ + +\end{chunk} \subsection{any} \begin{verbatim} ----------------------- The any Option ------------------------ @@ -26214,12 +26213,12 @@ naglink show NAGLink messages on \end{verbatim} \defdollar{printAnyIfTrue} -<>= +\begin{chunk}{initvars} (defvar |$printAnyIfTrue| t "print the internal type of objects of domain Any") -@ -<>= +\end{chunk} +\begin{chunk}{messagesany} (|any| "print the internal type of objects of domain Any" |interpreter| @@ -26227,7 +26226,7 @@ naglink show NAGLink messages on |$printAnyIfTrue| (|on| |off|) |on|) -@ +\end{chunk} \subsection{autoload} \begin{verbatim} --------------------- The autoload Option --------------------- @@ -26236,11 +26235,11 @@ naglink show NAGLink messages on \end{verbatim} \defdollar{printLoadMsgs} -<>= +\begin{chunk}{initvars} (defvar |$printLoadMsgs| nil "print file auto-load messages") -@ -<>= +\end{chunk} +\begin{chunk}{messagesautoload} (|autoload| "print file auto-load messages" |interpreter| @@ -26248,7 +26247,8 @@ naglink show NAGLink messages on |$printLoadMsgs| (|on| |off|) |on|) -@ + +\end{chunk} \subsection{bottomup} \begin{verbatim} @@ -26266,11 +26266,11 @@ naglink show NAGLink messages on \end{verbatim} \defdollar{reportBottomUpFlag} -<>= +\begin{chunk}{initvars} (defvar |$reportBottomUpFlag| nil "display bottom up modemap selection") -@ -<>= +\end{chunk} +\begin{chunk}{messagesbottomup} (|bottomup| "display bottom up modemap selection" |development| @@ -26278,7 +26278,8 @@ naglink show NAGLink messages on |$reportBottomUpFlag| (|on| |off|) |off|) -@ + +\end{chunk} \subsection{coercion} \begin{verbatim} --------------------- The coercion Option --------------------- @@ -26295,11 +26296,11 @@ naglink show NAGLink messages on \end{verbatim} \defdollar{reportCoerceIfTrue} -<>= +\begin{chunk}{initvars} (defvar |$reportCoerceIfTrue| nil "display datatype coercion messages") -@ -<>= +\end{chunk} +\begin{chunk}{messagescoercion} (|coercion| "display datatype coercion messages" |development| @@ -26307,7 +26308,8 @@ naglink show NAGLink messages on |$reportCoerceIfTrue| (|on| |off|) |off|) -@ + +\end{chunk} \subsection{dropmap} \begin{verbatim} --------------------- The dropmap Option ---------------------- @@ -26324,11 +26326,11 @@ naglink show NAGLink messages on \end{verbatim} \defdollar{displayDroppedMap} -<>= +\begin{chunk}{initvars} (defvar |$displayDroppedMap| nil "display old map defn when replaced") -@ -<>= +\end{chunk} +\begin{chunk}{messagesdropmap} (|dropmap| "display old map defn when replaced" |interpreter| @@ -26336,7 +26338,8 @@ naglink show NAGLink messages on |$displayDroppedMap| (|on| |off|) |off|) -@ + +\end{chunk} \subsection{expose} \begin{verbatim} ---------------------- The expose Option ---------------------- @@ -26353,11 +26356,11 @@ naglink show NAGLink messages on \end{verbatim} \defdollar{giveExposureWarning} -<>= +\begin{chunk}{initvars} (defvar |$giveExposureWarning| nil "warning for unexposed functions") -@ -<>= +\end{chunk} +\begin{chunk}{messagesexpose} (|expose| "warning for unexposed functions" |interpreter| @@ -26365,7 +26368,8 @@ naglink show NAGLink messages on |$giveExposureWarning| (|on| |off|) |off|) -@ + +\end{chunk} \subsection{file} \begin{verbatim} ----------------------- The file Option ----------------------- @@ -26382,11 +26386,11 @@ naglink show NAGLink messages on \end{verbatim} \defdollar{printMsgsToFile} -<>= +\begin{chunk}{initvars} (defvar |$printMsgsToFile| nil "print msgs also to SPADMSG LISTING") -@ -<>= +\end{chunk} +\begin{chunk}{messagesfile} (|file| "print msgs also to SPADMSG LISTING" |development| @@ -26394,7 +26398,8 @@ naglink show NAGLink messages on |$printMsgsToFile| (|on| |off|) |off|) -@ + +\end{chunk} \subsection{frame} \begin{verbatim} ---------------------- The frame Option ----------------------- @@ -26410,11 +26415,11 @@ naglink show NAGLink messages on \end{verbatim} \defdollar{frameMessages} -<>= +\begin{chunk}{initvars} (defvar |$frameMessages| nil "display messages about frames") -@ -<>= +\end{chunk} +\begin{chunk}{messagesframe} (|frame| "display messages about frames" |interpreter| @@ -26422,7 +26427,8 @@ naglink show NAGLink messages on |$frameMessages| (|on| |off|) |off|) -@ + +\end{chunk} \subsection{highlighting} \begin{verbatim} ------------------- The highlighting Option ------------------- @@ -26439,11 +26445,11 @@ naglink show NAGLink messages on \end{verbatim} \defdollar{highlightAllowed} -<>= +\begin{chunk}{initvars} (defvar |$highlightAllowed| nil "use highlighting in system messages") -@ -<>= +\end{chunk} +\begin{chunk}{messageshighlighting} (|highlighting| "use highlighting in system messages" |interpreter| @@ -26451,7 +26457,8 @@ naglink show NAGLink messages on |$highlightAllowed| (|on| |off|) |off|) -@ + +\end{chunk} \subsection{instant} \begin{verbatim} --------------------- The instant Option ---------------------- @@ -26468,11 +26475,11 @@ naglink show NAGLink messages on \end{verbatim} \defdollar{reportInstantiations} -<>= +\begin{chunk}{initvars} (defvar |$reportInstantiations| nil "present instantiation summary") -@ -<>= +\end{chunk} +\begin{chunk}{messagesinstant} (|instant| "present instantiation summary" |development| @@ -26480,7 +26487,8 @@ naglink show NAGLink messages on |$reportInstantiations| (|on| |off|) |off|) -@ + +\end{chunk} \subsection{insteach} \begin{verbatim} --------------------- The insteach Option --------------------- @@ -26497,11 +26505,11 @@ naglink show NAGLink messages on \end{verbatim} \defdollar{reportEachInstantiation|} -<>= +\begin{chunk}{initvars} (defvar |$reportEachInstantiation| nil "present instantiation info") -@ -<>= +\end{chunk} +\begin{chunk}{messagesinsteach} (|insteach| "present instantiation info" |development| @@ -26509,7 +26517,8 @@ naglink show NAGLink messages on |$reportEachInstantiation| (|on| |off|) |off|) -@ + +\end{chunk} \subsection{interponly} \begin{verbatim} -------------------- The interponly Option -------------------- @@ -26526,11 +26535,11 @@ naglink show NAGLink messages on \end{verbatim} \defdollar{reportInterpOnly} -<>= +\begin{chunk}{initvars} (defvar |$reportInterpOnly| t "say when function code is interpreted") -@ -<>= +\end{chunk} +\begin{chunk}{messagesinterponly} (|interponly| "say when function code is interpreted" |interpreter| @@ -26538,7 +26547,8 @@ naglink show NAGLink messages on |$reportInterpOnly| (|on| |off|) |on|) -@ + +\end{chunk} \subsection{naglink} \begin{verbatim} --------------------- The naglink Option ---------------------- @@ -26555,11 +26565,11 @@ naglink show NAGLink messages on \end{verbatim} \defdollar{nagMessages} -<>= +\begin{chunk}{initvars} (defvar |$nagMessages| t "show NAGLink messages") -@ -<>= +\end{chunk} +\begin{chunk}{messagesnaglink} (|naglink| "show NAGLink messages" |interpreter| @@ -26567,7 +26577,8 @@ naglink show NAGLink messages on |$nagMessages| (|on| |off|) |on|) -@ + +\end{chunk} \subsection{number} \begin{verbatim} ---------------------- The number Option ---------------------- @@ -26584,11 +26595,11 @@ naglink show NAGLink messages on \end{verbatim} \defdollar{displayMsgNumber} -<>= +\begin{chunk}{initvars} (defvar |$displayMsgNumber| nil "display message number with message") -@ -<>= +\end{chunk} +\begin{chunk}{messagesnumber} (|number| "display message number with message" |interpreter| @@ -26596,7 +26607,8 @@ naglink show NAGLink messages on |$displayMsgNumber| (|on| |off|) |off|) -@ + +\end{chunk} \subsection{prompt} \begin{verbatim} ---------------------- The prompt Option ---------------------- @@ -26615,11 +26627,11 @@ naglink show NAGLink messages on \end{verbatim} \defdollar{inputPromptType} -<>= +\begin{chunk}{initvars} (defvar |$inputPromptType| '|step| "set type of input prompt to display") -@ -<>= +\end{chunk} +\begin{chunk}{messagesprompt} (|prompt| "set type of input prompt to display" |interpreter| @@ -26627,7 +26639,8 @@ naglink show NAGLink messages on |$inputPromptType| (|none| |frame| |plain| |step| |verbose|) |step|) -@ + +\end{chunk} \subsection{selection} \begin{verbatim} -------------------- The selection Option --------------------- @@ -26649,7 +26662,7 @@ TPDHERE: This is a duplicate of )set mes bot on because both use the \index{\$reportBottomUpFlag} \index{defvar!\$reportBottomUpFlag} \index{\$reportBottomUpFlag!defvar} -<>= +\begin{chunk}{messagesselection} (|selection| "display function selection msgs" |interpreter| @@ -26657,7 +26670,8 @@ TPDHERE: This is a duplicate of )set mes bot on because both use the |$reportBottomUpFlag| (|on| |off|) |off|) -@ + +\end{chunk} \subsection{set} \begin{verbatim} ----------------------- The set Option ------------------------ @@ -26673,11 +26687,11 @@ TPDHERE: This is a duplicate of )set mes bot on because both use the \end{verbatim} \defdollar{displaySetValue} -<>= +\begin{chunk}{initvars} (defvar |$displaySetValue| nil "show )set setting after assignment") -@ -<>= +\end{chunk} +\begin{chunk}{messagesset} (|set| "show )set setting after assignment" |interpreter| @@ -26685,7 +26699,8 @@ TPDHERE: This is a duplicate of )set mes bot on because both use the |$displaySetValue| (|on| |off|) |off|) -@ + +\end{chunk} \subsection{startup} \begin{verbatim} --------------------- The startup Option ---------------------- @@ -26702,11 +26717,11 @@ TPDHERE: This is a duplicate of )set mes bot on because both use the \end{verbatim} \defdollar{displayStartMsgs} -<>= +\begin{chunk}{initvars} (defvar |$displayStartMsgs| t "display messages on start-up") -@ -<>= +\end{chunk} +\begin{chunk}{messagesstartup} (|startup| "display messages on start-up" |interpreter| @@ -26714,7 +26729,8 @@ TPDHERE: This is a duplicate of )set mes bot on because both use the |$displayStartMsgs| (|on| |off|) |on|) -@ + +\end{chunk} \subsection{summary} \begin{verbatim} --------------------- The summary Option ---------------------- @@ -26731,12 +26747,12 @@ TPDHERE: This is a duplicate of )set mes bot on because both use the \end{verbatim} \defdollar{printStatisticsSummaryIfTrue} -<>= +\begin{chunk}{initvars} (defvar |$printStatisticsSummaryIfTrue| nil "print statistics after computation") -@ -<>= +\end{chunk} +\begin{chunk}{messagessummary} (|summary| "print statistics after computation" |interpreter| @@ -26744,7 +26760,8 @@ TPDHERE: This is a duplicate of )set mes bot on because both use the |$printStatisticsSummaryIfTrue| (|on| |off|) |off|) -@ + +\end{chunk} \subsection{testing} \begin{verbatim} --------------------- The testing Option ---------------------- @@ -26761,11 +26778,11 @@ TPDHERE: This is a duplicate of )set mes bot on because both use the \end{verbatim} \defdollar{testingSystem} -<>= +\begin{chunk}{initvars} (defvar |$testingSystem| nil "print system testing header") -@ -<>= +\end{chunk} +\begin{chunk}{messagestesting} (|testing| "print system testing header" |development| @@ -26773,7 +26790,8 @@ TPDHERE: This is a duplicate of )set mes bot on because both use the |$testingSystem| (|on| |off|) |off|) -@ + +\end{chunk} \subsection{time} \begin{verbatim} ----------------------- The time Option ----------------------- @@ -26790,11 +26808,11 @@ TPDHERE: This is a duplicate of )set mes bot on because both use the \end{verbatim} \defdollar{printTimeIfTrue} -<>= +\begin{chunk}{initvars} (defvar |$printTimeIfTrue| nil "print timings after computation") -@ -<>= +\end{chunk} +\begin{chunk}{messagestime} (|time| "print timings after computation" |interpreter| @@ -26802,7 +26820,8 @@ TPDHERE: This is a duplicate of )set mes bot on because both use the |$printTimeIfTrue| (|on| |off| |long|) |off|) -@ + +\end{chunk} \subsection{type} \begin{verbatim} ----------------------- The type Option ----------------------- @@ -26818,11 +26837,11 @@ TPDHERE: This is a duplicate of )set mes bot on because both use the \end{verbatim} \defdollar{printTypeIfTrue} -<>= +\begin{chunk}{initvars} (defvar |$printTypeIfTrue| t "print type after computation") -@ -<>= +\end{chunk} +\begin{chunk}{messagestype} (|type| "print type after computation" |interpreter| @@ -26830,7 +26849,8 @@ TPDHERE: This is a duplicate of )set mes bot on because both use the |$printTypeIfTrue| (|on| |off|) |on|) -@ + +\end{chunk} \subsection{void} \begin{verbatim} ----------------------- The void Option ----------------------- @@ -26846,11 +26866,11 @@ TPDHERE: This is a duplicate of )set mes bot on because both use the \end{verbatim} \defdollar{printVoidIfTrue} -<>= +\begin{chunk}{initvars} (defvar |$printVoidIfTrue| nil "print Void value when it occurs") -@ -<>= +\end{chunk} +\begin{chunk}{messagesvoid} (|void| "print Void value when it occurs" |interpreter| @@ -26858,7 +26878,8 @@ TPDHERE: This is a duplicate of )set mes bot on because both use the |$printVoidIfTrue| (|on| |off|) |off|) -@ + +\end{chunk} \section{naglink} \begin{verbatim} Current Values of naglink Variables @@ -26871,19 +26892,20 @@ messages show NAGLink messages on double enforce DOUBLE PRECISION ASPs on \end{verbatim} -<>= +\begin{chunk}{naglink} (|naglink| "options for NAGLink" |interpreter| TREE |novar| ( -<> -<> -<> -<> +\getchunk{naglinkhost} +\getchunk{naglinkpersistence} +\getchunk{naglinkmessages} +\getchunk{naglinkdouble} )) -@ + +\end{chunk} \subsection{host} \begin{verbatim} ----------------------- The host Option ----------------------- @@ -26897,11 +26919,11 @@ double enforce DOUBLE PRECISION ASPs on The current setting is localhost \end{verbatim} \defdollar{nagHost} -<>= +\begin{chunk}{initvars} (defvar |$nagHost| "localhost" "internet address of host for NAGLink") -@ -<>= +\end{chunk} +\begin{chunk}{naglinkhost} (|host| "internet address of host for NAGLink" |interpreter| @@ -26913,13 +26935,14 @@ double enforce DOUBLE PRECISION ASPs on |chkDirectory| "localhost")) NIL) -@ + +\end{chunk} \defun{setNagHost}{setNagHost} \calls{setNagHost}{object2String} \calls{setNagHost}{describeSetNagHost} \usesdollar{setNagHost}{nagHost} -<>= +\begin{chunk}{defun setNagHost} (defun |setNagHost| (arg) (declare (special |$nagHost|)) (cond @@ -26929,12 +26952,12 @@ double enforce DOUBLE PRECISION ASPs on (|describeSetNagHost|)) (t (setq |$nagHost| (|object2String| arg))))) -@ +\end{chunk} \defun{describeSetNagHost}{describeSetNagHost} \calls{describeSetNagHost}{sayBrightly} \usesdollar{describeSetNagHost}{nagHost} -<>= +\begin{chunk}{defun describeSetNagHost} (defun |describeSetNagHost| () (declare (special |$nagHost|)) (|sayBrightly| (list @@ -26947,7 +26970,7 @@ double enforce DOUBLE PRECISION ASPs on '|%b| |$nagHost| '|%d|))) -@ +\end{chunk} \subsection{persistence} \begin{verbatim} @@ -26963,11 +26986,11 @@ double enforce DOUBLE PRECISION ASPs on The current setting is 1 \end{verbatim} \defdollar{fortPersistence} -<>= +\begin{chunk}{initvars} (defvar |$fortPersistence| 1 "number of (fortran) functions to remember") -@ -<>= +\end{chunk} +\begin{chunk}{naglinkpersistence} (|persistence| "number of (fortran) functions to remember" |interpreter| @@ -26979,7 +27002,8 @@ double enforce DOUBLE PRECISION ASPs on (0 NIL) 10)) NIL) -@ + +\end{chunk} \defun{setFortPers}{setFortPers} \calls{setFortPers}{describeFortPersistence} @@ -26987,7 +27011,7 @@ double enforce DOUBLE PRECISION ASPs on \calls{setFortPers}{bright} \calls{setFortPers}{terminateSystemCommand} \usesdollar{setFortPers}{fortPersistence} -<>= +\begin{chunk}{defun setFortPers} (defun |setFortPers| (arg) (let (n) (declare (special |$fortPersistence|)) @@ -27006,12 +27030,12 @@ double enforce DOUBLE PRECISION ASPs on (|terminateSystemCommand|)) (t (setq |$fortPersistence| (car arg)))))))) -@ +\end{chunk} \defun{describeFortPersistence}{describeFortPersistence} \calls{describeFortPersistence}{sayBrightly} \usesdollar{describeFortPersistence}{fortPersistence} -<>= +\begin{chunk}{defun describeFortPersistence} (defun |describeFortPersistence| () (declare (special |$fortPersistence|)) (|sayBrightly| (list @@ -27028,7 +27052,7 @@ double enforce DOUBLE PRECISION ASPs on '|%b| |$fortPersistence| '|%d|))) -@ +\end{chunk} \subsection{messages} \begin{verbatim} @@ -27049,7 +27073,7 @@ TPDHERE: this is the same as )set nag mes on \index{\$nagMessages} \index{defvar!\$nagMessages} \index{\$nagMessages!defvar} -<>= +\begin{chunk}{naglinkmessages} (|messages| "show NAGLink messages" |interpreter| @@ -27057,7 +27081,8 @@ TPDHERE: this is the same as )set nag mes on |$nagMessages| (|on| |off|) |on|) -@ + +\end{chunk} \subsection{double} \begin{verbatim} ---------------------- The double Option ---------------------- @@ -27073,11 +27098,11 @@ TPDHERE: this is the same as )set nag mes on \end{verbatim} \defdollar{nagEnforceDouble} -<>= +\begin{chunk}{initvars} (defvar |$nagEnforceDouble| t "enforce DOUBLE PRECISION ASPs") -@ -<>= +\end{chunk} +\begin{chunk}{naglinkdouble} (|double| "enforce DOUBLE PRECISION ASPs" |interpreter| @@ -27085,7 +27110,8 @@ TPDHERE: this is the same as )set nag mes on |$nagEnforceDouble| (|on| |off|) |on|) -@ + +\end{chunk} \section{output} The result of the {\bf )set output} command is: \begin{verbatim} @@ -27107,28 +27133,29 @@ tex create output in TeX style Off:CONSOLE \end{verbatim} Since the output option has a bunch of sub-options each suboption is defined within the output structure. -<>= +\begin{chunk}{output} (|output| "view and set some output options" |interpreter| TREE |novar| ( -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> +\getchunk{outputabbreviate} +\getchunk{outputalgebra} +\getchunk{outputcharacters} +\getchunk{outputfortran} +\getchunk{outputfraction} +\getchunk{outputhtml} +\getchunk{outputlength} +\getchunk{outputmathml} +\getchunk{outputopenmath} +\getchunk{outputscript} +\getchunk{outputscripts} +\getchunk{outputshoweditor} +\getchunk{outputtex} )) -@ + +\end{chunk} \subsection{abbreviate} \begin{verbatim} -------------------- The abbreviate Option -------------------- @@ -27144,11 +27171,11 @@ is defined within the output structure. The current setting is indicated. \end{verbatim} \defdollar{abbreviateTypes} -<>= +\begin{chunk}{initvars} (defvar |$abbreviateTypes| nil "abbreviate type names") -@ -<>= +\end{chunk} +\begin{chunk}{outputabbreviate} (|abbreviate| "abbreviate type names" |interpreter| @@ -27156,7 +27183,8 @@ is defined within the output structure. |$abbreviateTypes| (|on| |off|) |off|) -@ + +\end{chunk} \subsection{algebra} \begin{verbatim} --------------------- The algebra Option ---------------------- @@ -27190,17 +27218,17 @@ AXIOM or the one you set with the )cd system command. The current setting is: On:CONSOLE \end{verbatim} \defdollar{algebraFormat} -<>= +\begin{chunk}{initvars} (defvar |$algebraFormat| t "display output in algebraic form") -@ +\end{chunk} \defdollar{algebraOutputFile} -<>= +\begin{chunk}{initvars} (defvar |$algebraOutputFile| "CONSOLE" "where algebra printing goes (enter {\em console} or a pathname)?") -@ -<>= +\end{chunk} +\begin{chunk}{outputalgebra} (|algebra| "display output in algebraic form" |interpreter| @@ -27218,13 +27246,14 @@ The current setting is: On:CONSOLE |chkOutputFileName| "console")) NIL) -@ + +\end{chunk} \defdollar{algebraOutputStream} -<>= +\begin{chunk}{initvars} (defvar |$algebraOutputStream| *standard-output*) -@ +\end{chunk} \defun{setOutputAlgebra}{setOutputAlgebra} \calls{setOutputAlgebra}{defiostream} @@ -27247,7 +27276,7 @@ The current setting is: On:CONSOLE \usesdollar{setOutputAlgebra}{algebraOutputFile} \usesdollar{setOutputAlgebra}{filep} \usesdollar{setOutputAlgebra}{algebraFormat} -<>= +\begin{chunk}{defun setOutputAlgebra} (defun |setOutputAlgebra| (arg) (let (label tmp1 tmp2 ptype fn ft fm filename teststream) (declare (special |$algebraOutputStream| |$algebraOutputFile| $filep @@ -27325,12 +27354,12 @@ The current setting is: On:CONSOLE (|sayKeyedMsg| 's2iv0005 nil) (|describeSetOutputAlgebra|))))))) -@ +\end{chunk} \defun{describeSetOutputAlgebra}{describeSetOutputAlgebra} \calls{describeSetOutputAlgebra}{sayBrightly} \calls{describeSetOutputAlgebra}{setOutputAlgebra} -<>= +\begin{chunk}{defun describeSetOutputAlgebra} (defun |describeSetOutputAlgebra| () (|sayBrightly| (list '|%b| ")set output algebra" @@ -27365,7 +27394,7 @@ The current setting is: On:CONSOLE '|%b| (|setOutputAlgebra| '|%display%|) '|%d|))) -@ +\end{chunk} \subsection{characters} \begin{verbatim} @@ -27394,7 +27423,7 @@ The current setting is: On:CONSOLE ltee is shown as + ctee is shown as + bslash is shown as \ \end{verbatim} -<>= +\begin{chunk}{outputcharacters} (|characters| "choose special output character set" |interpreter| @@ -27402,7 +27431,8 @@ The current setting is: On:CONSOLE |setOutputCharacters| NIL |htSetOutputCharacters|) -@ + +\end{chunk} \defun{setOutputCharacters}{setOutputCharacters} \calls{setOutputCharacters}{sayMessage} @@ -27421,7 +27451,7 @@ The current setting is: On:CONSOLE \usesdollar{setOutputCharacters}{plainRTspecialCharacters} \usesdollar{setOutputCharacters}{RTspecialCharacters} \usesdollar{setOutputCharacters}{specialCharacterAlist} -<>= +\begin{chunk}{defun setOutputCharacters} (defun |setOutputCharacters| (arg) (let (current char s l fn) (declare (special |$specialCharacters| |$plainRTspecialCharacters| @@ -27472,7 +27502,7 @@ The current setting is: On:CONSOLE (t (|setOutputCharacters| nil)))) (t (|setOutputCharacters| nil))))))) -@ +\end{chunk} \subsection{fortran} \begin{verbatim} @@ -27509,17 +27539,17 @@ AXIOM or the one you set with the )cd system command. The current setting is: Off:CONSOLE \end{verbatim} \defdollar{fortranFormat} -<>= +\begin{chunk}{initvars} (defvar |$fortranFormat| nil "create output in FORTRAN format") -@ +\end{chunk} \defdollar{fortranOutputFile} -<>= +\begin{chunk}{initvars} (defvar |$fortranOutputFile| "CONSOLE" "where FORTRAN output goes (enter {\em console} or a a pathname)") -@ -<>= +\end{chunk} +\begin{chunk}{outputfortran} (|fortran| "create output in FORTRAN format" |interpreter| @@ -27537,7 +27567,8 @@ The current setting is: Off:CONSOLE |chkOutputFileName| "console")) NIL) -@ + +\end{chunk} \defun{setOutputFortran}{setOutputFortran} \calls{setOutputFortran}{defiostream} @@ -27560,7 +27591,7 @@ The current setting is: Off:CONSOLE \usesdollar{setOutputFortran}{fortranOutputFile} \usesdollar{setOutputFortran}{filep} \usesdollar{setOutputFortran}{fortranFormat} -<>= +\begin{chunk}{defun setOutputFortran} (defun |setOutputFortran| (arg) (let (label APPEND quiet tmp1 tmp2 ptype fn ft fm filename teststream) (declare (special |$fortranOutputStream| |$fortranOutputFile| $filep @@ -27648,12 +27679,12 @@ The current setting is: Off:CONSOLE (unless quiet (|sayKeyedMsg| 'S2IV0005 nil)) (|describeSetOutputFortran|))))))) -@ +\end{chunk} \defun{describeSetOutputFortran}{describeSetOutputFortran} \calls{describeSetOutputFortran}{sayBrightly} \calls{describeSetOutputFortran}{setOutputFortran} -<>= +\begin{chunk}{defun describeSetOutputFortran} (defun |describeSetOutputFortran| () (|sayBrightly| (list '|%b| ")set output fortran" @@ -27689,7 +27720,7 @@ The current setting is: Off:CONSOLE '|%b| (|setOutputFortran| '|%display%|) '|%d|))) -@ +\end{chunk} \subsection{fraction} \begin{verbatim} @@ -27706,11 +27737,11 @@ The current setting is: Off:CONSOLE \end{verbatim} \defdollar{fractionDisplayType} -<>= +\begin{chunk}{initvars} (defvar |$fractionDisplayType| '|vertical| "how fractions are formatted") -@ -<>= +\end{chunk} +\begin{chunk}{outputfraction} (|fraction| "how fractions are formatted" |interpreter| @@ -27718,7 +27749,8 @@ The current setting is: Off:CONSOLE |$fractionDisplayType| (|vertical| |horizontal|) |vertical|) -@ + +\end{chunk} \subsection{length} \begin{verbatim} ---------------------- The length Option ---------------------- @@ -27731,18 +27763,18 @@ The current setting is: Off:CONSOLE \end{verbatim} \defdollar{margin} -<>= +\begin{chunk}{initvars} (defvar $margin 3) -@ +\end{chunk} \defdollar{linelength} -<>= +\begin{chunk}{initvars} (defvar $linelength 77 "line length of output displays") -@ +\end{chunk} -<>= +\begin{chunk}{outputlength} (|length| "line length of output displays" |interpreter| @@ -27750,7 +27782,8 @@ The current setting is: Off:CONSOLE $LINELENGTH (10 245) 77) -@ + +\end{chunk} \subsection{mathml} \begin{verbatim} ----------------------- The mathml Option ------------------------ @@ -27784,17 +27817,17 @@ AXIOM or the one you set with the )cd system command. The current setting is: Off:CONSOLE \end{verbatim} \defdollar{mathmlFormat} -<>= +\begin{chunk}{initvars} (defvar |$mathmlFormat| nil "create output in MathML format") -@ +\end{chunk} \defdollar{mathmlOutputFile} -<>= +\begin{chunk}{initvars} (defvar |$mathmlOutputFile| "CONSOLE" "where MathML output goes (enter {\em console} or a pathname)") -@ -<>= +\end{chunk} +\begin{chunk}{outputmathml} (|mathml| "create output in MathML style" |interpreter| @@ -27813,7 +27846,7 @@ The current setting is: Off:CONSOLE "console")) NIL) -@ +\end{chunk} \defun{setOutputMathml}{setOutputMathml} \calls{setOutputMathml}{defiostream} @@ -27836,7 +27869,7 @@ The current setting is: Off:CONSOLE \usesdollar{setOutputMathml}{mathmlOutputFile} \usesdollar{setOutputMathml}{mathmlFormat} \usesdollar{setOutputMathml}{filep} -<>= +\begin{chunk}{defun setOutputMathml} (defun |setOutputMathml| (arg) (let (label tmp1 tmp2 ptype fn ft fm filename teststream) (declare (special |$mathmlOutputStream| |$mathmlOutputFile| |$mathmlFormat| @@ -27915,12 +27948,12 @@ The current setting is: Off:CONSOLE (|sayKeyedMsg| 's2iv0005 nil) (|describeSetOutputMathml|))))))) -@ +\end{chunk} \defun{describeSetOutputMathml}{describeSetOutputMathml} \calls{describeSetOutputMathml}{sayBrightly} \calls{describeSetOutputMathml}{setOutputMathml} -<>= +\begin{chunk}{defun describeSetOutputMathml} (defun |describeSetOutputMathml| () (|sayBrightly| (LIST '|%b| ")set output mathml" @@ -27953,7 +27986,7 @@ The current setting is: Off:CONSOLE '|%b| (|setOutputMathml| '|%display%|) '|%d|))) -@ +\end{chunk} \subsection{html} \begin{verbatim} @@ -27988,17 +28021,17 @@ Axiom or the one you set with the )cd system command. The current setting is: Off:CONSOLE \end{verbatim} \defdollar{htmlFormat} -<>= +\begin{chunk}{initvars} (defvar |$htmlFormat| nil "create output in HTML format") -@ +\end{chunk} \defdollar{htmlOutputFile} -<>= +\begin{chunk}{initvars} (defvar |$htmlOutputFile| "CONSOLE" "where HTML output goes (enter {\em console} or a pathname)") -@ -<>= +\end{chunk} +\begin{chunk}{outputhtml} (|html| "create output in HTML style" |interpreter| @@ -28017,7 +28050,7 @@ The current setting is: Off:CONSOLE "console")) NIL) -@ +\end{chunk} \defun{setOutputHtml}{setOutputHtml} \calls{setOutputHtml}{defiostream} @@ -28040,7 +28073,7 @@ The current setting is: Off:CONSOLE \usesdollar{setOutputHtml}{htmlOutputFile} \usesdollar{setOutputHtml}{htmlFormat} \usesdollar{setOutputHtml}{filep} -<>= +\begin{chunk}{defun setOutputHtml} (defun |setOutputHtml| (arg) (let (label tmp1 tmp2 ptype fn ft fm filename teststream) (declare (special |$htmlOutputStream| |$htmlOutputFile| |$htmlFormat| @@ -28119,12 +28152,12 @@ The current setting is: Off:CONSOLE (|sayKeyedMsg| 's2iv0005 nil) (|describeSetOutputHtml|))))))) -@ +\end{chunk} \defun{describeSetOutputHtml}{describeSetOutputHtml} \calls{describeSetOutputHtml}{sayBrightly} \calls{describeSetOutputHtml}{setOutputHtml} -<>= +\begin{chunk}{defun describeSetOutputHtml} (defun |describeSetOutputHtml| () (|sayBrightly| (LIST '|%b| ")set output html" @@ -28157,7 +28190,7 @@ The current setting is: Off:CONSOLE '|%b| (|setOutputHtml| '|%display%|) '|%d|))) -@ +\end{chunk} \subsection{openmath} \begin{verbatim} @@ -28192,17 +28225,17 @@ AXIOM or the one you set with the )cd system command. The current setting is: Off:CONSOLE \end{verbatim} \defdollar{openMathFormat} -<>= +\begin{chunk}{initvars} (defvar |$openMathFormat| nil "create output in OpenMath format") -@ +\end{chunk} \defdollar{openMathOutputFile} -<>= +\begin{chunk}{initvars} (defvar |$openMathOutputFile| "CONSOLE" "where TeX output goes (enter {\em console} or a pathname)") -@ -<>= +\end{chunk} +\begin{chunk}{outputopenmath} (|openmath| "create output in OpenMath style" |interpreter| @@ -28220,7 +28253,8 @@ The current setting is: Off:CONSOLE |chkOutputFileName| "console")) NIL) -@ + +\end{chunk} \defun{setOutputOpenMath}{setOutputOpenMath} \calls{setOutputOpenMath}{defiostream} @@ -28243,7 +28277,7 @@ The current setting is: Off:CONSOLE \usesdollar{setOutputOpenMath}{openMathFormat} \usesdollar{setOutputOpenMath}{filep} \usesdollar{setOutputOpenMath}{openMathOutputFile} -<>= +\begin{chunk}{defun setOutputOpenMath} (defun |setOutputOpenMath| (arg) (let (label tmp1 tmp2 ptype fn ft fm filename teststream) (declare (special |$openMathOutputStream| |$openMathFormat| $filep @@ -28320,12 +28354,12 @@ The current setting is: Off:CONSOLE (|sayKeyedMsg| 's2iv0005 nil) (|describeSetOutputOpenMath|))))))) -@ +\end{chunk} \defun{describeSetOutputOpenMath}{describeSetOutputOpenMath} \calls{describeSetOutputOpenMath}{sayBrightly} \calls{describeSetOutputOpenMath}{setOutputOpenMath} -<>= +\begin{chunk}{defun describeSetOutputOpenMath} (defun |describeSetOutputOpenMath| () (|sayBrightly| (list '|%b| ")set output openmath" @@ -28359,7 +28393,7 @@ The current setting is: Off:CONSOLE '|%b| (|setOutputOpenMath| '|%display%|) '|%d|))) -@ +\end{chunk} \subsection{script} \begin{verbatim} @@ -28396,17 +28430,17 @@ invoked AXIOM or the one you set with the )cd system command. The current setting is: Off:CONSOLE \end{verbatim} \defdollar{formulaFormat} -<>= +\begin{chunk}{initvars} (defvar |$formulaFormat| nil "display output in SCRIPT format") -@ +\end{chunk} \defdollar{formulaOutputFile} -<>= +\begin{chunk}{initvars} (defvar |$formulaOutputFile| "CONSOLE" "where script output goes (enter {\em console} or a a pathname)") -@ -<>= +\end{chunk} +\begin{chunk}{outputscript} (|script| "display output in SCRIPT formula format" |interpreter| @@ -28424,7 +28458,8 @@ The current setting is: Off:CONSOLE |chkOutputFileName| "console")) NIL) -@ + +\end{chunk} \defun{setOutputFormula}{setOutputFormula} \calls{setOutputFormula}{defiostream} @@ -28447,7 +28482,7 @@ The current setting is: Off:CONSOLE \usesdollar{setOutputFormula}{formulaOutputFile} \usesdollar{setOutputFormula}{filep} \usesdollar{setOutputFormula}{formulaFormat} -<>= +\begin{chunk}{defun setOutputFormula} (defun |setOutputFormula| (arg) (let (label tmp1 tmp2 ptype fn ft fm filename teststream) (declare (special |$formulaOutputStream| |$formulaOutputFile| $filep @@ -28524,11 +28559,11 @@ The current setting is: Off:CONSOLE (|sayKeyedMsg| 's2iv0005 nil) (|describeSetOutputFormula|))))))) -@ +\end{chunk} \defun{describeSetOutputFormula}{describeSetOutputFormula} \calls{describeSetOutputFormula}{sayBrightly} \calls{describeSetOutputFormula}{setOutputFormula} -<>= +\begin{chunk}{defun describeSetOutputFormula} (defun |describeSetOutputFormula| () (|sayBrightly| (list '|%b| ")set output script" @@ -28564,7 +28599,7 @@ The current setting is: Off:CONSOLE '|%b| (|setOutputFormula| '|%display%|) '|%d|))) -@ +\end{chunk} \subsection{scripts} \begin{verbatim} @@ -28581,11 +28616,11 @@ The current setting is: Off:CONSOLE \end{verbatim} \defdollar{linearFormatScripts} -<>= +\begin{chunk}{initvars} (defvar |$linearFormatScripts| nil "show subscripts,... linearly") -@ -<>= +\end{chunk} +\begin{chunk}{outputscripts} (|scripts| "show subscripts,... linearly" |interpreter| @@ -28593,7 +28628,8 @@ The current setting is: Off:CONSOLE |$linearFormatScripts| (|on| |off|) |off|) -@ + +\end{chunk} \subsection{showeditor} \begin{verbatim} -------------------- The showeditor Option -------------------- @@ -28610,11 +28646,11 @@ The current setting is: Off:CONSOLE \end{verbatim} \defdollar{useEditorForShowOutput} -<>= +\begin{chunk}{initvars} (defvar |$useEditorForShowOutput| nil "view output of )show in editor") -@ -<>= +\end{chunk} +\begin{chunk}{outputshoweditor} (|showeditor| "view output of )show in editor" |interpreter| @@ -28622,7 +28658,8 @@ The current setting is: Off:CONSOLE |$useEditorForShowOutput| (|on| |off|) |off|) -@ + +\end{chunk} \subsection{tex} \begin{verbatim} ----------------------- The tex Option ------------------------ @@ -28656,17 +28693,17 @@ AXIOM or the one you set with the )cd system command. The current setting is: Off:CONSOLE \end{verbatim} \defdollar{texFormat} -<>= +\begin{chunk}{initvars} (defvar |$texFormat| nil "create output in TeX format") -@ +\end{chunk} \defdollar{texOutputFile} -<>= +\begin{chunk}{initvars} (defvar |$texOutputFile| "CONSOLE" "where TeX output goes (enter {\em console} or a pathname)") -@ -<>= +\end{chunk} +\begin{chunk}{outputtex} (|tex| "create output in TeX style" |interpreter| @@ -28684,7 +28721,8 @@ The current setting is: Off:CONSOLE |chkOutputFileName| "console")) NIL) -@ + +\end{chunk} \defun{setOutputTex}{setOutputTex} \calls{setOutputTex}{defiostream} @@ -28707,7 +28745,7 @@ The current setting is: Off:CONSOLE \usesdollar{setOutputTex}{texOutputFile} \usesdollar{setOutputTex}{texFormat} \usesdollar{setOutputTex}{filep} -<>= +\begin{chunk}{defun setOutputTex} (defun |setOutputTex| (arg) (let (label tmp1 tmp2 ptype fn ft fm filename teststream) (declare (special |$texOutputStream| |$texOutputFile| |$texFormat| $filep)) @@ -28780,12 +28818,12 @@ The current setting is: Off:CONSOLE (|sayKeyedMsg| 's2iv0005 nil) (|describeSetOutputTex|))))))) -@ +\end{chunk} \defun{describeSetOutputTex}{describeSetOutputTex} \calls{describeSetOutputTex}{sayBrightly} \calls{describeSetOutputTex}{setOutputTex} -<>= +\begin{chunk}{defun describeSetOutputTex} (defun |describeSetOutputTex| () (|sayBrightly| (list '|%b| ")set output tex" @@ -28818,7 +28856,7 @@ The current setting is: Off:CONSOLE '|%b| (|setOutputTex| '|%display%|) '|%d|))) -@ +\end{chunk} \section{quit} \begin{verbatim} ----------------------- The quit Option ----------------------- @@ -28834,11 +28872,11 @@ The current setting is: Off:CONSOLE \end{verbatim} \defdollar{quitCommandType} -<>= +\begin{chunk}{initvars} (defvar |$quitCommandType| '|protected| "protected or unprotected quit") -@ -<>= +\end{chunk} +\begin{chunk}{quit} (|quit| "protected or unprotected quit" |interpreter| @@ -28846,7 +28884,8 @@ The current setting is: Off:CONSOLE |$quitCommandType| (|protected| |unprotected|) |protected|) -@ + +\end{chunk} \section{streams} \begin{verbatim} Current Values of streams Variables @@ -28857,17 +28896,18 @@ calculate specify number of elements to calculate 10 showall display all stream elements computed off \end{verbatim} -<>= +\begin{chunk}{streams} (|streams| "set some options for working with streams" |interpreter| TREE |novar| ( -<> -<> +\getchunk{streamscalculate} +\getchunk{streamsshowall} )) -@ + +\end{chunk} \subsection{calculate} \begin{verbatim} -------------------- The calculate Option --------------------- @@ -28882,12 +28922,12 @@ showall display all stream elements computed off The current setting is 10 . \end{verbatim} \defdollar{streamCount} -<>= +\begin{chunk}{initvars} (defvar |$streamCount| 10 "number of initial stream elements you want calculated") -@ -<>= +\end{chunk} +\begin{chunk}{streamscalculate} (|calculate| "specify number of elements to calculate" |interpreter| @@ -28899,7 +28939,8 @@ showall display all stream elements computed off (0 NIL) 10)) NIL) -@ + +\end{chunk} \defun{setStreamsCalculate}{setStreamsCalculate} \calls{setStreamsCalculate}{object2String} @@ -28909,7 +28950,7 @@ showall display all stream elements computed off \calls{setStreamsCalculate}{bright} \calls{setStreamsCalculate}{terminateSystemCommand} \usesdollar{setStreamsCalculate}{streamCount} -<>= +\begin{chunk}{defun setStreamsCalculate} (defun |setStreamsCalculate| (arg) (let (n) (declare (special |$streamCount|)) @@ -28928,17 +28969,17 @@ showall display all stream elements computed off (|terminateSystemCommand|)) (t (setq |$streamCount| n))))))) -@ +\end{chunk} \defun{describeSetStreamsCalculate}{describeSetStreamsCalculate} \calls{describeSetStreamsCalculate}{sayKeyedMsg} \usesdollar{describeSetStreamsCalculate}{streamCount} -<>= +\begin{chunk}{defun describeSetStreamsCalculate} (defun |describeSetStreamsCalculate| () (declare (special |$streamCount|)) (|sayKeyedMsg| 's2iv0001 (list |$streamCount|))) -@ +\end{chunk} \subsection{showall} \begin{verbatim} @@ -28955,11 +28996,11 @@ showall display all stream elements computed off \end{verbatim} \defdollar{streamsShowAll} -<>= +\begin{chunk}{initvars} (defvar |$streamsShowAll| nil "display all stream elements computed") -@ -<>= +\end{chunk} +\begin{chunk}{streamsshowall} (|showall| "display all stream elements computed" |interpreter| @@ -28967,7 +29008,8 @@ showall display all stream elements computed off |$streamsShowAll| (|on| |off|) |off|) -@ + +\end{chunk} \section{system} \begin{verbatim} Current Values of system Variables @@ -28979,18 +29021,19 @@ optimization show optimized LISP code off prettyprint prettyprint BOOT func's as they compile off \end{verbatim} -<>= +\begin{chunk}{system} (|system| "set some system development variables" |development| TREE |novar| ( -<> -<> -<> +\getchunk{systemfunctioncode} +\getchunk{systemoptimization} +\getchunk{systemprettyprint} )) -@ + +\end{chunk} \subsection{functioncode} \begin{verbatim} ------------------- The functioncode Option ------------------- @@ -29007,11 +29050,11 @@ prettyprint prettyprint BOOT func's as they compile off \end{verbatim} \defdollar{reportCompilation} -<>= +\begin{chunk}{initvars} (defvar |$reportCompilation| nil "show gen. LISP for functions when compiled") -@ -<>= +\end{chunk} +\begin{chunk}{systemfunctioncode} (|functioncode| "show gen. LISP for functions when compiled" |development| @@ -29019,7 +29062,8 @@ prettyprint prettyprint BOOT func's as they compile off |$reportCompilation| (|on| |off|) |off|) -@ + +\end{chunk} \subsection{optimization} \begin{verbatim} ------------------- The optimization Option ------------------- @@ -29036,11 +29080,11 @@ prettyprint prettyprint BOOT func's as they compile off \end{verbatim} \defdollar{reportOptimization} -<>= +\begin{chunk}{initvars} (defvar |$reportOptimization| nil "show optimized LISP code") -@ -<>= +\end{chunk} +\begin{chunk}{systemoptimization} (|optimization| "show optimized LISP code" |development| @@ -29048,7 +29092,8 @@ prettyprint prettyprint BOOT func's as they compile off |$reportOptimization| (|on| |off|) |off|) -@ + +\end{chunk} \subsection{prettyprint} \begin{verbatim} ------------------- The prettyprint Option -------------------- @@ -29065,11 +29110,11 @@ prettyprint prettyprint BOOT func's as they compile off \end{verbatim} \defdollar{prettyprint} -<>= +\begin{chunk}{initvars} (defvar $prettyprint t "prettyprint BOOT func's as they compile") -@ -<>= +\end{chunk} +\begin{chunk}{systemprettyprint} (|prettyprint| "prettyprint BOOT func's as they compile" |development| @@ -29077,7 +29122,8 @@ prettyprint prettyprint BOOT func's as they compile off $prettyprint (|on| |off|) |on|) -@ + +\end{chunk} \section{userlevel} \begin{verbatim} -------------------- The userlevel Option --------------------- @@ -29095,11 +29141,11 @@ prettyprint prettyprint BOOT func's as they compile off \end{verbatim} \defdollar{UserLevel} -<>= +\begin{chunk}{initvars} (defvar |$UserLevel| '|development| "operation access level of system user") -@ -<>= +\end{chunk} +\begin{chunk}{userlevel} (|userlevel| "operation access level of system user" |interpreter| @@ -29108,52 +29154,53 @@ prettyprint prettyprint BOOT func's as they compile off (|interpreter| |compiler| |development|) |development|) -<>= +\end{chunk} +\begin{chunk}{initvars} (defvar |$setOptions| '( -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> +\getchunk{breakmode} +\getchunk{compile} +\getchunk{debug} +\getchunk{expose} +\getchunk{functions} +\getchunk{fortran} +\getchunk{kernel} +\getchunk{hyperdoc} +\getchunk{help} +\getchunk{history} +\getchunk{messages} +\getchunk{naglink} +\getchunk{output} +\getchunk{quit} +\getchunk{streams} +\getchunk{system} +\getchunk{userlevel} )) -@ +\end{chunk} \defdollar{setOptionNames} -<>= +\begin{chunk}{initvars} (defvar |$setOptionNames| (mapcar #'car |$setOptions|)) -@ +\end{chunk} -<>= +\begin{chunk}{postvars} (eval-when (eval load) (|initializeSetVariables| |$setOptions|)) -@ +\end{chunk} \section{Set code} \defun{set}{set} \calls{set}{set1} \usesdollar{set}{setOptions} -<>= +\begin{chunk}{defun set} (defun |set| (l) (declare (special |$setOptions|)) (|set1| l |$setOptions|)) -@ +\end{chunk} \defun{set1}{set1} This function will be called with the top level arguments to )set. For instance, given the command @@ -29201,7 +29248,7 @@ which gets called with \verb|%describe%| \usesdollar{set1}{setOptionNames} \usesdollar{set1}{UserLevel} \usesdollar{set1}{displaySetValue} -<>= +\begin{chunk}{defun set1} (defun |set1| (l settree) (let (|$setOptionNames| arg setdata st setfunarg num upperlimit arg2) (declare (special |$setOptionNames| |$UserLevel| |$displaySetValue|)) @@ -29303,12 +29350,12 @@ which gets called with \verb|%describe%| `("Cannot handle set tree node type" ,@(|bright| st) |yet|)) nil)))))))) -@ +\end{chunk} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{show help page} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -<>= +\begin{chunk}{show.help} ==================================================================== A.22. )show ==================================================================== @@ -29358,7 +29405,7 @@ o )display o )set o )what -@ +\end{chunk} \footnote{ \fnref{display} \fnref{set} @@ -29366,10 +29413,10 @@ o )what \defun{show}{The )show command} \calls{show}{showSpad2Cmd} -<>= +\begin{chunk}{defun show} (defun |show| (arg) (|showSpad2Cmd| arg)) -@ +\end{chunk} \defun{showSpad2Cmd}{The internal )show command} \calls{showSpad2Cmd}{member} @@ -29382,7 +29429,7 @@ o )what \usesdollar{showSpad2Cmd}{env} \usesdollar{showSpad2Cmd}{InteractiveFrame} \usesdollar{showSpad2Cmd}{options} -<>= +\begin{chunk}{defun showSpad2Cmd} (defun |showSpad2Cmd| (arg) (let (|$showOptions| |$e| |$env| constr) (declare (special |$showOptions| |$e| |$env| |$InteractiveFrame| |$options|)) @@ -29412,7 +29459,7 @@ o )what (t (|reportOperations| constr constr)))) (t (|reportOperations| arg arg))))))) -@ +\end{chunk} \defun{reportOperations}{reportOperations} \calls{reportOperations}{sayBrightly} @@ -29434,7 +29481,7 @@ o )what \usesdollar{reportOperations}{genValue} \usesdollar{reportOperations}{quadSymbol} \usesdollar{reportOperations}{doNotAddEmptyModeIfTrue} -<>= +\begin{chunk}{defun reportOperations} (defun |reportOperations| (oldArg u) (let (|$env| |$eval| |$genValue| |$doNotAddEmptyModeIfTrue| tmp1 v unitForm tree unitFormp) @@ -29478,20 +29525,20 @@ o )what (|reportOpsFromUnitDirectly0| unitFormp) (|sayKeyedMsg| 'S2IZ0041 (list unitForm)))))))))) -@ +\end{chunk} \defun{reportOpsFromLisplib0}{reportOpsFromLisplib0} \calls{reportOpsFromLisplib0}{reportOpsFromLisplib1} \calls{reportOpsFromLisplib0}{reportOpsFromLisplib} \usesdollar{reportOpsFromLisplib0}{useEditorForShowOutput} -<>= +\begin{chunk}{defun reportOpsFromLisplib0} (defun |reportOpsFromLisplib0| (unitForm u) (declare (special |$useEditorForShowOutput|)) (if |$useEditorForShowOutput| (|reportOpsFromLisplib1| unitForm u) (|reportOpsFromLisplib| unitForm u))) -@ +\end{chunk} \defun{reportOpsFromLisplib1}{reportOpsFromLisplib1} \calls{reportOpsFromLisplib1}{pathname} @@ -29503,7 +29550,7 @@ o )what \calls{reportOpsFromLisplib1}{editFile} \usesdollar{reportOpsFromLisplib1}{sayBrightlyStream} \usesdollar{reportOpsFromLisplib1}{erase} -<>= +\begin{chunk}{defun reportOpsFromLisplib1} (defun |reportOpsFromLisplib1| (unitForm u) (let (|$sayBrightlyStream| showFile) (declare (special |$sayBrightlyStream| $erase)) @@ -29516,7 +29563,7 @@ o )what (shut |$sayBrightlyStream|) (|editFile| showFile))) -@ +\end{chunk} \defun{reportOpsFromLisplib}{reportOpsFromLisplib} \calls{reportOpsFromLisplib}{constructor?} @@ -29548,7 +29595,7 @@ o )what \usesdollar{reportOpsFromLisplib}{showOptions} \usesdollar{reportOpsFromLisplib}{options} \usesdollar{reportOpsFromLisplib}{FormalMapVariableList} -<>= +\begin{chunk}{defun reportOpsFromLisplib} (defun |reportOpsFromLisplib| (op u) (let (fn s typ nArgs argList functorForm argml tmp1 functorFormWithDecl verb sourceFile opt attList) @@ -29607,7 +29654,7 @@ o )what ((eq opt '|operations|) (|displayOperationsFromLisplib| functorForm)))))))) -@ +\end{chunk} \defun{displayOperationsFromLisplib}{displayOperationsFromLisplib} \calls{displayOperationsFromLisplib}{getdatabase} @@ -29621,7 +29668,7 @@ o )what \calls{displayOperationsFromLisplib}{say2PerLine} \usesdollar{displayOperationsFromLisplib}{FormalMapVariableList} \usesdollar{displayOperationsFromLisplib}{linelength} -<>= +\begin{chunk}{defun displayOperationsFromLisplib} (defun |displayOperationsFromLisplib| (form) (let (name argl kind opList opl ops) (declare (special |$FormalMapVariableList| $linelength)) @@ -29640,20 +29687,20 @@ o )what (setq ops (append ops (|formatOperationAlistEntry| x)))) (|say2PerLine| ops))))) -@ +\end{chunk} \defun{reportOpsFromUnitDirectly0}{reportOpsFromUnitDirectly0} \calls{reportOpsFromUnitDirectly0}{reportOpsFromUnitDirectly1} \calls{reportOpsFromUnitDirectly0}{reportOpsFromUnitDirectly} \usesdollar{reportOpsFromUnitDirectly0}{useEditorForShowOutput} -<>= +\begin{chunk}{defun reportOpsFromUnitDirectly0} (defun |reportOpsFromUnitDirectly0| (D) (declare (special |$useEditorForShowOutput|)) (if |$useEditorForShowOutput| (|reportOpsFromUnitDirectly1| D) (|reportOpsFromUnitDirectly| D))) -@ +\end{chunk} \defun{reportOpsFromUnitDirectly}{reportOpsFromUnitDirectly} \calls{reportOpsFromUnitDirectly}{member} @@ -29686,7 +29733,7 @@ o )what \usesdollar{reportOpsFromUnitDirectly}{linelength} \usesdollar{reportOpsFromUnitDirectly}{options} \usesdollar{reportOpsFromUnitDirectly}{showOptions} -<>= +\begin{chunk}{defun reportOpsFromUnitDirectly} (defun |reportOpsFromUnitDirectly| (unitForm) (let (|$commentedOps| isRecordOrUnion unit top kind abb sourceFile verb opt attList constructorFunction tmp1 funlist a sigList tmp2) @@ -29766,7 +29813,7 @@ o )what (|sayBrightly| "")))) nil)) -@ +\end{chunk} \defun{reportOpsFromUnitDirectly1}{reportOpsFromUnitDirectly1} \calls{reportOpsFromUnitDirectly1}{pathname} @@ -29778,7 +29825,7 @@ o )what \calls{reportOpsFromUnitDirectly1}{editFile} \usesdollar{reportOpsFromUnitDirectly1}{sayBrightlyStream} \usesdollar{reportOpsFromUnitDirectly1}{erase} -<>= +\begin{chunk}{defun reportOpsFromUnitDirectly1} (defun |reportOpsFromUnitDirectly1| (D) (let (|$sayBrightlyStream| showFile) (declare (special |$sayBrightlyStream| $erase)) @@ -29791,11 +29838,11 @@ o )what (shut |$sayBrightlyStream|) (|editFile| showFile))) -@ +\end{chunk} \defun{sayShowWarning}{sayShowWarning} \calls{sayShowWarning}{sayBrightly} -<>= +\begin{chunk}{defun sayShowWarning} (defun |sayShowWarning| () (|sayBrightly| "Warning: this is a temporary file and will be deleted the next") @@ -29804,12 +29851,12 @@ o )what (|sayBrightly| " save the contents.") (|sayBrightly| "")) -@ +\end{chunk} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{spool help page} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -<>= +\begin{chunk}{spool.help} ==================================================================== A.23. )spool ==================================================================== @@ -29840,13 +29887,13 @@ command. Also See: o )cd -@ +\end{chunk} \footnote{\fnref{cd}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{summary help page} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -<>= +\begin{chunk}{summary.help} )credits : list the people who have contributed to Axiom )help gives more information @@ -29874,22 +29921,22 @@ o )cd )undo : restore workspace to earlier state )what : search for various things by name -@ +\end{chunk} \defun{summary}{summary} \calls{summary}{obey} \calls{summary}{concat} \calls{summary}{getenviron} -<>= +\begin{chunk}{defun summary} (defun |summary| (l) (declare (ignore l)) (obey (concat "cat " (getenviron "AXIOM") "/doc/spadhelp/summary.help"))) -@ +\end{chunk} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{synonym help page} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -<>= +\begin{chunk}{synonym.help} ==================================================================== A.24. )synonym ==================================================================== @@ -29935,19 +29982,19 @@ Also See: o )set o )what -@ +\end{chunk} \footnote{ \fnref{set} \fnref{what}} \defun{synonym}{The )synonym command} \calls{synonym}{synonymSpad2Cmd} -<>= +\begin{chunk}{defun synonym} (defun |synonym| (&rest ignore) (declare (ignore ignore)) (|synonymSpad2Cmd|)) -@ +\end{chunk} \defun{synonymSpad2Cmd}{The )synonym command implementation} \calls{synonymSpad2Cmd}{getSystemCommandLine} @@ -29956,7 +30003,7 @@ o )what \calls{synonymSpad2Cmd}{putalist} \calls{synonymSpad2Cmd}{terminateSystemCommand} \usesdollar{synonymSpad2Cmd}{CommandSynonymAlist} -<>= +\begin{chunk}{defun synonymSpad2Cmd} (defun |synonymSpad2Cmd| () (let (line pair) (declare (special |$CommandSynonymAlist|)) @@ -29970,7 +30017,7 @@ o )what (setq |$CommandSynonymAlist| (cons pair nil))))) (|terminateSystemCommand|))) -@ +\end{chunk} \defun{synonymsForUserLevel}{Return a sublist of applicable synonyms} The argument is a list of synonyms, and this returns a sublist of applicable @@ -29980,7 +30027,7 @@ synonyms at the current user level. \calls{synonymsForUserLevel}{commandsForUserLevel} \usesdollar{synonymsForUserLevel}{systemCommands} \usesdollar{synonymsForUserLevel}{UserLevel} -<>= +\begin{chunk}{defun synonymsForUserLevel} (defun |synonymsForUserLevel| (arg) (let (cmd nl) (declare (special |$systemCommands| |$UserLevel|)) @@ -29992,13 +30039,13 @@ synonyms at the current user level. (push syn nl)))) nl)) -@ +\end{chunk} \defun{getSystemCommandLine}{Get the system command from the input line} \calls{getSystemCommandLine}{strpos} \calls{getSystemCommandLine}{substring} \usesdollar{getSystemCommandLine}{currentLine} -<>= +\begin{chunk}{defun getSystemCommandLine} (defun |getSystemCommandLine| () (let (p line) (declare (special |$currentLine|)) @@ -30008,12 +30055,12 @@ synonyms at the current user level. (setq line |$currentLine|)) (string-left-trim '(#\space) line))) -@ +\end{chunk} \defun{processSynonymLine,removeKeyFromLine}{Remove system keyword} \calls{processSynonymLine,removeKeyFromLine}{dropLeadingBlanks} \calls{processSynonymLine,removeKeyFromLine}{maxindex} -<>= +\begin{chunk}{defun processSynonymLine,removeKeyFromLine} (defun |processSynonymLine,removeKeyFromLine| (line) (prog (mx) (return @@ -30037,17 +30084,17 @@ synonyms at the current user level. (return (substring line j nil)))))))))))))))))) -@ +\end{chunk} \defun{processSynonymLine}{processSynonymLine} \calls{processSynonymLine}{processSynonymLine,removeKeyFromLine} -<>= +\begin{chunk}{defun processSynonymLine} (defun |processSynonymLine| (line) (cons (string2id-n line 1) (|processSynonymLine,removeKeyFromLine| line))) -@ +\end{chunk} This command is in the list of \verb|$noParseCommands| \ref{noParseCommands} which means that its arguments are passed @@ -30057,7 +30104,7 @@ verbatim. This will eventually result in a call to the function %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{system help page} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -<>= +\begin{chunk}{system.help} ==================================================================== A.25. )system ==================================================================== @@ -30092,7 +30139,7 @@ o )lisp o )pquit o )quit -@ +\end{chunk} \footnote{ \fnref{boot} \fnref{fin} @@ -30108,7 +30155,7 @@ verbatim. This will eventually result in a call to the function %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{trace help page} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -<>= +\begin{chunk}{trace.help} ==================================================================== A.26. )trace ==================================================================== @@ -30326,7 +30373,7 @@ o )boot o )lisp o )ltrace -@ +\end{chunk} \footnote{ \fnref{boot} \fnref{lisp} @@ -30335,46 +30382,46 @@ o )ltrace \subsection{The trace global variables} This decides when to give trace and untrace messages. \defdollar{traceNoisely} -<>= +\begin{chunk}{initvars} (defvar |$traceNoisely| nil) -@ +\end{chunk} \defdollar{reportSpadTrace} This reports the traced functions -<>= +\begin{chunk}{initvars} (defvar |$reportSpadTrace| nil) -@ +\end{chunk} \defdollar{optionAlist} -<>= +\begin{chunk}{initvars} (defvar |$optionAlist| nil) -@ +\end{chunk} \defdollar{tracedMapSignatures} -<>= +\begin{chunk}{initvars} (defvar |$tracedMapSignatures| nil) -@ +\end{chunk} \defdollar{traceOptionList} -<>= +\begin{chunk}{initvars} (defvar |$traceOptionList| '(|after| |before| |break| |cond| |count| |depth| |local| |mathprint| |nonquietly| |nt| |of| |only| |ops| |restore| |timer| |varbreak| |vars| |within|)) -@ +\end{chunk} \defun{trace}{trace} \calls{trace}{traceSpad2Cmd} -<>= +\begin{chunk}{defun trace} (defun |trace| (l) (|traceSpad2Cmd| l)) -@ +\end{chunk} \defun{traceSpad2Cmd}{traceSpad2Cmd} \calls{traceSpad2Cmd}{pairp} @@ -30385,7 +30432,7 @@ This reports the traced functions \calls{traceSpad2Cmd}{augmentTraceNames} \calls{traceSpad2Cmd}{traceReply} \usesdollar{traceSpad2Cmd}{mapSubNameAlist} -<>= +\begin{chunk}{defun traceSpad2Cmd} (defun |traceSpad2Cmd| (l) (let (tmp1 l1) (declare (special |$mapSubNameAlist|)) @@ -30404,7 +30451,7 @@ This reports the traced functions (|trace1| (|augmentTraceNames| l)) (|traceReply|))) -@ +\end{chunk} \defun{trace1}{trace1} \calls{trace1}{hasOption} @@ -30445,7 +30492,7 @@ This reports the traced functions \usesdollar{trace1}{options} \usesdollar{trace1}{lastUntraced} \usesdollar{trace1}{optionAlist} -<>= +\begin{chunk}{defun trace1} (defun |trace1| (arg) (prog (|$traceNoisely| constructor ops lops temp1 opt a oldl newoptions domain tracelist optionlist domainlist @@ -30591,7 +30638,7 @@ This reports the traced functions (exit (setq t6 (cons |funName| t6))))))))))))))) -@ +\end{chunk} \defun{getTraceOptions}{getTraceOptions} \calls{getTraceOptions}{throwKeyedMsg} @@ -30601,7 +30648,7 @@ This reports the traced functions \calls{getTraceOptions}{exit} \calls{getTraceOptions}{getTraceOption} \usesdollar{getTraceOptions}{traceErrorStack} -<>= +\begin{chunk}{defun getTraceOptions} (defun |getTraceOptions| (|options|) (prog (|$traceErrorStack| optionlist temp1 key |parms|) (declare (special |$traceErrorStack|)) @@ -30632,7 +30679,7 @@ This reports the traced functions (nreverse |$traceErrorStack|))))) (t optionlist))))))) -@ +\end{chunk} \defun{saveMapSig}{saveMapSig} \calls{saveMapSig}{rassoc} @@ -30640,7 +30687,7 @@ This reports the traced functions \calls{saveMapSig}{getMapSig} \usesdollar{saveMapSig}{tracedMapSignatures} \usesdollar{saveMapSig}{mapSubNameAlist} -<>= +\begin{chunk}{defun saveMapSig} (defun |saveMapSig| (funnames) (let (map) (declare (special |$tracedMapSignatures| |$mapSubNameAlist|)) @@ -30649,13 +30696,13 @@ This reports the traced functions (setq |$tracedMapSignatures| (addassoc name (|getMapSig| map name) |$tracedMapSignatures|)))))) -@ +\end{chunk} \defun{getMapSig}{getMapSig} \calls{getMapSig}{get} \calls{getMapSig}{boot-equal} \usesdollar{getMapSig}{InteractiveFrame} -<>= +\begin{chunk}{defun getMapSig} (defun |getMapSig| (mapname subname) (let (lmms sig) (declare (special |$InteractiveFrame|)) @@ -30665,7 +30712,7 @@ This reports the traced functions (when (boot-equal (cadr |mm|) subname) (setq sig (cdar |mm|)))) sig))) -@ +\end{chunk} \defun{getTraceOption,hn}{getTraceOption,hn} \calls{getTraceOption,hn}{seq} @@ -30673,7 +30720,7 @@ This reports the traced functions \calls{getTraceOption,hn}{isDomainOrPackage} \calls{getTraceOption,hn}{stackTraceOptionError} \calls{getTraceOption,hn}{domainToGenvar} -<>= +\begin{chunk}{defun getTraceOption,hn} (defun |getTraceOption,hn| (x) (prog (g) (return @@ -30689,7 +30736,7 @@ This reports the traced functions (exit (|stackTraceOptionError| (cons 's2it0013 (cons (cons x nil) nil)))))))) -@ +\end{chunk} \defun{getTraceOption}{getTraceOption} \calls{getTraceOption}{seq} @@ -30708,7 +30755,7 @@ This reports the traced functions \calls{getTraceOption}{isListOfIdentifiers} \calls{getTraceOption}{throwKeyedMsg} \usesdollar{getTraceOption}{traceOptionList} -<>= +\begin{chunk}{defun getTraceOption} (defun |getTraceOption| (arg) (prog (l |opts| key a |n|) (declare (special |$traceOptionList|)) @@ -30848,50 +30895,50 @@ This reports the traced functions (cons (concat ")" (|object2String| key)) nil) nil)))))) (key (|throwKeyedMsg| 's2it0005 (cons key nil))))))))) -@ +\end{chunk} \defun{traceOptionError}{traceOptionError} \calls{traceOptionError}{stackTraceOptionError} \calls{traceOptionError}{commandAmbiguityError} -<>= +\begin{chunk}{defun traceOptionError} (defun |traceOptionError| (opt keys) (if (null keys) (|stackTraceOptionError| (cons 's2it0007 (cons (cons opt nil) nil))) (|commandAmbiguityError| '|trace option| opt keys))) -@ +\end{chunk} \defun{resetTimers}{resetTimers} \calls{resetTimers}{concat} \uses{resetTimers}{/timerlist} -<>= +\begin{chunk}{defun resetTimers} (defun |resetTimers| () (declare (special /timerlist)) (dolist (timer /timerlist) (set (intern (concat timer ",TIMER")) 0))) -@ +\end{chunk} \defun{resetSpacers}{resetSpacers} \calls{resetSpacers}{concat} \uses{resetSpacers}{/spacelist} -<>= +\begin{chunk}{defun resetSpacers} (defun |resetSpacers| () (declare (special /spacelist)) (dolist (spacer /spacelist) (set (intern (concat spacer ",SPACE")) 0))) -@ +\end{chunk} \defun{resetCounters}{resetCounters} \calls{resetCounters}{concat} \uses{resetCounters}{/countlist} -<>= +\begin{chunk}{defun resetCounters} (defun |resetCounters| () (declare (special /countlist)) (dolist (k /countlist) (set (intern (concat k ",COUNT")) 0))) -@ +\end{chunk} \defun{ptimers}{ptimers} \calls{ptimers}{sayBrightly} @@ -30900,7 +30947,7 @@ This reports the traced functions \calls{ptimers}{concat} \calls{ptimers}{float} \uses{ptimers}{/timerlist} -<>= +\begin{chunk}{defun ptimers} (defun |ptimers| () (declare (special /timerlist |$timerTicksPerSecond|)) (if (null /timerlist) @@ -30911,14 +30958,14 @@ This reports the traced functions ,(quotient (eval (intern (concat timer ",TIMER"))) (|float| |$timerTicksPerSecond|)) " sec."))))) -@ +\end{chunk} \defun{pspacers}{pspacers} \calls{pspacers}{sayBrightly} \calls{pspacers}{bright} \calls{pspacers}{concat} \uses{pspacers}{/spacelist} -<>= +\begin{chunk}{defun pspacers} (defun |pspacers| () (declare (special /spacelist)) (if (null /spacelist) @@ -30928,14 +30975,14 @@ This reports the traced functions `(" " ,@(|bright| spacer) |: | ,(eval (intern (concat spacer ",SPACE"))) " bytes"))))) -@ +\end{chunk} \defun{pcounters}{pcounters} \calls{pcounters}{sayBrightly} \calls{pcounters}{bright} \calls{pcounters}{concat} \uses{pcounters}{/countlist} -<>= +\begin{chunk}{defun pcounters} (defun |pcounters| () (declare (special /countlist)) (if (null /countlist) @@ -30945,7 +30992,7 @@ This reports the traced functions `(" " ,@(|bright| k) |:| " " ,(eval (intern (concat k ",COUNT"))) " times"))))) -@ +\end{chunk} \defun{transOnlyOption}{transOnlyOption} \calls{transOnlyOption}{transOnlyOption} @@ -30954,7 +31001,7 @@ This reports the traced functions \calls{transOnlyOption}{pairp} \calls{transOnlyOption}{qcar} \calls{transOnlyOption}{qcdr} -<>= +\begin{chunk}{defun transOnlyOption} (defun |transOnlyOption| (arg) (let (y n) (when (and (pairp arg) (progn (setq n (qcar arg)) (setq y (qcdr arg)) t)) @@ -30965,21 +31012,21 @@ This reports the traced functions (|stackTraceOptionError| (cons 's2it0006 (list (list n)))) (|transOnlyOption| y)))))) -@ +\end{chunk} \defun{stackTraceOptionError}{stackTraceOptionError} \usesdollar{stackTraceOptionError}{traceErrorStack} -<>= +\begin{chunk}{defun stackTraceOptionError} (defun |stackTraceOptionError| (x) (declare (special |$traceErrorStack|)) (push x |$traceErrorStack|) nil) -@ +\end{chunk} \defun{removeOption}{removeOption} \calls{removeOption}{nequal} -<>= +\begin{chunk}{defun removeOption} (defun |removeOption| (op options) (let (opt t0) (do ((t1 options (cdr t1)) (optentry nil)) @@ -30989,7 +31036,7 @@ This reports the traced functions (nreverse0 t0)) (when (nequal opt op) (setq t0 (cons optentry t0)))))) -@ +\end{chunk} \defun{domainToGenvar}{domainToGenvar} \calls{domainToGenvar}{unabbrevAndLoad} @@ -30998,7 +31045,7 @@ This reports the traced functions \calls{domainToGenvar}{genDomainTraceName} \calls{domainToGenvar}{evalDomain} \usesdollar{domainToGenvar}{doNotAddEmptyModeIfTrue} -<>= +\begin{chunk}{defun domainToGenvar} (defun |domainToGenvar| (arg) (let (|$doNotAddEmptyModeIfTrue| y g) (declare (special |$doNotAddEmptyModeIfTrue|)) @@ -31010,13 +31057,13 @@ This reports the traced functions (set g (|evalDomain| y)) g))) -@ +\end{chunk} \defun{genDomainTraceName}{genDomainTraceName} \calls{genDomainTraceName}{lassoc} \calls{genDomainTraceName}{genvar} \usesdollar{genDomainTraceName}{domainTraceNameAssoc} -<>= +\begin{chunk}{defun genDomainTraceName} (defun |genDomainTraceName| (y) (let (u g) (declare (special |$domainTraceNameAssoc|)) @@ -31027,7 +31074,7 @@ This reports the traced functions (setq |$domainTraceNameAssoc| (cons (cons y g) |$domainTraceNameAssoc|)) g)))) -@ +\end{chunk} \defun{untrace}{untrace} \calls{untrace}{copy} @@ -31038,7 +31085,7 @@ This reports the traced functions \usesdollar{untrace}{lastUntraced} \usesdollar{untrace}{mapSubNameAlist} \uses{untrace}{/tracenames} -<>= +\begin{chunk}{defun untrace} (defun |untrace| (arg) (let (untracelist) (declare (special |$lastUntraced| /tracenames |$mapSubNameAlist|)) @@ -31057,7 +31104,7 @@ This reports the traced functions (push (|lassocSub| |funName| |$mapSubNameAlist|) t2))) (|removeTracedMapSigs| untracelist))) -@ +\end{chunk} \defun{transTraceItem}{transTraceItem} \calls{transTraceItem}{get} @@ -31073,7 +31120,7 @@ This reports the traced functions \calls{transTraceItem}{devaluate} \calls{transTraceItem}{throwKeyedMsg} \usesdollar{transTraceItem}{doNotAddEmptyModeIfTrue} -<>= +\begin{chunk}{defun transTraceItem} (defun |transTraceItem| (x) (prog (|$doNotAddEmptyModeIfTrue| |value| y) (declare (special |$doNotAddEmptyModeIfTrue|)) @@ -31102,17 +31149,17 @@ This reports the traced functions ((setq y (|domainToGenvar| x)) y) (t (|throwKeyedMsg| 's2it0018 (cons x nil)))))))) -@ +\end{chunk} \defun{removeTracedMapSigs}{removeTracedMapSigs} \usesdollar{removeTracedMapSigs}{tracedMapSignatures} -<>= +\begin{chunk}{defun removeTracedMapSigs} (defun |removeTracedMapSigs| (untraceList) (declare (special |$tracedMapSignatures|)) (dolist (name untraceList) (remprop name |$tracedMapSignatures|))) -@ +\end{chunk} \defun{coerceTraceArgs2E}{coerceTraceArgs2E} \calls{coerceTraceArgs2E}{spadsysnamep} @@ -31124,7 +31171,7 @@ This reports the traced functions \usesdollar{coerceTraceArgs2E}{OutputForm} \usesdollar{coerceTraceArgs2E}{mathTraceList} \usesdollar{coerceTraceArgs2E}{tracedMapSignatures} -<>= +\begin{chunk}{defun coerceTraceArgs2E} (defun |coerceTraceArgs2E| (tracename subname args) (declare (ignore tracename)) (let (name) @@ -31158,7 +31205,7 @@ This reports the traced functions ((spadsysnamep (pname name)) (reverse (cdr (reverse args)))) (t args)))) -@ +\end{chunk} \defun{coerceSpadArgs2E}{coerceSpadArgs2E} \calls{coerceSpadArgs2E}{seq} @@ -31169,7 +31216,7 @@ This reports the traced functions \usesdollar{coerceSpadArgs2E}{streamCount} \usesdollar{coerceSpadArgs2E}{OutputForm} \usesdollar{coerceSpadArgs2E}{tracedSpadModemap} -<>= +\begin{chunk}{defun coerceSpadArgs2E} (defun |coerceSpadArgs2E| (args) (let ((|$streamCount| 0)) (declare (special |$streamCount| |$OutputForm| |$tracedSpadModemap|)) @@ -31201,14 +31248,14 @@ This reports the traced functions |$OutputForm|)) nil))) t0))))))) -@ +\end{chunk} \defun{subTypes}{subTypes} \calls{subTypes}{lassoc} \calls{subTypes}{seq} \calls{subTypes}{exit} \calls{subTypes}{subTypes} -<>= +\begin{chunk}{defun subTypes} (defun |subTypes| (|mm| |sublist|) (prog (s) (return @@ -31226,7 +31273,7 @@ This reports the traced functions (exit (setq t0 (cons (|subTypes| |m| |sublist|) t0))))))))))))) -@ +\end{chunk} \defun{coerceTraceFunValue2E}{coerceTraceFunValue2E} \calls{coerceTraceFunValue2E}{spadsysnamep} @@ -31239,7 +31286,7 @@ This reports the traced functions \usesdollar{coerceTraceFunValue2E}{tracedMapSignatures} \usesdollar{coerceTraceFunValue2E}{OutputForm} \usesdollar{coerceTraceFunValue2E}{mathTraceList} -<>= +\begin{chunk}{defun coerceTraceFunValue2E} (defun |coerceTraceFunValue2E| (tracename subname |value|) (let (name u) (declare (special |$tracedMapSignatures| |$OutputForm| |$mathTraceList|)) @@ -31252,7 +31299,7 @@ This reports the traced functions (t |value|)) |value|))) -@ +\end{chunk} \defun{coerceSpadFunValue2E}{coerceSpadFunValue2E} \calls{coerceSpadFunValue2E}{objValUnwrap} @@ -31261,7 +31308,7 @@ This reports the traced functions \usesdollar{coerceSpadFunValue2E}{streamCount} \usesdollar{coerceSpadFunValue2E}{tracedSpadModemap} \usesdollar{coerceSpadFunValue2E}{OutputForm} -<>= +\begin{chunk}{defun coerceSpadFunValue2E} (defun |coerceSpadFunValue2E| (|value|) (let (|$streamCount|) (declare (special |$streamCount| |$tracedSpadModemap| |$OutputForm|)) @@ -31271,13 +31318,13 @@ This reports the traced functions (|objNewWrap| |value| (car |$tracedSpadModemap|)) |$OutputForm|)))) -@ +\end{chunk} \defun{isListOfIdentifiers}{isListOfIdentifiers} \calls{isListOfIdentifiers}{seq} \calls{isListOfIdentifiers}{exit} \calls{isListOfIdentifiers}{identp} -<>= +\begin{chunk}{defun isListOfIdentifiers} (defun |isListOfIdentifiers| (arg) (prog () (return @@ -31291,13 +31338,13 @@ This reports the traced functions (exit (setq t0 (and t0 (identp x)))))))))))) -@ +\end{chunk} \defun{isListOfIdentifiersOrStrings}{isListOfIdentifiersOrStrings} \calls{isListOfIdentifiersOrStrings}{seq} \calls{isListOfIdentifiersOrStrings}{exit} \calls{isListOfIdentifiersOrStrings}{identp} -<>= +\begin{chunk}{defun isListOfIdentifiersOrStrings} (defun |isListOfIdentifiersOrStrings| (arg) (prog () (return @@ -31311,7 +31358,7 @@ This reports the traced functions (exit (setq t0 (and t0 (or (identp x) (stringp x))))))))))))) -@ +\end{chunk} \defun{getMapSubNames}{getMapSubNames} \calls{getMapSubNames}{get} @@ -31321,7 +31368,7 @@ This reports the traced functions \usesdollar{getMapSubNames}{lastUntraced} \usesdollar{getMapSubNames}{InteractiveFrame} \uses{getMapSubNames}{/tracenames} -<>= +\begin{chunk}{defun getMapSubNames} (defun |getMapSubNames| (arg) (let (lmm subs) (declare (special /tracenames |$lastUntraced| |$InteractiveFrame|)) @@ -31338,13 +31385,13 @@ This reports the traced functions (|union| subs (|getPreviousMapSubNames| (unionq /tracenames |$lastUntraced|))))) -@ +\end{chunk} \defun{getPreviousMapSubNames}{getPreviousMapSubNames} \calls{getPreviousMapSubNames}{get} \calls{getPreviousMapSubNames}{exit} \calls{getPreviousMapSubNames}{seq} -<>= +\begin{chunk}{defun getPreviousMapSubNames} (defun |getPreviousMapSubNames| (|traceNames|) (prog (lmm subs) (return @@ -31372,34 +31419,34 @@ This reports the traced functions (cons (cons mapname (cadr |mm|)) subs)))))))))))))) (exit subs))))))) -@ +\end{chunk} \defun{lassocSub}{lassocSub} \calls{lassocSub}{lassq} -<>= +\begin{chunk}{defun lassocSub} (defun |lassocSub| (x subs) (let (y) (if (setq y (lassq x subs)) y x))) -@ +\end{chunk} \defun{rassocSub}{rassocSub} \calls{rassocSub}{rassoc} -<>= +\begin{chunk}{defun rassocSub} (defun |rassocSub| (x subs) (let (y) (if (setq y (|rassoc| x subs)) y x))) -@ +\end{chunk} \defun{isUncompiledMap}{isUncompiledMap} \calls{isUncompiledMap}{get} \usesdollar{isUncompiledMap}{InteractiveFrame} -<>= +\begin{chunk}{defun isUncompiledMap} (defun |isUncompiledMap| (x) (let (y) (declare (special |$InteractiveFrame|)) @@ -31408,24 +31455,24 @@ This reports the traced functions (eq (caar y) 'map) (null (|get| x '|localModemap| |$InteractiveFrame|)))))) -@ +\end{chunk} \defun{isInterpOnlyMap}{isInterpOnlyMap} \calls{isInterpOnlyMap}{get} \usesdollar{isInterpOnlyMap}{InteractiveFrame} -<>= +\begin{chunk}{defun isInterpOnlyMap} (defun |isInterpOnlyMap| (map) (let (x) (declare (special |$InteractiveFrame|)) (when (setq x (|get| map '|localModemap| |$InteractiveFrame|)) (eq (caaar x) '|interpOnly|)))) -@ +\end{chunk} \defun{augmentTraceNames}{augmentTraceNames} \calls{augmentTraceNames}{get} \usesdollar{augmentTraceNames}{InteractiveFrame} -<>= +\begin{chunk}{defun augmentTraceNames} (defun |augmentTraceNames| (arg) (let (mml res) (declare (special |$InteractiveFrame|)) @@ -31445,14 +31492,14 @@ This reports the traced functions (setq res (cons tracename res)))) res)) -@ +\end{chunk} \defun{isSubForRedundantMapName}{isSubForRedundantMapName} \calls{isSubForRedundantMapName}{rassocSub} \calls{isSubForRedundantMapName}{member} \calls{isSubForRedundantMapName}{assocleft} \usesdollar{isSubForRedundantMapName}{mapSubNameAlist} -<>= +\begin{chunk}{defun isSubForRedundantMapName} (defun |isSubForRedundantMapName| (subname) (let (mapname tail) (declare (special |$mapSubNameAlist|)) @@ -31460,7 +31507,7 @@ This reports the traced functions (when (setq tail (|member| (cons mapname subname) |$mapSubNameAlist|)) (member mapname (cdr (assocleft tail))))))) -@ +\end{chunk} \defun{untraceMapSubNames}{untraceMapSubNames} \calls{untraceMapSubNames}{assocright} @@ -31469,7 +31516,7 @@ This reports the traced functions \calls{untraceMapSubNames}{getPreviousMapSubNames} \usesdollar{untraceMapSubNames}{mapSubNameAlist} \usesdollar{untraceMapSubNames}{lastUntraced} -<>= +\begin{chunk}{defun untraceMapSubNames} (defun |untraceMapSubNames| (|traceNames|) (let (|$mapSubNameAlist| subs) (declare (special |$mapSubNameAlist| |$lastUntraced|)) @@ -31481,7 +31528,7 @@ This reports the traced functions (|/UNTRACE,2| name nil) (setq |$lastUntraced| (setdifference |$lastUntraced| subs))))))) -@ +\end{chunk} \defun{funfind,LAM}{funfind,LAM} \calls{funfind,LAM}{pairp} @@ -31489,7 +31536,7 @@ This reports the traced functions \calls{funfind,LAM}{SEQ} \calls{funfind,LAM}{isFunctor} \calls{funfind,LAM}{exit} -<>= +\begin{chunk}{defun funfind,LAM} (defun |funfind,LAM| (functor opname) (prog (ops tmp1) (return @@ -31510,45 +31557,45 @@ This reports the traced functions (and (pairp tmp1) (equal (qcar tmp1) opname)))) (setq t0 (cons u t0)))))))))))))) -@ +\end{chunk} \defmacro{funfind} -<>= +\begin{chunk}{defmacro funfind} (defmacro |funfind| (&whole t0 &rest notused &aux t1) (declare (ignore notused)) (dsetq t1 t0) (cons '|funfind,LAM| (wrap (cdr t1) '(quote quote)))) -@ +\end{chunk} \defun{isDomainOrPackage}{isDomainOrPackage} \calls{isDomainOrPackage}{refvecp} \calls{isDomainOrPackage}{poundsign} \calls{isDomainOrPackage}{isFunctor} \calls{isDomainOrPackage}{opOf} -<>= +\begin{chunk}{defun isDomainOrPackage} (defun |isDomainOrPackage| (dom) (and (refvecp dom) (> (|#| dom) 0) (|isFunctor| (|opOf| (elt dom 0))))) -@ +\end{chunk} \defun{isTraceGensym}{isTraceGensym} \calls{isTraceGensym}{gensymp} -<>= +\begin{chunk}{defun isTraceGensym} (defun |isTraceGensym| (x) (gensymp x)) -@ +\end{chunk} \defun{spadTrace,g}{spadTrace,g} -<>= +\begin{chunk}{defun spadTrace,g} (defun |spadTrace,g| (x) (if (stringp x) (intern x) x)) -@ +\end{chunk} \defun{spadTrace,isTraceable}{spadTrace,isTraceable} \calls{spadTrace,isTraceable}{seq} @@ -31556,7 +31603,7 @@ This reports the traced functions \calls{spadTrace,isTraceable}{gensymp} \calls{spadTrace,isTraceable}{reportSpadTrace} \calls{spadTrace,isTraceable}{bpiname} -<>= +\begin{chunk}{defun spadTrace,isTraceable} (defun |spadTrace,isTraceable| (x |domain|) (prog (n |functionSlot|) (return @@ -31576,7 +31623,7 @@ This reports the traced functions (exit nil)))) (exit t))))))) -@ +\end{chunk} \defun{spadTrace}{spadTrace} \calls{spadTrace}{pairp} @@ -31612,7 +31659,7 @@ This reports the traced functions \usesdollar{spadTrace}{reportSpadTrace} \usesdollar{spadTrace}{traceNoisely} \uses{spadTrace}{/tracenames} -<>= +\begin{chunk}{defun spadTrace} (defun |spadTrace| (domain options) (let (|$tracedModemap| listofoperations listofvariables listofbreakvars anyiftrue domainid currententry @@ -31755,25 +31802,25 @@ This reports the traced functions (cons (cons domain sigslotnumberalist) /tracenames)) (|spadReply|))))))) -@ +\end{chunk} \defun{traceDomainLocalOps}{traceDomainLocalOps} \calls{traceDomainLocalOps}{sayMSG} -<>= +\begin{chunk}{defun traceDomainLocalOps} (defun |traceDomainLocalOps| () (|sayMSG| '(" The )local option has been withdrawn")) (|sayMSG| '(" Use )ltr to trace local functions."))) -@ +\end{chunk} \defun{untraceDomainLocalOps}{untraceDomainLocalOps} \calls{untraceDomainLocalOps}{sayMSG} -<>= +\begin{chunk}{defun untraceDomainLocalOps} (defun |untraceDomainLocalOps| () (|sayMSG| '(" The )local option has been withdrawn")) (|sayMSG| '(" Use )ltr to trace local functions."))) -@ +\end{chunk} \defun{traceDomainConstructor}{traceDomainConstructor} \calls{traceDomainConstructor}{getOption} @@ -31786,7 +31833,7 @@ This reports the traced functions \calls{traceDomainConstructor}{loadFunctor} \calls{traceDomainConstructor}{traceDomainLocalOps} \usesdollar{traceDomainConstructor}{ConstructorCache} -<>= +\begin{chunk}{defun traceDomainConstructor} (defun |traceDomainConstructor| (domainConstructor options) (prog (listOfLocalOps argl domain innerDomainConstructor) (declare (special |$ConstructorCache|)) @@ -31840,7 +31887,7 @@ This reports the traced functions (cons (cons 'return (cons 'domain nil)) nil))))) nil))))))))))) -@ +\end{chunk} \defun{untraceDomainConstructor,keepTraced?}{% untraceDomainConstructor,keepTraced?} @@ -31853,7 +31900,7 @@ untraceDomainConstructor,keepTraced?} \calls{untraceDomainConstructor,keepTraced?}{devaluate} \calls{untraceDomainConstructor,keepTraced?}{exit} \calls{untraceDomainConstructor,keepTraced?}{/untrace,0} -<>= +\begin{chunk}{defun untraceDomainConstructor,keepTraced?} (defun |untraceDomainConstructor,keepTraced?| (df domainConstructor) (prog (dc) (return @@ -31866,7 +31913,7 @@ untraceDomainConstructor,keepTraced?} (exit (seq (|/UNTRACE,0| (cons dc nil)) (exit nil)))) (exit t))))) -@ +\end{chunk} \defun{untraceDomainConstructor}{untraceDomainConstructor} \calls{untraceDomainConstructor}{untraceDomainConstructor,keepTraced?} @@ -31876,7 +31923,7 @@ untraceDomainConstructor,keepTraced?} \calls{untraceDomainConstructor}{concat} \calls{untraceDomainConstructor}{delete} \uses{untraceDomainConstructor}{/tracenames} -<>= +\begin{chunk}{defun untraceDomainConstructor} (defun |untraceDomainConstructor| (domainConstructor) (prog (innerDomainConstructor) (declare (special /tracenames)) @@ -31901,12 +31948,12 @@ untraceDomainConstructor,keepTraced?} (t (unembed domainConstructor))) (setq /tracenames (|delete| domainConstructor /tracenames))))))) -@ +\end{chunk} \defun{flattenOperationAlist}{flattenOperationAlist} \calls{flattenOperationAlist}{seq} \calls{flattenOperationAlist}{exit} -<>= +\begin{chunk}{defun flattenOperationAlist} (defun |flattenOperationAlist| (|opAlist|) (prog (op |mmList| |res|) (return @@ -31935,19 +31982,19 @@ untraceDomainConstructor,keepTraced?} (setq t2 (cons (cons op mm) t2)))))))))))) |res|))))) -@ +\end{chunk} \defun{mapLetPrint}{mapLetPrint} \calls{mapLetPrint}{getAliasIfTracedMapParameter} \calls{mapLetPrint}{getBpiNameIfTracedMap} \calls{mapLetPrint}{letPrint} -<>= +\begin{chunk}{defun mapLetPrint} (defun |mapLetPrint| (x val currentFunction) (setq x (|getAliasIfTracedMapParameter| x currentFunction)) (setq currentFunction (|getBpiNameIfTracedMap| currentFunction)) (|letPrint| x val currentFunction)) -@ +\end{chunk} \defun{letPrint}{letPrint} \calls{letPrint}{lassoc} @@ -31961,7 +32008,7 @@ untraceDomainConstructor,keepTraced?} \calls{letPrint}{pname} \calls{letPrint}{break} \usesdollar{letPrint}{letAssoc} -<>= +\begin{chunk}{defun letPrint} (defun |letPrint| (x |val| |currentFunction|) (prog (y) (declare (special |$letAssoc|)) @@ -31995,7 +32042,7 @@ untraceDomainConstructor,keepTraced?} (t nil)))) |val|)))) -@ +\end{chunk} \defun{isSharpVarWithNum}{Identifier beginning with a sharpsign-number?} This tests if x is an identifier beginning with \verb|#| followed by a number. \calls{isSharpVarWithNum}{isSharpVar} @@ -32003,7 +32050,7 @@ This tests if x is an identifier beginning with \verb|#| followed by a number. \calls{isSharpVarWithNum}{qcsize} \calls{isSharpVarWithNum}{digitp} \calls{isSharpVarWithNum}{dig2fix} -<>= +\begin{chunk}{defun isSharpVarWithNum} (defun |isSharpVarWithNum| (x) (let (p n d ok c) (cond @@ -32019,28 +32066,28 @@ This tests if x is an identifier beginning with \verb|#| followed by a number. (setq c (+ (* 10 c) (dig2fix d))))) (when ok c))))) -@ +\end{chunk} \defun{isSharpVar}{Identifier beginning with a sharpsign?} This tests if x is an identifier beginning with \verb|#| \calls{isSharpVar}{identp} -<>= +\begin{chunk}{defun isSharpVar} (defun |isSharpVar| (x) (and (identp x) (char= (schar (symbol-name x) 0) #\#))) -@ +\end{chunk} \defun{isgenvar}{isgenvar} \calls{isgenvar}{size} \calls{isgenvar}{digitp} \calls{isgenvar}{identp} -<>= +\begin{chunk}{defun isgenvar} (defun isgenvar (x) (and (identp x) (let ((y (symbol-name x))) (and (char= #\$ (elt y 0)) (> (size y) 1) (digitp (elt y 1)))))) -@ +\end{chunk} \defun{letPrint2}{letPrint2} @@ -32057,7 +32104,7 @@ This tests if x is an identifier beginning with \verb|#| \calls{letPrint2}{bright} \usesdollar{letPrint2}{BreakMode} \usesdollar{letPrint2}{letAssoc} -<>= +\begin{chunk}{defun letPrint2} (defun |letPrint2| (x |printform| |currentFunction|) (prog (|$BreakMode| |flag| y) (declare (special |$BreakMode| |$letAssoc|)) @@ -32095,7 +32142,7 @@ This tests if x is an identifier beginning with \verb|#| (t nil)))) x)))) -@ +\end{chunk} \defun{letPrint3}{letPrint3} This is the version for use when we have our hands on a function @@ -32114,7 +32161,7 @@ to convert the data into type "Expression" \calls{letPrint3}{bright} \usesdollar{letPrint3}{BreakMode} \usesdollar{letPrint3}{letAssoc} -<>= +\begin{chunk}{defun letPrint3} (defun |letPrint3| (x |xval| |printfn| |currentFunction|) (prog (|$BreakMode| |flag| y) (declare (special |$BreakMode| |$letAssoc|)) @@ -32155,7 +32202,7 @@ to convert the data into type "Expression" (t nil)))) x)))) -@ +\end{chunk} \defun{getAliasIfTracedMapParameter}{getAliasIfTracedMapParameter} \calls{getAliasIfTracedMapParameter}{isSharpVarWithNum} \calls{getAliasIfTracedMapParameter}{get} @@ -32166,7 +32213,7 @@ to convert the data into type "Expression" \calls{getAliasIfTracedMapParameter}{pname} \calls{getAliasIfTracedMapParameter}{seq} \usesdollar{getAliasIfTracedMapParameter}{InteractiveFrame} -<>= +\begin{chunk}{defun getAliasIfTracedMapParameter} (defun |getAliasIfTracedMapParameter| (x |currentFunction|) (prog (|aliasList|) (declare (special |$InteractiveFrame|)) @@ -32183,7 +32230,7 @@ to convert the data into type "Expression" (string2pint-n (substring (pname x) 1 nil) 1) 1)))))) (t x)))))) -@ +\end{chunk} \defun{getBpiNameIfTracedMap}{getBpiNameIfTracedMap} \calls{getBpiNameIfTracedMap}{get} @@ -32191,7 +32238,7 @@ to convert the data into type "Expression" \calls{getBpiNameIfTracedMap}{seq} \usesdollar{getBpiNameIfTracedMap}{InteractiveFrame} \uses{getBpiNameIfTracedMap}{/tracenames} -<>= +\begin{chunk}{defun getBpiNameIfTracedMap} (defun |getBpiNameIfTracedMap| (name) (prog (lmm bpiName) (declare (special |$InteractiveFrame| /tracenames)) @@ -32204,14 +32251,14 @@ to convert the data into type "Expression" (exit bpiName)))) (t name)))))) -@ +\end{chunk} \defun{hasPair}{hasPair} \calls{hasPair}{pairp} \calls{hasPair}{qcar} \calls{hasPair}{qcdr} \calls{hasPair}{hasPair} -<>= +\begin{chunk}{defun hasPair} (defun |hasPair| (key arg) (prog (tmp1 a) (return @@ -32226,42 +32273,42 @@ to convert the data into type "Expression" a) (t (|hasPair| key (cdr arg))))))) -@ +\end{chunk} \defun{shortenForPrinting}{shortenForPrinting} \calls{shortenForPrinting}{isDomainOrPackage} \calls{shortenForPrinting}{devaluate} -<>= +\begin{chunk}{defun shortenForPrinting} (defun |shortenForPrinting| (|val|) (if (|isDomainOrPackage| |val|) (|devaluate| |val|) |val|)) -@ +\end{chunk} \defun{spadTraceAlias}{spadTraceAlias} \calls{spadTraceAlias}{internl} -<>= +\begin{chunk}{defun spadTraceAlias} (defun |spadTraceAlias| (domainid op n) (internl domainid (intern "." "boot") op '|,| (princ-to-string n))) -@ +\end{chunk} \defun{getOption}{getOption} \calls{getOption}{assoc} -<>= +\begin{chunk}{defun getOption} (defun |getOption| (opt l) (let (y) (when (setq y (|assoc| opt l)) (cdr y)))) -@ +\end{chunk} \defun{reportSpadTrace}{reportSpadTrace} \calls{reportSpadTrace}{pairp} \calls{reportSpadTrace}{qcar} \calls{reportSpadTrace}{sayBrightly} \usesdollar{reportSpadTrace}{traceNoisely} -<>= +\begin{chunk}{defun reportSpadTrace} (defun |reportSpadTrace| (|header| t0) (prog (op sig n |t| |msg| |namePart| y |tracePart|) (declare (special |$traceNoisely|)) @@ -32296,14 +32343,14 @@ to convert the data into type "Expression" (t nil))) (|sayBrightly| (append |msg| (append |namePart| |tracePart|))))))))) -@ +\end{chunk} \defun{orderBySlotNumber}{orderBySlotNumber} \calls{orderBySlotNumber}{seq} \calls{orderBySlotNumber}{assocright} \calls{orderBySlotNumber}{orderList} \calls{orderBySlotNumber}{exit} -<>= +\begin{chunk}{defun orderBySlotNumber} (defun |orderBySlotNumber| (arg) (prog (n) (return @@ -32322,7 +32369,7 @@ to convert the data into type "Expression" (exit (setq t0 (cons (cons n x) t0))))))))))))) -@ +\end{chunk} \defun{/tracereply}{/tracereply} \calls{/tracereply}{pairp} @@ -32332,7 +32379,7 @@ to convert the data into type "Expression" \calls{/tracereply}{seq} \calls{/tracereply}{exit} \uses{/tracereply}{/tracenames} -<>= +\begin{chunk}{defun /tracereply} (defun /tracereply () (prog (|d| domainlist |functionList|) (declare (special /tracenames)) @@ -32355,7 +32402,7 @@ to convert the data into type "Expression" (append |functionList| (append domainlist (cons '|traced| nil))))))))) -@ +\end{chunk} \defun{spadReply,printName}{spadReply,printName} \calls{spadReply,printName}{seq} @@ -32364,7 +32411,7 @@ to convert the data into type "Expression" \calls{spadReply,printName}{isDomainOrPackage} \calls{spadReply,printName}{exit} \calls{spadReply,printName}{devaluate} -<>= +\begin{chunk}{defun spadReply,printName} (defun |spadReply,printName| (x) (prog (|d|) (return @@ -32374,14 +32421,14 @@ to convert the data into type "Expression" (exit (|devaluate| |d|))) (exit x))))) -@ +\end{chunk} \defun{spadReply}{spadReply} \calls{spadReply}{seq} \calls{spadReply}{exit} \calls{spadReply}{spadReply,printName} \uses{spadReply}{/tracenames} -<>= +\begin{chunk}{defun spadReply} (defun |spadReply| () (prog () (declare (special /tracenames)) @@ -32396,7 +32443,7 @@ to convert the data into type "Expression" (exit (setq t0 (cons (|spadReply,printName| x) t0))))))))))) -@ +\end{chunk} \defun{spadUntrace}{spadUntrace} \calls{spadUntrace}{isDomainOrPackage} @@ -32418,7 +32465,7 @@ to convert the data into type "Expression" \calls{spadUntrace}{spadReply} \usesdollar{spadUntrace}{letAssoc} \uses{spadUntrace}{/tracenames} -<>= +\begin{chunk}{defun spadUntrace} (defun |spadUntrace| (domain options) (prog (anyiftrue listofoperations domainid |pair| sigslotnumberalist op sig n |lv| |bpiPointer| tracename alias |assocPair| @@ -32489,7 +32536,7 @@ to convert the data into type "Expression" (setq /tracenames (delasc domain /tracenames)) (|spadReply|))))))))))) -@ +\end{chunk} \defun{prTraceNames,fn}{prTraceNames,fn} \calls{prTraceNames,fn}{seq} \calls{prTraceNames,fn}{pairp} @@ -32498,7 +32545,7 @@ to convert the data into type "Expression" \calls{prTraceNames,fn}{isDomainOrPackage} \calls{prTraceNames,fn}{exit} \calls{prTraceNames,fn}{devaluate} -<>= +\begin{chunk}{defun prTraceNames,fn} (defun |prTraceNames,fn| (x) (prog (|d| |t|) (return @@ -32509,14 +32556,14 @@ to convert the data into type "Expression" (exit (cons (|devaluate| |d|) |t|))) (exit x))))) -@ +\end{chunk} \defun{prTraceNames}{prTraceNames} \calls{prTraceNames}{seq} \calls{prTraceNames}{exit} \calls{prTraceNames}{prTraceNames,fn} \uses{prTraceNames}{/tracenames} -<>= +\begin{chunk}{defun prTraceNames} (defun |prTraceNames| () (declare (special /tracenames)) (seq @@ -32527,13 +32574,13 @@ to convert the data into type "Expression" (exit (print (|prTraceNames,fn| x))))) nil))) -@ +\end{chunk} \defdollar{constructors} -<>= +\begin{chunk}{initvars} (defvar |$constructors| nil) -@ +\end{chunk} \defun{traceReply}{traceReply} \calls{traceReply}{sayMessage} @@ -32561,7 +32608,7 @@ to convert the data into type "Expression" \usesdollar{traceReply}{constructors} \usesdollar{traceReply}{linelength} \uses{traceReply}{/tracenames} -<>= +\begin{chunk}{defun traceReply} (defun |traceReply| () (prog (|$domains| |$packages| |$constructors| |d| |functionList| |displayList|) @@ -32673,7 +32720,7 @@ to convert the data into type "Expression" (|sayBrightly| (|flowSegmentedMsg| |displayList| $linelength 6))) (t nil))))))))) -@ +\end{chunk} \defun{addTraceItem}{addTraceItem} \calls{addTraceItem}{constructor?} @@ -32683,7 +32730,7 @@ to convert the data into type "Expression" \usesdollar{addTraceItem}{constructors} \usesdollar{addTraceItem}{domains} \usesdollar{addTraceItem}{packages} -<>= +\begin{chunk}{defun addTraceItem} (defun |addTraceItem| (|d|) (declare (special |$constructors| |$domains| |$packages|)) (cond @@ -32694,7 +32741,7 @@ to convert the data into type "Expression" ((|isDomainOrPackage| |d|) (setq |$packages| (cons (|devaluate| |d|) |$packages|))))) -@ +\end{chunk} \defun{?t}{?t} \calls{?t}{isgenvar} @@ -32714,7 +32761,7 @@ to convert the data into type "Expression" \usesdollar{?t}{mapSubNameAlist} \usesdollar{?t}{InteractiveFrame} \uses{?t}{/tracenames} -<>= +\begin{chunk}{defun ?t} (defun |?t| () (let (llm d suffix l) (declare (special /tracenames |$InteractiveFrame| |$mapSubNameAlist|)) @@ -32744,7 +32791,7 @@ to convert the data into type "Expression" (|reportSpadTrace| '| | (TAKE 4 x))) (terpri))))))))) -@ +\end{chunk} \defun{tracelet}{tracelet} \calls{tracelet}{gensymp} \calls{tracelet}{stupidIsSpadFunction} @@ -32759,7 +32806,7 @@ to convert the data into type "Expression" \usesdollar{tracelet}{QuickLet} \usesdollar{tracelet}{letAssoc} \usesdollar{tracelet}{traceletFunctions} -<>= +\begin{chunk}{defun tracelet} (defun |tracelet| (fn |vars|) (prog ($traceletflag |$QuickLet| l) (declare (special $traceletflag |$QuickLet| |$letAssoc| @@ -32796,7 +32843,7 @@ to convert the data into type "Expression" (setq |$traceletFunctions| (|delete| fn |$traceletFunctions|))))))))))) -@ +\end{chunk} \defun{breaklet}{breaklet} \calls{breaklet}{gensymp} \calls{breaklet}{stupidIsSpadFunction} @@ -32810,7 +32857,7 @@ to convert the data into type "Expression" \usesdollar{breaklet}{QuickLet} \usesdollar{breaklet}{letAssoc} \usesdollar{breaklet}{traceletFunctions} -<>= +\begin{chunk}{defun breaklet} (defun |breaklet| (fn |vars|) (prog (|$QuickLet| |fnEntry| |pair|) (declare (special |$QuickLet| |$letAssoc| |$traceletFunctions|)) @@ -32848,15 +32895,15 @@ to convert the data into type "Expression" (setq |$traceletFunctions| (|delete| fn |$traceletFunctions|))))))))))) -@ +\end{chunk} \defun{stupidIsSpadFunction}{stupidIsSpadFunction} \calls{stupidIsSpadFunction}{strpos} \calls{stupidIsSpadFunction}{pname} -<>= +\begin{chunk}{defun stupidIsSpadFunction} (defun |stupidIsSpadFunction| (fn) (strpos ";" (pname fn) 0 nil)) -@ +\end{chunk} \defun{break}{break} \calls{break}{MONITOR,EVALTRAN} @@ -32864,7 +32911,7 @@ to convert the data into type "Expression" \calls{break}{sayBrightly} \calls{break}{interrupt} \uses{break}{/breakcondition} -<>= +\begin{chunk}{defun break} (defun |break| (msg) (prog (condition) (declare (special /breakcondition)) @@ -32876,19 +32923,19 @@ to convert the data into type "Expression" (|sayBrightly| msg) (interrupt)))))) -@ +\end{chunk} \defun{compileBoot}{compileBoot} \calls{compileBoot}{/D,1} -<>= +\begin{chunk}{defun compileBoot} (defun |compileBoot| (fn) (|/D,1| (list fn) '(/comp) nil nil)) -@ +\end{chunk} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{undo help page} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -<>= +\begin{chunk}{undo.help} ==================================================================== A.27. )undo ==================================================================== @@ -32948,7 +32995,7 @@ your program. Also See: o )history -@ +\end{chunk} \footnote{\fnref{history}} \section{Data Structures} @@ -32983,28 +33030,28 @@ $previousBindings := nil \end{verbatim} \defdollar{undoFlag} -<>= +\begin{chunk}{initvars} (defvar |$undoFlag| t "t means we record undo information") -@ +\end{chunk} \defdollar{frameRecord} -<>= +\begin{chunk}{initvars} (defvar |$frameRecord| nil "a list of value changes") -@ +\end{chunk} \defdollar{previousBindings} -<>= +\begin{chunk}{initvars} (defvar |$previousBindings| nil "a copy of Interactive Frame info for undo") -@ +\end{chunk} \defdollar{reportUndo} -<>= +\begin{chunk}{initvars} (defvar |$reportUndo| nil "t means we report the steps undo takes") -@ +\end{chunk} \defun{undo}{undo} \calls{undo}{stringPrefix?} \calls{undo}{pname} @@ -33019,7 +33066,7 @@ $previousBindings := nil \calls{undo}{undoCount} \usesdollar{undo}{options} \usesdollar{undo}{InteractiveFrame} -<>= +\begin{chunk}{defun undo} (defun |undo| (l) (let (tmp1 key s undoWhen n) (declare (special |$options| |$InteractiveFrame|)) @@ -33050,7 +33097,7 @@ $previousBindings := nil (setq |$InteractiveFrame| (|undoSteps| (|undoCount| n) undoWhen)) nil)) -@ +\end{chunk} \defun{recordFrame}{recordFrame} \calls{recordFrame}{kar} \calls{recordFrame}{diffAlist} @@ -33060,7 +33107,7 @@ $previousBindings := nil \usesdollar{recordFrame}{frameRecord} \usesdollar{recordFrame}{InteractiveFrame} \usesdollar{recordFrame}{previousBindings} -<>= +\begin{chunk}{defun recordFrame} (defun |recordFrame| (systemNormal) (prog (currentAlist delta) (declare (special |$undoFlag| |$frameRecord| |$InteractiveFrame| @@ -33108,7 +33155,7 @@ $previousBindings := nil tmp0)))))))) (car |$frameRecord|))))))) -@ +\end{chunk} \defun{diffAlist}{diffAlist} \begin{verbatim} diffAlist(new,old) == @@ -33153,7 +33200,7 @@ diffAlist(new,old) == \calls{diffAlist}{assoc} \calls{diffAlist}{lassq} \calls{diffAlist}{reportUndo} -<>= +\begin{chunk}{defun diffAlist} (defun |diffAlist| (new old) (prog (proplist oldPair oldProplist val oldPropval deltas prop name r acc res) (return @@ -33257,7 +33304,7 @@ diffAlist(new,old) == (|reportUndo| res))) (exit res))))))) -@ +\end{chunk} \defun{reportUndo}{reportUndo} This function is enabled by setting \verb|$reportUndo| to a non-nil value. An example of the output generated is: @@ -33286,7 +33333,7 @@ Properties of r :: \calls{reportUndo}{sayBrightlyNT} \calls{reportUndo}{pp} \usesdollar{reportUndo}{InteractiveFrame} -<>= +\begin{chunk}{defun reportUndo} (defun |reportUndo| (acc) (prog (name proplist curproplist prop value) (declare (special |$InteractiveFrame|)) @@ -33328,25 +33375,25 @@ Properties of r :: (cons " " (cons prop (cons " is: " nil)))) (|pp| (lassoc prop curproplist)))))))))))))) -@ +\end{chunk} \defun{clearFrame}{clearFrame} \calls{clearFrame}{clearCmdAll} \usesdollar{clearFrame}{frameRecord} \usesdollar{clearFrame}{previousBindings} -<>= +\begin{chunk}{defun clearFrame} (defun |clearFrame| () (declare (special |$frameRecord| |$previousBindings|)) (|clearCmdAll|) (setq |$frameRecord| nil) (setq |$previousBindings| nil)) -@ +\end{chunk} \defunsec{undoCount}{Undo previous n commands} \calls{undoCount}{spaddifference} \calls{undoCount}{userError} \calls{undoCount}{concat} \usesdollar{undoCount}{IOindex} -<>= +\begin{chunk}{defun undoCount} (defun |undoCount| (n) "Undo previous n commands" (prog (m) @@ -33364,7 +33411,7 @@ Properties of r :: (princ-to-string |$IOindex|) ")."))) (t m)))))) -@ +\end{chunk} \defun{undoSteps}{undoSteps} \begin{verbatim} -- undoes m previous commands; if )before option, then undo one extra at end @@ -33393,7 +33440,7 @@ Properties of r :: \usesdollar{undoSteps}{IOindex} \usesdollar{undoSteps}{InteractiveFrame} \usesdollar{undoSteps}{frameRecord} -<>= +\begin{chunk}{defun undoSteps} (defun |undoSteps| (m beforeOrAfter) (let (tmp1 tmp2 systemDelta lastTailSeen env) (declare (special |$IOindex| |$InteractiveFrame| |$frameRecord|)) @@ -33424,7 +33471,7 @@ Properties of r :: (setq |$frameRecord| (cdr |$frameRecord|)) (setq |$InteractiveFrame| (list (list env))))) -@ +\end{chunk} \defun{undoSingleStep}{undoSingleStep} \begin{verbatim} undoSingleStep(changes,env) == @@ -33441,7 +33488,7 @@ undoSingleStep(changes,env) == \calls{undoSingleStep}{exit} \calls{undoSingleStep}{lassoc} \calls{undoSingleStep}{undoLocalModemapHack} -<>= +\begin{chunk}{defun undoSingleStep} (defun |undoSingleStep| (changes env) (prog (name changeList pairlist proplist prop value node) (return @@ -33490,11 +33537,11 @@ undoSingleStep(changes,env) == (setq env (cons |change| env)))))))) env))))) -@ +\end{chunk} \defun{undoLocalModemapHack}{undoLocalModemapHack} \calls{undoLocalModemapHack}{seq} \calls{undoLocalModemapHack}{exit} -<>= +\begin{chunk}{defun undoLocalModemapHack} (defun |undoLocalModemapHack| (changeList) (prog (name value) (return @@ -33524,7 +33571,7 @@ undoSingleStep(changes,env) == ((eq name '|localModemap|) (cons name nil)) (t pair)) tmp0))))))))))))) -@ +\end{chunk} \defunsec{removeUndoLines}{Remove undo lines from history write} Removing undo lines from \verb|)hist )write linelist| \calls{removeUndoLines}{stringPrefix?} @@ -33540,7 +33587,7 @@ Removing undo lines from \verb|)hist )write linelist| \calls{removeUndoLines}{concat} \usesdollar{removeUndoLines}{currentLine} \usesdollar{removeUndoLines}{IOindex} -<>= +\begin{chunk}{defun removeUndoLines} (defun |removeUndoLines| (u) "Remove undo lines from history write" (prog (xtra savedIOindex s s1 m s2 x code c n acc) @@ -33641,12 +33688,12 @@ Removing undo lines from \verb|)hist )write linelist| (setq |$IOindex| savedIOindex) acc))))))) -@ +\end{chunk} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{what help page} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -<>= +\begin{chunk}{what.help} ==================================================================== A.28. )what ==================================================================== @@ -33724,39 +33771,39 @@ o )display o )set o )show -@ +\end{chunk} \footnote{ \fnref{display} \fnref{set} \fnref{show}} \defdollar{whatOptions} -<>= +\begin{chunk}{initvars} (defvar |$whatOptions| '(|operations| |categories| |domains| |packages| |commands| |synonyms| |things|)) -@ +\end{chunk} \defun{what}{what} \calls{what}{whatSpad2Cmd} -<>= +\begin{chunk}{defun what} (defun |what| (l) (|whatSpad2Cmd| l)) -@ +\end{chunk} \defun{whatSpad2Cmd,fixpat}{whatSpad2Cmd,fixpat} \calls{whatSpad2Cmd,fixpat}{pairp} \calls{whatSpad2Cmd,fixpat}{qcar} \calls{whatSpad2Cmd,fixpat}{downcase} -<>= +\begin{chunk}{defun whatSpad2Cmd,fixpat} (defun |whatSpad2Cmd,fixpat| (x) (let (xp) (if (and (pairp x) (progn (setq xp (qcar x)) t)) (downcase xp) (downcase x)))) -@ +\end{chunk} \defun{whatSpad2Cmd}{whatSpad2Cmd} \calls{whatSpad2Cmd}{reportWhatOptions} @@ -33772,7 +33819,7 @@ o )show \calls{whatSpad2Cmd}{printSynonyms} \usesdollar{whatSpad2Cmd}{e} \usesdollar{whatSpad2Cmd}{whatOptions} -<>= +\begin{chunk}{defun whatSpad2Cmd} (defun |whatSpad2Cmd| (arg) (prog (|$e| |key0| key args) (declare (special |$e| |$whatOptions|)) @@ -33823,12 +33870,12 @@ o )show (cond ((eq key '|synonyms|) (|printSynonyms| args))))))))))))))) -@ +\end{chunk} \defun{reportWhatOptions}{Show keywords for )what command} \calls{reportWhatOptions}{sayBrightly} \usesdollar{reportWhatOptions}{whatOptions} -<>= +\begin{chunk}{defun reportWhatOptions} (defun |reportWhatOptions| () (let (optlist) (declare (special |$whatOptions|)) @@ -33840,7 +33887,7 @@ o )show |%l| " or abbreviations thereof." |%l| |%l| " Issue" |%b| ")what ?" |%d| "for more information.")))) -@ +\end{chunk} \defun{whatCommands}{The )what commands implementation} \calls{whatCommands}{stringimage} @@ -33857,7 +33904,7 @@ o )show \usesdollar{whatCommands}{systemCommands} \usesdollar{whatCommands}{linelength} \usesdollar{whatCommands}{UserLevel} -<>= +\begin{chunk}{defun whatCommands} (defun |whatCommands| (patterns) (let (label ell) (declare (special |$systemCommands| $linelength |$UserLevel|)) @@ -33880,13 +33927,13 @@ o )show (say " ")) (unless patterns (|sayKeyedMsg| 's2iz0046 nil)))) -@ +\end{chunk} \defun{filterListOfStrings}{Find all names contained in a pattern} Names and patterns are lists of strings. This returns a list of strings in names that contains any of the strings in the patterns \calls{filterListOfStrings}{satisfiesRegularExpressions} -<>= +\begin{chunk}{defun filterListOfStrings} (defun |filterListOfStrings| (patterns names) (let (result) (if (or (null patterns) (null names)) @@ -33895,7 +33942,7 @@ in names that contains any of the strings in the patterns (when (|satisfiesRegularExpressions| name patterns) (push name result)))))) -@ +\end{chunk} \defun{filterListOfStringsWithFn}{Find function of names contained in pattern} The argument names and patterns are lists of strings. @@ -33903,7 +33950,7 @@ The argument fn is something like CAR or CADR This returns a list of strings in names that contains any of the strings in patterns \calls{filterListOfStringsWithFn}{satisfiesRegularExpressions} -<>= +\begin{chunk}{defun filterListOfStringsWithFn} (defun |filterListOfStringsWithFn| (patterns names fn) (let (result) (if (or (null patterns) (null names)) @@ -33912,18 +33959,18 @@ in patterns (when (|satisfiesRegularExpressions| (funcall fn name) patterns) (push name result)))))) -@ +\end{chunk} \defun{satisfiesRegularExpressions}{satisfiesRegularExpressions} \calls{satisfiesRegularExpressions}{strpos} -<>= +\begin{chunk}{defun satisfiesRegularExpressions} (defun |satisfiesRegularExpressions| (name patterns) (let ((dname (downcase (copy name)))) (dolist (pattern patterns) (when (strpos pattern dname 0 "@") (return-from nil t))))) -@ +\end{chunk} \defun{filterAndFormatConstructors}{filterAndFormatConstructors} \calls{filterAndFormatConstructors}{sayMessage} @@ -33935,7 +33982,7 @@ in patterns \calls{filterAndFormatConstructors}{whatConstructors} \calls{filterAndFormatConstructors}{function} \usesdollar{filterAndFormatConstructors}{linelength} -<>= +\begin{chunk}{defun filterAndFormatConstructors} (defun |filterAndFormatConstructors| (|constrType| label patterns) (prog (l) (declare (special $linelength)) @@ -33968,7 +34015,7 @@ in patterns (cons '|%d| nil)))))))))))) (cond (l (|pp2Cols| l))))))) -@ +\end{chunk} \defun{whatConstructors}{whatConstructors} \calls{whatConstructors}{boot-equal} @@ -33976,7 +34023,7 @@ in patterns \calls{whatConstructors}{seq} \calls{whatConstructors}{msort} \calls{whatConstructors}{exit} -<>= +\begin{chunk}{defun whatConstructors} (defun |whatConstructors| (|constrType|) (prog nil (return @@ -33999,7 +34046,7 @@ in patterns (string |con|)) t0)))))))))))))) -@ +\end{chunk} \defunsec{apropos}{Display all operation names containing the fragment} Argument l is a list of operation name fragments. @@ -34013,7 +34060,7 @@ This displays all operation names containing these fragments \calls{apropos}{sayAsManyPerLineAsPossible} \calls{apropos}{msort} \calls{apropos}{sayKeyedMsg} -<>= +\begin{chunk}{defun apropos} (defun |apropos| (arg) "Display all operation names containing the fragment" (prog (ops) @@ -34042,13 +34089,13 @@ This displays all operation names containing these fragments (|sayMessage| " There are no operations containing those patterns") nil))))))) -@ +\end{chunk} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{with help page} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -<>= +\begin{chunk}{with.help} This command is obsolete. This has been renamed )library. @@ -34056,27 +34103,27 @@ This has been renamed )library. See also: o )library -@ +\end{chunk} \footnote{\fnref{library}} \defun{with}{with} \calls{with}{library} -<>= +\begin{chunk}{defun with} (defun |with| (args) (|library| args)) -@ +\end{chunk} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{workfiles help page} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \defun{workfiles}{workfiles} \calls{workfiles}{workfilesSpad2Cmd} -<>= +\begin{chunk}{defun workfiles} (defun |workfiles| (l) (|workfilesSpad2Cmd| l)) -@ +\end{chunk} \defun{workfilesSpad2Cmd}{workfilesSpad2Cmd} \calls{workfilesSpad2Cmd}{throwKeyedMsg} @@ -34095,7 +34142,7 @@ o )library \usesdollar{workfilesSpad2Cmd}{options} \usesdollar{workfilesSpad2Cmd}{sourceFiles} \usesdollar{workfilesSpad2Cmd}{linelength} -<>= +\begin{chunk}{defun workfilesSpad2Cmd} (defun |workfilesSpad2Cmd| (args) (let (deleteflag type flist type1 fl) (declare (special |$options| |$sourceFiles| $linelength)) @@ -34146,28 +34193,28 @@ o )library ((or (atom t5) (progn (setq fl (car t5)) nil)) nil) (|sayBrightly| (list " " (|namestring| fl)))))))))) -@ +\end{chunk} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cmdhead{zsystemdevelopment help page} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \defun{zsystemdevelopment}{zsystemdevelopment} \calls{zsystemdevelopment}{zsystemDevelopmentSpad2Cmd} -<>= +\begin{chunk}{defun zsystemdevelopment} (defun |zsystemdevelopment| (arg) (|zsystemDevelopmentSpad2Cmd| arg)) -@ +\end{chunk} \defun{zsystemDevelopmentSpad2Cmd}{zsystemDevelopmentSpad2Cmd} \calls{zsystemDevelopmentSpad2Cmd}{zsystemdevelopment1} \usesdollar{zsystemDevelopmentSpad2Cmd}{InteractiveMode} -<>= +\begin{chunk}{defun zsystemDevelopmentSpad2Cmd} (defun |zsystemDevelopmentSpad2Cmd| (arg) (declare (special |$InteractiveMode|)) (|zsystemdevelopment1| arg |$InteractiveMode|)) -@ +\end{chunk} \defun{zsystemdevelopment1}{zsystemdevelopment1} \catches{zsystemdevelopment1}{filenam} @@ -34188,7 +34235,7 @@ o )library \usesdollar{zsystemdevelopment1}{options} \uses{zsystemdevelopment1}{/wsname} \uses{zsystemdevelopment1}{/version} -<>= +\begin{chunk}{defun zsystemdevelopment1} (defun |zsystemdevelopment1| (arg im) (let (|$InteractiveMode| fromopt opt optargs newopt opt1 constream upf fun) (declare (special |$InteractiveMode| /wsname /version |$options|)) @@ -34260,81 +34307,81 @@ o )library ,@(|bright| "c ct e ec ect cls pause update patch compare record")))))))) -@ +\end{chunk} \chapter{Handling input files} \defun{readSpadProfileIfThere}{Handle .axiom.input file} \uses{readSpadProfileIfThere}{/editfile} -<>= +\begin{chunk}{defun readSpadProfileIfThere} (defun |readSpadProfileIfThere| () (let ((file (list '|.axiom| '|input|))) (declare (special /editfile)) (when (makeInputFilename file) (setq /editfile file) (/rq)))) -@ +\end{chunk} \defun{/rq}{/rq} \calls{/rq}{/rf-1(9)} \uses{/rq}{echo-meta} -<>= +\begin{chunk}{defun /rq} (defun /RQ (&rest foo &aux (echo-meta nil)) (declare (special Echo-Meta) (ignore foo)) (/rf-1 nil)) -@ +\end{chunk} \defun{/rf}{/rf} Compile with noisy output \calls{/rf}{/rf-1} \uses{/rf}{echo-meta} -<>= +\begin{chunk}{defun /rf} (defun /rf (&rest foo &aux (echo-meta t)) (declare (special echo-meta) (ignore foo)) (/rf-1 nil)) -@ +\end{chunk} \defvar{boot-line-stack} -<>= +\begin{chunk}{initvars} (defvar boot-line-stack nil "List of lines returned from preparse") -@ +\end{chunk} \defvar{in-stream} -<>= +\begin{chunk}{initvars} (defvar in-stream t "Current input stream.") -@ +\end{chunk} \defvar{out-stream} -<>= +\begin{chunk}{initvars} (defvar out-stream t "Current output stream.") -@ +\end{chunk} \defvar{file-closed} -<>= +\begin{chunk}{initvars} (defvar file-closed nil "Way to stop EOF tests for console input.") -@ +\end{chunk} \defvar{echo-meta} -<>= +\begin{chunk}{initvars} (defvar echo-meta nil "T if you want a listing of what has been read.") -@ +\end{chunk} \defdollar{noSubsumption} -<>= +\begin{chunk}{initvars} (defvar |$noSubsumption| t) -@ +\end{chunk} \defdollar{envHashTable} The \verb|$envHashTable| variable is a hashtable that optimizes lookups in the environment, which normally involve search. This gets populated in the addBinding function. -<>= +\begin{chunk}{initvars} (defvar |$envHashTable| nil) -@ +\end{chunk} \defun{addBinding}{Dynamically add bindings to the environment} \calls{addBinding}{getProplist} @@ -34342,7 +34389,7 @@ in the addBinding function. \calls{addBinding}{hput} \usesdollar{addBinding}{InteractiveMode} \usesdollar{addBinding}{envHashTable} -<>= +\begin{chunk}{defun addBinding} (defun |addBinding| (var proplist e) (let (tailContour tailEnv tmp1 curContour lx) (declare (special |$InteractiveMode| |$envHashTable|)) @@ -34369,13 +34416,13 @@ in the addBinding function. (setq lx (cons var proplist)) (cons (cons (cons lx curContour) tailContour) tailEnv))))))) -@ +\end{chunk} \defun{getProplist}{Fetch a property list for a symbol from CategoryFrame} \calls{getProplist}{getProplist} \calls{getProplist}{search} \usesdollar{getProplist}{CategoryFrame} -<>= +\begin{chunk}{defun getProplist} (defun |getProplist| (x e) (let (u pl) (declare (special |$CategoryFrame|)) @@ -34384,17 +34431,17 @@ in the addBinding function. ((setq u (|search| x e)) u) ((setq pl (|search| x |$CategoryFrame|)) pl)))) -@ +\end{chunk} \defun{search}{Search for a binding in the environment list} \calls{search}{searchCurrentEnv} \calls{search}{searchTailEnv} -<>= +\begin{chunk}{defun search} (defun |search| (x e) (let ((curEnv (car e)) (tailEnv (cdr e))) (or (|searchCurrentEnv| x curEnv) (|searchTailEnv| x tailEnv)))) -@ +\end{chunk} \defun{searchCurrentEnv}{Search for a binding in the current environment} \begin{verbatim} @@ -34405,7 +34452,7 @@ searchCurrentEnv(x,currentEnv) == \end{verbatim} \calls{searchCurrentEnv}{assq} \calls{searchCurrentEnv}{kdr} -<>= +\begin{chunk}{defun searchCurrentEnv} (defun |searchCurrentEnv| (x currentEnv) (prog (u signal) (return @@ -34420,7 +34467,7 @@ searchCurrentEnv(x,currentEnv) == (t nil))))) (kdr signal)))))) -@ +\end{chunk} \defun{searchTailEnv}{searchTailEnv} \begin{verbatim} @@ -34434,7 +34481,7 @@ searchCurrentEnv(x,currentEnv) == \end{verbatim} \calls{searchTailEnv}{assq} \calls{searchTailEnv}{kdr} -<>= +\begin{chunk}{defun searchTailEnv} (defun |searchTailEnv| (x e) (prog (u signal) (return @@ -34459,37 +34506,37 @@ searchCurrentEnv(x,currentEnv) == (t nil))))))) (kdr signal)))))) -@ +\end{chunk} \chapter{File Parsing} \defun{addBindingInteractive}{Bind a variable in the interactive environment} \calls{addBindingInteractive}{assq} -<>= +\begin{chunk}{defun addBindingInteractive} (defun |addBindingInteractive| (var proplist e) (let ((curContour (caar e)) u) (cond ((setq u (assq var curContour)) (rplacd u proplist) e) (t (rplac (caar e) (cons (cons var proplist) curContour)) e)))) -@ +\end{chunk} \defvar{line-handler} -<>= +\begin{chunk}{initvars} (defparameter line-handler 'next-META-line "Who grabs lines for us.") -@ +\end{chunk} \defdollar{spad-errors} -<>= +\begin{chunk}{initvars} (defvar $spad_errors (vector 0 0 0)) -@ +\end{chunk} \defvar{xtokenreader} -<>= +\begin{chunk}{initvars} (defvar xtokenreader 'spadtok) -@ +\end{chunk} \defun{init-boot/spad-reader}{Initialize the spad reader} \calls{init-boot/spad-reader}{next-lines-clear} @@ -34502,7 +34549,7 @@ searchCurrentEnv(x,currentEnv) == \uses{init-boot/spad-reader}{meta-error-handler} \uses{init-boot/spad-reader}{file-closed} \uses{init-boot/spad-reader}{boot-line-stack} -<>= +\begin{chunk}{defun init-boot/spad-reader} (defun init-boot/spad-reader () (declare (special $spad_errors spaderrorstream *standard-output* xtokenreader line-handler meta-error-handler file-closed @@ -34516,21 +34563,21 @@ searchCurrentEnv(x,currentEnv) == (next-lines-clear) (ioclear)) -@ +\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} (defun next-lines-clear () (setq boot-line-stack nil)) -@ +\end{chunk} \chapter{Handling output} \section{Special Character Tables} \defdollar{defaultSpecialCharacters} -<>= +\begin{chunk}{initvars} (defvar |$defaultSpecialCharacters| (list (int-char 28) ; upper left corner (int-char 27) ; upper right corner @@ -34550,10 +34597,10 @@ searchCurrentEnv(x,currentEnv) == (int-char 44) ; center box tee (int-char 224))) ; back slash -@ +\end{chunk} \defdollar{plainSpecialCharacters0} -<>= +\begin{chunk}{initvars} (defvar |$plainSpecialCharacters0| (list (int-char 78) ; upper left corner (+) (int-char 78) ; upper right corner (+) @@ -34573,10 +34620,10 @@ searchCurrentEnv(x,currentEnv) == (int-char 78) ; center box tee (+) (int-char 224))) ; back slash -@ +\end{chunk} \defdollar{plainSpecialCharacters1} -<>= +\begin{chunk}{initvars} (defvar |$plainSpecialCharacters1| (list (int-char 107) ; upper left corner (,) (int-char 107) ; upper right corner (,) @@ -34596,10 +34643,10 @@ searchCurrentEnv(x,currentEnv) == (int-char 78) ; center box tee (+) (int-char 224))) ; back slash -@ +\end{chunk} \defdollar{plainSpecialCharacters2} -<>= +\begin{chunk}{initvars} (defvar |$plainSpecialCharacters2| (list (int-char 79) ; upper left corner (|) (int-char 79) ; upper right corner (|) @@ -34619,10 +34666,10 @@ searchCurrentEnv(x,currentEnv) == (int-char 78) ; center box tee (+) (int-char 224))) ; back slash -@ +\end{chunk} \defdollar{plainSpecialCharacters3} -<>= +\begin{chunk}{initvars} (defvar |$plainSpecialCharacters3| (list (int-char 96) ; upper left corner (-) (int-char 96) ; upper right corner (-) @@ -34642,10 +34689,10 @@ searchCurrentEnv(x,currentEnv) == (int-char 78) ; center box tee (+) (int-char 224))) ; back slash -@ +\end{chunk} \defdollar{plainRTspecialCharacters} -<>= +\begin{chunk}{initvars} (defvar |$plainRTspecialCharacters| (list (QUOTE +) ; upper left corner (+) (QUOTE +) ; upper right corner (+) @@ -34665,10 +34712,10 @@ searchCurrentEnv(x,currentEnv) == (QUOTE +) ; center box tee (+) (QUOTE |\\|))) ; back slash -@ +\end{chunk} \defdollar{RTspecialCharacters} -<>= +\begin{chunk}{initvars} (defvar |$RTspecialCharacters| (list (intern (string (code-char 218))) ;-- upper left corner (+) (intern (string (code-char 191))) ;-- upper right corner (+) @@ -34689,16 +34736,16 @@ searchCurrentEnv(x,currentEnv) == (intern (string (code-char 197))) ;-- center box tee (+) (QUOTE |\\|))) ;-- back slash -@ +\end{chunk} \defdollar{specialCharacters} -<>= +\begin{chunk}{initvars} (defvar |$specialCharacters| |$RTspecialCharacters|) -@ +\end{chunk} \defdollar{specialCharacterAlist} -<>= +\begin{chunk}{initvars} (defvar |$specialCharacterAlist| '((|ulc| . 0) (|urc| . 1) @@ -34718,7 +34765,7 @@ searchCurrentEnv(x,currentEnv) == (|ctee| . 15) (|bslash| . 16))) -@ +\end{chunk} \defun{specialChar}{Look up a special character code for a symbol} This function looks up a symbol in \verb|$specialCharacterAlist|, @@ -34728,7 +34775,7 @@ gets the index into the EBCDIC table, and returns the appropriate character. \calls{specialChar}{assq} \usesdollar{specialChar}{specialCharacters} \usesdollar{specialChar}{specialCharacterAlist} -<>= +\begin{chunk}{defun specialChar} (defun |specialChar| (symbol) (let (code) (declare (special |$specialCharacters| |$specialCharacterAlist|)) @@ -34736,12 +34783,12 @@ gets the index into the EBCDIC table, and returns the appropriate character. (elt |$specialCharacters| code) "?"))) -@ +\end{chunk} \chapter{Stream and File Handling} \defun{make-instream}{make-instream} \calls{make-instream}{makeInputFilename} -<>= +\begin{chunk}{defun make-instream} (defun make-instream (filespec &optional (recnum 0)) (declare (ignore recnum)) (cond ((numberp filespec) (make-synonym-stream '*terminal-io*)) @@ -34749,22 +34796,22 @@ gets the index into the EBCDIC table, and returns the appropriate character. (t (open (makeInputFilename filespec) :direction :input :if-does-not-exist nil)))) -@ +\end{chunk} \defun{make-outstream}{make-outstream} \calls{make-outstream}{make-filename} -<>= +\begin{chunk}{defun make-outstream} (defun make-outstream (filespec &optional (width nil) (recnum 0)) (declare (ignore width) (ignore recnum)) (cond ((numberp filespec) (make-synonym-stream '*terminal-io*)) ((null filespec) (error "not handled yet")) (t (open (make-filename filespec) :direction :output)))) -@ +\end{chunk} \defun{make-appendstream}{make-appendstream} \calls{make-appendstream}{make-filename} -<>= +\begin{chunk}{defun make-appendstream} (defun make-appendstream (filespec &optional (width nil) (recnum 0)) "fortran support" (declare (ignore width) (ignore recnum)) @@ -34774,10 +34821,10 @@ gets the index into the EBCDIC table, and returns the appropriate character. ('else (open (make-filename filespec) :direction :output :if-exists :append :if-does-not-exist :create)))) -@ +\end{chunk} \defun{defiostream}{defiostream} -<>= +\begin{chunk}{defun defiostream} (defun defiostream (stream-alist buffer-size char-position) (declare (ignore buffer-size)) (let ((mode (or (cdr (assoc 'mode stream-alist)) 'input)) @@ -34793,37 +34840,37 @@ gets the index into the EBCDIC table, and returns the appropriate character. (file-position strm char-position)) strm)))) -@ +\end{chunk} \defun{shut}{shut} \calls{shut}{is-console} -<>= +\begin{chunk}{defun shut} (defun shut (st) (if (is-console st) st (if (streamp st) (close st) -1))) -@ +\end{chunk} \defun{eofp}{eofp} -<>= +\begin{chunk}{defun eofp} (defun eofp (stream) (null (peek-char nil stream nil nil))) -@ +\end{chunk} \defun{makeStream}{makeStream} \calls{makeStream}{make-appendstream} \calls{makeStream}{make-outstream} -<>= +\begin{chunk}{defun makeStream} (defun |makeStream| (append filename i j) (if append (make-appendstream filename i j) (make-outstream filename i j))) -@ +\end{chunk} \defun{makeInputFilename}{Construct a new input file name} -<>= +\begin{chunk}{defun makeInputFilename} (defun makeInputFilename (filearg &optional (filetype nil)) (let* ((filename (make-filename filearg filetype)) @@ -34837,14 +34884,14 @@ gets the index into the EBCDIC table, and returns the appropriate character. (return newfn))) (probeName filename)))) -@ +\end{chunk} \defun{getDirectoryList}{getDirectoryList} \usesdollar{getDirectoryList}{current-directory} \usesdollar{getDirectoryList}{UserLevel} \usesdollar{getDirectoryList}{library-directory-list} \usesdollar{getDirectoryList}{directory-list} -<>= +\begin{chunk}{defun getDirectoryList} (defun getDirectoryList (ft &aux (cd (namestring $current-directory))) (declare (special $current-directory |$UserLevel| $library-directory-list $directory-list)) @@ -34858,45 +34905,45 @@ gets the index into the EBCDIC table, and returns the appropriate character. :test #'string=))) -@ +\end{chunk} \defun{probeName}{probeName} Sometimes we are given a file and sometimes we are given the name of an Axiom KAF (Keyed-Access File). KAF files are actually directories with a single file called ``index.kaf''. We check for the latter case and return the directory name as the filename, per Axiom convention. -<>= +\begin{chunk}{defun probeName} (defun probeName (file) (when (or (probe-file file) (probe-file (concatenate 'string (namestring file) "/index.kaf"))) (namestring file))) -@ +\end{chunk} \defun{makeFullNamestring}{makeFullNamestring} -<>= +\begin{chunk}{defun makeFullNamestring} (defun makeFullNamestring (filearg &optional (filetype nil)) (namestring (merge-pathnames (make-filename filearg filetype)))) -@ +\end{chunk} \defun{replaceFile}{Replace a file by erase and rename} \calls{makeStream}{makeFullNamestring} -<>= +\begin{chunk}{defun replaceFile} (defun replaceFile (filespec1 filespec2) ($erase (setq filespec1 (makeFullNamestring filespec1))) (rename-file (makeFullNamestring filespec2) filespec1)) -@ +\end{chunk} \chapter{The Spad Server Mechanism} \defun{openserver}{openserver} This is a cover function for the C code used for communication interface. -<>= +\begin{chunk}{defun openserver} (defun openserver (name) (open_server name)) -@ +\end{chunk} \chapter{Axiom Build-time Functions} \defun{spad-save}{spad-save} @@ -34952,7 +34999,7 @@ DEBUGSYS=${OBJ}/${SYS}/bin/debugsys \calls{spad-save}{save-system} \usesdollar{spad-save}{SpadServer} \usesdollar{spad-save}{openServerIfTrue} -<>= +\begin{chunk}{defun spad-save} (defun user::spad-save (save-file) (declare (special |$SpadServer| $openServerIfTrue)) (setq |$SpadServer| nil) @@ -34971,7 +35018,7 @@ DEBUGSYS=${OBJ}/${SYS}/bin/debugsys (preserve) ) -@ +\end{chunk} \chapter{Exposure Groups} Exposure groups are a way of controlling the namespace available @@ -35157,7 +35204,7 @@ Each operation has a property on its symbol name called 'operation which is a list of all of the signatures of operations with that name. \defstruct{database} -<>= +\begin{chunk}{initvars} (defstruct database abbreviation ; interp. ancestors ; interp. @@ -35182,12 +35229,12 @@ which is a list of all of the signatures of operations with that name. spare ; superstition ) ; database structure -@ +\end{chunk} \defvar{*defaultdomain-list*} There are only a small number of domains that have default domains. rather than keep this slot in every domain we maintain a list here. -<>= +\begin{chunk}{initvars} (defvar *defaultdomain-list* '( (|MultisetAggregate| |Multiset|) (|FunctionSpace| |Expression|) @@ -35206,30 +35253,30 @@ rather than keep this slot in every domain we maintain a list here. (|FileNameCategory| |FileName|) (|OctonionCategory| |Octonion|))) -@ +\end{chunk} \defvar{*operation-hash*} -<>= +\begin{chunk}{initvars} (defvar *operation-hash* nil "given an operation name, what are its modemaps?") -@ +\end{chunk} \defvar{*hasCategory-hash*} This hash table is used to answer the question``does domain x have category y?''. this is answered by constructing a pair of (x . y) and doing an equal hash into this table. -<>= +\begin{chunk}{initvars} (defvar *hasCategory-hash* nil "answers x has y category questions") -@ +\end{chunk} \defvar{*miss*} This variable is used for debugging. If a hash table lookup fails and this variable is non-nil then a message is printed. -<>= +\begin{chunk}{initvars} (defvar *miss* nil "print out cache misses on getdatabase calls") -@ +\end{chunk} Note that constructorcategory information need only be kept for items of type category. this will be fixed in the next iteration @@ -35250,90 +35297,90 @@ position information in the database then the database is NOT read in and is assumed to match the in-core version \defvar{*compressvector*} -<>= +\begin{chunk}{initvars} (defvar *compressvector* nil "a vector of things to compress in the databases") -@ +\end{chunk} \defvar{*compressVectorLength*} -<>= +\begin{chunk}{initvars} (defvar *compressVectorLength* 0 "length of the compress vector") -@ +\end{chunk} \defvar{*compress-stream*} -<>= +\begin{chunk}{initvars} (defvar *compress-stream* nil "an stream containing the compress vector") -@ +\end{chunk} \defvar{*compress-stream-stamp*} -<>= +\begin{chunk}{initvars} (defvar *compress-stream-stamp* 0 "*compress-stream* (position . time)") -@ +\end{chunk} \defvar{*interp-stream*} -<>= +\begin{chunk}{initvars} (defvar *interp-stream* nil "an open stream to the interpreter database") -@ +\end{chunk} \defvar{*interp-stream-stamp*} -<>= +\begin{chunk}{initvars} (defvar *interp-stream-stamp* 0 "*interp-stream* (position . time)") -@ +\end{chunk} \defvar{*operation-stream*} This is indexed by operation, not constructor -<>= +\begin{chunk}{initvars} (defvar *operation-stream* nil "the stream to operation.daase") -@ +\end{chunk} \defvar{*operation-stream-stamp*} -<>= +\begin{chunk}{initvars} (defvar *operation-stream-stamp* 0 "*operation-stream* (position . time)") -@ +\end{chunk} \defvar{*browse-stream*} -<>= +\begin{chunk}{initvars} (defvar *browse-stream* nil "an open stream to the browser database") -@ +\end{chunk} \defvar{*browse-stream-stamp*} -<>= +\begin{chunk}{initvars} (defvar *browse-stream-stamp* 0 "*browse-stream* (position . time)") -@ +\end{chunk} \defvar{*category-stream*} This is indexed by (domain . category) -<>= +\begin{chunk}{initvars} (defvar *category-stream* nil "an open stream to the category table") -@ +\end{chunk} \defvar{*category-stream-stamp*} -<>= +\begin{chunk}{initvars} (defvar *category-stream-stamp* 0 "*category-stream* (position . time)") -@ +\end{chunk} \defvar{*allconstructors*} -<>= +\begin{chunk}{initvars} (defvar *allconstructors* nil "a list of all the constructors in the system") -@ +\end{chunk} \defvar{*allOperations*} -<>= +\begin{chunk}{initvars} (defvar *allOperations* nil "a list of all the operations in the system") -@ +\end{chunk} \defun{resethashtables}{Reset all hash tables before saving system} \calls{resethashtables}{compressopen} @@ -35355,7 +35402,7 @@ This is indexed by (domain . category) \uses{resethashtables}{*allconstructors*} \uses{resethashtables}{*operation-hash*} \uses{resethashtables}{*hascategory-hash*} -<>= +\begin{chunk}{defun resethashtables} (defun resethashtables () "set all -hash* to clean values. used to clean up core before saving system" (declare (special *sourcefiles* *interp-stream* *operation-stream* @@ -35385,12 +35432,12 @@ This is indexed by (domain . category) (close *browse-stream*) (gbc t)) -@ +\end{chunk} \defun{initial-getdatabase}{Preload algebra into saved system} \calls{initial-getdatabase}{getdatabase} \calls{initial-getdatabase}{getEnv} -<>= +\begin{chunk}{defun initial-getdatabase} (defun initial-getdatabase () "fetch data we want in the saved system" (let (hascategory constructormodemapAndoperationalist operation constr) @@ -35479,7 +35526,7 @@ This is indexed by (domain . category) (format t "skipped.~%")))) (format t "~%"))) -@ +\end{chunk} \defun{interpOpen}{Open the interp database} Format of an entry in interp.daase: @@ -35507,7 +35554,7 @@ Format of an entry in interp.daase: \uses{interpOpen}{*allconstructors*} \uses{interpOpen}{*interp-stream*} \uses{interpOpen}{*interp-stream-stamp*} -<>= +\begin{chunk}{defun interpOpen} (defun interpOpen () "open the interpreter database and hash the keys" (declare (special $spadroot *allconstructors* *interp-stream* @@ -35539,7 +35586,7 @@ Format of an entry in interp.daase: (setf (database-ancestors dbstruct) (nth 11 item)))) (format t "~&"))) -@ +\end{chunk} This is an initialization function for the constructor database it sets up 2 hash tables, opens the database and hashes the index values. @@ -35574,7 +35621,7 @@ Format of an entry in browse.daase: \uses{browseOpen}{*allconstructors*} \uses{browseOpen}{*browse-stream*} \uses{browseOpen}{*browse-stream-stamp*} -<>= +\begin{chunk}{defun browseOpen} (defun browseOpen () "open the constructor database and hash the keys" (declare (special $spadroot *allconstructors* *browse-stream* @@ -35606,7 +35653,7 @@ Format of an entry in browse.daase: (setf (database-parents dbstruct) (seventh item)))) (format t "~&"))) -@ +\end{chunk} \defun{categoryOpen}{Open the category database} \calls{categoryOpen}{unsqueeze} @@ -35614,7 +35661,7 @@ Format of an entry in browse.daase: \uses{categoryOpen}{*hasCategory-hash*} \uses{categoryOpen}{*category-stream*} \uses{categoryOpen}{*category-stream-stamp*} -<>= +\begin{chunk}{defun categoryOpen} (defun categoryOpen () "open category.daase and hash the keys" (declare (special $spadroot *hasCategory-hash* *category-stream* @@ -35634,7 +35681,7 @@ Format of an entry in browse.daase: (setf (gethash (first item) *hasCategory-hash*) (second item)))) (format t "~&"))) -@ +\end{chunk} \defun{operationOpen}{Open the operations database} \calls{operationOpen}{unsqueeze} @@ -35642,7 +35689,7 @@ Format of an entry in browse.daase: \uses{operationOpen}{*operation-hash*} \uses{operationOpen}{*operation-stream*} \uses{operationOpen}{*operation-stream-stamp*} -<>= +\begin{chunk}{defun operationOpen} (defun operationOpen () "read operation database and hash the keys" (declare (special $spadroot *operation-hash* *operation-stream* @@ -35661,12 +35708,12 @@ Format of an entry in browse.daase: (setf (gethash (car item) *operation-hash*) (cdr item)))) (format t "~&"))) -@ +\end{chunk} \defun{addoperations}{Add operations from newly compiled code} \calls{addoperations}{getdatabase} \uses{addoperations}{*operation-hash*} -<>= +\begin{chunk}{defun addoperations} (defun addoperations (constructor oldmaps) "add ops from a )library domain to *operation-hash*" (declare (special *operation-hash*)) @@ -35682,11 +35729,11 @@ Format of an entry in browse.daase: (setq newmap (getdatabase op 'operation)) (setf (gethash op *operation-hash*) (cons (cdr map) newmap))))) -@ +\end{chunk} \defun{showdatabase}{Show all database attributes of a constructor} \calls{showdatabase}{getdatabase} -<>= +\begin{chunk}{defun showdatabase} (defun showdatabase (constructor) (format t "~&~a: ~a~%" 'constructorkind (getdatabase constructor 'constructorkind)) @@ -35733,11 +35780,11 @@ Format of an entry in browse.daase: (format t "~&~a: ~a~%" 'parents (getdatabase constructor 'parents))) -@ +\end{chunk} \defun{setdatabase}{Set a value for a constructor key in the database} \calls{setdatabase}{make-database} -<>= +\begin{chunk}{defun setdatabase} (defun setdatabase (constructor key value) (let (struct) (when (symbolp constructor) @@ -35752,17 +35799,17 @@ Format of an entry in browse.daase: (constructorkind (setf (database-constructorkind struct) value)))))) -@ +\end{chunk} \defun{deldatabase}{Delete a value for a constructor key in the database} -<>= +\begin{chunk}{defun deldatabase} (defun deldatabase (constructor key) (when (symbolp constructor) (case key (abbreviation (setf (get constructor 'abbreviationfor) nil))))) -@ +\end{chunk} \defun{getdatabase}{Get constructor information for a database key} \calls{getdatabase}{warn} @@ -35777,7 +35824,7 @@ Format of an entry in browse.daase: \uses{getdatabase}{*category-stream*} \uses{getdatabase}{*hasCategory-hash*} \uses{getdatabase}{*operation-stream*} -<>= +\begin{chunk}{defun getdatabase} (defun getdatabase (constructor key) (declare (special $spadroot) (special *miss*)) (when (eq *miss* t) (format t "getdatabase call: ~20a ~a~%" constructor key)) @@ -35938,7 +35985,7 @@ Format of an entry in browse.daase: (setq data (concatenate 'string $spadroot "/algebra/" data ".o"))))))) data)) -@ +\end{chunk} \defun{library}{The {\tt )library} top level command} \calls{library}{localdatabase} @@ -35946,7 +35993,7 @@ Format of an entry in browse.daase: \calls{library}{tersyscommand} \usesdollar{library}{newConlist} \usesdollar{library}{options} -<>= +\begin{chunk}{defun library} (defun |library| (args) (let (original-directory) (declare (special |$options| |$newConlist|)) @@ -35957,7 +36004,7 @@ Format of an entry in browse.daase: (system::chdir original-directory) (tersyscommand))) -@ +\end{chunk} \defun{localdatabase}{Read a local filename and update the hash tables} The localdatabase function tries to find files in the order of: @@ -35976,7 +36023,7 @@ The localdatabase function tries to find files in the order of: \usesdollar{localdatabase}{forceDatabaseUpdate} \usesdollar{localdatabase}{ConstructorCache} \uses{localdatabase}{*index-filename*} -<>= +\begin{chunk}{defun localdatabase} (defun localdatabase (filelist options &optional (make-database? nil)) "read a local filename and update the hash tables" (labels ( @@ -36031,7 +36078,7 @@ The localdatabase function tries to find files in the order of: (localnrlib key file object make-database? noexpose)) (clrhash |$ConstructorCache|)))) -@ +\end{chunk} \defun{localnrlib}{Update the database from an nrlib index.kaf file} \calls{localnrlib}{getdatabase} @@ -36049,7 +36096,7 @@ The localdatabase function tries to find files in the order of: \usesdollar{localnrlib}{FormalMapVariableList} \uses{localnrlib}{*allOperations*} \uses{localnrlib}{*allconstructors*} -<>= +\begin{chunk}{defun localnrlib} (defun localnrlib (key nrlib object make-database? noexpose) "given a string pathname of an index.kaf and the object update the database" (labels ( @@ -36125,7 +36172,7 @@ The localdatabase function tries to find files in the order of: (apply key args))) (|sayKeyedMsg| 'S2IU0001 (list key object)))))) -@ +\end{chunk} \defun{make-databases}{Make new databases} Making new databases consists of: @@ -36187,7 +36234,7 @@ constructor abbreviation to pamphlet file name. \uses{make-databases}{*compressvector*} \uses{make-databases}{*allconstructors*} \uses{make-databases}{*operation-hash*} -<>= +\begin{chunk}{defun make-databases} (defun make-databases (ext dirlist) (labels ( (build-name-to-pamphlet-hash (dir) @@ -36321,12 +36368,12 @@ constructor abbreviation to pamphlet file name. (rename-file "category.build" (final-name "category"))))) -@ +\end{chunk} \defun{DaaseName}{Construct the proper database full pathname} \calls{DaaseName}{getEnv} \usesdollar{DaaseName}{spadroot} -<>= +\begin{chunk}{defun DaaseName} (defun DaaseName (name erase?) (let (daase filename) (declare (special $spadroot)) @@ -36338,7 +36385,7 @@ constructor abbreviation to pamphlet file name. (when erase? (system::system (concatenate 'string "rm -f " filename))) filename)) -@ +\end{chunk} \subsection{compress.daase} The compress database is special. It contains a list of symbols. @@ -36355,7 +36402,7 @@ short negative numbers. \uses{compressOpen}{*compressVectorLength*} \uses{compressOpen}{*compress-stream*} \uses{compressOpen}{*compress-stream-stamp*} -<>= +\begin{chunk}{defun compressOpen} (defun compressOpen () (let (lst stamp pos) (declare (special $spadroot *compressvector* *compressVectorLength* @@ -36373,10 +36420,10 @@ short negative numbers. (setq *compressvector* (make-array (car lst) :initial-contents (cdr lst)))))) -@ +\end{chunk} \defvar{*attributes*} -<>= +\begin{chunk}{initvars} (defvar *attributes* '(|nil| |infinite| |arbitraryExponent| |approximate| |complex| |shallowMutable| |canonical| |noetherian| |central| @@ -36386,7 +36433,7 @@ short negative numbers. |multiplicativeValuation| |finiteAggregate| |shallowlyMutable| |commutative|) "The list of known algebra attributes") -@ +\end{chunk} \defun{write-compress}{Write out the compress database} \calls{write-compress}{allConstructors} @@ -36394,7 +36441,7 @@ short negative numbers. \uses{write-compress}{*compress-stream*} \uses{write-compress}{*attributes*} \uses{write-compress}{*compressVectorLength*} -<>= +\begin{chunk}{defun write-compress} (defun write-compress () (let (compresslist masterpos out) (declare (special *compress-stream* *attributes* *compressVectorLength*)) @@ -36433,13 +36480,13 @@ short negative numbers. (finish-output out) (close out))) -@ +\end{chunk} \defun{squeeze}{Compress an expression using the compress vector} This function is used to minimize the size of the databases by replacing symbols with indexes into the compression vector. \uses{squeeze}{*compressvector*} -<>= +\begin{chunk}{defun squeeze} (defun squeeze (expr) (declare (special *compressvector*)) (let (leaves pos (bound (length *compressvector*))) @@ -36462,13 +36509,13 @@ replacing symbols with indexes into the compression vector. (nsubst (- pos) leaf expr))) expr))) -@ +\end{chunk} \defun{unsqueeze}{Uncompress an expression using the compress vector} This function is used to recover symbols from the databases by using integers as indexes into the compression vector. \uses{unsqueeze}{*compressvector*} -<>= +\begin{chunk}{defun unsqueeze} (defun unsqueeze (expr) (declare (special *compressvector*)) (cond ((atom expr) @@ -36479,7 +36526,7 @@ using integers as indexes into the compression vector. (rplacd expr (unsqueeze (cdr expr))) expr))) -@ +\end{chunk} \subsection{Building the interp.daase from hash tables} \begin{verbatim} @@ -36693,7 +36740,7 @@ Here I'll try to outline the interp database write procedure \usesdollar{write-interpdb}{spadroot} \uses{write-interpdb}{*ancestors-hash*} \uses{write-interpdb}{*print-pretty*} -<>= +\begin{chunk}{defun write-interpdb} (defun write-interpdb () "build interp.daase from hash tables" (declare (special $spadroot *ancestors-hash*)) @@ -36756,7 +36803,7 @@ Here I'll try to outline the interp database write procedure (finish-output out) (close out))) -@ +\end{chunk} \subsection{Building the browse.daase from hash tables} \begin{verbatim} @@ -36785,7 +36832,7 @@ time stamp at the top of the file and close the file. \usesdollar{write-browsedb}{spadroot} \uses{write-browsedb}{*sourcefiles*} \uses{write-browsedb}{*print-pretty*} -<>= +\begin{chunk}{defun write-browsedb} (defun write-browsedb () "make browse.daase from hash tables" (declare (special $spadroot *sourcefiles*)) @@ -36822,7 +36869,7 @@ time stamp at the top of the file and close the file. (finish-output out) (close out))) -@ +\end{chunk} \subsection{Building the category.daase from hash tables} This is a single table of category hash table information, dumped in the @@ -36833,7 +36880,7 @@ database format. \calls{write-categorydb}{squeeze} \uses{write-categorydb}{*print-pretty*} \uses{write-categorydb}{*hasCategory-hash*} -<>= +\begin{chunk}{defun write-categorydb} (defun write-categorydb () "make category.daase from scratch. contains the *hasCategory-hash* table" (let (out master pos *print-pretty*) @@ -36860,7 +36907,7 @@ database format. (finish-output out) (close out))) -@ +\end{chunk} \subsection{Building the operation.daase from hash tables} This is a single table of operations hash table information, dumped in the @@ -36868,7 +36915,7 @@ database format. \defun{write-operationdb}{Write the operations database} \calls{write-operationdb}{squeeze} \uses{write-operationdb}{*operation-hash*} -<>= +\begin{chunk}{defun write-operationdb} (defun write-operationdb () (let (pos master out) (declare (special leaves *operation-hash*)) @@ -36889,13 +36936,13 @@ database format. (finish-output out) (close out))) -@ +\end{chunk} \subsection{Database support operations} \defun{write-warmdata}{Data preloaded into the image at build time} \usesdollar{write-warmdata}{topicHash} -<>= +\begin{chunk}{defun write-warmdata} (defun write-warmdata () "write out information to be loaded into the image at build time" (declare (special |$topicHash|)) @@ -36905,21 +36952,21 @@ database format. (maphash #'(lambda (k v) (format out "(setf (gethash '|~a| |$topicHash|) ~a)~%" k v)) |$topicHash|))) -@ +\end{chunk} \defun{allConstructors}{Return all constructors} \uses{allConstructors}{*allconstructors*} -<>= +\begin{chunk}{defun allConstructors} (defun |allConstructors| () (declare (special *allconstructors*)) *allconstructors*) -@ +\end{chunk} \defun{allOperations}{Return all operations} \uses{allOperations}{*allOperations*} \uses{allOperations}{*operation-hash*} -<>= +\begin{chunk}{defun allOperations} (defun |allOperations| () (declare (special *allOperations* *operation-hash*)) (unless *allOperations* @@ -36927,17 +36974,17 @@ database format. *operation-hash*)) *allOperations*) -@ +\end{chunk} \chapter{System Statistics} \calls{statisticsInitialization}{gbc-time} -<>= +\begin{chunk}{defun statisticsInitialization} (defun |statisticsInitialization| () "initialize the garbage collection timer" #+:akcl (system:gbc-time 0) nil) -@ +\end{chunk} \chapter{Special Lisp Functions} \section{Axiom control structure macros} Axiom used various control structures in the boot code which are not @@ -36947,20 +36994,20 @@ to lisp translations easier to read. \defmacro{while} While the condition is true, repeat the body. When the condition is false, return t. -<>= +\begin{chunk}{defmacro while} (defmacro while (condition &rest body) `(loop (if (not ,condition) (return t)) ,@body)) -@ +\end{chunk} \defmacro{whileWithResult} While the condition is true, repeat the body. When the condition is false, return the result form's value. -<>= +\begin{chunk}{defmacro whileWithResult} (defmacro whileWithResult (condition result &rest body) `(loop (if (not ,condition) ,@result) ,@body)) -@ +\end{chunk} \section{Filename Handling} This code implements the Common Lisp pathname functions for @@ -36969,44 +37016,44 @@ filetype and filemode. We also UPCASE everything. \defun{namestring}{namestring} \calls{namestring}{pathname} -<>= +\begin{chunk}{defun namestring} (defun |namestring| (arg) (namestring (|pathname| arg))) -@ +\end{chunk} \defun{pathnameName}{pathnameName} \calls{pathnameName}{pathname} -<>= +\begin{chunk}{defun pathnameName} (defun |pathnameName| (arg) (pathname-name (|pathname| arg))) -@ +\end{chunk} \defun{pathnameType}{pathnameType} \calls{pathnameType}{pathname} -<>= +\begin{chunk}{defun pathnameType} (defun |pathnameType| (arg) (pathname-type (|pathname| arg))) -@ +\end{chunk} \defun{pathnameTypeId}{pathnameTypeId} \calls{pathnameTypeId}{upcase} \calls{pathnameTypeId}{object2Identifier} \calls{pathnameTypeId}{pathnameType} -<>= +\begin{chunk}{defun pathnameTypeId} (defun |pathnameTypeId| (arg) (upcase (|object2Identifier| (|pathnameType| arg)))) -@ +\end{chunk} \defun{mergePathnames}{mergePathnames} \calls{mergePathnames}{pathnameName} \calls{mergePathnames}{nequal} \calls{mergePathnames}{pathnameType} \calls{mergePathnames}{pathnameDirectory} -<>= +\begin{chunk}{defun mergePathnames} (defun |mergePathnames| (a b) (let (fn ft fm) (cond @@ -37017,21 +37064,21 @@ filetype and filemode. We also UPCASE everything. ((equal (setq fm (|pathnameDirectory| a)) (list "*" )) b) (t a)))) -@ +\end{chunk} \defun{pathnameDirectory}{pathnameDirectory} \calls{pathnameDirectory}{pathname} -<>= +\begin{chunk}{defun pathnameDirectory} (defun |pathnameDirectory| (arg) (namestring (make-pathname :directory (pathname-directory (|pathname| arg))))) -@ +\end{chunk} \defun{pathname}{Axiom pathnames} \calls{pathname}{pairp} \calls{pathname}{pathname} \calls{pathname}{make-filename} -<>= +\begin{chunk}{defun pathname} (defun |pathname| (p) (cond ((null p) p) @@ -37041,34 +37088,34 @@ filetype and filemode. We also UPCASE everything. (when (> (|#| p) 2) (setq p (cons (elt p 0) (cons (elt p 1) nil)))) (pathname (apply #'make-filename p))))) -@ +\end{chunk} \defun{makePathname}{makePathname} \calls{makePathname}{pathname} \calls{makePathname}{object2String} -<>= +\begin{chunk}{defun makePathname} (defun |makePathname| (name type dir) (declare (ignore dir)) (|pathname| (list (|object2String| name) (|object2String| type)))) -@ +\end{chunk} \defun{deleteFile}{Delete a file} \calls{deleteFile}{erase} \calls{deleteFile}{pathname} \usesdollar{deleteFile}{erase} -<>= +\begin{chunk}{defun deleteFile} (defun |deleteFile| (arg) (declare (special $erase)) ($erase (|pathname| arg))) -@ +\end{chunk} \defun{wrap}{wrap} \calls{wrap}{pairp} \calls{wrap}{lotsof} \calls{wrap}{wrap} -<>= +\begin{chunk}{defun wrap} (defun wrap (list-of-items wrapper) (prog nil (cond @@ -37083,79 +37130,79 @@ filetype and filemode. We also UPCASE everything. (first list-of-items)) (wrap (cdr list-of-items) (cdr wrapper)))))) -@ +\end{chunk} \defun{lotsof}{lotsof} -<>= +\begin{chunk}{defun lotsof} (defun lotsof (&rest items) (setq items (copy-list items)) (nconc items items)) -@ +\end{chunk} \defmacro{startsId?} -<>= +\begin{chunk}{defmacro startsId?} (defmacro |startsId?| (x) `(or (alpha-char-p ,x) (member ,x '(#\? #\% #\!) :test #'char=))) -@ +\end{chunk} \defun{hput}{hput} -<>= +\begin{chunk}{defun hput} (defun hput (table key value) (setf (gethash key table) value)) -@ +\end{chunk} \defmacro{hget} -<>= +\begin{chunk}{defmacro hget} (defmacro HGET (table key &rest default) `(gethash ,key ,table ,@default)) -@ +\end{chunk} \defun{hkeys}{hkeys} -<>= +\begin{chunk}{defun hkeys} (defun hkeys (table) (let (keys) (maphash #'(lambda (key val) (declare (ignore val)) (push key keys)) table) keys)) -@ +\end{chunk} \defun{digitp}{digitp} \calls{digitp}{digitp} -<>= +\begin{chunk}{defun digitp} (defun digitp (x) (or (and (symbolp x) (digitp (symbol-name x))) (and (characterp x) (digit-char-p x)) (and (stringp x) (= (length x) 1) (digit-char-p (char x 0))))) -@ +\end{chunk} \defun{pname}{pname} Note it is important that PNAME returns nil not an error for non-symbols -<>= +\begin{chunk}{defun pname 0} (defun pname (x) (cond ((symbolp x) (symbol-name x)) - ((characterp x) (string x)) - (t nil))) + ((characterp x) (string x)) + (t nil))) -@ +\end{chunk} \defun{size}{size} -<>= +\begin{chunk}{defun size} (defun size (l) (cond ((vectorp l) (length l)) ((consp l) (list-length l)) (t 0))) -@ +\end{chunk} \defun{strpos}{strpos} -<>= +\begin{chunk}{defun strpos} (defun strpos (what in start dontcare) (setq what (string what) in (string in)) (if dontcare @@ -37167,28 +37214,28 @@ Note it is important that PNAME returns nil not an error for non-symbols (search what in) (search what in :start2 start)))) -@ +\end{chunk} \defun{strposl}{strposl} Note that this assumes ``table'' is a string. -<>= +\begin{chunk}{defun strposl} (defun strposl (table cvec sint item) (setq cvec (string cvec)) (if (not item) (position table cvec :test #'(lambda (x y) (position y x)) :start sint) (position table cvec :test-not #'(lambda (x y) (position y x)) :start sint))) -@ +\end{chunk} \defun{qenum}{qenum} -<>= +\begin{chunk}{defun qenum 0} (defun qenum (cvec ind) (char-code (char cvec ind))) -@ +\end{chunk} \defmacro{identp} -<>= +\begin{chunk}{defmacro identp 0} (defmacro identp (x) (if (atom x) `(and ,x (symbolp ,x)) @@ -37196,11 +37243,11 @@ Note that this assumes ``table'' is a string. `(let ((,xx ,x)) (and ,xx (symbolp ,xx)))))) -@ +\end{chunk} \defun{concat}{concat} \calls{concat}{string-concatenate} -<>= +\begin{chunk}{defun concat 0} (defun concat (a b &rest l) (if (bit-vector-p a) (if l @@ -37210,38 +37257,38 @@ Note that this assumes ``table'' is a string. (apply #'system:string-concatenate a b l) (system:string-concatenate a b)))) -@ +\end{chunk} \defun{functionp}{functionp} \calls{functionp}{identp} -<>= +\begin{chunk}{defun functionp} (defun |functionp| (fn) (if (identp fn) (and (fboundp fn) (not (macro-function fn))) (functionp fn))) -@ +\end{chunk} ;; --------------------> NEW DEFINITION (override in msgdb.boot.pamphlet) \defun{brightprint}{brightprint} \calls{brightprint}{messageprint} -<>= +\begin{chunk}{defun brightprint} (defun brightprint (x) (messageprint x)) -@ +\end{chunk} ;; --------------------> NEW DEFINITION (override in msgdb.boot.pamphlet) \defun{brightprint-0}{brightprint-0} \calls{brightprint-0}{messageprint-1} -<>= +\begin{chunk}{defun brightprint-0} (defun brightprint-0 (x) (messageprint-1 x)) -@ +\end{chunk} \defun{member}{member} -<>= +\begin{chunk}{defun member 0} (defun |member| (item sequence) (cond ((symbolp item) (member item sequence :test #'eq)) @@ -37249,20 +37296,20 @@ Note that this assumes ``table'' is a string. ((and (atom item) (not (arrayp item))) (member item sequence)) (t (member item sequence :test #'equalp)))) -@ +\end{chunk} \defun{messageprint}{messageprint} -<>= +\begin{chunk}{defun messageprint} (defun messageprint (x) (mapc #'messageprint-1 x)) -@ +\end{chunk} \defun{messageprint-1}{messageprint-1} \calls{messageprint-1}{identp} \calls{messageprint-1}{messageprint-1} \calls{messageprint-1}{messageprint-2} -<>= +\begin{chunk}{defun messageprint-1} (defun messageprint-1 (x) (cond ((or (eq x '|%l|) (equal x "%l")) (terpri)) @@ -37274,37 +37321,37 @@ Note that this assumes ``table'' is a string. (messageprint-2 (cdr x)) (princ ")")))) -@ +\end{chunk} \defun{messageprint-2}{messageprint-2} \calls{messageprint-2}{messageprint-1} \calls{messageprint-2}{messageprint-2} -<>= +\begin{chunk}{defun messageprint-2} (defun messageprint-2 (x) (if (atom x) (unless x (progn (princ " . ") (messageprint-1 x))) (progn (princ " ") (messageprint-1 (car x)) (messageprint-2 (cdr x))))) -@ +\end{chunk} \defun{sayBrightly1}{sayBrightly1} \calls{saybrightly1}{brightprint-0} \calls{saybrightly1}{brightprint} -<>= +\begin{chunk}{defun sayBrightly1} (defun sayBrightly1 (x *standard-output*) (if (atom x) (progn (brightprint-0 x) (terpri) (force-output)) (progn (brightprint x) (terpri) (force-output)))) -@ +\end{chunk} \defmacro{assq} \tpdhere{This could probably be replaced by the default assoc using eql} -<>= +\begin{chunk}{defmacro assq} (defmacro assq (a b) `(assoc ,a ,b :test #'eq)) -@ +\end{chunk} \chapter{Common Lisp Algebra Support} These functions are called directly from the algebra source code. @@ -37328,168 +37375,168 @@ semantics survive. \section{SingleInteger} \defun{qsquotient}{qsquotient} -<>= +\begin{chunk}{defun qsquotient 0} (defun qsquotient (a b) (the fixnum (truncate (the fixnum a) (the fixnum b)))) -@ +\end{chunk} \defun{qsremainder}{qsremainder} -<>= +\begin{chunk}{defun qsremainder 0} (defun qsremainder (a b) (the fixnum (rem (the fixnum a) (the fixnum b)))) -@ +\end{chunk} \defmacro{qsdifference} -<>= +\begin{chunk}{defmacro qsdifference 0} (defmacro qsdifference (x y) `(the fixnum (- (the fixnum ,x) (the fixnum ,y)))) -@ +\end{chunk} \defmacro{qslessp} -<>= +\begin{chunk}{defmacro qslessp 0} (defmacro qslessp (a b) `(< (the fixnum ,a) (the fixnum ,b))) -@ +\end{chunk} \defmacro{qsadd1} -<>= +\begin{chunk}{defmacro qsadd1 0} (defmacro qsadd1 (x) `(the fixnum (1+ (the fixnum ,x)))) -@ +\end{chunk} \defmacro{qssub1} -<>= +\begin{chunk}{defmacro qssub1 0} (defmacro qssub1 (x) `(the fixnum (1- (the fixnum ,x)))) -@ +\end{chunk} \defmacro{qsminus} -<>= +\begin{chunk}{defmacro qsminus 0} (defmacro qsminus (x) `(the fixnum (minus (the fixnum ,x)))) -@ +\end{chunk} \defmacro{qsplus} -<>= +\begin{chunk}{defmacro qsplus 0} (defmacro qsplus (x y) `(the fixnum (+ (the fixnum ,x) (the fixnum ,y)))) -@ +\end{chunk} \defmacro{qstimes} -<>= +\begin{chunk}{defmacro qstimes 0} (defmacro qstimes (x y) `(the fixnum (* (the fixnum ,x) (the fixnum ,y)))) -@ +\end{chunk} \defmacro{qsabsval} -<>= +\begin{chunk}{defmacro qsabsval 0} (defmacro qsabsval (x) `(the fixnum (abs (the fixnum ,x)))) -@ +\end{chunk} \defmacro{qsoddp} -<>= +\begin{chunk}{defmacro qsoddp 0} (defmacro qsoddp (x) `(oddp (the fixnum ,x))) -@ +\end{chunk} \defmacro{qszerop} -<>= +\begin{chunk}{defmacro qszerop 0} (defmacro qszerop (x) `(zerop (the fixnum ,x))) -@ +\end{chunk} \defmacro{qsmax} -<>= +\begin{chunk}{defmacro qsmax 0} (defmacro qsmax (x y) `(the fixnum (max (the fixnum ,x) (the fixnum ,y)))) -@ +\end{chunk} \defmacro{qsmin} -<>= +\begin{chunk}{defmacro qsmin 0} (defmacro qsmin (x y) `(the fixnum (min (the fixnum ,x) (the fixnum ,y)))) -@ +\end{chunk} \section{Boolean} \defun{BooleanEquality}{The Boolean = function support} -<>= +\begin{chunk}{defun BooleanEquality 0} (defun |BooleanEquality| (x y) (if x y (null y))) -@ +\end{chunk} \section{IndexedBits} \defmacro{truth-to-bit}{IndexedBits new function support} -<>= +\begin{chunk}{defmacro truth-to-bit} (defmacro truth-to-bit (x) `(cond (,x 1) ('else 0))) -@ +\end{chunk} \defun{bvec-make-full}{IndexedBits new function support} -<>= +\begin{chunk}{defun bvec-make-full 0} (defun bvec-make-full (n x) (make-array (list n) :element-type 'bit :initial-element x)) -@ +\end{chunk} \defmacro{bit-to-truth}{IndexedBits elt function support} -<>= +\begin{chunk}{defmacro bit-to-truth 0} (defmacro bit-to-truth (b) `(eq ,b 1)) -@ +\end{chunk} \defmacro{bvec-elt}{IndexedBits elt function support} -<>= +\begin{chunk}{defmacro bvec-elt 0} (defmacro bvec-elt (bv i) `(sbit ,bv ,i)) -@ +\end{chunk} \defmacro{bvec-setelt}{IndexedBits setelt function support} -<>= +\begin{chunk}{defmacro bvec-setelt} (defmacro bvec-setelt (bv i x) `(setf (sbit ,bv ,i) ,x)) -@ +\end{chunk} \defmacro{bvec-size}{IndexedBits length function support} -<>= +\begin{chunk}{defmacro bvec-size} (defmacro bvec-size (bv) `(size ,bv)) -@ +\end{chunk} \defun{bvec-concat}{IndexedBits concat function support} -<>= +\begin{chunk}{defun bvec-concat 0} (defun bvec-concat (bv1 bv2) (concatenate '(vector bit) bv1 bv2)) -@ +\end{chunk} \defun{bvec-copy}{IndexedBits copy function support} -<>= +\begin{chunk}{defun bvec-copy 0} (defun bvec-copy (bv) (copy-seq bv)) -@ +\end{chunk} \defun{bvec-equal}{IndexedBits = function support} -<>= +\begin{chunk}{defun bvec-equal 0} (defun bvec-equal (bv1 bv2) (equal bv1 bv2)) -@ +\end{chunk} \defun{bvec-greater}{IndexedBits $<$ function support} -<>= +\begin{chunk}{defun bvec-greater 0} (defun bvec-greater (bv1 bv2) (let ((pos (mismatch bv1 bv2))) (cond ((or (null pos) (>= pos (length bv1))) nil) @@ -37497,65 +37544,65 @@ semantics survive. ((find 1 bv1 :start pos) t) (t nil)))) -@ +\end{chunk} \defun{bvec-and}{IndexedBits And function support} -<>= +\begin{chunk}{defun bvec-and 0} (defun bvec-and (bv1 bv2) (bit-and bv1 bv2)) -@ +\end{chunk} \defun{bvec-or}{IndexedBits Or function support} -<>= +\begin{chunk}{defun bvec-or 0} (defun bvec-or (bv1 bv2) (bit-ior bv1 bv2)) -@ +\end{chunk} \defun{bvec-xor}{IndexedBits xor function support} -<>= +\begin{chunk}{defun bvec-xor 0} (defun bvec-xor (bv1 bv2) (bit-xor bv1 bv2)) -@ +\end{chunk} \defun{bvec-nand}{IndexedBits nand function support} -<>= +\begin{chunk}{defun bvec-nand 0} (defun bvec-nand (bv1 bv2) (bit-nand bv1 bv2)) -@ +\end{chunk} \defun{bvec-nor}{IndexedBits nor function support} -<>= +\begin{chunk}{defun bvec-nor 0} (defun bvec-nor (bv1 bv2) (bit-nor bv1 bv2)) -@ +\end{chunk} \defun{bvec-not}{IndexedBits not function support} -<>= +\begin{chunk}{defun bvec-not 0} (defun bvec-not (bv) (bit-not bv)) -@ +\end{chunk} \section{KeyedAccessFile} \defun{rdefinstream}{KeyedAccessFile defstream function support} This is a simpler interpface to RDEFIOSTREAM \calls{rdefinstream}{rdefiostream} -<>= +\begin{chunk}{defun rdefinstream} (defun rdefinstream (&rest fn) ;; following line prevents rdefiostream from adding a default filetype (unless (rest fn) (setq fn (list (pathname (car fn))))) (rdefiostream (list (cons 'file fn) '(mode . input)))) -@ +\end{chunk} \defun{rdefoutstream}{KeyedAccessFile defstream function support} \calls{rdefoutstream}{rdefiostream} -<>= +\begin{chunk}{defun rdefoutstream} (defun rdefoutstream (&rest fn) ;; following line prevents rdefiostream from adding a default filetype (unless (rest fn) (setq fn (list (pathname (car fn))))) (rdefiostream (list (cons 'FILE fn) '(mode . OUTPUT)))) -@ +\end{chunk} \section{Table} \defun{hashable}{Table InnerTable support} @@ -37568,7 +37615,7 @@ an AssociationList representation \calls{hashable}{Boolean} \calls{hashable}{bpiname} \calls{hashable}{knownEqualPred} -<>= +\begin{chunk}{defun hashable} (defun |hashable| (dom) (labels ( (|knownEqualPred| (dom) @@ -37578,7 +37625,7 @@ an AssociationList representation nil)))) (member (|knownEqualPred| dom) '(eq eql equal)))) -@ +\end{chunk} \section{DoubleFloatVector} Double Float Vectors are simple arrays of lisp double-floats @@ -37586,39 +37633,39 @@ made available at the Spad language level. Note that these vectors are 0 based whereas other Spad language vectors are 1-based. \defmacro{dlen}{DoubleFloatVector Qsize function support} -<>= +\begin{chunk}{defmacro dlen} (defmacro dlen (v) `(length (the (simple-array double-float (*)) ,v))) -@ +\end{chunk} \defmacro{make-double-vector}{DoubleFloatVector Qnew function support} -<>= +\begin{chunk}{defmacro make-double-vector} (defmacro make-double-vector (n) `(make-array (list ,n) :element-type 'double-float)) -@ +\end{chunk} \defmacro{make-double-vector1}{DoubleFloatVector Qnew1 function support} -<>= +\begin{chunk}{defmacro make-double-vector1} (defmacro make-double-vector1 (n s) `(make-array (list ,n) :element-type 'double-float :initial-element ,s)) -@ +\end{chunk} \defmacro{delt}{DoubleFloatVector Qelt1 function support} -<>= +\begin{chunk}{defmacro delt} (defmacro delt (v i) `(aref (the (simple-array double-float (*)) ,v) ,i)) -@ +\end{chunk} \defmacro{dsetelt}{DoubleFloatVector Qsetelt1 function support} -<>= +\begin{chunk}{defmacro dsetelt} (defmacro dsetelt (v i s) `(setf (aref (the (simple-array double-float (*)) ,v) ,i) ,s)) -@ +\end{chunk} \section{ComplexDoubleFloatVector} Complex Double Float Vectors are simple arrays of lisp double-floats @@ -37628,14 +37675,14 @@ Complex array is implemented as an array of doubles. Each complex number occupies two positions in the real array. \defmacro{make-cdouble-vector}{ComplexDoubleFloatVector Qnew function support} -<>= +\begin{chunk}{defmacro make-cdouble-vector} (defmacro make-cdouble-vector (n) `(make-array (list (* 2 ,n)) :element-type 'double-float)) -@ +\end{chunk} \defmacro{cdelt}{ComplexDoubleFloatVector Qelt1 function support} -<>= +\begin{chunk}{defmacro cdelt} (defmacro CDELT(ov oi) (let ((v (gensym)) (i (gensym))) @@ -37645,10 +37692,10 @@ occupies two positions in the real array. (aref (the (simple-array double-float (*)) ,v) (* 2 ,i)) (aref (the (simple-array double-float (*)) ,v) (+ (* 2 ,i) 1)))))) -@ +\end{chunk} \defmacro{cdsetelt}{ComplexDoubleFloatVector Qsetelt1 function support} -<>= +\begin{chunk}{defmacro cdsetelt} (defmacro cdsetelt(ov oi os) (let ((v (gensym)) (i (gensym)) @@ -37662,71 +37709,71 @@ occupies two positions in the real array. (cdr ,s)) ,s))) -@ +\end{chunk} \defmacro{cdlen}{ComplexDoubleFloatVector Qsize function support} -<>= +\begin{chunk}{defmacro cdlen} (defmacro cdlen(v) `(truncate (length (the (simple-array double-float (*)) ,v)) 2)) -@ +\end{chunk} \section{DoubleFloatMatrix} \defmacro{make-double-matrix}{DoubleFloatMatrix qnew function support} -<>= +\begin{chunk}{defmacro make-double-matrix} (defmacro make-double-matrix (n m) `(make-array (list ,n ,m) :element-type 'double-float)) -@ +\end{chunk} \defmacro{make-double-matrix1}{DoubleFloatMatrix new function support} -<>= +\begin{chunk}{defmacro make-double-matrix1} (defmacro make-double-matrix1 (n m s) `(make-array (list ,n ,m) :element-type 'double-float :initial-element ,s)) -@ +\end{chunk} \defmacro{daref2}{DoubleFloatMatrix qelt function support} -<>= +\begin{chunk}{defmacro daref2} (defmacro daref2 (v i j) `(aref (the (simple-array double-float (* *)) ,v) ,i ,j)) -@ +\end{chunk} \defmacro{dsetaref2}{DoubleFloatMatrix qsetelt! function support} -<>= +\begin{chunk}{defmacro dsetaref2} (defmacro dsetaref2 (v i j s) `(setf (aref (the (simple-array double-float (* *)) ,v) ,i ,j) ,s)) -@ +\end{chunk} \defmacro{danrows}{DoubleFloatMatrix nrows function support} -<>= +\begin{chunk}{defmacro danrows} (defmacro danrows (v) `(array-dimension (the (simple-array double-float (* *)) ,v) 0)) -@ +\end{chunk} \defmacro{dancols}{DoubleFloatMatrix ncols function support} -<>= +\begin{chunk}{defmacro dancols} (defmacro dancols (v) `(array-dimension (the (simple-array double-float (* *)) ,v) 1)) -@ +\end{chunk} \section{ComplexDoubleFloatMatrix} \defmacro{make-cdouble-matrix}{ComplexDoubleFloatMatrix function support} -<>= +\begin{chunk}{defmacro make-cdouble-matrix} (defmacro make-cdouble-matrix (n m) `(make-array (list ,n (* 2 ,m)) :element-type 'double-float)) -@ +\end{chunk} \defmacro{cdaref2}{ComplexDoubleFloatMatrix function support} -<>= +\begin{chunk}{defmacro cdaref2} (defmacro cdaref2 (ov oi oj) (let ((v (gensym)) (i (gensym)) @@ -37739,10 +37786,10 @@ occupies two positions in the real array. (aref (the (simple-array double-float (* *)) ,v) ,i (+ (* 2 ,j) 1)))))) -@ +\end{chunk} \defmacro{cdsetaref2}{ComplexDoubleFloatMatrix function support} -<>= +\begin{chunk}{defmacro cdsetaref2} (defmacro cdsetaref2 (ov oi oj os) (let ((v (gensym)) (i (gensym)) @@ -37759,22 +37806,22 @@ occupies two positions in the real array. (cdr ,s)) ,s))) -@ +\end{chunk} \defmacro{cdanrows}{ComplexDoubleFloatMatrix function support} -<>= +\begin{chunk}{defmacro cdanrows} (defmacro cdanrows (v) `(array-dimension (the (simple-array double-float (* *)) ,v) 0)) -@ +\end{chunk} \defmacro{cdancols}{ComplexDoubleFloatMatrix function support} -<>= +\begin{chunk}{defmacro cdancols} (defmacro cdancols (v) `(truncate (array-dimension (the (simple-array double-float (* *)) ,v) 1) 2)) -@ +\end{chunk} \section{Integer} @@ -37785,11 +37832,11 @@ a call to this code. The Integer domain contains the line: \begin{verbatim} (PUT (QUOTE |INT;divide;2$R;44|) (QUOTE |SPADreplace|) (QUOTE DIVIDE2)) \end{verbatim} -<>= +\begin{chunk}{defun divide2 0} (defun divide2 (x y) (multiple-value-call #'cons (truncate x y))) -@ +\end{chunk} \defun{remainder2}{Integer quo function support} Note that this is defined as a SPADReplace function in Integer @@ -37800,10 +37847,10 @@ a call to this code. The Integer domain contains the line: \end{verbatim} Because these are identical except for name we make the symbol-functions equivalent. This was done in the original code for efficiency. -<>= +\begin{chunk}{defun remainder2 0} (setf (symbol-function 'remainder2) #'rem) -@ +\end{chunk} \defun{quotient2}{Integer quo function support} Note that this is defined as a SPADReplace function in Integer @@ -37812,58 +37859,58 @@ a call to this code. The Integer domain contains the line: \begin{verbatim} (PUT (QUOTE |INT;quo;3$;45|) (QUOTE |SPADreplace|) (QUOTE QUOTIENT2)) \end{verbatim} -<>= +\begin{chunk}{defun quotient2 0} (defun quotient2 (x y) (values (truncate x y))) -@ +\end{chunk} \defun{random}{Integer random function support} This is used for calls to random with no arguments. If an argument is supplied to random then the common lisp random function is called directly. This could be lifted up into the spad code. -<>= +\begin{chunk}{defun random 0} (defun |random| () (random (expt 2 26))) -@ +\end{chunk} \section{IndexCard} \defun{alqlGetOrigin}{IndexCard origin function support} \calls{alqlGetOrigin}{dbPart} \calls{alqlGetOrigin}{charPosition} \calls{alqlGetOrigin}{substring} -<>= +\begin{chunk}{defun alqlGetOrigin} (defun |alqlGetOrigin| (x) (let (field k) (setq field (|dbPart| x 5 1)) (setq k (|charPosition| #\( field 2)) (substring field 1 (1- k)))) -@ +\end{chunk} \defun{alqlGetParams}{IndexCard origin function support} \calls{alqlGetParams}{dbPart} \calls{alqlGetParams}{charPosition} \calls{alqlGetParams}{substring} -<>= +\begin{chunk}{defun alqlGetParams} (defun |alqlGetParams| (x) (let (field k) (setq field (|dbPart| x 5 1)) (setq k (|charPosition| #\( field 2)) (substring field k nil))) -@ +\end{chunk} \defun{alqlGetKindString}{IndexCard elt function support} \calls{alqlGetKindString}{dbPart} \calls{alqlGetKindString}{substring} -<>= +\begin{chunk}{defun alqlGetKindString} (defun |alqlGetKindString| (x) (if (or (char= (elt x 0) #\a) (char= (elt x 0) #\o)) (substring (|dbPart| x 5 1) 0 1) (substring x 0 1)))) -@ +\end{chunk} \section{OperationsQuery} @@ -37880,7 +37927,7 @@ appropriate entries in the browser database. The legal values for arg are \calls{getBrowseDatabase}{member} \calls{getBrowseDatabase}{grepConstruct} \usesdollar{getBrowseDatabase}{includeUnexposed?} -<>= +\begin{chunk}{defun getBrowseDatabase} (defun |getBrowseDatabase| (kind) (let (|$includeUnexposed?|) (declare (special |$includeUnexposed?|)) @@ -37888,30 +37935,30 @@ appropriate entries in the browser database. The legal values for arg are (when (|member| kind '("o" "k" "c" "d" "p")) (|grepConstruct| "*" (intern kind))))) -@ +\end{chunk} \section{Database} \defun{stringMatches?}{Database elt function support} \calls{stringMatches?}{basicMatch?} -<>= +\begin{chunk}{defun stringMatches?} (defun |stringMatches?| (pattern subject) (when (integerp (|basicMatch?| pattern subject)) t)) -@ +\end{chunk} \section{FileName} \defun{fnameMake}{FileName filename function implementation} \calls{fnameMake}{StringToDir} -<>= +\begin{chunk}{defun fnameMake} (defun |fnameMake| (d n e) (if (string= e "") (setq e nil)) (make-pathname :directory (|StringToDir| d) :name n :type e)) -@ +\end{chunk} \defun{StringToDir}{FileName filename support function} \calls{StringToDir}{lastc} -<>= +\begin{chunk}{defun StringToDir} (defun |StringToDir| (s) (cond ((string= s "/") '(:root)) @@ -37921,72 +37968,73 @@ appropriate entries in the browser database. The legal values for arg are (if (char= lastc #\/) (pathname-directory (concat s "name.type")) (pathname-directory (concat s "/name.type")) ))) )) -@ + +\end{chunk} \defun{fnameDirectory}{FileName directory function implementation} \calls{fnameDirectory}{DirToString} -<>= +\begin{chunk}{defun fnameDirectory} (defun |fnameDirectory| (f) (|DirToString| (pathname-directory f))) -@ +\end{chunk} \defun{DirToString}{FileName directory function support} For example, ``/'' ``/u/smwatt'' ``../src'' -<>= +\begin{chunk}{defun DirToString 0} (defun |DirToString| (d) (cond ((equal d '(:root)) "/") ((null d) "") ('t (string-right-trim "/" (namestring (make-pathname :directory d)))) )) -@ +\end{chunk} \defun{fnameName}{FileName name function implementation} -<>= +\begin{chunk}{defun fnameName 0} (defun |fnameName| (f) (let ((s (pathname-name f))) (if s s "") )) -@ +\end{chunk} \defun{fnameType}{FileName extension function implementation} -<>= +\begin{chunk}{defun fnameType 0} (defun |fnameType| (f) (let ((s (pathname-type f))) (if s s "") )) -@ +\end{chunk} \defun{fnameExists?}{FileName exists? function implementation} -<>= +\begin{chunk}{defun fnameExists? 0} (defun |fnameExists?| (f) (if (probe-file (namestring f)) 't nil)) -@ +\end{chunk} \defun{fnameReadable?}{FileName readable? function implementation} -<>= +\begin{chunk}{defun fnameReadable? 0} (defun |fnameReadable?| (f) (let ((s (open f :direction :input :if-does-not-exist nil))) (cond (s (close s) t) (t nil)) )) -@ +\end{chunk} \defun{fnameWritable?}{FileName writeable? function implementation} \calls{fnameWritable?}{myWriteable?} -<>= +\begin{chunk}{defun fnameWritable?} (defun |fnameWritable?| (f) (|myWritable?| (namestring f)) ) -@ +\end{chunk} \defun{myWritable?}{FileName writeable? function support} \calls{myWritable?}{error} \calls{myWritable?}{fnameExists?} \calls{myWritable?}{fnameDirectory} \calls{myWritable?}{writeablep} -<>= +\begin{chunk}{defun myWritable?} (defun |myWritable?| (s) (if (not (stringp s)) (|error| "``myWritable?'' requires a string arg.")) (if (string= s "") (setq s ".")) @@ -37994,11 +38042,11 @@ For example, ``/'' ``/u/smwatt'' ``../src'' (if (string= s "") (setq s ".")) (if (> (|writeablep| s) 0) 't nil) ) -@ +\end{chunk} \defun{fnameNew}{FileName new function implementation} \calls{fnameNew}{fnameMake} -<>= +\begin{chunk}{defun fnameNew} (defun |fnameNew| (d n e) (if (not (|myWritable?| d)) nil @@ -38008,7 +38056,7 @@ For example, ``/'' ``/u/smwatt'' ``../src'' (if (not (probe-file (namestring fn))) (return-from |fnameNew| fn)) ))) -@ +\end{chunk} \section{DoubleFloat} These macros wrap their arguments with strong type information in @@ -38018,235 +38066,235 @@ in the DoubleFloat domain (see Volume 10.3). \defmacro{DFLessThan} Compute a strongly typed doublefloat comparison See Steele Common Lisp 1990 p293 -<>= +\begin{chunk}{defmacro DFLessThan} (defmacro DFLessThan (x y) `(< (the double-float ,x) (the double-float ,y))) -@ +\end{chunk} \defmacro{DFUnaryMinus} Compute a strongly typed unary doublefloat minus See Steele Common Lisp 1990 p295 -<>= +\begin{chunk}{defmacro DFUnaryMinus} (defmacro DFUnaryMinus (x) `(the double-float (- (the double-float ,x)))) -@ +\end{chunk} \defmacro{DFMinusp} Compute a strongly typed unary doublefloat test for negative See Steele Common Lisp 1990 p292 -<>= +\begin{chunk}{defmacro DFMinusp} (defmacro DFMinusp (x) `(minusp (the double-float ,x))) -@ +\end{chunk} \defmacro{DFZerop} Compute a strongly typed unary doublefloat test for zero See Steele Common Lisp 1990 p292 -<>= +\begin{chunk}{defmacro DFZerop} (defmacro DFZerop (x) `(zerop (the double-float ,x))) -@ +\end{chunk} \defmacro{DFAdd} Compute a strongly typed doublefloat addition See Steele Common Lisp 1990 p295 -<>= +\begin{chunk}{defmacro DFAdd} (defmacro DFAdd (x y) `(the double-float (+ (the double-float ,x) (the double-float ,y)))) -@ +\end{chunk} \defmacro{DFSubtract} Compute a strongly typed doublefloat subtraction See Steele Common Lisp 1990 p295 -<>= +\begin{chunk}{defmacro DFSubtract} (defmacro DFSubtract (x y) `(the double-float (- (the double-float ,x) (the double-float ,y)))) -@ +\end{chunk} \defmacro{DFMultiply} Compute a strongly typed doublefloat multiplication See Steele Common Lisp 1990 p296 -<>= +\begin{chunk}{defmacro DFMultiply} (defmacro DFMultiply (x y) `(the double-float (* (the double-float ,x) (the double-float ,y)))) -@ +\end{chunk} \defmacro{DFIntegerMultiply} Compute a strongly typed doublefloat multiplication by an integer. See Steele Common Lisp 1990 p296 -<>= +\begin{chunk}{defmacro DFIntegerMultiply} (defmacro DFIntegerMultiply (i y) `(the double-float (* (the integer ,i) (the double-float ,y)))) -@ +\end{chunk} \defmacro{DFMax} Choose the maximum of two doublefloats. See Steele Common Lisp 1990 p294 -<>= +\begin{chunk}{defmacro DFMax} (defmacro DFMax (x y) `(the double-float (max (the double-float ,x) (the double-float ,y)))) -@ +\end{chunk} \defmacro{DFMin} Choose the minimum of two doublefloats. See Steele Common Lisp 1990 p294 -<>= +\begin{chunk}{defmacro DFMin} (defmacro DFMin (x y) `(the double-float (min (the double-float ,x) (the double-float ,y)))) -@ +\end{chunk} \defmacro{DFEql} Compare two doublefloats for equality, where equality is eq, or numbers of the same type with the same value. See Steele Common Lisp 1990 p105 -<>= +\begin{chunk}{defmacro DFEql} (defmacro DFEql (x y) `(eql (the double-float ,x) (the double-float ,y))) -@ +\end{chunk} \defmacro{DFDivide} Divide a doublefloat by a a doublefloat See Steele Common Lisp 1990 p296 -<>= +\begin{chunk}{defmacro DFDivide} (defmacro DFDivide (x y) `(the double-float (/ (the double-float ,x) (the double-float ,y)))) -@ +\end{chunk} \defmacro{DFIntegerDivide} Divide a doublefloat by an integer See Steele Common Lisp 1990 p296 -<>= +\begin{chunk}{defmacro DFIntegerDivide} (defmacro DFIntegerDivide (x i) `(the double-float (/ (the double-float ,x) (the integer ,i)))) -@ +\end{chunk} \defmacro{DFSqrt} Compute the doublefloat square root of $x$. The result will be complex if the argument is negative. See Steele Common Lisp 1990 p302 -<>= +\begin{chunk}{defmacro DFSqrt} (defmacro DFSqrt (x) `(sqrt (the double-float ,x))) -@ +\end{chunk} \defmacro{DFLogE} Compute the doublefloat log of $x$ with the base $e$. The result will be complex if the argument is negative. See Steele Common Lisp 1990 p301 -<>= +\begin{chunk}{defmacro DFLogE} (defmacro DFLogE (x) `(log (the double-float ,x))) -@ +\end{chunk} \defmacro{DFLog} Compute the doublefloat log of $x$ with a given base $b$. The result will be complex if $x$ is negative. See Steele Common Lisp 1990 p301 -<>= +\begin{chunk}{defmacro DFLog} (defmacro DFLog (x b) `(log (the double-float ,x) (the fixnum ,b))) -@ +\end{chunk} \defmacro{DFIntegerExpt} Compute the doublefloat expt of $x$ with a given integer power $i$ See Steele Common Lisp 1990 p300 -<>= +\begin{chunk}{defmacro DFIntegerExpt} (defmacro DFIntegerExpt (x i) `(the double-float (expt (the double-float ,x) (the integer ,i)))) -@ +\end{chunk} \defmacro{DFExpt} Compute the doublefloat expt of $x$ with a given power $p$. The result could be complex if the base is negative and the power is not an integer. See Steele Common Lisp 1990 p300 -<>= +\begin{chunk}{defmacro DFExpt} (defmacro DFExpt (x p) `(expt (the double-float ,x) (the double-float ,p))) -@ +\end{chunk} \defmacro{DFExp} Compute the doublefloat exp with power $e$ See Steele Common Lisp 1990 p300 -<>= +\begin{chunk}{defmacro DFExp} (defmacro DFExp (x) `(the double-float (exp (the double-float ,x)))) -@ +\end{chunk} \defmacro{DFSin} Compute a strongly typed doublefloat sin See Steele Common Lisp 1990 p304 -<>= +\begin{chunk}{defmacro DFSin} (defmacro DFSin (x) `(the double-float (sin (the double-float ,x)))) -@ +\end{chunk} \defmacro{DFCos} Compute a strongly typed doublefloat cos See Steele Common Lisp 1990 p304 -<>= +\begin{chunk}{defmacro DFCos} (defmacro DFCos (x) `(the double-float (cos (the double-float ,x)))) -@ +\end{chunk} \defmacro{DFTan} Compute a strongly typed doublefloat tan See Steele Common Lisp 1990 p304 -<>= +\begin{chunk}{defmacro DFTan} (defmacro DFTan (x) `(the double-float (tan (the double-float ,x)))) -@ +\end{chunk} \defmacro{DFAsin} Compute a strongly typed doublefloat asin. The result is complex if the absolute value of the argument is greater than 1. See Steele Common Lisp 1990 p305 -<>= +\begin{chunk}{defmacro DFAsin} (defmacro DFAsin (x) `(asin (the double-float ,x))) -@ +\end{chunk} \defmacro{DFAcos} Compute a strongly typed doublefloat acos. The result is complex if the absolute value of the argument is greater than 1. See Steele Common Lisp 1990 p305 -<>= +\begin{chunk}{defmacro DFAcos} (defmacro DFAcos (x) `(acos (the double-float ,x))) -@ +\end{chunk} \defmacro{DFAtan} Compute a strongly typed doublefloat atan See Steele Common Lisp 1990 p305 -<>= +\begin{chunk}{defmacro DFAtan} (defmacro DFAtan (x) `(the double-float (atan (the double-float ,x)))) -@ +\end{chunk} \defmacro{DFAtan2} Compute a strongly typed doublefloat atan with 2 arguments @@ -38264,136 +38312,136 @@ $y = 0$ & $x = 0$ & Origin & error \end{tabular} See Steele Common Lisp 1990 p306 -<>= +\begin{chunk}{defmacro DFAtan2} (defmacro DFAtan2 (y x) `(the double-float (atan (the double-float ,x) (the double-float ,y)))) -@ +\end{chunk} \defmacro{DFSinh} Compute a strongly typed doublefloat sinh \[(e^z-e^{-z})/2\] See Steele Common Lisp 1990 p308 -<>= +\begin{chunk}{defmacro DFSinh} (defmacro DFSinh (x) `(the double-float (sinh (the double-float ,x)))) -@ +\end{chunk} \defmacro{DFCosh} Compute a strongly typed doublefloat cosh \[(e^z+e^{-z})/2\] See Steele Common Lisp 1990 p308 -<>= +\begin{chunk}{defmacro DFCosh} (defmacro DFCosh (x) `(the double-float (cosh (the double-float ,x)))) -@ +\end{chunk} \defmacro{DFTanh} Compute a strongly typed doublefloat tanh \[(e^z-e^{-z})/(e^z+e^{-z})\] See Steele Common Lisp 1990 p308 -<>= +\begin{chunk}{defmacro DFTanh} (defmacro DFTanh (x) `(the double-float (tanh (the double-float ,x)))) -@ +\end{chunk} \defmacro{DFAsinh} Compute the inverse hyperbolic sin. \[log\left(z+\sqrt{1+z^2}\right)\] See Steele Common Lisp 1990 p308 -<>= +\begin{chunk}{defmacro DFAsinh} (defmacro DFAsinh (x) `(the double-float (asinh (the double-float ,x)))) -@ +\end{chunk} \defmacro{DFAcosh} Compute the inverse hyperbolic cos. Note that the acosh function will return a complex result if the argument is less than 1. \[log\left(z+(z+1)\sqrt{(z-1)/(z+1)}\right)\] See Steele Common Lisp 1990 p308 -<>= +\begin{chunk}{defmacro DFAcosh} (defmacro DFAcosh (x) `(acosh (the double-float ,x))) -@ +\end{chunk} \defmacro{DFAtanh} Compute the inverse hyperbolic tan. Note that the acosh function will return a complex result if the argument is greater than 1. \[log\left((1+z)\sqrt{1/(1-z^2)}\right)\] See Steele Common Lisp 1990 p308 -<>= +\begin{chunk}{defmacro DFAtanh} (defmacro DFAtanh (x) `(atanh (the double-float ,x))) -@ +\end{chunk} \defun{integer-decode-float-numerator}{Machine specific float numerator} This is used in the DoubleFloat integerDecode function -<>= +\begin{chunk}{defun integer-decode-float-numerator 0} (defun integer-decode-float-numerator (x) (integer-decode-float x)) -@ +\end{chunk} \defun{integer-decode-float-denominator}{Machine specific float denominator} This is used in the DoubleFloat integerDecode function -<>= +\begin{chunk}{defun integer-decode-float-denominator 0} (defun integer-decode-float-denominator (x) (multiple-value-bind (mantissa exponent sign) (integer-decode-float x) (declare (ignore mantissa sign)) (expt 2 (abs exponent)))) -@ +\end{chunk} \defun{integer-decode-float-sign}{Machine specific float sign} This is used in the DoubleFloat integerDecode function -<>= +\begin{chunk}{defun integer-decode-float-sign 0} (defun integer-decode-float-sign (x) (multiple-value-bind (mantissa exponent sign) (integer-decode-float x) (declare (ignore mantissa exponent)) sign)) -@ +\end{chunk} \defun{integer-decode-float-exponent}{Machine specific float bit length} This is used in the DoubleFloat integerDecode function -<>= +\begin{chunk}{defun integer-decode-float-exponent 0} (defun integer-decode-float-exponent (x) (multiple-value-bind (mantissa exponent sign) (integer-decode-float x) (declare (ignore mantissa sign)) exponent)) -@ +\end{chunk} \defun{manexp}{Decode floating-point values} This function is used by DoubleFloat to implement the ``mantissa'' and ``exponent'' functions. -<>= +\begin{chunk}{defun manexp 0} (defun manexp (u) (multiple-value-bind (f e s) (decode-float u) (cons (* s f) e))) -@ +\end{chunk} \defun{cot}{The cotangent routine} The cotangent function is defined as \[cot(z) = \frac{1}{tan(z)}\] -<>= +\begin{chunk}{defun cot 0} (defun cot (a) (if (or (> a 1000.0) (< a -1000.0)) (/ (cos a) (sin a)) (/ 1.0 (tan a)))) -@ +\end{chunk} \defun{acot}{The inverse cotangent function} The inverse cotangent (arc-cotangent) function is defined as \[acot(z) = cot^{-1}(z) = tan^{-1}(\frac{1}{z})\] See Steele Common Lisp 1990 pp305-307 -<>= +\begin{chunk}{defun acot 0} (defun acot (a) (if (> a 0.0) (if (> a 1.0) @@ -38403,96 +38451,96 @@ See Steele Common Lisp 1990 pp305-307 (- pi (atan (/ -1.0 a))) (+ (/ pi 2.0) (atan (- a)))))) -@ +\end{chunk} \defun{sec}{The secant function} \[sec(x) = \frac{1}{cos(x)}\] -<>= +\begin{chunk}{defun sec 0} (defun sec (x) (/ 1 (cos x))) -@ +\end{chunk} \defun{asec}{The inverse secant function} \[asec(x) = acos\left(\frac{1}{x}\right)\] -<>= +\begin{chunk}{defun asec 0} (defun asec (x) (acos (/ 1 x))) -@ +\end{chunk} \defun{csc}{The cosecant function} \[csc(x) = \frac{1}{sin(x)}\] -<>= +\begin{chunk}{defun csc 0} (defun csc (x) (/ 1 (sin x))) -@ +\end{chunk} \defun{acsc}{The inverse cosecant function} \[acsc(x) = \frac{1}{asin(x)}\] -<>= +\begin{chunk}{defun acsc 0} (defun acsc (x) (asin (/ 1 x))) -@ +\end{chunk} \defun{csch}{The hyperbolic cosecant function} \[csch(x) = \frac{1}{sinh(x)} \] -<>= +\begin{chunk}{defun csch 0} (defun csch (x) (/ 1 (sinh x))) -@ +\end{chunk} \defun{coth}{The hyperbolic cotangent function} \[coth(x) = cosh(x) csch(x)\] -<>= +\begin{chunk}{defun coth 0} (defun coth (x) (* (cosh x) (csch x))) -@ +\end{chunk} \defun{sech}{The hyperbolic secant function} \[sech(x) = \frac{1}{cosh(x)}\] -<>= +\begin{chunk}{defun sech 0} (defun sech (x) (/ 1 (cosh x))) -@ +\end{chunk} \defun{acsch}{The inverse hyperbolic cosecant function} \[acsch(x) = asinh\left(\frac{1}{x}\right)\] -<>= +\begin{chunk}{defun acsch 0} (defun acsch (x) (asinh (/ 1 x))) -@ +\end{chunk} \defun{acoth}{The inverse hyperbolic cotangent function} \[acoth(x) = atanh\left(\frac{1}{x}\right)\] -<>= +\begin{chunk}{defun acoth 0} (defun acoth (x) (atanh (/ 1 x))) -@ +\end{chunk} \defun{asech}{The inverse hyperbolic secant function} \[asech(x) = acosh\left(\frac{1}{x}\right)\] -<>= +\begin{chunk}{defun asech 0} (defun asech (x) (acosh (/ 1 x))) -@ +\end{chunk} \chapter{NRLIB code.lisp support code} \defun{makeByteWordVec2}{makeByteWordVec2} -<>= +\begin{chunk}{defun makeByteWordVec2 0} (defun |makeByteWordVec2| (maxelement initialvalue) (let ((n (cond ((null initialvalue) 7) ('t maxelement)))) (make-array (length initialvalue) :element-type (list 'mod (1+ n)) :initial-contents initialvalue))) -@ +\end{chunk} \defmacro{spadConstant} -<>= +\begin{chunk}{defmacro spadConstant 0} (defmacro |spadConstant| (dollar n) `(spadcall (svref ,dollar (the fixnum ,n)))) -@ +\end{chunk} \chapter{Monitoring execution} \begin{verbatim} @@ -38809,54 +38857,54 @@ for example: \end{verbatim} \defvar{*monitor-domains*} -<>= +\begin{chunk}{initvars} (defvar *monitor-domains* nil "a list of domains to report") -@ +\end{chunk} \defvar{*monitor-nrlibs*} -<>= +\begin{chunk}{initvars} (defvar *monitor-nrlibs* nil "a list of nrlibs that have been traced") -@ +\end{chunk} \defvar{*monitor-table*} -<>= +\begin{chunk}{initvars} (defvar *monitor-table* nil "a table of all of the monitored data") -@ +\end{chunk} -<>= +\begin{chunk}{postvars} (eval-when (eval load) (unless *monitor-table* (monitor-inittable))) -@ +\end{chunk} \defstruct{monitor-data} -<>= +\begin{chunk}{initvars} (defstruct monitor-data name count monitorp sourcefile) -@ +\end{chunk} \defstruct{libstream} -<>= +\begin{chunk}{initvars} (defstruct libstream mode dirname (indextable nil) (indexstream nil)) -@ +\end{chunk} \defun{monitor-inittable}{Initialize the monitor statistics hashtable} \uses{monitor-inittable}{*monitor-table*} -<>= +\begin{chunk}{defun monitor-inittable 0} (defun monitor-inittable () "initialize the monitor statistics hashtable" (declare (special *monitor-table*)) (setq *monitor-table* (make-hash-table))) -@ +\end{chunk} \defun{monitor-end}{End the monitoring process, we cannot restart} \uses{monitor-end}{*monitor-table*} -<>= +\begin{chunk}{defun monitor-end 0} (defun monitor-end () "End the monitoring process. we cannot restart" (declare (special *monitor-table*)) @@ -38866,11 +38914,11 @@ for example: (eval `(untrace ,key))) *monitor-table*)) -@ +\end{chunk} \defun{monitor-results}{Return a list of the monitor-data structures} \uses{monitor-results}{*monitor-table*} -<>= +\begin{chunk}{defun monitor-results 0} (defun monitor-results () "return a list of the monitor-data structures" (let (result) @@ -38882,13 +38930,13 @@ for example: *monitor-table*) (mapcar #'(lambda (x) (pprint x)) result))) -@ +\end{chunk} \defun{monitor-add}{Add a function to be monitored} \calls{monitor-add}{monitor-delete} \calls{monitor-add}{make-monitor-data} \uses{monitor-add}{*monitor-table*} -<>= +\begin{chunk}{defun monitor-add 0} (defun monitor-add (name &optional sourcefile) "add a function to be monitored" (declare (special *monitor-table*)) @@ -38900,22 +38948,22 @@ for example: (make-monitor-data :name name :count 0 :monitorp t :sourcefile sourcefile))))) -@ +\end{chunk} \defun{monitor-delete}{Remove a function being monitored} \uses{monitor-delete}{*monitor-table*} -<>= +\begin{chunk}{defun monitor-delete 0} (defun monitor-delete (fn) "Remove a function being monitored" (declare (special *monitor-table*)) (eval `(untrace ,fn)) (remhash fn *monitor-table*)) -@ +\end{chunk} \defun{monitor-enable}{Enable all (or optionally one) function for monitoring} \uses{monitor-enable}{*monitor-table*} -<>= +\begin{chunk}{defun monitor-enable 0} (defun monitor-enable (&optional fn) "enable all (or optionally one) function for monitoring" (declare (special *monitor-table*)) @@ -38930,11 +38978,11 @@ for example: (setf (monitor-data-monitorp (gethash key *monitor-table*)) t)) *monitor-table*))) -@ +\end{chunk} \defun{monitor-disable}{Disable all (optionally one) function for monitoring} \uses{monitor-disable}{*monitor-table*} -<>= +\begin{chunk}{defun monitor-disable 0} (defun monitor-disable (&optional fn) "disable all (optionally one) function for monitoring" (declare (special *monitor-table*)) @@ -38949,11 +38997,11 @@ for example: (setf (monitor-data-monitorp (gethash key *monitor-table*)) nil)) *monitor-table*))) -@ +\end{chunk} \defun{monitor-reset}{Reset the table count for the table (or a function)} \uses{monitor-reset}{*monitor-table*} -<>= +\begin{chunk}{defun monitor-reset 0} (defun monitor-reset (&optional fn) "reset the table count for the table (or a function)" (declare (special *monitor-table*)) @@ -38965,11 +39013,11 @@ for example: (setf (monitor-data-count (gethash key *monitor-table*)) 0)) *monitor-table*))) -@ +\end{chunk} \defun{monitor-incr}{Incr the count of fn by 1} \uses{monitor-incr}{*monitor-table*} -<>= +\begin{chunk}{defun monitor-incr 0} (defun monitor-incr (fn) "incr the count of fn by 1" (let (data) @@ -38979,11 +39027,11 @@ for example: (incf (monitor-data-count data)) ;; change table entry by side-effect (warn "~s is monitored but not in table..do (untrace ~s)~%" fn fn)))) -@ +\end{chunk} \defun{monitor-decr}{Decr the count of fn by 1} \uses{monitor-decr}{*monitor-table*} -<>= +\begin{chunk}{defun monitor-decr 0} (defun monitor-decr (fn) "decr the count of fn by 1" (let (data) @@ -38993,23 +39041,23 @@ for example: (decf (monitor-data-count data)) ;; change table entry by side-effect (warn "~s is monitored but not in table..do (untrace ~s)~%" fn fn)))) -@ +\end{chunk} \defun{monitor-info}{Return the monitor information for a function} \uses{monitor-info}{*monitor-table*} -<>= +\begin{chunk}{defun monitor-info 0} (defun monitor-info (fn) "return the monitor information for a function" (declare (special *monitor-table*)) (gethash fn *monitor-table*)) -@ +\end{chunk} \defun{monitor-file}{Hang a monitor call on all of the defuns in a file} \catches{monitor-file}{done} \throws{monitor-file}{done} \calls{monitor-file}{monitor-add} -<>= +\begin{chunk}{defun monitor-file 0} (defun monitor-file (file) "hang a monitor call on all of the defuns in a file" (let (expr (package "BOOT")) @@ -39026,11 +39074,11 @@ for example: (when (and (consp expr) (eq (car expr) 'defun)) (monitor-add (intern (string (second expr)) package) file)))))))) -@ +\end{chunk} \defun{monitor-untested}{Return a list of the functions with zero count fields} \uses{monitor-untested}{*monitor-table*} -<>= +\begin{chunk}{defun monitor-untested 0} (defun monitor-untested () "return a list of the functions with zero count fields" (let (result) @@ -39042,12 +39090,12 @@ for example: *monitor-table*) result)) -@ +\end{chunk} \defun{monitor-tested}{Return a list of functions with non-zero counts} \calls{monitor-tested}{monitor-delete} \uses{monitor-tested}{*monitor-table*)} -<>= +\begin{chunk}{defun monitor-tested 0} (defun monitor-tested (&optional delete) "return a list of functions with non-zero counts, optionally deleting them" (let (result) @@ -39061,10 +39109,10 @@ for example: *monitor-table*) result)) -@ +\end{chunk} \defun{monitor-write}{Write out a list of symbols or structures to a file} -<>= +\begin{chunk}{defun monitor-write 0} (defun monitor-write (items file) "write out a list of symbols or structures to a file" (with-open-file (out file :direction :output) @@ -39076,12 +39124,12 @@ for example: (monitor-data-name item) (monitor-data-count item)))))) -@ +\end{chunk} \defun{monitor-checkpoint}{Save the *monitor-table* in loadable form} \uses{monitor-checkpoint}{*monitor-table*} \uses{monitor-checkpoint}{*print-package*} -<>= +\begin{chunk}{defun monitor-checkpoint 0} (defun monitor-checkpoint (file) "save the *monitor-table* in loadable form" (let ((*print-package* t)) @@ -39102,18 +39150,18 @@ for example: (monitor-data-monitorp data) (monitor-data-sourcefile data)))))) -@ +\end{chunk} \defun{monitor-restore}{restore a checkpointed file} -<>= +\begin{chunk}{defun monitor-restore 0} (defun monitor-restore (file) "restore a checkpointed file" (load file)) -@ +\end{chunk} \defun{monitor-help}{Printing help documentation} -<>= +\begin{chunk}{defun monitor-help 0} (defun monitor-help () (format t "~% ;;; MONITOR @@ -39222,12 +39270,12 @@ for example: ") nil) -@ +\end{chunk} \subsection{Monitoring algebra files} \defun{monitor-dirname}{Monitoring algebra code.lsp files} \uses{monitor-dirname}{*monitor-nrlibs*} -<>= +\begin{chunk}{defun monitor-dirname 0} (defun monitor-dirname (args) "expects a list of 1 libstream (loadvol's arglist) and monitors the source" (let (name) @@ -39239,21 +39287,21 @@ for example: (push name *monitor-nrlibs*) (monitor-file name)))) -@ +\end{chunk} \defun{monitor-autoload}{Monitor autoloaded files} -<>= +\begin{chunk}{defun monitor-autoload 0} (defun monitor-autoload () "traces autoload of algebra to monitor corresponding source files" (trace (vmlisp::loadvol :entrycond nil :exitcond (progn (monitor-dirname system::arglist) nil)))) -@ +\end{chunk} \defun{monitor-nrlib}{Monitor an nrlib} \uses{monitor-nrlib}{*monitor-table*} -<>= +\begin{chunk}{defun monitor-nrlib 0} (defun monitor-nrlib (nrlib) "takes an nrlib name as a string (eg POLY) and returns a list of monitor-data structures from that source file" @@ -39269,24 +39317,24 @@ for example: *monitor-table*) result)) -@ +\end{chunk} \defun{monitor-libname}{Given a monitor-data item, extract the nrlib name} -<>= +\begin{chunk}{defun monitor-libname 0} (defun monitor-libname (item) "given a monitor-data item, extract the nrlib name" (pathname-name (car (last (pathname-directory (monitor-data-sourcefile item)))))) -@ +\end{chunk} \defun{monitor-exposedp}{Is this an exposed algebra function?} -<>= +\begin{chunk}{defun monitor-exposedp 0} (defun monitor-exposedp (fn) "exposed functions have more than 1 semicolon. given a symbol, count them" (> (count #\; (symbol-name fn)) 1)) -@ +\end{chunk} \defun{monitor-readinterp}{Monitor exposed domains} \tpdhere{note that the file interp.exposed no longer exists.} @@ -39295,7 +39343,7 @@ This needs to work off the internal exposure list, not the file. \catches{monitor-readinterp}{done} \throws{monitor-readinterp}{done} \uses{monitor-readinterp}{*monitor-domains*} -<>= +\begin{chunk}{defun monitor-readinterp 0} (defun monitor-readinterp () "read interp.exposed to initialize *monitor-domains* to exposed domains. this is the default action. adding or deleting domains from the list @@ -39323,12 +39371,12 @@ This needs to work off the internal exposure list, not the file. (when (> (length name) 0) (push name *monitor-domains*)))))))) -@ +\end{chunk} \defun{monitor-report}{Generate a report of the monitored domains} \calls{monitor-report}{monitor-readinterp} \uses{monitor-report}{*monitor-domains*} -<>= +\begin{chunk}{defun monitor-report 0} (defun monitor-report () "generate a report of the monitored activity for domains in *monitor-domains*" (let (nrlibs nonzero total) @@ -39367,10 +39415,10 @@ This needs to work off the internal exposure list, not the file. (format t "Daly bug:~a has untested exposed functions~%" (car pair)))))) nil)) -@ +\end{chunk} \defun{monitor-parse}{Parse an )abbrev expression for the domain name} -<>= +\begin{chunk}{defun monitor-parse 0} (defun monitor-parse (expr) (let (point1 point2) (setq point1 (position #\space expr :test #'char=)) @@ -39380,14 +39428,14 @@ This needs to work off the internal exposure list, not the file. (setq point2 (position #\space expr :start point1 :test #'char=)) (subseq expr point1 point2))) -@ +\end{chunk} \defun{monitor-spadfile}{Given a spad file, report all nrlibs it creates} \catches{monitor-spadfile}{done} \throws{monitor-spadfile}{done} \calls{monitor-spadfile}{monitor-parse} \uses{monitor-spadfile}{*monitor-domains*} -<>= +\begin{chunk}{defun monitor-spadfile 0} (defun monitor-spadfile (name) "given a spad file, report all nrlibs it creates" (let (expr) @@ -39401,11 +39449,11 @@ This needs to work off the internal exposure list, not the file. (setq *monitor-domains* (adjoin (monitor-parse expr) *monitor-domains* :test #'string=)))))))) -@ +\end{chunk} \defun{monitor-percent}{Print percent of functions tested} \uses{monitor-percent}{*monitor-table*} -<>= +\begin{chunk}{defun monitor-percent 0} (defun monitor-percent () "Print percent of functions tested" (let (nonzero total) @@ -39421,11 +39469,11 @@ This needs to work off the internal exposure list, not the file. (format t "~d of ~d (~d percent) tested~%" nonzero total (round (/ (* 100.0 nonzero) total))))) -@ +\end{chunk} \defun{monitor-apropos}{Find all monitored symbols containing the string} \uses{monitor-apropos}{*monitor-table*} -<>= +\begin{chunk}{defun monitor-apropos 0} (defun monitor-apropos (str) "given a string, find all monitored symbols containing the string the search is case-insensitive. returns a list of monitor-data items" @@ -39440,1482 +39488,1482 @@ This needs to work off the internal exposure list, not the file. *monitor-table*) result)) -@ +\end{chunk} \chapter{The Interpreter} -<>= +\begin{chunk}{Interpreter} (setq *print-array* nil) (setq *print-circle* nil) (setq *print-pretty* nil) (in-package "BOOT") -<> +\getchunk{initvars} ;;; level 0 macros -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> +\getchunk{defmacro bit-to-truth 0} +\getchunk{defmacro bvec-elt 0} +\getchunk{defmacro idChar? 0} +\getchunk{defmacro identp 0} +\getchunk{defmacro qsabsval 0} +\getchunk{defmacro qsadd1 0} +\getchunk{defmacro qsdifference 0} +\getchunk{defmacro qslessp 0} +\getchunk{defmacro qsmax 0} +\getchunk{defmacro qsmin 0} +\getchunk{defmacro qsminus 0} +\getchunk{defmacro qsoddp 0} +\getchunk{defmacro qsplus 0} +\getchunk{defmacro qssub1 0} +\getchunk{defmacro qstimes 0} +\getchunk{defmacro qszerop 0} +\getchunk{defmacro spadConstant 0} ;;; above level 0 macros -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> +\getchunk{defmacro assq} +\getchunk{defmacro bvec-setelt} +\getchunk{defmacro bvec-size} +\getchunk{defmacro cdaref2} +\getchunk{defmacro cdelt} +\getchunk{defmacro cdlen} +\getchunk{defmacro cdancols} +\getchunk{defmacro cdanrows} +\getchunk{defmacro cdsetaref2} +\getchunk{defmacro cdsetelt} +\getchunk{defmacro danrows} +\getchunk{defmacro dancols} +\getchunk{defmacro daref2} +\getchunk{defmacro delt} +\getchunk{defmacro DFAdd} +\getchunk{defmacro DFAcos} +\getchunk{defmacro DFAcosh} +\getchunk{defmacro DFAsin} +\getchunk{defmacro DFAsinh} +\getchunk{defmacro DFAtan} +\getchunk{defmacro DFAtan2} +\getchunk{defmacro DFAtanh} +\getchunk{defmacro DFCos} +\getchunk{defmacro DFCosh} +\getchunk{defmacro DFDivide} +\getchunk{defmacro DFEql} +\getchunk{defmacro DFExp} +\getchunk{defmacro DFExpt} +\getchunk{defmacro DFIntegerDivide} +\getchunk{defmacro DFIntegerExpt} +\getchunk{defmacro DFIntegerMultiply} +\getchunk{defmacro DFLessThan} +\getchunk{defmacro DFLog} +\getchunk{defmacro DFLogE} +\getchunk{defmacro DFMax} +\getchunk{defmacro DFMin} +\getchunk{defmacro DFMinusp} +\getchunk{defmacro DFMultiply} +\getchunk{defmacro DFSin} +\getchunk{defmacro DFSinh} +\getchunk{defmacro DFSqrt} +\getchunk{defmacro DFSubtract} +\getchunk{defmacro DFTan} +\getchunk{defmacro DFTanh} +\getchunk{defmacro DFUnaryMinus} +\getchunk{defmacro DFZerop} +\getchunk{defmacro dlen} +\getchunk{defmacro dsetaref2} +\getchunk{defmacro dsetelt} +\getchunk{defmacro funfind} +\getchunk{defmacro hget} +\getchunk{defmacro make-cdouble-matrix} +\getchunk{defmacro make-cdouble-vector} +\getchunk{defmacro make-double-matrix} +\getchunk{defmacro make-double-matrix1} +\getchunk{defmacro make-double-vector} +\getchunk{defmacro make-double-vector1} +\getchunk{defmacro Rest} +\getchunk{defmacro startsId?} +\getchunk{defmacro truth-to-bit} +\getchunk{defmacro while} +\getchunk{defmacro whileWithResult} ;;; layer 0 (all common lisp) -<> -<> -<> -<> -<> -<> -<> - -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> - -<> -<> -<> -<> -<> -<> -<> -<> -<> - -<> -<> -<> -<> -<> -<> -<> - -<> - -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> - -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> - -<> - -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> - -<> -<> - -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> - -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> - -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> - -<> - -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> - -<> -<> -<> -<> - -<> -<> -<> -<> -<> -<> -<> - -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> - -<> -<> -<> -<> -<> -<> -<> - -<> +\getchunk{defun acot 0} +\getchunk{defun acoth 0} +\getchunk{defun acsc 0} +\getchunk{defun acsch 0} +\getchunk{defun asec 0} +\getchunk{defun asech 0} +\getchunk{defun axiomVersion 0} + +\getchunk{defun BooleanEquality 0} +\getchunk{defun bvec-and 0} +\getchunk{defun bvec-concat 0} +\getchunk{defun bvec-copy 0} +\getchunk{defun bvec-equal 0} +\getchunk{defun bvec-greater 0} +\getchunk{defun bvec-make-full 0} +\getchunk{defun bvec-nand 0} +\getchunk{defun bvec-nor 0} +\getchunk{defun bvec-not 0} +\getchunk{defun bvec-or 0} +\getchunk{defun bvec-xor 0} + +\getchunk{defun cleanupLine 0} +\getchunk{defun clearMacroTable 0} +\getchunk{defun concat 0} +\getchunk{defun cot 0} +\getchunk{defun coth 0} +\getchunk{defun createCurrentInterpreterFrame 0} +\getchunk{defun credits 0} +\getchunk{defun csc 0} +\getchunk{defun csch 0} + +\getchunk{defun Delay 0} +\getchunk{defun desiredMsg 0} +\getchunk{defun DirToString 0} +\getchunk{defun divide2 0} +\getchunk{defun dqAppend 0} +\getchunk{defun dqToList 0} +\getchunk{defun dqUnit 0} + +\getchunk{defun emptyInterpreterFrame 0} + +\getchunk{defun fin 0} +\getchunk{defun findFrameInRing 0} +\getchunk{defun flatten 0} +\getchunk{defun fnameExists? 0} +\getchunk{defun fnameName 0} +\getchunk{defun fnameReadable? 0} +\getchunk{defun fnameType 0} +\getchunk{defun frameExposureData 0} +\getchunk{defun frameHiFiAccess 0} +\getchunk{defun frameHistList 0} +\getchunk{defun frameHistListAct 0} +\getchunk{defun frameHistListLen 0} +\getchunk{defun frameHistoryTable 0} +\getchunk{defun frameHistRecord 0} +\getchunk{defun frameInteractive 0} +\getchunk{defun frameIOIndex 0} +\getchunk{defun frameName 0} +\getchunk{defun frameNames 0} +\getchunk{defun From 0} +\getchunk{defun FromTo 0} + +\getchunk{defun get-current-directory 0} +\getchunk{defun getenviron 0} +\getchunk{defun getLinePos 0} +\getchunk{defun getLineText 0} +\getchunk{defun getMsgArgL 0} +\getchunk{defun getMsgKey 0} +\getchunk{defun getMsgKey? 0} +\getchunk{defun getMsgPrefix 0} +\getchunk{defun getMsgPosTagOb 0} +\getchunk{defun getMsgPrefix? 0} +\getchunk{defun getMsgTag 0} +\getchunk{defun getMsgTag? 0} +\getchunk{defun getMsgText 0} +\getchunk{defun getParserMacroNames 0} +\getchunk{defun getPreStL 0} + +\getchunk{defun hasOptArgs? 0} + +\getchunk{defun incActive? 0} +\getchunk{defun incCommand? 0} +\getchunk{defun incDrop 0} +\getchunk{defun incHandleMessage 0} +\getchunk{defun inclmsgConsole 0} +\getchunk{defun inclmsgFinSkipped 0} +\getchunk{defun inclmsgPrematureEOF 0} +\getchunk{defun inclmsgCmdBug 0} +\getchunk{defun inclmsgIfBug 0} +\getchunk{defun incPrefix? 0} +\getchunk{defun init-memory-config 0} +\getchunk{defun insertPos 0} +\getchunk{defun integer-decode-float-denominator 0} +\getchunk{defun integer-decode-float-exponent 0} +\getchunk{defun integer-decode-float-sign 0} +\getchunk{defun integer-decode-float-numerator 0} +\getchunk{defun intloopPrefix? 0} +\getchunk{defun isIntegerString 0} + +\getchunk{defun keyword 0} +\getchunk{defun keyword? 0} + +\getchunk{defun lfcomment 0} +\getchunk{defun lferror 0} +\getchunk{defun lffloat 0} +\getchunk{defun lfid 0} +\getchunk{defun lfinteger 0} +\getchunk{defun lfnegcomment 0} +\getchunk{defun lfrinteger 0} +\getchunk{defun lfspaces 0} +\getchunk{defun lfstring 0} +\getchunk{defun lnCreate 0} +\getchunk{defun lnExtraBlanks 0} +\getchunk{defun lnFileName? 0} +\getchunk{defun lnGlobalNum 0} +\getchunk{defun lnImmediate? 0} +\getchunk{defun lnLocalNum 0} +\getchunk{defun lnPlaceOfOrigin 0} +\getchunk{defun lnSetGlobalNum 0} +\getchunk{defun lnString 0} + +\getchunk{defun mac0Define 0} +\getchunk{defun mac0InfiniteExpansion,name 0} +\getchunk{defun make-absolute-filename 0} +\getchunk{defun makeByteWordVec2 0} +\getchunk{defun makeInitialModemapFrame 0} +\getchunk{defun manexp 0} +\getchunk{defun member 0} +\getchunk{defun monitor-add 0} +\getchunk{defun monitor-apropos 0} +\getchunk{defun monitor-autoload 0} +\getchunk{defun monitor-checkpoint 0} +\getchunk{defun monitor-decr 0} +\getchunk{defun monitor-delete 0} +\getchunk{defun monitor-dirname 0} +\getchunk{defun monitor-disable 0} +\getchunk{defun monitor-enable 0} +\getchunk{defun monitor-end 0} +\getchunk{defun monitor-exposedp 0} +\getchunk{defun monitor-file 0} +\getchunk{defun monitor-help 0} +\getchunk{defun monitor-incr 0} +\getchunk{defun monitor-info 0} +\getchunk{defun monitor-inittable 0} +\getchunk{defun monitor-libname 0} +\getchunk{defun monitor-nrlib 0} +\getchunk{defun monitor-parse 0} +\getchunk{defun monitor-percent 0} +\getchunk{defun monitor-readinterp 0} +\getchunk{defun monitor-report 0} +\getchunk{defun monitor-reset 0} +\getchunk{defun monitor-restore 0} +\getchunk{defun monitor-results 0} +\getchunk{defun monitor-spadfile 0} +\getchunk{defun monitor-tested 0} +\getchunk{defun monitor-untested 0} +\getchunk{defun monitor-write 0} + +\getchunk{defun ncError 0} +\getchunk{defun ncloopEscaped 0} +\getchunk{defun ncloopPrefix? 0} +\getchunk{defun ncloopPrintLines 0} +\getchunk{defun nonBlank 0} +\getchunk{defun npAnyNo 0} +\getchunk{defun npboot 0} +\getchunk{defun npEqPeek 0} +\getchunk{defun nplisp 0} +\getchunk{defun npPop1 0} +\getchunk{defun npPop2 0} +\getchunk{defun npPop3 0} +\getchunk{defun npPush 0} + +\getchunk{defun opTran 0} + +\getchunk{defun packageTran 0} +\getchunk{defun pfAndLeft 0} +\getchunk{defun pfAndRight 0} +\getchunk{defun pfAppend 0} +\getchunk{defun pfApplicationArg 0} +\getchunk{defun pfApplicationOp 0} +\getchunk{defun pfAssignLhsItems 0} +\getchunk{defun pf0AssignLhsItems 0} +\getchunk{defun pfAssignRhs 0} +\getchunk{defun pfBreakFrom 0} +\getchunk{defun pfCoercetoExpr 0} +\getchunk{defun pfCoercetoType 0} +\getchunk{defun pfCollectBody 0} +\getchunk{defun pfCollectIterators 0} +\getchunk{defun pfDefinitionLhsItems 0} +\getchunk{defun pfDefinitionRhs 0} +\getchunk{defun pfDoBody 0} +\getchunk{defun pfExitCond 0} +\getchunk{defun pfExitExpr 0} +\getchunk{defun pfFirst 0} +\getchunk{defun pfFreeItems 0} +\getchunk{defun pfForinLhs 0} +\getchunk{defun pfForinWhole 0} +\getchunk{defun pfFromdomDomain 0} +\getchunk{defun pfFromdomWhat 0} +\getchunk{defun pfIfCond 0} +\getchunk{defun pfIfElse 0} +\getchunk{defun pfIfThen 0} +\getchunk{defun pfLambdaArgs 0} +\getchunk{defun pfLambdaBody 0} +\getchunk{defun pfLambdaRets 0} +\getchunk{defun pfLiteral? 0} +\getchunk{defun pfLocalItems 0} +\getchunk{defun pfLoopIterators 0} +\getchunk{defun pfMacroLhs 0} +\getchunk{defun pfMacroRhs 0} +\getchunk{defun pfMLambdaArgs 0} +\getchunk{defun pfMLambdaBody 0} +\getchunk{defun pfNotArg 0} +\getchunk{defun pfNovalueExpr 0} +\getchunk{defun pfOrLeft 0} +\getchunk{defun pfOrRight 0} +\getchunk{defun pfParts 0} +\getchunk{defun pfPile 0} +\getchunk{defun pfPretendExpr 0} +\getchunk{defun pfPretendType 0} +\getchunk{defun pfRestrictExpr 0} +\getchunk{defun pfRestrictType 0} +\getchunk{defun pfReturnExpr 0} +\getchunk{defun pfRuleLhsItems 0} +\getchunk{defun pfRuleRhs 0} +\getchunk{defun pfSecond 0} +\getchunk{defun pfSequenceArgs 0} +\getchunk{defun pfSuchthatCond 0} +\getchunk{defun pfTaggedExpr 0} +\getchunk{defun pfTaggedTag 0} +\getchunk{defun pfTree 0} +\getchunk{defun pfTypedId 0} +\getchunk{defun pfTypedType 0} +\getchunk{defun pfTupleParts 0} +\getchunk{defun pfWhereContext 0} +\getchunk{defun pfWhereExpr 0} +\getchunk{defun pfWhileCond 0} +\getchunk{defun pmDontQuote? 0} +\getchunk{defun poCharPosn 0} +\getchunk{defun poGetLineObject 0} +\getchunk{defun poNopos? 0} +\getchunk{defun poNoPosition 0} +\getchunk{defun poNoPosition? 0} +\getchunk{defun printAsTeX 0} +\getchunk{defun pname 0} + +\getchunk{defun qenum 0} +\getchunk{defun qsquotient 0} +\getchunk{defun qsremainder 0} +\getchunk{defun quotient2 0} + +\getchunk{defun random 0} +\getchunk{defun rdigit? 0} +\getchunk{defun reclaim 0} +\getchunk{defun remainder2 0} +\getchunk{defun remLine 0} +\getchunk{defun rep 0} +\getchunk{defun resetStackLimits 0} + +\getchunk{defun sameUnionBranch 0} +\getchunk{defun satisfiesUserLevel 0} +\getchunk{defun scanCloser? 0} +\getchunk{defun sec 0} +\getchunk{defun sech 0} +\getchunk{defun setCurrentLine 0} +\getchunk{defun setMsgPrefix 0} +\getchunk{defun setMsgText 0} +\getchunk{defun set-restart-hook 0} +\getchunk{defun showMsgPos? 0} +\getchunk{defun StreamNull 0} +\getchunk{defun stripLisp 0} +\getchunk{defun stripSpaces 0} + +\getchunk{defun theid 0} +\getchunk{defun thefname 0} +\getchunk{defun theorigin 0} +\getchunk{defun tokPart 0} +\getchunk{defun To 0} +\getchunk{defun Top? 0} +\getchunk{defun trademark 0} + +\getchunk{defun zeroOneTran 0} ;;; above level 0 -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> - -<> -<> -<> -<> -<> -<> - -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> - -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> - -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> - -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> - -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> - -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> - -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> - -<> - -<> - -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> - -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> - -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> - -<> -<> -<> -<> -<> -<> -<> - -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> - -<> -<> -<> -<> - -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> - -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> - -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> - -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> - -<> - -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> - -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> -<> - -<> - -<> -<> -<> - -<> - -@ +\getchunk{defun abbQuery} +\getchunk{defun abbreviations} +\getchunk{defun abbreviationsSpad2Cmd} +\getchunk{defun addBinding} +\getchunk{defun addBindingInteractive} +\getchunk{defun addInputLibrary} +\getchunk{defun addNewInterpreterFrame} +\getchunk{defun addoperations} +\getchunk{defun addTraceItem} +\getchunk{defun allConstructors} +\getchunk{defun allOperations} +\getchunk{defun alqlGetOrigin} +\getchunk{defun alqlGetParams} +\getchunk{defun alqlGetKindString} +\getchunk{defun alreadyOpened?} +\getchunk{defun apropos} +\getchunk{defun assertCond} +\getchunk{defun augmentTraceNames} + +\getchunk{defun break} +\getchunk{defun breaklet} +\getchunk{defun brightprint} +\getchunk{defun brightprint-0} +\getchunk{defun browse} +\getchunk{defun browseOpen} + +\getchunk{defun cacheKeyedMsg} +\getchunk{defun categoryOpen} +\getchunk{defun changeHistListLen} +\getchunk{defun changeToNamedInterpreterFrame} +\getchunk{defun charDigitVal} +\getchunk{defun cleanline} +\getchunk{defun clear} +\getchunk{defun clearCmdAll} +\getchunk{defun clearCmdCompletely} +\getchunk{defun clearCmdExcept} +\getchunk{defun clearCmdParts} +\getchunk{defun clearCmdSortedCaches} +\getchunk{defun clearFrame} +\getchunk{defun clearParserMacro} +\getchunk{defun clearSpad2Cmd} +\getchunk{defun close} +\getchunk{defun closeInterpreterFrame} +\getchunk{defun coerceSpadArgs2E} +\getchunk{defun coerceSpadFunValue2E} +\getchunk{defun coerceTraceArgs2E} +\getchunk{defun coerceTraceFunValue2E} +\getchunk{defun commandAmbiguityError} +\getchunk{defun commandError} +\getchunk{defun commandErrorIfAmbiguous} +\getchunk{defun commandErrorMessage} +\getchunk{defun commandsForUserLevel} +\getchunk{defun commandUserLevelError} +\getchunk{defun compareposns} +\getchunk{defun compileBoot} +\getchunk{defun compressOpen} +\getchunk{defun constoken} +\getchunk{defun copyright} +\getchunk{defun countCache} + +\getchunk{defun DaaseName} +\getchunk{defun decideHowMuch} +\getchunk{defun defiostream} +\getchunk{defun deldatabase} +\getchunk{defun deleteFile} +\getchunk{defun describe} +\getchunk{defun describeFortPersistence} +\getchunk{defun describeInputLibraryArgs} +\getchunk{defun describeOutputLibraryArgs} +\getchunk{defun describeProtectedSymbolsWarning} +\getchunk{defun describeProtectSymbols} +\getchunk{defun describeSetFortDir} +\getchunk{defun describeSetFortTmpDir} +\getchunk{defun describeSetFunctionsCache} +\getchunk{defun describeSetLinkerArgs} +\getchunk{defun describeSetNagHost} +\getchunk{defun describeSetOutputAlgebra} +\getchunk{defun describeSetOutputFormula} +\getchunk{defun describeSetOutputFortran} +\getchunk{defun describeSetOutputHtml} +\getchunk{defun describeSetOutputMathml} +\getchunk{defun describeSetOutputOpenMath} +\getchunk{defun describeSetOutputTex} +\getchunk{defun describeSetStreamsCalculate} +\getchunk{defun describeSpad2Cmd} +\getchunk{defun dewritify} +\getchunk{defun dewritify,dewritifyInner} +\getchunk{defun dewritify,is?} +\getchunk{defun diffAlist} +\getchunk{defun digit?} +\getchunk{defun digitp} +\getchunk{defun disableHist} +\getchunk{defun display} +\getchunk{defun displayCondition} +\getchunk{defun displayExposedConstructors} +\getchunk{defun displayExposedGroups} +\getchunk{defun displayFrameNames} +\getchunk{defun displayHiddenConstructors} +\getchunk{defun displayMacro} +\getchunk{defun displayMacros} +\getchunk{defun displayMode} +\getchunk{defun displayModemap} +\getchunk{defun displayOperations} +\getchunk{defun displayOperationsFromLisplib} +\getchunk{defun displayParserMacro} +\getchunk{defun displayProperties} +\getchunk{defun displayProperties,sayFunctionDeps} +\getchunk{defun displaySetOptionInformation} +\getchunk{defun displaySetVariableSettings} +\getchunk{defun displaySpad2Cmd} +\getchunk{defun displayType} +\getchunk{defun displayValue} +\getchunk{defun displayWorkspaceNames} +\getchunk{defun domainToGenvar} +\getchunk{defun doSystemCommand} +\getchunk{defun dqConcat} +\getchunk{defun dropInputLibrary} +\getchunk{defun dumbTokenize} + +\getchunk{defun edit} +\getchunk{defun editFile} +\getchunk{defun editSpad2Cmd} +\getchunk{defun Else?} +\getchunk{defun Elseif?} +\getchunk{defun enPile} +\getchunk{defun eofp} +\getchunk{defun eqpileTree} +\getchunk{defun erMsgCompare} +\getchunk{defun erMsgSep} +\getchunk{defun erMsgSort} +\getchunk{defun ExecuteInterpSystemCommand} +\getchunk{defun executeQuietCommand} + +\getchunk{defun fetchKeyedMsg} +\getchunk{defun fetchOutput} +\getchunk{defun fillerSpaces} +\getchunk{defun filterAndFormatConstructors} +\getchunk{defun filterListOfStrings} +\getchunk{defun filterListOfStringsWithFn} +\getchunk{defun firstTokPosn} +\getchunk{defun fixObjectForPrinting} +\getchunk{defun flattenOperationAlist} +\getchunk{defun float2Sex} +\getchunk{defun fnameDirectory} +\getchunk{defun fnameMake} +\getchunk{defun fnameNew} +\getchunk{defun fnameWritable?} +\getchunk{defun frame} +\getchunk{defun frameEnvironment} +\getchunk{defun frameSpad2Cmd} +\getchunk{defun functionp} +\getchunk{defun funfind,LAM} + +\getchunk{defun genDomainTraceName} +\getchunk{defun gensymInt} +\getchunk{defun getAliasIfTracedMapParameter} +\getchunk{defun getAndSay} +\getchunk{defun getBpiNameIfTracedMap} +\getchunk{defun getBrowseDatabase} +\getchunk{defun getdatabase} +\getchunk{defun getDirectoryList} +\getchunk{defun getFirstWord} +\getchunk{defun getKeyedMsg} +\getchunk{defun getMapSig} +\getchunk{defun getMapSubNames} +\getchunk{defun getMsgCatAttr} +\getchunk{defun getMsgFTTag?} +\getchunk{defun getMsgInfoFromKey} +\getchunk{defun getMsgLitSym} +\getchunk{defun getMsgPos} +\getchunk{defun getMsgPos2} +\getchunk{defun getMsgToWhere} +\getchunk{defun getOption} +\getchunk{defun getPosStL} +\getchunk{defun getPreviousMapSubNames} +\getchunk{defun getProplist} +\getchunk{defun getStFromMsg} +\getchunk{defun getSystemCommandLine} +\getchunk{defun getTraceOption} +\getchunk{defun getTraceOption,hn} +\getchunk{defun getTraceOptions} +\getchunk{defun getWorkspaceNames} + +\getchunk{defun handleNoParseCommands} +\getchunk{defun handleParsedSystemCommands} +\getchunk{defun handleTokensizeSystemCommands} +\getchunk{defun hashable} +\getchunk{defun hasOption} +\getchunk{defun hasPair} +\getchunk{defun help} +\getchunk{defun helpSpad2Cmd} +\getchunk{defun histFileErase} +\getchunk{defun histFileName} +\getchunk{defun histInputFileName} +\getchunk{defun history} +\getchunk{defun historySpad2Cmd} +\getchunk{defun hkeys} +\getchunk{defun hput} + +\getchunk{defun If?} +\getchunk{defun ifCond} +\getchunk{defun importFromFrame} +\getchunk{defun incAppend} +\getchunk{defun incAppend1} +\getchunk{defun incBiteOff} +\getchunk{defun incClassify} +\getchunk{defun incCommandTail} +\getchunk{defun incConsoleInput} +\getchunk{defun incFileInput} +\getchunk{defun incFileName} +\getchunk{defun incIgen} +\getchunk{defun incIgen1} +\getchunk{defun inclFname} +\getchunk{defun incLine} +\getchunk{defun incLine1} +\getchunk{defun inclmsgCannotRead} +\getchunk{defun inclmsgFileCycle} +\getchunk{defun inclmsgPrematureFin} +\getchunk{defun incLude} +\getchunk{defun incLude1} +\getchunk{defun inclmsgConActive} +\getchunk{defun inclmsgConStill} +\getchunk{defun inclmsgIfSyntax} +\getchunk{defun inclmsgNoSuchFile} +\getchunk{defun inclmsgSay} +\getchunk{defun incNConsoles} +\getchunk{defun incRenumber} +\getchunk{defun incRenumberItem} +\getchunk{defun incRenumberLine} +\getchunk{defun incRgen} +\getchunk{defun incRgen1} +\getchunk{defun incStream} +\getchunk{defun incString} +\getchunk{defun incZip} +\getchunk{defun incZip1} +\getchunk{defun init-boot/spad-reader} +\getchunk{defun initHist} +\getchunk{defun initHistList} +\getchunk{defun initial-getdatabase} +\getchunk{defun initializeInterpreterFrameRing} +\getchunk{defun initializeSetVariables} +\getchunk{defun initImPr} +\getchunk{defun initroot} +\getchunk{defun initToWhere} +\getchunk{defun insertpile} +\getchunk{defun InterpExecuteSpadSystemCommand} +\getchunk{defun interpFunctionDepAlists} +\getchunk{defun interpOpen} +\getchunk{defun interpret} +\getchunk{defun interpret1} +\getchunk{defun interpret2} +\getchunk{defun interpretTopLevel} +\getchunk{defun intInterpretPform} +\getchunk{defun intloop} +\getchunk{defun intloopEchoParse} +\getchunk{defun intloopInclude} +\getchunk{defun intloopInclude0} +\getchunk{defun intnplisp} +\getchunk{defun intloopProcess} +\getchunk{defun intloopProcessString} +\getchunk{defun intloopReadConsole} +\getchunk{defun intloopSpadProcess} +\getchunk{defun intloopSpadProcess,interp} +\getchunk{defun intProcessSynonyms} +\getchunk{defun intSayKeyedMsg} +\getchunk{defun isDomainOrPackage} +\getchunk{defun isgenvar} +\getchunk{defun isInterpOnlyMap} +\getchunk{defun isListOfIdentifiers} +\getchunk{defun isListOfIdentifiersOrStrings} +\getchunk{defun isSharpVar} +\getchunk{defun isSharpVarWithNum} +\getchunk{defun isSubForRedundantMapName} +\getchunk{defun isTraceGensym} +\getchunk{defun isUncompiledMap} + +\getchunk{defun justifyMyType} + +\getchunk{defun KeepPart?} + +\getchunk{defun lassocSub} +\getchunk{defun lastTokPosn} +\getchunk{defun leader?} +\getchunk{defun leaveScratchpad} +\getchunk{defun letPrint} +\getchunk{defun letPrint2} +\getchunk{defun letPrint3} +\getchunk{defun lfkey} +\getchunk{defun library} +\getchunk{defun line?} +\getchunk{defun lineoftoks} +\getchunk{defun listConstructorAbbreviations} +\getchunk{defun listDecideHowMuch} +\getchunk{defun listOutputter} +\getchunk{defun lnFileName} +\getchunk{defun load} +\getchunk{defun localdatabase} +\getchunk{defun localnrlib} +\getchunk{defun loopIters2Sex} +\getchunk{defun lotsof} +\getchunk{defun ltrace} + +\getchunk{defun macApplication} +\getchunk{defun macExpand} +\getchunk{defun macId} +\getchunk{defun macLambda} +\getchunk{defun macLambda,mac} +\getchunk{defun macLambdaParameterHandling} +\getchunk{defun macMacro} +\getchunk{defun macSubstituteId} +\getchunk{defun macSubstituteOuter} +\getchunk{defun macroExpanded} +\getchunk{defun macWhere} +\getchunk{defun macWhere,mac} +\getchunk{defun mac0ExpandBody} +\getchunk{defun mac0Get} +\getchunk{defun mac0GetName} +\getchunk{defun mac0InfiniteExpansion} +\getchunk{defun mac0MLambdaApply} +\getchunk{defun mac0SubstituteOuter} +\getchunk{defun make-appendstream} +\getchunk{defun make-databases} +\getchunk{defun makeFullNamestring} +\getchunk{defun makeHistFileName} +\getchunk{defun makeInputFilename} +\getchunk{defun make-instream} +\getchunk{defun makeLeaderMsg} +\getchunk{defun makeMsgFromLine} +\getchunk{defun make-outstream} +\getchunk{defun makePathname} +\getchunk{defun makeStream} +\getchunk{defun mapLetPrint} +\getchunk{defun mergePathnames} +\getchunk{defun messageprint} +\getchunk{defun messageprint-1} +\getchunk{defun messageprint-2} +\getchunk{defun mkLineList} +\getchunk{defun mkprompt} +\getchunk{defun msgCreate} +\getchunk{defun msgImPr?} +\getchunk{defun msgNoRep?} +\getchunk{defun msgOutputter} +\getchunk{defun msgText} +\getchunk{defun myWritable?} + +\getchunk{defun namestring} +\getchunk{defun ncAlist} +\getchunk{defun ncBug} +\getchunk{defun ncConversationPhase} +\getchunk{defun ncConversationPhase,wrapup} +\getchunk{defun ncEltQ} +\getchunk{defun ncHardError} +\getchunk{defun ncIntLoop} +\getchunk{defun ncloopCommand} +\getchunk{defun ncloopDQlines} +\getchunk{defun ncloopIncFileName} +\getchunk{defun ncloopInclude} +\getchunk{defun ncloopInclude0} +\getchunk{defun ncloopInclude1} +\getchunk{defun ncloopParse} +\getchunk{defun ncParseAndInterpretString} +\getchunk{defun ncPutQ} +\getchunk{defun ncSoftError} +\getchunk{defun ncTag} +\getchunk{defun ncTopLevel} +\getchunk{defun newHelpSpad2Cmd} +\getchunk{defun next} +\getchunk{defun next1} +\getchunk{defun nextInterpreterFrame} +\getchunk{defun nextline} +\getchunk{defun next-lines-clear} +\getchunk{defun npAdd} +\getchunk{defun npADD} +\getchunk{defun npAmpersand} +\getchunk{defun npAmpersandFrom} +\getchunk{defun npAndOr} +\getchunk{defun npAngleBared} +\getchunk{defun npApplication} +\getchunk{defun npApplication2} +\getchunk{defun npArith} +\getchunk{defun npAssign} +\getchunk{defun npAssignment} +\getchunk{defun npAssignVariable} +\getchunk{defun npAtom1} +\getchunk{defun npAtom2} +\getchunk{defun npBacksetElse} +\getchunk{defun npBackTrack} +\getchunk{defun npBDefinition} +\getchunk{defun npBPileDefinition} +\getchunk{defun npBraced} +\getchunk{defun npBracked} +\getchunk{defun npBracketed} +\getchunk{defun npBreak} +\getchunk{defun npBy} +\getchunk{defun npCategory} +\getchunk{defun npCategoryL} +\getchunk{defun npCoerceTo} +\getchunk{defun npColon} +\getchunk{defun npColonQuery} +\getchunk{defun npComma} +\getchunk{defun npCommaBackSet} +\getchunk{defun npCompMissing} +\getchunk{defun npConditional} +\getchunk{defun npConditionalStatement} +\getchunk{defun npConstTok} +\getchunk{defun npDDInfKey} +\getchunk{defun npDecl} +\getchunk{defun npDef} +\getchunk{defun npDefaultDecl} +\getchunk{defun npDefaultItem} +\getchunk{defun npDefaultItemlist} +\getchunk{defun npDefaultValue} +\getchunk{defun npDefinition} +\getchunk{defun npDefinitionItem} +\getchunk{defun npDefinitionlist} +\getchunk{defun npDefinitionOrStatement} +\getchunk{defun npDefn} +\getchunk{defun npDefTail} +\getchunk{defun npDiscrim} +\getchunk{defun npDisjand} +\getchunk{defun npDollar} +\getchunk{defun npDotted} +\getchunk{defun npElse} +\getchunk{defun npEncAp} +\getchunk{defun npEncl} +\getchunk{defun npEnclosed} +\getchunk{defun npEqKey} +\getchunk{defun npExit} +\getchunk{defun npExpress} +\getchunk{defun npExpress1} +\getchunk{defun npExport} +\getchunk{defun npFirstTok} +\getchunk{defun npFix} +\getchunk{defun npForIn} +\getchunk{defun npFree} +\getchunk{defun npFromdom} +\getchunk{defun npFromdom1} +\getchunk{defun npGives} +\getchunk{defun npId} +\getchunk{defun npImport} +\getchunk{defun npInfGeneric} +\getchunk{defun npInfixOp} +\getchunk{defun npInfixOperator} +\getchunk{defun npInfKey} +\getchunk{defun npInline} +\getchunk{defun npInterval} +\getchunk{defun npItem} +\getchunk{defun npItem1} +\getchunk{defun npIterate} +\getchunk{defun npIterator} +\getchunk{defun npIterators} +\getchunk{defun npLambda} +\getchunk{defun npLeftAssoc} +\getchunk{defun npLet} +\getchunk{defun npLetQualified} +\getchunk{defun npList} +\getchunk{defun npListAndRecover} +\getchunk{defun npListing} +\getchunk{defun npListofFun} +\getchunk{defun npLocal} +\getchunk{defun npLocalDecl} +\getchunk{defun npLocalItem} +\getchunk{defun npLocalItemlist} +\getchunk{defun npLogical} +\getchunk{defun npLoop} +\getchunk{defun npMacro} +\getchunk{defun npMatch} +\getchunk{defun npMdef} +\getchunk{defun npMDEF} +\getchunk{defun npMDEFinition} +\getchunk{defun npMissing} +\getchunk{defun npMissingMate} +\getchunk{defun npMoveTo} +\getchunk{defun npName} +\getchunk{defun npNext} +\getchunk{defun npNull} +\getchunk{defun npParened} +\getchunk{defun npParenthesize} +\getchunk{defun npParenthesized} +\getchunk{defun npParse} +\getchunk{defun npPDefinition} +\getchunk{defun npPileBracketed} +\getchunk{defun npPileDefinitionlist} +\getchunk{defun npPileExit} +\getchunk{defun npPower} +\getchunk{defun npPP} +\getchunk{defun npPPf} +\getchunk{defun npPPff} +\getchunk{defun npPPg} +\getchunk{defun npPrefixColon} +\getchunk{defun npPretend} +\getchunk{defun npPrimary} +\getchunk{defun npPrimary1} +\getchunk{defun npPrimary2} +\getchunk{defun npProcessSynonym} +\getchunk{defun npProduct} +\getchunk{defun npPushId} +\getchunk{defun npRelation} +\getchunk{defun npRemainder} +\getchunk{defun npQualDef} +\getchunk{defun npQualified} +\getchunk{defun npQualifiedDefinition} +\getchunk{defun npQualType} +\getchunk{defun npQualTypelist} +\getchunk{defun npQuiver} +\getchunk{defun npRecoverTrap} +\getchunk{defun npRestore} +\getchunk{defun npRestrict} +\getchunk{defun npReturn} +\getchunk{defun npRightAssoc} +\getchunk{defun npRule} +\getchunk{defun npSCategory} +\getchunk{defun npSDefaultItem} +\getchunk{defun npSegment} +\getchunk{defun npSelector} +\getchunk{defun npSemiBackSet} +\getchunk{defun npSemiListing} +\getchunk{defun npSigDecl} +\getchunk{defun npSigItem} +\getchunk{defun npSigItemlist} +\getchunk{defun npSignature} +\getchunk{defun npSignatureDefinee} +\getchunk{defun npSingleRule} +\getchunk{defun npSLocalItem} +\getchunk{defun npSQualTypelist} +\getchunk{defun npStatement} +\getchunk{defun npSuch} +\getchunk{defun npSuchThat} +\getchunk{defun npSum} +\getchunk{defun npsynonym} +\getchunk{defun npSymbolVariable} +\getchunk{defun npSynthetic} +\getchunk{defun npsystem} +\getchunk{defun npState} +\getchunk{defun npTagged} +\getchunk{defun npTerm} +\getchunk{defun npTrap} +\getchunk{defun npTrapForm} +\getchunk{defun npTuple} +\getchunk{defun npType} +\getchunk{defun npTypedForm} +\getchunk{defun npTypedForm1} +\getchunk{defun npTypeStyle} +\getchunk{defun npTypified} +\getchunk{defun npTyping} +\getchunk{defun npTypeVariable} +\getchunk{defun npTypeVariablelist} +\getchunk{defun npVariable} +\getchunk{defun npVariablelist} +\getchunk{defun npVariableName} +\getchunk{defun npVoid} +\getchunk{defun npWConditional} +\getchunk{defun npWhile} +\getchunk{defun npWith} +\getchunk{defun npZeroOrMore} + +\getchunk{defun oldHistFileName} +\getchunk{defun openOutputLibrary} +\getchunk{defun openserver} +\getchunk{defun operationOpen} +\getchunk{defun optionError} +\getchunk{defun optionUserLevelError} +\getchunk{defun orderBySlotNumber} + +\getchunk{defun parseAndInterpret} +\getchunk{defun parseFromString} +\getchunk{defun parseSystemCmd} +\getchunk{defun pathname} +\getchunk{defun pathnameDirectory} +\getchunk{defun pathnameName} +\getchunk{defun pathnameType} +\getchunk{defun pathnameTypeId} +\getchunk{defun patternVarsOf} +\getchunk{defun patternVarsOf1} +\getchunk{defun pcounters} +\getchunk{defun pfAbSynOp} +\getchunk{defun pfAbSynOp?} +\getchunk{defun pfAdd} +\getchunk{defun pfAnd} +\getchunk{defun pfAnd?} +\getchunk{defun pfApplication} +\getchunk{defun pfApplication?} +\getchunk{defun pfApplication2Sex} +\getchunk{defun pfAssign} +\getchunk{defun pfAssign?} +\getchunk{defun pfAttribute} +\getchunk{defun pfBrace} +\getchunk{defun pfBraceBar} +\getchunk{defun pfBracket} +\getchunk{defun pfBracketBar} +\getchunk{defun pfBreak} +\getchunk{defun pfBreak?} +\getchunk{defun pfCharPosn} +\getchunk{defun pfCheckArg} +\getchunk{defun pfCheckMacroOut} +\getchunk{defun pfCheckId} +\getchunk{defun pfCheckItOut} +\getchunk{defun pfCoerceto} +\getchunk{defun pfCoerceto?} +\getchunk{defun pfCollect} +\getchunk{defun pfCollect?} +\getchunk{defun pfCollect1?} +\getchunk{defun pfCollectArgTran} +\getchunk{defun pfCollectVariable1} +\getchunk{defun pfCollect2Sex} +\getchunk{defun pfCopyWithPos} +\getchunk{defun pfDefinition} +\getchunk{defun pfDefinition?} +\getchunk{defun pfDefinition2Sex} +\getchunk{defun pfDo} +\getchunk{defun pfDo?} +\getchunk{defun pfDocument} +\getchunk{defun pfEnSequence} +\getchunk{defun pfExit} +\getchunk{defun pfExit?} +\getchunk{defun pfExport} +\getchunk{defun pfExpression} +\getchunk{defun pfFileName} +\getchunk{defun pfFix} +\getchunk{defun pfFlattenApp} +\getchunk{defun pfFree} +\getchunk{defun pfFree?} +\getchunk{defun pfForin} +\getchunk{defun pfForin?} +\getchunk{defun pfFromDom} +\getchunk{defun pfFromdom} +\getchunk{defun pfFromdom?} +\getchunk{defun pfGlobalLinePosn} +\getchunk{defun pfHide} +\getchunk{defun pfId} +\getchunk{defun pfId?} +\getchunk{defun pfIdPos} +\getchunk{defun pfIdSymbol} +\getchunk{defun pfIf} +\getchunk{defun pfIf?} +\getchunk{defun pfIfThenOnly} +\getchunk{defun pfImport} +\getchunk{defun pfInline} +\getchunk{defun pfInfApplication} +\getchunk{defun pfIterate} +\getchunk{defun pfIterate?} +\getchunk{defun pfLam} +\getchunk{defun pfLambda} +\getchunk{defun pfLambdaTran} +\getchunk{defun pfLambda?} +\getchunk{defun pfLambda2Sex} +\getchunk{defun pfLeaf} +\getchunk{defun pfLeaf?} +\getchunk{defun pfLeafPosition} +\getchunk{defun pfLeafToken} +\getchunk{defun pfLhsRule2Sex} +\getchunk{defun pfLinePosn} +\getchunk{defun pfListOf} +\getchunk{defun pfLiteralClass} +\getchunk{defun pfLiteralString} +\getchunk{defun pfLiteral2Sex} +\getchunk{defun pfLocal} +\getchunk{defun pfLocal?} +\getchunk{defun pfLoop} +\getchunk{defun pfLoop1} +\getchunk{defun pfLoop?} +\getchunk{defun pfLp} +\getchunk{defun pfMacro} +\getchunk{defun pfMacro?} +\getchunk{defun pfMapParts} +\getchunk{defun pfMLambda} +\getchunk{defun pfMLambda?} +\getchunk{defun pfname} +\getchunk{defun pfNoPosition} +\getchunk{defun pfNoPosition?} +\getchunk{defun pfNot?} +\getchunk{defun pfNothing} +\getchunk{defun pfNothing?} +\getchunk{defun pfNovalue} +\getchunk{defun pfNovalue?} +\getchunk{defun pfOp2Sex} +\getchunk{defun pfOr} +\getchunk{defun pfOr?} +\getchunk{defun pfParen} +\getchunk{defun pfPretend} +\getchunk{defun pfPretend?} +\getchunk{defun pfPushBody} +\getchunk{defun pfPushMacroBody} +\getchunk{defun pfQualType} +\getchunk{defun pfRestrict} +\getchunk{defun pfRestrict?} +\getchunk{defun pfRetractTo} +\getchunk{defun pfReturn} +\getchunk{defun pfReturn?} +\getchunk{defun pfReturnNoName} +\getchunk{defun pfReturnTyped} +\getchunk{defun pfRhsRule2Sex} +\getchunk{defun pfRule} +\getchunk{defun pfRule?} +\getchunk{defun pfRule2Sex} +\getchunk{defun pfSequence} +\getchunk{defun pfSequence?} +\getchunk{defun pfSequenceToList} +\getchunk{defun pfSequence2Sex} +\getchunk{defun pfSequence2Sex0} +\getchunk{defun pfSexpr} +\getchunk{defun pfSexpr,strip} +\getchunk{defun pfSourcePosition} +\getchunk{defun pfSourceStok} +\getchunk{defun pfSpread} +\getchunk{defun pfSuch} +\getchunk{defun pfSuchthat} +\getchunk{defun pfSuchthat?} +\getchunk{defun pfSuchThat2Sex} +\getchunk{defun pfSymb} +\getchunk{defun pfSymbol} +\getchunk{defun pfSymbol?} +\getchunk{defun pfSymbolSymbol} +\getchunk{defun pfTagged} +\getchunk{defun pfTagged?} +\getchunk{defun pfTaggedToTyped} +\getchunk{defun pfTaggedToTyped1} +\getchunk{defun pfTransformArg} +\getchunk{defun pfTuple} +\getchunk{defun pfTupleListOf} +\getchunk{defun pfTweakIf} +\getchunk{defun pfTyped} +\getchunk{defun pfTyped?} +\getchunk{defun pfTyping} +\getchunk{defun pfTuple?} +\getchunk{defun pfUnSequence} +\getchunk{defun pfWDec} +\getchunk{defun pfWDeclare} +\getchunk{defun pfWhere} +\getchunk{defun pfWhere?} +\getchunk{defun pfWhile} +\getchunk{defun pfWhile?} +\getchunk{defun pfWith} +\getchunk{defun pfWrong} +\getchunk{defun pfWrong?} +\getchunk{defun pf0ApplicationArgs} +\getchunk{defun pf0DefinitionLhsItems} +\getchunk{defun pf0FlattenSyntacticTuple} +\getchunk{defun pf0ForinLhs} +\getchunk{defun pf0FreeItems} +\getchunk{defun pf0LambdaArgs} +\getchunk{defun pf0LocalItems} +\getchunk{defun pf0LoopIterators} +\getchunk{defun pf0MLambdaArgs} +\getchunk{defun pf0SequenceArgs} +\getchunk{defun pf0TupleParts} +\getchunk{defun pf0WhereContext} +\getchunk{defun pf2Sex} +\getchunk{defun pf2Sex1} +\getchunk{defun phMacro} +\getchunk{defun phParse} +\getchunk{defun phInterpret} +\getchunk{defun phIntReportMsgs} +\getchunk{defun pileCforest} +\getchunk{defun pileColumn} +\getchunk{defun pileCtree} +\getchunk{defun pileForest} +\getchunk{defun pileForest1} +\getchunk{defun pileForests} +\getchunk{defun pilePlusComment} +\getchunk{defun pilePlusComments} +\getchunk{defun pileTree} +\getchunk{defun poFileName} +\getchunk{defun poGlobalLinePosn} +\getchunk{defun poLinePosn} +\getchunk{defun poPosImmediate?} +\getchunk{defun porigin} +\getchunk{defun posend} +\getchunk{defun posPointers} +\getchunk{defun ppos} +\getchunk{defun pquit} +\getchunk{defun pquitSpad2Cmd} +\getchunk{defun previousInterpreterFrame} +\getchunk{defun printLabelledList} +\getchunk{defun printStatisticsSummary} +\getchunk{defun printStorage} +\getchunk{defun printSynonyms} +\getchunk{defun printTypeAndTime} +\getchunk{defun printTypeAndTimeNormal} +\getchunk{defun printTypeAndTimeSaturn} +\getchunk{defun probeName} +\getchunk{defun processChPosesForOneLine} +\getchunk{defun processInteractive} +\getchunk{defun processInteractive1} +\getchunk{defun processKeyedError} +\getchunk{defun processMsgList} +\getchunk{defun protectedSymbolsWarning} +\getchunk{defun protectedEVAL} +\getchunk{defun processSynonymLine} +\getchunk{defun processSynonymLine,removeKeyFromLine} +\getchunk{defun processSynonyms} +\getchunk{defun protectSymbols} +\getchunk{defun prTraceNames} +\getchunk{defun prTraceNames,fn} +\getchunk{defun pspacers} +\getchunk{defun ptimers} +\getchunk{defun putFTText} +\getchunk{defun punctuation?} +\getchunk{defun putDatabaseStuff} +\getchunk{defun putHist} +\getchunk{defun pvarPredTran} + +\getchunk{defun queryClients} +\getchunk{defun queueUpErrors} +\getchunk{defun quit} +\getchunk{defun quitSpad2Cmd} + +\getchunk{defun rassocSub} +\getchunk{defun rdefinstream} +\getchunk{defun rdefoutstream} +\getchunk{defun read} +\getchunk{defun /read} +\getchunk{defun readHiFi} +\getchunk{defun readSpadProfileIfThere} +\getchunk{defun readSpad2Cmd} +\getchunk{defun recordAndPrint} +\getchunk{defun recordFrame} +\getchunk{defun recordNewValue} +\getchunk{defun recordNewValue0} +\getchunk{defun recordOldValue} +\getchunk{defun recordOldValue0} +\getchunk{defun redundant} +\getchunk{defun remFile} +\getchunk{defun removeOption} +\getchunk{defun removeTracedMapSigs} +\getchunk{defun removeUndoLines} +\getchunk{defun replaceFile} +\getchunk{defun reportOperations} +\getchunk{defun reportOpsFromLisplib} +\getchunk{defun reportOpsFromLisplib0} +\getchunk{defun reportOpsFromLisplib1} +\getchunk{defun reportOpsFromUnitDirectly} +\getchunk{defun reportOpsFromUnitDirectly0} +\getchunk{defun reportOpsFromUnitDirectly1} +\getchunk{defun reportSpadTrace} +\getchunk{defun reportUndo} +\getchunk{defun reportWhatOptions} +\getchunk{defun reroot} +\getchunk{defun resetCounters} +\getchunk{defun resethashtables} +\getchunk{defun resetInCoreHist} +\getchunk{defun resetSpacers} +\getchunk{defun resetTimers} +\getchunk{defun resetWorkspaceVariables} +\getchunk{defun restart} +\getchunk{defun restart0} +\getchunk{defun restoreHistory} +\getchunk{defun /rf} +\getchunk{defun /rq} +\getchunk{defun rread} +\getchunk{defun ruleLhsTran} +\getchunk{defun rulePredicateTran} +\getchunk{defun runspad} +\getchunk{defun rwrite} + +\getchunk{defun safeWritify} +\getchunk{defun sameMsg?} +\getchunk{defun satisfiesRegularExpressions} +\getchunk{defun saveHistory} +\getchunk{defun saveMapSig} +\getchunk{defun savesystem} +\getchunk{defun sayAllCacheCounts} +\getchunk{defun sayBrightly1} +\getchunk{defun sayCacheCount} +\getchunk{defun sayExample} +\getchunk{defun sayKeyedMsg} +\getchunk{defun sayKeyedMsgLocal} +\getchunk{defun sayMSG} +\getchunk{defun sayMSG2File} +\getchunk{defun sayShowWarning} +\getchunk{defun scanCheckRadix} +\getchunk{defun scanComment} +\getchunk{defun scanDictCons} +\getchunk{defun scanError} +\getchunk{defun scanEsc} +\getchunk{defun scanEscape} +\getchunk{defun scanExponent} +\getchunk{defun scanIgnoreLine} +\getchunk{defun scanInsert} +\getchunk{defun scanKeyTr} +\getchunk{defun scanNegComment} +\getchunk{defun scanNumber} +\getchunk{defun ScanOrPairVec} +\getchunk{defun ScanOrPairVec,ScanOrInner} +\getchunk{defun scanPossFloat} +\getchunk{defun scanPunct} +\getchunk{defun scanPunCons} +\getchunk{defun scanS} +\getchunk{defun scanSpace} +\getchunk{defun scanString} +\getchunk{defun scanKeyTableCons} +\getchunk{defun scanToken} +\getchunk{defun scanTransform} +\getchunk{defun scanW} +\getchunk{defun scanWord} +\getchunk{defun search} +\getchunk{defun searchCurrentEnv} +\getchunk{defun searchTailEnv} +\getchunk{defun segmentKeyedMsg} +\getchunk{defun selectOption} +\getchunk{defun selectOptionLC} +\getchunk{defun separatePiles} +\getchunk{defun serverReadLine} +\getchunk{defun set} +\getchunk{defun set1} +\getchunk{defun setdatabase} +\getchunk{defun setExpose} +\getchunk{defun setExposeAdd} +\getchunk{defun setExposeAddConstr} +\getchunk{defun setExposeAddGroup} +\getchunk{defun setExposeDrop} +\getchunk{defun setExposeDropConstr} +\getchunk{defun setExposeDropGroup} +\getchunk{defun setFortDir} +\getchunk{defun setFortPers} +\getchunk{defun setFortTmpDir} +\getchunk{defun setFunctionsCache} +\getchunk{defun setHistoryCore} +\getchunk{defun setInputLibrary} +\getchunk{defun setIOindex} +\getchunk{defun setLinkerArgs} +\getchunk{defun setMsgCatlessAttr} +\getchunk{defun setMsgForcedAttr} +\getchunk{defun setMsgForcedAttrList} +\getchunk{defun setMsgUnforcedAttr} +\getchunk{defun setMsgUnforcedAttrList} +\getchunk{defun setNagHost} +\getchunk{defun setOutputAlgebra} +\getchunk{defun setOutputCharacters} +\getchunk{defun setOutputFormula} +\getchunk{defun setOutputFortran} +\getchunk{defun setOutputLibrary} +\getchunk{defun setOutputHtml} +\getchunk{defun setOutputMathml} +\getchunk{defun setOutputOpenMath} +\getchunk{defun setOutputTex} +\getchunk{defun setStreamsCalculate} +\getchunk{defun shortenForPrinting} +\getchunk{defun show} +\getchunk{defun showdatabase} +\getchunk{defun showInOut} +\getchunk{defun showInput} +\getchunk{defun showSpad2Cmd} +\getchunk{defun shut} +\getchunk{defun size} +\getchunk{defun SkipEnd?} +\getchunk{defun SkipPart?} +\getchunk{defun Skipping?} +\getchunk{defun spad} +\getchunk{defun spadClosure?} +\getchunk{defun SpadInterpretStream} +\getchunk{defun spadReply} +\getchunk{defun spadReply,printName} +\getchunk{defun spadrread} +\getchunk{defun spadrwrite} +\getchunk{defun spadrwrite0} +\getchunk{defun spad-save} +\getchunk{defun spadStartUpMsgs} +\getchunk{defun spadTrace} +\getchunk{defun spadTraceAlias} +\getchunk{defun spadTrace,g} +\getchunk{defun spadTrace,isTraceable} +\getchunk{defun spadUntrace} +\getchunk{defun specialChar} +\getchunk{defun spleI} +\getchunk{defun spleI1} +\getchunk{defun splitIntoOptionBlocks} +\getchunk{defun squeeze} +\getchunk{defun stackTraceOptionError} +\getchunk{defun startsComment?} +\getchunk{defun startsNegComment?} +\getchunk{defun statisticsInitialization} +\getchunk{defun streamChop} +\getchunk{defun stringMatches?} +\getchunk{defun StringToDir} +\getchunk{defun strpos} +\getchunk{defun strposl} +\getchunk{defun stupidIsSpadFunction} +\getchunk{defun subMatch} +\getchunk{defun substringMatch} +\getchunk{defun subTypes} +\getchunk{defun summary} +\getchunk{defun syGeneralErrorHere} +\getchunk{defun syIgnoredFromTo} +\getchunk{defun synonym} +\getchunk{defun synonymsForUserLevel} +\getchunk{defun synonymSpad2Cmd} +\getchunk{defun sySpecificErrorAtToken} +\getchunk{defun sySpecificErrorHere} +\getchunk{defun systemCommand} + +\getchunk{defun ?t} +\getchunk{defun tabbing} +\getchunk{defun terminateSystemCommand} +\getchunk{defun tersyscommand} +\getchunk{defun thisPosIsEqual} +\getchunk{defun thisPosIsLess} +\getchunk{defun toFile?} +\getchunk{defun tokConstruct} +\getchunk{defun tokPosn} +\getchunk{defun tokTran} +\getchunk{defun tokType} +\getchunk{defun toScreen?} +\getchunk{defun trace} +\getchunk{defun trace1} +\getchunk{defun traceDomainConstructor} +\getchunk{defun traceDomainLocalOps} +\getchunk{defun tracelet} +\getchunk{defun traceOptionError} +\getchunk{defun /tracereply} +\getchunk{defun traceReply} +\getchunk{defun traceSpad2Cmd} +\getchunk{defun translateTrueFalse2YesNo} +\getchunk{defun translateYesNo2TrueFalse} +\getchunk{defun transOnlyOption} +\getchunk{defun transTraceItem} + +\getchunk{defun unAbbreviateKeyword} +\getchunk{defun undo} +\getchunk{defun undoChanges} +\getchunk{defun undoCount} +\getchunk{defun undoFromFile} +\getchunk{defun undoInCore} +\getchunk{defun undoLocalModemapHack} +\getchunk{defun undoSingleStep} +\getchunk{defun undoSteps} +\getchunk{defun unescapeStringsInForm} +\getchunk{defun unsqueeze} +\getchunk{defun untrace} +\getchunk{defun untraceDomainConstructor} +\getchunk{defun untraceDomainConstructor,keepTraced?} +\getchunk{defun untraceDomainLocalOps} +\getchunk{defun untraceMapSubNames} +\getchunk{defun unwritable?} +\getchunk{defun updateCurrentInterpreterFrame} +\getchunk{defun updateFromCurrentInterpreterFrame} +\getchunk{defun updateHist} +\getchunk{defun updateInCoreHist} +\getchunk{defun updateSourceFiles} +\getchunk{defun userLevelErrorMessage} + +\getchunk{defun validateOutputDirectory} + +\getchunk{defun what} +\getchunk{defun whatCommands} +\getchunk{defun whatConstructors} +\getchunk{defun whatSpad2Cmd} +\getchunk{defun whatSpad2Cmd,fixpat} +\getchunk{defun whichCat} +\getchunk{defun with} +\getchunk{defun workfiles} +\getchunk{defun workfilesSpad2Cmd} +\getchunk{defun wrap} +\getchunk{defun write-browsedb} +\getchunk{defun write-categorydb} +\getchunk{defun write-compress} +\getchunk{defun writeHiFi} +\getchunk{defun writeHistModesAndValues} +\getchunk{defun writeInputLines} +\getchunk{defun write-interpdb} +\getchunk{defun write-operationdb} +\getchunk{defun write-warmdata} +\getchunk{defun writify} +\getchunk{defun writifyComplain} +\getchunk{defun writify,writifyInner} + +\getchunk{defun xlCannotRead} +\getchunk{defun xlCmdBug} +\getchunk{defun xlConActive} +\getchunk{defun xlConsole} +\getchunk{defun xlConStill} +\getchunk{defun xlFileCycle} +\getchunk{defun xlIfBug} +\getchunk{defun xlIfSyntax} +\getchunk{defun xlMsg} +\getchunk{defun xlNoSuchFile} +\getchunk{defun xlOK} +\getchunk{defun xlOK1} +\getchunk{defun xlPrematureEOF} +\getchunk{defun xlPrematureFin} +\getchunk{defun xlSay} +\getchunk{defun xlSkip} +\getchunk{defun xlSkippingFin} + +\getchunk{defun yesanswer} + +\getchunk{defun zsystemdevelopment} +\getchunk{defun zsystemdevelopment1} +\getchunk{defun zsystemDevelopmentSpad2Cmd} + +\getchunk{postvars} + +\end{chunk} \chapter{The Global Variables} \section{Star Global Variables} \begin{tabular}{lll} diff --git a/changelog b/changelog index d9d5401..b07242a 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,6 @@ +20110108 tpd src/axiom-website/patches.html 20110108.02.tpd.patch +20110108 tpd src/interp/Makefile convert bookvol5 to lisp tangle +20110108 tpd books/bookvol5 convert to lisp tangle 20110108 tpd src/axiom-website/patches.html 20110108.01.tpd.patch 20110108 tpd src/interp/vmlisp.lisp treeshake compiler 20110108 tpd src/interp/parsing.lisp treeshake compiler diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html index 1657987..e832ea7 100644 --- a/src/axiom-website/patches.html +++ b/src/axiom-website/patches.html @@ -3333,5 +3333,7 @@ books/bookvol9 treeshake compiler
books/bookvol9 treeshake compiler
20110108.01.tpd.patch books/bookvol9 treeshake compiler
+20110108.02.tpd.patch +books/bookvol5 convert to lisp tangle
diff --git a/src/interp/Makefile.pamphlet b/src/interp/Makefile.pamphlet index 566dad7..fbdf7b6 100644 --- a/src/interp/Makefile.pamphlet +++ b/src/interp/Makefile.pamphlet @@ -2104,7 +2104,8 @@ ${OUT}/bookvol5.${LISP}: ${MID}/bookvol5.${LISP} ${MID}/bookvol5.${LISP}: ${IN}/bookvol5.pamphlet @ echo 298 making ${MID}/bookvol5.${LISP} from ${IN}/bookvol5.pamphlet @ (cd ${MID} ; \ - ${TANGLE} -RInterpreter ${IN}/bookvol5.pamphlet >bookvol5.${LISP} ) + echo '(tangle "${IN}/bookvol5.pamphlet" "Interpreter" "bookvol5.${LISP}")' \ + | ${OBJ}/${SYS}/bin/lisp ) @ \subsection{bookvol9.lsp}