Literate files and ASDF

C Y <[email protected]> Sat, 9 Jun 2007 15:02:25 -0700 (PDT)
Newsgroups gmane.lisp.cclan.general
Message-ID <[email protected]>
Hi!  I'm looking to add support for loading WEB files in the tradition
of Knuth's literate programming to ASDF (as an extension, not as
default functionality.)  The details of parsing those files are delt
with elsewhere and are assumed for this exercise. I would like to be
able to specify a system using these files in ASDF directly.  (This is
for the Axiom computer algebra project - we call our literate files
pamphlet files.)  Something like:

(defsystem #:boot
  :name "BOOT Language Compiler"
  :author "The Axiom Team"
  :version "1.0"
  :components
  ((:module "BOOT-BOOTSTRAP"
            :pathname #.(make-pathname :directory '(:relative "src"
"boot"))
            :components
            ((:cl-pamphlet "ptyout" :chunk "ptyout.clisp")
             (:cl-pamphlet "tytree1" :chunk "tytree1.clisp")))
    (:module "BOOT"
            :pathname #.(make-pathname :directory '(:relative "src"
"boot"))
            :components
            ((:boot-pamphlet "ptyout" :chunk "*")
             (:boot-pamphlet "tytree1" :chunk "*"))))

Is what I would like to do.  I know I need to define new source file
subclasses and perform methods - what I'm not sure about is how to read
the chunk information into the asdf system in such a way that I can
make use of it within those perform methods.  

Reading the asdf source code, I'm thinking that I would have to define
custom versions of the component parser and possibly the toplevel
defsystem macro itself in order to be able to read the extra :chunk
information in the component definition - is this true?  I guess it's
reasonable but i wasn't sure if there was some defmethod related
parsing extension mechanism where I could just define a subclass of
component with the requirement of the :chunk input and define a
component parsing extenstion of some sort.  Can one of the asdf gurus
tell me if the "approved" way to do this is in fact a custom parser and
defsystem variation?

Cheers,
CY



       
____________________________________________________________________________________
Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/