class QCompiler implements OQLLexerTokenTypes {

  public CompiledValue compileQuery(String oqlSource) {
    try {
      OQLLexer lexer = new OQLLexer(new StringReader(oqlSource));
      OQLParser parser = new OQLParser(lexer);
      // by default use Unsupported AST class, overridden for supported
      // operators in the grammer proper
      parser.setASTNodeClass("org.apache.geode.cache.query.internal.parse.ASTUnsupported");
      parser.queryProgram();
      GemFireAST n = (GemFireAST) parser.getAST();
      n.compile(this);
    } catch (Exception ex) { // This is to make sure that we are wrapping any antlr exception with
                             // GemFire Exception.
      throw new QueryInvalidException(
          String.format("Syntax error in query: %s", ex.getMessage()),
          ex);
    }
    Assert.assertTrue(stackSize() == 1, "stack size = " + stackSize());
    return (CompiledValue) pop();
  }

  public  QCompiler();
  public  QCompiler(boolean isForIndexCompilation);

}