);
ParsingResult result = parser.parseFile(grammarFile);
if (result.success()) {
Grammar grammar = ((ParserFactory)parser.getFactory()).getGrammar();
return grammar.getGeneratorResult(parsingSettings);
}
throw new ParserException("Could not generate grammar: " + result);
}