Your IP : 216.73.216.213
�
��f� c @ 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 � n d S( u� 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 Nu7 <!ENTITY +(\w+) +CDATA +"([^"]+)" +-- +((?:.|
)+?) *-->c C s� d } | d k r! t | � } n i } xS t j | | | � } | sI Pn | j � \ } } } | | f | | <| j � } q* | S( Ni ( u Noneu lenu entityREu searchu groupsu end( u textu posu endposu du mu nameu charcodeu comment( ( u@ /opt/alt/python33/lib64/python3.3/Tools/scripts/parseentities.pyu parse s u parsec C s� | j d � t | j � � } x� | D]� \ } \ } } | d d � d k r� t | d d
� � } | d k r} d | } q� t | � } n t | � } d j | j � � } | j d | | | f � q&