aboutsummaryrefslogtreecommitdiff
path: root/src/boot/tokens.boot.pamphlet
diff options
context:
space:
mode:
Diffstat (limited to 'src/boot/tokens.boot.pamphlet')
-rw-r--r--src/boot/tokens.boot.pamphlet751
1 files changed, 751 insertions, 0 deletions
diff --git a/src/boot/tokens.boot.pamphlet b/src/boot/tokens.boot.pamphlet
new file mode 100644
index 00000000..4e429a81
--- /dev/null
+++ b/src/boot/tokens.boot.pamphlet
@@ -0,0 +1,751 @@
+\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"], _
+ ['"^=","NE" ], _
+ ['"..","SEG" ], _
+ ['"#", "LENGTH"], _
+ ['"=>","EXIT" ], _
+ ['":=", "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" ,">="], _
+ ["NE" ,"^="] _
+ ]_
+ 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"], _
+ ["NE", "/="], _
+ ["T", "T$"] _
+ ]
+ repeat SETF (GET(CAR i,'SHOERENAME),CDR i)
+
+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")
+
+(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL)
+ (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 "^=" 'NE) (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))
+ ((LAMBDA (|bfVar#1| |st|)
+ (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|))))
+ |shoeKeyWords| NIL)
+ |KeyTable|))))
+
+(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL)
+ (DEFPARAMETER |shoeKeyTable| (|shoeKeyTableCons|)))
+
+(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL)
+ (DEFPARAMETER |shoeSPACE| (QENUM " " 0)))
+
+(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL)
+ (DEFPARAMETER |shoeESCAPE| (QENUM "_ " 0)))
+
+(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL)
+ (DEFPARAMETER |shoeLispESCAPE| (QENUM "! " 0)))
+
+(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL)
+ (DEFPARAMETER |shoeSTRINGCHAR| (QENUM "\" " 0)))
+
+(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL)
+ (DEFPARAMETER |shoePLUSCOMMENT| (QENUM "+ " 0)))
+
+(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL)
+ (DEFPARAMETER |shoeMINUSCOMMENT| (QENUM "- " 0)))
+
+(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL)
+ (DEFPARAMETER |shoeDOT| (QENUM ". " 0)))
+
+(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL)
+ (DEFPARAMETER |shoeEXPONENT1| (QENUM "E " 0)))
+
+(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL)
+ (DEFPARAMETER |shoeEXPONENT2| (QENUM "e " 0)))
+
+(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL)
+ (DEFPARAMETER |shoeCLOSEPAREN| (QENUM ") " 0)))
+
+(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL) (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)
+ ((LAMBDA ()
+ (LOOP
+ (COND
+ ((< (LENGTH (ELT |u| |k|)) |l|) (RETURN NIL))
+ (#0='T (SETQ |k| (+ |k| 1)))))))
+ (SETQ |v| (MAKE-VEC (+ |n| 1)))
+ ((LAMBDA (|bfVar#2| |i|)
+ (LOOP
+ (COND
+ ((> |i| |bfVar#2|) (RETURN NIL))
+ (#0# (VEC-SETELT |v| |i| (ELT |u| |i|))))
+ (SETQ |i| (+ |i| 1))))
+ (- |k| 1) 0)
+ (VEC-SETELT |v| |k| |s|)
+ ((LAMBDA (|bfVar#3| |i|)
+ (LOOP
+ (COND
+ ((> |i| |bfVar#3|) (RETURN NIL))
+ (#0# (VEC-SETELT |v| (+ |i| 1) (ELT |u| |i|))))
+ (SETQ |i| (+ |i| 1))))
+ (- |n| 1) |k|)
+ (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))
+ ((LAMBDA (|i|)
+ (LOOP
+ (COND
+ ((> |i| 255) (RETURN NIL))
+ (#0='T (VEC-SETELT |a| |i| |b|)))
+ (SETQ |i| (+ |i| 1))))
+ 0)
+ |a|))
+ ((LAMBDA (|bfVar#4| |s|)
+ (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|))))
+ |l| NIL)
+ |d|))))
+
+(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL)
+ (DEFPARAMETER |shoeDict| (|shoeDictCons|)))
+
+(DEFUN |shoePunCons| ()
+ (PROG (|a| |listing|)
+ (RETURN
+ (PROGN
+ (SETQ |listing| (HKEYS |shoeKeyTable|))
+ (SETQ |a| (MAKE-BVEC 256))
+ ((LAMBDA (|i|)
+ (LOOP
+ (COND
+ ((> |i| 255) (RETURN NIL))
+ (#0='T (BVEC-SETELT |a| |i| 0)))
+ (SETQ |i| (+ |i| 1))))
+ 0)
+ ((LAMBDA (|bfVar#5| |k|)
+ (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|))))
+ |listing| NIL)
+ |a|))))
+
+(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL)
+ (DEFPARAMETER |shoePun| (|shoePunCons|)))
+
+(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL)
+ (PROG ()
+ (RETURN
+ ((LAMBDA (|bfVar#6| |i|)
+ (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|))))
+ (LIST 'NOT 'LENGTH) NIL))))
+
+(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL)
+ (PROG ()
+ (RETURN
+ ((LAMBDA (|bfVar#7| |i|)
+ (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|))))
+ (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 'NE '^=))
+ NIL))))
+
+(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL)
+ (PROG ()
+ (RETURN
+ ((LAMBDA (|bfVar#8| |i|)
+ (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|))))
+ (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))
+ NIL))))
+
+(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL)
+ (PROG ()
+ (RETURN
+ ((LAMBDA (|bfVar#9| |i|)
+ (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|))))
+ (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 'NE '/=) (LIST 'T 'T$))
+ NIL))))
+
+(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL)
+ (PROG ()
+ (RETURN
+ ((LAMBDA (|bfVar#10| |i|)
+ (LOOP
+ (COND
+ ((OR (ATOM |bfVar#10|)
+ (PROGN (SETQ |i| (CAR |bfVar#10|)) NIL))
+ (RETURN NIL))
+ ('T (SETF (GET (CAR |i|) 'SHOESELFUNCTION) (CADR |i|))))
+ (SETQ |bfVar#10| (CDR |bfVar#10|))))
+ (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))
+ NIL))))
+
+@
+\eject
+
+\section*{Acknowledgment}
+Gabriel Dos Reis contributed initial documentation of this pamphlet.
+
+\end{document}