private IntItem numberRange() {
        int position = tokens.getPosition();
        IntItem item = null;

        try {
            Token initial = tokens.next();
            if (initial.kind != LSQUAREBRACKET) return null;

            String rangeStart = "";
            boolean negative = tokens.skip(MINUS);

            if (tokens.currentIs(NUMBER)) {
                rangeStart = (negative ? "-" : "") + tokens.next().toString() + decimalPart();
            }

            if (!tokens.skip(SEMICOLON)) return null;

            String rangeEnd = "";

            negative = tokens.skip(MINUS);

            if (tokens.currentIs(NUMBER)) {
                rangeEnd = (negative ? "-" : "") + tokens.next().toString() + decimalPart();
            }
            if (rangeStart.isBlank() && rangeEnd.isBlank()) return null;


            String range = "[" + rangeStart + ";" + rangeEnd;
            if (tokens.skip(SEMICOLON)) {
                negative = tokens.skip(MINUS);
                if (tokens.currentIs(NUMBER)) {
                    String rangeLimit = (negative ? "-" : "") + tokens.next().toString();
                    range += ";" + rangeLimit;
                }
            }
            tokens.skip(RSQUAREBRACKET);

            item = new IntItem(range + "]", true);
            item.setOrigin(new Substring(initial.substring.start, tokens.currentNoIgnore().substring.start,
                                         initial.getSubstring().getSuperstring())); // XXX: Unsafe end?

            return item;
        } finally {
            if (item == null) {
                tokens.setPosition(position);
            }
        }
    }
Returns the specified term weight, or -1 if there is no weight suffix
container-search/src/main/java/com/yahoo/prelude/query/parser/StructuredParser.java