aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/interp/int-top.boot (renamed from src/interp/int-top.boot.pamphlet)149
-rw-r--r--src/interp/intfile.boot (renamed from src/interp/intfile.boot.pamphlet)24
-rw-r--r--src/interp/lisplib.boot (renamed from src/interp/lisplib.boot.pamphlet)32
-rw-r--r--src/interp/mark.boot (renamed from src/interp/mark.boot.pamphlet)50
-rw-r--r--src/interp/msg.boot (renamed from src/interp/msg.boot.pamphlet)28
-rw-r--r--src/interp/pf2atree.boot (renamed from src/interp/pf2atree.boot.pamphlet)24
-rw-r--r--src/interp/postpar.boot (renamed from src/interp/postpar.boot.pamphlet)28
7 files changed, 43 insertions, 292 deletions
diff --git a/src/interp/int-top.boot.pamphlet b/src/interp/int-top.boot
index 9e86d4a1..9d444b3f 100644
--- a/src/interp/int-top.boot.pamphlet
+++ b/src/interp/int-top.boot
@@ -1,124 +1,7 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/interp int-top.boot}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{intloopReadConsole}
-
-This is the top level loop when reading from the input console. This
-function calls itself after processing the current line. Because of
-this it is important that the underlying common lisp supports
-tail-recursion.
-
-Normally we never really exit this function.
-
-We read a string from the input. The serverReadLine\cite{1} function
-is a special readline function that handles communication with the
-session manager code, which is a separate process running in parallel.
-In the usual case it just returns the current string.
-
-If the user enters a blank line ([[#a=]]) then just put up another prompt
-and then tail-recursively call [[intloopReadConsole]].
-
-If the user has set [[$DALYMODE]] to true and the new line starts with
-an open parenthesis then the input is assumed to be a lisp expression
-and is evaluated by the underlying common lisp. This is useful if you
-are doing a lot of debugging. Commands can also be executed in the
-underlying common lisp by using the [[)lisp]] command. In either case we
-tail-recursively call [[intloopReadConsole]].
-
-If the user typed [[)fin]] then we exit the loop and drop into the
-underlying common lisp. You can use the [[(restart)]] function call
-to return to the top level loop.
-
-If the input line starts with a close parenthesis we parse the
-input line as a command rather than an expression. We execute the command
-and then tail-recursively call [[intloopReadConsole]].
-
-If the input line contains a trailing underscore, which is the standard
-end-of-line escape character, then we continue to read the line by
-tail-recursively calling [[intloopReadConsole]].
-
-If none of the above conditions occur we simply evaluate the input line
-and then tail-recursively call [[intloopReadConsole]].
-
-However, there was a small bug in the test for the system command
-[[)fin]]. Originally, the test took the form:
-\begin{verbatim}
- intloopPrefix?('")fin",a) => []
-\end{verbatim}
-This test was flawed in two ways. First, it would match {\sl any}
-command beginning with [[)fin]]. Second, it would {\sl only} match
-names beginning with [[)fin]], although [[)fi]] is an acceptable
-abbreviation for this command. The improved test takes the form:
-\begin{verbatim}
- pfx := stripSpaces intloopPrefix?('")fi",a)
- pfx and ((pfx = '")fi") or (pfx = '")fin")) => []
-\end{verbatim}
-
-\section{intloopPrefix?}
-The [[intloopPrefix?(prefix, whole)]] function simply tests if the string
-[[prefix]] is a prefix of the string [[whole]]. The original
-implementation discounts {\sl any} whitespace in [[whole]] in deciding a
-match, when a more sensible behavior would be to discount only leading
-whitespace.
-
-Moreover, the function SUBSTRING\cite{2} was being improperly called.
-The reason why this improper call had gone undetected is that
-generally [[intloopPrefix?]] is invoked with a prefix string of length
-one -- hence the start position for the substring would generally
-begin at index [[spaces]] (which is what we want).
-
-The original code read:
-\begin{verbatim}
-intloopPrefix?(prefix,whole) ==
- #prefix > #whole => false
- good:=true
- spaces := 0
- i := 0
- len := #prefix
- wlen := #whole
- for j in 0.. while (good and i < len and j < wlen) repeat
- good:= (prefix.i = whole.j) or (whole.j = char " ")
- if prefix.i = whole.j then i := i+1
- if whole.j = char " " then spaces := spaces + 1
- spaces = wlen => nil
- if good then SUBSTRING(whole,#prefix+spaces-1,nil) else good
-
-\end{verbatim}
-
-The improved version of [[inloopPrefix?(prefix, whole)]] returns the
-string [[whole]] sans leading whitespace if the match succeeds, else nil.
-
-<<intloopPrefix?>>=
-intloopPrefix?(prefix,whole) ==
- #prefix > #whole => false
- good := true
- leading := true
- spaces := 0
- i := 0
- len := #prefix
- wlen := #whole
- for j in 0.. while (good and i < len and j < wlen) repeat
- good := (prefix.i = whole.j) or (leading and (whole.j = char " "))
- if prefix.i = whole.j then i := i+1
- if (whole.j = char " ") and leading then
- spaces := spaces + 1
- else leading := false
- spaces = wlen => nil
- if good then SUBSTRING(whole,spaces,nil) else good
-
-@
-\section{License}
-<<license>>=
-- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-- All rights reserved.
+-- Copyright (C) 2007, Gabriel Dos Reis.
+-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are
@@ -148,9 +31,6 @@ intloopPrefix?(prefix,whole) ==
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
)package "BOOT"
@@ -287,7 +167,23 @@ intloopReadConsole(b, n)==
PRINC(MKPROMPT())
intloopReadConsole('"", c)
-<<intloopPrefix?>>
+intloopPrefix?(prefix,whole) ==
+ #prefix > #whole => false
+ good := true
+ leading := true
+ spaces := 0
+ i := 0
+ len := #prefix
+ wlen := #whole
+ for j in 0.. while (good and i < len and j < wlen) repeat
+ good := (prefix.i = whole.j) or (leading and (whole.j = char " "))
+ if prefix.i = whole.j then i := i+1
+ if (whole.j = char " ") and leading then
+ spaces := spaces + 1
+ else leading := false
+ spaces = wlen => nil
+ if good then SUBSTRING(whole,spaces,nil) else good
+
intloopProcess(n,interactive,s)==
StreamNull s => n
@@ -541,10 +437,3 @@ displayParserMacro m ==
pfPrintSrcLines CADDR m
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} [[src/interp/server.boot.pamphlet]]
-\bibitem{2} [[src/interp/vmlisp.lisp.pamphlet]]
-\end{thebibliography}
-\end{document}
diff --git a/src/interp/intfile.boot.pamphlet b/src/interp/intfile.boot
index 1dcdcf2d..a7e3d543 100644
--- a/src/interp/intfile.boot.pamphlet
+++ b/src/interp/intfile.boot
@@ -1,18 +1,7 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/interp intfile.boot}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{License}
-<<license>>=
-- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-- All rights reserved.
+-- Copyright (C) 2007, Gabriel Dos Reis.
+-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are
@@ -42,9 +31,6 @@
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
)package "BOOT"
@@ -75,9 +61,3 @@ shoeStrings (stream)==
--fetchKeyedMsg(key,b)== GET(key,"MSGS")
--shoeInternFile '"/usr/local/scratchpad/cur/doc/msgs/co-eng.msgs"
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/interp/lisplib.boot.pamphlet b/src/interp/lisplib.boot
index 8028e449..47e4b666 100644
--- a/src/interp/lisplib.boot.pamphlet
+++ b/src/interp/lisplib.boot
@@ -1,20 +1,3 @@
-\documentclass{article}
-\usepackage{axiom}
-
-\title{\File{src/interp/lisplib.boot} Pamphlet}
-\author{The Axiom Team}
-
-\begin{document}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-
-\section{License}
-
-<<license>>=
-- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-- All rights reserved.
--
@@ -46,9 +29,6 @@
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
)package "BOOT"
@@ -259,7 +239,7 @@ systemDependentMkAutoload(fn,cnam) ==
kind := GETDATABASE(cnam, 'CONSTRUCTORKIND)
cosig := GETDATABASE(cnam, 'COSIG)
file := GETDATABASE(cnam, 'OBJECT)
- SET_-LIB_-FILE_-GETTER(file, cnam)
+ SET_-LIB_-FILE_-GETTER(file, cnam)
kind = 'category =>
ASHARPMKAUTOLOADCATEGORY(file, cnam, asharpName, cosig)
ASHARPMKAUTOLOADFUNCTOR(file, cnam, asharpName, cosig)
@@ -342,7 +322,7 @@ compDefineLisplib(df:=["DEF",[op,:.],:.],m,e,prefix,fal,fn) ==
$libFile: local := NIL
$lisplibVariableAlist: local := NIL
-- $lisplibRelatedDomains: local := NIL --from ++ Related Domains: see c-doc
- $lisplibCategory: local := nil
+ $lisplibCategory: local := nil
--for categories, is rhs of definition; otherwise, is target of functor
--will eventually become the "constructorCategory" property in lisplib
--set in compDefineCategory1 if category, otherwise in finalizeLisplib
@@ -362,7 +342,7 @@ compDefineLisplib(df:=["DEF",[op,:.],:.],m,e,prefix,fal,fn) ==
PROGN(res:= FUNCALL(fn,df,m,e,prefix,fal),
sayMSG ['" finalizing ",$spadLibFT,:bright libName],
finalizeLisplib libName,
- ok := true),
+ ok := true),
RSHUT $libFile)
if ok then lisplibDoRename(libName)
filearg := $FILEP(libName,$spadLibFT,$libraryDirectory)
@@ -706,9 +686,3 @@ isFunctor x ==
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/interp/mark.boot.pamphlet b/src/interp/mark.boot
index a72c838d..333beb67 100644
--- a/src/interp/mark.boot.pamphlet
+++ b/src/interp/mark.boot
@@ -1,31 +1,7 @@
-\documentclass{article}
-\usepackage{axiom}
-
-\title{\$SPAD/src/interp mark.boot}
-\author{The Axiom Team}
-
-\begin{document}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\begin{verbatim}
-
-HOW THE TRANSLATOR WORKS
-
-Unit of code is markedUp as follows (unit= item in a capsule pile, e.g.)
- (WI/.. a b) means source code a --> markedUpCode b
- (REPPER/.. . . a) means source code for a ---> (rep a) or (per a)
-Source code is extracted, modified from markedUpCode, and stacked
-Entire constructor is then assembled and prettyprinted
-
-\end{verbatim}
-\section{License}
-<<license>>=
-- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-- All rights reserved.
+-- Copyright (C) 2007, Gabriel Dos Reis.
+-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are
@@ -39,7 +15,7 @@ Entire constructor is then assembled and prettyprinted
-- the documentation and/or other materials provided with the
-- distribution.
--
--- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
+-- - 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.
--
@@ -55,9 +31,15 @@ Entire constructor is then assembled and prettyprinted
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
+
+-- HOW THE TRANSLATOR WORKS
+
+-- Unit of code is markedUp as follows (unit= item in a capsule pile, e.g.)
+-- (WI/.. a b) means source code a --> markedUpCode b
+-- (REPPER/.. . . a) means source code for a ---> (rep a) or (per a)
+-- Source code is extracted, modified from markedUpCode, and stacked
+-- Entire constructor is then assembled and prettyprinted
+
)package "BOOT"
@@ -1391,7 +1373,7 @@ mkCheckRun() ==
mkGetPaths(x,y) ==
u := REMDUP mkPaths(x,y) => getLocationsOf(u,y,nil)
- nil
+ nil
mkPaths(x,y) == --x < y; find location s of x in y (initially s=nil)
markPathsEqual(x,y) => [y]
@@ -1512,9 +1494,3 @@ ppf x ==
_*PRETTYPRINT_* : local := true
PRINT_-FULL x
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/interp/msg.boot.pamphlet b/src/interp/msg.boot
index ac311779..d8f13559 100644
--- a/src/interp/msg.boot.pamphlet
+++ b/src/interp/msg.boot
@@ -1,22 +1,7 @@
-\documentclass{article}
-\usepackage{axiom}
-
-\title{\File{src/interp/msg.boot} Pamphlet}
-\author{The Axiom Team}
-
-\begin{document}
-\maketitle
-\begin{abstract}
-\end{abstract}
-
-\tableofcontents
-\eject
-
-\section{License}
-
-<<license>>=
-- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-- All rights reserved.
+-- Copyright (C) 2007, Gabriel Dos Reis.
+-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are
@@ -46,9 +31,6 @@
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
)package "BOOT"
@@ -569,9 +551,3 @@ setMsgText (msg,val) == msg.5 := val
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/interp/pf2atree.boot.pamphlet b/src/interp/pf2atree.boot
index 29e85ad1..4cfea2cd 100644
--- a/src/interp/pf2atree.boot.pamphlet
+++ b/src/interp/pf2atree.boot
@@ -1,18 +1,7 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/interp pf2atree.boot}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{License}
-<<license>>=
-- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-- All rights reserved.
+-- Copyright (C) 2007, Gabriel Dos Reis.
+-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are
@@ -42,9 +31,6 @@
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-- not hooked in yet
@@ -567,9 +553,3 @@ pfCollect2Atree pf ==
-- rhsSex := pf2Atree CADR argList
-- $predicateList := [[name, lhsSex, :rhsSex], :$predicateList]
-- name
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/interp/postpar.boot.pamphlet b/src/interp/postpar.boot
index 67cf814a..58568d22 100644
--- a/src/interp/postpar.boot.pamphlet
+++ b/src/interp/postpar.boot
@@ -1,21 +1,7 @@
-\documentclass{article}
-\usepackage{axiom}
-
-\title{\$SPAD/src/interp postpar.boot}
-\author{The Axiom Team}
-
-\begin{document}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-
-\section{License}
-<<license>>=
-- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-- All rights reserved.
+-- Copyright (C) 2007, Gabriel Dos Reis.
+-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are
@@ -45,9 +31,6 @@
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
import '"postprop"
)package "BOOT"
@@ -546,10 +529,3 @@ hasAplExtension argl ==
deepestExpression x ==
x is ["_!",y] => deepestExpression y
x
-@
-
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}