[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

read



I want to parse a bunch of files for class definitions, and in my
preliminary setup I did this:

(defvar test)
(setf test (merge-pathnames 
            (make-pathname :directory 
                           '(:absolute "miles" "users" "robby" 
                              "job" "code" :wild-inferiors) 
                           :defaults *default-pathname-defaults*) 
            *.lisp-pathname*))

(dolist (p (directory test))
  (with-open-file (f p)
    (let ((g (gensym)))
      (do ((item (read f nil g) (read f nil g)))
          ((equal g item))
        (let ((cl (when (listp item) (find 'defclass item))))
          (when cl
            (format t "~a: ~a~%" (pathname-name p) (cadr item))))))))

When I evaluate the last form, this is the output:
? auto-offscreen-window: AUTO-OFFSCREEN-WINDOW
gworld: GWORLD
resizeable-window-object: RESIZEABLE-WINDOW
rubber-band-window: RUBBER-BAND-WINDOW
about: ABOUT
analysis: ANALYZED-YAC
display: SCALABLE-WINDOW
display: DUALLY-SCALABLE-WINDOW
display: KEYBOARD-WINDOW
display: COPYABLE-WINDOW
display: IPM-WINDOW
simulator: INTERVAL
simulator: INTERVAL-SET
simulator: INTERVAL-SET-SET
simulator: YAC
simulator: CHIMERIC-YAC
simulator: CHIMERIC-YACS
simulator: YACS
simulator: STS
simulator: STSS
simulator: RH
simulator: RHS
analysis: GRAPH-WINDOW
analysis: SIG-WINDOW
> Error: There is no package named "RU" .
> While executing: CCL::%READ-FORM
> Type Command-/ to continue, Command-. to abort.
> If continued: Retry finding package with name "RU".
See the Restarts~ menu item for further choices.
1 > 

The form that it is balking on is:
(setf r (RU::open-resource-file "User:Robby:WDEF.rsrc"))

Is there some way I can avoid this? What is read trying to do that it
needs to know about the package ru, anyways?

Robby