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/pygments/__pycache__/regexopt.cpython-37.pyc
B

L��g�@sldZddlZddlmZddlmZddlmZddlmZe�	d�Z
ed�Zdd	�Zd
d�Z
dd
d�ZdS)a
    pygments.regexopt
    ~~~~~~~~~~~~~~~~~

    An algorithm that generates optimized regexes for matching long lists of
    literal strings.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�escape)�commonprefix)�groupby)�
itemgetterz[\[\^\\\-\]]cCsdt�dd�d�|��dS)N�[cSsd|��S)N�\)�group)�m�r
�A/tmp/pip-unpacked-wheel-hv55ucu3/pip/_vendor/pygments/regexopt.py�<lambda>�zmake_charset.<locals>.<lambda>��])�	CS_ESCAPE�sub�join)�lettersr
r
r�make_charsetsrc		s�|rdp
d}|sdS|d�t|�dkr8|t��|S�sZ|t|dd�d�d|St��dkr�g}g}x.|D]&}t|�dkr�|�|�qt|�|�qtWt|�dkr�|r�|t|d�dt|�|S|t|�|St|�}|�rt|��|t|�t�fd	d
�|D�d�|Sdd
�|D�}t|�}|�rtt|��|tt�fdd
�|D��d�t|ddd��|S|d�dd
�t|�fdd��D��|S)zEReturn a regex that matches any string in the sorted list of strings.�)rr�Nz(?:�?�|csg|]}|�d��qS)Nr
)�.0�s)�plenr
r�
<listcomp>?sz#regex_opt_inner.<locals>.<listcomp>cSsg|]}|ddd��qS)N���r
)rrr
r
rrBsc3s|]}|d��VqdS)Nr
)rr)�slenr
r�	<genexpr>Hsz"regex_opt_inner.<locals>.<genexpr>rcss |]}tt|d�d�VqdS)rrN)�regex_opt_inner�list)rrr
r
rrMscs|d�dkS)Nrr
)r)�firstr
rrNr
z!regex_opt_inner.<locals>.<lambda>)	�lenrr �appendrr�sortedrr)	�stringsZ
open_parenZclose_parenZ	oneletter�restr�prefixZstrings_rev�suffixr
)r"rrrr s:
(6r rcCst|�}|t|d�|S)z�Return a compiled regex that matches any string in the given list.

    The strings to match must be literal strings, not regexes.  They will be
    regex-escaped.

    *prefix* and *suffix* are pre- and appended to the final regex.
    �()r%r )r&r(r)r
r
r�	regex_optRsr+)rr)�__doc__�rer�os.pathr�	itertoolsr�operatorr�compilerZ
FIRST_ELEMENTrr r+r
r
r
r�<module>
s
8