class QueryParser {

  public Predicate parse(Token[] tokens) throws InvalidQueryException {
    ParseContext ctx = parseExpressions(tokens);

    List<Expression> listExpressions       = ctx.getExpressions();
    changeHostNameToLowerCase(listExpressions);
    List<Expression> listMergedExpressions = mergeExpressions(listExpressions, ctx.getMaxPrecedence());

    return listMergedExpressions.isEmpty() ? null :
        listMergedExpressions.get(0).toPredicate();
  }

  public  QueryParser();

}