@Override
    public String toString() {
        String fmt = "[%s,pos(%s,%s),%s]";
        if (ch == 9) {
            return String.format(fmt, ps, line, pos, "\\t");
        } else if (ch == 10 || ch == 13) {
            return String.format(fmt, ps, line, pos, "\\n");
        } else if (ch == 0) {
            return String.format(fmt, ps, line, pos, "$eof");
        } else if (ch == 32) {
            return String.format(fmt, ps, line, pos, "\\s");
        } else {
            return String.format(fmt, ps, line, pos, ch);
        }
    }