private int eatToEndOfLine() throws BadLocationException {
        if (cNextPos >= fRangeEnd) {
            return 0;
        }
        char ch = document.getChar(cNextPos++);
        // 1. eat all spaces and tabs
        while ((cNextPos < fRangeEnd) && ((' ' == ch) || ('\t' == ch))) {
            ch = document.getChar(cNextPos++);
        }
        if (cNextPos >= fRangeEnd) {
            cNextPos--;
            return 0;
        }

        // now ch is a new line or a non-whitespace
        if ('\n' == ch) {
            if (cNextPos < fRangeEnd) {
                ch = document.getChar(cNextPos++);
                if ('\r' != ch) {
                    cNextPos--;
                }
            } else {
                cNextPos--;
            }
            return 1;
        }

        if ('\r' == ch) {
            if (cNextPos < fRangeEnd) {
                ch = document.getChar(cNextPos++);
                if ('\n' != ch) {
                    cNextPos--;
                }
            } else {
                cNextPos--;
            }
            return 1;
        }

        return 0;
    }
classsifies a tag: <br />
&lt;?...?&gt;: {@link #PI_TAG} <br />
&lt;!...--&gt;: {@link #COMMENT_TAG} <br />
&lt;...&gt;: {@link #START_TAG} <br />
&lt;.../&gt;: {@link #LEAF_TAG} <br />
&lt;/...&gt;: {@link #END_TAG} <br />
&lt;...: {@link #EOR_TAG} (end of range reached before closing &gt; is
found). <br />
when this method is called, {@link #cNextPos} must point to the character
after &lt;, when it returns, it points to the character after &gt; or
after the range. About syntax errors: this method is not a validator, it
is useful. Side effect: writes number of found newLines to
{@link #cNewLines}.

@return the tag classification
plugins/org.jkiss.dbeaver.ui.editors.xml/src/org/jkiss/dbeaver/ui/editors/xml/XMLReconcilingStrategy.java