public Predicate compile(String exp) throws InvalidQueryException {
    return parser.parse(lexer.tokens(exp));
  }
Generate a predicate from a query expression.

@param exp  query expression

@return a predicate instance
@throws InvalidQueryException if unable to compile the expression
ambari-server/src/main/java/org/apache/ambari/server/api/predicate/PredicateCompiler.java