[antlr-interest] Lexer exception?
Jens Bartelheimer
jens.bartelheimer at gmx.de
Sun Feb 19 15:28:18 PST 2006
Hi Martin,
thanks for your reply but if I turn off the option there are no
additional exceptions.
If I turn it on explicit I have the following error in the Lexer:
My error message:
The method recover(RecognitionException, BitSet) is undefined for the
type UMLLexer
Why? Is there a mistake in my Lexer?
Jens
Martin Probst wrote:
>> how can I catch such an exception? I do not found something in the
>> documentation.
>>
>> line 1:1: unexpected token: 111
>>
>
> You have to turn off the default error handler, e.g. in your options
> section of the lexer "defaultErrorHandler = false". Afterwards you can
> catch exceptions. All of them extend ANTLRException, the manual contains
> a part called "Exception hierarchy".
>
> Martin
>
>
>
More information about the antlr-interest
mailing list