[plt-scheme] custom reader

From: Sam TH (samth at ccs.neu.edu)
Date: Sat May 24 08:26:13 EDT 2008

On Fri, May 23, 2008 at 7:22 PM, Chongkai Zhu <czhu at cs.utah.edu> wrote:
> 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).

If you're interested in the how to do this for v4, the `typed-scheme'
collection is now in the collections tree, and so you can look there
for an example.

Thanks,

sam th


>
> 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
>>
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>



-- 
sam th
samth at ccs.neu.edu


Posted on the users mailing list.