OwlCyberSecurity - MANAGER
Edit File: symbols.pyc
� �V~gc�����������@���s=��d��Z��d�d�l�m�Z�d�d�l�m�Z�m�Z�m�Z�m�Z�m�Z�m �Z �d�d�l �m�Z�d�d�l�Z�d�d�l �Z �d�Z�d�d�d�������YZ�d �e�f�d �������YZ�d�e�f�d�������YZ�d �e�f�d�������YZ�d�e�f�d�������YZ�d�e�f�d�������YZ�d�d�d�������YZ�d����Z�e�d�k�r9d�d�l �Z �d�d�l�m�Z�m�Z�d�d�l�Z�d����Z�x�e �j�d�D]�Z�e�GHe�e���Z�e�j ����Z!�e�j"����e�j�e!�e�d���Z#�e�e#���Z$�e�e���Z%�e����Z&�e�e%�e&���e&�j'�e%�j����Z(�e�e$�e(���s"Hd�Ge�GHe)�e$���GHe)�e(���GHe �j*�d���n��i��Z+�e+�j,�e&�j'���e+�e%�=e+�j-����Z'�[+�x��e#�j.����D]��Z&�e&�j/����r[g��e'�D]!�Z0�e0�j1�e&�j2����k�rte0�^�qtZ3�e4�e3���d�k�r�d�Ge&�j2����GHq.e�e�e&�j5������e3�d�j������s.e&�j2����GHe)�e�e&�j5��������GHe)�e3�d�j������GHe �j*�d���q.q[q[Wq`Wn��d�S( ���s���Module symbol-table generatori����(���t���ast(���t���SC_LOCALt���SC_GLOBAL_IMPLICITt���SC_GLOBAL_EXPLICITt���SC_FREEt���SC_CELLt ���SC_UNKNOWN(���t���mangleNi���t���Scopec�����������B���s����e��Z�d�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����Z�d����Z�RS(���c���������C���s����|�|��_��|�|��_�i��|��_�i��|��_�i��|��_�i��|��_�i��|��_�i��|��_�g��|��_�d��|��_ �d��|��_�d��|��_�|�d��k �r��x>�t �t�|�����D]'�}�|�|�d�k�r��|�|�|��_�Pq��q��Wn��d��S(���Nt���_(���t���namet���modulet���defst���usest���globalst���paramst���freest���cellst���childrent���Nonet���nestedt ���generatort���klasst���ranget���len(���t���selfR ���R���R���t���i(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyt���__init__���s"���� c���������C���s���d�|��j��j�|��j�f�S(���Ns���<%s: %s>(���t ���__class__t���__name__R ���(���R���(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyt���__repr__%���s����c���������C���s#���|��j��d��k�r�|�St�|�|��j����S(���N(���R���R���R���(���R���R ���(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyR���(���s����c���������C���s���d�|��j��|��j�|���<d��S(���Ni���(���R���R���(���R���R ���(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyt���add_def-���s����c���������C���s���d�|��j��|��j�|���<d��S(���Ni���(���R ���R���(���R���R ���(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyt���add_use0���s����c���������C���sy���|��j��|���}�|�|��j�k�s0�|�|��j�k�r0�n��|�|��j�k�rX�t�d�|�|��j�f���n��d�|��j�|�<|��j�j�|���d��S(���Ns ���%s in %s is global and parameteri���( ���R���R ���R���R���t���SyntaxErrorR ���R���R���R���(���R���R ���(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyt ���add_global3���s���� c���������C���s-���|��j��|���}�d�|��j�|�<d�|��j�|�<d��S(���Ni���(���R���R���R���(���R���R ���(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyt ���add_param=���s���� c���������C���s@���i��}�|�j��|��j���|�j��|��j���|�j��|��j���|�j����S(���N(���t���updateR���R ���R���t���keys(���R���t���d(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyt ���get_namesB���s ����c���������C���s���|��j��j�|���d��S(���N(���R���t���append(���R���t���child(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyt ���add_childI���s����c���������C���s���|��j��S(���N(���R���(���R���(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyt���get_childrenL���s����c���������C���s����t��j�|��j�I|��j�r�d�p"�d�IJt��j�d�I|��j�IJt��j�d�I|��j�IJt��j�d�I|��j�IJt��j�d�I|��j�IJt��j�d�I|��j�IJd��S(���NR���t����s ��� globals: s��� cells: s��� defs: s��� uses: s��� frees:( ���t���syst���stderrR ���R���R���R���R���R ���R���(���R���(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyt���DEBUGO���s����%c���������C���sy���|�|��j��k�r�t�S|�|��j�k�r&�t�S|�|��j�k�r9�t�S|��j�rd�|�|��j�k�s`�|�|��j�k�rd�t �S|��j�rq�t �St�Sd�S(���sb���Return scope of name. The scope of a name could be LOCAL, GLOBAL, FREE, or CELL. N(���R���R���R���R���R���R���R���R���R ���R���R���R���(���R���R ���(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyt ���check_nameW���s����' c���������C���sr���|��j��s �d�Si��}�|�j�|��j���xB�|��j�j����D]1�}�|�|��j�k�r3�|�|��j�k�r3�d�|�|�<q3�q3�W|�j����S(���Ni���(����(���R���R$���R���R ���R%���R���R���(���R���t���freeR ���(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyt ���get_free_varsi���s���� c���������C���sQ���xJ�|��j��D]?�}�|�j����}�|��j�|���}�x�|�D]�}�|�j�|���q2�Wq �Wd��S(���N(���R���R2���t ���add_freest���force_global(���R���R)���R���R���R ���(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyt���handle_childrens���s ���� c���������C���sf���d�|��j��|�<|�|��j�k�r)�|��j�|�=n��x6�|��j�D]+�}�|�j�|���t�k�r3�|�j�|���q3�q3�Wd�S(���s���Force name to be global in scope. Some child of the current node had a free reference to name. When the child was processed, it was labelled a free variable. Now that all its enclosing scope have been processed, the name is known to be a global or builtin. So walk back down the child chain and set the name to be global rather than free. Be careful to stop if a child does not think the name is free. i���N(���R���R���R���R0���R���R4���(���R���R ���R)���(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyR4���z���s���� c���������C���s��g��}�x��|�D]��}�|��j��|���}�|��j�r��|�t�k�sR�|�t�k�sR�t�|��t���rb�d�|��j�|�<q�|�t�k�r~�|�j�|���q�t�|��t ���r��|�t �k�r��d�|��j�|�<q�|�t�k�r�|�j�|���q�q �|�t �k�r��d�|��j�|�<q �|�t�k�r �|�j�|���q �q �W|�S(���s����Process list of free vars from nested scope. Returns a list of names that are either 1) declared global in the parent or 2) undefined in a top-level parent. In either case, the nested scope should treat them as globals. i���( ���R0���R���R���R���t ���isinstancet ���ClassScopeR���R���R(���t ���FunctionScopeR���R���R���(���R���t���namest ���child_globalsR ���t���sc(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyR3�������s$���� c���������C���s ���|��j��j����S(���N(���R���R%���(���R���(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyt ���get_cell_vars����s����N(���R���t ���__module__R���R���R���R���R���R ���R"���R#���R'���R*���R+���R/���R0���R2���R5���R4���R3���R<���(����(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyR������s"��� t���ModuleScopec�����������B���s���e��Z�e�j�Z�d�����Z�RS(���c���������C���s���|��j��d�|����d��S(���Nt���global(���t���_ModuleScope__super_init(���R���(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyR�������s����(���R���R=���R���R���R@���(����(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyR>�������s��� R8���c�����������B���s���e��Z�RS(����(���R���R=���(����(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyR8�������s���t���GenExprScopec�����������B���s,���e��Z�e�j�Z�d��Z�d�d���Z�d����Z�RS(���i���c���������C���s@���|��j��}�|��j��d�7_��|��j�d�|�|�|���|��j�d���d��S(���Ni���s���generator expression<%d>s���.0(���t���_GenExprScope__countert���_GenExprScope__super_initR#���(���R���R���R���R���(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyR�������s���� c���������C���s���t��j�|����}�|�S(���N(���R���R'���(���R���R%���(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyR'�������s����N(���R���R=���R���R���RC���RB���R���R'���(����(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyRA�������s��� t���LambdaScopec�����������B���s#���e��Z�e�j�Z�d��Z�d�d���Z�RS(���i���c���������C���s3���|��j��}�|��j��d�7_��|��j�d�|�|�|���d��S(���Ni���s ���lambda.%d(���t���_LambdaScope__countert���_LambdaScope__super_init(���R���R���R���R���(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyR�������s���� N(���R���R=���R���R���RF���RE���R���(����(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyRD�������s��� R7���c�����������B���s���e��Z�e�j�Z�d�����Z�RS(���c���������C���s���|��j��|�|�|���d��S(���N(���t���_ClassScope__super_init(���R���R ���R���(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyR�������s����(���R���R=���R���R���RG���(����(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyR7�������s��� t ���SymbolVisitorc�����������B���s��e��Z�d�����Z�d����Z�e�Z�d����Z�d����Z�d����Z�d����Z�d����Z �d�d���Z �d ����Z�d ����Z�d����Z �d�d���Z�d ����Z�d����Z�d����Z�d����Z�d����Z�d�d���Z�d�d���Z�d�d���Z�d�d���Z�d����Z�e�j�e�j�e�j�f�Z�d����Z�d����Z�RS(���c���������C���s���i��|��_��d��|��_�d��S(���N(���t���scopesR���R���(���R���(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyR�������s���� c���������C���s2���t�����}�|��_�|��j�|�<|��j�|�j�|���d��S(���N(���R>���R���RI���t���visitt���node(���R���RK���t���scope(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyt���visitModule����s����c���������C���s����|�j��r�|��j�|�j��|���n��|�j�|�j���x!�|�j�D]�}�|��j�|�|���q9�Wt�|�j�|��j�|��j���}�|�j�s��t �|�t���r��d�|�_�n��|�|��j �|�<|��j�|�|�j���|��j�|�j �|���|��j�|�|���d��S(���Ni���(���t ���decoratorsRJ���R���R ���t���defaultsR8���R���R���R���R6���RI���t���_do_argst���argnamest���codet���handle_free_vars(���R���RK���t���parentt���nRL���(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyt ���visitFunction����s���� c���������C���s|���t��|��j�|��j���}�|�j�s<�t�|�t���s<�t�|�t����rH�d�|�_�n��|�|��j�|�<|��j�|�j�|���|��j �|�|���d��S(���Ni���( ���RA���R���R���R���R6���R8���RI���RJ���RR���RS���(���R���RK���RT���RL���(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyt���visitGenExpr����s���� c���������C���s;���x!�|�j��D]�}�|��j�|�|���q �W|��j�|�j�|���d��S(���N(���t���qualsRJ���t���expr(���R���RK���RL���t���genfor(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyt���visitGenExprInner����s����c���������C���sQ���|��j��|�j�|�d���|��j��|�j�|���x!�|�j�D]�}�|��j��|�|���q3�Wd��S(���Ni���(���RJ���t���assignt���itert���ifs(���R���RK���RL���t���if_(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyt���visitGenExprFor���s����c���������C���s���|��j��|�j�|���d��S(���N(���RJ���t���test(���R���RK���RL���(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyt���visitGenExprIf��s����i����c���������C���s����|�s �t����x!�|�j�D]�}�|��j�|�|���q�Wt�|��j�|��j���}�|�j�s^�t�|�t���rj�d�|�_�n��|�|��j �|�<|��j �|�|�j���|��j�|�j�|���|��j �|�|���d��S(���Ni���(���t���AssertionErrorRO���RJ���RD���R���R���R���R6���R8���RI���RP���RQ���RR���RS���(���R���RK���RT���R\���RU���RL���(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyt���visitLambda ��s���� c���������C���sJ���xC�|�D];�}�t��|���t�j�k�r5�|��j�|�|���q�|�j�|���q�Wd��S(���N(���t���typet���typest ���TupleTypeRP���R#���(���R���RL���t���argsR ���(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyRP�����s���� c���������C���s���|�j��|���|�j����d��S(���N(���R*���R5���(���R���RL���RT���(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyRS��� ��s���� c���������C���s����|�j��|�j���x!�|�j�D]�}�|��j�|�|���q�Wt�|�j�|��j���}�|�j�sa�t�|�t���rm�d�|�_�n��|�j �d��k �r��|�j��d���n��|�j��d���|�|��j�|�<|��j�}�|�j�|��_�|��j�|�j �|���|�|��_�|��j�|�|���d��S(���Ni���t���__doc__R=���(���R���R ���t���basesRJ���R7���R���R���R6���R8���t���docR���RI���R���RR���RS���(���R���RK���RT���RU���RL���t���prev(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyt ���visitClass$��s���� c���������C���s-���|�r�|�j��|�j���n�|�j�|�j���d��S(���N(���R���R ���R ���(���R���RK���RL���R\���(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyt ���visitName;��s����c���������C���s_���|��j��|�j�|�d���|��j��|�j�|���|��j��|�j�|���|�j�r[�|��j��|�j�|���n��d��S(���Ni���(���RJ���R\���t���listt���bodyt���else_(���R���RK���RL���(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyt���visitForC��s ���� c���������C���sC���x<�|�j��D]1�\�}�}�|�d�k�r(�q �n��|�j�|�p7�|���q �Wd��S(���Nt���*(���R9���R���(���R���RK���RL���R ���t���asname(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyt ���visitFromJ��s����c���������C���sY���xR�|�j��D]G�\�}�}�|�j�d���}�|�d�k�r>�|�|� }�n��|�j�|�pM�|���q �Wd��S(���Nt���.i����(���R9���t���findR���(���R���RK���RL���R ���Rt���R���(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyt���visitImportP��s ���� c���������C���s%���x�|�j��D]�}�|�j�|���q �Wd��S(���N(���R9���R"���(���R���RK���RL���R ���(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyt���visitGlobalW��s����c���������C���s>���x$�|�j��D]�}�|��j�|�|�d���q �W|��j�|�j�|���d�S(���s.��Propagate assignment flag down to child nodes. The Assign node doesn't itself contains the variables being assigned to. Instead, the children in node.nodes are visited with the assign flag set to true. When the names occur in those nodes, they are marked as defs. Some names that occur in an assignment target are not bound by the assignment, e.g. a name occurring inside a slice. The visitor handles these nodes specially; they do not propagate the assign flag to their children. i���N(���t���nodesRJ���RY���(���R���RK���RL���RU���(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyt���visitAssign[��s���� i���c���������C���s���|�j��|�j���d��S(���N(���R���R ���(���R���RK���RL���R\���(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyt���visitAssNamel��s����c���������C���s���|��j��|�j�|�d���d��S(���Ni����(���RJ���RY���(���R���RK���RL���R\���(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyt���visitAssAttro��s����c���������C���sA���|��j��|�j�|�d���x$�|�j�D]�}�|��j��|�|�d���q �Wd��S(���Ni����(���RJ���RY���t���subs(���R���RK���RL���R\���RU���(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyt���visitSubscriptr��s����c���������C���s^���|��j��|�j�|�d���|�j�r8�|��j��|�j�|�d���n��|�j�rZ�|��j��|�j�|�d���n��d��S(���Ni����(���RJ���RY���t���lowert���upper(���R���RK���RL���R\���(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyt ���visitSlicew��s ���� c���������C���sX���|��j��|�j�|���t�|�j�t�j���rA�|��j��|�j�|�d���n��|��j��|�j�|���d��S(���Ni���(���RJ���RK���R6���R����t���NameRY���(���R���RK���RL���(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyt���visitAugAssign~��s����c���������C���s����xv�|�j��D]k�\�}�}�t�|�t�j���rU�t�|�j���|��j�k�rU�|�j�sR�q �qR�qU�n��|��j�|�|���|��j�|�|���q �W|�j�r��|��j�|�j�|���n��d��S(���N( ���t���testsR6���R����t���ConstRe���t���valuet���_const_typesRJ���Rq���(���R���RK���RL���Ra���Rp���(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyt���visitIf���s���� c���������C���s ���d�|�_��|��j�|�j�|���d��S(���Ni���(���R���RJ���R����(���R���RK���RL���(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyt ���visitYield���s���� ( ���R���R=���R���RM���t���visitExpressionRV���RW���R[���R`���Rb���Rd���RP���RS���Rm���Rn���Rr���Ru���Rx���Ry���R{���R|���R}���R���R����R����Rf���t ���StringTypet���IntTypet ���FloatTypeR����R����R����(����(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyRH�������s4��� c���������C���s���t��|����t��|���k�S(���N(���t���sorted(���t���l1t���l2(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyt���list_eq���s����t���__main__(���t ���parseFilet���walkc���������C���sT���g��g��|��j�����D]�}�|�j����^�q�D]*�}�|�j�d���pG�|�j�d���s&�|�^�q&�S(���Ns���_[Rv���(���t���get_symbolst���get_namet ���startswith(���t���symst���s(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyR'������s����,i���t���exect���oopst���skippingi����(����(����(6���Ri���t���compilerR����t���compiler.constsR���R���R���R���R���R���t ���compiler.miscR���Rf���R-���t ���MANGLE_LENR���R>���R8���RA���RD���R7���RH���R����R���R����R����t���symtableR'���t���argvt���filet���opent���ft���readt���buft���closeR����t ���mod_namest���treeR����RI���t���names2R����t���exitR&���R$���t���valuesR����t���is_namespaceR;���R ���R����t���lR���t ���get_namespace(����(����(����s5���/opt/alt/python27/lib64/python2.7/compiler/symbols.pyt���<module>���sj���.� � !