ó p”þfc@s“dZddlZi dd6dd6dd6d d 6d d 6d d6dd6dd6dd6dd6Zd„Zd„Zd„ZedkreƒndS(s<Safely evaluate Python string literals without using eval().iÿÿÿÿNstastbs tfs tns trs tts tvt't"s\cCs|jddƒ\}}|jdƒs-t‚tj|ƒ}|dk rL|S|jdƒrÄ|d}t|ƒdkrŠtd|ƒ‚nyt|dƒ}Wqûtk rÀtd|ƒ‚qûXn7yt|dƒ}Wn!tk rútd |ƒ‚nXt |ƒS( Niis\txis!invalid hex string escape ('\%s')iis#invalid octal string escape ('\%s')( tgroupt startswithtAssertionErrortsimple_escapestgettNonetlent ValueErrortinttchr(tmtallttailtescthexesti((s./usr/lib64/python2.7/lib2to3/pgen2/literals.pytescapes$    cCsÚ|jdƒs4|jdƒs4tt|d ƒƒ‚|d}|d |dkr_|d}n|j|ƒs‹tt|t|ƒ ƒƒ‚t|ƒdt|ƒks­t‚|t|ƒt|ƒ !}tjdt|ƒS(NRRiiiis)\\(\'|\"|\\|[abfnrtv]|x.{0,2}|[0-7]{1,3})(R R treprtendswithRtretsubR(tstq((s./usr/lib64/python2.7/lib2to3/pgen2/literals.pyt evalString(s4  ,"cCs_xXtdƒD]J}t|ƒ}t|ƒ}t|ƒ}||kr |G|G|G|GHq q WdS(Ni(trangeRRR!(RtcRte((s./usr/lib64/python2.7/lib2to3/pgen2/literals.pyttest2s     t__main__(t__doc__RR RR!R%t__name__(((s./usr/lib64/python2.7/lib2to3/pgen2/literals.pyts