[antlr-interest] Re: strong error recovery
Neurosurg
khamenya at mail.ru
Mon Aug 2 04:46:27 PDT 2004
Monty,
thank you for your reply,
--- In antlr-interest at yahoogroups.com, Monty Zukowski <monty at c...> wrote:
> Ok, so what on earth are you parsing? Why the garbage in there?
>
> top: ((expr)=>expr | .)*;
>
> Using a syntactic predicate as above will do the trick. It will be
> slow, but it will find every valid expression and advance one token at
> a time if it wasn't an expression.
hm, it does work, but partly.
Indeed, e.g. the following
+5+5
is ok, i.e. 5+5 is extracted, but this
5+5+
is just skipped, i.e. nothing extracted.
Note: I've used calc.g grammar example as basis to
test your idea.
best regards,
Valery
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