Hacked By AnonymousFox

Current Path : /proc/thread-self/root/proc/self/root/lib64/python2.7/compiler/
Upload File :
Current File : //proc/thread-self/root/proc/self/root/lib64/python2.7/compiler/transformer.pyo

�
{fc)@sfdZddlTddlZddlZddlZdefd��YZddlmZm	Z	ddlm
Z
mZmZd�Z
d	d
�Zd�Zd�Zd
�Zdfd��YZejejejejejejejejejejejejejej ej!ej"gZ#idej$6dej%6dej&6dej'6dej(6dej)6dej*6Z+ej,ej-ej.ej/ej0ej1ej2ejej3ej4ej5ej6ej7ej8ej9ej:ej;ej<ej=ej>ej?ej@ejAejBejCejejejejejejejDejejejejejej ej!ej"ejEg)ZFeGed�r�eFjHejI�neGed�r�eFjHejJ�nejejejejejejejejejejej ej!gZKiZLx'ejMjN�D]\ZOZPePeLeO<qWx'ejQjN�D]\ZOZPePeLeO<q?Wd�ZRdS(s�Parse tree transformation module.

Transforms Python source code into an abstract syntax tree (AST)
defined in the ast module.

The simplest ways to invoke this module are via parse and parseFile.
parse(buf) -> AST
parseFile(path) -> AST
i����(t*NtWalkerErrorcBseZRS((t__name__t
__module__(((s,/usr/lib64/python2.7/compiler/transformer.pyR!s(t
CO_VARARGStCO_VARKEYWORDS(t	OP_ASSIGNt	OP_DELETEtOP_APPLYcCs3t|d�}|j�d}|j�t|�S(NtUs
(topentreadtclosetparse(tpathtftsrc((s,/usr/lib64/python2.7/compiler/transformer.pyt	parseFile's
texeccCsT|dks|dkr(t�j|�S|dkrDt�j|�Std��dS(NRtsingletevals4compile() arg 3 must be 'exec' or 'eval' or 'single'(tTransformert
parsesuitet	parseexprt
ValueError(tbuftmode((s,/usr/lib64/python2.7/compiler/transformer.pyR
1s
cCs�g}x�|D]�}t|d�r8|j|j��q
t|�td�krl|jtt|���q
t|�tg�kr�|jt|��q
|j|�q
W|S(NtasList(NN(thasattrtappendRttypetNonettuple(tnodestltitem((s,/usr/lib64/python2.7/compiler/transformer.pyR:s
cCsbt|dt�s|dSx@|dD]4}t|t�r&t|�}|dk	rZ|Sq&q&WdS(Nii(t
isinstanceR t
extractLineNoR(tasttchildtlineno((s,/usr/lib64/python2.7/compiler/transformer.pyR%HscGst|d}|tkr]yt||d�SWqptk
rYt|Gt|�G|GH�qpXntdt|��dS(Niis$Can't find appropriate Node type: %s(R!t	TypeErrortlenRtstr(targstkind((s,/usr/lib64/python2.7/compiler/transformer.pytNodeRs


RcBsUeZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�ZeZd�Zd�ZeZeZeZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d�Z"d�Z#d�Z$d�Z%d �Z&d!�Z'd"�Z(d#�Z)d$�Z*d%�Z+d&�Z,d'�Z-d(�Z.d)�Z/d*�Z0d+�Z1d,�Z2d-�Z3d.�Z4d/�Z5d0�Z6d1�Z7d2�Z8d3�Z9e9Z:e9Z;e9Z<d4�Z=d5�Z>d6�Z?e?Z@d7�ZAd8�ZBd9�ZCd:�ZDd;�ZEd<�ZFd=�ZGd>�ZHd?�ZId@�ZJdA�ZKdB�ZLdC�ZMdD�ZNdE�ZOdF�ZPdG�ZQdH�ZRdI�ZSdJ�ZTdK�ZUdL�ZVdM�ZWdN�ZXdO�ZYdP�ZZdQ�Z[dR�Z\dS�Z]dT�Z^dU�Z_dV�Z`dW�ZadX�ZbdY�ZcdZ�Zdd[�Zed\�Zfd]�Zgd^�Zhd_�Zid`�Zjda�Zkdb�Zldc�Zmdd�Znde�Zodf�Zpdg�Zqdh�Zrdi�Zsdj�Ztdk�Zudl�Zvdm�Zwdn�Zxdo�Zydp�Zzdq�Z{dr�Z|ds�Z}dudt�ZRS(vs�Utility object for transforming Python parse trees.

    Exposes the following methods:
        tree = transform(ast_tree)
        tree = parsesuite(text)
        tree = parseexpr(text)
        tree = parsefile(fileob | filename)
    cCs�i|_xEtjj�D]4\}}t||�rt||�|j|<qqW|j|jtj<i|j	tj
6|jtj6|j
tj6|jtj6|jtj6|jtj6|jtj6|_d|_dS(N(t	_dispatchtsymboltsym_nametitemsRtgetattrtcom_NEWLINEttokentNEWLINEt	atom_lpartLPARt	atom_lsqbtLSQBtatom_lbracetLBRACEtatom_backquotet	BACKQUOTEtatom_numbertNUMBERtatom_stringtSTRINGt	atom_nametNAMEt_atom_dispatchRtencoding(tselftvaluetname((s,/usr/lib64/python2.7/compiler/transformer.pyt__init__hs	




cCsCt|t�pt|t�s6tj|dd�}n|j|�S(s,Transform an AST into a modified parse tree.t	line_infoi(R$R tlisttparsertst2tupletcompile_node(RGttree((s,/usr/lib64/python2.7/compiler/transformer.pyt	transformxscCs|jtj|��S(s6Return a modified parse tree for the given suite text.(RQRMtsuite(RGttext((s,/usr/lib64/python2.7/compiler/transformer.pyR~scCs|jtj|��S(s;Return a modified parse tree for the given expression text.(RQRMtexpr(RGRS((s,/usr/lib64/python2.7/compiler/transformer.pyR�scCs:t|�td�kr't|�}n|j|j��S(s@Return a modified parse tree for the contents of the given file.t(RR
RR(RGtfile((s,/usr/lib64/python2.7/compiler/transformer.pyt	parsefile�scCs|d}|tjkr=|d|_|d}|d}n|tjkr]|j|d�S|tjkr}|j|d�S|tjkr�|j|d�S|tjkr�|j|d�S|tjkr�|j|d�S|tjkr�|j|d�St	d|f�dS(Niiisunexpected node type(
R0t
encoding_declRFtsingle_inputt
file_inputt
eval_inputtlambdeftfuncdeftclassdefR(RGtnodetn((s,/usr/lib64/python2.7/compiler/transformer.pyRO�s$



cCs5|dd}|tjkr.|j|d�St�S(Ni(R5R6tcom_stmttPass(RGR_R`((s,/usr/lib64/python2.7/compiler/transformer.pyRY�scCs�|j|tj�}|dk	r*d}nd}g}xK||D]?}|dtjkrA|dtjkrA|j||�qAqAWt|t	|��S(Nii(
t
get_docstringR0RZRR5t	ENDMARKERR6tcom_append_stmttModuletStmt(RGtnodelisttdoctitstmtsR_((s,/usr/lib64/python2.7/compiler/transformer.pyRZ�s	&cCst|j|d��S(Ni(t
Expressiontcom_node(RGRh((s,/usr/lib64/python2.7/compiler/transformer.pyR[�scCs]t|�}|j|�}d}x5||krXt|||dd�}|d7}q$W|S(Nii(R*RCtGetattr(RGRhtlistlenR#Rj((s,/usr/lib64/python2.7/compiler/transformer.pytdecorator_name�scCsL|j|dd�}t|�dkrB|j||d�}n|}|S(Nii(RpR*tcom_call_function(RGRhtfuncnameRT((s,/usr/lib64/python2.7/compiler/transformer.pyt	decorator�s
cCs;g}x(|D] }|j|j|d��q
Wt|�S(Ni(RRst
Decorators(RGRhR2tdec_nodelist((s,/usr/lib64/python2.7/compiler/transformer.pyt
decorators�s
cCs�|ddtjkrC|dgt|dd�}|j|�S|ddtjkr�|j|dd�}|j|dd�}||_|St��dS(Nii(R0R]RLR^RvR(RGRhR`Rvtcls((s,/usr/lib64/python2.7/compiler/transformer.pyt	decorated�s
	c
Cs�t|�dkr,|j|dd�}nd}|dd}|dd}|dd}|dtjkr�|j|d�\}}}nd	}}d}|j|d�}	|j|d�}
|	dk	r�|
jd=nt	||||||	|
d|�S(
Niiii����ii����i����R(((
R*RvRR0tvarargslisttcom_arglistRcRmR!tFunction(RGRhRvR(RIR,tnamestdefaultstflagsRitcode((s,/usr/lib64/python2.7/compiler/transformer.pyR]�s 

cCs~|ddtjkr:|j|dd�\}}}nd}}d}|j|d�}t||||d|dd�S(Niiii����R(((R0RyRzRmtLambda(RGRhR|R}R~R((s,/usr/lib64/python2.7/compiler/transformer.pyR\s#
cCs�|dd}|j|d�}|ddtjkrAg}n3|ddtjkrag}n|j|d�}|j|d�}|dk	r�|jd=nt||||d|dd�S(Nii����iiiR((	RcR5tCOLONtRPARt	com_basesRmRR!tClass(RGRhRIRitbasesR((s,/usr/lib64/python2.7/compiler/transformer.pyR^&s		
cCs|j|d�S(Ni(Ra(RGRh((s,/usr/lib64/python2.7/compiler/transformer.pytstmt<scCsGg}x4tdt|�d�D]}|j|||�qWt|�S(Nii(trangeR*ReRg(RGRhRkRj((s,/usr/lib64/python2.7/compiler/transformer.pytsimple_stmtCscCs
t�dS(N(R(RGRh((s,/usr/lib64/python2.7/compiler/transformer.pyt
parametersJscCs
t�dS(N(R(RGRh((s,/usr/lib64/python2.7/compiler/transformer.pyRyMscCs
t�dS(N(R(RGRh((s,/usr/lib64/python2.7/compiler/transformer.pytfpdefPscCs
t�dS(N(R(RGRh((s,/usr/lib64/python2.7/compiler/transformer.pytfplistSscCs
t�dS(N(R(RGRh((s,/usr/lib64/python2.7/compiler/transformer.pytdotted_nameVscCs
t�dS(N(R(RGRh((s,/usr/lib64/python2.7/compiler/transformer.pytcomp_opYscCs
t�dS(N(R(RGRh((s,/usr/lib64/python2.7/compiler/transformer.pyttrailer\scCs
t�dS(N(R(RGRh((s,/usr/lib64/python2.7/compiler/transformer.pytsliceop_scCs
t�dS(N(R(RGRh((s,/usr/lib64/python2.7/compiler/transformer.pytargumentbscCs|d}|j|�|d�}t|�dkrHt|d|j�S|ddtjkr�g}xAtdt|�dd�D]#}|j|j||t	��q�Wt
||d|dd�S|j|d�}|j|d�}t
||d|d|d�Std�dS(Ni����iR(iiscan't get here(tlookup_nodeR*tDiscardR(R5tEQUALR�Rt
com_assignRtAssignt
com_augassigntcom_augassign_opt	AugAssignR(RGRhtentexprNodetnodeslRjtlvaltop((s,/usr/lib64/python2.7/compiler/transformer.pyt	expr_stmtjs
#!cCs�g}t|�dkr'd}d}n?|ddtjkrZ|j|d�}d}nd}d}x:t|t|�d�D] }|j|j||��qW|ddtjkr�t||d|dd�St	||d|dd�S(Niiiii����R((
R*RR5t
RIGHTSHIFTRmR�RtCOMMAtPrinttPrintnl(RGRhR2tstarttdestRj((s,/usr/lib64/python2.7/compiler/transformer.pyt
print_stmt{s		cCs|j|dt�S(Ni(R�R(RGRh((s,/usr/lib64/python2.7/compiler/transformer.pytdel_stmt�scCstd|dd�S(NR(ii(Rb(RGRh((s,/usr/lib64/python2.7/compiler/transformer.pyt	pass_stmt�scCstd|dd�S(NR(ii(tBreak(RGRh((s,/usr/lib64/python2.7/compiler/transformer.pyt
break_stmt�scCstd|dd�S(NR(ii(tContinue(RGRh((s,/usr/lib64/python2.7/compiler/transformer.pyt
continue_stmt�scCsUt|�dkr0ttd�d|dd�St|j|d�d|dd�S(NiR(ii(R*tReturntConstRRm(RGRh((s,/usr/lib64/python2.7/compiler/transformer.pytreturn_stmt�scCs&|j|d�}t|d|j�S(NiR((RmR�R((RGRhRT((s,/usr/lib64/python2.7/compiler/transformer.pyt
yield_stmt�scCsLt|�dkr(|j|d�}ntd�}t|d|dd�S(NiR(ii(R*RmR�RtYield(RGRhRH((s,/usr/lib64/python2.7/compiler/transformer.pyt
yield_expr�scCs�t|�dkr(|j|d�}nd}t|�dkrV|j|d�}nd}t|�dkr�|j|d�}nd}t|||d|dd�S(NiiiR(ii(R*RmRtRaise(RGRhtexpr3texpr2texpr1((s,/usr/lib64/python2.7/compiler/transformer.pyt
raise_stmt�scCs|j|d�S(Ni(Rm(RGRh((s,/usr/lib64/python2.7/compiler/transformer.pytimport_stmt�scCs%t|j|d�d|dd�S(NiR(ii(tImporttcom_dotted_as_names(RGRh((s,/usr/lib64/python2.7/compiler/transformer.pytimport_name�scCsd}x"||ddkr*|d7}q	W|d}||dtjkrl|j||�}|d7}nd}||ddtjkr�t|dg|d|dd�S||d||ddtjk}t||j|�|d|dd�SdS(	Nit.iRURR(i(RN(	R0R�tcom_dotted_nameR5tSTARtFromRR8tcom_import_as_names(RGRhtidxtleveltfromnameR_((s,/usr/lib64/python2.7/compiler/transformer.pytimport_from�s

'cCsVg}x5tdt|�d�D]}|j||d�qWt|d|dd�S(NiiR(i(R�R*RtGlobal(RGRhR|Rj((s,/usr/lib64/python2.7/compiler/transformer.pytglobal_stmt�scCs�|j|d�}t|�dkri|j|d�}t|�dkr`|j|d�}qsd}n
d}}t|||d|dd�S(	NiiiiiR(ii(RmR*RtExec(RGRhR�R�R�((s,/usr/lib64/python2.7/compiler/transformer.pyt	exec_stmt�s	
cCs\|j|d�}t|�dkr;|j|d�}nd}t||d|dd�S(NiiiR(ii(RmR*RtAssert(RGRhR�R�((s,/usr/lib64/python2.7/compiler/transformer.pytassert_stmt�s
cCs�g}xetdt|�dd�D]G}|j||d�}|j||d�}|j||f�q#Wt|�ddkr�|j|d�}nd}t||d|dd�S(Niiiii����R(i(R�R*RmRRtIf(RGRhttestsRjttestNodet	suiteNodetelseNode((s,/usr/lib64/python2.7/compiler/transformer.pytif_stmt�s#cCsr|j|d�}|j|d�}t|�dkrN|j|d�}nd}t|||d|dd�S(NiiiiR(ii(RmR*RtWhile(RGRhR�tbodyNodeR�((s,/usr/lib64/python2.7/compiler/transformer.pyt
while_stmt	scCs�|j|dt�}|j|d�}|j|d�}t|�dkrd|j|d�}nd}t||||d|dd�S(NiiiiR(ii(R�RRmR*RtFor(RGRht
assignNodetlistNodeR�R�((s,/usr/lib64/python2.7/compiler/transformer.pytfor_stmtscCs
|j|�S(N(tcom_try_except_finally(RGRh((s,/usr/lib64/python2.7/compiler/transformer.pyttry_stmt%scCs
|j|�S(N(tcom_with(RGRh((s,/usr/lib64/python2.7/compiler/transformer.pyt	with_stmt(scCs
|j|�S(N(tcom_with_var(RGRh((s,/usr/lib64/python2.7/compiler/transformer.pytwith_var+scCsjt|�dkr#|j|d�Sg}x4|D],}|dtjkr0|j||�q0q0Wt|�S(Nii(R*RaR0R�ReRg(RGRhRkR_((s,/usr/lib64/python2.7/compiler/transformer.pyRR.s
cCs|jt|�S(N(t
com_binarytTuple(RGRh((s,/usr/lib64/python2.7/compiler/transformer.pyttestlist>scCs]t|�dkrP|ddtjkrP|j|d�}|j||d�S|j|�S(Niii(R*R0tcomp_forRmtcom_generator_expressionR�(RGRhttest((s,/usr/lib64/python2.7/compiler/transformer.pyt
testlist_compHs)cCs�t|�dkr:|ddtjkr:|j|d�S|j|d�}t|�dkr�|j|d�}|j|d�}t|||d|dd�S|S(NiiiiR((R*R0R\RmtIfExp(RGRhtthenR�telse_((s,/usr/lib64/python2.7/compiler/transformer.pyR�Ps)cCsJt|�dkr:|ddtjkr:|j|d�S|jt|�S(Nii(R*R0R\R�tOr(RGRh((s,/usr/lib64/python2.7/compiler/transformer.pytor_test^s)cCs|jt|�S(N(R�tAnd(RGRh((s,/usr/lib64/python2.7/compiler/transformer.pytand_testescCsA|j|d�}t|�dkr=t|d|dd�S|S(Ni����iR(i(RmR*tNot(RGRhtresult((s,/usr/lib64/python2.7/compiler/transformer.pytnot_testisc	Cs	|j|d�}t|�dkr)|Sg}x�tdt|�d�D]�}||d}|d}|dtjkr�|d}t|�dkr�|dkr�d}q�d}q�nt|d}|dd}|j||j||�f�qHWt||d|�S(	Niiiitnotsnot insis notR((RmR*R�R5RDt
_cmp_typesRtCompare(	RGRhR_tresultsRjtnlR`RR(((s,/usr/lib64/python2.7/compiler/transformer.pyt
comparisonps"

	$cCs|jt|�S(N(R�tBitor(RGRh((s,/usr/lib64/python2.7/compiler/transformer.pyRT�scCs|jt|�S(N(R�tBitxor(RGRh((s,/usr/lib64/python2.7/compiler/transformer.pytxor_expr�scCs|jt|�S(N(R�tBitand(RGRh((s,/usr/lib64/python2.7/compiler/transformer.pytand_expr�scCs�|j|d�}x�tdt|�d�D]�}|j||�}||ddtjkr�t||gd|dd�}q,||ddtjkr�t||gd|dd�}q,td||dd�q,W|S(NiiiR(sunexpected token: %s(	RmR�R*R5t	LEFTSHIFTt	LeftShiftR�t
RightShiftR(RGRhR_Rjtright((s,/usr/lib64/python2.7/compiler/transformer.pyt
shift_expr�s##cCs�|j|d�}x�tdt|�d�D]�}|j||�}||ddtjkr�t||gd|dd�}q,||ddtjkr�t||gd|dd�}q,td||dd�q,W|S(NiiiR(sunexpected token: %s(	RmR�R*R5tPLUStAddtMINUStSubR(RGRhR_RjR�((s,/usr/lib64/python2.7/compiler/transformer.pyt
arith_expr�s##cCs
|j|d�}x�tdt|�d�D]�}|j||�}||dd}|tjkr{t||g�}ny|tjkr�t||g�}nU|tjkr�t	||g�}n1|tj
kr�t||g�}n
td|�|dd|_
q,W|S(Niiisunexpected token: %s(RmR�R*R5R�tMultSLASHtDivtPERCENTtModtDOUBLESLASHtFloorDivRR((RGRhR_RjR�tt((s,/usr/lib64/python2.7/compiler/transformer.pytterm�s
cCs�|d}|d}|j|d�|dd�}|tjkrXt|d|d�S|tjkr{t|d|d�S|tjkr�t|d|d�}n|S(Nii����iR(i(R�R5R�tUnaryAddRtUnarySubtTILDEtInvert(RGRhteltR
R_((s,/usr/lib64/python2.7/compiler/transformer.pytfactor�s

!cCs�|j|d�}xwtdt|��D]`}||}|dtjkrwt||j||d�gd|d�S|j||�}q)W|S(NiiR(i(RmR�R*R5t
DOUBLESTARtPowertcom_apply_trailer(RGRhR_RjR((s,/usr/lib64/python2.7/compiler/transformer.pytpower�s
 cCs|j|dd|�S(Ni(RE(RGRh((s,/usr/lib64/python2.7/compiler/transformer.pytatom�scCs@|ddtjkr/tdd|dd�S|j|d�S(NiiR(i((R5R�R�Rm(RGRh((s,/usr/lib64/python2.7/compiler/transformer.pyR7�scCs@|ddtjkr/tdd|dd�S|j|d�S(NiiR(i((R5tRSQBtListtcom_list_constructor(RGRh((s,/usr/lib64/python2.7/compiler/transformer.pyR9�scCs@|ddtjkr/tdd|dd�S|j|d�S(NiiR(i((R5tRBRACEtDicttcom_dictorsetmaker(RGRh((s,/usr/lib64/python2.7/compiler/transformer.pyR;�scCst|j|d��S(Ni(t	BackquoteRm(RGRh((s,/usr/lib64/python2.7/compiler/transformer.pyR=�scCs,t|dd�}t|d|dd�S(NiiR(i(RR�(RGRhtk((s,/usr/lib64/python2.7/compiler/transformer.pyR?�scCs[|jrM|jdkr6t|d�j|j�}ntd|j|f�St|�SdS(Nsutf-8s
iso-8859-1s# coding: %s
%s(sutf-8s
iso-8859-1(RFtunicodetencodeR(RGtlit((s,/usr/lib64/python2.7/compiler/transformer.pytdecode_literal�s
	cCsFd}x%|D]}||j|d�7}q
Wt|d|dd�S(NRUiR(ii(R"R�(RGRhRR_((s,/usr/lib64/python2.7/compiler/transformer.pyRAs
cCs t|ddd|dd�S(NiiR(i(tName(RGRh((s,/usr/lib64/python2.7/compiler/transformer.pyRC
scCs|j|dS(Ni(R/(RGR_((s,/usr/lib64/python2.7/compiler/transformer.pyR�scCs|j|d|d�S(Nii(R/(RGR_((s,/usr/lib64/python2.7/compiler/transformer.pyRm scGsttd��S(N(R�R�R(RGR,((s,/usr/lib64/python2.7/compiler/transformer.pyR4'scCs�g}g}d}d}x�|t|�kr�||}|dtjks]|dtjkr+|dtjkr�||d}|dtjkr�|j|d�|tB}|d}q�n|t|�kr'||d}|tjkr�||d}n
td|�|j|d�|tB}nPn|j|j	|��|d}|t|�kr�||dtj
kr�|j|j||d��|d}nt|�r�td�n|d}qW|||fS(Niiisunexpected token: %sis-non-default argument follows default argument(
R*R5R�RRDRRRRt	com_fpdefR�RmtSyntaxError(RGRhR|R}R~RjR_R
((s,/usr/lib64/python2.7/compiler/transformer.pyRz-s<
&



)
cCs4|ddtjkr(|j|d�S|ddS(Niii(R5R8t
com_fplist(RGR_((s,/usr/lib64/python2.7/compiler/transformer.pyR$_scCspt|�dkr#|j|d�Sg}x:tdt|�d�D] }|j|j||��qBWt|�S(Nii(R*R$R�RR (RGR_RLRj((s,/usr/lib64/python2.7/compiler/transformer.pyR&escCs\d}xK|D]C}t|�td�kr
|ddkr
||dd}q
q
W|d S(NRUiiR�i����((R(RGR_RIR`((s,/usr/lib64/python2.7/compiler/transformer.pyR�ns

(cCsO|d}|j|dd�}t|�dkr=|dfS||ddfS(Niii(R�R*R(RGR_tdot((s,/usr/lib64/python2.7/compiler/transformer.pytcom_dotted_as_namevs


cCsa|d}|j|d�g}x:tdt|�d�D] }|j|j||��q9W|S(Niii(R(R�R*R(RGR_R|Rj((s,/usr/lib64/python2.7/compiler/transformer.pyR��s

cCsH|d}t|�dkr.|dddfS|dd|ddfS(Niii(R*R(RGR_((s,/usr/lib64/python2.7/compiler/transformer.pytcom_import_as_name�s
cCsa|d}|j|d�g}x:tdt|�d�D] }|j|j||��q9W|S(Niii(R)R�R*R(RGR_R|Rj((s,/usr/lib64/python2.7/compiler/transformer.pyR��s

cCsGg}x:tdt|�d�D] }|j|j||��qW|S(Nii(R�R*RRm(RGR_R�Rj((s,/usr/lib64/python2.7/compiler/transformer.pyR��sc
Cs�|ddtjkrLt|j|d�|j|d�d|dd�Sg}d}d}x4tdt|�d�D]}||}|dtjkr't|�dkr�|j|d�}t|�dkr�|j	|dt
�}q�d}n
d}}|j|||j||d�f�n|dtjkrw|ddkrd|j||d�}q�|dd	kr�|j||d�}q�qwqwWt|j|d�||d|dd�}	|r�t|	|d|dd�S|	SdS(
NiiiiR(iitelsetfinally(
R5RDt
TryFinallyRmRR�R*R0t
except_clauseR�RRt	TryExcept(
RGRhtclausesR�tfinallyNodeRjR_R�R�t
try_except((s,/usr/lib64/python2.7/compiler/transformer.pyR��s6
	
*!cCsu|j|d�}x[tt|�ddd�D]=}|j||||dd�}|dkrg|S|}q0WdS(Ni����iii����ii(RmR�R*t
com_with_item(RGRhtbodyRjtret((s,/usr/lib64/python2.7/compiler/transformer.pyR��s#!cCsZt|�dkr+|j|dt�}nd}|j|d�}t|||d|�S(NiiiR((R*R�RRRmtWith(RGRhR3R(tvarRT((s,/usr/lib64/python2.7/compiler/transformer.pyR2�s
cCs|dS(Ni((RGR_((s,/usr/lib64/python2.7/compiler/transformer.pyR��scCsE|j|�}|jttttfkr.|Std|jj�dS(s�Return node suitable for lvalue of augmented assignment

        Names, slices, and attributes are the only allowable nodes.
        scan't assign to %sN(Rmt	__class__R#tSlicet	SubscriptRnR%R(RGR_R"((s,/usr/lib64/python2.7/compiler/transformer.pyR��scCsUxN|d}|tjtjtjtjfkr`t|�dkrS|j||�S|d}q|tkr�t|�dkr�td�n|d}q|tj	krq|ddtj
kr�td�nt|�dkrd|j|d�}x\tdt|�d�D]A}||}|dt
jkr7td�n|j||�}qW|j||d|�S|d}q|tj
kr@|dd}|t
jkr�|d}|dt
jkr=td�q=qM|t
jkr|d}|dt
jkrtd�n|j||�S|t
jkr4|j|d|�Std�qtd	|�qWdS(
Niiiscan't assign to operatori����scan't assign to ()scan't assign to []scan't assign to literalsbad assignment (%s)(R0texprlistR�t
testlist_safeR�R*tcom_assign_tuplet
_assign_typesR%RRRmR�R5RRtcom_assign_trailerR8R�R:Rtcom_assign_listRDtcom_assign_name(RGR_t	assigningR
tprimaryRjtch((s,/usr/lib64/python2.7/compiler/transformer.pyR��sL
$

 



cCs\g}x=tdt|�d�D]#}|j|j|||��qWt|dt|��S(NiiR((R�R*RR�tAssTupleR%(RGR_RAtassignsRj((s,/usr/lib64/python2.7/compiler/transformer.pyR<s!cCs�g}x}tdt|�d�D]c}|dt|�kre||ddtjkretd�qen|j|j|||��qWt|dt|��S(Niiis"can't assign to list comprehensionR((	R�R*R0tlist_forR%RR�tAssListR%(RGR_RARERj((s,/usr/lib64/python2.7/compiler/transformer.pyR?s!cCst|d|d|d�S(NiR(i(tAssName(RGR_RA((s,/usr/lib64/python2.7/compiler/transformer.pyR@%scCs�|dd}|tjkr4|j||d|�S|tjkrZ|j||d|�S|tjkrutd�ntd|�dS(Niiiscan't assign to function callsunknown trailer type: %s(R5tDOTtcom_assign_attrR:tcom_subscriptlistR8R%(RGRBR_RAR
((s,/usr/lib64/python2.7/compiler/transformer.pyR>(scCst||d|d|d�S(NiR(i����(tAssAttr(RGRBR_RA((s,/usr/lib64/python2.7/compiler/transformer.pyRJ2scCs�t|�}|dkr9|d}|j|�|d�Sg}xDtd|d�D]0}||}|j|j|�|d��qRW||dt|��S(s=Compile 'NODE (OP NODE)*' into (type, [ node1, ..., nodeN ]).iiiR((R*R�R�RR%(RGtconstructorRhR"R`R2Rj((s,/usr/lib64/python2.7/compiler/transformer.pyR�5s

$cCs9|j|�|d�}t|t�r,|St|g�S(Ni(R�R$Rg(RGR_R�((s,/usr/lib64/python2.7/compiler/transformer.pyRaAscCsL|j|�|d�}t|t�r;|j|j�n
|j|�dS(Ni(R�R$RgtextendR!R(RGRkR_R�((s,/usr/lib64/python2.7/compiler/transformer.pyReHscCs�g}x�tdt|��D]l}||dtjkrQ|j|d||�S||dtjkrnqn|j|j||��qWt	|d|dj
�S(NiiR((R�R*R0RFtcom_list_comprehensionR5R�RRmRR((RGRhtvaluesRj((s,/usr/lib64/python2.7/compiler/transformer.pyRPs
cCs|j|d|d�S(NRL(tcom_comprehensionR(RGRTR_((s,/usr/lib64/python2.7/compiler/transformer.pyRO]sc
Cs|dd}g}x|r�|dd}|dkr�|j|dt�}|j|d�}	t||	g�}
|dd|
_|j|
�t|�dkr�d}q�|dkr�|j|d�}q�|j	|d�}q|dkr|j|d�}t
|d|dd�}|
jj|�t|�d	krGd}q�|dkri|j|d	�}q�|j	|d	�}qtd
||f�qW|dkr�t
||d|�S|dkr�t||d|�S|dkr�t|||d|�Std
t|���dS(NiitforiiRLtifR(is'unexpected comprehension element: %s %dtsettdictsunexpected comprehension type: (R�RRmtListCompForR(RR*Rt
com_list_itert
com_comp_itert
ListCompIftifsR%tListComptSetComptDictCompRtrepr(
RGR�R�R_RR(tforsR
R�tcompNodetnewforR�tnewif((s,/usr/lib64/python2.7/compiler/transformer.pyRQ`sD
	
		cCs|dS(Ni((RGR_((s,/usr/lib64/python2.7/compiler/transformer.pyRW�scCs|dS(Ni((RGR_((s,/usr/lib64/python2.7/compiler/transformer.pyRX�scCsu|dd}g}x8|rN|dd}|dkr�|j|dt�}|j|d�}t||gd|dd�}|j|�t|�dkr�d}qK|j|d�}q|dkr8|j|d�}	t|	d|dd�}
|j	j|
�t|�dkr"d}qK|j|d�}qt
d	||f�qWt|d
_t
t||�d|�S(NiiRRiR(iRSis.unexpected generator expression element: %s %di(R�RRmt
GenExprForRR*RRXt	GenExprIfRZR%tTruet
is_outmosttGenExprtGenExprInner(RGRTR_R(R_R
R�tgenNodeRaR�Rb((s,/usr/lib64/python2.7/compiler/transformer.pyR��s2	
		
cCs�|d}t|�dks3|ddtjkr�g}x:tdt|�d�D] }|j|j||��qRWt|d|dj�S|ddtj	kr�|j|d�}|j
|d|dd�St|�dkr:|ddtj	kr:|j|d�}|j|d�}|j
|||dd�Sg}xQtdt|�d�D]7}|j|j||�|j||d�f�qYWt|d|ddj�SdS(	NiiiR(RTiRUi(
R*R5R�R�RRmtSetR(R0R�RQRR(RGRhR2RjRTtkeyRH((s,/usr/lib64/python2.7/compiler/transformer.pyR�s$
))cCs�|dd}|tjkr1|j||d�S|tjkrT|j||d�S|tjkrz|j||dt�Std|�dS(Niiisunknown node type: %s(	R5R8RqRItcom_select_memberR:RKRR%(RGtprimaryNodeRhR
((s,/usr/lib64/python2.7/compiler/transformer.pyR�scCs:|dtjkrtd�nt||dd|d�S(Nismember must be a nameiR(i(R5RDR%Rn(RGRmRh((s,/usr/lib64/python2.7/compiler/transformer.pyRl�scCs�|dtjkr,t|gdt|��Sg}d}d}}t|�}d}x@||kr�||}	|	dtjkr�|dk	r�td�n|j||d�}|d}qWnR|	dtj	kr|dk	r�td�n|j||d�}|d}qWn|j
|	||�\}}
|dkr|t|
t�r|t|	�dkr||	ddt
jkr|td�n|j|
�|d}qWWt||||dt|��S(	NiR(is$already have the varargs indentifieris#already have the kwargs indentifieris&generator expression needs parenthesis(R5R�tCallFuncR%RR*R�R%RmRtcom_argumentR$RgR0R�R(RGRmRhR,tkwt	star_nodet
dstar_nodetlen_nodelistRjR_R�((s,/usr/lib64/python2.7/compiler/transformer.pyRq�s:



)
cCsDt|�dkrV|ddtjkrV|j|d�}d|j||d�fSt|�dkr�|rztd�n|r�td�nd|j|d�fS|j|d�}|d}x3t|�dkr�|dtjkr�|d}q�W|dtjkrtd|d�nt|d|d|d�}d|fS(	Niiiis!non-keyword arg after keyword args+only named arguments may follow *expressions#keyword can't be an expression (%s)R((	R*R0R�RmR�R%R5RDtKeyword(RGRhRpRqR�R�R`R_((s,/usr/lib64/python2.7/compiler/transformer.pyRos")
(cCs�t|�dkr�|d}|ddtjks\t|�dkr�|ddtjkr�|ddtjkr�|j|||�Sng}x:tdt|�d�D] }|j|j||��q�Wt	|||dt
|��S(Niiii����R((R*R5R�R0R�t	com_sliceR�Rt
com_subscriptR9R%(RGRBRhRAtsubt
subscriptsRj((s,/usr/lib64/python2.7/compiler/transformer.pyRK"s
)cCs||d}|d}|tjkrA|ddtjkrAt�S|tjksbt|�dkro|j|�S|j|�S(Niii(R5RItEllipsisR�R*tcom_sliceobjRm(RGR_RCR
((s,/usr/lib64/python2.7/compiler/transformer.pyRv6s

&!
cCs>g}|ddtjkr9|jtd��d}n |j|j|d��d}|t|�kr�||dtjkr�|j|j||��|d}n|jtd��xit	|t|��D]R}||}t|�dkr
|jtd��q�|j|j|d��q�Wt
|dt|��S(NiiiiR((R5R�RR�RRmR*R0R�R�tSliceobjR%(RGR_R2RjtjRC((s,/usr/lib64/python2.7/compiler/transformer.pyRz@s 
	)

cCs�d}}t|�dkr_|ddtjkrI|j|d�}q�|j|d�}n;t|�dkr�|j|d�}|j|d�}nt||||dt|��S(NiiiiiR((RR*R5R�RmR8R%(RGRBR_RAtlowertupper((s,/usr/lib64/python2.7/compiler/transformer.pyRuds
cCs�|dkr#|d}|d}n|tjkr�t|�dkrU|j|d�Sx.|D]&}|dtjkr\|j|�Sq\WdS|tjkr�x.|D]&}|dtjkr�|j|�Sq�WdS|tjkr'|ddtj	kr#d}x"|D]}|t
|d�}qW|SdS|tjksT|tjksT|tjkre|j|d�S|t
kr�t|�dkr�|j|d�SdS(NiiRU(RR0RRR*RcR�RZRR5RBRR�t
small_stmtt
_doc_nodes(RGR_R`RwtsR
((s,/usr/lib64/python2.7/compiler/transformer.pyRcrs8




N(�RRt__doc__RJRQRRRWRORYRZR[RpRsRvRxR]R\told_lambdefR^R�Rt	flow_stmtt
compound_stmtR�R�RyR�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�RRR�R;t	testlist1R:R�R�R�told_testR�R�R�RTR�R�R�RRRRRR7R9R;R=R?R"RARCR�RmR4RzR$R&R�R(R�R)R�R�R�R�R2R�R�R�R<R?R@R>RJR�RaReRRORQRWRXR�RRRlRqRoRKRvRzRuRRc(((s,/usr/lib64/python2.7/compiler/transformer.pyR^s�							
							!																																
												!				
			
	
													2					
		
			)						
	,		
		
					
		1			"				'			
	$	t<t>s==s<=s>=s!=R�R�cCs~g}xq|D]i}t|ttf�rD|jtj||��q
t|t�rc|j|�q
|jt|��q
W|S(N(R$tinttlongRt_namestgetR+t
debug_tree(RPR"R((s,/usr/lib64/python2.7/compiler/transformer.pyR��s
(SR�tcompiler.astRMR0R5t
StandardErrorRtcompiler.constsRRRRRRR
RR%R.RR�R�R;R�R�R�R�R�RTR�R�R�RRRRR�tLESStGREATERtEQEQUALR�t	LESSEQUALtGREATEREQUALtNOTEQUALR�R]R^R�RR�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�RRR:Rt_legal_node_typesRRR�R�R=R�R1R2Rtvttok_nameR�(((s,/usr/lib64/python2.7/compiler/transformer.pyt<module>	s�
	
			
	�����9








Hacked By AnonymousFox1.0, Coded By AnonymousFox