[antlr-interest] Overriding error reporting in ANTLR3 C runtime

Ramon Verbruggen Ramon.Verbruggen at quintiq.com
Mon Aug 4 23:46:49 PDT 2008


>From the C API documentation on http://www.antlr.org/api/C => Using the ANTLR3 C Target:

Implementing Customized Methods
Unless you wish to create your own tree structures using the built in ANTLR AST rewriting notation, you will rarely need to override the default implementation of runtime methods. The exception to this will be the syntax err reporting method, which is essentially a stub function that you will usually want to provide your own implementation for. You should consider the built in function displayRecognitionError() as an example of where to start as there can be no really useful generic error message display. 

I hope this helps,

Ramon

>>> David Benn <david.benn at astc-design.com> wrote:
> On the Wiki, there's a section describing how to  override the 
> 
> displayRecognitionError()
> 
> method for Java 
> (http://www.antlr.org/wiki/display/ANTLR3/Error+reporting+and+recovery).
> 
> Is it possible to do the same thing for translators targetting the C 
> runtime?
> 
> Rgds,
> 
> DJB


This message contains information that may be privileged or confidential and is the property of Quintiq. It is only intended for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute or use this message or any part thereof. If you have received this message in error, please notify the sender immediately and delete all copies of this message. Please note that e-mails are susceptible to change, therefore they are not binding.


More information about the antlr-interest mailing list