ACC SHELL

Path : /usr/lib/python/
File Upload :
Current File : //usr/lib/python/markupbase.pyo

Ńň
oÄMc@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
„Zd„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/lib/python2.6/markupbase.pyt__init__scCstdƒ‚dS(Ns.subclasses of ParserBase must override error()(tNotImplementedError(Rtmessage((s /usr/lib/python2.6/markupbase.pyterror!scCsd|_d|_dS(Nii(tlinenotoffset(R((s /usr/lib/python2.6/markupbase.pytreset%s	cCs|i|ifS(s&Return current line number and offset.(RR	(R((s /usr/lib/python2.6/markupbase.pytgetpos)scCs‰||jo|S|i}|id||ƒ}|o:|i||_|id||ƒ}||d|_n|i|||_|S(Ns
i(trawdatatcountRtrindexR	(RtitjRtnlinestpos((s /usr/lib/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|djo+t||ƒ}|pdS|i	ƒ}nÄ|djo|i||ƒ\}	}n›||ijo|d}n}|djoZ|d
jo|i
|d|ƒ}qM|djo|id|ƒqM|idƒn|id||ƒ|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_othercharsthandle_decltunknown_declt_declstringlit_matchtendt_parse_doctype_subsetR(
RRRRtntdecltypetctdatatmtname((s /usr/lib/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/lib/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
_commentcloseR8R:thandle_commentR&(RRR;RR=R((s /usr/lib/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(sattlistselementRARB(RRRRRR!tgetattrtisspace(
RRtdeclstartposRR(RR*tsR-tmeth((s /usr/lib/python2.6/markupbase.pyR'łsr	








	





cCs]|i||ƒ\}}|djodS|i}d||jo|id|ƒdSdS(Ni˙˙˙˙Ri(R!Rtfind(RRRIR-RR((s /usr/lib/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!RLRHR%R&(RRRIRR-RR*R,((s /usr/lib/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&(RRRIR-RRR*R,((s /usr/lib/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(NiRDi˙˙˙˙is'"R(RRHR!R%R&(RRRIRRR*R-R,((s /usr/lib/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(RRRIRR(R,RJR-((s /usr/lib/python2.6/markupbase.pyR!us	
	cCsdS(N((RR+((s /usr/lib/python2.6/markupbase.pyR$‡s(t__name__t
__module__t__doc__RRR
RRR"R.R RR'RMRQRRRSR!R$(((s /usr/lib/python2.6/markupbase.pyRs"					
	N	C		9		$	((
R[tretcompileR=RUR%R>R7R9R(((s /usr/lib/python2.6/markupbase.pyt<module>s

ACC SHELL 2018