aboutsummaryrefslogtreecommitdiff
path: root/src/boot/tokens.boot.pamphlet
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2008-01-28 04:16:25 +0000
committerdos-reis <gdr@axiomatics.org>2008-01-28 04:16:25 +0000
commita27cc2ac7bf6a0ad60cc6c9f949a988d0444bb4e (patch)
treecb71095e082c97f38f06f11828ca1f898ba3f72e /src/boot/tokens.boot.pamphlet
parent58cae19381750526539e986ca1de122803ac2293 (diff)
downloadopen-axiom-a27cc2ac7bf6a0ad60cc6c9f949a988d0444bb4e.tar.gz
* boot/Makefile.pamphlet: Remove.
* boot/translator.boot: New. * boot/translator.boot: Remove. * boot/tokens.boot: New. * boot/tokens.boot.pamphlet: Remove. * boot/scanner.boot: New. * boot/scanner.boot.pamphlet: Remove. * boot/pile.boot: New. * boot/pile.boot.pamphlet: Remove. * boot/parser.boot: New. * boot/parser.boot.pamphlet: New. * boot/initial-env.lisp: New. * boot/initial-env.lisp.pamphlet: Remove. * boot/includer.boot: New. * boot/includer.boot.pamphlet: Remove. * boot/ast.boot: New. * boot/ast.boot.pamphlet: Remove.
Diffstat (limited to 'src/boot/tokens.boot.pamphlet')
-rw-r--r--src/boot/tokens.boot.pamphlet897
1 files changed, 0 insertions, 897 deletions
diff --git a/src/boot/tokens.boot.pamphlet b/src/boot/tokens.boot.pamphlet
deleted file mode 100644
index bb4d7ec2..00000000
--- a/src/boot/tokens.boot.pamphlet
+++ /dev/null
@@ -1,897 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-
-\title{\File{src/boot/tokens.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.
---
--- 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.
-@
-
-
-\section{Key words}
-\label{sec:boot:key-words}
-
-The following tokens are reserved as Boot key words:
-\begin{center}
-\begin{tabular}{lllllll}
- \Code{and} & \Code{by} & \Code{case} &
- \Code{cross} & \Code{else} & \Code{for} & \Code{if}
- \\
- \Code{import} & \Code{in} & \Code{is} &
- \Code{isnt} & \Code{module} & \Code{of} & \Code{or}
- \\
- \Code{repeat} &\Code{return} & \Code{structure} &
- \Code{then} & \Code{until} & \Code{where} & \Code{while}
- \\
- \Code{.} & \Code{:} & \Code{::} &
- \Code{,} & \Code{;} & \Code{*} & \Code{**}
- \\
- \Code{/} & \Code{+} & \Code{-} &
- \Code{<} & \Code{>} & \Code{<=} & \Code{>=}
- \\
- \Code{=} & \Code{\^} & \verb!\^=! &
- \Code{..} & \Code{\#} & \Code{=>} & \Code{:=}
- \\
- \Code{==} & \Code{==>} & \Code{(} &
- \Code{)} & \Code{[} & \Code{]} & \Code{'}
- \\
- \Code{|}
-\end{tabular}
-\end{center}
-
-
-\section{Prefix operators}
-\label{sec:boot:prefix-ops}
-
-The following key words designate prefix operators
-\begin{center}
- \begin{tabular}{ll}
- \Code{not} & \Code{\#}
- \end{tabular}
-\end{center}
-
-
-\section{Infix operators}
-\label{sec:boot:infix-ops}
-
-The following key words designate infix operators
-\begin{center}
- \begin{tabular}{llllll}
- \Code{=} & \Code{*} & \Code{+} & \Code{is} & \Code{isnt} & \Code{and}
- \\
- \Code{or} & \Code{/} & \Code{**} & \Code{-} & \Code{<} & \Code{>}
- \\
- & \Code{<=} & \Code{>=} & \verb!^=!
- \end{tabular}
-\end{center}
-
-
-\section{Monoid operations and reduction}
-\label{sec:boot:monoid-ops}
-
-Some Boot standard operations are monoid functions, therefore
-usable as operand to the reduction functional. We list below
-all such Boot standard operations, along with their neutral elements.
-\begin{center}
- \begin{tabular}{|ll|ll|ll|}
- \hline
- Operation & Unit & Operation & Unit & Operation & Unit
- \\
- \hline
- \Code{+} & \Code{0} &
- \Code{gdc} & \Code{0} &
- \Code{lcm} & \Code{1}
- \\
- \Code{STRCONC} & \Code{""} &
- \Code{strconc} & \Code{""} &
- \Code{MAX} & \Code{-999999}
- \\
- \Code{MIN} & \Code{999999} &
- \Code{*} & \Code{1} &
- \Code{times} & \Code{1}
- \\
- \Code{CONS} & \Code{nil} &
- \Code{APPEND} & \Code{nil} &
- \Code{append} & \Code{nil}
- \\
- \Code{UNION} & \Code{nil} &
- \Code{UNIONQ} & \Code{nil} &
- \Code{union} & \Code{nil}
- \\
- \Code{NCONC} & \Code{nil} &
- \Code{and} & \Code{true} &
- \Code{or} & \Code{false}
- \\
- \Code{AND} & \Code{true} &
- \Code{OR} & \Code{false} &
- \\
- \hline
- \end{tabular}
-\end{center}
-
-Note that \Code{CONS} is not a monoid operation; it however supports
-right reduction.
-
-
-
-
-\section{Putting everything together}
-
-<<*>>=
-<<license>>
-
-module '"boot-tokens"
-import '"initial-env"
-
-)package "BOOTTRAN"
-
-shoeKeyWords := [ _
- ['"and","AND"] , _
- ['"by", "BY" ], _
- ['"case","CASE"] , _
- ['"cross","CROSS"] , _
- ['"else", "ELSE"] , _
- ['"for", "FOR"] , _
- ['"if", "IF"], _
- ['"import", "IMPORT"], _
- ['"in", "IN" ], _
- ['"is", "IS"], _
- ['"isnt", "ISNT"] , _
- ['"module", "MODULE"], _
- ['"of", "OF"] , _
- ['"or", "OR"] , _
- ['"repeat", "REPEAT"] , _
- ['"return", "RETURN"], _
- ['"structure", "STRUCTURE"], _
- ['"then", "THEN"], _
- ['"until", "UNTIL"], _
- ['"where", "WHERE"], _
- ['"while", "WHILE"], _
- ['".", "DOT"], _
- ['":", "COLON"], _
- ['"::", "COLON-COLON"], _
- ['",", "COMMA"], _
- ['";", "SEMICOLON"], _
- ['"*", "TIMES"], _
- ['"**", "POWER"], _
- ['"/", "SLASH"], _
- ['"+", "PLUS"], _
- ['"-", "MINUS"], _
- ['"<", "LT"], _
- ['">", "GT"] , _
- ['"<=","LE" ], _
- ['">=","GE" ], _
- ['"=", "SHOEEQ"], _
- ['"^", "NOT"], _
- ['"^=","SHOENE" ], _
- ['"..","SEG" ], _
- ['"#", "LENGTH"], _
- ['"=>","EXIT" ], _
- ['"->", "ARROW"],_
- ['":=", "BEC"], _
- ['"==", "DEF"], _
- ['"==>","MDEF" ], _
- ['"<=>", "TDEF"], _
- ['"(", "OPAREN"], _
- ['")", "CPAREN"], _
- ['"(|", "OBRACK"], _
- ['"|)", "CBRACK"], _
- ['"[", "OBRACK"], _
- ['"]", "CBRACK"], _
- ['"suchthat","BAR"], _
- ['"'", "QUOTE"], _
- ['"|", "BAR"] ]
-
-
-
-shoeKeyTableCons()==
- KeyTable:=MAKE_-HASHTABLE("CVEC")
- for st in shoeKeyWords repeat
- HPUT(KeyTable,CAR st,CADR st)
- KeyTable
-
-shoeKeyTable:=shoeKeyTableCons()
-
-shoeSPACE := QENUM('" ", 0)
-
-shoeESCAPE := QENUM('"__ ", 0)
-shoeLispESCAPE := QENUM('"! ", 0)
-
-shoeSTRING_CHAR := QENUM('"_" ", 0)
-
-shoePLUSCOMMENT := QENUM('"+ ", 0)
-
-shoeMINUSCOMMENT:= QENUM('"- ", 0)
-
-shoeDOT := QENUM('". ", 0)
-
-shoeEXPONENT1 := QENUM('"E ", 0)
-
-shoeEXPONENT2 := QENUM('"e ", 0)
-
-shoeCLOSEPAREN := QENUM('") ", 0)
-
---shoeCLOSEANGLE := QENUM('"> ", 0)
-shoeTAB := 9
-
-shoeInsert(s,d) ==
- l := #s
- h := QENUM(s,0)
- u := ELT(d,h)
- n := #u
- k:=0
- while l <= #(ELT(u,k)) repeat
- k:=k+1
- v := MAKE_-VEC(n+1)
- for i in 0..k-1 repeat VEC_-SETELT(v,i,ELT(u,i))
- VEC_-SETELT(v,k,s)
- for i in k..n-1 repeat VEC_-SETELT(v,i+1,ELT(u,i))
- VEC_-SETELT(d,h,v)
- s
-
-shoeDictCons()==
- l:= HKEYS shoeKeyTable
- d :=
- a:=MAKE_-VEC(256)
- b:=MAKE_-VEC(1)
- VEC_-SETELT(b,0,MAKE_-CVEC 0)
- for i in 0..255 repeat VEC_-SETELT(a,i,b)
- a
- for s in l repeat shoeInsert(s,d)
- d
-
-shoeDict:=shoeDictCons()
-
-
-shoePunCons()==
- listing := HKEYS shoeKeyTable
- a:=MAKE_-BVEC 256
- for i in 0..255 repeat BVEC_-SETELT(a,i,0)
- for k in listing repeat
- if not shoeStartsId k.0
- then BVEC_-SETELT(a,QENUM(k,0),1)
- a
-
-shoePun:=shoePunCons()
-
-for i in [ _
- "NOT", _
--- "COLON", _
--- "SHOEEQ", _
- "LENGTH" _
- ] _
- repeat SETF (GET(i,'SHOEPRE),'T)
-
-for i in [ _
- ["SHOEEQ" ,"="], _
- ["TIMES" ,"*"], _
- ["PLUS" ,"+"], _
- ["IS" ,"is"], _
- ["ISNT" ,"isnt"], _
- ["AND" ,"and"], _
- ["OR" ,"or"], _
- ["SLASH" ,"/"], _
- ["POWER" ,"**"], _
- ["MINUS" ,"-"], _
- ["LT" ,"<"], _
- ["GT" ,">"], _
- ["LE" ,"<="], _
- ["GE" ,">="], _
- ["SHOENE" ,"^="] _
- ]_
- repeat SETF (GET(CAR i,'SHOEINF),CADR i)
-
-
-for i in [ _
- ["+", 0] , _
- ["gcd", 0] , _
- ["lcm", 1] , _
- ["STRCONC", '""] , _
- ["strconc", '""] , _
- ["MAX", -999999] , _
- ["MIN", 999999] , _
- ["*", 1] , _
- ["times", 1] , _
- ["CONS", NIL] , _
- ["APPEND", NIL] , _
- ["append", NIL] , _
- ["UNION", NIL] , _
- ["UNIONQ", NIL] , _
- ["union", NIL] , _
- ["NCONC", NIL] , _
- ["and", 'T] , _
- ["or", NIL] , _
- ["AND", 'T] , _
- ["OR", NIL] _
- ]
-
- repeat SETF (GET(CAR i,'SHOETHETA),CDR i)
-for i in [ _
- ["and", "AND"] , _
- ["append", "APPEND"] , _
- ["apply", "APPLY"] , _
- ["atom", "ATOM"] , _
- ["car", "CAR"] , _
- ["cdr", "CDR"] , _
- ["cons", "CONS"] , _
- ["copy", "COPY"] , _
- ["croak", "CROAK"] , _
- ["drop", "DROP"] , _
- ["exit", "EXIT"] , _
- ["false", 'NIL] , _
- ["first", "CAR"] , _
- ["function","FUNCTION"] , _
- ["genvar", "GENVAR"] , _
- ["IN", "MEMBER"] , _
- ["is", "IS"] , _
- ["isnt", "ISNT"] , _
- ["lastNode", "LAST"] , _
- ["LAST", "last"] , _
- ["list", "LIST"] , _
--- ["member", "MEMBER"] , _
- ["mkpf", "MKPF"] , _
- ["nconc", "NCONC"] , _
- ["nil" ,NIL ] , _
- ["not", "NULL"] , _
- ["NOT", "NULL"] , _
- ["nreverse", "NREVERSE"] , _
- ["null", "NULL"] , _
- ["or", "OR"] , _
- ["otherwise", "T"] , _
- ["PAIRP", "CONSP"] , _
- ["removeDuplicates", "REMDUP"] , _
- ["rest", "CDR"] , _
- ["reverse", "REVERSE"] , _
- ["setDifference", "SETDIFFERENCE"] , _
- ["setIntersection", "INTERSECTION"] , _
- ["setPart", "SETELT"] , _
- ["setUnion", "UNION"] , _
- ["size", "SIZE"] , _
- ["strconc", "CONCAT"] , _
- ["substitute", "SUBST"] , _
- ["take", "TAKE"] , _
- ["true", "T"] , _
- ["PLUS", "+"] , _
- ["MINUS", "-"] , _
- ["TIMES", "*"] , _
- ["POWER", "EXPT"] , _
- ["SLASH", "/"] , _
- ["LT", "<"], _
- ["GT", ">"] , _
- ["LE", "<="], _
- ["GE", ">="], _
- ["SHOEEQ", "EQUAL"], _
- ["SHOENE", "/="], _
- ["T", "T$"] _
- ]
- repeat SETF (GET(CAR i,'SHOERENAME),CDR i)
-
--- For code written in `Old Boot', we would like to warn about
--- the difference in renaming.
-for i in [ _
- ["PLUS", "PLUS"], _
- ["and", "AND"], _
- ["append", "APPEND"], _
- ["apply", "APPLY"], _
- ["atom", "ATOM"], _
- ["brace", "REMDUP"], _
- ["car", "CAR"], _
- ["cdr", "CDR"], _
- ["cons", "CONS"], _
- ["copy", "COPY"], _
- ["croak", "CROAK"], _
- ["drop", "DROP"], _
- ["exit", "EXIT"], _
- ["false", "NIL"], _
- ["first", "CAR"], _
- ["genvar", "GENVAR"], _
- ["in", "member"], _
- ["is", "IS"], _
- ["lastNode", "LASTNODE"], _
- ["list", "LIST"], _
- ["mkpf", "MKPF"], _
- ["nconc", "NCONC"], _
- ["nil", "NIL"], _
- ["not", "NULL"], _
- ["NOT", "NULL"], _
- ["nreverse", "NREVERSE"], _
- ["null", "NULL"], _
- ["or", "OR"], _
- ["otherwise", "T"], _
- ["removeDuplicates", "REMDUP"], _
- ["rest", "CDR"], _
- ["return", "RETURN"], _
- ["reverse", "REVERSE"], _
- ["setDifference", "SETDIFFERENCE"], _
- ["setIntersection", "intersection"], _
- ["setPart", "SETELT"], _
- ["setUnion", "union"], _
- ["size", "SIZE"], _
- ["strconc", "STRCONC"], _
- ["substitute", "MSUBST"], _
- ["SUBST", "MSUBST"], _
- ["take", "TAKE"], _
- ["true", "T"], _
- ["where", "WHERE"], _
- ["TIMES", "TIMES"], _
- ["POWER", "EXPT"], _
- ["NOT", "NULL"], _
- ["SHOENE", "NEQUAL"], _
- ["MINUS", "SPADDIFFERENCE"], _
- ["SLASH", "QUOTIENT"], _
- ["=", "EQUAL"], _
- ["SHOEEQ", "EQUAL"], _
- ["ASSOC", "assoc"], _
- ["DELETE", "delete"], _
- ["GET", "GETL"], _
- ["INTERSECTION", "intersection"], _
- ["LAST", "last"], _
- ["MEMBER", "member"], _
- ["RASSOC", "rassoc"], _
- ["READ", "VMREAD"], _
- ["READ-LINE", "read-line"], _
- ["REDUCE", "SPADREDUCE"], _
- ["REMOVE", "remove"], _
- ["BAR", "SUCHTHAT"], _
- ["T", "T$"], _
- ["IN", "member"], _
- ["UNION", "union"]_
- ]
- repeat SETF (GET(CAR i,'OLD_-BOOT),CDR i)
-
--- The following difference in renaming are verified to be OK.
-for i in [ _
- "LT", "LE", _
- "GT", "GE", _
- "SHOENE", _
- "TIMES", "PLUS", _
- "MINUS", "function",_
- "PAIRP"
- ]
- repeat SETF(GET(i, 'RENAME_-OK), true)
-
-
-
-for i in [ _
- ["setName", 0] , _
- ["setLabel", 1] , _
- ["setLevel", 2] , _
- ["setType", 3] , _
- ["setVar", 4] , _
- ["setLeaf", 5] , _
- ["setDef", 6] , _
- ["aGeneral", 4] , _
- ["aMode", 1] , _
- ["aModeSet", 3] , _
- ["aTree", 0] , _
- ["aValue", 2] , _
- ["attributes", "CADDR"] , _
- ["cacheCount", "CADDDDR"] , _
- ["cacheName", "CADR"] , _
- ["cacheReset", "CADDDR"] , _
- ["cacheType", "CADDR"] , _
- ["env", "CADDR"] , _
- ["expr", "CAR"] , _
- ["CAR", "CAR"] , _
- ["mmCondition", "CAADR"] , _
- ["mmDC", "CAAR"] , _
- ["mmImplementation","CADADR"] , _
- ["mmSignature", "CDAR"] , _
- ["mmTarget", "CADAR"] , _
- ["mode", "CADR"] , _
- ["op", "CAR"] , _
- ["opcode", "CADR"] , _
- ["opSig", "CADR"] , _
- ["CDR", "CDR"] , _
- ["sig", "CDDR"] , _
- ["source", "CDR"] , _
- ["streamCode", "CADDDR"] , _
- ["streamDef", "CADDR"] , _
- ["streamName", "CADR"] , _
- ["target", "CAR"] _
- ] _
- repeat SETF (GET(CAR i,'SHOESELFUNCTION),CADR i)
-@
-
-<<tokens.clisp>>=
-(EVAL-WHEN (:COMPILE-TOPLEVEL) (PROVIDE "boot-tokens"))
-
-(IMPORT-MODULE "initial-env")
-
-(IN-PACKAGE "BOOTTRAN")
-
-(DEFPARAMETER |shoeKeyWords|
- (LIST (LIST "and" 'AND) (LIST "by" 'BY) (LIST "case" 'CASE)
- (LIST "cross" 'CROSS) (LIST "else" 'ELSE) (LIST "for" 'FOR)
- (LIST "if" 'IF) (LIST "import" 'IMPORT) (LIST "in" 'IN)
- (LIST "is" 'IS) (LIST "isnt" 'ISNT) (LIST "module" 'MODULE)
- (LIST "of" 'OF) (LIST "or" 'OR) (LIST "repeat" 'REPEAT)
- (LIST "return" 'RETURN) (LIST "structure" 'STRUCTURE)
- (LIST "then" 'THEN) (LIST "until" 'UNTIL)
- (LIST "where" 'WHERE) (LIST "while" 'WHILE) (LIST "." 'DOT)
- (LIST ":" 'COLON) (LIST "::" 'COLON-COLON) (LIST "," 'COMMA)
- (LIST ";" 'SEMICOLON) (LIST "*" 'TIMES) (LIST "**" 'POWER)
- (LIST "/" 'SLASH) (LIST "+" 'PLUS) (LIST "-" 'MINUS)
- (LIST "<" 'LT) (LIST ">" 'GT) (LIST "<=" 'LE) (LIST ">=" 'GE)
- (LIST "=" 'SHOEEQ) (LIST "^" 'NOT) (LIST "^=" 'SHOENE)
- (LIST ".." 'SEG) (LIST "#" 'LENGTH) (LIST "=>" 'EXIT)
- (LIST ":=" 'BEC) (LIST "==" 'DEF) (LIST "==>" 'MDEF)
- (LIST "<=>" 'TDEF) (LIST "(" 'OPAREN) (LIST ")" 'CPAREN)
- (LIST "(|" 'OBRACK) (LIST "|)" 'CBRACK) (LIST "[" 'OBRACK)
- (LIST "]" 'CBRACK) (LIST "suchthat" 'BAR) (LIST "'" 'QUOTE)
- (LIST "|" 'BAR)))
-
-(DEFUN |shoeKeyTableCons| ()
- (PROG (|KeyTable|)
- (RETURN
- (PROGN
- (SETQ |KeyTable| (MAKE-HASHTABLE 'CVEC))
- (LET ((|bfVar#1| |shoeKeyWords|) (|st| NIL))
- (LOOP
- (COND
- ((OR (ATOM |bfVar#1|)
- (PROGN (SETQ |st| (CAR |bfVar#1|)) NIL))
- (RETURN NIL))
- ('T (HPUT |KeyTable| (CAR |st|) (CADR |st|))))
- (SETQ |bfVar#1| (CDR |bfVar#1|))))
- |KeyTable|))))
-
-(DEFPARAMETER |shoeKeyTable| (|shoeKeyTableCons|))
-
-(DEFPARAMETER |shoeSPACE| (QENUM " " 0))
-
-(DEFPARAMETER |shoeESCAPE| (QENUM "_ " 0))
-
-(DEFPARAMETER |shoeLispESCAPE| (QENUM "! " 0))
-
-(DEFPARAMETER |shoeSTRINGCHAR| (QENUM "\" " 0))
-
-(DEFPARAMETER |shoePLUSCOMMENT| (QENUM "+ " 0))
-
-(DEFPARAMETER |shoeMINUSCOMMENT| (QENUM "- " 0))
-
-(DEFPARAMETER |shoeDOT| (QENUM ". " 0))
-
-(DEFPARAMETER |shoeEXPONENT1| (QENUM "E " 0))
-
-(DEFPARAMETER |shoeEXPONENT2| (QENUM "e " 0))
-
-(DEFPARAMETER |shoeCLOSEPAREN| (QENUM ") " 0))
-
-(DEFPARAMETER |shoeTAB| 9)
-
-(DEFUN |shoeInsert| (|s| |d|)
- (PROG (|v| |k| |n| |u| |h| |l|)
- (RETURN
- (PROGN
- (SETQ |l| (LENGTH |s|))
- (SETQ |h| (QENUM |s| 0))
- (SETQ |u| (ELT |d| |h|))
- (SETQ |n| (LENGTH |u|))
- (SETQ |k| 0)
- (LOOP
- (COND
- ((< (LENGTH (ELT |u| |k|)) |l|) (RETURN NIL))
- (#0='T (SETQ |k| (+ |k| 1)))))
- (SETQ |v| (MAKE-VEC (+ |n| 1)))
- (LET ((|bfVar#2| (- |k| 1)) (|i| 0))
- (LOOP
- (COND
- ((> |i| |bfVar#2|) (RETURN NIL))
- (#0# (VEC-SETELT |v| |i| (ELT |u| |i|))))
- (SETQ |i| (+ |i| 1))))
- (VEC-SETELT |v| |k| |s|)
- (LET ((|bfVar#3| (- |n| 1)) (|i| |k|))
- (LOOP
- (COND
- ((> |i| |bfVar#3|) (RETURN NIL))
- (#0# (VEC-SETELT |v| (+ |i| 1) (ELT |u| |i|))))
- (SETQ |i| (+ |i| 1))))
- (VEC-SETELT |d| |h| |v|)
- |s|))))
-
-(DEFUN |shoeDictCons| ()
- (PROG (|d| |b| |a| |l|)
- (RETURN
- (PROGN
- (SETQ |l| (HKEYS |shoeKeyTable|))
- (SETQ |d|
- (PROGN
- (SETQ |a| (MAKE-VEC 256))
- (SETQ |b| (MAKE-VEC 1))
- (VEC-SETELT |b| 0 (MAKE-CVEC 0))
- (LET ((|i| 0))
- (LOOP
- (COND
- ((> |i| 255) (RETURN NIL))
- (#0='T (VEC-SETELT |a| |i| |b|)))
- (SETQ |i| (+ |i| 1))))
- |a|))
- (LET ((|bfVar#4| |l|) (|s| NIL))
- (LOOP
- (COND
- ((OR (ATOM |bfVar#4|)
- (PROGN (SETQ |s| (CAR |bfVar#4|)) NIL))
- (RETURN NIL))
- (#0# (|shoeInsert| |s| |d|)))
- (SETQ |bfVar#4| (CDR |bfVar#4|))))
- |d|))))
-
-(DEFPARAMETER |shoeDict| (|shoeDictCons|))
-
-(DEFUN |shoePunCons| ()
- (PROG (|a| |listing|)
- (RETURN
- (PROGN
- (SETQ |listing| (HKEYS |shoeKeyTable|))
- (SETQ |a| (MAKE-BVEC 256))
- (LET ((|i| 0))
- (LOOP
- (COND
- ((> |i| 255) (RETURN NIL))
- (#0='T (BVEC-SETELT |a| |i| 0)))
- (SETQ |i| (+ |i| 1))))
- (LET ((|bfVar#5| |listing|) (|k| NIL))
- (LOOP
- (COND
- ((OR (ATOM |bfVar#5|)
- (PROGN (SETQ |k| (CAR |bfVar#5|)) NIL))
- (RETURN NIL))
- (#0#
- (COND
- ((NULL (|shoeStartsId| (ELT |k| 0)))
- (BVEC-SETELT |a| (QENUM |k| 0) 1)))))
- (SETQ |bfVar#5| (CDR |bfVar#5|))))
- |a|))))
-
-(DEFPARAMETER |shoePun| (|shoePunCons|))
-
-(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL)
- (PROG ()
- (RETURN
- (LET ((|bfVar#6| (LIST 'NOT 'LENGTH)) (|i| NIL))
- (LOOP
- (COND
- ((OR (ATOM |bfVar#6|)
- (PROGN (SETQ |i| (CAR |bfVar#6|)) NIL))
- (RETURN NIL))
- ('T (SETF (GET |i| 'SHOEPRE) 'T)))
- (SETQ |bfVar#6| (CDR |bfVar#6|)))))))
-
-(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL)
- (PROG ()
- (RETURN
- (LET ((|bfVar#7|
- (LIST (LIST 'SHOEEQ '=) (LIST 'TIMES '*)
- (LIST 'PLUS '+) (LIST 'IS '|is|)
- (LIST 'ISNT '|isnt|) (LIST 'AND '|and|)
- (LIST 'OR '|or|) (LIST 'SLASH '/)
- (LIST 'POWER '**) (LIST 'MINUS '-) (LIST 'LT '<)
- (LIST 'GT '>) (LIST 'LE '<=) (LIST 'GE '>=)
- (LIST 'SHOENE '^=)))
- (|i| NIL))
- (LOOP
- (COND
- ((OR (ATOM |bfVar#7|)
- (PROGN (SETQ |i| (CAR |bfVar#7|)) NIL))
- (RETURN NIL))
- ('T (SETF (GET (CAR |i|) 'SHOEINF) (CADR |i|))))
- (SETQ |bfVar#7| (CDR |bfVar#7|)))))))
-
-(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL)
- (PROG ()
- (RETURN
- (LET ((|bfVar#8|
- (LIST (LIST '+ 0) (LIST '|gcd| 0) (LIST '|lcm| 1)
- (LIST 'STRCONC "") (LIST '|strconc| "")
- (LIST 'MAX (- 999999)) (LIST 'MIN 999999)
- (LIST '* 1) (LIST '|times| 1) (LIST 'CONS NIL)
- (LIST 'APPEND NIL) (LIST '|append| NIL)
- (LIST 'UNION NIL) (LIST 'UNIONQ NIL)
- (LIST '|union| NIL) (LIST 'NCONC NIL)
- (LIST '|and| 'T) (LIST '|or| NIL) (LIST 'AND 'T)
- (LIST 'OR NIL)))
- (|i| NIL))
- (LOOP
- (COND
- ((OR (ATOM |bfVar#8|)
- (PROGN (SETQ |i| (CAR |bfVar#8|)) NIL))
- (RETURN NIL))
- ('T (SETF (GET (CAR |i|) 'SHOETHETA) (CDR |i|))))
- (SETQ |bfVar#8| (CDR |bfVar#8|)))))))
-
-(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL)
- (PROG ()
- (RETURN
- (LET ((|bfVar#9|
- (LIST (LIST '|and| 'AND) (LIST '|append| 'APPEND)
- (LIST '|apply| 'APPLY) (LIST '|atom| 'ATOM)
- (LIST '|car| 'CAR) (LIST '|cdr| 'CDR)
- (LIST '|cons| 'CONS) (LIST '|copy| 'COPY)
- (LIST '|croak| 'CROAK) (LIST '|drop| 'DROP)
- (LIST '|exit| 'EXIT) (LIST '|false| 'NIL)
- (LIST '|first| 'CAR) (LIST '|function| 'FUNCTION)
- (LIST '|genvar| 'GENVAR) (LIST 'IN 'MEMBER)
- (LIST '|is| 'IS) (LIST '|isnt| 'ISNT)
- (LIST '|lastNode| 'LAST) (LIST 'LAST '|last|)
- (LIST '|list| 'LIST) (LIST '|mkpf| 'MKPF)
- (LIST '|nconc| 'NCONC) (LIST '|nil| NIL)
- (LIST '|not| 'NULL) (LIST 'NOT 'NULL)
- (LIST '|nreverse| 'NREVERSE) (LIST '|null| 'NULL)
- (LIST '|or| 'OR) (LIST '|otherwise| 'T)
- (LIST 'PAIRP 'CONSP)
- (LIST '|removeDuplicates| 'REMDUP)
- (LIST '|rest| 'CDR) (LIST '|reverse| 'REVERSE)
- (LIST '|setDifference| 'SETDIFFERENCE)
- (LIST '|setIntersection| 'INTERSECTION)
- (LIST '|setPart| 'SETELT)
- (LIST '|setUnion| 'UNION) (LIST '|size| 'SIZE)
- (LIST '|strconc| 'CONCAT)
- (LIST '|substitute| 'SUBST) (LIST '|take| 'TAKE)
- (LIST '|true| 'T) (LIST 'PLUS '+)
- (LIST 'MINUS '-) (LIST 'TIMES '*)
- (LIST 'POWER 'EXPT) (LIST 'SLASH '/)
- (LIST 'LT '<) (LIST 'GT '>) (LIST 'LE '<=)
- (LIST 'GE '>=) (LIST 'SHOEEQ 'EQUAL)
- (LIST 'SHOENE '/=) (LIST 'T 'T$)))
- (|i| NIL))
- (LOOP
- (COND
- ((OR (ATOM |bfVar#9|)
- (PROGN (SETQ |i| (CAR |bfVar#9|)) NIL))
- (RETURN NIL))
- ('T (SETF (GET (CAR |i|) 'SHOERENAME) (CDR |i|))))
- (SETQ |bfVar#9| (CDR |bfVar#9|)))))))
-
-(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL)
- (PROG ()
- (RETURN
- (LET ((|bfVar#10|
- (LIST (LIST 'PLUS 'PLUS) (LIST '|and| 'AND)
- (LIST '|append| 'APPEND) (LIST '|apply| 'APPLY)
- (LIST '|atom| 'ATOM) (LIST '|brace| 'REMDUP)
- (LIST '|car| 'CAR) (LIST '|cdr| 'CDR)
- (LIST '|cons| 'CONS) (LIST '|copy| 'COPY)
- (LIST '|croak| 'CROAK) (LIST '|drop| 'DROP)
- (LIST '|exit| 'EXIT) (LIST '|false| 'NIL)
- (LIST '|first| 'CAR) (LIST '|genvar| 'GENVAR)
- (LIST '|in| '|member|) (LIST '|is| 'IS)
- (LIST '|lastNode| 'LASTNODE) (LIST '|list| 'LIST)
- (LIST '|mkpf| 'MKPF) (LIST '|nconc| 'NCONC)
- (LIST '|nil| 'NIL) (LIST '|not| 'NULL)
- (LIST 'NOT 'NULL) (LIST '|nreverse| 'NREVERSE)
- (LIST '|null| 'NULL) (LIST '|or| 'OR)
- (LIST '|otherwise| 'T)
- (LIST '|removeDuplicates| 'REMDUP)
- (LIST '|rest| 'CDR) (LIST '|return| 'RETURN)
- (LIST '|reverse| 'REVERSE)
- (LIST '|setDifference| 'SETDIFFERENCE)
- (LIST '|setIntersection| '|intersection|)
- (LIST '|setPart| 'SETELT)
- (LIST '|setUnion| '|union|) (LIST '|size| 'SIZE)
- (LIST '|strconc| 'STRCONC)
- (LIST '|substitute| 'MSUBST)
- (LIST 'SUBST 'MSUBST) (LIST '|take| 'TAKE)
- (LIST '|true| 'T) (LIST '|where| 'WHERE)
- (LIST 'TIMES 'TIMES) (LIST 'POWER 'EXPT)
- (LIST 'NOT 'NULL) (LIST 'SHOENE 'NEQUAL)
- (LIST 'MINUS 'SPADDIFFERENCE)
- (LIST 'SLASH 'QUOTIENT) (LIST '= 'EQUAL)
- (LIST 'SHOEEQ 'EQUAL) (LIST 'ASSOC '|assoc|)
- (LIST 'DELETE '|delete|) (LIST 'GET 'GETL)
- (LIST 'INTERSECTION '|intersection|)
- (LIST 'LAST '|last|) (LIST 'MEMBER '|member|)
- (LIST 'RASSOC '|rassoc|) (LIST 'READ 'VMREAD)
- (LIST 'READ-LINE '|read-line|)
- (LIST 'REDUCE 'SPADREDUCE)
- (LIST 'REMOVE '|remove|) (LIST 'BAR 'SUCHTHAT)
- (LIST 'T 'T$) (LIST 'IN '|member|)
- (LIST 'UNION '|union|)))
- (|i| NIL))
- (LOOP
- (COND
- ((OR (ATOM |bfVar#10|)
- (PROGN (SETQ |i| (CAR |bfVar#10|)) NIL))
- (RETURN NIL))
- ('T (SETF (GET (CAR |i|) 'OLD-BOOT) (CDR |i|))))
- (SETQ |bfVar#10| (CDR |bfVar#10|)))))))
-
-(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL)
- (PROG ()
- (RETURN
- (LET ((|bfVar#11|
- (LIST 'LT 'LE 'GT 'GE 'SHOENE 'TIMES 'PLUS 'MINUS
- '|function| 'PAIRP))
- (|i| NIL))
- (LOOP
- (COND
- ((OR (ATOM |bfVar#11|)
- (PROGN (SETQ |i| (CAR |bfVar#11|)) NIL))
- (RETURN NIL))
- ('T (SETF (GET |i| 'RENAME-OK) T)))
- (SETQ |bfVar#11| (CDR |bfVar#11|)))))))
-
-(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL)
- (PROG ()
- (RETURN
- (LET ((|bfVar#12|
- (LIST (LIST '|setName| 0) (LIST '|setLabel| 1)
- (LIST '|setLevel| 2) (LIST '|setType| 3)
- (LIST '|setVar| 4) (LIST '|setLeaf| 5)
- (LIST '|setDef| 6) (LIST '|aGeneral| 4)
- (LIST '|aMode| 1) (LIST '|aModeSet| 3)
- (LIST '|aTree| 0) (LIST '|aValue| 2)
- (LIST '|attributes| 'CADDR)
- (LIST '|cacheCount| 'CADDDDR)
- (LIST '|cacheName| 'CADR)
- (LIST '|cacheReset| 'CADDDR)
- (LIST '|cacheType| 'CADDR) (LIST '|env| 'CADDR)
- (LIST '|expr| 'CAR) (LIST 'CAR 'CAR)
- (LIST '|mmCondition| 'CAADR) (LIST '|mmDC| 'CAAR)
- (LIST '|mmImplementation| 'CADADR)
- (LIST '|mmSignature| 'CDAR)
- (LIST '|mmTarget| 'CADAR) (LIST '|mode| 'CADR)
- (LIST '|op| 'CAR) (LIST '|opcode| 'CADR)
- (LIST '|opSig| 'CADR) (LIST 'CDR 'CDR)
- (LIST '|sig| 'CDDR) (LIST '|source| 'CDR)
- (LIST '|streamCode| 'CADDDR)
- (LIST '|streamDef| 'CADDR)
- (LIST '|streamName| 'CADR) (LIST '|target| 'CAR)))
- (|i| NIL))
- (LOOP
- (COND
- ((OR (ATOM |bfVar#12|)
- (PROGN (SETQ |i| (CAR |bfVar#12|)) NIL))
- (RETURN NIL))
- ('T (SETF (GET (CAR |i|) 'SHOESELFUNCTION) (CADR |i|))))
- (SETQ |bfVar#12| (CDR |bfVar#12|)))))))
-
-@
-\eject
-
-\section*{Acknowledgment}
-Gabriel Dos Reis contributed initial documentation of this pamphlet.
-
-\end{document}