[plt-dev] syntax-case error messages

From: Jon Rafkind (rafkind at cs.utah.edu)
Date: Mon Mar 29 16:32:54 EDT 2010

On 03/29/2010 02:31 PM, Jon Rafkind wrote:
> FWIW, syntax-parse does a pretty good job with these same examples 
> except for one case. Ryan, can you fix the 'bad syntax' error?
>
> -> (syntax-parse #'1)
> readline-input::199: syntax-parse: expected non-empty sequence of 
> clauses in: (syntax-parse (syntax 1))
> -> (syntax-parse #'1 2)
> readline-input::236: ?: bad syntax in: 2
> -> (syntax-parse #'1 [2])
> readline-input::239: syntax-parse: expected non-empty clause body at: 
> (2) in: (syntax-parse (syntax 1) (2))
> -> (syntax-parse #'1 [2 2])
> readline-input::278: ?: expected the literal 2 at: 1 in: 1
>
> Interesting that syntax-parse also uses its own name in the error 
> message.

Oops, nevermind. syntax-parse only says its own name for errors in using 
the syntax-parse api, not for errors where users wrote an invalid syntax.


Posted on the dev mailing list.