[antlr-interest] Error messages in other (human) languages

Terence Parr parrt at cs.usfca.edu
Fri Jan 14 10:33:08 PST 2005


On Jan 14, 2005, at 10:22 AM, Paul J. Lucas wrote:

> 	If programming in Java, the canonical way to have error
> 	messages in other languages is via a .properties file.  I
> 	haven't seen such for ANTLR.  Hence, is the only way to
> 	translate ANTLR error messages by catching all exceptions,
> 	pulling the relevant information out ffrom fields, and
> 	rethrowing one's own exceptions with new text?

Probably.  I didn't think about this when doing errors previously when 
under the gun during the startup.  Sorry.

[I have fixed this in 3.0.  Only the exception is thrown with relevant 
info; no text at all.  The reporting facilities are required to decode 
and print as human text.  Further, all antlr error messages themselves 
are contained in string template files and ANTLR checks the locale to 
pull in the right messages.] :)

Ter






More information about the antlr-interest mailing list