[antlr-interest] rough idea of exceptions vs no-exceptions
backtracking in v3
Sohail Somani
sohail at taggedtype.net
Tue Jan 3 16:44:27 PST 2006
On Tue, 2006-01-03 at 16:21 -0800, Terence Parr wrote:
> howdy,
>
> I am doing some fuzzy parsing in the lexer using v3. The basic trick
> of "try to match and if you fail, throw an exception, skip a char and
> retry" works. It's pretty slow though it turns out. The exceptions
> per char kill you. I then tried backtracking using the non-exception
> mechanism in v3 and it's like 5x faster :)
>
> Heh heh heh...thanks to all of you that badgered me into trying to
> build backtracking w/o exceptions. :)
I'm glad you took the time to do this. That being said, its not as if
this result was at all unexpected :)
More information about the antlr-interest
mailing list