*
* @param context
* @return
*/
private static GeneratorResult execute(String grammarFile, final boolean forwardRef) {
final Writer writer = new PrintWriter();
// TODO: Fix this!
ParsingSettings parsingSettings = new ParsingSettings() {
@Override
public boolean isForwardRef() {
return forwardRef;
}
};
grammarFile = Util.replaceSlash(grammarFile);
writer.writeln(" Reading grammar \"" + grammarFile + "\"");
GrammarParser parser = new GrammarParser(new IGrammarFactoryFactory() {
public IGrammarFactory getFactory(int phase) {
return new ParserFactory(writer);
}}