code: public static Program compileSql(String query) {
          try {
              ANTLRStringStream in = new ANTLRStringStream(query);
              druidGLexer lexer = new druidGLexer(in);
              CommonTokenStream tokens = new CommonTokenStream(lexer);
              druidGParser parser = new druidGParser(tokens);
              Program pgm = parser.program();
              return pgm;
          } catch (RecognitionException ex) {
              System.out.println(ex);
              Logger.getLogger(DCompiler.class.getName()).log(Level.SEVERE, null, ex);
          }
          return null;
      }
docs: Sql->Json.
  @param query
  @return