#include <antlr3exception.h>
Functions | |
static void | antlr3ExceptionFree (pANTLR3_EXCEPTION ex) |
Frees up a chain of ANTLR3 exceptions. | |
pANTLR3_EXCEPTION | antlr3ExceptionNew (ANTLR3_UINT32 exception, void *name, void *message, ANTLR3_BOOLEAN freeMessage) |
Creates a new ANTLR3 exception structure. | |
static void | antlr3ExceptionPrint (pANTLR3_EXCEPTION ex) |
Prints out the message in all the exceptions in the supplied chain. |
static void antlr3ExceptionFree | ( | pANTLR3_EXCEPTION | ex | ) | [static] |
Frees up a chain of ANTLR3 exceptions.
[in] | ex | Pointer to the first exception in the chain to free. |
References ANTLR3_FREE, ANTLR3_TRUE, ANTLR3_EXCEPTION_struct::custom, ANTLR3_EXCEPTION_struct::freeCustom, ANTLR3_EXCEPTION_struct::freeMessage, ANTLR3_EXCEPTION_struct::message, next(), and ANTLR3_EXCEPTION_struct::nextException.
Referenced by antlr3ExceptionNew().
pANTLR3_EXCEPTION antlr3ExceptionNew | ( | ANTLR3_UINT32 | exception, | |
void * | name, | |||
void * | message, | |||
ANTLR3_BOOLEAN | freeMessage | |||
) |
Creates a new ANTLR3 exception structure.
[in] | exception | One of the ANTLR3_xxx_EXCEPTION indicators such as ANTLR3_RECOGNITION_EXCEPTION |
[in] | message | Pointer to message string |
[in] | freeMessage | Set to ANTLR3_TRUE if the message parameter should be freed by a call to ANTLR3_FREE() when the exception is destroyed. |
References ANTLR3_CALLOC, antlr3ExceptionFree(), antlr3ExceptionPrint(), ANTLR3_EXCEPTION_struct::freeEx, ANTLR3_EXCEPTION_struct::freeMessage, ANTLR3_EXCEPTION_struct::message, ANTLR3_EXCEPTION_struct::name, ANTLR3_EXCEPTION_struct::print, and ANTLR3_EXCEPTION_struct::type.
Referenced by antlr3RecognitionExceptionNew().
static void antlr3ExceptionPrint | ( | pANTLR3_EXCEPTION | ex | ) | [static] |
Prints out the message in all the exceptions in the supplied chain.
[in] | ex | Pointer to the exception structure to print. |
References ANTLR3_FPRINTF, ANTLR3_EXCEPTION_struct::message, ANTLR3_EXCEPTION_struct::nextException, and ANTLR3_EXCEPTION_struct::type.
Referenced by antlr3ExceptionNew().