* Otherwise we just use the default "antlr".
*/
public static void setFormat(String formatName) {
ErrorManager.formatName = formatName;
String fileName = "org/antlr/tool/templates/messages/formats/"+formatName+".stg";
format = new STGroupFile(fileName);
format.setListener(initSTListener);
if ( !format.isDefined("message") ) { // pick random msg to load
if ( formatName.equals("antlr") ) {
rawError("no such message format file "+fileName+" retrying with default ANTLR format");
setFormat("antlr"); // recurse on this rule, trying the default message format