Ñò
–à"Ic           @   s•   d  Z  d d k Z h
 d d 6d d 6d d 6d	 d
 6d d 6d d 6d d 6d d 6d d 6d d 6Z d „  Z d „  Z d „  Z e d j o e ƒ  n d S(   s<   Safely evaluate Python string literals without using eval().iÿÿÿÿNs   t   as   t   bs   t   fs   
t   ns   t   rs   	t   ts   t   vt   't   "s   \c         C   sú   |  i  d d ƒ \ } } t i | ƒ } | d  j	 o | S| i d ƒ on | d } t | ƒ d j  o t d | ƒ ‚ n y t | d ƒ } Wqð t j
 o t d | ƒ ‚ qð Xn: y t | d ƒ } Wn# t j
 o t d | ƒ ‚ n Xt | ƒ S(	   Ni    i   t   xi   s!   invalid hex string escape ('\%s')i   i   s#   invalid octal string escape ('\%s')(	   t   groupt   simple_escapest   gett   Nonet
   startswitht   lent
   ValueErrort   intt   chr(   t   mt   allt   tailt   esct   hexest   i(    (    s3   /mit/python/lib/python2.6/lib2to3/pgen2/literals.pyt   escape   s"    
c         C   sZ   |  d } |  d  | d j o | d } n |  t  | ƒ t  | ƒ !}  t i d t |  ƒ S(   Ni    i   s)   \\(\'|\"|\\|[abfnrtv]|x.{0,2}|[0-7]{1,3})(   R   t   ret   subR   (   t   st   q(    (    s3   /mit/python/lib/python2.6/lib2to3/pgen2/literals.pyt
   evalString(   s
    
c          C   sa   xZ t  d ƒ D]L }  t |  ƒ } t | ƒ } t | ƒ } | | j o |  G| G| G| GHq q Wd  S(   Ni   (   t   rangeR   t   reprR   (   R   t   cR   t   e(    (    s3   /mit/python/lib/python2.6/lib2to3/pgen2/literals.pyt   test2   s     t   __main__(   t   __doc__R   R   R   R   R#   t   __name__(    (    (    s3   /mit/python/lib/python2.6/lib2to3/pgen2/literals.pyt   <module>   s    

		
		