Personal tools
You are here: Home Projects LISP Stanford LISP_360 lisp.debug_package.s.8.html
Document Actions

lisp.debug_package.s.8.html

by Paul McJones last modified 2017-02-18 04:06

Click here to get the file

Size 5.0 kB - File type text/html

File contents

<html>
<head>
<title>LISP/360 debug package</title>
</head>
<body>
<pre>
DEFLIST (( (ERT (LAMBDA (;ERTA)
   (PROG (;LISTEN W Q)
       (PRIN1 (QUOTE >>>))
       (MAPCAR ;ERTA (FUNCTION (LAMBDA (X) (PROG2 (PRIN0 X)
          (PRIN1 (QUOTE $$$ $))))))
       (TERPRI)
       (PRINT (QUOTE LISTENING))
   LISTEN
         (COND ((ATOM (ERRORSET (QUOTE (SETQ ;LISTEN (READ))) T)) NIL)
             ((MEMQ ;LISTEN (QUOTE (T $$*$P*))) (RETURN T))
             ((NULL ;LISTEN) (RETURN NIL))
             ((EQ (CAR ;LISTEN) (QUOTE RETURN))
                  (RETURN (EVAL (CADR ;LISTEN) ALIST)))
               (T (ERRORSET (QUOTE (PRINT (EVAL ;LISTEN ALIST))) T)))
       (GO LISTEN))))
 ) EXPR)
 
DEFLIST ((
 
(DELQ (LAMBDA (U V)
   (COND ((NULL V) NIL)
       ((EQ U (CAR V)) (CDR V))
       (T (CONS (CAR V) (DELQ U (CDR V)))))))
 
(PUTPROP (LAMBDA (U V W)
   (DEFLIST (LIST (LIST U V)) W)))
 
(MEMQ (LAMBDA (U V)
   (COND ((NULL V) NIL)
       ((EQ U (CAR V)) V)
       (T (MEMQ U (CDR V))))))
 
(GETL (LAMBDA (U V)
   (COND ((NULL V) NIL)
       (T ((LAMBDA (W) (COND (W W)
                             (T (GETL U (CDR V)))))
            (MEMQ (CAR V) (CDR U)))))))
 
) EXPR)
 
DEFLIST (((BREAK (LAMBDA (A B) (MAPCAR A (QUOTE BREAK1)))))FEXPR)
 
DEFLIST ((
 
(BREAK1 (LAMBDA (A)
   (PROG (X Y Z W)
       (SETQ Y T)
       (COND ((NULL (ATOM A)) (PROG2 (SETQ Y (CADR A)) (SETQ A (CAR A)))))
       (OR (SETQ X (GETL A (QUOTE (EXPR FEXPR SUBR FSUBR))))
          (RETURN (PRINT (LIST A (QUOTE UNDEFINED)))))
       (AND (MEMQ (CAR X) (QUOTE (EXPR FEXPR)))
          (EQ (CAADR (CDADR X)) (QUOTE BREAK2))
          (RETURN (PRINT (LIST A (QUOTE $$$ALREADY BROKEN$)))))
       (SETQ W (COND ((MEMQ (CAR X) (QUOTE (FEXPR FSUBR))) (QUOTE (;A ;A2)))
                     ((EQ (CAR X) (QUOTE EXPR)) (BREAK4 (CADR (CADR X))
                          (QUOTE (;A1 ;A2 ;A3 ;A4 ;A5 ;A6 ;A7))))
                     (T (BREAK5 (LEFTSHIFT (CDR X) -24) (QUOTE (;A1 ;A2 ;A3 ;A4 ;A5 ;A6 ;A7))))))
       (PUTPROP A
          (LIST (QUOTE LAMBDA)
             W
             (LIST (QUOTE BREAK2)
                (QUOTIFY A)
                (COND ((MEMQ (CAR X) (QUOTE (FEXPR FSUBR))) (QUOTE (LIST ;A ;A2)))
                      (T (CONS (QUOTE LIST) W)))
                (QUOTIFY (CAR X))
                (QUOTIFY (COND ((MEMQ (CAR X) (QUOTE (EXPR FEXPR)))
                              (CADR (CADR X)))  (T NIL)))
                (QUOTIFY (SETQ Z (GENSYM1 (QUOTE XXX))))
                (QUOTIFY Y)
                (COND ((MEMQ (CAR X) (QUOTE (FEXPR FSUBR))) (QUOTE ;A2))
                      (T (QUOTE ALIST)))))
          (QUOTE BREXPR))
       (RPLACA (GETL A (QUOTE (BREXPR)))
             (COND ((MEMQ (CAR X) (QUOTE (FEXPR FSUBR))) (QUOTE FEXPR))
                   (T (QUOTE EXPR))))
       (PUTPROP Z (CADR X) (CAR X))
       (RPLACA X (QUOTE BREXPR))
          (PRINT A)
       (RETURN (CSETQ BREAKLIST (CONS A BREAKLIST))))))
  
(BREAK5 (LAMBDA (X Y) (COND ((LESSP X 1) NIL)
                            (T (CONS (CAR Y) (BREAK5 (SUB1 X) (CDR Y)))))))
  
(QUOTIFY (LAMBDA (X) (COND ((MEMQ X (QUOTE (T NIL))) X)
                           (T (LIST (QUOTE QUOTE) X)))))
  
) EXPR)
 
CSETQ (BREAKLIST NIL)
DEFLIST ((
  
(UNBREAK (LAMBDA (A B)
   (MAPCAR (COND (A A) (T BREAKLIST)) (FUNCTION (LAMBDA (X)
       (PROG (Y Z)
          (AND (SETQ Y (GETL X (QUOTE (EXPR FEXPR))))
             (EQ (CAADR (CDADR Y)) (QUOTE BREAK2))
             (SETQ Z (GETL X (QUOTE (BREXPR))))
             (NOT (REMPROP X (CAR Y)))
             (RPLACA Z (CADAR (CDDDR (CADDR (CADR Y)))))
             (PRINT X)
             (CSETQ BREAKLIST (DELQ X BREAKLIST))
             )))))))
  
) FEXPR)
  
DEFLIST ((
  
(BREAK2 (LAMBDA (;NAME ;ARG ;TYPE ;VARS ;FN ;COND ;ALIST)
   (PROG (VALUE ;XX)
       (SETQ ;VARS (COND (;VARS ;VARS)
          ((EQ ;TYPE (QUOTE FSUBR)) (QUOTE (ARG A)))
           (T (BREAK4 ;ARG (QUOTE (ARG1 ARG2 ARG3 ARG4 ARG5 ARG6 ARG7))))))
       (EVAL (LIST (QUOTE PROG) ;VARS (QUOTE (BREAK3))) ALIST)
       (RETURN VALUE))))
 
(BREAK4 (LAMBDA (U V)
   (COND ((NULL U) NIL)
          (T (CONS (CAR V) (BREAK4 (CDR U) (CDR V)))))))
  
(BREAK3 (LAMBDA NIL
   (PROG NIL
       (MYSET ;VARS ;ARG)
       (AND (SETQ ;XX (EVAL ;COND ALIST))
          (APPLY (QUOTE ERT) (LIST (LIST (QUOTE ENTERING)
                               ;NAME ;TYPE ;VARS)) ALIST))
       (SETQ VALUE (COND ((MEMQ ;TYPE (QUOTE (FEXPR FSUBR))) 
                          (EVAL (CONS ;FN (CAR ;ARG)) ;ALIST))
                         (T (APPLY ;FN ;ARG ;ALIST))))
       (AND ;XX (APPLY (QUOTE ERT) (LIST (LIST (QUOTE EXITING) ;NAME)) ALIST)))))
  
(MYSET (LAMBDA (;U ;V)
   (COND ((NULL ;U) NIL)
         (T (PROG2 (SET (CAR ;U) (CAR ;V)) (MYSET (CDR ;U) (CDR ;V)))))))
   
) EXPR)
 
DEFLIST ((
 
(PRIN0 (LAMBDA (U)
   (PROG NIL
      (COND ((ATOM U) (RETURN (PRIN1 U))))
      (PRIN1 (QUOTE $$$($))
   A  (COND ((NULL U) (GO B))  ((ATOM U) (GO C)))
      (PRIN0 (CAR U))
      (COND ((CDR U) (PRIN1 (QUOTE $$$ $))))
      (SETQ U (CDR U))
      (GO A)
   B  (RETURN (PRIN1 (QUOTE $$$)$)))
   C  (PRIN1 (QUOTE $$$.$))
      (PRIN1 (QUOTE $$$ $))
      (PRIN1 U)
      (GO B))))
 
) EXPR)
</pre>
</body>
</html>
« May 2024 »
Su Mo Tu We Th Fr Sa
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
 

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: