[antlr-interest] @rulecatch for lexer, doable?
Mats Ekberg
mats.ekberg at arcticgroup.se
Sun Jan 18 01:21:56 PST 2009
Nope, dont work. There is no errors while generating the lexer/parser,
but no catch-code is generated.
/mats
Skickat från min iPhone
18 jan 2009 kl. 01.30 skrev Terence Parr <parrt at cs.usfca.edu>:
> try @lexer::rulecatch...not sure the lexers respond to this,
> however. They do not individually trap exceptions I think. Look at
> the nextToken() method. It should be the thing that handles errors
> emitted from calling mTokens() rule method.
>
> Ter
> On Jan 17, 2009, at 4:17 PM, Mats Ekberg wrote:
>
>> Hi!
>>
>> To generate a custom catch clause in the parser one can write:
>>
>> @rulecatch {
>> ..code..
>> }
>>
>> How do I accomplish the same thing in the lexer?
>>
>> /mats
>>
>> List: http://www.antlr.org/mailman/listinfo/antlr-interest
>> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>
More information about the antlr-interest
mailing list