public final void init(AtnParseRunner parseRunner, String grammarId, boolean infoMode)
      throws IOException {
    this.parseRunner = parseRunner;
    this.infoMode = infoMode;

    final ParseConfig parseConfig = parseRunner.getParseConfig();
    this.resourceManager = parseConfig.getResourceManager();

    final String[] idPieces = grammarId.split(":");
    final AtnParserWrapper parserWrapper =
        parseConfig.getId2CompoundParser().get(idPieces[0]).getParserWrapper(idPieces[1]);
    final AtnGrammar grammar = parserWrapper.getParser().getGrammar();
    final AtnParseOptions parseOptions = parserWrapper.getParseOptions();
    this.grammarAnalyzer = new AtnGrammarAnalyzer(grammar, parseOptions);

    this.textGenerator = AtnGrammarAnalyzer.buildTextGenerator(resourceManager);

    this.parseInterpreter = grammarAnalyzer.getParseInterpreter();
  }
 public List<Parse> generateParses(Tree<String> tree, AtomicBoolean die) throws IOException {
   return grammarAnalyzer.generateParses(parseRunner, tree, textGenerator, die);
 }
 public Map<String, List<Tree<String>>> buildTrees() {
   return grammarAnalyzer.buildTrees(infoMode, textGenerator);
 }
 public Parse getHardwiredParse(Tree<String> tree) {
   return grammarAnalyzer.getHardwiredParse(tree, textGenerator);
 }