[Openmcl-devel] activate macro readers only within a special block

Pascal J. Bourguignon pjb at informatimago.com
Sun Mar 24 15:26:30 PDT 2013

Taoufik Dachraoui <dachraoui.taoufik at gmail.com> writes:

> I would like to be able to define special names such that
> any block starting with a given special name
> some macro readers are activated (only within the block)
> For example:
> (defspecial asm
>    <macro readers>)
> (asm
>     .... asm instructons
> )

The only way to do that is to define a reader macro to read "asm … "
or perhaps "(asm …)".

In either case, since #\( is used to read lists, and since #\A is used
to read normal tokens (symbols or numbers, depending on the base),
writing such a reader macro is difficult (but not impossible).

It would be easier to bind your reader macro on a character reserved for
user reader macros, such as #\{:

        .... asm instructons

__Pascal Bourguignon__                     http://www.informatimago.com/
A bad day in () is better than a good day in {}.

More information about the Openmcl-devel mailing list