private void throwParseException(final String message) throws ParseException {
            String markedConfig = config;
            if (idx >= config.length()) {
                markedConfig += "[]";
            } else {
                markedConfig = markedConfig.substring(0, idx) + "[" + markedConfig.charAt(idx) + "]" + markedConfig.substring(idx + 1);
            }
            throw new ParseException("Problem parsing '" + markedConfig + "' (pos marked with []: " + idx + "): " + message, idx);
        }
Parses next expression starting from idx and leaving idx at next token AFTER expression
main/src/main/java/cgeo/geocaching/utils/config/LegacyFilterConfigParser.java