diff --git a/books/bookvol5.pamphlet b/books/bookvol5.pamphlet index c88c09d..be5fff2 100644 --- a/books/bookvol5.pamphlet +++ b/books/bookvol5.pamphlet @@ -3698,6 +3698,48 @@ Only enpiles forests with $>=2$ trees @ +\chapter{Dequeue Functions} +The dqUnit makes a unit dq i.e. a dq with one item, from the item +\defun{dqUnit}{dqUnit} +<>= +(defun |dqUnit| (s) + (let (a) + (setq a (list s)) + (cons a a))) + +@ + +\defun{dqConcat}{dqConcat} +The dqConcat function concatenates a list of dq's, destroying all but the last +<>= +(defun |dqConcat| (ld) + (cond + ((null ld) nil) + ((null (cdr ld)) (car ld)) + (t (|dqAppend| (car ld) (|dqConcat| (cdr ld)))))) + +@ + +\defun{dqAppend}{dqAppend} +The dqAppend function appends 2 dq's, destroying the first +<>= +(defun |dqAppend| (x y) + (cond + ((null x) y) + ((null y) x) + (t + (rplacd (cdr x) (car y)) + (rplacd x (cdr y)) x))) + +@ + +\defun{dqToList}{dqToList} +<>= +(defun |dqToList| (s) + (when s (car s))) + +@ + \chapter{The Interpreter Syntax} \section{syntax assignment} \label{assignment} @@ -19675,6 +19717,10 @@ maxindex <> <> <> +<> +<> +<> +<> <> <> diff --git a/changelog b/changelog index 3c9efe7..7f6852b 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,6 @@ +20091104 tpd src/axiom-website/patches.html 20091104.02.tpd.patch +20091104 tpd books/bookvol5 merge dq.lisp +20091104 tpd src/interp/dq.lisp removed, merge with bookvol5 20091104 tpd src/axiom-website/patches.html 20091104.01.tpd.patch 20091104 tpd books/bookvol5 merge pile.lisp 20091104 tpd src/interp/pile.lisp removed, merge with bookvol5 diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html index 5a4d0f1..cdc440c 100644 --- a/src/axiom-website/patches.html +++ b/src/axiom-website/patches.html @@ -2223,5 +2223,7 @@ books/bookvol10.4 Examples, Help, Regress RationalFunctionSum
books/bookvol10.3 fix OrderedFreeMonoid.regress
20091104.01.tpd.patch books/bookvol5 merge, remove pile.lisp
+20091104.02.tpd.patch +books/bookvol5 merge, remove dq.lisp
diff --git a/src/interp/Makefile.pamphlet b/src/interp/Makefile.pamphlet index 1d624a7..12ec90e 100644 --- a/src/interp/Makefile.pamphlet +++ b/src/interp/Makefile.pamphlet @@ -148,7 +148,6 @@ OBJS= ${OUT}/vmlisp.${O} \ ${OUT}/compat.${O} ${OUT}/compress.${O} \ ${OUT}/cparse.${O} ${OUT}/cstream.${O} \ ${OUT}/database.${O} \ - ${OUT}/dq.${O} \ ${OUT}/fname.${O} ${OUT}/format.${O} \ ${OUT}/g-boot.${O} ${OUT}/g-cndata.${O} \ ${OUT}/g-error.${O} ${OUT}/g-opt.${O} \ @@ -3448,29 +3447,6 @@ ${MID}/ptrop.lisp: ${IN}/ptrop.lisp.pamphlet @ -\subsection{dq.lisp} -<>= -${OUT}/dq.${O}: ${MID}/dq.lisp - @ echo 531 making ${OUT}/dq.${O} from ${MID}/dq.lisp - @ ( cd ${MID} ; \ - if [ -z "${NOISE}" ] ; then \ - echo '(progn (compile-file "${MID}/dq.lisp"' \ - ':output-file "${OUT}/dq.${O}") (${BYE}))' | ${DEPSYS} ; \ - else \ - echo '(progn (compile-file "${MID}/dq.lisp"' \ - ':output-file "${OUT}/dq.${O}") (${BYE}))' | ${DEPSYS} \ - >${TMP}/trace ; \ - fi ) - -@ -<>= -${MID}/dq.lisp: ${IN}/dq.lisp.pamphlet - @ echo 532 making ${MID}/dq.lisp from ${IN}/dq.lisp.pamphlet - @ (cd ${MID} ; \ - ${TANGLE} ${IN}/dq.lisp.pamphlet >dq.lisp ) - -@ - \subsection{cstream.lisp} <>= ${OUT}/cstream.${O}: ${MID}/cstream.lisp @@ -4174,9 +4150,6 @@ clean: <> <> -<> -<> - <> <> diff --git a/src/interp/dq.lisp.pamphlet b/src/interp/dq.lisp.pamphlet deleted file mode 100644 index 40202fc..0000000 --- a/src/interp/dq.lisp.pamphlet +++ /dev/null @@ -1,107 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/interp dq.lisp} -\author{The Axiom Team} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -<<*>>= - -(IN-PACKAGE "BOOT") - -;-- Dequeue functions - -;dqUnit s==(a:=[s];CONS(a,a)) - -;-- dqUnit makes a unit dq i.e. a dq with one item, from the item - -(DEFUN |dqUnit| (|s|) - (PROG (|a|) - (RETURN - (PROGN - (SETQ |a| (LIST |s|)) - (CONS |a| |a|))))) - -;dqUnitCopy s== dqUnit(CAAR s) - -;-- dqUnitCopy copies a unit dq - -(DEFUN |dqUnitCopy| (|s|) - (PROG NIL - (RETURN (|dqUnit| (CAAR |s|))))) - -;-- dqAppend appends 2 dq's, destroying the first - -;dqAppend(x,y)== -; if null x -; then y -; else if null y -; then x -; else -; RPLACD (CDR x,CAR y) -; RPLACD (x, CDR y) -; x - -(DEFUN |dqAppend| (|x| |y|) - (PROG NIL - (RETURN - (COND - ((NULL |x|) |y|) - ((NULL |y|) |x|) - ((QUOTE T) (RPLACD (CDR |x|) (CAR |y|)) (RPLACD |x| (CDR |y|)) |x|))))) - -;dqConcat ld== -; if null ld -; then nil -; else if null rest ld -; then first ld -; else dqAppend(first ld,dqConcat rest ld) - -;-- dqConcat concatenates a list of dq's, destroying all but the last - -(DEFUN |dqConcat| (|ld|) - (PROG NIL - (RETURN - (COND - ((NULL |ld|) NIL) - ((NULL (CDR |ld|)) (CAR |ld|)) - ((QUOTE T) (|dqAppend| (CAR |ld|) (|dqConcat| (CDR |ld|)))))))) - -;dqToList s==if null s then nil else CAR s - -(DEFUN |dqToList| (|s|) - (PROG NIL - (RETURN - (COND - ((NULL |s|) NIL) - ((QUOTE T) (CAR |s|)))))) - -;dqAddAppend(x,y)== -; if null x -; then nil -; else if null y -; then nil -; else -; RPLACD (CDR x,CAR y) -; RPLACD (x, CDR y) -; x - -;-- dqAddAppend transforms a dq to a list - -(DEFUN |dqAddAppend| (|x| |y|) - (PROG NIL - (RETURN - (COND - ((NULL |x|) NIL) - ((NULL |y|) NIL) - ((QUOTE T) (RPLACD (CDR |x|) (CAR |y|)) (RPLACD |x| (CDR |y|)) |x|))))) -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document}