private void nextRun() throws IOException {
        out.setLength(0);

        type = null;
        token = null;

        int c = in.peek();
        if (c == -1) {
            type = Type.END;
            return;
        }

        clearSpace();
        c = in.peek();

        if (c == -1) {
            type = Type.END;
            return;
        } else if ("/.(){}[]$%|:*?".indexOf(c) > -1) {
            type = Type.SYMBOL;
            out.append((char) in.read());
        } else if (Character.isDigit(c)) {
            type = Type.NUMBER;
            parseNumber();
        } else if (Character.isLetter(c) || c == '_' || c == '.') {
            type = Type.NAME;
            parseName();
        } else {
            error("Invalid character `" + (char) c + "'");
        }
    }