private int parseId(char ch, int state) {
        if (state == 0) {
            if (Character.isLetter(ch)) return 1;
        }
        if (state > 0 && state < 8) {
            if (Character.isLetter(ch) || Character.isDigit(ch))
                return state + 1;
        }
        return -1;
    }