HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.7/site-packages/pip/_vendor/pyparsing/__pycache__/util.cpython-37.pyc
B

L��g�!�@sxddlZddlZddlZddlZddlZddlmZmZddlm	Z	m
Z
mZmZm
Z
mZed�Ze
de	d�ZGdd�d�Zed	d
�eeed�dd
��Zed	d
�eeed�dd��Zed	d
�eeed�dd��ZGdd�d�ZGdd�d�ZGdd�d�ZGdd�de�Zeed�dd�Zd*eeeefeed�dd �Ze e d!�d"d#�Z!eeed$�d%d&�Z"ee	e	gefd'�d(d)�Z#dS)+�N)�	lru_cache�wraps)�Callable�List�Union�Iterable�TypeVar�cast�\�C)�boundc@sZeZdZUdZgZeeed<gZeeed<dZ	e
dd��Ze
dd��Ze
d	d��Z
d
S)�__config_flagsz=Internal class for defining compatibility and debugging flags�
_all_names�_fixed_names�
configurationcCsx||jkrFtj|j�d|�d|j�dtt||�����d�dd�dS||jkr^t	|||�nt
d|j�d|����dS)N�.� z is z and cannot be overridden�)�
stacklevelzno such )r�warnings�warn�__name__�
_type_desc�str�getattr�upperr�setattr�
ValueError)�clsZdname�value�r �>/tmp/pip-unpacked-wheel-hv55ucu3/pip/_vendor/pyparsing/util.py�_sets
,
z__config_flags._setcCs|�|d�S)NT)r")r�namer r r!�<lambda>#�z__config_flags.<lambda>cCs|�|d�S)NF)r")rr#r r r!r$$r%N)r�
__module__�__qualname__�__doc__rrr�__annotations__rr�classmethodr"�enable�disabler r r r!r
s
r
�)�maxsize)�loc�strg�returncCsF|}d|krt|�kr4nn||ddkr4dS||�dd|�S)a�
    Returns current column within a string, counting newlines as line separators.
    The first column is number 1.

    Note: the default parsing behavior is to expand tabs in the input string
    before starting the parsing process.  See
    :class:`ParserElement.parse_string` for more
    information on parsing strings containing ``<TAB>`` s, and suggested
    methods to maintain a consistent view of the parsed string, the parse
    location, and line and column positions within the parsed string.
    r��
)�len�rfind)r/r0�sr r r!�col's
r7cCs|�dd|�dS)a�Returns current line number within a string, counting newlines as line separators.
    The first line is number 1.

    Note - the default parsing behavior is to expand tabs in the input string
    before starting the parsing process.  See :class:`ParserElement.parse_string`
    for more information on parsing strings containing ``<TAB>`` s, and
    suggested methods to maintain a consistent view of the parsed string, the
    parse location, and line and column positions within the parsed string.
    r3rr2)�count)r/r0r r r!�lineno8sr9cCsB|�dd|�}|�d|�}|dkr2||d|�S||dd�S)zh
    Returns the line of text containing loc within a string, counting newlines as line separators.
    r3rr2N)r5�find)r/r0Zlast_crZnext_crr r r!�lineFsr;c@seZdZdd�ZdS)�_UnboundedCachecspi��j�t�|_���fdd�}�fdd�}�fdd�}d|_t�||�|_t�||�|_t�||�|_dS)Ncs
�|��S)Nr )�_�key)�	cache_get�not_in_cacher r!�getVsz%_UnboundedCache.__init__.<locals>.getcs|�|<dS)Nr )r=r>r)�cacher r!�set_Ysz&_UnboundedCache.__init__.<locals>.set_cs���dS)N)�clear)r=)rBr r!rD\sz'_UnboundedCache.__init__.<locals>.clear)rA�objectr@�size�types�
MethodType�setrD)�selfrArCrDr )rBr?r@r!�__init__Qsz_UnboundedCache.__init__N)rr&r'rKr r r r!r<Psr<c@seZdZdd�ZdS)�
_FifoCachecs�t�|_�i�t�g���j��j�t�t������fdd�}����fdd�}���fdd�}�|_t�	||�|_t�	||�|_
t�	||�|_dS)Ncs
�|��S)Nr )r=r>)r?r@r r!rAnsz _FifoCache.__init__.<locals>.getcs*|�|<t��}��|d�|�|<dS)N)�next)r=r>r�i)rB�	cache_pop�keyiter�keyringr r!rCqsz!_FifoCache.__init__.<locals>.set_cs ���t�g��dd�<dS)N)rDrE)r=)rBrQrFr r!rDwsz"_FifoCache.__init__.<locals>.clear)rEr@rA�pop�	itertools�cycle�rangerFrGrHrIrD)rJrFrArCrDr )rBr?rOrPrQr@rFr!rKfsz_FifoCache.__init__N)rr&r'rKr r r r!rLesrLc@s8eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�ZdS)
�LRUMemoz�
    A memoizing mapping that retains `capacity` deleted items

    The memo tracks retained items by their access order; once `capacity` items
    are retained, the least recently used item is discarded.
    cCs||_i|_t��|_dS)N)�	_capacity�_active�collections�OrderedDict�_memory)rJ�capacityr r r!rK�szLRUMemo.__init__cCs6y
|j|Stk
r0|j�|�|j|SXdS)N)rX�KeyErrorr[�move_to_end)rJr>r r r!�__getitem__�s

zLRUMemo.__getitem__cCs|j�|d�||j|<dS)N)r[rRrX)rJr>rr r r!�__setitem__�szLRUMemo.__setitem__cCsXy|j�|�}Wntk
r$Yn0Xx"t|j�|jkrH|jjdd�q(W||j|<dS)NF)�last)rXrRr]r4r[rW�popitem)rJr>rr r r!�__delitem__�szLRUMemo.__delitem__cCs|j��|j��dS)N)rXrDr[)rJr r r!rD�s
z
LRUMemo.clearN)	rr&r'r(rKr_r`rcrDr r r r!rV�s
rVc@seZdZdZdd�ZdS)�
UnboundedMemoz<
    A memoizing mapping that retains all deleted items
    cCsdS)Nr )rJr>r r r!rc�szUnboundedMemo.__delitem__N)rr&r'r(rcr r r r!rd�srd)r6r1cCs>xdD]}|�|t|�}qW|�dd�}|�dd�}t|�S)Nz\^-[]r3z\n�	z\t)�replace�_bslashr)r6�cr r r!�_escape_regex_range_chars�s

riT)r6�	re_escaper1c	s�fdd��d�_t���_d�_dd��dd�}|s:|�g}d	�tt|���}t|�d
kr�x�tj	|�d�D]�\}}t
|�}}tjt�
t|g�|�dd
���}||kr�|��|��qlt|�t|�dkr�d	nd}|��|��|��|����qlWn�fdd�|D�}d	�|�S)Ncs4t|�}|�j�_}||dkr.t�j��_�jS)Nr2)�ord�prevrM�counterr)rh�c_intrl)�is_consecutiver r!ro�s
z2_collapse_string_to_ranges.<locals>.is_consecutiver���cSs|dkrd|S|S)Nz\^-][�\r )rhr r r!�escape_re_range_char�sz8_collapse_string_to_ranges.<locals>.escape_re_range_charcSs|S)Nr )rhr r r!�no_escape_re_range_char�sz;_collapse_string_to_ranges.<locals>.no_escape_re_range_char�r)r>r2)�maxlen�-csg|]}�|��qSr r )�.0rh)rrr r!�
<listcomp>�sz._collapse_string_to_ranges.<locals>.<listcomp>)rlrSr8rmr�join�sortedrIr4�groupbyrMrY�deque�chain�iterrR�appendrk)	r6rjrs�retr=�chars�firstra�sepr )rrror!�_collapse_string_to_ranges�s,
 r�)�llr1cCs:g}x0|D](}t|t�r(|�t|��q
|�|�q
W|S)N)�
isinstance�list�extend�_flattenr)r�r�rNr r r!r��s

r�)�compat_name�fnr1cs�t�d���dtt���j�dkr:t���fdd��}nt���fdd��}d�j�d�|_||_�j|_t	�t
j�r��j|_n&t	�t
�r�t�d	�r��jj|_nd|_�j|_tt|�S)
N�__func__rJrcs�|f|�|�S)Nr )rJ�args�kwargs)r�r r!�_inner�sz&_make_synonym_function.<locals>._innercs
�||�S)Nr )r�r�)r�r r!r�szDeprecated - use :class:`�`rK)rr��inspect�	signature�
parametersrrr(r)r�rG�FunctionType�__kwdefaults__�type�hasattrrKr'r	r)r�r�r�r )r�r!�_make_synonym_function�s	
r�)r�r1cs�fdd�S)zZ
    Decorator for pre-PEP8 compatibility synonyms, to link them to the new function.
    cst|j��S)N)r�r)�other)r�r r!r$r%z"replaced_by_pep8.<locals>.<lambda>r )r�r )r�r!�replaced_by_pep8sr�)T)$r�rrGrYrS�	functoolsrr�typingrrrrrr	�chrrgrr
�intrr7r9r;r<rLrV�dictrdri�boolr�r�r�r�r�r r r r!�<module>s2 
	'	
*
(