diff --git a/changelog b/changelog index 3ea27f0..e456e11 100644 --- a/changelog +++ b/changelog @@ -1,4 +1,8 @@ -20090902 tpd src/axiom-website/patches.html 20090902.01.tpd.patch +20090902 tpd src/axiom-website/patches.html 20090902.03.tpd.patch +20090902 tpd src/interp/Makefile move parini.boot to parini.lisp +20090902 tpd src/interp/parini.lisp added, rewritten from parini.boot +20090902 tpd src/interp/parini.boot removed, rewritten to parini.lisp +20090902 tpd src/axiom-website/patches.html 20090902.02.tpd.patch 20090902 tpd src/interp/Makefile move varini.boot to varini.lisp 20090902 tpd src/interp/varini.lisp added, rewritten from varini.boot 20090902 tpd src/interp/varini.boot removed, rewritten to varini.lisp diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html index ae42314..468b342 100644 --- a/src/axiom-website/patches.html +++ b/src/axiom-website/patches.html @@ -1976,5 +1976,7 @@ src/interp/nag-s.lisp rewrite from boot to lisp
src/interp/nag-f04.lisp refactor lisp code
20090902.02.tpd.patch src/interp/varini.lisp rewrite from boot to lisp
+20090902.03.tpd.patch +src/interp/parini.lisp rewrite from boot to lisp
diff --git a/src/interp/Makefile.pamphlet b/src/interp/Makefile.pamphlet index 569ecc8..8616bad 100644 --- a/src/interp/Makefile.pamphlet +++ b/src/interp/Makefile.pamphlet @@ -3776,33 +3776,26 @@ ${MID}/varini.lisp: ${IN}/varini.lisp.pamphlet @ -\subsection{parini.boot} +\subsection{parini.lisp} <>= -${OUT}/parini.${O}: ${MID}/parini.clisp - @ echo 549 making ${OUT}/parini.${O} from ${MID}/parini.clisp - @ if [ -z "${NOISE}" ] ; then \ - echo '(progn (compile-file "${MID}/parini.clisp"' \ +${OUT}/parini.${O}: ${MID}/parini.lisp + @ echo 136 making ${OUT}/parini.${O} from ${MID}/parini.lisp + @ ( cd ${MID} ; \ + if [ -z "${NOISE}" ] ; then \ + echo '(progn (compile-file "${MID}/parini.lisp"' \ ':output-file "${OUT}/parini.${O}") (${BYE}))' | ${DEPSYS} ; \ else \ - echo '(progn (compile-file "${MID}/parini.clisp"' \ + echo '(progn (compile-file "${MID}/parini.lisp"' \ ':output-file "${OUT}/parini.${O}") (${BYE}))' | ${DEPSYS} \ >${TMP}/trace ; \ - fi + fi ) @ -<>= -${MID}/parini.clisp: ${IN}/parini.boot.pamphlet - @ echo 550 making ${MID}/parini.clisp from ${IN}/parini.boot.pamphlet +<>= +${MID}/parini.lisp: ${IN}/parini.lisp.pamphlet + @ echo 137 making ${MID}/parini.lisp from ${IN}/parini.lisp.pamphlet @ (cd ${MID} ; \ - ${TANGLE} ${IN}/parini.boot.pamphlet >parini.boot ; \ - if [ -z "${NOISE}" ] ; then \ - echo '(progn (boottran::boottocl "${MID}/parini.boot") (${BYE}))' \ - | ${BOOTSYS} ; \ - else \ - echo '(progn (boottran::boottocl "${MID}/parini.boot") (${BYE}))' \ - | ${BOOTSYS} >${TMP}/trace ; \ - fi ; \ - rm parini.boot ) + ${TANGLE} ${IN}/parini.lisp.pamphlet >parini.lisp ) @ @@ -4686,7 +4679,7 @@ clean: <> <> -<> +<> <> <> diff --git a/src/interp/parini.boot.pamphlet b/src/interp/parini.boot.pamphlet deleted file mode 100644 index 06ea15c..0000000 --- a/src/interp/parini.boot.pamphlet +++ /dev/null @@ -1,206 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/interp parini.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" - -SPACE := QENUM('" ", 0) -ESCAPE := QENUM('"__ ", 0) -STRING_CHAR := QENUM('"_" ", 0) -PLUSCOMMENT := QENUM('"+ ", 0) -MINUSCOMMENT:= QENUM('"- ", 0) -RADIX_CHAR := QENUM('"r ", 0) -DOT := QENUM('". ", 0) -EXPONENT1 := QENUM('"E ", 0) -EXPONENT2 := QENUM('"e ", 0) -CLOSEPAREN := QENUM('") ", 0) -CLOSEANGLE := QENUM('"> ", 0) -QUESTION := QENUM('"? ",0) - -scanKeyWords := [ _ - ['"add", "ADD" ],_ - ['"and", "AND" ],_ - ['"break", "BREAK" ],_ - ['"by", "BY" ],_ - ['"case", "CASE" ],_ - ['"default", "DEFAULT" ],_ - ['"define", "DEFN" ],_ - ['"do", "DO"],_ - ['"else", "ELSE" ],_ - ['"exit", "EXIT" ],_ - ['"export","EXPORT" ],_ - ['"for", "FOR" ],_ - ['"free", "FREE" ],_ - ['"from", "FROM" ],_ - ['"has", "HAS" ],_ - ['"if", "IF" ],_ - ['"import", "IMPORT" ],_ - ['"in", "IN" ],_ - ['"inline", "INLINE" ],_ - ['"is", "IS" ],_ - ['"isnt", "ISNT" ],_ - ['"iterate", "ITERATE"],_ - ['"local", "local" ],_ - ['"macro", "MACRO" ],_ - ['"mod", "MOD" ],_ - ['"or", "OR" ],_ - ['"pretend","PRETEND" ],_ - ['"quo","QUO" ],_ - ['"rem","REM" ],_ - ['"repeat","REPEAT" ],_ - ['"return","RETURN" ],_ - ['"rule","RULE" ],_ - ['"then","THEN" ],_ - ['"where","WHERE" ],_ - ['"while","WHILE" ],_ - ['"with","WITH" ],_ - ['"|","BAR"],_ - ['".","DOT" ],_ - ['"::","COERCE" ],_ - ['":","COLON" ],_ - ['":-","COLONDASH" ],_ - ['"@","AT" ],_ - ['"@@","ATAT" ],_ - ['",","COMMA" ],_ - ['";","SEMICOLON" ],_ - ['"**","POWER" ],_ - ['"*","TIMES" ],_ - ['"+","PLUS" ],_ - ['"-","MINUS" ],_ - ['"<","LT" ],_ - ['">","GT" ],_ - ['"<=","LE" ],_ - ['">=","GE" ],_ - ['"=", "EQUAL"],_ - ['"~=","NOTEQUAL" ],_ - ['"~","~" ],_ - ['"^","CARAT" ],_ - ['"..","SEG" ],_ - ['"#","#" ],_ - ['"&","AMPERSAND" ],_ - ['"$","$" ],_ - ['"/","SLASH" ],_ - ['"\","BACKSLASH" ],_ - ['"//","SLASHSLASH" ],_ - ['"\\","BACKSLASHBACKSLASH" ],_ - ['"/\","SLASHBACKSLASH" ],_ - ['"\/","BACKSLASHSLASH" ],_ - ['"=>","EXIT" ],_ - ['":=","BECOMES" ],_ - ['"==","DEF" ],_ - ['"==>","MDEF" ],_ - ['"->","ARROW" ],_ - ['"<-","LARROW" ],_ - ['"+->","GIVES" ],_ - ['"(","(" ],_ - ['")",")" ],_ - ['"(|","(|" ],_ - ['"|)","|)" ],_ - ['"[","[" ],_ - ['"]","]" ],_ - ['"[__]","[]" ],_ - ['"{","{" ],_ - ['"}","}" ],_ - ['"{__}","{}" ],_ - ['"[|","[|" ],_ - ['"|]","|]" ],_ - ['"[|__|]","[||]" ],_ - ['"{|","{|" ],_ - ['"|}","|}" ],_ - ['"{|__|}","{||}" ],_ - ['"<<","OANGLE" ],_ - ['">>","CANGLE" ],_ - ['"'", "'" ],_ - ['"`", "BACKQUOTE" ]_ - ] - -scanKeyTable:=scanKeyTableCons() - -scanDict:=scanDictCons() - -scanPun:=scanPunCons() - ---for i in ["COLON","MINUS"] repeat --- MAKEPROP(i,'PREGENERIC,'TRUE) - -for i in [ _ - ["EQUAL" ,"="], _ - ["TIMES" ,"*"], _ - ["HAS" ,"has"], _ - ["CASE" ,"case"], _ - ["REM" ,"rem"], _ - ["MOD" ,"mod"], _ - ["QUO" ,"quo"], _ - ["SLASH" ,"/"], _ - ["BACKSLASH","\"], _ - ["SLASHSLASH" ,"//"], _ - ["BACKSLASHBACKSLASH","\\"], _ - ["SLASHBACKSLASH" ,"/\"], _ - ["BACKSLASHSLASH","\/"], _ - ["POWER" ,"**"], _ - ["CARAT" ,"^"], _ - ["PLUS" ,"+"], _ - ["MINUS" ,"-"], _ - ["LT" ,"<"], _ - ["GT" ,">"], _ - ["OANGLE" ,"<<"], _ - ["CANGLE" ,">>"], _ - ["LE" ,"<="], _ - ["GE" ,">="], _ - ["NOTEQUAL" ,"~="], _ - ["BY" ,"by"], _ - ["ARROW" ,"->"], _ - ["LARROW" ,"<-"], _ - ["BAR" ,"|"], _ - ["SEG" ,".."] _ - ] repeat MAKEPROP(CAR i,'INFGENERIC,CADR i) -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/interp/parini.lisp.pamphlet b/src/interp/parini.lisp.pamphlet new file mode 100644 index 0000000..c0d446f --- /dev/null +++ b/src/interp/parini.lisp.pamphlet @@ -0,0 +1,178 @@ +\documentclass{article} +\usepackage{axiom} +\begin{document} +\title{\$SPAD/src/interp parini.lisp} +\author{The Axiom Team} +\maketitle +\begin{abstract} +\end{abstract} +\eject +\tableofcontents +\eject +<<*>>= +(in-package "BOOT") + +(eval-when (eval load) + +(defvar space (qenum " " 0)) +(defvar escape (qenum "_ " 0)) +(defvar stringchar (qenum "\" " 0)) +(defvar pluscomment (qenum "+ " 0)) +(defvar minuscomment (qenum "- " 0)) +(defvar radixchar (qenum "r " 0)) +(defvar dot (qenum ". " 0)) +(defvar exponent1 (qenum "E " 0)) +(defvar exponent2 (qenum "e " 0)) +(defvar closeparen (qenum ") " 0)) +(defvar closeangle (qenum "> " 0)) +(defvar question (qenum "? " 0)) + +(defvar |scanKeyWords| + (list + (list "add" 'add) + (list "and" 'and) + (list "break" 'break) + (list "by" 'by) + (list "case" 'case) + (list "default" 'default) + (list "define" 'defn) + (list "do" 'do) + (list "else" 'else) + (list "exit" 'exit) + (list "export" 'export) + (list "for" 'for) + (list "free" 'free) + (list "from" 'from) + (list "has" 'has) + (list "if" 'if) + (list "import" 'import) + (list "in" 'in) + (list "inline" 'inline) + (list "is" 'is) + (list "isnt" 'isnt) + (list "iterate" 'iterate) + (list "local" '|local|) + (list "macro" 'macro) + (list "mod" 'mod) + (list "or" 'or) + (list "pretend" 'pretend) + (list "quo" 'quo) + (list "rem" 'rem) + (list "repeat" 'repeat) + (list "return" 'return) + (list "rule" 'rule) + (list "then" 'then) + (list "where" 'where) + (list "while" 'while) + (list "with" 'with) + (list "|" 'bar) + (list "." 'dot) + (list "::" 'coerce) + (list ":" 'colon) + (list ":-" 'colondash) + (list "@" 'at) + (list "@@" 'atat) + (list "," 'comma) + (list ";" 'semicolon) + (list "**" 'power) + (list "*" 'times) + (list "+" 'plus) + (list "-" 'minus) + (list "<" 'lt) + (list ">" 'gt) + (list "<=" 'le) + (list ">=" 'ge) + (list "=" 'equal) + (list "~=" 'notequal) + (list "~" '~) + (list "^" 'carat) + (list ".." 'seg) + (list "#" '|#|) + (list "&" 'ampersand) + (list "$" '$) + (list "/" 'slash) + (list "\\" 'backslash) + (list "//" 'slashslash) + (list "\\\\" 'backslashbackslash) + (list "/\\" 'slashbackslash) + (list "\\/" 'backslashslash) + (list "=>" 'exit) + (list ":=" 'becomes) + (list "==" 'def) + (list "==>" 'mdef) + (list "->" 'arrow) + (list "<-" 'larrow) + (list "+->" 'gives) + (list "(" '|(|) + (list ")" '|)|) + (list "(|" '|(\||) + (list "|)" '|\|)|) + (list "[" '[) + (list "]" ']) + (list "[_]" '[]) + (list "{" '{) + (list "}" '}) + (list "{_}" '{}) + (list "[|" '|[\||) + (list "|]" '|\|]|) + (list "[|_|]" '|[\|\|]|) + (list "{|" '|{\||) + (list "|}" '|\|}|) + (list "{|_|}" '|{\|\|}|) + (list "<<" 'oangle) + (list ">>" 'cangle) + (list "'" '|'|) + (list "`" 'backquote))) + +(defvar |scanKeyTable| (|scanKeyTableCons|)) +(defvar |scanDict| (|scanDictCons|)) +(defvar |scanPun| (|scanPunCons|)) + +(prog () + (return + ((lambda (var value) + (loop + (cond + ((or (atom var) + (progn (setq value (car var)) nil)) + (return nil)) + (t (makeprop (car value) 'infgeneric (cadr value)))) + (setq var (cdr var)))) + (list + (list 'equal '=) + (list 'times '*) + (list 'has '|has|) + (list 'case '|case|) + (list 'rem '|rem|) + (list 'mod '|mod|) + (list 'quo '|quo|) + (list 'slash '/) + (list 'backslash '|\\|) + (list 'slashslash '//) + (list 'backslashbackslash '|\\\\|) + (list 'slashbackslash '|/\\|) + (list 'backslashslash '|\\/|) + (list 'power '**) + (list 'carat '^) + (list 'plus '+) + (list 'minus '-) + (list 'lt '<) + (list 'gt '>) + (list 'oangle '<<) + (list 'cangle '>>) + (list 'le '<=) + (list 'ge '>=) + (list 'notequal '~=) + (list 'by '|by|) + (list 'arrow '->) + (list 'larrow '<-) + (list 'bar '|\||) + (list 'seg '|..|)) + nil))) +) +@ +\eject +\begin{thebibliography}{99} +\bibitem{1} nothing +\end{thebibliography} +\end{document}