Hello all,
From the ANSI Common Lisp Glossary:
syntax type n. (of a character) one of several classifications,
enumerated in Figure 2-6, that are used for dispatch during parsing by
the Lisp reader. See Section 2.1.4 (Character Syntax Types).
Is there any portable way for a custom Lisp reader to determine the syntax
type of a character that has been redefined? For example say #\! has been
redefined as a non-terminating macro character. Can the custom reader
discover this in a portable way instead of treating #\! as a constituent
character?
Thanks,
Adam
In article <·····························@consulting.net.nz>,
Adam Warner <······@consulting.net.nz> wrote:
> Hello all,
>
> From the ANSI Common Lisp Glossary:
>
> syntax type n. (of a character) one of several classifications,
> enumerated in Figure 2-6, that are used for dispatch during parsing by
> the Lisp reader. See Section 2.1.4 (Character Syntax Types).
>
> Is there any portable way for a custom Lisp reader to determine the syntax
> type of a character that has been redefined? For example say #\! has been
> redefined as a non-terminating macro character. Can the custom reader
> discover this in a portable way instead of treating #\! as a constituent
> character?
No, there's no standard way to get the syntax of a character. If it's a
macro you can get the macro function, but that's it. The only other
thing you can do is copy the syntax of one character to another.
--
Barry Margolin, ······@alum.mit.edu
Arlington, MA
Hi Barry Margolin,
> No, there's no standard way to get the syntax of a character. If it's a
> macro you can get the macro function, but that's it. The only other
> thing you can do is copy the syntax of one character to another.
Thanks Barry. While I hoped I'd overlooked something this is as I
expected.
Regards,
Adam