[antlr-interest] [c target] some questions about errors catching
Юрушкин Михаил
yurushkin at rambler.ru
Sun Sep 27 07:22:15 PDT 2009
good day.
I have some questions about an errors-processing alogirthm in Antlr:
1) Antlr generates strange code. If no alternatives are right, it does the
following:
...
default:
CONSTRUCTEX();
EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
EXCEPTION->message = (void *)"";
EXCEPTION->decisionNum = 34;
EXCEPTION->state = 0;
goto ruleattr_specEx;
}
- initializes exception... and CLEANS some information. Why?
2) after the finishing of processing nonterminal
rec->state->errors_count = 0 Why?? It has detected an error already.
--
Best regards,
Michael
More information about the antlr-interest
mailing list