ok

Mini Shell

Direktori : /proc/self/root/opt/alt/python35/lib64/python3.5/__pycache__/
Upload File :
Current File : //proc/self/root/opt/alt/python35/lib64/python3.5/__pycache__/sre_parse.cpython-35.opt-1.pyc



C�Ma-��@s�dZddlTdZdZed�Zed�Zed�Zed�Zed	�Z	ee
eh�Zee
eeeeeh�Zd
eed�fdeed
�fdeed�fdeed�fdeed�fdeed�fdeed�fdeed�fiZdeefdeefdeefdeeefgfdeeefgfdeeefgfdeeefgfd eeefgfd!eeefgfd"ee fi
Z!d#e"d$e#d%e$d&e%d'e&d(e'd)e(d*e)iZ*Gd+d,�d,�Z+Gd-d.�d.�Z,Gd/d0�d0�Z-d1d2�Z.d3d4�Z/d5d6�Z0d7d8�Z1d9d:�Z2d;d<�Z3d=d>�Z4d?d@�Z5dAdB�Z6ddCdDdE�Z7dFdG�Z8dHdI�Z9dCS)JzInternal support module for sre�)�*z.\[{()*+?^$|z*+?{�
0123456789Z01234567Z0123456789abcdefABCDEFZ4abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZz 	

z\a�z\b�z\f�z\n�
z\r�
z\t�	z\v�z\\�\z\Az\Bz\dz\Dz\sz\Sz\wz\Wz\Z�i�L�m�s�x�a�t�uc@saeZdZdd�Zedd��Zddd�Zdd	�Zd
d�Zdd
�Z	dS)�PatterncCs+d|_i|_dg|_d|_dS)Nr)�flags�	groupdict�groupwidths�lookbehindgroups)�self�r�./opt/alt/python35/lib64/python3.5/sre_parse.py�__init__Fs		zPattern.__init__cCs
t|j�S)N)�lenr)rrrr�groupsKszPattern.groupsNcCs�|j}|jjd�|jtkr4td��|dk	r�|jj|d�}|dk	rztd|||f��||j|<|S)Nztoo many groupsz7redefinition of group name %r as group %d; was group %d)rr�append�	MAXGROUPS�errorr�get)r�name�gid�ogidrrr�	opengroupNs	
zPattern.opengroupcCs|j�|j|<dS)N)�getwidthr)rr$�prrr�
closegroupZszPattern.closegroupcCs ||jko|j|dk	S)N)rr)rr$rrr�
checkgroup\szPattern.checkgroupcCsO|jdk	rK|j|�s-|jd��||jkrK|jd��dS)Nzcannot refer to an open groupz?cannot refer to group defined in the same lookbehind subpattern)rr*r!)rr$�sourcerrr�checklookbehindgroup_s
zPattern.checklookbehindgroup)
�__name__�
__module__�__qualname__r�propertyrr&r)r*r,rrrrrDsrc@s�eZdZddd�Zddd�Zdd�Zd	d
�Zdd�Zd
d�Zdd�Z	dd�Z
dd�Zdd�ZdS)�
SubPatternNcCs1||_|dkrg}||_d|_dS)N)�pattern�data�width)rr2r3rrrris
		zSubPattern.__init__rcCsd}ttf}x�|jD]�\}}t|dt|�dd�|tkr�t�x�|D]+\}}t|ddt|�|�q`Wq|tkr�t�xTt|d�D]5\}}|r�t|dd�|j|d�q�Wq|t	krW|\}}	}
td|�|	j|d�|
r�t|dd�|
j|d�qt
||�r�d}xp|D]h}t
|t�r�|s�t�|j|d�d}qs|s�td	dd�t|dd�d}qsW|s�t�qtd|�qWdS)
NTz  �end���OR�ELSEF� )�tuple�listr3�print�str�IN�BRANCH�	enumerate�dump�GROUPREF_EXISTS�
isinstancer1)r�level�nl�seqtypes�op�avrr�	condgroup�item_yes�item_norrrrBosH&

	

zSubPattern.dumpcCs
t|j�S)N)�reprr3)rrrr�__repr__�szSubPattern.__repr__cCs
t|j�S)N)rr3)rrrr�__len__�szSubPattern.__len__cCs|j|=dS)N)r3)r�indexrrr�__delitem__�szSubPattern.__delitem__cCs1t|t�r&t|j|j|�S|j|S)N)rD�slicer1r2r3)rrPrrr�__getitem__�szSubPattern.__getitem__cCs||j|<dS)N)r3)rrP�coderrr�__setitem__�szSubPattern.__setitem__cCs|jj||�dS)N)r3�insert)rrPrTrrrrV�szSubPattern.insertcCs|jj|�dS)N)r3r)rrTrrrr�szSubPattern.appendc	Cs�|jdk	r|jSd}}x5|jD]*\}}|tkr�td}d}xB|dD]6}|j�\}}t||�}t||�}q]W||}||}q*|tkr�|j�\}}||}||}q*|tkr|dj�\}}||}||}q*|t	kre|dj�\}}|||d}|||d}q*|t
kr�|d}|d}q*|tkr�|jj
|\}}||}||}q*|tkrG|dj�\}}|ddk	r*|dj�\}}t||�}t||�}nd}||}||}q*|tkr*Pq*Wt|td�t|t�f|_|jS)Nrr7�)r4r3r@�	MAXREPEATr'�min�max�CALL�
SUBPATTERN�_REPEATCODES�
_UNITCODES�GROUPREFr2rrC�SUCCESS)	r�lo�hirHrIr�j�l�hrrrr'�sZ













%zSubPattern.getwidth)
r-r.r/rrBrNrOrQrSrUrVrr'rrrrr1gs(r1c@seZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
ddd�ZdS)�	TokenizercCs\t|t�|_||_|js3t|d�}||_d|_d|_|j�dS)N�latin1r)rDr>�istext�string�decoded_stringrP�next�_Tokenizer__next)rrirrrr�s					zTokenizer.__init__cCs�|j}y|j|}Wntk
r;d|_dSYnX|dkr�|d7}y||j|7}Wn7tk
r�td|jt|j�d�d�YnX|d|_||_dS)Nrr7zbad escape (end of pattern))rPrj�
IndexErrorrkr!rir)rrP�charrrr�__next�s	
		

$
zTokenizer.__nextcCs!||jkr|j�dSdS)NTF)rkrl)rrnrrr�match�s
zTokenizer.matchcCs|j}|j�|S)N)rkrl)r�thisrrrr"�s	
z
Tokenizer.getcCsKd}x>t|�D]0}|j}||kr/P||7}|j�qW|S)Nr6)�rangerkrl)r�n�charset�result�_�crrr�getwhile�s	
zTokenizer.getwhilecCs�d}x�|j}|j�|dkrY|s=|jd��|jd|t|���||kr~|s}|jdd��P||7}q	W|S)Nr6zmissing group namezmissing %s, unterminated namer7)rkrlr!r)r�
terminatorrurwrrr�getuntils	

zTokenizer.getuntilcCs|jt|jpd�S)Nr6)rPrrk)rrrr�tellszTokenizer.tellcCs||_|j�dS)N)rPrl)rrPrrr�seeks	zTokenizer.seekrcCst||j|j�|�S)N)r!rir{)r�msg�offsetrrrr!szTokenizer.errorN)r-r.r/rrlrpr"rxrzr{r|r!rrrrrf�s		rfcCsdddl}|jdtdd�d|ko9dknpcd|koUdknpc|d	kS)
Nrz*sre_parse.isident() will be removed in 3.5�
stacklevelrWr�z�A�Zrv)�warnings�warn�DeprecationWarning)rnr�rrr�isident s	
r�cCs:ddl}|jdtdd�d|ko7dkSS)Nrz*sre_parse.isdigit() will be removed in 3.5rrW�0�9)r�r�r�)rnr�rrr�isdigit&s	
r�cCssddl}|jdtdd�t|d�s6dSx6|dd�D]$}t|�rGt|�rGdSqGWdS)Nrz)sre_parse.isname() will be removed in 3.5rrWFr7T)r�r�r�r�r�)r#r�rnrrr�isname,s	
r�cCs�tj|�}|r|Stj|�}|rB|dtkrB|SyX|dd�}|dkr�||jdt�7}t|�dkr�|jd|t|���tt	|dd�d�fS|dkr8|j
r8||jdt�7}t|�d	kr|jd|t|���tt	|dd�d�fS|d
kr�|j
r�||jdt�7}t|�dkr�|jd|t|���t	|dd�d�}t|�t|fS|tkr+||jdt�7}t	|dd�d�}|d
kr!|jd|t|���t|fS|t
kr=t�t|�dkr�|tkr�ddl}|jd|td|d	�tt|d�fSWntk
r�YnX|jd|t|���dS)Nrr7rWr�zincomplete escape %s�r��U��
�z.octal escape value %s outside of range 0-0o377z
bad escape %sr)�ESCAPESr"�
CATEGORIESr?rx�	HEXDIGITSrr!�LITERAL�intrh�chr�	OCTDIGITS�DIGITS�
ValueError�ASCIILETTERSr�r�r��ord)r+�escape�nestedrTrwr�rrr�
_class_escape8sV

	


r�cCs�tj|�}|r|Stj|�}|r2|SyK|dd�}|dkr�||jdt�7}t|�dkr�|jd|t|���tt|dd�d�fS|dkr(|j	r(||jdt�7}t|�dkr|jd|t|���tt|dd�d�fS|d	kr�|j	r�||jd
t�7}t|�dkr�|jd|t|���t|dd�d�}t
|�t|fS|dkr�||jdt�7}tt|dd�d
�fS|tkr |j
tkr�||j�7}|dtkr�|dtkr�|j
tkr�||j�7}t|dd�d
�}|d
kr�|jd|t|���t|fSt|dd��}||jkr|j|�s�|jdt|���|j||�t|fS|jdt|���t|�dkr||tkrhddl}|jd|td|d�tt|d�fSWntk
r�YnX|jd|t|���dS)Nr7rWrr�zincomplete escape %sr�rr�r�r�r�r�r�z.octal escape value %s outside of range 0-0o377zcannot refer to an open groupzinvalid group referencerz
bad escape %sr)r�r"r�rxr�rr!r�r�rhr�r�r�rkrr*r,r_r�r�r�r�r�r�)r+r��stater�rTrw�groupr�rrr�_escapejsr

 	
	


r�cCslg}|j}|j}|j�}x+|t|||d��|d�s'Pq'Wt|�dkrl|dSt|�}|j}xrd}	xd|D]7}
|
s�P|	dkr�|
d}	q�|
d|	kr�Pq�Wx|D]
}
|
d=q�W||	�q�Pq�WxV|D]-}
t|
�dks)|
ddtk	r�Pq�W|tdd�|D�f�|S|jtd|ff�|S)Nr7�|rcSsg|]}|d�qS)rr)�.0�itemrrr�
<listcomp>�s	z_parse_sub.<locals>.<listcomp>)	rrpr{�_parserr1r�r?r@)r+r�r��items�itemsappend�sourcematch�start�
subpattern�subpatternappend�prefixr�rrr�
_parse_sub�sB			




&r�cCs�t|||d�}|jd�r\t|||d�}|jdkrb|jd��nd}t|�}|jt|||ff�|S)Nr7r�z/conditional backref with more than two branches)r�rprkr!r1rrC)r+r�rJr�rKrLr�rrr�_parse_sub_cond�sr�c#Cs�
t|�}|j}|j}|j}t}t}|jt@}	x�
|j}
|
dkrYP|
dkrfP|�|	r�|
t	kr�qC|
dkr�x&|�}
|
dks�|
dkr�Pq�WqC|
ddkr�t
||
||d�}||�qC|
tkr|t||
�f�qC|
dkrJ|j
�d}g}
|
j}|d�r\|tdf�|
dd�}x<|�}
|
dkr�|jd	|j
�|��|
d
kr�|
|kr�Pn;|
ddkr�t||
|d�}nt||
�f}|d�r|�}|dkr4|jd	|j
�|��|d
kr|dtkr^|dd}||�|t|d�f�P|ddkr�t|||d�}nt||�f}|dtks�|dtkrd|
|f}|j|t|
�dt|���|d}|d}||krfd|
|f}|j|t|
�dt|���|t||ff�qo|dtkr�|dd}||�qoW||
�dkr�|
ddtkr�||
d�q�
||
�d
kr7|
ddtkr7|
ddtkr7|t|
ddf�q�
|t|
f�qC|
tkr|j
�}|
dkr}d4\}}n�|
dkr�dt}}n�|
dkr�dt}}nj|
dkr|jdkr�|t||
�f�qCdt}}d}}x |jtkr"||�7}qW|d�rUx)|jtkrQ||�7}q2Wn|}|d�s�|t||
�f�|j|�qC|r�t|�}|tkr�td��|rt|�}|tkr�td��||kr|jd|j
�|��ntd|f��|r8|d5d�}nd}|sk||�dkr�|ddtkr�|jd|j
�|t|
���|ddtkr�|jd|j
�|t|
���|d�r�t|||ff|d6<q�
t|||ff|d7<qC|
dkr.|tdf�qC|
dkr�
|j
�d}d}d}d}|d�r�|�}|dkr�|jd��|dkr	|d�r�|j d �}|j!�s	d!|}|j|t|�d��q�|d"�r�|j d#�}|j!�s5d!|}|j|t|�d��|j"j|�}|dkryd$|}|j|t|�d��|j#|�s�|jd%t|�d��|j$||�|t%|f�qCq�|�}|dkr�|jd��|jd&|t|�d
��n}|d'kr&	d}nh|dkrz	x?|jdkr`	|jd(|j
�|��|�d#kr5	Pq5	WqCn|d)kr�
d}|dkr
|�}|dkr�	|jd��|d*kr�	|jd+|t|�d
��d8}|j&}|dkr
|j'|_&t(|||d�} |dkrF
|dkrF
d|_&|d#�sn
|jd,|j
�|��|d"kr�
|t)|| ff�qC|t*|| ff�qCn�|dkr�|j d#�}!d}|!j!�r#|j"j|!�}|dkr�d$|!}|j|t|!�d��n�y"t|!�}|dkrDt+�Wn;t+k
r�d!|!}|j|t|!�d�d�YnX|s�|jd-t|!�d��|t,kr�|jd.t|!�d��|j$||�n�|t-krnxl|jt-|O_|�}|dkr&|jd/��|d#kr3P|t-kr�|jd0t|���q�W|jt@}	qCn |jd1|t|�d��|dk	r�y|j.|�}WnGtk
r�}"z'|j|"j/t|�d�d�WYdd}"~"XnX|r
t0||||d�} nt(|||d�} |jd#�sZ
|jd,|j
�|��|dk	rv
|j1|| �|t2|| ff�qC|
dkr�
|tt3f�qC|
d2kr�
|jtt4f�qCtd3|f��qCW|S)9Nz|)�#rrrr7�[�^zunterminated character set�]�-zbad character range %s-%srW�?r�+�{�}r6�,z"the repetition number is too largez"min repeat greater than max repeatzunsupported quantifier %rznothing to repeatzmultiple repeat�.�(Tzunexpected end of pattern�P�<�>zbad character in group name %r�=�)zunknown group name %rzcannot refer to an open groupzunknown extension ?P�:zmissing ), unterminated commentz=!<z=!zunknown extension ?<z"missing ), unterminated subpatternzbad group numberzinvalid group referencez	missing )zunknown flagzunknown extension ?�$z unsupported special character %r)rr7���r�r�r�)5r1rr"rprr�r�SRE_FLAG_VERBOSErk�
WHITESPACEr��
SPECIAL_CHARSr�r{�NEGATEr!r�r?�RANGE�NOT_LITERAL�REPEAT_CHARSrXr�r|r��
OverflowError�AssertionError�ATr]�
MIN_REPEAT�
MAX_REPEAT�ANYrz�isidentifierrr*r,r_rrr��ASSERT�
ASSERT_NOTr�r �FLAGSr&r}r�r)r\�AT_BEGINNING�AT_END)#r+r�r�r�r��	sourcegetr��_len�_ord�verboserqrT�here�set�	setappendr��code1�that�code2r}rarbrYrZrnr�r�r#rJr$�dirrr(�condname�errrrrr��s�			
		
					
 &

&&:


	-			


		
			
			



$			

5	r�cCs�t|t�rk|t@r;ddl}|jdtdd�|t@sR|tO}q�|t@r�td��nL|t@r�td��|t@r�|t@r�ddl}|jdtdd�|S)NrzELOCALE flag with a str pattern is deprecated. Will be an error in 3.6rr�z(ASCII and UNICODE flags are incompatiblez,cannot use UNICODE flag with a bytes patternz@ASCII and LOCALE flags are incompatible. Will be an error in 3.6)	rDr>�SRE_FLAG_LOCALEr�r�r��SRE_FLAG_ASCII�SRE_FLAG_UNICODEr�)�srcrr�rrr�	fix_flagss 
	




	
r�NcCs�t|�}|dkr!t�}||_||_t||d�}t||jj�|j_|jdk	r~|jd��|t	@r�|jjt	@r�t
||jj�S|t@r�|j�|S)Nrzunbalanced parenthesis)
rfrrr>r�r�r2rkr!r��parse�SRE_FLAG_DEBUGrB)r>rr2r+r(rrrr�3s			

r�c
s�t|�}|j}g�g�g��j}���fdd�}|j}x|�}|dkrjP|ddkrN|d}|dkr�d}	|jd�s�|jd	��|jd
�}	|	j�ry||	}
Wq�tk
rt	d|	��Yq�Xn�y"t
|	�}
|
dkr&t�Wn5tk
r^|jd|	t|	�d�d�YnX|
t
kr�|jd
t|	�d��||
�qX|dkr|jtkr�||�7}|jtkr�||�7}|tt
|dd�d�d@��qX|tkr�d}|jtkr�||�7}|tkr�|dtkr�|jtkr�||�7}d}t
|dd�d�}|dkr�|jd|t|���|t|��|sK|t
|dd���qXytt|d�}WnDtk
r@|tkr<ddl}|jd|tdd�YnX||�qT||�qTW�rx�jdj���t|t�s�dd��D����fS)NcsS�r)�jdj����dd�=�jt��|f��jd�dS)Nr6)r�joinr)rP)r�literal�literalsrr�addgroupWs

z parse_template.<locals>.addgrouprrr7�gr6r�z	missing <r�zunknown group name %rzbad character in group name %rzinvalid group referencer�r�r�FrWTz.octal escape value %s outside of range 0-0o377z
bad escape %srr�cSs1g|]'}|dkrdn|jd��qS)Nzlatin-1)�encode)r�rrrrr��s	z"parse_template.<locals>.<listcomp>)rfr"r�
groupindexrpr!rzr��KeyErrorrmr�r�rr rkr�r�r�r�r�r�r�r�r�rDr>)
r+r2r�sget�lappendr�r�rqrwr#rP�isoctalr�r)rr�r�r�parse_templateNs�				




	


*

	


r�cCs�|j}|jdd�}|\}}|dd�}y1x*|D]"\}}||�p]|||<qBWWntk
r�td��YnX|j|�S)Nrzinvalid group reference)r�rirmr!r�)�templaterpr��emptyrr�rPr�rrr�expand_template�s	
r�):�__doc__�
sre_constantsr�r��	frozensetr�r�r�r�r�r�r�r]r�r�r?r�r��CATEGORYr^r�r�r�ZAT_BEGINNING_STRINGZAT_BOUNDARYZAT_NON_BOUNDARYZCATEGORY_DIGITZCATEGORY_NOT_DIGITZCATEGORY_SPACEZCATEGORY_NOT_SPACEZ
CATEGORY_WORDZCATEGORY_NOT_WORDZ
AT_END_STRINGr��SRE_FLAG_IGNORECASEr��SRE_FLAG_MULTILINE�SRE_FLAG_DOTALLr�r��SRE_FLAG_TEMPLATEr�r�rr1rfr�r�r�r�r�r�r�r�r�r�r�r�rrrr�<module>sh
#qH2C2�3U

Zerion Mini Shell 1.0