log("Building a parsertable from " + inFile);
//SAXParser parser = new SAXParser();
XMLReader parser = XMLReaderFactory.createXMLReader("org.apache.xerces.parsers.SAXParser");
SAXGrammarGenerator grammargenerator = new SAXGrammarGenerator();
parser.setContentHandler(grammargenerator);
try
{
parser.parse(inFile.toString());
}
catch (SAXParseException se)
{
log("The grammar file is not valid: " + se.getMessage());
return;
}
Grammar grammar = grammargenerator.getGrammar();
ParserTableGenerator generator = new ParserTableGenerator(grammar);
generator.enableLogging(logger);
ParserTable parsertable = generator.getParserTable();