aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/interp/ChangeLog19
-rw-r--r--src/interp/Makefile.in4
-rw-r--r--src/interp/Makefile.pamphlet4
-rw-r--r--src/interp/int-top.boot.pamphlet53
-rw-r--r--src/interp/nci.lisp.pamphlet107
5 files changed, 76 insertions, 111 deletions
diff --git a/src/interp/ChangeLog b/src/interp/ChangeLog
index 97bd4bdb..765d4106 100644
--- a/src/interp/ChangeLog
+++ b/src/interp/ChangeLog
@@ -1,5 +1,24 @@
2007-09-06 Gabriel Dos Reis <gdr@cs.tamu.edu>
+ * Makefile.pamphlet (OBJS): Don't include nci.
+ (AXIOMsys_compiled_lisp_sources): Likewise.
+ * Makefile.in: Regenerate.
+ * nci.lisp.pamphlet (|ncParseAndInterpretString|): Move to
+ int-top.boot.pamphlet.
+ (|ncParseFromString|): Likewise.
+ (|ncINTERPFILE|): Likewise.
+ (|ncGetFunction|): Likewise.
+ (|ncSetCurrentLine|): Likewise.
+ (|applyInPackage|): Likewise.
+ (|clearMacroTable|): Likewise.
+ (|getParserMacros|): Likewise.
+ (|displayParserMacro|): Likewise.
+ (|intloopInclude|): Likewise.
+ (|ncloopInclude|): Likewise.
+ Remove file.
+
+2007-09-06 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
* patches.lisp.pamphlet (reset-highlight): Move to i-syscmd.boot.
(clear-highlight): Likewise.
(|spool|): Likewise.
diff --git a/src/interp/Makefile.in b/src/interp/Makefile.in
index 07aaecc9..83aed171 100644
--- a/src/interp/Makefile.in
+++ b/src/interp/Makefile.in
@@ -85,7 +85,7 @@ OBJS= vmlisp.$(FASLEXT) hash.$(FASLEXT) \
lisplib.$(FASLEXT) macex.$(FASLEXT) \
match.$(FASLEXT) \
monitor.$(FASLEXT) msg.$(FASLEXT) \
- msgdb.$(FASLEXT) nci.$(FASLEXT) \
+ msgdb.$(FASLEXT) \
newaux.$(FASLEXT) newfort.$(FASLEXT) \
nlib.$(FASLEXT) nrunfast.$(FASLEXT) \
nrungo.$(FASLEXT) nrunopt.$(FASLEXT) \
@@ -121,7 +121,7 @@ AXIOMsys_compiled_lisp_sources = bits.lisp \
patches.lisp preparse.lisp \
sockio.lisp spad.lisp spaderror.lisp \
union.lisp util.lisp vmlisp.lisp obey.lisp \
- unlisp.lisp intint.lisp nci.lisp sfsfun-l.lisp \
+ unlisp.lisp intint.lisp sfsfun-l.lisp \
axext_l.lisp foam_l.lisp
AXIOMsys_boot_sources = astr.boot alql.boot buildom.boot cattable.boot \
diff --git a/src/interp/Makefile.pamphlet b/src/interp/Makefile.pamphlet
index 0df0d71d..5e67f5a5 100644
--- a/src/interp/Makefile.pamphlet
+++ b/src/interp/Makefile.pamphlet
@@ -371,7 +371,7 @@ OBJS= vmlisp.$(FASLEXT) hash.$(FASLEXT) \
lisplib.$(FASLEXT) macex.$(FASLEXT) \
match.$(FASLEXT) \
monitor.$(FASLEXT) msg.$(FASLEXT) \
- msgdb.$(FASLEXT) nci.$(FASLEXT) \
+ msgdb.$(FASLEXT) \
newaux.$(FASLEXT) newfort.$(FASLEXT) \
nlib.$(FASLEXT) nrunfast.$(FASLEXT) \
nrungo.$(FASLEXT) nrunopt.$(FASLEXT) \
@@ -407,7 +407,7 @@ AXIOMsys_compiled_lisp_sources = bits.lisp \
patches.lisp preparse.lisp \
sockio.lisp spad.lisp spaderror.lisp \
union.lisp util.lisp vmlisp.lisp obey.lisp \
- unlisp.lisp intint.lisp nci.lisp sfsfun-l.lisp \
+ unlisp.lisp intint.lisp sfsfun-l.lisp \
axext_l.lisp foam_l.lisp
AXIOMsys_boot_sources = astr.boot alql.boot buildom.boot cattable.boot \
diff --git a/src/interp/int-top.boot.pamphlet b/src/interp/int-top.boot.pamphlet
index 77f36f8e..9e86d4a1 100644
--- a/src/interp/int-top.boot.pamphlet
+++ b/src/interp/int-top.boot.pamphlet
@@ -154,6 +154,40 @@ intloopPrefix?(prefix,whole) ==
)package "BOOT"
+ncParseAndInterpretString s ==
+ processInteractive(packageTran parseFromString s, nil)
+
+ncParseFromString s ==
+ zeroOneTran packageTran CATCH("SPAD_READER", parseFromString s)
+
+ncINTERPFILE(file, echo) ==
+ savedEcho := $EchoLines
+ savedReadingFile := $ReadingFile
+ $EchoLines: fluid := echo
+ $ReadingFile: fluid := true
+ result := SpadInterpretFile file
+ $EchoLines := savedEcho
+ $ReadingFile := savedReadingFile
+ result
+
+ncGetFunction(op, dom, sig) ==
+ applyInPackage(function getNCfunction,_
+ [rePackageTran(op, '"boot"),_
+ rePackageTran(dom, '"boot"),_
+ rePackageTran(sig, '"boot")],_
+ '"BOOT")
+
+applyInPackage(fun, args, package) ==
+ savedPackage := _*PACKAGE_*
+ SETQ(_*PACKAGE_*, FIND_-PACKAGE package)
+ result := apply(fun, args)
+ SETQ(_*PACKAGE_*, savedPackage)
+ result
+
+ncSetCurrentLine l ==
+ setCurrentLine l
+
+
--% INTERPRETER TOP LEVEL
spad() ==
@@ -279,6 +313,9 @@ intloopInclude0(st, name, n) ==
next(function intloopEchoParse,
next(function insertpile,
next(function lineoftoks,$lines))))
+
+intloopInclude(name, n) ==
+ WITH_-OPEN_-FILE(st name, intloopInclude0(st, name, n))
intloopInclude1(name,n) ==
a:=ncloopIncFileName name
@@ -408,6 +445,9 @@ ncloopInclude0(st, name, n) ==
next(function ncloopEchoParse,
next(function insertpile,
next(function lineoftoks,$lines))))
+
+ncloopInclude(name, n) ==
+ WITH_-OPEN_-FILE(st name, ncloopInclude0(st, name, n))
ncloopInclude1(name,n) ==
a:=ncloopIncFileName name
@@ -488,6 +528,19 @@ PullAndExecuteSpadSystemCommand stream ==
ExecuteSpadSystemCommand string ==
FUNCALL($systemCommandFunction, string)
+
+clearMacroTable() ==
+ $pfMacros := nil
+
+getParserMacros() ==
+ $pfMacros
+
+displayParserMacro m ==
+ m := ASSQ(m, $pfMacros)
+ null m => nil
+ pfPrintSrcLines CADDR m
+
+
@
\eject
\begin{thebibliography}{99}
diff --git a/src/interp/nci.lisp.pamphlet b/src/interp/nci.lisp.pamphlet
deleted file mode 100644
index 51917f58..00000000
--- a/src/interp/nci.lisp.pamphlet
+++ /dev/null
@@ -1,107 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/interp nci.lisp}
-\author{Timothy Daly}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{License}
-<<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.
-
-@
-<<*>>=
-<<license>>
-
-(in-package "BOOT")
-
-;; Interpreter interface to new compiler
-
-(defun |ncParseAndInterpretString| (s)
- (|processInteractive|
- (|packageTran| (|parseFromString| s))
- NIL ))
-
-(defun |ncParseFromString| (s)
- (|zeroOneTran| (|packageTran|
- (catch 'SPAD_READER (|parseFromString| s)))))
-
-(defun |ncINTERPFILE| (file echo)
- (let ((|$EchoLines| echo) (|$ReadingFile| t))
- (declare (special |$EchoLines|))
- (declare (special |$ReadingFile|))
- (|SpadInterpretFile| file)) )
-
-(defun |ncGetFunction| (op dom sig)
- (|applyInPackage| #'|getNCfunction|
- (list (|rePackageTran| op "boot")
- (|rePackageTran| dom "boot")
- (|rePackageTran| sig "boot"))
- "boot"))
-
-(defun |ncSetCurrentLine| (c)
- (|setCurrentLine| c))
-
-(defun |applyInPackage| (fun args package)
- (let ((*package* (find-package (string package))))
- (declare (special *package*))
- (apply fun args)))
-
-(defun |clearMacroTable| ()
- (setq |$pfMacros| NIL))
-
-(defun |getParserMacros| ()
- |$pfMacros|)
-
-(defun |displayParserMacro| (m)
- (let ((m (assq m |$pfMacros|)))
- (cond ((null m) nil)
- (t (|pfPrintSrcLines| (CADDR m))))))
-
-
-(defun |intloopInclude| (name n)
- (with-open-file (st name)
- (|intloopInclude0| st name n)))
-
-(defun |ncloopInclude| (name n)
- (with-open-file (st name)
- (|ncloopInclude0| st name n)))
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}