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-06-06 13:05

>>30
It's that function calls can happen at macroexpansion time, too. In fact, it's the only way to implement recursive macros.

(defmacro hello-worldize (body)
(a-function body))

(defun a-function (sexp)
(list
'progn
'(format t "Hello /prague/!~%")
sexp))

(hello-worldize (format t "Will you hax my anus?~%"))


>>33
The Scheme solution is probably the sanest one, I'll take it, thanks.

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