public void optimizeConfigs(ATNSimulator interpreter) { if ( readonly ) throw new IllegalStateException("This set is readonly"); if ( configLookup.isEmpty() ) return; for (ATNConfig config : configs) { // int before = PredictionContext.getAllContextNodes(config.context).size(); config.context = interpreter.getCachedContext(config.context); // int after = PredictionContext.getAllContextNodes(config.context).size(); // System.out.println("configs "+before+"->"+after); } }
public void optimizeConfigs(ATNSimulator interpreter) { if ( readonly ) throw new IllegalStateException("This set is readonly"); if ( configLookup.isEmpty() ) return; for (ATNConfig config : configs) { // int before = PredictionContext.getAllContextNodes(config.context).size(); config.context = interpreter.getCachedContext(config.context); // int after = PredictionContext.getAllContextNodes(config.context).size(); // System.out.println("configs "+before+"->"+after); } }
public void optimizeConfigs(ATNSimulator interpreter) { if ( readonly ) throw new IllegalStateException("This set is readonly"); if ( configLookup.isEmpty() ) return; for (ATNConfig config : configs) { // int before = PredictionContext.getAllContextNodes(config.context).size(); config.context = interpreter.getCachedContext(config.context); // int after = PredictionContext.getAllContextNodes(config.context).size(); // System.out.println("configs "+before+"->"+after); } }
public void optimizeConfigs(ATNSimulator interpreter) { if ( readonly ) throw new IllegalStateException("This set is readonly"); if ( configLookup.isEmpty() ) return; for (ATNConfig config : configs) { // int before = PredictionContext.getAllContextNodes(config.context).size(); config.context = interpreter.getCachedContext(config.context); // int after = PredictionContext.getAllContextNodes(config.context).size(); // System.out.println("configs "+before+"->"+after); } }