On Mar 15, 2008, at 12:43 PM, John Cowan wrote:
Graham Fawcett scripsit:
(define-macro (hart . forms)
`(noop ,(apply hart-parse forms)))
That should be trivial to translate into any macro system.
Hm, on second thought, I probably shouldn't assume that just
because a
macro is short, it would be trivial to translate into another system.
This one is, though:
(define-syntax hart (syntax-rules ()
((hart . forms) (noop (hart-parse . forms)))))
(Untested, of course)
I am working on a hygienic version of hart.
(define-syntax (hart X)
(syntax-case X ()
[(K FORM0 ...)
(with-syntax ([EXP (datum->syntax-object #'K (apply hart-parse
(syntax-object->datum #'(FORM0 ...))))])
#'(noop EXP) ) ] ) )
since the semantic is to do the parse at expansion time then execute
at runtime.
--
The man that wanders far [EMAIL PROTECTED]
from the walking tree http://www.ccil.org/
~cowan
--first line of a non-existent poem by: John Cowan
_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users
Best Wishes,
Kon
_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users