[plt-scheme] custom reader
Yes, you can do that. Typed-Scheme is a good example to start with, but
as I just checked, it is for v3xx instead of v4. The idea is to have a
module that provides two function: read and read-syntax (in v372).
In v3.99 doc "Plugins: Extending DrScheme", section 2.1 Adding
Module-based Languages to DrScheme, it is mentioned:
drscheme-language-readers: This is optional. If present, it must be
bound to a quoted list of module specifications (that is, a quoted
version of the argument to require). Each specification must be a module
that exports a function named read-syntax. Each of these read-syntax
functions must match MzScheme’s read-syntax primitive’s contract, but
may read different concrete syntax.
Chongkai
Robert Nikander wrote:
> Hi,
>
> I hear you can define a custom reader for a custom language, to use like:
>
> #lang my-language
>
> Does documentation exist yet for doing this? Or examples?
>
> I looked at collects/swindle, because I noticed it parsed :keywords,
> but all I see is a minimal file in lang/reader.ss that makes no sense
> to me.
>
> thanks,
> Rob
>