[plt-scheme] special treatment of the <lib>/lang/reader.ss file?

From: Chongkai Zhu (czhu at cs.utah.edu)
Date: Mon Jun 16 23:03:43 EDT 2008

For the v372 doc (v4 works in the same way):

* A #reader must be followed by a datum. The datum is passed to the 
procedure that is the value of the current-reader-guard parameter (see 
section, and the result is used as a module path. The module 
path is passed to dynamic-require (see section 5.5) with either 'read or 
'read-syntax (depending on whether parsing started with read or 
read-syntax). The resulting procedure should accept the same arguments 
as read or read-syntax (with all optional arguments as required). The 
procedure is given the port whose stream contained #reader, and it 
should produce a datum result. If the result is a syntax object in read 
mode it is converted to a datum using syntax-object->datum; if the 
result is not a syntax object in read-syntax mode, it is converted to 
one using datum->syntax-object. See also section and 
section for information on special-comment results and 
recursive reads. If the read-accept-reader parameter is set to #f, then 
#reader is disallowed as input.

* A #lang must be followed by a single space (ASCII 32), and then a 
non-empty sequence of alphanumeric ASCII, plus, minus, underscore, and 
slash characters terminated by whitespace or an end-of-file. The 
sequence must not start or end with a slash. A sequence #lang name is 
equivalent to #reader (lib "lang/reader.ss" "name").


YC wrote:
> Hi -
> I noticed that the language modules seem to follow a storage 
> convention of <lib>/lang/reader.ss in v4 (I didn't verify in 372). Is 
> this treated specially by the module loader or is the behavior 
> configurable? 
> Thanks,
> yc
> ------------------------------------------------------------------------
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme

Posted on the users mailing list.