public static void main(String[] args) throws RecognitionException {
    HiveLexer lexer = new HiveLexer(new ANTLRNoCaseStringStream(args[0]));
    HiveParser parser = new HiveParser(new TokenRewriteStream(lexer));
    parser.setTreeAdaptor(ADAPTOR);
    CommonTree tree = parser.statement().getTree();
    DOTTreeGenerator gen = new DOTTreeGenerator();
    StringTemplate st = gen.toDOT(tree);
    System.out.println(st);
  }
The main entry point of this application.
parser/src/test/org/apache/hadoop/hive/ql/parse/HqlParser.java