File "parser.cpython-33.pyc"

Full Path: /home/attunedd/public_html/byp/izo/con7ext_sym404/rintoar.txt/opt/alt/python33/lib64/python3.3/html/__pycache__/parser.cpython-33.pyc
File size: 18.78 KB
MIME-type: text/x-bytecode.python
Charset: 8 bit


fMc@sJdZddlZddlZddlZejdZejdZejdZejdZejdZ	ejdZ
ejd	Zejd
ZejdZ
ejdZejd
ZejdejZejdejZejdZejdZGdddeZGdddejZdS(uA parser for HTML and XHTML.iNu[&<]u
&[a-zA-Z#]u%&([a-zA-Z][-.a-zA-Z0-9]*)[^a-zA-Z0-9]u)&#(?:[0-9]+|[xX][0-9a-fA-F]+)[^0-9a-fA-F]u	<[a-zA-Z]u>u--\s*>u(([a-zA-Z][-.a-zA-Z0-9:_]*)(?:\s|/(?!>))*u$([a-zA-Z][^	

 />]*)(?:\s|/(?!>))*uJ\s*([a-zA-Z_][-.:a-zA-Z_0-9]*)(\s*=\s*(\'[^\']*\'|"[^"]*"|[^\s"\'=<>`]*))?u]((?<=[\'"\s/])[^\s/>][^\s/=>]*)(\s*=+\s*(\'[^\']*\'|"[^"]*"|(?![\'"])[^>\s]*))?(?:\s|/(?!>))*u
  <[a-zA-Z][-.a-zA-Z0-9:_]*          # tag name
  (?:\s+                             # whitespace before attribute name
    (?:[a-zA-Z_][-.:a-zA-Z0-9_]*     # attribute name
      (?:\s*=\s*                     # value indicator
        (?:'[^']*'                   # LITA-enclosed value
          |\"[^\"]*\"                # LIT-enclosed value
          |[^'\">\s]+                # bare value
         )
       )?
     )
   )*
  \s*                                # trailing whitespace
uF
  <[a-zA-Z][^\t\n\r\f />\x00]*       # tag name
  (?:[\s/]*                          # optional whitespace before attribute name
    (?:(?<=['"\s/])[^\s/>][^\s/=>]*  # attribute name
      (?:\s*=+\s*                    # value indicator
        (?:'[^']*'                   # LITA-enclosed value
          |"[^"]*"                   # LIT-enclosed value
          |(?!['"])[^>\s]*           # bare value
         )
         (?:\s*,)*                   # possibly followed by a comma
       )?(?:\s|/(?!>))*
     )*
   )?
  \s*                                # trailing whitespace
u#</\s*([a-zA-Z][-.a-zA-Z0-9:_]*)\s*>cBs5|EeZdZdZdddZddZdS(uHTMLParseErroru&Exception raised for all parse errors.cCs3|st||_|d|_|d|_dS(Nii(uAssertionErrorumsgulinenouoffset(uselfumsguposition((u0/opt/alt/python33/lib64/python3.3/html/parser.pyu__init__Ps	
uHTMLParseError.__init__cCsW|j}|jdk	r,|d|j}n|jdk	rS|d|jd}n|S(Nu, at line %du, column %di(umsgulinenouNoneuoffset(uselfuresult((u0/opt/alt/python33/lib64/python3.3/html/parser.pyu__str__Vs	uHTMLParseError.__str__N(NN(u__name__u
__module__u__qualname__u__doc__uNoneu__init__u__str__(u
__locals__((u0/opt/alt/python33/lib64/python3.3/html/parser.pyuHTMLParseErrorMsuHTMLParseErrorcBsd|EeZdZdZd:Zd;ddZddZdd	Zd
dZ	dd
Z
d9ZddZ
ddZddZddZddZdddZddZddZdd Zd!d"Zd#d$Zd%d&Zd'd(Zd)d*Zd+d,Zd-d.Zd/d0Zd1d2Zd3d4Zd5d6Z d7d8Z!d9S(<u
HTMLParseruFind tags and other markup and call handler functions.

    Usage:
        p = HTMLParser()
        p.feed(data)
        ...
        p.close()

    Start tags are handled by calling self.handle_starttag() or
    self.handle_startendtag(); end tags by self.handle_endtag().  The
    data between tags is passed from the parser to the derived class
    by calling self.handle_data() with the data as argument (the data
    may be split up in arbitrary chunks).  Entity references are
    passed by calling self.handle_entityref() with the entity
    reference as the argument.  Numeric character references are
    passed to self.handle_charref() with the string containing the
    reference as the argument.
    uscriptustylecCs6|rtjdtddn||_|jdS(uInitialize and reset this instance.

        If strict is set to False (the default) the parser will parse invalid
        markup, otherwise it will raise an error.  Note that the strict mode
        is deprecated.
        uThe strict mode is deprecated.u
stackleveliN(uwarningsuwarnuDeprecationWarningustrictureset(uselfustrict((u0/opt/alt/python33/lib64/python3.3/html/parser.pyu__init__us
		uHTMLParser.__init__cCs8d|_d|_t|_d|_tjj|dS(u1Reset this instance.  Loses all unprocessed data.uu???N(	urawdataulasttaguinteresting_normaluinterestinguNoneu
cdata_elemu_markupbaseu
ParserBaseureset(uself((u0/opt/alt/python33/lib64/python3.3/html/parser.pyuresets
				uHTMLParser.resetcCs!|j||_|jddS(uFeed data to the parser.

        Call this as often as you want, with as little or as much text
        as you want (may include '\n').
        iN(urawdataugoahead(uselfudata((u0/opt/alt/python33/lib64/python3.3/html/parser.pyufeedsuHTMLParser.feedcCs|jddS(uHandle any buffered data.iN(ugoahead(uself((u0/opt/alt/python33/lib64/python3.3/html/parser.pyuclosesuHTMLParser.closecCst||jdS(N(uHTMLParseErrorugetpos(uselfumessage((u0/opt/alt/python33/lib64/python3.3/html/parser.pyuerrorsuHTMLParser.errorcCs|jS(u)Return full source of start tag: '<...>'.(u_HTMLParser__starttag_text(uself((u0/opt/alt/python33/lib64/python3.3/html/parser.pyuget_starttag_textsuHTMLParser.get_starttag_textcCs2|j|_tjd|jtj|_dS(Nu</\s*%s\s*>(uloweru
cdata_elemureucompileuIuinteresting(uselfuelem((u0/opt/alt/python33/lib64/python3.3/html/parser.pyuset_cdata_modesuHTMLParser.set_cdata_modecCst|_d|_dS(N(uinteresting_normaluinterestinguNoneu
cdata_elem(uself((u0/opt/alt/python33/lib64/python3.3/html/parser.pyuclear_cdata_modes	uHTMLParser.clear_cdata_modec
Cs|j}d}t|}x||kr|jj||}|rT|j}n|jraPn|}||kr|j|||n|j||}||krPn|j}|d|rqt	j
||r|j|}n|d|r|j|}n|d|r-|j
|}n|d|rN|j|}ng|d|r|jrx|j|}q|j|}n+|d|kr|jd|d}nP|dkr\|sPn|jr|jdn|jd	|d}|dkr8|jd|d}|dkrB|d}qBn
|d7}|j|||n|j||}q|d
|rMtj
||}|r|jdd}	|j|	|j}|d|ds|d}n|j||}qqd||dkrI|j|||d|j||d}nPq|d
|rtj
||}|r|jd}	|j|	|j}|d|ds|d}n|j||}qntj
||}|re|ra|j||dkra|jr'|jdqa|j}||krH|}n|j||d}nPq|d|kr|jd
|j||d}qPqdstdqW|r||kr|jr|j||||j||}n||d|_dS(Niu<u</u<!--u<?u<!iuEOF in middle of constructu>u&#iu;u&u#EOF in middle of entity or char refuinteresting.search() liedi(urawdataulenuinterestingusearchustartu
cdata_elemuhandle_datau	updateposu
startswithustarttagopenumatchuparse_starttaguparse_endtagu
parse_commentuparse_piustrictuparse_declarationuparse_html_declarationuerrorufinducharrefugroupuhandle_charrefuendu	entityrefuhandle_entityrefu
incompleteuAssertionError(
uselfuendurawdatauiunumatchuju
startswithukuname((u0/opt/alt/python33/lib64/python3.3/html/parser.pyugoaheads				

	




"		
uHTMLParser.goaheadcCs|j}|||ddks/td|||ddkrV|j|S|||ddkr}|j|S|||djd	kr|jd
|d}|dkrd
S|j||d||dS|j|SdS(Niu<!u+unexpected call to parse_html_declaration()iu<!--iu<![i	u	<!doctypeu>iii(urawdatauAssertionErroru
parse_commentuparse_marked_sectionulowerufinduhandle_decluparse_bogus_comment(uselfuiurawdataugtpos((u0/opt/alt/python33/lib64/python3.3/html/parser.pyuparse_html_declarations	&

 u!HTMLParser.parse_html_declarationicCs|j}|||ddks/td|jd|d}|dkrUd	S|ry|j||d|n|dS(
Niu<!u</u"unexpected call to parse_comment()u>i(u<!u</ii(urawdatauAssertionErrorufinduhandle_comment(uselfuiureporturawdataupos((u0/opt/alt/python33/lib64/python3.3/html/parser.pyuparse_bogus_comment)s	&uHTMLParser.parse_bogus_commentcCs|j}|||ddks/tdtj||d}|sOdS|j}|j||d||j}|S(Niu<?uunexpected call to parse_pi()ii(urawdatauAssertionErrorupicloseusearchustartu	handle_piuend(uselfuiurawdataumatchuj((u0/opt/alt/python33/lib64/python3.3/html/parser.pyuparse_pi5s	&uHTMLParser.parse_picCsd|_|j|}|dkr(|S|j}||||_g}|jrltj||d}ntj||d}|std|j	}|j
dj|_}x'||kr|jrt
j||}ntj||}|sPn|j
ddd\}	}
}|
s2d}ns|dddko]|d
dkns|dddko|ddknr|dd}n|r|j|}n|j|	j|f|j	}qW|||j}|dkr|j\}
}d
|jkra|
|jjd
}
t|j|jjd
}n|t|j}|jr|jd|||ddfn|j||||S|jd	r|j||n/|j||||jkr|j|n|S(Niiu#unexpected call to parse_starttag()iiu'u"u>u/>u
u junk characters in start tag: %riiii(u>u/>(uNoneu_HTMLParser__starttag_textucheck_for_whole_start_tagurawdataustrictutagfindumatchutagfind_tolerantuAssertionErroruendugroupulowerulasttaguattrfinduattrfind_tolerantuunescapeuappendustripugetposucountulenurfinduerroruhandle_datauendswithuhandle_startendtaguhandle_starttaguCDATA_CONTENT_ELEMENTSuset_cdata_mode(uselfuiuendposurawdatauattrsumatchukutagumuattrnameurestu	attrvalueuendulinenouoffset((u0/opt/alt/python33/lib64/python3.3/html/parser.pyuparse_starttagAs`					00		"uHTMLParser.parse_starttagcCsk|j}|jr'tj||}ntj||}|r[|j}|||d}|dkrs|dS|dkr|jd|r|dS|jd|rdS|jr|j||d|jdn||kr|S|dSn|dkrdS|dkrd
S|jr@|j|||jd	n||krP|S|dSnt	d
dS(Niu>u/u/>iumalformed empty start taguu6abcdefghijklmnopqrstuvwxyz=/ABCDEFGHIJKLMNOPQRSTUVWXYZumalformed start taguwe should not get here!iii(
urawdataustrictulocatestarttagendumatchulocatestarttagend_tolerantuendu
startswithu	updateposuerroruAssertionError(uselfuiurawdataumujunext((u0/opt/alt/python33/lib64/python3.3/html/parser.pyucheck_for_whole_start_tag}s>				u$HTMLParser.check_for_whole_start_tagcCs|j}|||ddks/tdtj||d}|sOd	S|j}tj||}|sW|jdk	r|j	||||S|j
r|jd|||fntj||d}|s|||ddkr|dS|j
|Sn|jdj}|jd|j}|j||dS|jdj}|jdk	r||jkr|j	||||Sn|j|j|j|S(
Niu</uunexpected call to parse_endtagiubad end tag: %riu</>u>i(urawdatauAssertionErroru	endendtagusearchuendu
endtagfindumatchu
cdata_elemuNoneuhandle_dataustrictuerrorutagfind_tolerantuparse_bogus_commentugroupulowerufindu
handle_endtaguclear_cdata_mode(uselfuiurawdataumatchugtposu	namematchutagnameuelem((u0/opt/alt/python33/lib64/python3.3/html/parser.pyuparse_endtags<	&	!

uHTMLParser.parse_endtagcCs!|j|||j|dS(N(uhandle_starttagu
handle_endtag(uselfutaguattrs((u0/opt/alt/python33/lib64/python3.3/html/parser.pyuhandle_startendtagsuHTMLParser.handle_startendtagcCsdS(N((uselfutaguattrs((u0/opt/alt/python33/lib64/python3.3/html/parser.pyuhandle_starttagsuHTMLParser.handle_starttagcCsdS(N((uselfutag((u0/opt/alt/python33/lib64/python3.3/html/parser.pyu
handle_endtagsuHTMLParser.handle_endtagcCsdS(N((uselfuname((u0/opt/alt/python33/lib64/python3.3/html/parser.pyuhandle_charrefsuHTMLParser.handle_charrefcCsdS(N((uselfuname((u0/opt/alt/python33/lib64/python3.3/html/parser.pyuhandle_entityrefsuHTMLParser.handle_entityrefcCsdS(N((uselfudata((u0/opt/alt/python33/lib64/python3.3/html/parser.pyuhandle_datasuHTMLParser.handle_datacCsdS(N((uselfudata((u0/opt/alt/python33/lib64/python3.3/html/parser.pyuhandle_commentsuHTMLParser.handle_commentcCsdS(N((uselfudecl((u0/opt/alt/python33/lib64/python3.3/html/parser.pyuhandle_declsuHTMLParser.handle_declcCsdS(N((uselfudata((u0/opt/alt/python33/lib64/python3.3/html/parser.pyu	handle_pisuHTMLParser.handle_picCs$|jr |jd|fndS(Nuunknown declaration: %r(ustrictuerror(uselfudata((u0/opt/alt/python33/lib64/python3.3/html/parser.pyuunknown_decls	uHTMLParser.unknown_declcCs8d|kr|Sdd}tjd||dtjS(Nu&c
SsB|jd}yx|ddkr|dd}|ddkrht|ddjdd}nt|jd}t|SWntk
rd|SYnXdd	lm}||kr||S|jdrd
|Sx[tdt	|D]<}|d||kr||d|||dSqWd
|SdS(
Niu#iuxuXu;iu&#(uhtml5u&i(uxuX(
ugroupsuinturstripuchru
ValueErroru
html.entitiesuhtml5uendswithurangeulen(usucuhtml5ux((u0/opt/alt/python33/lib64/python3.3/html/parser.pyureplaceEntitiess&%

$u,HTMLParser.unescape.<locals>.replaceEntitiesu&&(#?[xX]?(?:[0-9a-fA-F]+;|\w{1,32};?))uflags(ureusubuASCII(uselfusureplaceEntities((u0/opt/alt/python33/lib64/python3.3/html/parser.pyuunescapes
	uHTMLParser.unescapeN(uscriptustyleF("u__name__u
__module__u__qualname__u__doc__uCDATA_CONTENT_ELEMENTSuFalseu__init__uresetufeeducloseuerroruNoneu_HTMLParser__starttag_textuget_starttag_textuset_cdata_modeuclear_cdata_modeugoaheaduparse_html_declarationuparse_bogus_commentuparse_piuparse_starttagucheck_for_whole_start_taguparse_endtaguhandle_startendtaguhandle_starttagu
handle_endtaguhandle_charrefuhandle_entityrefuhandle_datauhandle_commentuhandle_declu	handle_piuunknown_decluunescape(u
__locals__((u0/opt/alt/python33/lib64/python3.3/html/parser.pyu
HTMLParser_s:
	i<+*u
HTMLParser(u__doc__u_markupbaseureuwarningsucompileuinteresting_normalu
incompleteu	entityrefucharrefustarttagopenupicloseucommentcloseutagfindutagfind_tolerantuattrfinduattrfind_tolerantuVERBOSEulocatestarttagendulocatestarttagend_tolerantu	endendtagu
endtagfindu	ExceptionuHTMLParseErroru
ParserBaseu
HTMLParser(((u0/opt/alt/python33/lib64/python3.3/html/parser.pyu<module>s0