See the HTML 2.0 specification: http://www.w3.org/hypertext/WWW/MarkUp/html-spec/html-spec_toc.html i����(twarnpy3ks1the htmllib module has been removed in Python 3.0t stackleveliN(tAS_ISt HTMLParsertHTMLParseErrorcBseZdZRS(s3Error raised when an HTML document can't be parsed.(t__name__t __module__t__doc__(((s/usr/lib64/python2.7/htmllib.pyRscBs3eZdZddlmZdd�Zd�Zd�Zd�Zd�Z d �Z d �Zd�Zd�Z d �Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d �Z!d!�Z"d"�Z#d#�Z$d$�Z%d%�Z&d&�Z'd'�Z(d(�Z)d)�Z*d*�Z+d+�Z,d,�Z-d-�Z.d.�Z/d/�Z0d0�Z1d1�Z2d2�Z3d3�Z4d4�Z5d5�Z6d6�Z7d7�Z8d8�Z9d9�Z:d:�Z;d;�Z<d<�Z=d=�Z>dd>�Z?d?�Z@d@�ZAdA�ZBdB�ZCdC�ZDdD�ZEdE�ZFdF�ZGdG�ZHdH�ZIdI�ZJdJ�ZKdK�ZLdL�ZMdM�ZNdN�ZOdO�ZPdP�ZQdQ�ZRdR�ZSdS�ZTdT�ZUdU�ZVdV�ZWdW�ZXdX�ZYdY�ZZdZ�Z[RS([s�This is the basic HTML parser class.
It supports all entity names required by the XHTML 1.0 Recommendation. It also defines handlers for all HTML 2.0 and many HTML 3.0 and 3.2 elements.
i����(t entitydefsicCs tjj||�||_dS(s�Creates an instance of the HTMLParser class.
The formatter parameter is the formatter instance associated with the parser.
N(tsgmllibt SGMLParsert__init__t formatter(tselfRtverbose((s/usr/lib64/python2.7/htmllib.pyR"scCst|��dS(N(R(R tmessage((s/usr/lib64/python2.7/htmllib.pyterror,scCs\tjj|�d|_d|_d|_d|_d|_g|_ d|_ g|_dS(Ni(R R tresettNonetsavedatatisindexttitletbasetanchort anchorlisttnofillt list_stack(R ((s/usr/lib64/python2.7/htmllib.pyR/s cCsR|jdk r"|j||_n,|jr>|jj|�n|jj|�dS(N(RRRRtadd_literal_datatadd_flowing_data(R tdata((s/usr/lib64/python2.7/htmllib.pythandle_data?s cCs d|_dS(s�Begins saving character data in a buffer instead of sending it to the formatter object.
Retrieve the stored data via the save_end() method. Use of the save_bgn() / save_end() pair may not be nested.
tN(R(R ((s/usr/lib64/python2.7/htmllib.pytsave_bgnJscCs7|j}d|_|js3dj|j��}n|S(sHEnds buffering character data and returns all data saved since the preceding call to the save_bgn() method.
If the nofill flag is false, whitespace is collapsed to single spaces. A call to this method without a preceding call to the save_bgn() method will raise a TypeError exception.
t N(RRRtjointsplit(R R((s/usr/lib64/python2.7/htmllib.pytsave_endTs cCs)||_|jr%|jj|�ndS(s}This method is called at the start of an anchor region.
The arguments correspond to the attributes of the <A> tag with the same names. The default implementation maintains a list of hyperlinks (defined by the HREF attribute for <A> tags) within the document. The list of hyperlinks is available as the data attribute anchorlist.
N(RRtappend(R threftnamettype((s/usr/lib64/python2.7/htmllib.pyt anchor_bgnes cCs3|jr/|jdt|j��d|_ndS(s�This method is called at the end of an anchor region.
The default implementation adds a textual footnote marker using an index into the list of hyperlinks created by the anchor_bgn()method.
s[%d]N(RRtlenRR(R ((s/usr/lib64/python2.7/htmllib.pyt anchor_endss cGs|j|�dS(s�This method is called to handle images.
The default implementation simply passes the alt value to the handle_data() method.