Re: How to extract the scheme parser from the source?

Michael Sperber <[email protected]> Fri, 02 Aug 2013 10:06:54 +0200
Newsgroups gmane.lisp.scheme.scheme48
Message-ID <[email protected]>
Will Noble <[email protected]> writes:

> Olin Shivers claims, in http://www.scsh.net/docu/post/modules.html,
> "there's an extra clause in the DEFINE-STRUCTURE form that lets you specify
> the parser function used to parse the files named in the FILES clause".
>
> Can you really do this? I can't seem to locate the code that would implement
> this functionality.

This functionality was recently re-introduced in Scheme 48 1.9.  It sits
mostly in scheme/bcomp/scan-package.scm.  Look for
"set-package-reader!".  In short, you can specify a 

(reader <expr>)

clause in a `define-structure' form where <expr> is evaluated in the
`for-syntax' environment of the underlying package.

-- 
Regards,
Mike