Hello,
I`ve got two major problems with errors with antlr 2.7.4 (generating
java-code):
I.
I want to control the error handling more precisely, but can`t get a
clue through the manual how it should work. For example, if a rule looks
like:
main: a b c;
a: A1 A2;
b: B;
c: C;
so if A2 is not there, error is thrown because B not A2 is found (till
there, this behaviour is fine). But after, because B was the reason the
error was thrown, antlr doesn`t recognize b, keeps on searching for b
and even doesn`t recognize c. So only the first error in my parser could
be taken serious. Is there any possibility to change this behavior?
II.
The error messages:
How can I change the handling of the error messages in the catch block,
for example slightly changing the error messages and, e.g. store them in
a string array?
thanks for attention.


|