This is the named-read-macros Reference Manual, version 1.0.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 07:08:09 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
named-read-macros
Make read macros more Lispy. Attach read macros to symbols.
William Yao <williamyaoh@gmail.com>
William Yao <williamyaoh@gmail.com>
BSD-3
Provide a definition facility to define read macros and attach them to symbols, avoiding the possibility of collisions in readtable characters.
1.0.0
named-readtables
(system).
packages.lisp
(file).
named-read-macros.lisp
(file).
readtables.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
named-read-macros/named-read-macros.asd
named-read-macros/packages.lisp
named-read-macros/named-read-macros.lisp
named-read-macros/readtables.lisp
named-read-macros/named-read-macros.asd
named-read-macros
(system).
named-read-macros/named-read-macros.lisp
packages.lisp
(file).
named-read-macros
(system).
define
(macro).
read-macro-redefinition-warning
(condition).
read-macro-redefinition-warning-name
(reader method).
read-macro-redefinition-warning-prev-type
(reader method).
check-if-bound
(function).
read-maybe-read-macro
(function).
read-string-end
(function).
readtable-case-transform-fn
(function).
named-read-macros/readtables.lisp
named-read-macros.lisp
(file).
named-read-macros
(system).
Packages are listed by definition order.
named-read-macros
common-lisp
.
define
(macro).
read-macro-redefinition-warning
(condition).
read-macro-redefinition-warning-name
(generic reader).
read-macro-redefinition-warning-prev-type
(generic reader).
check-if-bound
(function).
read-maybe-read-macro
(function).
read-string-end
(function).
readtable-case-transform-fn
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Creates a named read macro, which executes ‘BODY‘ in a context where
‘*STANDARD-INPUT*‘ is bound to a stream containing just the contents which
the read macro was called with, and associates this macro with ‘NAME‘.
Just like a normal macro, ‘BODY‘ should return a Lisp form to then get
evaluated where the named read macro was called.
Because ‘NAMED-READ-MACROS‘ hijacks the Lisp reader, we can’t rely on
matching parentheses to know when the newly-defined read macro *ends*, so we
look for the sequence of characters ‘’END-${NAME}’‘, *immediately* followed
by a close parenthesis, in order to know when the read macro ends. Case is
checked against ‘NAME‘ by transforming the ending string according to the
case of the current readtable; if ‘(SYMBOL-NAME NAME)‘ matches the
transformed ending string exactly, we’ve found the end tag. In particular,
this means that using ‘DEFINE‘ with a pipe-enclosed symbol with lowercase
characters will make such a read macro impossible to end under the standard
readtable (though why one would define such a macro is another question
entirely!)
Leading whitespace after opening the read macro will not be passed to ‘BODY‘,
but trailing whitespace before the ending tag will.
Note that ‘DEFINE‘ has no compile-time effects by default; the rationale is that doing so would also require any functions used by a read macro defined by ‘DEFINE‘ to be available at compile-time. Since this is not the usual, ‘DEFINE‘ explicitly has no compile-time effects to avoid this problem. If you want a named read macro to be available at compile-time, wrap ‘DEFINE‘ and any necessary functions in an explicit ‘EVAL-WHEN‘.
read-macro-redefinition-warning
)) ¶name
.
read-macro-redefinition-warning
)) ¶Return a function which will transform any string per the given readtable’s case-sensitivity.
Jump to: | C D F G M R |
---|
Jump to: | C D F G M R |
---|
Jump to: | N P S |
---|
Index Entry | Section | ||
---|---|---|---|
| |||
N | |||
name : | Public conditions | ||
| |||
P | |||
prev-type : | Public conditions | ||
| |||
S | |||
Slot, name : | Public conditions | ||
Slot, prev-type : | Public conditions | ||
|
Jump to: | N P S |
---|
Jump to: | C F N P R S |
---|
Jump to: | C F N P R S |
---|