• File: parseentities.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/proc/self/root/proc/self/root/usr/lib64/python2.7/Tools/scripts/parseentities.pyc
  • Date Modified: 11/09/2026 1:02 PM
  • File size: 2.03 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit

Kjc@sdZddlZddlZddlZejdZdddZdZe	dkre
ejdkreejdZ
n	ejZ
e
ejd	kreejd	d
Zn	ejZe
jZeeZeeendS(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.

iNs7<!ENTITY +(\w+) +CDATA +"([^"]+)" +-- +((?:.|
)+?) *-->icCsd}|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}|jx|D]\}\}}|d dkrt|dd!}|dkrxd|}qt|}nt|}tj|}|jd|||fq*W|jddS(	Nsentitydefs = {
is&#iis'\%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