[antlr-interest] Error recovery contortion
Terence Parr
parrt at cs.usfca.edu
Tue Dec 7 16:03:37 PST 2004
On Dec 7, 2004, at 11:34 AM, Paul J. Lucas wrote:
>> Why can't you add a catch to the equiv of another()?
>
> Because "another" in my case is "expression" that has a zillion
> subrules (addExpr, mulExpr, etc), and I'd have to add my own
> "catch" to *every* *single* *one* of those and end up having to
> do it to the whole grammar. This kind of defeats the point of
> having defaultErrorHandler=true.
Agreed. As I said though, adding exception handlers to every routine
would work and while laborious, is precise. ;) However, your solution
is better. Let's make the code spit out for default handlers
configurable :)
> The goal here is to try to mold ANTLR's default error recovery
> mechanism to do what I want so in 99% of my grammar I don't
> have to do anything special. Only in those places where I want
> to do specific recovery do I want to intervene.
>
> Get it?
Now I do...sorry for being slow on this one.
Ter
--
CS Professor & Grad Director, University of San Francisco
Creator, ANTLR Parser Generator, http://www.antlr.org
Cofounder, http://www.jguru.com
Cofounder, http://www.knowspam.net enjoy email again!
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list