[<<][staapl][>>][..]
Mon Apr 27 23:43:05 CEST 2009

prefix macros : term rewriting in Forth code

One basic prefix macros are working, they behave exactly the same as
Scheme syntax-rules macros.

(define-syntax-rule
  (rpn-syntax-rules (literal ...)
                    ((pattern ...) (template ...)) ...)
  (make-rpn-transformer
   (lambda (w d k)
     (syntax-case w (literal ...)
       ((pattern ... . w+)
        (k (syntax->list #`(template ... . w+))
           d))
       ...))))


[Reply][About]
[<<][staapl][>>][..]