Your IP : 18.223.172.243


Current Path : /lib64/python3.8/__pycache__/
Upload File :
Current File : //lib64/python3.8/__pycache__/sre_compile.cpython-38.pyc

U

e5dGh�@s$dZddlZddlZddlTejeks.td��eehZe	e
ehZe
ehZeehZeeehBZdZdd�eD�Zejfdd	�Zd
d�Zdd
�Zd-dd�ZejdZde>dZdZ ee!fdd�Z"dd�Z#dd�Z$dd�Z%dd�Z&dd�Z'dd �Z(d!d"�Z)d#d$�Z*d%d&�Z+d'd(�Z,d)d*�Z-d.d+d,�Z.dS)/zInternal support module for sre�N)�*zSRE module mismatch))�ii1)�si)�i�)iEi�i�)i�i�)i�i�)i�i�)i�i�)i�i�)i�i�)i�i�)i�i�)i�i�)i�i�)iai�)i�i�cs.i|]&}|D]��t�fdd�|D���qqS)c3s|]}�|kr|VqdS�N�)�.0�j��ir�#/usr/lib64/python3.8/sre_compile.py�	<genexpr>>sz<dictcomp>.<genexpr>)�tuple)r�trr
r�
<dictcomp>>s
�rcCs ||@r||M}||B|@Srr)�flags�	add_flags�	del_flags�
TYPE_FLAGSrrr�_combine_flagsAs
rcCs�|j}t}t}t}t}t}d}	d}
d}|t@r\|t@s\|t@rPt	j
}	t	j}
t}nt	j
}	t	j}
|D�]|\}}
||k�rr|t@s�||�||
�n�|t@r�|t|�||
�n�|	|
�s�||�||
�n�|
|
�}|s�|t|�||�n�||k�r|t|�||�nh|t�||�}|d�|tk�r2|t�|f||D]}|t�||��q@|t�||�|||<q`|tk�rt|
|	|
|�\}}|t@�r�|t@�r�|t�n(|�s�|t�n|�s�|t�n|t�||�}|d�t|||�||�|||<q`|tk�r*|t@�r |t�n|t�q`||k�r6|t@�rLt d|f��t!|
d��r�|t"k�rn|t#�n|t$�||�}|d�||
d�||
d�t%||
d|�|t&�||�|||<nl|t'�||�}|d�||
d�||
d�t%||
d|�||�|||<|t"k�r,|t(�n|t)�q`|t*k�r�|
\}}}}|�rj|t+�||dd�t%||t,|||��|�r�|t+�||ddd�q`||k�r�||�q`||k�rD||�||�}|d�|
ddk�r�|d�n*|
d�-�\}}||k�rt d��||�t%||
d|�|t&�||�|||<q`|t.k�r�||�||�}|d�t%||
|�|t&�||�|||<q`|t/k�r�||�|t0@�r�t1�2|
|
�}
|t@�r�t3�2|
|
�}
n|t@�r�t4�2|
|
�}
||
�q`|t5k�r�||�g}|j}|
dD]N}
||�}|d�t%||
|�|t6�|||��|d�||�|||<�q|t�|D]}||�|||<�qlq`|t7k�r�||�|t@�r�t8|
}
n|t@�r�t9|
}
||
�q`|t:k�r |t@�s�||�n,|t@�r�|t;�n|�s
|t<�n|t=�||
d�q`|t>k�r�||�||
dd�||�}|d�t%||
d|�|
d�r�|t6�||�}|d�||�|d||<t%||
d|�||�|||<n||�|d||<q`t d|f��q`dS)Nrz*internal: unsupported template operator %r��z(look-behind requires fixed-width patternz%internal: unsupported operand type %r)?�append�len�_LITERAL_CODES�_REPEATING_CODES�_SUCCESS_CODES�
_ASSERT_CODES�SRE_FLAG_IGNORECASE�SRE_FLAG_LOCALE�SRE_FLAG_UNICODE�_sre�unicode_iscased�unicode_tolower�_ignorecase_fixes�
ascii_iscased�
ascii_tolower�OP_LOCALE_IGNORE�	OP_IGNORE�OP_UNICODE_IGNORE�
IN_UNI_IGNORE�NOT_LITERAL�NEGATE�LITERAL�FAILURE�IN�_optimize_charset�
IN_LOC_IGNORE�	IN_IGNORE�_compile_charset�ANY�SRE_FLAG_DOTALL�ANY_ALL�SRE_FLAG_TEMPLATE�error�_simple�
MAX_REPEAT�
REPEAT_ONE�MIN_REPEAT_ONE�_compile�SUCCESS�REPEAT�	MAX_UNTIL�	MIN_UNTIL�
SUBPATTERN�MARKr�getwidth�CALL�AT�SRE_FLAG_MULTILINE�AT_MULTILINE�get�	AT_LOCALE�
AT_UNICODE�BRANCH�JUMP�CATEGORY�	CH_LOCALE�
CH_UNICODE�GROUPREF�GROUPREF_LOC_IGNORE�GROUPREF_IGNORE�GROUPREF_UNI_IGNORE�GROUPREF_EXISTS)�code�patternr�emit�_len�
LITERAL_CODES�REPEATING_CODES�
SUCCESS_CODES�ASSERT_CODES�iscased�tolower�fixes�op�av�lo�skip�k�charset�hascased�grouprr�p�hi�tail�
tailappend�skipyes�skipnorrrr=GsV
















































r=cCs�|j}|D]�\}}||�|tkr$q
|tkr6||�q
|tksF|tkr`||d�||d�q
|tkrt|�|�q
|tkr�|�|�q
|tkr�|t	@r�|t
|�q�|t@r�|t|�q�||�q
t
d|f��q
|t�dS)Nrrz%internal: unsupported set operator %r)rr,r-�RANGE�RANGE_UNI_IGNORE�CHARSET�extend�
BIGCHARSETrNrrOr rPr8r.)rfrrVrXrarbrrrr3�s,

r3c	Cs�g}g}td�}d}|D�]�\}}	�z,|tkr�|rv||	�}
d||
<|rd|
|krd||
D]}d||<qV|s~||	�r~d}nd||	<n�|tk�r&t|	d|	dd�}|�r|r�t||�D]*}
d||
<|
|kr�||
D]}d||<q�q�nt||�D]}
d||
<q�|�s$tt||��}n|D]}
d||
<�qn(|tk�r@|�||	f�n|�||	f�WnZtk
�r�t	|�dk�r�|dd7}Yq"|�r�d}|tk�r�t
}|�||	f�YnXqq"qg}d}|�d|�}|dk�rԐq(t	|�dk�r�d}�q(|�d|�}|dk�r|�|t	|�f��q(|�||f��q�|dk	�r�|D]>\}}||dk�r\|�t|f�n|�t||dff��q6||7}|�s�t	|�t	|�k�r�||fS||fSt	|�dk�r�t|�}|�t
|f�||7}||fSt|�}i}td�}d}t�}tdd	d�D]V}
||
|
d�}||k�r4||||
d<n$|||
d<||<|d7}||7}�qt|�}|gt|�|dd�<|�t|f�||7}||fS)
N�FrTr�i�ri)�	bytearrayr-ro�range�map�anyr,r�
IndexErrorrrp�find�
_mk_bitmaprq�bytes�_bytes_to_codesrs)rfr^�fixupr`�outrk�charmaprgrarbrcre�rr�runs�qri�data�comps�mapping�block�chunkrrrr0s�









r0�rs0111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111cs8|�t�ddd�����fdd�tt��d��D�S)N���cs"g|]}��|�|�d��qS)rr)rr��	_CODEBITS�_int�srr�
<listcomp>�s�z_mk_bitmap.<locals>.<listcomp>r)�	translate�_BITS_TRANSrwr)�bitsr�r�rr�rr|�s�r|cCs@t|��d�}|jtjkst�t|�|jt|�ks8t�|��S)N�I)�
memoryview�cast�itemsizer!�CODESIZE�AssertionErrorr�tolist)�b�arrrr~�sr~cCsDt|�dkrdS|d\}}|tkr<|ddko:t|d�S|tkS)NrFrr�)rrBr9�_UNIT_CODES)rirarbrrrr9�sr9cCsndgt|�}tdt|��D]L}||d}||||kr\|dkrNd||<q||d}q,|d||<q|S)aj
    Generate an overlap table for the following prefix.
    An overlap table is a table of the same size as the prefix which
    informs about the potential self-overlap for each index in the prefix:
    - if overlap[i] == 0, prefix[i:] can't overlap prefix[0:...]
    - if overlap[i] == k with 0 < k <= i, prefix[i-k+1:i+1] overlaps with
      prefix[0:k]
    rr)rrw)�prefix�tabler�idxrrr�_generate_overlap_table�s	r�cCs$|t@sdS|t@rtjStjSdSr)rr r!r"r%)rrrr�_get_iscased�s
r�cCs�g}|j}d}t|�}|jD]�\}}|tkrF|r<||�r<q�||�q|tkr�|\}}	}
}t||	|
�}|t@rz|t@rzq�t||�\}
}}|dkr�|dk	r�t	|�}n|dk	r�t	|�|}|�
|
�|s�q�qq�q||dfS||dfS)NTF)rr�r�r-rBrrr�_get_literal_prefixrrr)rWrr��prefixappend�prefix_skipr^rarbrhrrri�flags1�prefix1�prefix_skip1�got_allrrrr��s4



r�cCsd|js
dS|jd\}}|tk	r"qP|\}}}}t|||�}|t@r|t@rdSqt|�}|tkrz|rp||�rpdS||fgS|tkr�g}|j}	|dD]B}
|
s�dS|
d\}}|tkr�|r�||�s�|	||f�q�dSq�|S|t	k�r`|}|�r\|D]f\}}|tk�r||��rZdSq�|t
kr�|ddk�r4dStt|t
|d|dd���r�dSq�|SdS)Nrri��)r�rBrrrr�r-rLrr/roryrxrw)rWrrarbrhrrr^rf�
charsetappendrirrr�_get_charset_prefix�sN



 r�c
Cs||��\}}|tkrt}|dkr8|�tdd||g�dSg}d}g}|t@rT|t@srt||�\}}}|srt||�}|j}	|	t�t	|�}
|	d�d}|r�t
}|dkr�|r�|tB}n|r�|tB}|	|�|tkr�|	|�n|	t�|dt�}|	t
|t��|�r@|	t	|��|dk�rt	|�}|	|�|�|�|�t|��n(|�rht|�\}}|�r\t�t|||�t	|�|
||
<dS)Nr�)rD�MAXCODErr�INFOrrr�r�rr�SRE_INFO_PREFIX�SRE_INFO_LITERAL�SRE_INFO_CHARSET�minr�r0r�r3)
rVrWrrcrjr�r�rfr�rXrd�maskrgrrr�
_compile_infosT





r�cCst|ttf�Sr)�
isinstance�strr})�objrrr�isstringSsr�cCs8|jj|B}g}t|||�t||j|�|�t�|Sr)�staterr�r=r�rr>)rirrVrrr�_codeVs
r�cCsdd�dd�|D��S)N�[%s]�, css$|]}dtjdd|fVqdS)z%#0*xrN)r!r��r�xrrrr
fsz_hex_code.<locals>.<genexpr>)�join�rVrrr�	_hex_codeesr�csNddl�t��d�ttt��d���������fdd���dt���dS)Nrrc	s�dd�����fdd�
}��fdd�}�d7��}||k�r�|��|}|d7}t|}|tttttttfkrx||�q2|tt	t
ttt
ttfkr��|}|d7}||d|t|�f�q2|tk�r�|}|d7}tt|�}|dd�d	ks�t�|||dd��q2|tk�rV�|}|d7}tt|�}|dd
�dk�sBt�|||d
d��q2|ttttfk�r��|}|||||d��|d||�||7}q2|ttfk�r�||d�\}}	|d7}||d
||	t|�t|	�f�q2|tk�r||t�||dt���|dt7}q2|t k�rʈ|}|d7}t!d�"�fdd��||dt#j$�D���}
||||
�|dt#j$7}�d7�t%|�D].}|t�||dt���|dt7}�q��d8�q2|t&t't(t)t*fk�r��|}|d7}|||�q2|t+k�r(�|}|||||d�|d7}q2|t,k�r��|}|||||d�|�r��|d||�||7}|��|}|�r�|d|||d�n|t��qL|d7}q2|t-t.t/fk�r�||d�\}}}
|
t0k�r�d}
|||||
||d��|d||�||7}q2|t1k�rJ�||d�\}}||||||d�|d7}q2|t2t3fk�r��||d�\}}||||||d��|d||�||7}q2|t4k�rĈ||d�\}}}}
|
t0k�r�d}
|||t5|�||
||d�|d�|t6@�r��|d|d�\}}|d|�|d����|�}|ddd�"dd�|D��dd�"t7t|����|7�|d���|���|7�|t8@�r��d7�|d���||��d8�||7}q2t9|��q2�d8�dS)N)�tocsX|dk	r"��|�|d|ff7}td����kr6dndfd�dd�t|�dS)Nz(to %d)z%*d%s �:�.z  r��end)�add�print)r��args)�labels�level�offset_width�startrr�print_ps

�z!dis.<locals>.dis_.<locals>.print_cs"td�d�d�t|�dS)N� rr�)r�)r�)r�r�rr�print_2xsz"dis.<locals>.dis_.<locals>.print_2rz
%#02x (%r)�ZAT_�	Z	CATEGORY_rz%#02x %#02x (%r-%r)rt�c3s|]}|�tj�j�VqdSr)�to_bytesr!r��	byteorderr�)�sysrrr
�s�z$dis.<locals>.dis_.<locals>.<genexpr>�branch�	MAXREPEATr��z
  prefix_skipz  prefixr�r�css|]}d|VqdS)z%#02xNrr�rrrr
�sz(%r)�z	  overlap�in):�OPCODESr>r.r4r6r@rAr,r-r+�LITERAL_IGNORE�NOT_LITERAL_IGNORE�LITERAL_UNI_IGNORE�NOT_LITERAL_UNI_IGNORE�LITERAL_LOC_IGNORE�NOT_LITERAL_LOC_IGNORE�chrrFr��ATCODESr�rN�CHCODESr/r2r*r1rorprqr�r�rs�listr�r!r�rwrCrQrSrTrRrMrLr?r;r<r�rU�ASSERT�
ASSERT_NOTr��binr�rxr��
ValueError)r�r�r�r�rra�argrdrcrjr�r	r��maxr�
prefix_lenr�r��rV�dis_r�r�r�r�)r�rr�os�

�
�


 

�


�












�


zdis.<locals>.dis_)r��setrr�r�rr�r�dishsr�c	Cs�t|�r|}t�||�}nd}t||�}|t@r>t�t|�|jj}dg|jj	}|�
�D]\}}|||<q\t�|||jj
B||jj	d|t|��S)Nr)r��	sre_parse�parser��SRE_FLAG_DEBUGr�r�r��	groupdict�groups�itemsr!�compilerr)rirrWrV�
groupindex�
indexgrouprerrrrr��s(



�r�)NNN)r)/�__doc__r!r��
sre_constants�MAGICr�r-r+rr?�
MIN_REPEATr:rr>r.rr�r�rr4r/r��
_equivalencesr$rrr=r3r0r�r�r�r��intr|r~r9r�r�r�r�r�r�r�r�r�r�rrrr�<module>sJ
$��
3

	,;

?>