diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/interp/ChangeLog | 32 | ||||
-rw-r--r-- | src/interp/Makefile.in | 17 | ||||
-rw-r--r-- | src/interp/Makefile.pamphlet | 17 | ||||
-rw-r--r-- | src/interp/astr.boot (renamed from src/interp/astr.boot.pamphlet) | 25 | ||||
-rw-r--r-- | src/interp/cformat.boot (renamed from src/interp/cformat.boot.pamphlet) | 35 | ||||
-rw-r--r-- | src/interp/incl.boot (renamed from src/interp/incl.boot.pamphlet) | 80 | ||||
-rw-r--r-- | src/interp/patches.lisp.pamphlet | 2 | ||||
-rw-r--r-- | src/interp/posit.boot (renamed from src/interp/posit.boot.pamphlet) | 66 | ||||
-rw-r--r-- | src/interp/ptrees.boot.pamphlet | 38 | ||||
-rw-r--r-- | src/interp/sys-constants.boot | 3 |
10 files changed, 160 insertions, 155 deletions
diff --git a/src/interp/ChangeLog b/src/interp/ChangeLog index 2c9c2332..ac77f0e0 100644 --- a/src/interp/ChangeLog +++ b/src/interp/ChangeLog @@ -1,5 +1,37 @@ 2007-09-12 Gabriel Dos Reis <gdr@cs.tamu.edu> + * posit.boot: New. Import sys-macros, astr. + (tokConstruct): Move from ptrees.boot.pamphlet. + (tokType): Likewise. + (tokPart): Likewise. + (tokPosn): Likewise. + (pfAbSynOp): Likewise. + (pfAbSynOp?): Likewise. + (pfLeaf?): Likewise. + (pfLeaf): Likewise. + (pfLeafToken): Likewise. + (pfLeafPosition): Likewise. + (pfTree): Likewise. + (pfParts): Likewise. + (pfFirst): Likewise. + (pfSecond): Likewise. + * astr.boot: New. Import boot-pkg. + * sys-constants.boot (IDENTITY): Define. + * patches.lisp.pamphlet (identity): Move definition to sys-constants. + * cformat.boot: New. Import unlisp, posit. Add ugly workwound + for GCL bug. + * incl.boot: New. Import unlisp, cstream, cformat. Tweak. + Add ugly workwound for GCL bug. + (incLude1): Fix thinko + * Makefile.pamphlet (incl.$(FASLEXT)): New rule. + (cformat.$(FASLEXT)): Likewise. + (posit.$(FASLEXT)): Likewise. + (astr.$(FASLEXT)): Likewise. + (DEP): Don't include bits.lisp. + (${DEPSYS}): Explicitly load "bits" here. + +2007-09-12 Gabriel Dos Reis <gdr@cs.tamu.edu> + * unlisp.lisp.pamphlet: Import sys-macros. (|CsetString|): Use code-char. (|WriteLispExpr|): Remove. It is unused. diff --git a/src/interp/Makefile.in b/src/interp/Makefile.in index ebfa61fa..e66865dc 100644 --- a/src/interp/Makefile.in +++ b/src/interp/Makefile.in @@ -33,7 +33,7 @@ depsys_boot_sources = postpar.boot parse.boot clam.boot slam.boot \ DEP= nlib.lisp \ macros.lisp $(srcdir)/comp.lisp \ spaderror.lisp debug.lisp \ - spad.lisp bits.lisp \ + spad.lisp \ setq.lisp property.lisp \ unlisp.lisp foam_l.lisp \ axext_l.lisp @@ -332,6 +332,7 @@ depsys_objects = nocompil.$(FASLEXT) bookvol5.$(FASLEXT) g-error.$(FASLEXT) \ ${DEPSYS}: vmlisp.$(FASLEXT) \ hash.$(FASLEXT) \ + bits.$(FASLEXT) \ ggreater.$(FASLEXT) \ union.$(FASLEXT) \ boot-pkg.$(FASLEXT) \ @@ -358,6 +359,7 @@ ${DEPSYS}: vmlisp.$(FASLEXT) \ @ rm -f makedep.lisp @ $(mkinstalldirs) $(axiom_build_bindir) @ echo '(|importModule| "vmlisp")' >> makedep.lisp + @ echo '(|importModule| "bits")' >> makedep.lisp @ echo '(|importModule| "hash")' >> makedep.lisp @ echo '(|importModule| "ggreater")' >> makedep.lisp @ echo '(|importModule| "union")' >> makedep.lisp @@ -477,12 +479,25 @@ database.date: $(AUTO)/%.$(FASLEXT): %.$(FASLEXT) $(INSTALL) $< $@ + +incl.$(FASLEXT): incl.clisp cstream.$(FASLEXT) unlisp.$(FASLEXT) + $(BOOTSYS) -- --compile --output=$@ --load-directory=. $< + +cformat.$(FASLEXT): cformat.clisp unlisp.$(FASLEXT) posit.$(FASLEXT) + $(BOOTSYS) -- --compile --output=$@ --load-directory=. $< + unlisp.$(FASLEXT): unlisp.lisp sys-macros.$(FASLEXT) $(BOOTSYS) -- --compile --output=$@ --load-directory=. $< +posit.$(FASLEXT): posit.clisp sys-macros.$(FASLEXT) astr.$(FASLEXT) + $(BOOTSYS) -- --compile --output=$@ --load-directory=. $< + cstream.$(FASLEXT): cstream.clisp sys-macros.$(FASLEXT) $(BOOTSYS) -- --compile --output=$@ --load-directory=. $< +astr.$(FASLEXT): astr.clisp boot-pkg.$(FASLEXT) + $(BOOTSYS) -- --compile --output=$@ --load-directory=. $< + bits.$(FASLEXT): bits.lisp boot-pkg.$(FASLEXT) $(BOOTSYS) -- --compile --output=$@ --load-directory=. $< diff --git a/src/interp/Makefile.pamphlet b/src/interp/Makefile.pamphlet index ccde669f..2f3825f1 100644 --- a/src/interp/Makefile.pamphlet +++ b/src/interp/Makefile.pamphlet @@ -271,7 +271,7 @@ in this list of files. DEP= nlib.lisp \ macros.lisp $(srcdir)/comp.lisp \ spaderror.lisp debug.lisp \ - spad.lisp bits.lisp \ + spad.lisp \ setq.lisp property.lisp \ unlisp.lisp foam_l.lisp \ axext_l.lisp @@ -965,6 +965,7 @@ depsys_objects = nocompil.$(FASLEXT) bookvol5.$(FASLEXT) g-error.$(FASLEXT) \ ${DEPSYS}: vmlisp.$(FASLEXT) \ hash.$(FASLEXT) \ + bits.$(FASLEXT) \ ggreater.$(FASLEXT) \ union.$(FASLEXT) \ boot-pkg.$(FASLEXT) \ @@ -991,6 +992,7 @@ ${DEPSYS}: vmlisp.$(FASLEXT) \ @ rm -f makedep.lisp @ $(mkinstalldirs) $(axiom_build_bindir) @ echo '(|importModule| "vmlisp")' >> makedep.lisp + @ echo '(|importModule| "bits")' >> makedep.lisp @ echo '(|importModule| "hash")' >> makedep.lisp @ echo '(|importModule| "ggreater")' >> makedep.lisp @ echo '(|importModule| "union")' >> makedep.lisp @@ -1972,12 +1974,25 @@ distclean-local: clean-local $(AUTO)/%.$(FASLEXT): %.$(FASLEXT) $(INSTALL) $< $@ + +incl.$(FASLEXT): incl.clisp cstream.$(FASLEXT) unlisp.$(FASLEXT) + $(BOOTSYS) -- --compile --output=$@ --load-directory=. $< + +cformat.$(FASLEXT): cformat.clisp unlisp.$(FASLEXT) posit.$(FASLEXT) + $(BOOTSYS) -- --compile --output=$@ --load-directory=. $< + unlisp.$(FASLEXT): unlisp.lisp sys-macros.$(FASLEXT) $(BOOTSYS) -- --compile --output=$@ --load-directory=. $< +posit.$(FASLEXT): posit.clisp sys-macros.$(FASLEXT) astr.$(FASLEXT) + $(BOOTSYS) -- --compile --output=$@ --load-directory=. $< + cstream.$(FASLEXT): cstream.clisp sys-macros.$(FASLEXT) $(BOOTSYS) -- --compile --output=$@ --load-directory=. $< +astr.$(FASLEXT): astr.clisp boot-pkg.$(FASLEXT) + $(BOOTSYS) -- --compile --output=$@ --load-directory=. $< + bits.$(FASLEXT): bits.lisp boot-pkg.$(FASLEXT) $(BOOTSYS) -- --compile --output=$@ --load-directory=. $< diff --git a/src/interp/astr.boot.pamphlet b/src/interp/astr.boot index b8f9eb0b..b3143314 100644 --- a/src/interp/astr.boot.pamphlet +++ b/src/interp/astr.boot @@ -1,18 +1,7 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/interp astr.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,7 @@ -- 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 '"boot-pkg" )package "BOOT" @@ -91,9 +78,3 @@ ncPutQ(x,k,v) == RPLACD(r,v) v -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/interp/cformat.boot.pamphlet b/src/interp/cformat.boot index a5fb233d..953fc744 100644 --- a/src/interp/cformat.boot.pamphlet +++ b/src/interp/cformat.boot @@ -1,18 +1,7 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/interp cformat.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. +-- Copryight (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,17 @@ -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -@ -<<*>>= -<<license>> +-- This is a horrible hack to work around a horrible bug in GCL +-- as reported here: +-- http://lists.gnu.org/archive/html/gcl-devel/2007-08/msg00004.html +-- +)if %hasFeature KEYWORD::GCL +)package "VMLISP" +)package "AxiomCore" +)endif + +import '"unlisp" +import '"posit" )package "BOOT" @@ -100,9 +97,3 @@ pkey keyStuff == allMsgs := NCONC (oneMsg,allMsgs) allMsgs -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/interp/incl.boot.pamphlet b/src/interp/incl.boot index 5f729bb7..c4e928aa 100644 --- a/src/interp/incl.boot.pamphlet +++ b/src/interp/incl.boot @@ -1,22 +1,7 @@ -\documentclass{article} -\usepackage{axiom} - -\title{\File{src/interp/incl.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. +-- 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,12 +31,40 @@ -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -@ -<<*>>= -<<license>> +-- This is a horrible hack to work around a horrible bug in GCL +-- as reported here: +-- http://lists.gnu.org/archive/html/gcl-devel/2007-08/msg00004.html +-- +)if %hasFeature KEYWORD::GCL +)package "VMLISP" +)package "AxiomCore" +)endif + +import '"unlisp" +import '"cstream" +import '"cformat" )package "BOOT" +Top := 01 +IfSkipToEnd := 10 +IfKeepPart := 11 +IfSkipPart := 12 +ElseifSkipToEnd:= 20 +ElseifKeepPart := 21 +ElseifSkipPart := 22 +ElseSkipToEnd := 30 +ElseKeepPart := 31 + +Top? (st) == QUOTIENT(st,10) = 0 +If? (st) == QUOTIENT(st,10) = 1 +Elseif? (st) == QUOTIENT(st,10) = 2 +Else? (st) == QUOTIENT(st,10) = 3 +SkipEnd? (st) == REMAINDER(st,10) = 0 +KeepPart?(st) == REMAINDER(st,10) = 1 +SkipPart?(st) == REMAINDER(st,10) = 2 +Skipping?(st) == not KeepPart? st + incStringStream s== incRenumber incLude(0,incRgen s,0,['"strings"] ,[Top]) @@ -161,25 +174,6 @@ incNConsoles ufos== a:=member('"console",ufos) if a then 1+incNConsoles CDR a else 0 -Top := 01 -IfSkipToEnd := 10 -IfKeepPart := 11 -IfSkipPart := 12 -ElseifSkipToEnd:= 20 -ElseifKeepPart := 21 -ElseifSkipPart := 22 -ElseSkipToEnd := 30 -ElseKeepPart := 31 - -Top? (st) == QUOTIENT(st,10) = 0 -If? (st) == QUOTIENT(st,10) = 1 -Elseif? (st) == QUOTIENT(st,10) = 2 -Else? (st) == QUOTIENT(st,10) = 3 -SkipEnd? (st) == REMAINDER(st,10) = 0 -KeepPart?(st) == REMAINDER(st,10) = 1 -SkipPart?(st) == REMAINDER(st,10) = 2 -Skipping?(st) == not KeepPart? st - --% Message Handling incHandleMessage(xl) == xl.1.1 = "none" => @@ -307,7 +301,7 @@ incLude1 (:z) == cons(xlSkip(eb,str,lno,ufos.0), Rest s) fn1 := inclFname(str, info) not fn1 => - cons(xlNoSuchFile(eb, str, lno,ufos,fn),Rest s) + cons(xlNoSuchFile(eb, str, lno,ufos,fn1),Rest s) not PROBE_-FILE fn1 => cons(xlCannotRead(eb, str, lno,ufos,fn1),Rest s) incActive?(fn1,ufos) => @@ -439,9 +433,3 @@ inclmsgIfBug() == inclmsgCmdBug() == ['S2CB0003, []] -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/interp/patches.lisp.pamphlet b/src/interp/patches.lisp.pamphlet index 82961a1e..a825922c 100644 --- a/src/interp/patches.lisp.pamphlet +++ b/src/interp/patches.lisp.pamphlet @@ -300,8 +300,6 @@ previous definition. #+:AKCL (proclaim '(ftype (function (t) t) identity)) #+:AKCL (defun identity (x) x) -(setq identity #'identity) ;to make LispVM code for handling constants to work - (|initializeTimedNames| |$interpreterTimedNames| |$interpreterTimedClasses|) (defun |rebuild| (filemode) diff --git a/src/interp/posit.boot.pamphlet b/src/interp/posit.boot index 72adfa0c..b9c546e4 100644 --- a/src/interp/posit.boot.pamphlet +++ b/src/interp/posit.boot @@ -1,18 +1,7 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/interp posit.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,8 @@ -- 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 '"sys-macros" +import '"astr" )package "BOOT" @@ -110,7 +98,45 @@ pfSourceToken form == else if null pfParts form then 'NoToken else pfSourceToken(pfFirst form) - + +--constructer and selectors for leaf tokens + +tokConstruct(hd,tok,:pos)== + a:=cons(hd,tok) + IFCAR pos => + pfNoPosition? CAR pos=> a + ncPutQ(a,"posn",CAR pos) + a + a + +tokType x== ncTag x +tokPart x== CDR x +tokPosn x== + a:= QASSQ("posn",ncAlist x) + if a then CDR a else pfNoPosition() + +pfAbSynOp form == + hd := CAR form + IFCAR hd or hd + +pfAbSynOp?(form, op) == + hd := CAR form + EQ(hd, op) or EQCAR(hd, op) + +pfLeaf? form == + MEMQ(pfAbSynOp form, + '(id idsy symbol string char float expression integer + Document error)) + +pfLeaf(x,y,:z) == tokConstruct(x,y, IFCAR z or pfNoPosition()) +pfLeafToken form == tokPart form +pfLeafPosition form == tokPosn form + +pfTree(x,y) == CONS(x,y) -- was ==> +pfParts form == CDR form -- was ==> +pfFirst form == CADR form -- was ==> +pfSecond form == CADDR form -- was ==> + pfPosn pf == pfSourcePosition pf pfSourcePosition form == @@ -192,9 +218,3 @@ pfPrintSrcLines(pf) == FORMAT(true, '" ~A~%", lnString line) lno := lnGlobalNum(line) -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/interp/ptrees.boot.pamphlet b/src/interp/ptrees.boot.pamphlet index 43471476..dea41bdc 100644 --- a/src/interp/ptrees.boot.pamphlet +++ b/src/interp/ptrees.boot.pamphlet @@ -64,44 +64,6 @@ THE PFORM DATA STRUCTURE )package "BOOT" ---constructer and selectors for leaf tokens - -tokConstruct(hd,tok,:pos)== - a:=cons(hd,tok) - IFCAR pos => - pfNoPosition? CAR pos=> a - ncPutQ(a,"posn",CAR pos) - a - a - -tokType x== ncTag x -tokPart x== CDR x -tokPosn x== - a:= QASSQ("posn",ncAlist x) - if a then CDR a else pfNoPosition() - -pfAbSynOp form == - hd := CAR form - IFCAR hd or hd - -pfAbSynOp?(form, op) == - hd := CAR form - EQ(hd, op) or EQCAR(hd, op) - -pfLeaf? form == - MEMQ(pfAbSynOp form, - '(id idsy symbol string char float expression integer - Document error)) - -pfLeaf(x,y,:z) == tokConstruct(x,y, IFCAR z or pfNoPosition()) -pfLeafToken form == tokPart form -pfLeafPosition form == tokPosn form - -pfTree(x,y) == CONS(x,y) -- was ==> -pfParts form == CDR form -- was ==> -pfFirst form == CADR form -- was ==> -pfSecond form == CADDR form -- was ==> - --% SPECIAL NODES pfListOf x == pfTree('listOf,x) pfListOf? x == pfAbSynOp?(x,'listOf) diff --git a/src/interp/sys-constants.boot b/src/interp/sys-constants.boot index a22234c8..a3f37223 100644 --- a/src/interp/sys-constants.boot +++ b/src/interp/sys-constants.boot @@ -538,3 +538,6 @@ $leaveMode == $EmptyMode ++ $noEnv == nil + +++ +IDENTITY == function IDENTITY |