[antlr-interest] Re: exceptions in the lexer

Colm McHugh colmmagoo at yahoo.com
Mon Dec 13 11:13:45 PST 2004


> Hi Colm. :)  Nice to hear from you.
> 
> Nope...not syn pred stuff.  Recognition problems
> should be caught by 
> the syn pred and ignored; then the next viable
> alternative should be 
> attempted.
> 

Hey Ter, thanks for the response; I haven't completely
taken in your comments, but the consequence of an
exception happenning in syn pred guess mode is that I
need to put a 'catch (...)' around the code that
creates and calls my parser object. This is really
just to catch the 'throw;' that the parser does when
it's in guess mode. [I'm using C++ BTW]

I guess I'm just sharing a mistaken assumption I had
been making, which is that it's possible to catch all
exceptions within the parser (.g). 

Good work on the 3.0 lexer by the way! Hopefully folks
won't be so concerned about using a non-ANTLR lexer
with 3.0. Just out of interest, I've been working on a
project where I've replaced an ancient hand-written
parser with ANTLR 2.7.4 parser and lexer and the
performance is comparable (my ANTLR written
replacement stuff is about 40 secs slower in a 15
minute test, and I haven't done any profiling or
optimization yet).

Cheers,
Colm.


		
__________________________________ 
Do you Yahoo!? 
Dress up your holiday email, Hollywood style. Learn more. 
http://celebrity.mail.yahoo.com


 
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