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

        try {
            item = numberRange();

            tokens.skip(LSQUAREBRACKET);
            if (item == null)
                tokens.skipNoIgnore(SPACE);
            // TODO: Better definition of start and end of numeric items
            if (item == null && tokens.currentIsNoIgnore(MINUS) && (tokens.currentNoIgnore(1).kind == NUMBER)) {
                tokens.skipNoIgnore();
                Token t = tokens.next();
                item = new IntItem("-" + t.toString() + decimalPart(), true);
                item.setOrigin(t.substring);
            } else if (item == null && tokens.currentIs(NUMBER)) {
                Token t = tokens.next();
                item = new IntItem(t.toString() + decimalPart(), true);
                item.setOrigin(t.substring);
            }

            if (item == null) {
                item = numberSmaller();
            }

            if (item == null) {
                item = numberGreater();
            }
            if (item != null && ! endOfNumber()) {
                item = null;
            }
            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