diff --git a/books/bookvol5.pamphlet b/books/bookvol5.pamphlet index e424246..968de7c 100644 --- a/books/bookvol5.pamphlet +++ b/books/bookvol5.pamphlet @@ -767,6 +767,19 @@ the Bill Burge's parser. (|intloop|))) @ + +\defdollar{intTopLevel} +<>= +(defvar |$intTopLevel| '|top_level|) + +@ + +\defdollar{intRestart} +<>= +(defvar |$intRestart| '|restart|) + +@ + \defun{intloop}{intloop} Note that the SpadInterpretStream function uses a list of three strings as an argument. The values in the list seem to have @@ -958,6 +971,17 @@ will end up as a recursive call to ourselves. ) @ +\defdollar{intCoerceFailure} +<>= +(defvar |$intCoerceFailure| '|coerceFailure|) + +@ + +\defdollar{intSpadReader} +<>= +(defvar |$intSpadReader| 'SPAD_READER) + +@ \defun{InterpExecuteSpadSystemCommand}{InterpExecuteSpadSystemCommand} \catches{InterpExecuteSpadSystemCommand}{intCoerceFailure} \catches{InterpExecuteSpadSystemCommand}{intSpadReader} @@ -2238,19 +2262,20 @@ sameUnionBranch(uArg, m) == \calls{intloopSpadProcess}{CatchAsCan} \calls{intloopSpadProcess}{Catch} \calls{intloopSpadProcess}{intloopSpadProcess,interp} -\calls{intloopSpadProcess}{intSetNeedToSignalSessionManager} \usesdollar{intloopSpadProcess}{currentCarrier} \usesdollar{intloopSpadProcess}{ncMsgList} \usesdollar{intloopSpadProcess}{intCoerceFailure} \usesdollar{intloopSpadProcess}{intSpadReader} \usesdollar{intloopSpadProcess}{prevCarrier} \usesdollar{intloopSpadProcess}{stepNo} +\usesdollar{intloopSpadProcess}{NeedToSignalSessionManager} \uses{intloopSpadProcess}{flung} <>= (defun |intloopSpadProcess| (stepNo lines ptree interactive?) (let (|$stepNo| result cc) (declare (special |$stepNo| |$prevCarrier| |$intSpadReader| |flung| - |$intCoerceFailure| |$ncMsgList| |$currentCarrier|)) + |$intCoerceFailure| |$ncMsgList| |$currentCarrier| + |$NeedToSignalSessionManager|)) (setq |$stepNo| stepNo) (setq |$currentCarrier| (setq cc (list '|carrier|))) (|ncPutQ| cc '|stepNumber| stepNo) @@ -2263,7 +2288,7 @@ sameUnionBranch(uArg, m) == (catch |$intCoerceFailure| (catch |$intSpadReader| (|intloopSpadProcess,interp| cc ptree interactive?)))))) - (|intSetNeedToSignalSessionManager|) + (setq |$NeedToSignalSessionManager| t) (setq |$prevCarrier| |$currentCarrier|) (cond ((eq result '|ncEnd|) stepNo) @@ -2306,6 +2331,32 @@ phParse: carrier[tokens,...] -> carrier[ptree, tokens,...] @ +\defun{intSayKeyedMsg}{intSayKeyedMsg} +\calls{intSayKeyedMsg}{sayKeyedMsg} +\calls{intSayKeyedMsg}{packageTran} +<>= +(defun |intSayKeyedMsg| (key args) + (|sayKeyedMsg| (|packageTran| key) (|packageTran| args))) + +@ + +\defun{packageTran}{packageTran} +\calls{packageTran}{packageTran} +<>= +(defun |packageTran| (sex) + (cond + ((symbolp sex) + (cond + ((eq *package* (symbol-package sex)) sex) + (t (intern (string sex))))) + ((consp sex) + (rplaca sex (|packageTran| (car sex))) + (rplacd sex (|packageTran| (cdr sex))) + sex) + (t sex))) + +@ + \defun{phMacro}{phMacro} \begin{verbatim} carrier[ptree,...] -> carrier[ptree, ptreePremacro,...] @@ -2374,6 +2425,25 @@ carrier[lines,messages,..]-> carrier[lines,messages,..] @ +\defun{intInterpretPform}{intInterpretPform} +\calls{intInterpretPform}{processInteractive} +\calls{intInterpretPform}{zeroOneTran} +\calls{intInterpretPform}{packageTran} +\calls{intInterpretPform}{pf2Sex} +<>= +(defun |intInterpretPform| (pf) + (|processInteractive| (|zeroOneTran| (|packageTran| (|pf2Sex| pf))) pf)) + +@ + +\defun{zeroOneTran}{zeroOneTran} +\calls{zeroOneTran}{nsubst} +<>= +(defun |zeroOneTran| (sex) + (nsubst '|$EmptyMode| '? sex)) + +@ + \defun{phBegin}{phBegin} \calls{phBegin}{intSayKeyedMsg} \usesdollar{phBegin}{ncmPhase} @@ -31877,6 +31947,7 @@ See Steele Common Lisp 1990 pp305-307 <> <> <> +<> <> <> <> @@ -31889,6 +31960,7 @@ See Steele Common Lisp 1990 pp305-307 <> <> <> +<> <> <> <> @@ -32035,6 +32107,7 @@ See Steele Common Lisp 1990 pp305-307 <> <> +<> <> <> <> @@ -32405,6 +32478,7 @@ See Steele Common Lisp 1990 pp305-307 <> +<> <> <> <> diff --git a/changelog b/changelog index 288617e..557de00 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,10 @@ +20100202 tpd src/axiom-website/patches.html 20100202.01.tpd.patch +20100202 tpd src/interp/varini.lisp pick up functions from intint +20100202 tpd src/interp/pf2sex.lisp pick up functions from intint +20100202 tpd src/interp/nci.lisp pick up functions from intint +20100202 tpd src/interp/intint.lisp removed +20100202 tpd src/interp/Makefile remove intint.lisp +20100202 tpd books/bookvol5 merge and remove intint.lisp 20100127 tpd src/axiom-website/patches.html 20100127.01.tpd.patch 20100127 tpd src/interp/htcheck.lisp add READLINE from compat.lisp 20100127 tpd src/interp/compat.lisp removed diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html index 73b4213..c7c1e84 100644 --- a/src/axiom-website/patches.html +++ b/src/axiom-website/patches.html @@ -2435,5 +2435,7 @@ src/axiom-website/download.html post fedora6 binary
books/bookvol8 redefine R1 in view3D for ARM processor
20100127.01.tpd.patch books/bookvol5 merge and remove compat.lisp
+20100202.01.tpd.patch +books/bookvol5 merge and remove intint.lisp
diff --git a/src/interp/Makefile.pamphlet b/src/interp/Makefile.pamphlet index f322274..aefa4e7 100644 --- a/src/interp/Makefile.pamphlet +++ b/src/interp/Makefile.pamphlet @@ -202,7 +202,6 @@ file contains last-minute changes to various functions and constants. <>= INOBJS= ${OUT}/varini.${O} \ - ${OUT}/intint.${O} \ ${OUT}/interop.${O} ${OUT}/patches.${O} @ @@ -3323,29 +3322,6 @@ ${MID}/varini.lisp: ${IN}/varini.lisp.pamphlet @ -\subsection{intint.lisp} -this is the code that links the new parser to the interpreter -<>= -${OUT}/intint.${O}: ${MID}/intint.lisp - @ echo 555 making ${OUT}/intint.${O} from ${MID}/intint.lisp - @ if [ -z "${NOISE}" ] ; then \ - echo '(progn (compile-file "${MID}/intint.lisp"' \ - ':output-file "${OUT}/intint.${O}") (${BYE}))' | ${DEPSYS} ; \ - else \ - echo '(progn (compile-file "${MID}/intint.lisp"' \ - ':output-file "${OUT}/intint.${O}") (${BYE}))' | ${DEPSYS} \ - >${TMP}/trace ; \ - fi - -@ -<>= -${MID}/intint.lisp: ${IN}/intint.lisp.pamphlet - @ echo 556 making ${MID}/intint.lisp from ${IN}/intint.lisp.pamphlet - @(cd ${MID} ; \ - ${TANGLE} ${IN}/intint.lisp.pamphlet >intint.lisp ) - -@ - \subsection{nci.lisp} <>= ${OUT}/nci.${O}: ${MID}/nci.lisp @@ -3849,9 +3825,6 @@ clean: <> <> -<> -<> - <> <> diff --git a/src/interp/intint.lisp.pamphlet b/src/interp/intint.lisp.pamphlet deleted file mode 100644 index 83dc439..0000000 --- a/src/interp/intint.lisp.pamphlet +++ /dev/null @@ -1,109 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/interp intint.lisp} -\author{Timothy Daly} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{License} -<>= -;; Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. -;; All rights reserved. -;; -;; Redistribution and use in source and binary forms, with or without -;; modification, are permitted provided that the following conditions are -;; met: -;; -;; - Redistributions of source code must retain the above copyright -;; notice, this list of conditions and the following disclaimer. -;; -;; - Redistributions in binary form must reproduce the above copyright -;; notice, this list of conditions and the following disclaimer in -;; the documentation and/or other materials provided with the -;; distribution. -;; -;; - Neither the name of The Numerical ALgorithms Group Ltd. nor the -;; names of its contributors may be used to endorse or promote products -;; derived from this software without specific prior written permission. -;; -;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -;; IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -;; TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -;; PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER -;; OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -;; EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -;; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -;; PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -;; LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -@ -<<*>>= -<> - -(in-package "BOOT") - -(eval-when (eval load) - (setq |$useNewParser| T)) - -(defun |rePackageTran| (sex package) - (let (*package*) - (declare (special *package*)) - (setq *package* (find-package (string package))) - (|packageTran| sex))) - -(defun |packageTran| (sex) - (cond - ((symbolp sex) - (cond - ((eq *package* (symbol-package sex)) sex) - (t (intern (string sex))))) - ((consp sex) - (rplaca sex (|packageTran| (car sex))) - (rplacd sex (|packageTran| (cdr sex))) - sex) - (t sex))) - -(defun |zeroOneTran| (sex) - (nsubst '|$EmptyMode| '? sex)) - -(defun |intSayKeyedMsg| (key args) - (|sayKeyedMsg| (|packageTran| key) (|packageTran| args))) - -(defun |intInterpretPform| (pf) - (|processInteractive| (|zeroOneTran| (|packageTran| (|pf2Sex| pf))) pf)) - -(defvar |$intCoerceFailure| '|coerceFailure|) -(defvar |$intTopLevel| '|top_level|) -(defvar |$intSpadReader| 'SPAD_READER) -(defvar |$intRestart| '|restart|) - -(defun |SpadInterpretFile| (fn) - (|SpadInterpretStream| 1 fn nil) ) - -(defun |intNewFloat| () - (list '|Float|)) - -(defun |intSetNeedToSignalSessionManager| () - (declare (special |$NeedToSignalSessionManager|)) - (setq |$NeedToSignalSessionManager| T)) - -(defun |intSetQuiet| () - (declare (special |$QuietCommand|)) - (setq |$QuietCommand| T)) - -(defun |intUnsetQuiet| () - (declare (special |$QuietCommand|)) - (setq |$QuietCommand| NIL)) - -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/interp/nci.lisp.pamphlet b/src/interp/nci.lisp.pamphlet index 4522854..29fd34a 100644 --- a/src/interp/nci.lisp.pamphlet +++ b/src/interp/nci.lisp.pamphlet @@ -31,7 +31,7 @@ (defun |ncINTERPFILE| (file echo) (let ((|$EchoLines| echo) (|$ReadingFile| t)) (declare (special |$EchoLines| |$ReadingFile|)) - (|SpadInterpretFile| file)) ) + (|SpadInterpretStream| 1 file nil))) (defun |ncGetFunction| (op dom sig) (|applyInPackage| #'|getNCfunction| @@ -40,6 +40,12 @@ (|rePackageTran| sig "boot")) "boot")) +(defun |rePackageTran| (sex package) + (let (*package*) + (declare (special *package*)) + (setq *package* (find-package (string package))) + (|packageTran| sex))) + (defun |ncSetCurrentLine| (c) (|setCurrentLine| c)) diff --git a/src/interp/pf2sex.lisp.pamphlet b/src/interp/pf2sex.lisp.pamphlet index fdaa6b2..0ac0f49 100644 --- a/src/interp/pf2sex.lisp.pamphlet +++ b/src/interp/pf2sex.lisp.pamphlet @@ -75,16 +75,15 @@ Value = NIL ; $insideSEQ: local := false ; pf2Sex1 pf -(DEFUN |pf2Sex| (|pf|) - (PROG (|$insideSEQ| |$insideApplication| |$insideRule|) - (DECLARE (SPECIAL |$insideSEQ| |$insideApplication| |$insideRule|)) - (RETURN - (PROGN - (|intUnsetQuiet|) - (SETQ |$insideRule| NIL) - (SETQ |$insideApplication| NIL) - (SETQ |$insideSEQ| NIL) - (|pf2Sex1| |pf|))))) +(defun |pf2Sex| (|pf|) + (let (|$insideSEQ| |$insideApplication| |$insideRule|) + (declare (special |$insideSEQ| |$insideApplication| |$insideRule| + |$QuietCommand|)) + (setq |$QuietCommand| nil) + (setq |$insideRule| nil) + (setq |$insideApplication| nil) + (setq |$insideSEQ| nil) + (|pf2Sex1| |pf|))) ;pf2Sex1 pf == ; pfNothing? pf => @@ -200,7 +199,7 @@ Value = NIL (DEFUN |pf2Sex1| (|pf|) (PROG (|args| |idList| |type| |op| |tagPart| |tag| |s|) - (DECLARE (SPECIAL |$insideSEQ| |$insideRule|)) + (DECLARE (SPECIAL |$insideSEQ| |$insideRule| |$QuietCommand|)) (RETURN (COND ((|pfNothing?| |pf|) '|noBranch|) @@ -379,7 +378,7 @@ Value = NIL ((|pfNot?| |pf|) (LIST '|not| (|pf2Sex1| (|pfNotArg| |pf|)))) ((|pfNovalue?| |pf|) (PROGN - (|intSetQuiet|) + (setq |$QuietCommand| t) (LIST 'SEQ (|pf2Sex1| (|pfNovalueExpr| |pf|))))) ((|pfRule?| |pf|) (|pfRule2Sex| |pf|)) ((|pfBreak?| |pf|) (LIST '|break| (|pfBreakFrom| |pf|))) @@ -1074,7 +1073,7 @@ Value = NIL (PROGN (SETQ |frac| (CADR |bfForm|)) (SETQ |exp| (CDDR |bfForm|)) - (LIST (LIST '|$elt| (|intNewFloat|) '|float|) |frac| + (LIST (LIST '|$elt| (list '|Float|) '|float|) |frac| |exp| 10))) ('T |bfForm|)))))) diff --git a/src/interp/varini.lisp.pamphlet b/src/interp/varini.lisp.pamphlet index a3d691d..2ea8944 100644 --- a/src/interp/varini.lisp.pamphlet +++ b/src/interp/varini.lisp.pamphlet @@ -16,6 +16,7 @@ ;-- Variables to control whether old software calls the new compiler. (EVAL-WHEN (EVAL LOAD) +(setq |$useNewParser| t) (defvar |$ncConverse| NIL) (defvar |$newcompMode| NIL ")comp means new compiler.")