[racket] syntax-parse error reporting for ...+ patterns

From: Ryan Culpepper (ryanc at ccs.neu.edu)
Date: Wed Nov 3 16:49:09 EDT 2010

On 11/01/2010 02:23 PM, Casey Klein wrote:
> I'd like to rework Redex's `define-language' form to use syntax-parse,
> but I'm having trouble getting the error message I want.
> Here's the best I've been able to do (for a simplification of
> `define-language'):
> (define-syntax (define-language stx)
>    (syntax-parse stx
>      [(_ lang:id (nt:id (~describe "non-terminals" (~seq prod:expr ...+))) ...)
>       #'(void)]))
> This produces a reasonable error message
>> (define-language L (q))
> define-language: expected non-terminals in: ()
> but it highlights the entire form, instead of just the (q) part.
> How can I get a more precise highlight?

This is just a bug in syntax-parse. I hope to check in a fix soon.


Posted on the users mailing list.