ok

Mini Shell

Direktori : /proc/self/root/proc/self/root/usr/lib/python2.7/site-packages/ply/
Upload File :
Current File : //proc/self/root/proc/self/root/usr/lib/python2.7/site-packages/ply/cpp.pyc

�
��]Mc	@s�ddlmZdddddddd	d
f	ZdZd�Zd
ZdZdZd�ZeZ	dZ
d�Zd�Zd�Z
d�ZddlZddlZddlZddlZejd�Zi	dd6dd6dd6dd6d d!6d"d#6d$d%6d&d'6d(d)6Zd*�Zd+efd,��YZd-efd.��YZed/kr�ddljZej�ZddlZe ej!d0�Z"e"j#�Z$ee�Z%e%j&e$ej!d0�x/e'r�e%j(�Z)e)r�Pne%j*e)fGHq�WndS(1i����(t
generatorstCPP_IDtCPP_INTEGERt	CPP_FLOATt
CPP_STRINGtCPP_CHARtCPP_WStCPP_COMMENTt	CPP_POUNDt
CPP_DPOUNDs+-*/%|&~^<>=!?()[]{}.,;:\'"cCs"|jj|jjd�7_|S(s\s+s
(tlexertlinenotvaluetcount(tt((s+/usr/lib/python2.7/site-packages/ply/cpp.pytt_CPP_WSss\#s\#\#s[A-Za-z_][\w_]*cCs|S(sA(((((0x)|(0X))[0-9a-fA-F]+)|(\d+))([uU]|[lL]|[uU][lL]|[lL][uU])?)((R((s+/usr/lib/python2.7/site-packages/ply/cpp.pyR$ss?((\d+)(\.\d+)(e(\+|-)?(\d+))? | (\d+)e(\+|-)?(\d+))([lL]|[fF])?cCs"|jj|jjd�7_|S(s\"([^\\\n]|(\\(.|\n)))*?\"s
(R
RRR
(R((s+/usr/lib/python2.7/site-packages/ply/cpp.pytt_CPP_STRING.scCs"|jj|jjd�7_|S(s(L)?\'([^\\\n]|(\\(.|\n)))*?\'s
(R
RRR
(R((s+/usr/lib/python2.7/site-packages/ply/cpp.pyt
t_CPP_CHAR4scCs"|jj|jjd�7_|S(s(/\*(.|\n)*?\*/)|(//.*?\n)s
(R
RRR
(R((s+/usr/lib/python2.7/site-packages/ply/cpp.pyt
t_CPP_COMMENT:scCs4|jd|_|jd|_|jjd�|S(Nii(RttypeR
tskip(R((s+/usr/lib/python2.7/site-packages/ply/cpp.pytt_error?sNs\?\?[=/\'\(\)\!<>\-]t#t=s\t/t^t't[t(t]t)t|t!t{t<t}t>t~t-cCstjd�|�S(NcSst|j�dS(Ni����(t
_trigraph_reptgroup(tg((s+/usr/lib/python2.7/site-packages/ply/cpp.pyt<lambda>is(t
_trigraph_pattsub(tinput((s+/usr/lib/python2.7/site-packages/ply/cpp.pyttrigraphhstMacrocBseZded�ZRS(cCsG||_||_||_||_|r:|d|_nd|_dS(Ni����(tnameRtarglisttvariadictvarargtNonetsource(tselfR0RR1R2((s+/usr/lib/python2.7/site-packages/ply/cpp.pyt__init__|s				N(t__name__t
__module__R4tFalseR7(((s+/usr/lib/python2.7/site-packages/ply/cpp.pyR/{stPreprocessorcBs�eZdd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d�Zd	�Zdd
�Z
d�Zdd�Zd
�Zd�Zd�Zdid�Zd�ZRS(cCs�|dkrtj}n||_i|_g|_g|_|j�tj�}|j	dtj
d|��|j	dtj
d|��d|_dS(Ns
__DATE__ "%s"s%b %d %Ys
__TIME__ "%s"s%H:%M:%S(R4tlexR
tmacrostpatht	temp_pathtlexprobettimet	localtimetdefinetstrftimetparser(R6R
ttm((s+/usr/lib/python2.7/site-packages/ply/cpp.pyR7�s				
cCsMg}|jj|�x0trH|jj�}|s8Pn|j|�qW|S(N(R
R-tTruettokentappend(R6ttextttokensttok((s+/usr/lib/python2.7/site-packages/ply/cpp.pyttokenize�s	cCsd|||fGHdS(Ns%s:%d %s((R6tfiletlinetmsg((s+/usr/lib/python2.7/site-packages/ply/cpp.pyterror�scCs|jjd�|jj�}|s5|jdkr=dGHn|j|_|jjd�|jj�}|s�t|j�dkr�dGHn|j|_t|j�|_|jjd�|jj�}|s�|jdkr�dGHn|j|_	|jjd�|jj�}|s(|jdkr4d|_n|j|_|jjd	�|jj�}|su|jd	kr�d|_d
GHn|j|_|j|jf|_
ddd
ddddddg	}xO|D]G}|jj|�|jj�}|s
|j|kr�d|GHq�q�WdS(Nt
identifiers"Couldn't determine identifier typet12345i90sCouldn't determine integer types
"filename"sCouldn't determine string types  s
s%Couldn't determine token for newlinesR"R$Rs##s\RRt,t.s,Unable to lex '%s' required for preprocessor(R
R-RHRRtt_IDtintt	t_INTEGERtt_INTEGER_TYPEtt_STRINGR4tt_SPACEt	t_NEWLINEtt_WS(R6RLtcharstc((s+/usr/lib/python2.7/site-packages/ply/cpp.pyR@�sD	!
cCs|jj|�dS(N(R>RI(R6R>((s+/usr/lib/python2.7/site-packages/ply/cpp.pytadd_path�sc	csQ|jj�}g|j�D]}|j�^q}x~tt|��D]j}|d}xW||jd�r�|t|�kr�||d ||||<d||<|d7}qZWqGWdj|�}|j|�d|_	g}x\t
r>|j�}|s�Pn|j|�|j
|jkr�d|jkr�|Vg}q�q�W|rM|VndS(Nis\i����ts
(R
tclonet
splitlinestrstriptxrangetlentendswithtjoinR-RRGRHRIRR]R(	R6R-R<txtlinestitjtcurrent_lineRL((s+/usr/lib/python2.7/site-packages/ply/cpp.pytgroup_liness,%
(

		
!
cCs�d}x6|t|�kr>||j|jkr>|d7}q	W||4t|�d}x0|dkr�||j|jkr�|d8}qYW||d3|S(Nii(RfRR](R6RKRk((s+/usr/lib/python2.7/site-packages/ply/cpp.pyt
tokenstrip's+%c	Csg}g}g}d}t|�}d}x0||kr\||j|jkr\|d7}q-W||kr�||jdkr�|j|d�n*|j|j|djd�dggfS|d7}x||kr�||}|jdkr|j|�|d7}n�|jdkrx|d8}|dkrh|rW|j|j|��|j|�n|d||fS|j|�nX|jdkr�|dkr�|j|j|��|j|d�g}n
|j|�|d7}q�W|j|j|djd�dggfS(	NiiRsMissing '(' in macro argumentsRRTi����sMissing ')' in macro arguments(	RfRR]RRIRQR5RRo(	R6t	tokenlisttargst	positionstcurrent_argtnestingttokenlenRkR((s+/usr/lib/python2.7/site-packages/ply/cpp.pytcollect_argsCsD%





	
c	Cs�g|_g|_g|_d}xv|t|j�kr�|j|j|jkr�|j|j|jkr�|jj|j|j�}|dkr|j|djdkrt	j	|j|�|j|<|j
|j|_|j|d=|jj||df�q$q�|dkrb|j|djdkrb|jjd||df�|j|d=q$q�|dt|j�kr�|j|djdkr�|jjd||f�|d7}q$q�|jjd||f�n�|j|jdkr�|jr�|dkr�|j|djdkr�|dt|j�kr�|j|dj|jkr�|j|dj|j
kr�|jj|d�q�n|d7}q$W|jjdd	�d
t�dS(NiiRs##R_teRTtkeycSs|dS(Ni((Ri((s+/usr/lib/python2.7/site-packages/ply/cpp.pyR*�streverse(tpatcht	str_patchtvar_comma_patchRfRRRVR1tindextcopyRZRIR2R3tsortRG(R6tmacroRktargnum((s+/usr/lib/python2.7/site-packages/ply/cpp.pyt
macro_prescanxs:			2&&3
/6c
Cs�g|jD]}tj|�^q
}i}x�|jD]�\}}||kr�ddjg||D]}|j^qa�jdd�||<ntj||�||<||||_q5Wt}	|jr�|dr�x$|jD]}d||<t	}	q�Wni}
x�|j
D]}\}}}|dkr=|||||d+q
|dkr
||
kro|j||�|
|<n|
||||d+q
q
W|	r�g|D]}|r�|^q�}n|S(	Ns"%s"Ras\s\\i����R_iRw(RR~R{RhtreplaceR:R2R|R4RGRzt
expand_macros(
R6R�Rqt_xtrept
str_expansionR�RkRitcomma_patchtexpandedtptypet_i((s+/usr/lib/python2.7/site-packages/ply/cpp.pytmacro_expand_args�s.%@

"cCs�|dkri}nd}x�|t|�kr�||}|j|jkr�|j|jkr�|j|kr�t||j<|j|j}|js|jg|jD]}t	j	|�^q�|�}x|D]}|j
|_
q�W||||d+|t|�7}nq|d}	x6|	t|�krG||	j|jkrG|	d7}	qW||	jdkrv|j||	�\}
}}|j
r�t|�t|j�kr�|j|j|j
d|jt|j�f�|	|
}qv|j
r�t|�t|j�dkr�t|j�dkrK|j|j|j
d|jt|j�df�n3|j|j|j
d|jt|j�df�|	|
}qv|j
rt|�t|j�dkr�|jg�q||	|t|j�d|	|
d!|t|j�d<|t|j�3n|j||�}
|j|
|�}
x|
D]}|j
|_
q<W|
|||	|
+|t|
�7}n||j=qq�|jdkr�|j|_|j|j
�|_q�n|d7}qW|S(	NiiRsMacro %s requires %d argumentsis(Macro %s must have at least %d argumentss'Macro %s must have at least %d argumentt__LINE__(R4RfRRVRR=RGR1R�R~RR]RvR2RQR5RIR�RXRY(R6RKR�RkRtmR�texRwRlttokcountRqRrR�tr((s+/usr/lib/python2.7/site-packages/ply/cpp.pyR��s\	
!
	1

+%/
(63
	;

c	Cs"d}x{|t|�kr�||j|jkrv||jdkrv|d}t}d}x�|t|�kr:||j|jkr�|d7}q]n�||j|jkr�||j|jkr�d}nd}|s-Pq-nP||jdkr�t}n4||jdkrPn|j|j	||j
d�|d7}q]W|j||_|j|�||_||d|d5n|d7}q	W|j
|�}x�t|�D]�\}}|j|jkr�tj|�||<|j||_|jd�||_q�|j|jkr�tj|�||<t||j�||_x6||jd	d
krn||jd	 ||_q<Wq�q�Wdjg|D]}t|j�^q��}|jdd
�}|jdd�}|jdd�}yt|�}Wn4tk
r|j|j	|dj
d�d}nX|S(Nitdefinedit0Lt1LRRsMalformed defined()i����t0123456789abcdefABCDEFRas&&s and s||s or R s not sCouldn't evaluate expression(RfRRVRR:R]R=RGRQR5RRXRYR�t	enumerateR~tstrRhR�tevalt
StandardError(	R6RKRkRlt	needparentresultRRitexpr((s+/usr/lib/python2.7/site-packages/ply/cpp.pytevalexprs^)

		#+

ccs�t|�}|j|�}|s*d}n|jd|�||_g}t}t}g}x;|D]3}	x0t|	�D]"\}
}|j|jkrvPqvqvW|j	dkr�x<|	D]4}||jkr�d|j	kr�|j
|�q�q�W|j|	|
d�}|r*|dj	}
|j|d�}nd}
g}|
dkr�|r}x|j|�D]}|VqXWg}|j|�q}q�|
dkr�|r}x|j|�D]}|Vq�Wg}|j
d	}x|j|�D]}|Vq�W||j
d	<||_q}q�|
d
krI|r}x|j|�D]}|Vq!Wg}|j|�q}q�|
dkr�|j
||f�|r}|dj	|j
kr�t}t}q�t}q}q�|
dkr�|j
||f�|r}|dj	|j
kr�t}t}q�t}q}q�|
d
krJ|j
||f�|r}|j|�}|s>t}t}qGt}q}q�|
dkr�|r�|ddr�|ryt}q�|s�|j|�}|r�t}t}q�q�q�q}|j|j|djd�q�|
dkr6|r|ddr3|r�t}q|st}t}qq3q}|j|j|djd�q�|
dkr�|r]|j�\}}q}|j|j|djd�q�qc|rc|j|	�qcqcWx|j|�D]}|Vq�Wg}dS(NRas
__FILE__ "%s"Rs
iiRCtincludet__FILE__tundeftifdeftifndeftiftelifi����sMisplaced #eliftelsesMisplaced #elsetendifsMisplaced #endif(R.RnRCR5RGR:R�RR]RRIRoR�R=R�R�R�RQRtpoptextend(R6R-R5RRjtchunktenablet	iftriggertifstackRiRkRLt	dirtokensR0RqtoldfileR�((s+/usr/lib/python2.7/site-packages/ply/cpp.pytparsegenRs�		


		
	
					 	  	ccs|s
dS|r=|djdkrK|dj|jkrK|j|�}n|djdkr�d}x@|t|�kr�||jdkr�Pn|d7}qgWdGHdSdjg|d|!D]}|j^q��}|jdg|j}q=|dj|jkr1|djdd!}|jdg|j}q=dGHdSnx�|D]�}tjj||�}y}t	|d	�j
�}tjj|�}	|	r�|jjd|	�nx|j
||�D]}
|
Vq�W|	r�|jd=nPWqDtk
r�qDXqDWd
|GHdS(NiR"iR$sMalformed #include <...>Rai����sMalformed #include statementR�sCouldn't find '%s'(RRRZR�RfRhR>R?tostopentreadtdirnametinsertR�tIOError(R6RKRkRitfilenameR>tptinametdatatdnameRL((s+/usr/lib/python2.7/site-packages/ply/cpp.pyR��sF),
	

cCskt|ttf�r'|j|�}n|}y!|d}t|�dkrY|d}nd}|s�t|jg�}||j|j<n�|j	|j
kr�t|j|j|d��}||j|j<n|jdkrH|j|d�\}}}t
}	xK|D]}
|	rdGHPndjg|
D]}t|j�^q(�}|dkr�t}	|j|
d_	d|
d_t}	|
d3qnk|d	dkr�|
dj	|jkr�t}	|
d3|
djd	dkr|
djd	 |
d_qqnt|
�dks|
dj	|jkrd
GHPqqW|j|d|�}
d}x�|t|
�kr�|dt|
�kr�|
|j	|j
kr�|
|djdkr�|
|=qHq�|
|jdkr�|
|dj	|j
kr�|
|d=q�n|d7}qHWt|j|
g|D]}|dj^q	|	�}|j|�||j|j<ndGHWntk
rfdGHnXdS(
NiiiRs0No more arguments may follow a variadic argumentRas...t__VA_ARGS__i����sInvalid macro arguments##sBad macro definition(t
isinstanceR�tunicodeRMRfR4R/RR=RR]RoRvR:RhRGRVR�tLookupError(R6RKtlinetokR0tmtypeR�R�RqRrR2taR�tastrtmvalueRkRi((s+/usr/lib/python2.7/site-packages/ply/cpp.pyRCsl


+
&(--2
	
cCs3|dj}y|j|=Wntk
r.nXdS(Ni(RR=R�(R6RKtid((s+/usr/lib/python2.7/site-packages/ply/cpp.pyR�Ks


cCs"||_|j||�|_dS(N(tignoreR�RE(R6R-R5R�((s+/usr/lib/python2.7/site-packages/ply/cpp.pytparseWs	cCsXy6x/tr4t|j�}|j|jkr|SqWWntk
rSd|_dSXdS(N(RGtnextRERR�t
StopIterationR4(R6RL((s+/usr/lib/python2.7/site-packages/ply/cpp.pyRH`s	
	N(R8R9R4R7RMRQR@R`RnRoRvR�R�R�R�R�R�RCR�R�RH(((s+/usr/lib/python2.7/site-packages/ply/cpp.pyR;�s$			<		!		5	+	2B	;�	1	F		t__main__i(+t
__future__RRKtliteralsRtt_CPP_POUNDtt_CPP_DPOUNDtt_CPP_IDRt
t_CPP_INTEGERtt_CPP_FLOATRRRRtreR~RAtos.pathR�tcompileR+R'R.tobjectR/R;R8tply.lexR<R
tsysR�targvtfR�R-R�R�RGRHRLR5(((s+/usr/lib/python2.7/site-packages/ply/cpp.pyt<module>
s\!						
	���	

Zerion Mini Shell 1.0