[plt-scheme] misplaced ellipses
At Tue, 26 Feb 2008 13:48:45 -0500, David Van Horn wrote:
> (define-syntax f
> (syntax-rules ()
> [(f id)
> (syntax (... id))]))
>
> (f ...)
> ;; expect (syntax (... ...)),
> ;; ie., the identifier `...'.
>
>
> I get instead:
>
> syntax: misplaced ellipses in template in: ...
>
> Why is this the case?
The macro `(f ...)' expands to `(syntax ...)', which is indeed a syntax
error.
I think you meant
(define-syntax f
(syntax-rules ()
[(f id)
(... id)])) ; no `syntax'
Matthew