} catch (ClassCastException e) { antlr.DumpASTVisitor visitor = new antlr.DumpASTVisitor(); visitor.visit(ast); IllegalArgumentException e2 = new IllegalArgumentException(e.getMessage()); e2.initCause(e); throw e2;
    public static Query parse(FqlQuery fq) {        Query q = new Query();        q.setDistinct(false);        String modelPackage = fq.getPackageName();        String fql = fq.getQueryString();        Iterator iterator = fq.getParameters().iterator();        AST ast = null;        try {            InputStream is = new ByteArrayInputStream(fql.getBytes());            FqlLexer lexer = new FqlLexer(is);            FqlParser parser = new FqlParser(lexer);            parser.start_rule();            ast = parser.getAST();            if (ast == null) {                throw new IllegalArgumentException("Invalid FQL string " + fql);            }            processFqlStatementAST(ast, q, modelPackage, iterator);            return q;        } catch (antlr.RecognitionException e) {            antlr.DumpASTVisitor visitor = new antlr.DumpASTVisitor();            visitor.visit(ast);            IllegalArgumentException e2 = new IllegalArgumentException("Exception");            e2.initCause(e);            throw e2;        } catch (antlr.TokenStreamException e) {            antlr.DumpASTVisitor visitor = new antlr.DumpASTVisitor();            visitor.visit(ast);            IllegalArgumentException e2 = new IllegalArgumentException("Exception");            e2.initCause(e);            throw e2;        } catch (IllegalArgumentException e) {            antlr.DumpASTVisitor visitor = new antlr.DumpASTVisitor();            visitor.visit(ast);            throw e;        }    }