[antlr-interest] error message internationalization

Terence Parr parrt at cs.usfca.edu
Sat Nov 20 11:38:28 PST 2004


Howdy,

I'm working on the internationalization of the error messages for 
antlr.  It even pays attention to file encoding to make message files 
work for non-8 bit message files.  Further, the message files are 
actually string template group files (John Mitchell's idea I think) so 
you can do easy message rewriting.  For example, here is the start of 
my english/US default message file:

group en_US;

// file errors
CANNOT_CLOSE_FILE(arg) ::= "cannot close file <arg>: <exception>"
....

The code now does:

ErrorManager.error(ErrorManager.CANNOT_CLOSE_FILE, fileName, ioe);

so there are no hardcoded error messages.  Can't wait to see error 
messages in Mandarin and Russian!

Cool, eh?  Man, that StringTemplate is just plain useful!  Woohoo!  I'm 
racing to prepare for the hotshot GUI guy, Jean Bovet, who will start 
playing around with ANTLR 3.0 shortly. :)

Ter
--
CS Professor & Grad Director, University of San Francisco
Creator, ANTLR Parser Generator, http://www.antlr.org
Cofounder, http://www.jguru.com
Cofounder, http://www.knowspam.net enjoy email again!





 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
    antlr-interest-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 





More information about the antlr-interest mailing list