private boolean nothingAhead(boolean skip) {
        int position = tokens.getPosition();
        try {
            boolean quoted = false;
            while (tokens.hasNext()) {
                if (tokens.currentIsNoIgnore(QUOTE)) {
                    tokens.skipMultiple(QUOTE);
                    quoted = !quoted;
                } else {
                    if (!quoted && tokens.currentIsNoIgnore(SPACE)) {
                        return true;
                    }
                    if (tokens.currentIsNoIgnore(NUMBER)
                            || tokens.currentIsNoIgnore(WORD)) {
                        return false;
                    }
                    tokens.skipNoIgnore();
                }
            }
            return true;
        } finally {
            if (!skip) {
                tokens.setPosition(position);
            }
        }
    }
Returns an item and whether it had an explicit index ('indexname:' prefix).

@param indexPath the index name prefix this is in the context of, only non-empty if this is
                 inside a sameElement. The path includes the index name and the trailing dot.
@return an item and whether it has an explicit index, or a Pair with the first element null if none
container-search/src/main/java/com/yahoo/prelude/query/parser/StructuredParser.java