[antlr-interest] Restarting a rule
David Penton
djplists at arrowsash.com
Sun Feb 9 19:22:39 PST 2003
I switched to 2.7.2; all is well - it fixes some things that had been
problems for my project.
Now my questions. (I asked similar or related questions a couple weeks
ago but did not quite solve my problem. Sorry for more or less repeating
myself.)
Q1: Is there a good way to skip over a bad token in a parser? In other
words, I don't want the default handling (syncing and moving to the next
rule), but rather I want to test the token (I guess in the exception
handler) and restart the "present" rule if it is a certain kind of
token. This may be a java question instead of an antlr question.
Q2: It looks like it is not possible to set error handling code in a
parser "globally", i.e. something that gets copied into every method
implementing a rule. Is that right?
Thanks much.
- Dave -
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list