LexingState(TokenStream stream) {
            this.regExpFlags = stream.regExpFlags;
            if (stream.stringBufferTop > 0) {
                this.bufferedString = new String(TokenStream.stringBuffer, 0, stream.stringBufferTop);
            }
            this.xmlOpenTagsCount = stream.xmlOpenTagsCount;
            this.string = stream.string;
            int state = 0;
            if (stream.dirtyLine) {
                state += DIRTY;
            }
            if (stream.divIsRegexp) {
                state += DIV_REGEXP;
            }
            if (stream.hitEOF) {
                state += EOF;
            }
            if (stream.xmlIsAttribute) {
                state += XML_ATTR;
            }
            if (stream.xmlIsTagContent) {
                state += XML_TAG;
            }
            if (stream.stringMode != 0) {
                state += (stream.stringMode << STRING_MODE_SHIFT);
            }
            this.flags = state;
        }