Define a new named readtable, whose name is given by the symbol NAME.
Or, if a readtable is already registered under that name, redefine
The readtable can be populated using the following OPTIONS:
- `(:MERGE READTABLE-DESIGNATORS+)`
Merge the readtables designated into the new readtable being
defined as per MERGE-READTABLES-INTO.
If no :MERGE clause is given, an empty readtable is used. See
- `(:FUSE READTABLE-DESIGNATORS+)`
Like :MERGE except:
Error conditions of type READER-MACRO-CONFLICT that are signaled
during the merge operation will be silently _continued_. It
follows that reader macros in earlier entries will be
overwritten by later ones. For backward compatibility, :FUZE is
accepted as an alias of :FUSE.
- `(:DISPATCH-MACRO-CHAR MACRO-CHAR SUB-CHAR FUNCTION)`
Define a new sub character `SUB-CHAR` for the dispatching macro
character `MACRO-CHAR`, per SET-DISPATCH-MACRO-CHARACTER. You
probably have to define `MACRO-CHAR` as a dispatching macro
character by the following option first.
- `(:MACRO-CHAR MACRO-CHAR FUNCTION [NON-TERMINATING-P])`
Define a new macro character in the readtable, per
SET-MACRO-CHARACTER. If `FUNCTION` is the keyword :DISPATCH,
`MACRO-CHAR` is made a dispatching macro character, per
- `(:SYNTAX-FROM FROM-READTABLE-DESIGNATOR FROM-CHAR TO-CHAR)`
Set the character syntax of TO-CHAR in the readtable being
defined to the same syntax as FROM-CHAR as per
- `(:CASE CASE-MODE)`
Defines the _case sensitivity mode_ of the resulting readtable.
Any number of option clauses may appear. The options are grouped by
their type, but in each group the order the options appeared
textually is preserved. The following groups exist and are executed
in the following order: :MERGE and :FUSE (one
group), :CASE, :MACRO-CHAR and :DISPATCH-MACRO-CHAR (one group),
The readtable is defined at load-time. If you want to have it
available at compilation time -- say to use its reader-macros in the
same file as its definition -- you have to wrap the DEFREADTABLE
form in an explicit EVAL-WHEN.
On redefinition, the target readtable is made empty first before
it's refilled according to the clauses.
NIL, :STANDARD, :COMMON-LISP, :MODERN, and :CURRENT are
preregistered readtable names.
Set *READTABLE* to the readtable referred to by the symbol NAME.
Either a symbol or a readtable itself.
Creates and returns a new readtable under the specified
MERGE takes a list of NAMED-READTABLE-DESIGNATORS and specifies the
readtables the new readtable is created from. (See the :MERGE clause
of DEFREADTABLE for details.)
If MERGE is NIL, an empty readtable is used instead.
If NAME is not given, an anonymous empty readtable is returned.
An empty readtable is a readtable where each character's syntax is
the same as in the _standard readtable_ except that each macro
character has been made a constituent. Basically: whitespace stays
whitespace, everything else is constituent.
Replaces the associated name of the readtable designated by
OLD-NAME with NEW-NAME. If a readtable is already registered under
NEW-NAME, an error of type READTABLE-DOES-ALREADY-EXIST is
Copy the contents of each readtable in NAMED-READTABLES into
If a macro character appears in more than one of the readtables,
i.e. if a conflict is discovered during the merge, an error of type
READER-MACRO-CONFLICT is signaled.
Like COPY-READTABLE but takes a NAMED-READTABLE-DESIGNATOR as argument.
Returns a list of all registered readtables. The returned list is
guaranteed to be fresh, but may contain duplicates.
This condition is signaled during the merge process if a reader
macro (be it a macro character or the sub character of a dispatch
macro character) is present in the both source and the target
readtable and the two respective reader macro functions differ.
Looks for the readtable specified by NAME and returns it if it is
found. Returns NIL otherwise.
Looks up the readtable specified by NAME and returns it if it's found.
If it is not found, it registers the readtable designated by DEFAULT
under the name represented by NAME; or if no default argument is
given, it signals an error of type READTABLE-DOES-NOT-EXIST
Associate READTABLE with NAME. Returns the readtable.
Remove the association of NAMED-READTABLE. Returns T if successfull,
Returns the name of the readtable designated by NAMED-READTABLE,