[antlr-interest] rough idea of exceptions vs no-exceptions
backtracking in v3
Terence Parr
parrt at cs.usfca.edu
Tue Jan 3 16:21:50 PST 2006
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. :)
Ter
More information about the antlr-interest
mailing list