[antlr-interest] Error Handling

Massimiliano Donini maxgbr at hotmail.it
Mon Dec 6 12:19:19 PST 2010


  Hi, i have some question about error handling.
Giving a look at the string template used for generate source code (i'm 
using CSharp2/3 as target language)
i see that every parser rule is coded in a try catch finally block, so i 
woul like to know what is the best way to catch error.
Looking at antlr FAQ (http://www.antlr.org/wiki/label/ANTLR3/faq_errors) 
i found only an V4 java example.
I get error with a custom implementation of TextWriter assigned to 
MyParserInstance.TraceDestination, but i want to know what is the better 
way to error handlig.
Tanks in advice.
Regards Max


More information about the antlr-interest mailing list