m %UIc@sdZdkZdklZlZlZlZlZlZlZl Z l Z l Z l Z l Z lZlZlZdkZddddddgZd Zd fd YZeZd Zdfd YZdefdYZdefdYZdfdYZedjodkZdkZeeidi Z!ee!ei"i#eidddZ$x@e$i%D].Z&e$i'e&Z(e(Ge(i)Ge(i*GHqWndS(s2Interface to the compiler's internal symbol tablesN(sUSEs DEF_GLOBALs DEF_LOCALs DEF_PARAMsDEF_STARsDEF_DOUBLESTARs DEF_INTUPLEsDEF_FREEsDEF_FREE_GLOBALsDEF_FREE_CLASSs DEF_IMPORTs DEF_BOUNDsOPT_IMPORT_STARsOPT_EXECs OPT_BARE_EXECtsymtablet SymbolTabletnewSymbolTabletClasstFunctiontSymbolcCs&ti|||}t|d|S(Ni(t _symtableRtcodetfilenamet compile_typetrawR(RRR R ((t%/data/zmath/lib/python2.4/symtable.pyRstSymbolTableFactorycBs#tZdZdZdZRS(NcCsti|_dS(N(tweakreftWeakValueDictionarytselft_SymbolTableFactory__memo(R((R t__init__scCsU|itijot||Sn|itijot||Snt||S(N( ttablettypeRt TYPE_FUNCTIONRRt TYPE_CLASSRR(RRR((R tnews cCsS||f}|ii|d}|djo!|i||}|i|s<%sSymbolTable for %s in %s>(Rt __class__RtkindRR)tnameR*(RR/((R t__repr__4s  cCs|iitijodSn|iitijodSn|iitijodSn|iidjptd|iidS( Ntmoduletfunctiontclassiiisunexpected type: %s(iii(RR)RRt TYPE_MODULERRtAssertionError(R((R tget_type@scCs |iiS(N(RR)tid(R((R tget_idJscCs |iiS(N(RR)R0(R((R tget_nameMscCs |iiS(N(RR)tlineno(R((R t get_linenoPscCs't|iitijo |ii S(N(tboolRR)RRRt optimized(R((R t is_optimizedSscCst|iiS(N(R=RR)tnested(R((R t is_nestedWscCst|iiS(N(R=RR)tchildren(R((R t has_childrenZscCst|iittB@S(s"Return true if the scope uses execN(R=RR)R>tOPT_EXECt OPT_BARE_EXEC(R((R thas_exec]scCst|iit@S(s&Return true if the scope uses import *N(R=RR)R>tOPT_IMPORT_STAR(R((R thas_import_starascCs|iiiS(N(RR)tsymbolstkeys(R((R tget_identifiersescCsc|ii|}|djo@|ii|}|i |}t |||}|i|s(Rt_Function__paramsRt_Function__idents_matching(R((R tget_parametersscCs0|idjo|id|_n|iS(NcCs|t@S(N(RYt DEF_BOUND(RY((R RZs(Rt_Function__localsRR\(R((R t get_localsscs=|idjo&ttB|id|_n|iS(Ncs|@S(N(RYtglob(RY(Ra(R RZs(Rt_Function__globalsRR#tDEF_FREE_GLOBALRaR\(RRa((RaR t get_globalss cCs-|idjo|it|_n|iS(N(Rt_Function__freesRR\R'(R((R t get_freess( RRRR[R_ReRbR\R]R`RdRf(((R R|s    cBstZdZdZRS(NcCsT|idjo=h}x!|iiD]}d||i(RRj(R((R R1scCs|iS(N(RRj(R((R R:scCst|iti@S(N(R=RRkRR(R((R t is_referencedscCst|it@S(N(R=RRkR"(R((R t is_parameterscCst|it@p |it@S(N(R=RRkR#Rc(R((R t is_globalscCst|it@S(N(R=RRktDEF_STAR(R((R t is_varargscCst|it@S(N(R=RRktDEF_DOUBLESTAR(R((R t is_keywordargscCst|it@S(N(R=RRkR^(R((R tis_localscCsJ|ittB@o|ittBtB@otSn|it@otSnt S(N( RRkRR R!R"R#R$R%R&(R((R R's (cCst|it@S(N(R=RRkt DEF_IMPORT(R((R t is_importedscCst|it@S(N(R=RRkR!(R((R t is_assignedscCst|it@S(N(R=RRkt DEF_INTUPLE(R((R t is_in_tuplescCs t|iS(sReturns true if name binding introduces new namespace. If the name is used as the target of a function or class statement, this will be true. Note that a single name can be bound to multiple objects. If is_namespace() is true, the name may also be bound to other objects, like an int or list, that does not introduce a new namespace. N(R=RRl(R((R t is_namespaces cCs|iS(s.Return a list of namespaces bound to this nameN(RRl(R((R tget_namespacesscCs.t|idjo tdn|idS(sReturns the single namespace bound to this name. Raises ValueError if the name is bound to multiple namespaces. is$name is bound to multiple namespacesiN(tlenRRlt ValueError(R((R t get_namespaces (RRRRR1R:RmRnRoRqRsRtR'RvRwRyRzR{R~(((R Rs               t__main__iitexec(+t__doc__RRR#R!R"RpRrRxR RcR%RuR^RGRDRER t__all__RR RR'RRRRRtostsystopentargvtreadtsrctpathtsplittmodRKRQROtinfoRtRz( RpRRRcR"RR RR%RRRxR#RrRR RDR'RRQRuRRRRER!RRGR RR^R((R t?s( a    N! J )