Ńň §ÚęLc@s}dZddkZeidƒiZeidƒiZeidƒZeidƒZeidƒZ[dd d „ƒYZ dS( süShared support for scanning document type declarations in HTML and XHTML. This module is used as a foundation for the HTMLParser and sgmllib modules (indirectly, for htmllib as well). It has no documented public API and should not be used directly. i˙˙˙˙Ns[a-zA-Z][-_.a-zA-Z0-9]*\s*s(\'[^\']*\'|"[^"]*")\s*s--\s*>s ]\s*]\s*>s]\s*>t ParserBasecBsĄeZdZd„Zd„Zd„Zd„Zd„ZdZd„Z dd „Z dd „Z d „Z d „Z d „Zd„Zd„Zd„Zd„ZRS(siParser base class which provides some common support methods used by the SGML/HTML and XHTML parsers.cCs$|itjotdƒ‚ndS(Ns(markupbase.ParserBase must be subclassed(t __class__Rt RuntimeError(tself((s"/usr/lib64/python2.6/markupbase.pyt__init__scCstdƒ‚dS(Ns.subclasses of ParserBase must override error()(tNotImplementedError(Rtmessage((s"/usr/lib64/python2.6/markupbase.pyterror!scCsd|_d|_dS(Nii(tlinenotoffset(R((s"/usr/lib64/python2.6/markupbase.pytreset%s cCs|i|ifS(s&Return current line number and offset.(RR (R((s"/usr/lib64/python2.6/markupbase.pytgetpos)scCs‰||jo|S|i}|id||ƒ}|o:|i||_|id||ƒ}||d|_n|i|||_|S(Ns i(trawdatatcountRtrindexR (RtitjR tnlinestpos((s"/usr/lib64/python2.6/markupbase.pyt updatepos1s  tc Csh|i}|d}|||d!djo |dS|||d!djodSt|ƒ}|||d!djo|i|ƒS||djo|i|ƒS|i||ƒ\}}|d jo|S|d jo d|_nx{||jom||}|djoE||d|!}|d jo|i|ƒn|i|ƒ|dS|d jo+t||ƒ}|pdS|i ƒ}nÄ|d jo|i||ƒ\} }n›||ijo|d}n}|djoZ|d jo|i |d|ƒ}qM|djo|i d|ƒqM|i dƒn|i d||ƒ|d jo|SqéWdS(Niit>t-Ri˙˙˙˙s--t[itdoctypes"'t4abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZtattlisttlinktypetlinktelements&unsupported '[' char in %s declarations"unexpected '[' char in declarations!unexpected %r char in declaration(RR(RRslinkR( R tlent parse_commenttparse_marked_sectiont _scan_namet_decl_othercharst handle_declt unknown_declt_declstringlit_matchtendt_parse_doctype_subsetR( RRR Rtntdecltypetctdatatmtname((s"/usr/lib64/python2.6/markupbase.pytparse_declarationAsZ                    icCsě|i}|i|d|ƒ\}}|djo|S|d joti||dƒ}nD|djoti||dƒ}n|id ||d|!ƒ|pd S|o+|idƒ}|i||d|!ƒn|idƒS(Niittemptcdatatignoretincludetrcdatatiftelsetendifs+unknown status keyword %r in marked sectioni˙˙˙˙(R/R0signoreR2R3(R4R5R6( R R!t_markedsectionclosetsearcht_msmarkedsectioncloseRtstartR$R&(RRtreportR tsectNameRtmatch((s"/usr/lib64/python2.6/markupbase.pyR s    cCs“|i}|||d!djo|idƒnti||dƒ}|pdS|o+|idƒ}|i||d|!ƒn|idƒS(Nis