[plt-scheme] reader macros / literate programming

From: Paul Graunke (ptg at ccs.neu.edu)
Date: Thu Feb 13 10:07:59 EST 2003

At 13 Feb 2003 02:08:11 +0100, "Jose A. Ortega Ruiz" wrote:
> i've been learning Scheme for a while now, and am starting with Common
> Lisp to eventually contribute to a project that will probably use it.
> while discussing the relative merits of both languages, i've been
> pointed to a feature of lisp, reader macros, that seems instrumental
> to our work (implementing a reflective language on top of lisp)... so
> i was wondering: does PLT Scheme offer functionality similar to CL's
> reader macros? (mind you, i'm an absolute begginer on these and
> related topics, so please forgive my not being more specific).

No.  Mzscheme does not exactly support reader macros.  On the other hand,
DrScheme (using mzscheme's module system) does allow you to define custom,
non-s-expression languages such as algol60.

> 
> on a totally unrelated note, i've been using in the past noweb for
> literate programming (mostly in OCaml), and was thinking of using it
> with my MzScheme hacks. as you problably know, in LP, source code
> files are produced from a document that contains both the source code
> and its documentation intermingled. the actual source code is
> automatically generated from such a document. when you
> compile/interpret such generated files, it is very useful to have some
> sort of #LINE directive (à la C) in the generated code which points
> back to the source document/line, so that when you encounter an error,
> you can easily jump back to the source document (usually, the
> compiler/interpreter reports the #LINE file/lineno instead of the
> source code ones)... does mzscheme offer this (or similar) functionality?
> 
> please, feel free to send me RTFM if advisable :)


Read the fine documentation in help-desk about read-syntax and source
locations.
> 
> thanks a lot for you help,
> jao

Paul


Posted on the users mailing list.