try {
grammar = parser.GrammarUnit(factory);
return grammar;
} catch (ParseException e) {
Token etoken = e.currentToken;
JSGFGrammarParseException ge = new JSGFGrammarParseException(etoken.beginLine, etoken.beginColumn, "Grammar Error", e.getMessage());
throw ge;
}
}