static final BinaryElementType.SlicedInteger.Slice parseIntegerSlice(ParseUtil.IndentableLexer lexer) throws IOException {
        lexer.pass('@');
        lexer.pass('.');
        int rightShift = lexer.readUnsignedInteger("right shift");
        lexer.skipSpaces();
        BinaryElementType.SlicedInteger.Slice slice;
        if (lexer.atDigit()) {
            // it's a basic slice; the field width (in bits) comes next
            int posBeforeSliceWidth = lexer.getPos();
            int sliceWidth = lexer.readUnsignedInteger("slice width");
            if (sliceWidth == 0) {
                lexer.errorAtPos(posBeforeSliceWidth, "zero-bit slice?");
            }
            List<String> meanings = new ArrayList<String>();
            while (true) {
                lexer.skipSpaces();
                if (!lexer.at('"')) {
                    break;
                }
                meanings.add(lexer.readStringLiteral(null));
            }
            slice = new BinaryElementType.SlicedInteger.Slice.Basic(rightShift, sliceWidth, meanings.toArray(new String[0]));
        } else {
            // it's a flag slice; the field width is implicitly one
            String setFlagName = lexer.readOptStringLiteral(null);
            lexer.skipSpaces();
            String clearFlagName;
            if (lexer.at('/')) {
                lexer.skipChar();
                lexer.skipSpaces();
                clearFlagName = lexer.readStringLiteral("cleared flag meaning");
            } else {
                clearFlagName = null;
            }
            if (setFlagName == null && clearFlagName == null) {
                lexer.error("expected bit meaning");
            }
            slice = new BinaryElementType.SlicedInteger.Slice.Flag(rightShift, setFlagName, clearFlagName);
        }
        lexer.passLogicalNewline();
        return slice;
    }