public void validateEndState(ScanContext ctx) throws InvalidQueryException {
      if (! ctx.getIntermediateTokens().isEmpty()) {
        throw new InvalidQueryException("Unexpected end of expression.");
      }
    }
Provides base token handler functionality then delegates to the individual concrete handlers.

@param token   the token to process
@param ctx     the scan context

@return true if this handler processed the token; false otherwise
@throws InvalidQueryException  if an invalid token is encountered
ambari-server/src/main/java/org/apache/ambari/server/api/predicate/QueryLexer.java