[antlr-interest] syntactic predicates and exceptions

Terence Parr parrt at cs.usfca.edu
Tue Oct 18 11:19:23 PDT 2005


On Oct 18, 2005, at 9:03 AM, Don Caton wrote:

> Ter:
>
> Exceptions should be used for just that: exceptions.  A rule that  
> fails to
> match is not an exceptional condition,

Hi Don! :)

Really?  When was the last time an HTTP server got a bad GET request  
from a browser?  That said, I'm sure the java compiler sees 99%  
erroneous programs from my students? ;)

> it is an expected condition and as
> such, should be handled with normal flow control constructs.

Agreed, but parse errors are errors if ya ask me...

Perhaps you're right though: adding some IFs won't be that bad.

Ter


More information about the antlr-interest mailing list