Ńň §Úę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 Cs†|i}|d}|||!djp td‚|||d!djo |dS|||d!djodSt|ƒ}|||d!d jo|i|ƒS||d jo|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Ä|djo|i||ƒ\} }n›||ijo|d}n}|d joZ|d jo|i |d|ƒ}qk|djo|i d|ƒqk|i dƒn|i d||ƒ|d jo|SqWdS(Nist-Ri˙˙˙˙s--t[itdoctypes"'t4abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZtattlisttlinktypetlinktelements&unsupported '[' char in %s declarations"unexpected '[' char in declarations!unexpected %r char in declaration(RR(RRslinkR( R tAssertionErrortlent 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_declarationAs\                    icCs|i}|||d!djp td‚|i|d|ƒ\}}|djo|S|djoti||dƒ}nD|djoti||dƒ}n|id ||d|!ƒ|pdS|o+|idƒ}|i||d|!ƒn|i dƒS(NisR((s"/usr/lib64/python2.6/markupbase.pyR Ľs c Cső|i}t|ƒ}|}xÓ||joĹ||}|djog|||d!}|djodS|djo)|i||dƒ|id|ƒn|d|jodS|d|jodS|||d!djo.|i|d d ƒ}|d jo|Sqn|i|d|ƒ\}}|djodS|djo)|i||dƒ|id|ƒnt|d|ƒ} | ||ƒ}|d jo|Sq|djog|d|jodS|i|d|ƒ\}}|d jo|S||djo|d}qěq|djo†|d}x-||jo||iƒo|d}q7W||jo7||djo|S|i||ƒ|idƒqědSq|iƒo|d}q|i||ƒ|id|ƒqWdS(NtRVR&R?R8R:R(((s"/usr/lib64/python2.6/markupbase.pyts