[antlr-interest] How to add catch section to the lexer ?

Ahmed Hamouda ahmedh at horizonssoftware.com
Thu Apr 24 07:48:49 PDT 2008


Hi all,

My ask today is how to add catch section to all lexer functions through
antlr ? My target language is C#.

I have added catch section to all parser function by adding this code in
antlr

 

@rulecatch {

catch (RecognitionException re) 

{

    throw new BusinessValidationException(13100101);

}

}

 

Now I want to make the same on the lexer.

 

Thank you all.

 

 

Best Regards

 

Ahmed Hamouda (MCTS)

Software Engineer

Horizons Software

Address: 93 Haroun Al Rasheed Street, Heliopolis, Cairo, Egypt. 11351. 

Tel:         +202-2644-3709

Mobile:    +2010-33-55-879

Fax:        +202-2632-0661

Website:   www.horizonssoftware.com <http://www.horizonssoftware.com/> 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080424/54b7c5f9/attachment-0001.html 


More information about the antlr-interest mailing list