* in reading the file
*/
public Grammar preparseGrammar(String type, XMLInputSource
is) throws XNIException, IOException {
if(fLoaders.containsKey(type)) {
XMLGrammarLoader gl = (XMLGrammarLoader)fLoaders.get(type);
// make sure gl's been set up with all the "basic" properties:
gl.setProperty(SYMBOL_TABLE, fSymbolTable);
gl.setProperty(ENTITY_RESOLVER, fEntityResolver);
gl.setProperty(ERROR_REPORTER, fErrorReporter);
// potentially, not all will support this one...
if(fGrammarPool != null) {
try {
gl.setProperty(GRAMMAR_POOL, fGrammarPool);
} catch(Exception e) {
// too bad...
}
}
return gl.loadGrammar(is);
}
return null;
} // preparseGrammar(String, XMLInputSource): Grammar