Here are my requirements:
1. Error messages generated by the parser must be displayed in English,
German, Japanese etc, depending on whether my program is used in USA,
Germany or Japan.
2. Instead of displaying the line number and column number in the error
message, I have to position the cursor on the line/column that caused
the error. (I have a GUI for displaying and edition the source code.)
Can I do this in ANTLR?
ANTLR sup****ts things like this:
INT
options {
paraphrase = "an integer";
}
: ('0'..'9')+ ;
But this doesn't help. The string "an integer" is in English. What about
German, Japanese etc?
And how do I supply German and Japanse versions of "unexpected token"?
Also, it looks like the Exceptions generated by ANTLR does not give you
the line and column numbers. Line and column numbers are embedded inside
the error message. So I have to parse the error message in order to get
the line and column numbers?