Indeed I am fond of saying this ;-) For a great example of how much better you 
can get with those sorts of messages I always quote Visual Studio 2008 and C#. 
Other examples can be found of course. With these sorts of error catches you 
can say things like "It looks like you are missing the xyz construct here", or 
"You cannot use the abc clause in conjunction with the def clause", instead of 
"Syntax error at PRINT" and so on.

Jim

> -----Original Message-----
> From: [email protected] [mailto:antlr-interest-
> [email protected]] On Behalf Of Gavin Lambert
> Sent: Saturday, October 10, 2009 5:53 AM
> To: Reid Rivenburgh; Graham Wideman
> Cc: [email protected]
> Subject: Re: [antlr-interest] Whitespace question
> 
> At 10:34 10/10/2009, Reid Rivenburgh wrote:
>  >In my particular case, I think it's okay to let a few illegal
>  >constructs through and catch them further down the line.  I was
>  >just hoping that I would be able to easily write a tighter
>  >grammar.
> 
> As Jim Idle is fond of pointing out, it's often better to make the
> grammar fairly tolerant and deal with errors as late as possible
> (usually in the tree parser) -- that way you have more contextual
> information and can often produce a better error message.
> 
> 
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-
> email-address




List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to