On Apr 24, 6:10 am, Eduardo Cavazos <[email protected]> wrote: > Hello, > > Meta-circular interpreters for a subset of Scheme are shown in TSPL, > SICP, and The Little Schemer (or is it in the Seasoned Schemer?). > > Are there any meta-circular interpreters out there which support > hygienic macros? Just curious to see how the implementation might look > in such an interpreter. > > I should probably check PLAI. > > Ed
Hi! I think rather than looking for a "meta-circular interpreter with hygenic macros", you should just look for a hygienic macro expander that is written to run on top of any r5rs scheme. The "big ones" are probably psyntax and andre van tonders r6rs expander, but these do also library/module management, so they are probably too complex to learn from. I don't know of a well documented, as small as possible syntax-rules expander for learning, but if you come across one, be sure to let me know. I would be interested as well ;) A good starting point might be http://library.readscheme.org/page3.html As far as I know R. Kent Dybvig. "Writing Hygenic Macros in Scheme with Syntax-Case". Computer Science Department, Indiana University. TR-356. June 1992. ftp://ftp.cs.indiana.edu/pub/scheme-repository/doc/pubs/iucstr356.ps.gz is said to be very well written Another approach might be to check small scheme implementations like s9fes or chibi for how they do it, but I don't know if they implement macro expansion atop the interpreter or directly in c code. (But if implemented in c it might still be easy enough to rewrite in scheme). Happy Easter! Jürgen
