Your IP : 216.73.216.213
��Yf� � @ s� d Z d d l Z d d l Z e j d � Z d d d d � Z d d � Z e d k r� e e j � d k r� e
e j d � Z n e j Z e e j � d
k r� e
e j d
d � Z
n e j Z
e j � Z e e � Z e e
e � d S)a� 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.
� Nz7<!ENTITY +(\w+) +CDATA +"([^"]+)" +-- +((?:.|
)+?) *-->c C s| d } | d k r t | � } i } xQ t j | | | � } | sC P| j � \ } } } | | f | | <| j � } q'