cludg

Class summary
defclass-descriptor inherits from structured-object-descriptor
defconstant-descriptor inherits from param-descriptor
defgeneric-descriptor inherits from lambda-descriptor
define-condition-descriptor inherits from structured-object-descriptor
defmacro-descriptor inherits from lambda-descriptor
defmethod-descriptor inherits from lambda-descriptor
defpackage-descriptor inherits from symbol-descriptor
defparameter-descriptor inherits from param-descriptor
defsetf-descriptor inherits from lambda-descriptor
defsetf-long-descriptor inherits from defsetf-descriptor
defsetf-short-descriptor inherits from defsetf-descriptor
defstruct-descriptor inherits from structured-object-descriptor
defstruct-slot-descriptor inherits from slot-descriptor
deftype-descriptor inherits from param-descriptor
defun-descriptor inherits from lambda-descriptor
defvar-descriptor inherits from param-descriptor
driver
in-package-form inherits from symbol-descriptor
lambda-descriptor inherits from symbol-descriptor
param-descriptor inherits from symbol-descriptor
slot-descriptor inherits from symbol-descriptor
structured-object-descriptor inherits from symbol-descriptor
symbol-descriptor
text inherits from driver
Method summary
accessors slot-descriptor
allocation-type slot-descriptor
cname slot-descriptor
conc-name defstruct-descriptor
constructors defstruct-descriptor
copier defstruct-descriptor
deftype-args deftype-descriptor
desc-type symbol-descriptor
dest-package in-package-form
dformat sym-descriptor output-driver stream
dformat-documentation sym-desc output-driver stream
doc symbol-descriptor
dpackage symbol-descriptor
extra-args defsetf-long-descriptor
extract-documentation driver dest-dir filenames &rest initargs
fully-qualified-name symbol-descriptor
inheritence structured-object-descriptor
initargs slot-descriptor
initform slot-descriptor
initialize-instance (desc symbol-descriptor) &rest rest
lambda-list lambda-descriptor
method-qualifiers lambda-descriptor
name symbol-descriptor
named defstruct-descriptor
predicate defstruct-descriptor
printer defstruct-descriptor
readers slot-descriptor
slot-accessors structured-object-descriptor
slots structured-object-descriptor
struct-type defstruct-descriptor
update-fn defsetf-short-descriptor
value param-descriptor
writers slot-descriptor
Function summary
add-prefix-if-necessary prefix filenames
cludg-mksym &rest parts
default-pathname lisp-file dest-dir
extract-doc forms
find-descriptor-handler definer
find-option key options
find-output-type output-format
find-package-caseless name
find-qualifiers-and-lambda-list forms
get-asdf-system-files asdf-module &optional (directory "")
get-iso-date-time
grok-new-lines string
handle-slots class-name slots
make-constructor fname sname lambda-list given-p slots
make-copier fname sname
make-defun name lambda-list &rest docs
make-output-pathname lisp-file dest-dir output-type &optional prefix
make-pathname-relative &key from to
make-predicate fname sname
make-printer fname sname option
make-slot-accessors type names name cname lambda-list control-string
make-slot-lambdas class-desc lambda-list
mk-fname s1 s2 &aux (pkg (find-package-caseless *current-package*))
parse-defstruct-option name struct-desc form typed-p named-p slot-defs
parse-defstruct-options sname struct-desc forms &optional slot-defs
parse-defstruct-slot struct-desc slot
parse-defstruct-slots struct-desc slots
register-output-type output-format output-type
resolve-symbol-package-name symbol &optional package-name
split-name name &optional package-name
standard-io-name string
Macro summary
define-descriptor-handler definer arglist description &body body
define-purgers &key string-purger lambda-list-purger
remap-char char stream &rest clauses
with-descriptor-read (filespec descriptor) &body body
driver    [Class]

This is a protocol class.

symbol-descriptor    [Class]

This is a protocol class and so must not be instancied.

:package    [Initarg]
:name    [Initarg]
:type    [Initarg]
:doc    [Initarg]
doc   symbol-descriptor  [Generic function]

Returns the doc of the specified symbol-descriptor

desc-type   symbol-descriptor  [Generic function]

Returns the type of the specified symbol-descriptor

name   symbol-descriptor  [Generic function]

Returns the name of the specified symbol-descriptor

dpackage   symbol-descriptor  [Generic function]

Returns the package of the specified symbol-descriptor

structured-object-descriptor   inherits from symbol-descriptor  [Class]

This is a protocol class and so must not be instancied.

:inheritence    [Initarg]
:slots    [Initarg]
slot-accessors   structured-object-descriptor  [Generic function]

Returns the slot-accessors of the specified structured-object-descriptor

slots   structured-object-descriptor  [Generic function]

Returns the slots of the specified structured-object-descriptor

inheritence   structured-object-descriptor  [Generic function]

Returns the inheritence of the specified structured-object-descriptor

param-descriptor   inherits from symbol-descriptor  [Class]

This is a protocol class and so must not be instancied.

:value    [Initarg]
value   param-descriptor  [Generic function]

Returns the value of the specified param-descriptor

lambda-descriptor   inherits from symbol-descriptor  [Class]

This is a protocol class and so must not be instancied.

:lambda-list    [Initarg]
:qualifiers    [Initarg]
method-qualifiers   lambda-descriptor  [Generic function]

Returns the qualifiers of the specified lambda-descriptor

lambda-list   lambda-descriptor  [Generic function]

Returns the lambda-list of the specified lambda-descriptor

slot-descriptor   inherits from symbol-descriptor  [Class]

This descripor is made for describe the slots of class, conditon and structure.

:class-name    [Initarg]
:readers    [Initarg]
:writers    [Initarg]
:accessors    [Initarg]
:initargs    [Initarg]
:initform    [Initarg]
:allocation-type    [Initarg]
allocation-type   slot-descriptor  [Generic function]

Returns the allocation-type of the specified slot-descriptor

initform   slot-descriptor  [Generic function]

Returns the initform of the specified slot-descriptor

initargs   slot-descriptor  [Generic function]

Returns the initargs of the specified slot-descriptor

accessors   slot-descriptor  [Generic function]

Returns the accessors of the specified slot-descriptor

writers   slot-descriptor  [Generic function]

Returns the writers of the specified slot-descriptor

readers   slot-descriptor  [Generic function]

Returns the readers of the specified slot-descriptor

cname   slot-descriptor  [Generic function]

Returns the cname of the specified slot-descriptor

defpackage-descriptor   inherits from symbol-descriptor  [Class]

This descripor is made for: defpackage

defconstant-descriptor   inherits from param-descriptor  [Class]

This descriptor is made for: defconstant.

defparameter-descriptor   inherits from param-descriptor  [Class]

This descriptor is made for: defparameter.

defvar-descriptor   inherits from param-descriptor  [Class]

This descriptor is made for: defvar.

deftype-descriptor   inherits from param-descriptor  [Class]

This descriptor is made for: deftype.

:args    [Initarg]
deftype-args   deftype-descriptor  [Generic function]

Returns the args of the specified deftype-descriptor

defun-descriptor   inherits from lambda-descriptor  [Class]

This descriptor is made for: defun.

defmacro-descriptor   inherits from lambda-descriptor  [Class]

This descriptor is made for: defmacro.

defsetf-descriptor   inherits from lambda-descriptor  [Class]

This descriptor is made for: defsetf.

defsetf-short-descriptor   inherits from defsetf-descriptor  [Class]

This descriptor handles the short form of defsetf: (defsetf foo update-fn docstring)

:update-fn    [Initarg]
update-fn   defsetf-short-descriptor  [Generic function]

Returns the update-fn of the specified defsetf-short-descriptor

defsetf-long-descriptor   inherits from defsetf-descriptor  [Class]

This descriptor handles the long form of defsetf: (defsetf name lambda-list (values-to-store) doc-string body)

:extra-args    [Initarg]
extra-args   defsetf-long-descriptor  [Generic function]

Returns the extra-args of the specified defsetf-long-descriptor

defgeneric-descriptor   inherits from lambda-descriptor  [Class]

This descriptor is made for: defgeneric.

defmethod-descriptor   inherits from lambda-descriptor  [Class]

This descriptor is made for: defmethod.

defclass-descriptor   inherits from structured-object-descriptor  [Class]

This descriptor is made for: defclass.

define-condition-descriptor   inherits from structured-object-descriptor  [Class]

This descriptor is made for: define-condition.

defstruct-descriptor   inherits from structured-object-descriptor  [Class]

This descriptor is made for: defstruct.

conc-name   defstruct-descriptor  [Generic function]

Returns the conc-name of the specified defstruct-descriptor

struct-type   defstruct-descriptor  [Generic function]

Returns the struct-type of the specified defstruct-descriptor

named   defstruct-descriptor  [Generic function]

Returns the named of the specified defstruct-descriptor

printer   defstruct-descriptor  [Generic function]

Returns the printer of the specified defstruct-descriptor

copier   defstruct-descriptor  [Generic function]

Returns the copier of the specified defstruct-descriptor

predicate   defstruct-descriptor  [Generic function]

Returns the predicate of the specified defstruct-descriptor

constructors   defstruct-descriptor  [Generic function]

Returns the constructors of the specified defstruct-descriptor

defstruct-slot-descriptor   inherits from slot-descriptor  [Class]

This descriptor is made for structure slots.

in-package-form   inherits from symbol-descriptor  [Class]
:in-package    [Initarg]
dest-package   in-package-form  [Generic function]

Returns the in-package of the specified in-package-form

text   inherits from driver  [Class]

Dummy CLUDG text driver.

*cludg-directory*    [Variable]

The directory in which CLUDG is stored.

*descriptor-handlers*    [Variable]

Hash table of entries of the form (handler description), where definer is the car of the definition form handled (for example, DEFUN or DEFMACRO), handler is a function which takes the form as input and returns the descriptor object associated with.

*unhandled-forms*    [Variable]

List of un-handled forms. This list is filled at runtime.

*current-package*    [Variable]
*output-types*    [Variable]

Cache for string filename extension - output-format association.

*copier-control-string*    [Variable]

Defstruct copier function control string for automatic documentation.

This control string has one parameter.

*predicate-control-string*    [Variable]

Defstruct predicate function control string for automatic documentation.

This control string has one parameter.

*printer-control-string*    [Variable]

Defstruct printer function control string for automatic documentation.

This control string has one parameter.

*constructor-control-string*    [Variable]

Defstruct constructor function control string for automatic documentation.

This control string has one parameter.

*slot-reader-control-string*    [Variable]

Slot reader method control string for automatic documentation.

This control string has two parameters: slot-name, class-name.

*slot-writer-control-string*    [Variable]

Slot writer method control string for automatic documentation.

This control string has two parameters: slot-name, class-name.

*slot-accessor-control-string*    [Variable]

Slot accessor method control string for automatic documentation.

This control string has two parameters: slot-name, class-name.

extract-documentation   driver dest-dir filenames &rest initargs  [Generic function]

Reads all files specified in filenames and extract their documentation using the specified output-format driver.

Because it is performing some symbol package resolution it needs packages definition to be, at least loaded. A simple way to satisfy this condition is to load, such as require would, the systems to be documented before starting documentation extraction.

If filenames is an ASDF system then its components files will be retreived first.

The extracted documentation will be written in a newly created file with the same name as the processed one but with the filename extension relatives to the output driver. If dest-dir is non NIL then it will be used to construct the output pathname, otherwise the output pathname will be constructed using the one of the currently processed file. The &rest initargs argument is for driver specific options.

All implementation must support the following option:

  • :path-prefix (or null string): a string that will be used to dertermine the source folder where files to be processed can be found. If needed, this path-prefix (string) will be added to each filename of the source list. The destination folder is then constructed given this parameter. If specified, the path-prefix string is pruned from the destination folder in order to give the smallest pathname. Default to: *load-truename*.

    For instance, one could write:

        (extract-documentation 'html "/foo/doc/html" 
           '("foo.lisp" "gee/bar.lisp") 
           :path-prefix "/home/zorglub/prj-foo/src/") 

    to extract the documentation of the files 'foo' and 'gee/bar', that are located in /home/zorglub/prj-foo/src/, under the following tree: /foo/doc/html/foo.html and /foo/doc/html/gee/bar.html.

    But if an ASDF system is given for filenames then the :path-prefix will be found using asdf:component-relative-pathname method. Then to extract the documentation of an ASDF system one could write:

        (extract-documentation 'html "/foo/doc/html" 
           (asdf:find-system :the-foo-system)) 
dformat   sym-descriptor output-driver stream  [Generic function]

Writes the given symbol-descriptor on the stream in the wanted output format using the specified output driver.

dformat-documentation   sym-desc output-driver stream  [Generic function]

Writes the given symbol-descriptor documentation on the stream in the wanted output format using the specified output driver.

fully-qualified-name   symbol-descriptor  [Generic function]

Returns the string that represent the fully qualified name of the given symbol-descriptor.

initialize-instance   (desc symbol-descriptor) &rest rest  [After method]
get-iso-date-time    [Function]

Returns string with date and time according to ISO 8601.

extract-doc   forms  [Function]

Returns the first string found in the given list of forms.

NIL is returned if no string is found before the first non declare form.

grok-new-lines   string  [Function]

Returns a list of the string lines contained in the given string.

find-package-caseless   name  [Function]
standard-io-name   string  [Function]
cludg-mksym   &rest parts  [Function]

Returns a symbol name made from the concatenation of the given parts.

find-descriptor-handler   definer  [Function]

Given the car of a form, finds the appropriate description handler for the form if one exists.

register-output-type   output-format output-type  [Function]

Register the filename extension (a string) that will be associated with the specified output-format.

find-output-type   output-format  [Function]

Returns the filename extension (a string) that is associated to the specified output-format.

add-prefix-if-necessary   prefix filenames  [Function]

Adds the specified prefix to eaxh filename when necessary.

make-pathname-relative   &key from to  [Function]

Returns the relative pathname that goes from `from' to `to'.

default-pathname   lisp-file dest-dir  [Function]

Returns the common directories between the lisp-file and the dest-dir.

make-output-pathname   lisp-file dest-dir output-type &optional prefix  [Function]

Returns the pathname of the output file where to write the documentation to. The resulting pathname will be relative to the dest-dir. Any common pathname denominator between the lisp-file truename and the dest-dir truename will be pruned.

get-asdf-system-files   asdf-module &optional (directory "")  [Function]
split-name   name &optional package-name  [Function]
resolve-symbol-package-name   symbol &optional package-name  [Function]

Returns the home package name of symbol and the name of symbol.

mk-fname   s1 s2 &aux (pkg (find-package-caseless *current-package*))  [Function]
make-defun   name lambda-list &rest docs  [Function]
make-constructor   fname sname lambda-list given-p slots  [Function]
make-copier   fname sname  [Function]
make-predicate   fname sname  [Function]
make-printer   fname sname option  [Function]
find-option   key options  [Function]
parse-defstruct-option   name struct-desc form typed-p named-p slot-defs  [Function]
parse-defstruct-options   sname struct-desc forms &optional slot-defs  [Function]
parse-defstruct-slot   struct-desc slot  [Function]
parse-defstruct-slots   struct-desc slots  [Function]
make-slot-accessors   type names name cname lambda-list control-string  [Function]
make-slot-lambdas   class-desc lambda-list  [Function]
find-qualifiers-and-lambda-list   forms  [Function]

Returns the list of qualifiers if any and the arguments lambda-list.

handle-slots   class-name slots  [Function]

Returns a list of slot-descriptor object that represent the given list slot definition.

define-descriptor-handler   definer arglist description &body body  [Macro]

Defines a new documentation handler. DEFINER is the car of the definition form handled (e.g., defun), DESCRIPTION is a one-word string equivalent of definer (e.g., "function"), and ARGLIST and BODY together define a function that takes the form as input and returns the descriptor object of the form.

remap-char   char stream &rest clauses  [Macro]
define-purgers   &key string-purger lambda-list-purger  [Macro]

Defines two functions of one parameter to purge from dangerous characters:

  • :string-purger (name clauses &rest options): Defines a function of one parameter, a string, that will purge that string of any `dangerous' characters for your driver.

    • name (symbol): the name of the defined string purger function.

    • clauses (list): a list of pair as: (character replacement-string).

    • options (list): supported options: (:documentation string).

  • :lambda-list-purger (name clauses &rest options): Defines a function of one parameter, a lambda-list, that will purge that lambda-list of any `dangerous' characters for your driver.

    • name (symbol): the name of the defined lambda-list purger function.

    • clauses (list): a list of pair as: (symbol replacement-string). The symbols are the Common Lisp symbols that might occures in lambda-list.

    • options (list): supported options: (:documentation string).

with-descriptor-read   (filespec descriptor) &body body  [Macro]

with-descriptor-read uses open to create a file stream to file named by filespec. Filespec is the name of the file to be opened.

with-descriptor-read evaluates the body as an implicit progn with the descriptor bound to the successive values returned by the handler of the currently readed form. If no handler exists then the name of the readed form will be added to the list of unhandled forms: *unhandled-forms*.

When control leaves the body, either normally or abnormally (such as by use of throw), the file is automatically closed.