[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] Help with srfi 46 and syntax-case
From: |
Thomas Bushnell BSG |
Subject: |
[Chicken-users] Help with srfi 46 and syntax-case |
Date: |
Fri, 13 Nov 2009 10:58:19 -0800 |
I have some code which currently uses syntax-case, and because it has
nested macro definitions, it needs the (... ...) hack.
When we migrate to Chicken 4.0, we'll need to convert that to the
superior srfi 46 choose-your-own-ellipsis method. What I'd like to do,
to facilitate migrate, is write a version of syntax-rules, for
syntax-case, that accepts the CYOE parameter.
At present, the syntax-case egg defines syntax-rules thus:
(define-syntax syntax-rules
(lambda (x)
(syntax-case x ()
((_ (k ...) ((keyword . pattern) template) ...)
(syntax (lambda (x)
(syntax-case x (k ...)
((dummy . pattern) (syntax template))
...)))))
I would like to add a clause something like:
((_ ellipsis (k ...) ((keyword . pattern) template) ...)
(syntax
(lambda (x)
(with-syntax ((ellipsis (syntax (... ...))))
(syntax-case x (k ...)
((dummy . pattern) (syntax template))
...)))))))
to match the CYOE pattern. But try as I might, it doesn't work. good
grief, I do dislike syntax-case. But in any case, does anyone have any
idea what I should be doing?
Thomas
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Chicken-users] Help with srfi 46 and syntax-case,
Thomas Bushnell BSG <=