Lines Matching defs:ex
37 static void antlr3ExceptionPrint(pANTLR3_EXCEPTION ex);
38 static void antlr3ExceptionFree (pANTLR3_EXCEPTION ex);
74 pANTLR3_EXCEPTION ex;
78 ex = (pANTLR3_EXCEPTION) ANTLR3_CALLOC(1, sizeof(ANTLR3_EXCEPTION));
82 if (ex == NULL)
87 ex->name = name; /* Install exception name */
88 ex->type = exception; /* Install the exception number */
89 ex->message = message; /* Install message string */
93 ex->freeMessage = freeMessage;
97 ex->print = antlr3ExceptionPrint;
98 ex->freeEx = antlr3ExceptionFree;
100 return ex;
107 * \param[in] ex
118 antlr3ExceptionPrint(pANTLR3_EXCEPTION ex)
122 while (ex != NULL)
126 if (ex->message == NULL)
128 ANTLR3_FPRINTF(stderr, "ANTLR3_EXCEPTION number %d (%08X).\n", ex->type, ex->type);
132 ANTLR3_FPRINTF(stderr, "ANTLR3_EXCEPTION: %s\n", (char *)(ex->message));
137 ex = ex->nextException;
147 * \param[in] ex
154 antlr3ExceptionFree(pANTLR3_EXCEPTION ex)
160 while (ex != NULL)
165 next = ex->nextException;
169 if (ex->freeMessage == ANTLR3_TRUE)
171 ANTLR3_FREE(ex->message);
176 if (ex->freeCustom != NULL)
178 ex->freeCustom(ex->custom);
183 ANTLR3_FREE(ex);
185 ex = next;