[plt-scheme] combining ... and . in syntax-case patterns

From: Sam TH (samth at ccs.neu.edu)
Date: Sat Jan 19 14:48:29 EST 2008

I would like to write the following syntax-case pattern:

(syntax-case x ()
  [([v t] ... . more)
   #'(v ...)]
  [_ (error)])

That is, any number of [v t] forms, followed by anything else.

Unfortunately, this pattern never matches any syntax objects.  Is
there a better way to write this pattern, or do I need to resort to
explicitly destructuring the syntax object?

Thanks,
-- 
sam th
samth at ccs.neu.edu


Posted on the users mailing list.