factory.setValidating(false);
Grammar grammar;
if( args[0].equals("trex") ) {
TREXGrammarReader reader = new TREXGrammarReader(
new com.sun.msv.driver.textui.DebugController(false,false),
factory,
new TypedTREXGrammarInterceptor(),
new ExpressionPool() );
((XMLFilter)reader).parse(args[1]);
grammar = reader.getResult();
} else {
grammar = GrammarLoader.loadSchema( args[1],
new com.sun.msv.driver.textui.DebugController(false,false),
factory );
}