}
public static String getErrorMessage(Throwable e, String[] tokenNames) {
String msg;
if (e instanceof MissingTokenException) {
MissingTokenException mte = (MissingTokenException)e;
String tokenName;
if (mte.expecting== Token.EOF) {
tokenName = "EOF";
} else {
tokenName = tokenNames[mte.expecting];