This proposal seems like it would benefit from looking at what PLT has done with readtables and extensible lexical syntax. In particular, Matthew Flatt's ICFP '09 paper [1], Eli Barzilay's Scheme Workshop '09 paper [2], and the documentation [3]. It allows fully redefinable syntax without requiring either mutation or having problems with compilation. Scribble, the syntax PLT uses for documentation, is also an excellent example of why having this as a part of `read' is a good idea.
[1] http://www.cs.utah.edu/plt/publications/icfp09-fbf.pdf [2] http://www.ccs.neu.edu/scheme/pubs/scheme2009-b.pdf [3] http://docs.plt-scheme.org/reference/Reader_Extension.html sam th On Wed, Sep 9, 2009 at 3:37 PM, John Cowan <[email protected]> wrote: > After a good deal of muttering and muddling and whining on #vcheme, > I have come up with a proposal for mildly extensible lexical syntax > (known in R5RS as "lexical structure"), such that a newly introduced > type can have appropriate constants specified for it in Scheme code. > Historically, standard Scheme readers have not provided this feature, > though some implementations have provided fully redefinable syntax using > CL-style readtables. > > Arbitrarily mutable lexical syntax, however, means that people trying to > read Scheme code may not even be able to *recognize* it as such: such > basic features as (...) can be defined away or redefined. This may be > useful when constructing lexers at run time, but that doesn't have to > be done through "read". -- sam th [email protected] _______________________________________________ r6rs-discuss mailing list [email protected] http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss
