diff --git a/changelog b/changelog index e61b3f5..bf92696 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,7 @@ +20090824 tpd src/axiom-website/patches.html 20090824.08.tpd.patch +20090824 tpd src/interp/Makefile move packtran.boot to packtran.lisp +20090824 tpd src/interp/packtran.lisp added, rewritten from packtran.boot +20090824 tpd src/interp/packtran.boot removed, rewritten to packtran.lisp 20090824 tpd src/axiom-website/patches.html 20090824.07.tpd.patch 20090824 tpd src/interp/Makefile move osyscmd.boot to osyscmd.lisp 20090824 tpd src/interp/osyscmd.lisp added, rewritten from osyscmd.boot diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html index 0b462c5..2f65905 100644 --- a/src/axiom-website/patches.html +++ b/src/axiom-website/patches.html @@ -1878,5 +1878,7 @@ nrungo.lisp rewrite from boot to lisp
nrunopt.lisp rewrite from boot to lisp
20090824.07.tpd.patch osyscmd.lisp rewrite from boot to lisp
+20090824.08.tpd.patch +packtran.lisp rewrite from boot to lisp
diff --git a/src/interp/Makefile.pamphlet b/src/interp/Makefile.pamphlet index eb27d9f..0b59f14 100644 --- a/src/interp/Makefile.pamphlet +++ b/src/interp/Makefile.pamphlet @@ -5243,46 +5243,27 @@ ${MID}/osyscmd.lisp: ${IN}/osyscmd.lisp.pamphlet @ -\subsection{packtran.boot} +\subsection{packtran.lisp} <>= -${OUT}/packtran.${O}: ${MID}/packtran.clisp - @ echo 570 making ${OUT}/packtran.${O} from ${MID}/packtran.clisp - @ if [ -z "${NOISE}" ] ; then \ - echo '(progn (compile-file "${MID}/packtran.clisp"' \ +${OUT}/packtran.${O}: ${MID}/packtran.lisp + @ echo 136 making ${OUT}/packtran.${O} from ${MID}/packtran.lisp + @ ( cd ${MID} ; \ + if [ -z "${NOISE}" ] ; then \ + echo '(progn (compile-file "${MID}/packtran.lisp"' \ ':output-file "${OUT}/packtran.${O}") (${BYE}))' | ${DEPSYS} ; \ else \ - echo '(progn (compile-file "${MID}/packtran.clisp"' \ + echo '(progn (compile-file "${MID}/packtran.lisp"' \ ':output-file "${OUT}/packtran.${O}") (${BYE}))' | ${DEPSYS} \ >${TMP}/trace ; \ - fi + fi ) @ -<>= -${MID}/packtran.clisp: ${IN}/packtran.boot.pamphlet - @ echo 571 making ${MID}/packtran.clisp \ - from ${IN}/packtran.boot.pamphlet +<>= +${MID}/packtran.lisp: ${IN}/packtran.lisp.pamphlet + @ echo 137 making ${MID}/packtran.lisp from \ + ${IN}/packtran.lisp.pamphlet @ (cd ${MID} ; \ - ${TANGLE} ${IN}/packtran.boot.pamphlet >packtran.boot ; \ - if [ -z "${NOISE}" ] ; then \ - echo '(progn (boottran::boottocl "${MID}/packtran.boot") (${BYE}))' \ - | ${BOOTSYS} ; \ - else \ - echo '(progn (boottran::boottocl "${MID}/packtran.boot") (${BYE}))' \ - | ${BOOTSYS} >${TMP}/trace ; \ - fi ; \ - rm packtran.boot ) - -@ -<>= -${DOC}/packtran.boot.dvi: ${IN}/packtran.boot.pamphlet - @echo 572 making ${DOC}/packtran.boot.dvi \ - from ${IN}/packtran.boot.pamphlet - @(cd ${DOC} ; \ - cp ${IN}/packtran.boot.pamphlet ${DOC} ; \ - ${DOCUMENT} ${NOISE} packtran.boot ; \ - rm -f ${DOC}/packtran.boot.pamphlet ; \ - rm -f ${DOC}/packtran.boot.tex ; \ - rm -f ${DOC}/packtran.boot ) + ${TANGLE} ${IN}/packtran.lisp.pamphlet >packtran.lisp ) @ @@ -6221,8 +6202,7 @@ clean: <> <> -<> -<> +<> <> <> diff --git a/src/interp/packtran.boot.pamphlet b/src/interp/packtran.boot.pamphlet deleted file mode 100644 index c68f98d..0000000 --- a/src/interp/packtran.boot.pamphlet +++ /dev/null @@ -1,82 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/interp packtran.boot} -\author{The Axiom Team} -\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. - -@ -<<*>>= -<> - -)package 'BOOT - --- The $useNewParser flag controls which parser will be used in the interpreter --- If nil then the old parser is used, otherwise Bill Burge's parser is used -$useNewParser := true - -rePackageTran(sex, package) == - _*PACKAGE_* : fluid := FIND_-PACKAGE STRING package - packageTran sex - -packageTran sex == --- destructively translate all the symbols in the given s-expression to the --- current package - SYMBOLP sex => - EQ(_*PACKAGE_*, SYMBOL_-PACKAGE sex) => sex - INTERN STRING sex - CONSP sex => - RPLACA(sex, packageTran CAR sex) - RPLACD(sex, packageTran CDR sex) - sex - sex - -zeroOneTran sex == --- destructively translate the symbols |0| and |1| to their --- integer counterparts - NSUBST("$EmptyMode", "?", sex) - sex - -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/interp/packtran.lisp.pamphlet b/src/interp/packtran.lisp.pamphlet new file mode 100644 index 0000000..81e976b --- /dev/null +++ b/src/interp/packtran.lisp.pamphlet @@ -0,0 +1,74 @@ +\documentclass{article} +\usepackage{axiom} +\begin{document} +\title{\$SPAD/src/interp packtran.lisp} +\author{The Axiom Team} +\maketitle +\begin{abstract} +\end{abstract} +\eject +\tableofcontents +\eject +<<*>>= +(IN-PACKAGE (QUOTE BOOT)) + +;--The $useNewParser flag controls which parser will be used in the interpreter +;--If nil then the old parser is used, otherwise Bill Burge's parser is used +;$useNewParser := true + +(EVAL-WHEN (EVAL LOAD) (SETQ |$useNewParser| T)) + +;rePackageTran(sex, package) == +; _*PACKAGE_* : fluid := FIND_-PACKAGE STRING package +; packageTran sex + +(DEFUN |rePackageTran| (|sex| |package|) + (PROG (*PACKAGE*) + (DECLARE (SPECIAL *PACKAGE*)) + (RETURN + (PROGN + (SETQ *PACKAGE* (FIND-PACKAGE (STRING |package|))) + (|packageTran| |sex|))))) + +;packageTran sex == +;-- destructively translate all the symbols in the given s-expression to the +;-- current package +; SYMBOLP sex => +; EQ(_*PACKAGE_*, SYMBOL_-PACKAGE sex) => sex +; INTERN STRING sex +; CONSP sex => +; RPLACA(sex, packageTran CAR sex) +; RPLACD(sex, packageTran CDR sex) +; sex +; sex + +(DEFUN |packageTran| (|sex|) + (PROG () + (RETURN + (COND + ((SYMBOLP |sex|) + (COND + ((EQ *PACKAGE* (SYMBOL-PACKAGE |sex|)) |sex|) + ('T (INTERN (STRING |sex|))))) + ((CONSP |sex|) + (PROGN + (RPLACA |sex| (|packageTran| (CAR |sex|))) + (RPLACD |sex| (|packageTran| (CDR |sex|))) + |sex|)) + ('T |sex|))))) + +;zeroOneTran sex == +;-- destructively translate the symbols |0| and |1| to their +;-- integer counterparts +; NSUBST("$EmptyMode", "?", sex) +; sex + +(DEFUN |zeroOneTran| (|sex|) + (PROG () (RETURN (PROGN (NSUBST '|$EmptyMode| '? |sex|) |sex|)))) + +@ +\eject +\begin{thebibliography}{99} +\bibitem{1} nothing +\end{thebibliography} +\end{document}