ACC SHELL

Path : /usr/lib/python/compiler/
File Upload :
Current File : //usr/lib/python/compiler/symbols.pyo

Ñò
rÄMc@sNdZddklZddklZlZlZlZlZddk	l
Z
ddkZddkZdZ
ddd„ƒYZd	efd
„ƒYZdefd„ƒYZd
efd„ƒYZdefd„ƒYZdefd„ƒYZddd„ƒYZd„Zedjo4ddkZddklZlZddkZd„ZxúeidD]çZeGHeeƒZeiƒZ ei!ƒeie edƒZ"ee"ƒZ#eeƒZ$eƒZ%ee$e%ƒe%i&e$iƒZ'ee#e'ƒp1HdGeGHe(e#ƒGHe(e'ƒGHei)dƒnhZ*e*i+e%i&ƒe*e$=e*i,ƒZ&[*xôe"i-ƒD]æZ%e%i.ƒoÓgZ/e&D]'Z0e0i1e%i2ƒjoe/e0qvqv[/Z3e4e3ƒdjodGe%i2ƒGHq>eee%i5ƒƒe3diƒƒpHe%i2ƒGHe(ee%i5ƒƒƒGHe(e3diƒƒGHei)dƒq>qXqXWq[WndS( sModule symbol-table generatoriÿÿÿÿ(tast(tSC_LOCALt	SC_GLOBALtSC_FREEtSC_CELLt
SC_UNKNOWN(tmangleNitScopecBs¤eZdd„Zd„Zd„Zd„Zd„Zd„Zd„Z	d„Z
d„Zd	„Zd
„Z
d„Zd„Zd
„Zd„Zd„Zd„ZRS(cCsÁ||_||_h|_h|_h|_h|_h|_h|_g|_d|_
d|_d|_|dj	oDxAt
t|ƒƒD])}||djo|||_PqŒqŒWndS(Nt_(tnametmoduletdefstusestglobalstparamstfreestcellstchildrentNonetnestedt	generatortklasstrangetlen(tselfR	R
Rti((s&/usr/lib/python2.6/compiler/symbols.pyt__init__s$												

cCsd|ii|ifS(Ns<%s: %s>(t	__class__t__name__R	(R((s&/usr/lib/python2.6/compiler/symbols.pyt__repr__$scCs%|idjo|St||iƒS(N(RRR(RR	((s&/usr/lib/python2.6/compiler/symbols.pyR'scCsd|i|i|ƒ<dS(Ni(RR(RR	((s&/usr/lib/python2.6/compiler/symbols.pytadd_def,scCsd|i|i|ƒ<dS(Ni(RR(RR	((s&/usr/lib/python2.6/compiler/symbols.pytadd_use/scCs~|i|ƒ}||ijp||ijon||ijotd||if‚nd|i|<|ii|ƒdS(Ns %s in %s is global and parameteri(	RRRRtSyntaxErrorR	R
R
R(RR	((s&/usr/lib/python2.6/compiler/symbols.pyt
add_global2s 
cCs-|i|ƒ}d|i|<d|i|<dS(Ni(RRR(RR	((s&/usr/lib/python2.6/compiler/symbols.pyt	add_param<s
cCs@h}|i|iƒ|i|iƒ|i|iƒ|iƒS(N(tupdateRRR
tkeys(Rtd((s&/usr/lib/python2.6/compiler/symbols.pyt	get_namesAs
cCs|ii|ƒdS(N(Rtappend(Rtchild((s&/usr/lib/python2.6/compiler/symbols.pyt	add_childHscCs|iS(N(R(R((s&/usr/lib/python2.6/compiler/symbols.pytget_childrenKscCs™ti|iI|iodpdIJtidI|iIJtidI|iIJtidI|iIJtidI|iIJtidI|iIJdS(NRts
	globals: s	cells: s	defs: s	uses: s	frees:(	tsyststderrR	RR
RRRR(R((s&/usr/lib/python2.6/compiler/symbols.pytDEBUGNs'cCs…||ijotS||ijotS||ijotS|io%||ijp||ijot	S|iot
StSdS(sbReturn scope of name.

        The scope of a name could be LOCAL, GLOBAL, FREE, or CELL.
        N(R
RRRRRRRRRR(RR	((s&/usr/lib/python2.6/compiler/symbols.pyt
check_nameVs*
cCsw|ipdSh}|i|iƒxE|iiƒD]4}||ijo||ijod||<q5q5W|iƒS(Ni((RR#RRR$RR
(RtfreeR	((s&/usr/lib/python2.6/compiler/symbols.pyt
get_free_varshs
 cCsQxJ|iD]?}|iƒ}|i|ƒ}x|D]}|i|ƒq2Wq
WdS(N(RR1t	add_freestforce_global(RR(RR
R	((s&/usr/lib/python2.6/compiler/symbols.pythandle_childrenrs
cCsjd|i|<||ijo|i|=nx8|iD]-}|i|ƒtjo|i|ƒq5q5WdS(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.
        iN(R
RRR/RR3(RR	R(((s&/usr/lib/python2.6/compiler/symbols.pyR3ys


cCsg}x|D]}|i|ƒ}|io©|tjp|tjpt|tƒod|i|<q|tjo|i|ƒqt|t	ƒo|t
jod|i|<q|tjo|i|ƒqq
|t
jod|i|<q
|tjo|i|ƒ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(
R/RRRt
isinstancet
ClassScopeRRR't
FunctionScopeRRR(Rtnamest
child_globalsR	tsc((s&/usr/lib/python2.6/compiler/symbols.pyR2s&




cCs
|iiƒS(N(RR$(R((s&/usr/lib/python2.6/compiler/symbols.pyt
get_cell_vars¨sN(Rt
__module__RRRRRRR!R"R&R)R*R.R/R1R4R3R2R;(((s&/usr/lib/python2.6/compiler/symbols.pyR
s"					
							
			tModuleScopecBseZeiZd„ZRS(cCs|id|ƒdS(Ntglobal(t_ModuleScope__super_init(R((s&/usr/lib/python2.6/compiler/symbols.pyR®s(RR<RRR?(((s&/usr/lib/python2.6/compiler/symbols.pyR=«s	R7cBseZRS((RR<(((s&/usr/lib/python2.6/compiler/symbols.pyR7±stGenExprScopecBs,eZeiZdZdd„Zd„ZRS(icCs@|i}|id7_|id|||ƒ|idƒdS(Nisgenerator expression<%d>s.0(t_GenExprScope__countert_GenExprScope__super_initR"(RR
RR((s&/usr/lib/python2.6/compiler/symbols.pyR¹s	cCsti|ƒ}|S(N(RR&(RR$((s&/usr/lib/python2.6/compiler/symbols.pyR&¿sN(RR<RRRBRARR&(((s&/usr/lib/python2.6/compiler/symbols.pyR@´s	tLambdaScopecBs#eZeiZdZdd„ZRS(icCs3|i}|id7_|id|||ƒdS(Nis	lambda.%d(t_LambdaScope__countert_LambdaScope__super_init(RR
RR((s&/usr/lib/python2.6/compiler/symbols.pyRÈs	N(RR<RRRERDR(((s&/usr/lib/python2.6/compiler/symbols.pyRCÃs	R6cBseZeiZd„ZRS(cCs|i|||ƒdS(N(t_ClassScope__super_init(RR	R
((s&/usr/lib/python2.6/compiler/symbols.pyRÐs(RR<RRRF(((s&/usr/lib/python2.6/compiler/symbols.pyR6Ís	t
SymbolVisitorcBseZd„Zd„ZeZd„Zd„Zd„Zd„Zd„Z	dd„Z
d	„Zd
„Zd„Z
dd„Zd
„Zd„Zd„Zd„Zd„Zdd„Zdd„Zdd„Zdd„Zd„ZeieieifZd„Zd„ZRS(cCsh|_d|_dS(N(tscopesRR(R((s&/usr/lib/python2.6/compiler/symbols.pyRÔs	cCs2tƒ}|_|i|<|i|i|ƒdS(N(R=R
RHtvisittnode(RRJtscope((s&/usr/lib/python2.6/compiler/symbols.pytvisitModuleÚscCsÞ|io|i|i|ƒn|i|iƒx!|iD]}|i||ƒq;Wt|i|i|iƒ}|ipt	|tƒo
d|_n||i
|<|i||iƒ|i|i
|ƒ|i||ƒdS(Ni(t
decoratorsRIRR	tdefaultsR7R
RRR5RHt_do_argstargnamestcodethandle_free_vars(RRJtparenttnRK((s&/usr/lib/python2.6/compiler/symbols.pyt
visitFunctionàs



cCs€t|i|iƒ}|ip t|tƒpt|tƒo
d|_n||i|<|i|i|ƒ|i	||ƒdS(Ni(
R@R
RRR5R7RHRIRQRR(RRJRSRK((s&/usr/lib/python2.6/compiler/symbols.pytvisitGenExprîs

cCs;x!|iD]}|i||ƒq
W|i|i|ƒdS(N(tqualsRItexpr(RRJRKtgenfor((s&/usr/lib/python2.6/compiler/symbols.pytvisitGenExprInnerùs
cCsQ|i|i|dƒ|i|i|ƒx!|iD]}|i||ƒq3WdS(Ni(RItassigntitertifs(RRJRKtif_((s&/usr/lib/python2.6/compiler/symbols.pytvisitGenExprForÿs

cCs|i|i|ƒdS(N(RIttest(RRJRK((s&/usr/lib/python2.6/compiler/symbols.pytvisitGenExprIfsicCs§x!|iD]}|i||ƒq
Wt|i|iƒ}|ipt|tƒo
d|_n||i|<|i	||i
ƒ|i|i|ƒ|i||ƒdS(Ni(
RNRIRCR
RRR5R7RHRORPRQRR(RRJRSR[RTRK((s&/usr/lib/python2.6/compiler/symbols.pytvisitLambdas


cCsLxE|D]=}t|ƒtijo|i||ƒq|i|ƒqWdS(N(ttypettypest	TupleTypeROR"(RRKtargsR	((s&/usr/lib/python2.6/compiler/symbols.pyROs
cCs|i|ƒ|iƒdS(N(R)R4(RRKRS((s&/usr/lib/python2.6/compiler/symbols.pyRRs
cCsð|i|iƒx!|iD]}|i||ƒqWt|i|iƒ}|ipt|tƒo
d|_n|i	dj	o|idƒn|idƒ||i|<|i}|i|_|i|i
|ƒ||_|i||ƒdS(Nit__doc__R<(RR	tbasesRIR6R
RR5R7tdocRRHRRQRR(RRJRSRTRKtprev((s&/usr/lib/python2.6/compiler/symbols.pyt
visitClass#s 



		cCs/|o|i|iƒn|i|iƒdS(N(RR	R(RRJRKR[((s&/usr/lib/python2.6/compiler/symbols.pyt	visitName:scCsa|i|i|dƒ|i|i|ƒ|i|i|ƒ|io|i|i|ƒndS(Ni(RIR[tlisttbodytelse_(RRJRK((s&/usr/lib/python2.6/compiler/symbols.pytvisitForBs

cCsFx?|iD]4\}}|djoq
n|i|p|ƒq
WdS(Nt*(R8R(RRJRKR	tasname((s&/usr/lib/python2.6/compiler/symbols.pyt	visitFromIs


cCs\xU|iD]J\}}|idƒ}|djo|| }n|i|p|ƒq
WdS(Nt.iÿÿÿÿ(R8tfindR(RRJRKR	RrR((s&/usr/lib/python2.6/compiler/symbols.pytvisitImportOs

cCs%x|iD]}|i|ƒq
WdS(N(R8R!(RRJRKR	((s&/usr/lib/python2.6/compiler/symbols.pytvisitGlobalVs
cCs>x$|iD]}|i||dƒq
W|i|i|ƒdS(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.
        iN(tnodesRIRX(RRJRKRT((s&/usr/lib/python2.6/compiler/symbols.pytvisitAssignZs
icCs|i|iƒdS(N(RR	(RRJRKR[((s&/usr/lib/python2.6/compiler/symbols.pytvisitAssNamekscCs|i|i|dƒdS(Ni(RIRX(RRJRKR[((s&/usr/lib/python2.6/compiler/symbols.pytvisitAssAttrnscCsA|i|i|dƒx$|iD]}|i||dƒq WdS(Ni(RIRXtsubs(RRJRKR[RT((s&/usr/lib/python2.6/compiler/symbols.pytvisitSubscriptqs
cCsb|i|i|dƒ|io|i|i|dƒn|io|i|i|dƒndS(Ni(RIRXtlowertupper(RRJRKR[((s&/usr/lib/python2.6/compiler/symbols.pyt
visitSlicevs


cCsZ|i|i|ƒt|itiƒo|i|i|dƒn|i|i|ƒdS(Ni(RIRJR5RtNameRX(RRJRK((s&/usr/lib/python2.6/compiler/symbols.pytvisitAugAssign}scCs¤x||iD]q\}}t|tiƒo2t|iƒ|ijo|ipq
qWq[n|i||ƒ|i||ƒq
W|io|i|i|ƒndS(N(	ttestsR5RtConstRctvaluet_const_typesRIRo(RRJRKR`Rn((s&/usr/lib/python2.6/compiler/symbols.pytvisitIf‰s


cCs d|_|i|i|ƒdS(Ni(RRIR…(RRJRK((s&/usr/lib/python2.6/compiler/symbols.pyt
visitYield–s	( RR<RRLtvisitExpressionRURVRZR_RaRbRORRRkRlRpRsRvRwRyRzR{R}R€R‚Rdt
StringTypetIntTypet	FloatTypeR†R‡Rˆ(((s&/usr/lib/python2.6/compiler/symbols.pyRGÓs4																
	
cCst|ƒt|ƒjS(N(tsorted(tl1tl2((s&/usr/lib/python2.6/compiler/symbols.pytlist_eqšst__main__(t	parseFiletwalkcCsjg}g}|iƒD]}||iƒq~D]1}|idƒp
|idƒp||q2q2~S(Ns_[Rt(tget_symbolstget_namet
startswith(tsymst_[1]t_[2]ts((s&/usr/lib/python2.6/compiler/symbols.pyR&¢s8itexectoopstskippingi(((6RgtcompilerRtcompiler.constsRRRRRt
compiler.miscRRdR,t
MANGLE_LENRR=R7R@RCR6RGRRR’R“tsymtableR&targvtfiletopentftreadtbuftcloseR—t	mod_namesttreeRšRHtnames2RtexitR%R#tvaluesR”tis_namespaceR˜R:R	R•tlRt
get_namespace(((s&/usr/lib/python2.6/compiler/symbols.pyt<module>sn(ž
Ç	
	
	
	

*

ACC SHELL 2018