b374k
m1n1 1.01
Apache/2.2.15 (CentOS)
Linux obd60-6c49958d75-2q7cw 5.4.0-174-generic #193-Ubuntu SMP Thu Mar 7 14:29:28 UTC 2024 x86_64
uid=48(apache) gid=48(apache) groups=48(apache)
server ip : 104.21.65.202 | your ip : 10.244.126.0
safemode OFF
 >  / usr / lib64 / python2.6 /
Filename/usr/lib64/python2.6/markupbase.pyc
Size9.24 kb
Permissionrw-r--r--
Ownerapache
Create time23-Dec-2025 17:41
Last modified20-Jun-2019 19:45
Last accessed22-Apr-2026 05:27
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
Ñò
§Úê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(Nis<!s$unexpected call to parse_declarationit>t-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(Nis<![s)unexpected call to parse_marked_section()ittemptcdatatignoretincludetrcdatatiftelsetendifs+unknown status keyword %r in marked sectioniÿÿÿÿ(R0R1signoreR3R4(R5R6R7(
R RR"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<!--s"unexpected call to parse_comment()iÿÿÿÿi(R Rt
_commentcloseR9R;thandle_commentR'(RRR<R R>R((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(Nt<iiÿÿÿÿs<!is*unexpected char in internal subset (in %r)is<!--R<iRRtentitytnotations)unknown declaration %r in internal subsett_parse_doctype_t%t;t]Rs%unexpected char after internal subsets%unexpected char %r in internal subset(sattlistselementRBRC(R RRRR R"tgetattrtisspace(
RRt declstartposR R)RR+tsR.tmeth((s"/usr/lib64/python2.6/markupbase.pyR(³sr  








 





cCs]|i||�\}}|djodS|i}d||jo|id|�dSdS(NiÿÿÿÿRi(R"R tfind(RRRJR.RR ((s"/usr/lib64/python2.6/markupbase.pyt_parse_doctype_elementös
 c Cs@|i}|i||�\}}|||d!}|djodS|djo |dSxß|i||�\}}|djo|S|||d!}|djodS|djomd||jo|id|�d}ndSx'|||d!i�o|d}qéW||pdSn|i||�\}}|||d!}|pdS|djoKt||�}|o|i�}ndS|||d!}|pdSn|d joe||d jodS|i|d|�\}}|djo|S|||d!}|pdSn|djo |dSq]dS(
NiRiÿÿÿÿRit(t)s'"t#(R R"RMRIR&R'(RRRJR R.RR+R-((s"/usr/lib64/python2.6/markupbase.pyt_parse_doctype_attlists\ 

 


  
 

 
cCsÒ|i||�\}}|djo|S|i}x�|||d!}|pdS|djo |dS|djo+t||�}|pdS|i�}q6|i||�\}}|djo|Sq6dS(NiiiÿÿÿÿRs'"(R"R R&R'(RRRJR.RR R+R-((s"/usr/lib64/python2.6/markupbase.pyt_parse_doctype_notation:s$
 
 

cCsC|i}|||d!djoM|d}xF|||d!}|pdS|i�o|d}q.Pq.n|}|i||�\}}|djo|Sx�|i||d!}|pdS|djo.t||�}|o|i�}q<dSq¡|djo |dS|i||�\}}|djo|Sq¡dS(NiREiÿÿÿÿis'"R(R RIR"R&R'(RRRJR RR+R.R-((s"/usr/lib64/python2.6/markupbase.pyt_parse_doctype_entityQs8 




 
cCs¸|i}t|�}||jodSt||�}|oK|i�}|i�}|t|�|jodS|i�|i�fS|i||�|i d|||d!�dS(Niÿÿÿÿsexpected name token at %ri(Niÿÿÿÿ(Niÿÿÿÿ(
R RtNonet_declname_matchtgrouptstriptlowerR'RR(RRRJR R)R-RKR.((s"/usr/lib64/python2.6/markupbase.pyR"us  
   cCsdS(N((RR,((s"/usr/lib64/python2.6/markupbase.pyR%�s(t__name__t
__module__t__doc__RRR
R RR#R/R!R R(RNRRRSRTR"R%(((s"/usr/lib64/python2.6/markupbase.pyRs"    
 N   C 9  $ ((
R\tretcompileR>RVR&R?R8R:R(((s"/usr/lib64/python2.6/markupbase.pyt<module>s