403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/pygments/lexers/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/pygments/lexers/__pycache__/__init__.cpython-311.pyc
�

�E�cl+���dZddlZddlZddlmZddlmZddlmZddlm	Z	ddl
mZddlm
Z
mZd	d
d�Zgd�ee��zee��zZiZd
�Zdd�Zd�Zd�Zd�Zdd�Zdd�Zdd�Zd�Zdd�Zd�Zd�ZGd�dej��Z ej!e"Z#e e"��Z$e$j%�&e#j%��e$ej!e"<e$`$e$`#e$`e$`dS) z�
    pygments.lexers
    ~~~~~~~~~~~~~~~

    Pygments lexers.

    :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�fnmatch)�basename)�LEXERS)�get_filetype_from_buffer)�find_plugin_lexers)�
ClassNotFound�guess_decode�PythonLexer�PythonTracebackLexer)�Python3Lexer�Python3TracebackLexer)�get_lexer_by_name�get_lexer_for_filename�find_lexer_class�guess_lexer�load_lexer_from_filec�~�t|dddg��}|jD]!}t||��}|t|j<�"dS)z0Load a lexer (and all others in the module too).N�__all__)�
__import__r�getattr�_lexer_cache�name)�module_name�mod�
lexer_name�clss    �:/usr/lib/python3/dist-packages/pygments/lexers/__init__.py�_load_lexersrsP��
�[�$��y�k�
:�
:�C��k�%�%�
��c�:�&�&��!$��S�X���%�%�Tc#�K�tj��D]}|dd�V��|r-t��D] }|j|j|j|jfV��dSdS)aReturn a generator of tuples in the form ``(name, aliases,
    filenames, mimetypes)`` of all know lexers.

    If *plugins* is true (the default), plugin lexers supplied by entrypoints
    are also returned.  Otherwise, only builtin ones are considered.
    �N)r�valuesrr�aliases�	filenames�	mimetypes)�plugins�item�lexers   r�get_all_lexersr)'s������
�������1�2�2�h������N�'�)�)�	N�	N�E��*�e�m�U�_�e�o�M�M�M�M�M�N�N�	N�	Nrc���|tvr
t|Stj��D],\}}}}}||krt|��t|cS�-t	��D]}|j|kr|cS�dS)zALookup a lexer class by name.

    Return None if not found.
    N)rrr"rrr)rr�lnamer#�_rs      rrr5s���
�|����D�!�!�-3�]�_�_�&�&�)��U�G�Q���5�=�=���%�%�%���%�%�%�%��"�#�#�����8�t����J�J�J���rc�`�|std|z���tj��D]E\}}}}}|���|vr'|tvrt|��t|cS�Ft
��D]!}|���|jvr|cS�"td|z���)z�Lookup a lexer class by alias.

    Like `get_lexer_by_name`, but does not instantiate the class.

    .. versionadded:: 2.2
    �no lexer for alias %r found�rrr"�lowerrrrr#)�_aliasrrr#r,rs      r�find_lexer_class_by_namer2Gs����D��9�F�B�C�C�C�,2�M�O�O�&�&�(��T�7�A�q��<�<�>�>�W�$�$��<�'�'��[�)�)�)���%�%�%�%�%�
"�#�#�����<�<�>�>�S�[�(�(��J�J�J�)�
�5��>�
?�
?�?rc�v�|std|z���tj��D]J\}}}}}|���|vr,|tvrt|��t	|di|��cS�Kt
��D]'}|���|jvr
|di|��cS�(td|z���)zEGet a lexer by an alias.

    Raises ClassNotFound if not found.
    r.N�r/)r1�optionsrrr#r,rs       rrr]s���
�D��9�F�B�C�C�C�-3�M�O�O�1�1�(��T�7�A�q��<�<�>�>�W�$�$��<�'�'��[�)�)�)���%�0�0��0�0�0�0�0�%�
"�#�#�"�"���<�<�>�>�S�[�(�(��3�>�>��>�>�!�!�!�)�
�5��>�
?�
?�?r�CustomLexerc��	i}t|d��5}t|���|��ddd��n#1swxYwY||vrtd|�d|�����||}|di|��S#t$r}td|�d|�����d}~wt$r�t
$r}td|z���d}~wwxYw)	aLoad a lexer from a file.

    This method expects a file located relative to the current working
    directory, which contains a Lexer class. By default, it expects the
    Lexer to be name CustomLexer; you can specify your own class name
    as the second argument to this function.

    Users should be very careful with the input, because this method
    is equivalent to running eval on the input file.

    Raises ClassNotFound if there are any problems importing the Lexer.

    .. versionadded:: 2.2
    �rbNz	no valid z class found in zcannot read z: z#error when loading custom lexer: %sr4)�open�exec�readr�OSError�	Exception)�filename�	lexernamer5�custom_namespace�f�lexer_class�errs       rrrrs[��I���
�(�D�
!�
!�	-�Q�������+�,�,�,�	-�	-�	-�	-�	-�	-�	-�	-�	-�	-�	-����	-�	-�	-�	-��,�,�,��-�!*���H�H�!6�7�7�
7�&�y�1���{�%�%�W�%�%�%���D�D�D��m�H�H�H�c�c�B�C�C�C���������
��I�I�I��A�C�G�H�H�H�����I���sE�A7�#A�A7�A�A7�
A�+A7�7
C�B�C�-B?�?Cc�"��g}t|��}tj��D]W\}}}}}|D]L}t||��r:|tvrt|��|�t||f���M�Xt��D]3}	|	jD])}t||��r|�|	|f���*�4t�t��rt�����fd�}
|r$|�|
���|ddSdS)z�Get a lexer for a filename.

    If multiple lexers match the filename pattern, use ``analyse_text()`` to
    figure out which one is more appropriate.

    Returns None if not found.
    c���|\}}d|vrdpd}�r|����|z|jfS|j|z|jfS)N�*g�?r)�analyse_text�__name__�priority)�inforr>�bonus�codes    �r�
get_ratingz1find_lexer_class_for_filename.<locals>.get_rating�s_����
��X��8�#�+��0�q��
�	@��#�#�D�)�)�E�1�3�<�?�?��|�e�#�S�\�1�1r��key���rN)
rrr"rrr�appendrr$�
isinstance�bytesr	�sort)�_fnrL�matches�fn�modnamerr,r$r>rrMs `         r�find_lexer_class_for_filenamerY�sW����G�	�#���B�*0�-�/�/�?�?�&���q�)�Q�!�	?�	?�H��r�8�$�$�
?��|�+�+� ��)�)�)�����T� 2�H�=�>�>�>��		?�
"�#�#�0�0���
�	0�	0�H��r�8�$�$�
0�����X��/�/�/��	0��$����"��D�!�!��
2�
2�
2�
2�
2��������$�$�$��r�{�1�~���rc�Z�t||��}|std|z���|di|��S)z�Get a lexer for a filename.

    If multiple lexers match the filename pattern, use ``analyse_text()`` to
    figure out which one is more appropriate.

    Raises ClassNotFound if not found.
    �no lexer for filename %r foundr4)rYr)rUrLr5�ress    rrr�sB��(��T�
2�
2�C��D��<�s�B�C�C�C��3�>�>��>�>�rc��tj��D]8\}}}}}||vr,|tvrt|��t|di|��cS�9t	��D]}||jvr
|di|��cS�t
d|z���)zHGet a lexer for a mimetype.

    Raises ClassNotFound if not found.
    zno lexer for mimetype %r foundNr4)rr"rrrr%r)�_mimer5rXrr,r%rs       r�get_lexer_for_mimetyper_�s���
+1�-�/�/�1�1�&���q�!�Y��I����<�'�'��W�%�%�%���%�0�0��0�0�0�0�0��"�#�#�"�"���C�M�!�!��3�>�>��>�>�!�!�!�"�
�8�5�@�
A�
A�Arc#��K�tt��D]A}t|dd�\}}|tvrt|��t|V��B|rt	��Ed{V��dSdS)z*Return an iterator over all lexer classes.N�)�sortedrrrr)r&rOrrs    r�_iter_lexerclassesrc�s������f�~�~�!�!��"�3�K����O���T��|�#�#���%�%�%��4� � � � � ��(�%�'�'�'�'�'�'�'�'�'�'�'�(�(rc��
�t|��}i�
t��}t��D]j}|jD],}t	||��r|�|��d�
|<�-|jD],}t	||��r|�|��d�
|<�-�k|std|z���t|��dkr|�	��d	i|��Sg}|D]>}|�
|��}|dkr
|d	i|��cS|�||f���?�
fd�}	|�|	���|ddd	i|��S)
a�
    Lookup all lexers that handle those filenames primary (``filenames``)
    or secondary (``alias_filenames``). Then run a text analysis for those
    lexers and choose the best result.

    usage::

        >>> from pygments.lexers import guess_lexer_for_filename
        >>> guess_lexer_for_filename('hello.html', '<%= @foo %>')
        <pygments.lexers.templates.RhtmlLexer object at 0xb7d2f32c>
        >>> guess_lexer_for_filename('hello.html', '<h1>{{ title|e }}</h1>')
        <pygments.lexers.templates.HtmlDjangoLexer object at 0xb7d2f2ac>
        >>> guess_lexer_for_filename('style.css', 'a { color: <?= $link ?> }')
        <pygments.lexers.templates.CssPhpLexer object at 0xb7ba518c>
    TFr[r!��?c�`��|d�|d|dj|djfS�Nrr!)rIrH)�t�primarys �r�	type_sortz+guess_lexer_for_filename.<locals>.type_sorts,����!��g�a��d�m�Q�q�T�]�A�a�D�M�B�BrrNrPr4)
r�setrcr$r�add�alias_filenamesr�len�poprGrQrT)rU�_textr5rW�matching_lexersr(r>�result�rvrjris          @r�guess_lexer_for_filenamert�s���� 
�#���B��G��e�e�O�#�%�%�'�'����	&�	&�H��r�8�$�$�
&��#�#�E�*�*�*�!%������-�	'�	'�H��r�8�$�$�
'��#�#�E�*�*�*�!&�����	'��C��<�r�A�B�B�B�
�?���q� � �$��"�"�$�$�/�/�w�/�/�/�
�F� �#�#��
�
�
��
&�
&��
��9�9��5�#�#�7�#�#�#�#�#��
�
�r�5�k�"�"�"�"�C�C�C�C�C��K�K�I�K�����6�"�:�a�=�#�#�7�#�#�#rc�,�t|t��sU|�d|�d����}|r|�|pd��}nt	|��\}}t|��}|�	t
|fi|��S#t$rYnwxYwddg}t��D]<}|�	|��}|dkr
|d
i|��cS||dkr	||f|dd�<�=|dr|d�td	���|dd
i|��S)z?Guess a lexer by strong distinctions in the text (eg, shebang).�
inencoding�encoding�utf8Ngrerr!z no lexer matching the text foundr4)
rR�str�get�decoder	rrrrcrG)rpr5rvr,�ft�
best_lexerr(rss        rrrsm���e�S�!�!�+��[�[��w�{�{�:�/F�/F�G�G�
��	+��L�L��!5�v�6�6�E�E�#�E�*�*�H�E�1�
"�%�	(�	(�B�	�~�	�$�R�3�3�7�3�3�3���	�	�	��D�	�����t��J�#�%�%�(�(��
�
�
��
&�
&��
��9�9��5�#�#�7�#�#�#�#�#�
�
�1�
�����K�J�q�q�q�M���a�=�@�J�q�M�1��>�?�?�?��:�a�=�#�#�7�#�#�#s�=B
�

B�Bc��eZdZdZd�ZdS)�_automodulezAutomatically import lexers.c�
�tj|��}|r;t|d��t|d}t	|||��|S|t
vrt
|t
|��St|���rg)rrzrr�setattr�COMPATr�AttributeError)�selfrrJrs    r�__getattr__z_automodule.__getattr__>s{���z�$�����	���a��!�!�!��t�A�w�'�C��D�$��$�$�$��J��6�>�>��4����.�.�.��T�"�"�"rN)rH�
__module__�__qualname__�__doc__r�r4rrrr;s)������&�&�	#�	#�	#�	#�	#rr)T)r6)N)'r��sys�typesr�os.pathr�pygments.lexers._mappingr�pygments.modeliner�pygments.pluginr�
pygments.utilrr	r��listrrrr)rr2rrrYrr_rcrtr�
ModuleTyper�modulesrH�oldmod�newmod�__dict__�updater4rr�<module>r�sG�����
�
�
�����������������+�+�+�+�+�+�6�6�6�6�6�6�.�.�.�.�.�.�5�5�5�5�5�5�5�5�"�3�
�
��
2�2�2�48�D��L�L�A�CG�4��<�<�P����%�%�%�N�N�N�N����$@�@�@�,@�@�@�* I� I� I� I�F(�(�(�(�V����
B�
B�
B� (�(�(�(�0$�0$�0$�f$�$�$�>#�#�#�#�#�%�"�#�#�#�

��X�	��	��X�	�	������v��'�'�'����H��
�M�6�=�&�*�f�l�l�lr

Youez - 2016 - github.com/yon3zu
LinuXploit