ACC SHELL

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

Ńň
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

Cs†|i}|d}|||!djp
td‚|||d!djo	|dS|||d!djodSt|ƒ}|||d!d	jo|i|ƒS||d
jo|i|ƒS|i||ƒ\}}|djo|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||ƒ|djo|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_othercharsthandle_decltunknown_declt_declstringlit_matchtendt_parse_doctype_subsetR(
RRRRtntdecltypetctdatatmtname((s /usr/lib/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/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
_commentcloseR9R;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(sattlistselementRBRC(RRRRR R"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(RRRJR.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"RMRIR&R'(RRRJR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'(RRRJR.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(NiREi˙˙˙˙is'"R(RRIR"R&R'(RRRJR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(RRRJRR)R-RKR.((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!R R(RNRRRSRTR"R%(((s /usr/lib/python2.6/markupbase.pyRs"					
	N	C		9		$	((
R\tretcompileR>RVR&R?R8R:R(((s /usr/lib/python2.6/markupbase.pyt<module>s

ACC SHELL 2018