public Grammar preparseGrammar(String type,XMLInputSource is) throws XNIException, IOException {
  if (fLoaders.containsKey(type)) {
    XMLGrammarLoaderContainer xglc=(XMLGrammarLoaderContainer)fLoaders.get(type);
    XMLGrammarLoader gl=xglc.loader;
    if (xglc.modCount != fModCount) {
      gl.setProperty(SYMBOL_TABLE,fSymbolTable);
      gl.setProperty(ENTITY_RESOLVER,fEntityResolver);
      gl.setProperty(ERROR_REPORTER,fErrorReporter);
      if (fGrammarPool != null) {
        try {
          gl.setProperty(GRAMMAR_POOL,fGrammarPool);
        }
 catch (        Exception e) {
        }
      }
      xglc.modCount=fModCount;
    }
    return gl.loadGrammar(is);
  }
  return null;
}

public Grammar preparseGrammar ( String type , XMLInputSource is ) throws XNIException , IOException { if ( fLoaders . containsKey ( type ) ) { XMLGrammarLoaderContainer xglc = ( XMLGrammarLoaderContainer ) fLoaders . get ( type ) ; XMLGrammarLoader gl = xglc . loader ; if ( xglc . modCount != fModCount ) { gl . setProperty ( SYMBOL_TABLE , fSymbolTable ) ; gl . setProperty ( ENTITY_RESOLVER , fEntityResolver ) ; gl . setProperty ( ERROR_REPORTER , fErrorReporter ) ; if ( fGrammarPool != null ) { try { gl . setProperty ( GRAMMAR_POOL , fGrammarPool ) ; } catch ( Exception e ) { } } xglc . modCount = fModCount ; } return gl . loadGrammar ( is ) ; } return null ; }
parse a grammar from a location identified by an xmlinputsource . this method also adds this grammar to the xmlgrammarpool
