%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python3/dist-packages/pygments/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/python3/dist-packages/pygments/__pycache__/regexopt.cpython-312.pyc

�

|�e���dZddlZddlmZddlmZddlmZddlmZejd�Z
ed�Zd�Zd	�Z
dd
�Zy)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[\[\^\\\-\]]c�Z�dtjd�dj|��zdzS)N�[c�(�d|j�zS)N�\)�group)�ms �3/usr/lib/python3/dist-packages/pygments/regexopt.py�<lambda>zmake_charset.<locals>.<lambda>s������	�)9����])�	CS_ESCAPE�sub�join)�letterss r
�make_charsetrs'������9�2�7�7�7�;K�L�L�s�R�Rrc	�r�
��|xrdxsd}|sy|d�
t|�dk(r|t�
�z|zS�
s|t|ddd�zdz|zSt�
�dk(r~g}g}|D]3}t|�dk(r|j|��#|j|��5t|�dkDr4|r!|t|d�zdzt	|�z|zS|t	|�z|zSt|�}|r:t|�}|t|�zt|D�cgc]}||d��	c}d�z|zS|D�cgc]
}|ddd	���}}t|�}	|	rAt|	��|tt
�fd
�|D��d�zt|	ddd	��z|zS|djd�t|�
fd��D��z|zScc}wcc}w)
zEReturn a regex that matches any string in the sorted list of strings.�)rr�Nz(?:�?�|���c3�*�K�|]
}|d����y�w)N�)�.0�s�slens  �r
�	<genexpr>z"regex_opt_inner.<locals>.<genexpr>Hs�����$@�1�Q�v���Y�$@�s�c3�LK�|]}tt|d�d����y�w)rrN)�regex_opt_inner�list)rrs  r
r"z"regex_opt_inner.<locals>.<genexpr>Ms)����L��!��e�A�h���4�L�s�"$c���|d�dk(S)Nrr)r �firsts �r
rz!regex_opt_inner.<locals>.<lambda>Ns����1���q��9I�r)	�lenrr$�appendrr�sortedrr)�strings�
open_paren�close_paren�	oneletter�restr �prefix�plen�strings_rev�suffixr'r!s          @@r
r$r$s����$��*��K����A�J�E�
�7�|�q���F�5�M�)�K�7�7���O�G�A�B�K��?�?���� �	 �
�5�z�Q���	����	�A��1�v��{�� � ��#����A��		�
�y�>�A���!�O�D�"�$=�=��C�"�9�-�.�0;�<�<���Y� 7�7�+�E�E�
�'�
"�F�
��6�{���F�6�N�*���9�A�q���x�9�5�A�B���	�%,�,�q�1�T�r�T�7�,�K�,�
�+�
&�F�
��6�{����f�$@��$@�@�%�H�I��V�D�b�D�\�"�#�%0�1�	1�
����L�%�g�/I�J�L�	L�L�����:��-s�F/
�%F4c�<�t|�}|t|d�z|zS)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+r0r3s   r
�	regex_optr6Rs$���W�o�G��O�G�S�1�1�F�:�:r)rr)�__doc__�rer�os.pathr�	itertoolsr�operatorr�compiler�
FIRST_ELEMENTrr$r6rrr
�<module>r>sE��	�
�� ����B�J�J��'�	��1�
�
�S�5�p	;r

Zerion Mini Shell 1.0