[antlr-interest] Whitespace question
Gavin Lambert
antlr at mirality.co.nz
Fri Oct 9 17:22:45 PDT 2009
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.
More information about the antlr-interest
mailing list