Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Implement a Lisp macro system

Name: Anonymous 2015-05-31 12:09

/prog/, do you know of a tutorial or a paper on implementing a Lisp macro system from scratch? It could be Scheme macros, it could be really simple macros, anything would be helpful.

Name: Anonymous 2015-05-31 18:56

>>7
Well, that's very pathetic, I don't want my Lisp to be victim of "can't use before define" disease. Even Haskell is smarter than that. Probably gonna do several passes through the source:

1) get all toplevel defmacros
2) expand all toplevel macro calls to see if they define any macros
3) recursively descend into all code-paths, adding locally-defined macros to the environment from (1) and (2) and imported packages, and expanding shit.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List