 
; )package "BOOTTRAN"
 
(IN-PACKAGE "BOOTTRAN")
 
; shoeKeyWords := [  _
;             ['"and","AND"] , _
;             ['"by", "BY" ], _
;             ['"case","CASE"] , _
;             ['"cross","CROSS"] , _
;             ['"else", "ELSE"] , _
;             ['"for",  "FOR"] , _
;             ['"if", "IF"], _
;             ['"in",  "IN" ], _
;             ['"is", "IS"], _
;             ['"isnt", "ISNT"] , _
;             ['"of",   "OF"] , _
;             ['"or",   "OR"] , _
;             ['"repeat", "REPEAT"] , _
;             ['"return", "RETURN"], _
;             ['"structure", "STRUCTURE"], _
;             ['"then",  "THEN"], _
;             ['"until",  "UNTIL"], _
;             ['"where",  "WHERE"], _
;             ['"while",  "WHILE"], _
;             ['".", "DOT"], _
;             ['":", "COLON"], _
;             ['",", "COMMA"], _
;             ['";", "SEMICOLON"], _
;             ['"*", "TIMES"], _
;             ['"**", "POWER"], _
;             ['"/",  "SLASH"], _
;             ['"+", "PLUS"], _
;             ['"-", "MINUS"], _
;             ['"<", "LT"], _
;             ['">", "GT"] , _
;             ['"<=","LE" ], _
;             ['">=","GE" ], _
;             ['"=", "SHOEEQ"], _
;             ['"^", "NOT"], _
;             ['"~=","SHOENE" ], _
;             ['"..","SEG" ], _
;             ['"#", "LENGTH"], _
;             ['"=>","EXIT" ], _
;             ['":=", "BEC"], _
;             ['"==", "DEF"], _
;             ['"==>","MDEF" ], _
;             ['"(", "OPAREN"], _
;             ['")", "CPAREN"], _
;             ['"(|", "OBRACK"], _
;             ['"|)", "CBRACK"], _
;             ['"[", "OBRACK"], _
;             ['"]", "CBRACK"], _
;             ['"suchthat","BAR"], _
;             ['"'", "QUOTE"], _
;             ['"|", "BAR"]                          ]
 
(EVAL-WHEN (EVAL LOAD)
  (SETQ |shoeKeyWords|
        (LIST (LIST "and" 'AND) (LIST "by" 'BY) (LIST "case" 'CASE)
              (LIST "cross" 'CROSS) (LIST "else" 'ELSE)
              (LIST "for" 'FOR) (LIST "if" 'IF) (LIST "in" 'IN)
              (LIST "is" 'IS) (LIST "isnt" 'ISNT) (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 "," '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 "(" 'OPAREN)
              (LIST ")" 'CPAREN) (LIST "(|" 'OBRACK)
              (LIST "|)" 'CBRACK) (LIST "[" 'OBRACK) (LIST "]" 'CBRACK)
              (LIST "suchthat" 'BAR) (LIST "'" 'QUOTE) (LIST "|" 'BAR))))
 
; shoeKeyTable:=shoeKeyTableCons()
 
(EVAL-WHEN (EVAL LOAD) (SETQ |shoeKeyTable| (|shoeKeyTableCons|)))
 
; shoeSPACE       := QENUM('"    ", 0)
 
(EVAL-WHEN (EVAL LOAD) (SETQ |shoeSPACE| (QENUM "    " 0)))
 
; shoeESCAPE      := QENUM('"__  ", 0)
 
(EVAL-WHEN (EVAL LOAD) (SETQ |shoeESCAPE| (QENUM "_  " 0)))
 
; shoeLispESCAPE      := QENUM('"!  ", 0)
 
(EVAL-WHEN (EVAL LOAD) (SETQ |shoeLispESCAPE| (QENUM "!  " 0)))
 
; shoeSTRING_CHAR := QENUM('"_"  ", 0)
 
(EVAL-WHEN (EVAL LOAD) (SETQ |shoeSTRINGCHAR| (QENUM "\"  " 0)))
 
; shoePLUSCOMMENT := QENUM('"+   ", 0)
 
(EVAL-WHEN (EVAL LOAD) (SETQ |shoePLUSCOMMENT| (QENUM "+   " 0)))
 
; shoeMINUSCOMMENT:= QENUM('"-   ", 0)
 
(EVAL-WHEN (EVAL LOAD) (SETQ |shoeMINUSCOMMENT| (QENUM "-   " 0)))
 
; shoeDOT         := QENUM('".   ", 0)
 
(EVAL-WHEN (EVAL LOAD) (SETQ |shoeDOT| (QENUM ".   " 0)))
 
; shoeEXPONENT1   := QENUM('"E   ", 0)
 
(EVAL-WHEN (EVAL LOAD) (SETQ |shoeEXPONENT1| (QENUM "E   " 0)))
 
; shoeEXPONENT2   := QENUM('"e   ", 0)
 
(EVAL-WHEN (EVAL LOAD) (SETQ |shoeEXPONENT2| (QENUM "e   " 0)))
 
; shoeCLOSEPAREN  := QENUM('")   ", 0)
 
(EVAL-WHEN (EVAL LOAD) (SETQ |shoeCLOSEPAREN| (QENUM ")   " 0)))
 
; shoeTAB := 9
 
(EVAL-WHEN (EVAL LOAD) (SETQ |shoeTAB| 9))
 
; shoeDict:=shoeDictCons()
 
(EVAL-WHEN (EVAL LOAD) (SETQ |shoeDict| (|shoeDictCons|)))
 
; shoePun:=shoePunCons()
 
(EVAL-WHEN (EVAL LOAD) (SETQ |shoePun| (|shoePunCons|)))
 
; for i in [ _
;              "NOT", _
; --           "COLON", _
; --           "SHOEEQ", _
;              "LENGTH"  _
;                      ] _
;        repeat SETF (GET(i,'SHOEPRE),'T)
 
(EVAL-WHEN (EVAL LOAD)
  (PROG ()
    (RETURN
      ((LAMBDA (|bfVar#1| |i|)
         (LOOP
           (COND
             ((OR (ATOM |bfVar#1|)
                  (PROGN (SETQ |i| (CAR |bfVar#1|)) NIL))
              (RETURN NIL))
             ('T (SETF (GET |i| 'SHOEPRE) 'T)))
           (SETQ |bfVar#1| (CDR |bfVar#1|))))
       (LIST 'NOT 'LENGTH) NIL))))
 
; 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)
 
(EVAL-WHEN (EVAL LOAD)
  (PROG ()
    (RETURN
      ((LAMBDA (|bfVar#2| |i|)
         (LOOP
           (COND
             ((OR (ATOM |bfVar#2|)
                  (PROGN (SETQ |i| (CAR |bfVar#2|)) NIL))
              (RETURN NIL))
             ('T (SETF (GET (CAR |i|) 'SHOEINF) (CADR |i|))))
           (SETQ |bfVar#2| (CDR |bfVar#2|))))
       (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 '~=))
       NIL))))
 
; 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)
 
(EVAL-WHEN (EVAL LOAD)
  (PROG ()
    (RETURN
      ((LAMBDA (|bfVar#3| |i|)
         (LOOP
           (COND
             ((OR (ATOM |bfVar#3|)
                  (PROGN (SETQ |i| (CAR |bfVar#3|)) NIL))
              (RETURN NIL))
             ('T (SETF (GET (CAR |i|) 'SHOETHETA) (CDR |i|))))
           (SETQ |bfVar#3| (CDR |bfVar#3|))))
       (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))))
 
; 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)
 
(EVAL-WHEN (EVAL LOAD)
  (PROG ()
    (RETURN
      ((LAMBDA (|bfVar#4| |i|)
         (LOOP
           (COND
             ((OR (ATOM |bfVar#4|)
                  (PROGN (SETQ |i| (CAR |bfVar#4|)) NIL))
              (RETURN NIL))
             ('T (SETF (GET (CAR |i|) 'SHOERENAME) (CDR |i|))))
           (SETQ |bfVar#4| (CDR |bfVar#4|))))
       (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))))
 
; 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)
 
(EVAL-WHEN (EVAL LOAD)
  (PROG ()
    (RETURN
      ((LAMBDA (|bfVar#5| |i|)
         (LOOP
           (COND
             ((OR (ATOM |bfVar#5|)
                  (PROGN (SETQ |i| (CAR |bfVar#5|)) NIL))
              (RETURN NIL))
             ('T (SETF (GET (CAR |i|) 'SHOESELFUNCTION) (CADR |i|))))
           (SETQ |bfVar#5| (CDR |bfVar#5|))))
       (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))))
