public final void advanceVertically() throws IOException {
            do {
                String line = lineSource.getNextLine();
                if (line == null) {
                    reset(null);
                    eof = true;
                    dent = -indentationStack.size();
                    indentationStack.clear();
                    return;
                }
                errorLocator.nextLine();
                reset(line);
                skipSpaces();
            } while (atEndOfLine() || at(commentChar));
            int threshold = indentationStack.isEmpty() ? 0 : indentationStack.get(indentationStack.size() - 1)
                    .intValue();
            if (getPos() > threshold) {
                dent = 1;
                indentationStack.add(new Integer(getPos()));
            } else {
                dent = 0;
                while (getPos() < threshold) {
                    dent--;
                    indentationStack.remove(indentationStack.size() - 1);
                    threshold = indentationStack.isEmpty() ? 0 : indentationStack.get(indentationStack.size() - 1)
                            .intValue();
                }
                if (getPos() != threshold) {
                    error("invalid dedent");
                }
            }
        }