private int weightSuffix() {
        int position = tokens.getPosition();
        int item = -1;

        try {
            if (!tokens.skipNoIgnore(EXCLAMATION)) {
                return -1;
            }
            item = 150;

            if (tokens.currentIsNoIgnore(NUMBER)) {
                try {
                    item = Integer.parseInt(tokens.next().toString());
                } catch (NumberFormatException e) {
                    item = -1;
                }
            } else {
                while (tokens.currentIsNoIgnore(EXCLAMATION)) {
                    item += 50;
                    tokens.skipNoIgnore();
                }
            }
            return item;

        } finally {
            if (item == -1) {
                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