Viewing File: /usr/lib64/python2.7/Tools/scripts/parseentities.pyo

ó
ó—sjc@sôdZddlZddlZddlZejdƒZddd„Zd„Ze	dkrđe
ejƒdkrˆeejdƒZ
n	ejZ
e
ejƒd	krżeejd	d
ƒZn	ejZe
jƒZeeƒZeeeƒndS(sĽ Utility for parsing HTML entity definitions available from:

      http://www.w3.org/ as e.g.
      http://www.w3.org/TR/REC-html40/HTMLlat1.ent

    Input is read from stdin, output is written to stdout in form of a
    Python snippet defining a dictionary "entitydefs" mapping literal
    entity name to character or numeric entity.

    Marc-Andre Lemburg, mal@lemburg.com, 1999.
    Use as you like. NO WARRANTIES.

i˙˙˙˙Ns7<!ENTITY +(\w+) +CDATA +"([^"]+)" +-- +((?:.|
)+?) *-->icCsd}|dkr!t|ƒ}ni}xStj|||ƒ}|sIPn|jƒ\}}}||f||<|jƒ}q*|S(Ni(tNonetlententityREtsearchtgroupstend(ttexttpostendpostdtmtnametcharcodetcomment((s3/usr/lib64/python2.7/Tools/scripts/parseentities.pytparsescCsŃ|jdƒ|jƒ}|jƒxš|D]’\}\}}|d dkr‡t|dd!ƒ}|dkrxd|}q“t|ƒ}nt|ƒ}tj|ƒ}|jd|||fƒq*W|jdƒdS(	Nsentitydefs = {
is&#i˙˙˙˙is'\%o's    '%s':	%s,  	# %s
s
}
(twritetitemstsorttinttreprt	TextToolstcollapse(tftdefsRRRR
tcode((s3/usr/lib64/python2.7/Tools/scripts/parseentities.pyt	writefile#s


t__main__iitw(t__doc__tretsysRtcompileRRRRt__name__RtargvtopentinfiletstdintoutfiletstdouttreadRR(((s3/usr/lib64/python2.7/Tools/scripts/parseentities.pyt<module>s			
Back to Directory File Manager