{
GrammarTreeRoot root = (GrammarTreeRoot) new GrammarParser(log).parse(new GrammarScanner(reader));
if (log.hasErrors())
throw new Grammar.Exception("cannot parse grammar");
GrammarBuilder maker = new GrammarBuilder(log);
root.accept(maker);
return maker.getGrammar();
}
static public ParserGenerator.CompiledParser compile(Grammar grammar, Options opts, Log log) throws Grammar.Exception
{