On Sat, Dec 11, 2010 at 8:56 AM, Ryan Culpepper <ry...@ccs.neu.edu> wrote:
> > If you are only supporting syntax-rules, then I recommend implementing the > algorithm from "Macros that Work" by Clinger and Rees. Hygienic macro > expansion does typically involve alpha-conversion---renaming lexical > variables to fresh names. The challenge, as you mention above, is in not > renaming too eagerly. > Thanks Ryan - I will look into the paper. I am currently only implementing syntax-rules, as it is non-trivial already, so I need to get that right first before looking at syntax-case. > If you're looking for code, SLIB has implementations of several hygienic > macro expanders, including the one from "Macros that Work". SLIB does not > run in Racket (mostly because it does not respect Racket's separation of > phases), but you might be able to extract and port the code you need, or use > it as inspiration. > Good pointers, thanks. Cheers, yc
_________________________________________________ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users