The adp Reference Manual

This is the adp Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Tue Jul 15 03:10:37 2025 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 adp

Add Documentation, Please. A Common Lisp documentation generator with Scribble files and @-syntax support.

Author

Héctor Galbis Sanchis

License

MIT

Dependencies
  • named-readtables (system).
  • scribble (system).
  • alexandria (system).
Source

adp.asd.

Child Component

src (module).


3 Modules

Modules are listed depth-first from the system components tree.


3.1 adp/src

Source

adp.asd.

Parent Component

adp (system).

Child Components

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


4.1 Lisp


4.1.1 adp/adp.asd

Source

adp.asd.

Parent Component

adp (system).

ASDF Systems

adp.


4.1.2 adp/src/package.lisp

Source

adp.asd.

Parent Component

src (module).

Packages

adp.


4.1.3 adp/src/racket.lisp

Dependency

package.lisp (file).

Source

adp.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.4 adp/src/adp.lisp

Dependency

racket.lisp (file).

Source

adp.asd.

Parent Component

src (module).

Public Interface
Internals

5 Packages

Packages are listed by definition order.


5.1 adp

Source

package.lisp.

Use List

common-lisp.

Public Interface
Internals

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


6.1 Public Interface


6.1.1 Macros

Macro: define-adp-file (name &key type default-readtable)

Defines an adp file.

NAME must be a symbol denoting the class of a file.
The user will need to use a keyword with the same name to specify
the defined file in its documentation system.
TYPE denotes the extension of the file.
DEFAULT-READTABLE denotes the default readtable to use when loading
the scribble file. This can be used if the exporter defines some extension to scribble like latex math mode.

Package

adp.

Source

adp.lisp.

Macro: define-adp-system (name)

Defines an adp system class.

NAME must be a symbol denoting the class of a system.
The user will need to use a keyword with the same name to specify the defined class in its documentation system.

Package

adp.

Source

adp.lisp.

Macro: defmacro (name (&rest args) &body body)

Same as ADP:DEFUN but arguments are not evaluated.

Package

adp.

Source

racket.lisp.

Macro: defun (name (&rest args) &body body)

Racket-like version of DEFUN.

This macro has the following syntax:

(defun name racket-lambda-list [[declaration* | documentation]] form*)

racket-lambda-list ::= (arg*)
| (arg* . rest-symbol)
| (arg* &rest rest-symbol)
arg ::= symbol
| (symbol default-form [supplied-symbol])
| keyword symbol
| keyword (symbol default-form [supplied-symbol])

The following explanation was taken and modified from: https://docs.racket-lang.org/reference/lambda.html

Regarding the racket-lambda-list and considering only the first case of arg, DEFUN has one of the following three forms:

- (arg*)

The function accepts as many non-keyword argument values as the number of symbols.
Each symbol is associated with an argument value by position.

- (arg* . rest-symbol)
- (arg* &rest rest-symbol)

The function accepts any number of non-keyword arguments greater or equal to the number of symbols. When the function is applied, the symbols are associated with argument values by position,
and all leftover arguments are placed into a list that is associated to rest-symbol.

More generally, an arg can include a keyword and/or default value. Thus, the three cases above are more completely specified as follows:

- symbol

Adds one to both the minimum and maximum number of non-keyword arguments accepted by the function. The symbol is associated with an actual argument by position.

- (symbol default-form [supplied-symbol])

Adds one to the maximum number of non-keyword arguments accepted by the procedure.
The symbol is associated with an actual argument by position, and if no such argument is provided, the default-form is evaluated to produce a value associated with symbol. If supplied-symbol is specified, it is associated with t or nil indicating if the argument is provided.
No arg with a default-expr can appear before a symbol without a default-form and without a keyword.

- keyword symbol

The function requires a keyword-based argument using keyword. The symbol is associated
with a keyword-based actual argument using keyword.

- keyword (symbol default-form [supplied-symbol])

The function accepts a keyword-based argument using keyword. The symbol is associated
with a keyword-based actual argument using keyword, if supplied in an application; otherwise,
the default-expr is evaluated to obtain a value to associate with id. If supplied-symbol is specified, it is associated with t or nil indicating if the argument is provided.

Package

adp.

Source

racket.lisp.


6.1.2 Ordinary functions

Function: element-form (scribble-element)

Returns the form of an element.

This form is the lisp form equivalent to a scribble one that the programmer wrote
within a scribble file. This form returned a value that can be retrieved with ADP:ELEMENT-VALUE.

Package

adp.

Source

adp.lisp.

Function: element-value (scribble-element)

Returns the value of an element.

This value is what a certain form returned within a scribble file. The form can be retrieved with ADP:ELEMENT-FORM.

Package

adp.

Source

adp.lisp.

Function: file-component (&rest args-sym1)

Returns the ASDF component of a scribble file.

Package

adp.

Source

adp.lisp.

Function: file-elements (&rest args-sym1)

Returns all the elements of a scribble file.

Package

adp.

Source

adp.lisp.

Function: function-lambda-list (symbol)

Retrieves the lambda list of an adp function or macro whose name is SYMBOL.
A second value is returned specifing if SYMBOL does or does not denote an adp function or macro.

Package

adp.

Source

racket.lisp.

Function: (setf function-lambda-list) (symbol)
Package

adp.

Source

racket.lisp.


6.1.3 Generic functions

Generic Function: export-content (system files)

Exports the elements gathered by ADP.

This function must be implemented by the exporter and is called after all files are loaded.
SYSTEM argument must be specialized with a class defined with DEFINE-ADP-SYSTEM.
FILES is a list of ADP::SCRIBBLE-FILE objects. These objects has two attributes that can be retrieved using ADP:FILE-COMPONENT and ADP:FILE-ELEMENTS. The former returns the ASDF component that represents the file. The exporter must use the ASDF interface to retrieve information about this file like
its pathname. The latter is a list of ADP::SCRIBBLE-ELEMENT objects. Each object has two attributes as well that can be retrieved with ADP:ELEMENT-VALUE and ADP:ELEMENT-FORM. The former returns
the value of the element. This value is what the exporter must print. The former is the form
that has generated the value. This can be useful for error messages.

Regarding the type of each file, they are specifically of type a class defined with ADP:DEFINE-ADP-FILE. In fact, every file type defined with ADP:DEFINE-ADP-FILE has as direct superclass the
type ADP::SCRIBBLE-FILE.

All files are in the same order as they were loaded. The same goes to elements within a file.

Package

adp.

Source

adp.lisp.

Methods
Method: export-content (system files)

6.1.4 Standalone methods

Method: make-load-form ((object racket-arg) &optional env)
Source

racket.lisp.

Method: make-load-form ((object racket-args) &optional env)
Source

racket.lisp.

Method: operation-done-p ((o load-op) (c scribble-source-file))

We can’t know where the output files will be stored. So, files must always be generated.

Package

asdf/action.

Source

adp.lisp.

Method: operation-done-p ((o load-op) (c adp-system))

We can’t know where the output files will be stored. So, files must always be generated.

Package

asdf/action.

Source

adp.lisp.

Method: operation-done-p ((o prepare-op) (c adp-system))

We can’t know where the output files will be stored. So, files must always be generated.

Package

asdf/action.

Source

adp.lisp.

Method: perform ((o load-op) (c scribble-source-file))
Package

asdf/action.

Source

adp.lisp.

Method: perform ((o compile-op) (c scribble-source-file))
Package

asdf/action.

Source

adp.lisp.

Method: perform ((o prepare-op) (c scribble-source-file))
Package

asdf/action.

Source

adp.lisp.

Method: perform :after ((o load-op) (s adp-system))
Package

asdf/action.

Source

adp.lisp.

Method: perform :after ((o prepare-op) (s adp-system))
Package

asdf/action.

Source

adp.lisp.


6.2 Internals


6.2.1 Special variables

Special Variable: *files*

A container with all the content files. The keys are the pathnames of the file relative to the asdf root file.

Package

adp.

Source

adp.lisp.


6.2.2 Macros

Macro: defmacro-aux (name (&rest args) &body body)
Package

adp.

Source

racket.lisp.

Macro: defun-aux (name (&rest args) &body body)
Package

adp.

Source

racket.lisp.

Macro: with-lisp-expressions-and-stream ((in-package-expr in-readtable-expr stream) file &body body)
Package

adp.

Source

adp.lisp.


6.2.3 Ordinary functions

Function: add-file (file)

Adds a file to the files container.

Package

adp.

Source

adp.lisp.

Function: destroy-files-container ()

Destroys the files container.

Package

adp.

Source

adp.lisp.

Function: eval-expression (expr file)
Package

adp.

Source

adp.lisp.

Function: get-lisp-expressions-and-stream (file)
Package

adp.

Source

adp.lisp.

Function: in-package-expr-p (expr)
Package

adp.

Source

adp.lisp.

Function: in-readtable-expr-p (expr)
Package

adp.

Source

adp.lisp.

Function: make-files-container ()

Initializes the files container.

Package

adp.

Source

adp.lisp.

Function: parse-racket-arg (arg requires-default-form)
Package

adp.

Source

racket.lisp.

Function: parse-racket-args (args)
Package

adp.

Source

racket.lisp.

Function: parse-racket-values (vals racket-args)
Package

adp.

Source

racket.lisp.

Function: reexport (symbol package)
Package

adp.

Source

adp.lisp.


6.2.4 Generic functions

Generic Reader: error-condition (condition)
Generic Writer: (setf error-condition) (condition)
Package

adp.

Methods
Reader Method: error-condition ((condition eval-error))
Writer Method: (setf error-condition) ((condition eval-error))
Source

adp.lisp.

Target Slot

error-condition.

Generic Reader: expression (condition)
Generic Writer: (setf expression) (condition)
Package

adp.

Methods
Reader Method: expression ((condition eval-error))
Writer Method: (setf expression) ((condition eval-error))
Source

adp.lisp.

Target Slot

expression.

Generic Reader: file (condition)
Generic Writer: (setf file) (condition)
Package

adp.

Methods
Reader Method: file ((condition eval-error))
Writer Method: (setf file) ((condition eval-error))
Source

adp.lisp.

Target Slot

file.


6.2.5 Conditions

Condition: eval-error
Package

adp.

Source

adp.lisp.

Direct superclasses

error.

Direct methods
Direct slots
Slot: error-condition
Initform

(quote nil)

Initargs

:error-condition

Readers

error-condition.

Writers

(setf error-condition).

Slot: expression
Initform

(quote nil)

Initargs

:expression

Readers

expression.

Writers

(setf expression).

Slot: file
Initform

(quote nil)

Initargs

:file

Readers

file.

Writers

(setf file).


6.2.6 Classes

Class: adp-system
Package

adp.

Source

adp.lisp.

Direct superclasses

system.

Direct methods
Class: racket-arg
Package

adp.

Source

racket.lisp.

Direct methods

make-load-form.

Direct slots
Slot: name
Initargs

:name

Slot: optional
Initargs

:optional

Slot: default
Initargs

:default

Slot: supplied
Initargs

:supplied

Class: racket-args
Package

adp.

Source

racket.lisp.

Direct methods

make-load-form.

Direct slots
Slot: required-args
Initform

(make-array 10 :fill-pointer 0)

Initargs

:required-args

Slot: optional-args
Initform

(make-array 10 :fill-pointer 0)

Initargs

:optional-args

Slot: key-args
Initform

(make-hash-table :test (quote eq))

Initargs

:key-args

Slot: rest-arg
Initargs

:rest-arg

Class: scribble-element

Represents an element in a scribble file.

Package

adp.

Source

adp.lisp.

Direct slots
Slot: value
Initargs

:value

Slot: form
Initargs

:form

Class: scribble-file

Represents a unit of documentation that groups several elements.

Package

adp.

Source

adp.lisp.

Direct slots
Slot: component
Initargs

:component

Slot: elements
Initargs

:elements

Class: scribble-source-file

Component class for a Scribble source file

Package

adp.

Source

adp.lisp.

Direct superclasses

source-file.

Direct methods
Direct slots
Slot: type
Package

common-lisp.

Initform

"scrbl"


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (  
A   D   E   F   G   I   M   O   P   R   W  
Index Entry  Section

(
(setf error-condition): Private generic functions
(setf error-condition): Private generic functions
(setf expression): Private generic functions
(setf expression): Private generic functions
(setf file): Private generic functions
(setf file): Private generic functions
(setf function-lambda-list): Public ordinary functions

A
add-file: Private ordinary functions

D
define-adp-file: Public macros
define-adp-system: Public macros
defmacro: Public macros
defmacro-aux: Private macros
defun: Public macros
defun-aux: Private macros
destroy-files-container: Private ordinary functions

E
element-form: Public ordinary functions
element-value: Public ordinary functions
error-condition: Private generic functions
error-condition: Private generic functions
eval-expression: Private ordinary functions
export-content: Public generic functions
export-content: Public generic functions
expression: Private generic functions
expression: Private generic functions

F
file: Private generic functions
file: Private generic functions
file-component: Public ordinary functions
file-elements: Public ordinary functions
Function, (setf function-lambda-list): Public ordinary functions
Function, add-file: Private ordinary functions
Function, destroy-files-container: Private ordinary functions
Function, element-form: Public ordinary functions
Function, element-value: Public ordinary functions
Function, eval-expression: Private ordinary functions
Function, file-component: Public ordinary functions
Function, file-elements: Public ordinary functions
Function, function-lambda-list: Public ordinary functions
Function, get-lisp-expressions-and-stream: Private ordinary functions
Function, in-package-expr-p: Private ordinary functions
Function, in-readtable-expr-p: Private ordinary functions
Function, make-files-container: Private ordinary functions
Function, parse-racket-arg: Private ordinary functions
Function, parse-racket-args: Private ordinary functions
Function, parse-racket-values: Private ordinary functions
Function, reexport: Private ordinary functions
function-lambda-list: Public ordinary functions

G
Generic Function, (setf error-condition): Private generic functions
Generic Function, (setf expression): Private generic functions
Generic Function, (setf file): Private generic functions
Generic Function, error-condition: Private generic functions
Generic Function, export-content: Public generic functions
Generic Function, expression: Private generic functions
Generic Function, file: Private generic functions
get-lisp-expressions-and-stream: Private ordinary functions

I
in-package-expr-p: Private ordinary functions
in-readtable-expr-p: Private ordinary functions

M
Macro, define-adp-file: Public macros
Macro, define-adp-system: Public macros
Macro, defmacro: Public macros
Macro, defmacro-aux: Private macros
Macro, defun: Public macros
Macro, defun-aux: Private macros
Macro, with-lisp-expressions-and-stream: Private macros
make-files-container: Private ordinary functions
make-load-form: Public standalone methods
make-load-form: Public standalone methods
Method, (setf error-condition): Private generic functions
Method, (setf expression): Private generic functions
Method, (setf file): Private generic functions
Method, error-condition: Private generic functions
Method, export-content: Public generic functions
Method, expression: Private generic functions
Method, file: Private generic functions
Method, make-load-form: Public standalone methods
Method, make-load-form: Public standalone methods
Method, operation-done-p: Public standalone methods
Method, operation-done-p: Public standalone methods
Method, operation-done-p: Public standalone methods
Method, perform: Public standalone methods
Method, perform: Public standalone methods
Method, perform: Public standalone methods
Method, perform: Public standalone methods
Method, perform: Public standalone methods

O
operation-done-p: Public standalone methods
operation-done-p: Public standalone methods
operation-done-p: Public standalone methods

P
parse-racket-arg: Private ordinary functions
parse-racket-args: Private ordinary functions
parse-racket-values: Private ordinary functions
perform: Public standalone methods
perform: Public standalone methods
perform: Public standalone methods
perform: Public standalone methods
perform: Public standalone methods

R
reexport: Private ordinary functions

W
with-lisp-expressions-and-stream: Private macros