403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.216.115
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 :  /usr/lib/python3/dist-packages/IPython/lib/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

�@�c�N��\�dZddlZddlmZmZmZmZmZmZm	Z	m
Z
ddlmZm
Z
mZmZmZmZddlmZmZmZmZmZmZmZmZddlmZejd��Zgd�Zd	�Z e d
���Z!e d���Z"Gd
�de��Z#Gd�de
��Z$Gd�de��Z%Gd�de��Z&dS)a;
Defines a variety of Pygments lexers for highlighting IPython code.

This includes:

    IPythonLexer, IPython3Lexer
        Lexers for pure IPython (python + magic/shell commands)

    IPythonPartialTracebackLexer, IPythonTracebackLexer
        Supports 2.x and 3.x via keyword `python3`.  The partial traceback
        lexer reads everything but the Python code appearing in a traceback.
        The full lexer combines the partial lexer with an IPython lexer.

    IPythonConsoleLexer
        A lexer for IPython console sessions, with support for tracebacks.

    IPyLexer
        A friendly lexer which examines the first line of text and from it,
        decides whether to use an IPython lexer or an IPython console lexer.
        This is probably the only lexer that needs to be explicitly added
        to Pygments.

�N)�	BashLexer�	HtmlLexer�JavascriptLexer�	RubyLexer�	PerlLexer�PythonLexer�Python3Lexer�TexLexer)�Lexer�DelegatingLexer�
RegexLexer�
do_insertions�bygroups�using)�Generic�Keyword�Literal�Name�Operator�Other�Text�Error)�get_bool_optz.*?
)�build_ipy_lexer�
IPython3Lexer�IPythonLexer�IPythonPartialTracebackLexer�IPythonTracebackLexer�IPythonConsoleLexer�IPyLexerc �j
�|rt}d}dg}d}nt}d}ddg}d}dttttt|����fd	ttttt|����fd
tttttt����fdtttttt����fdtttttt����fd
tttttt����fdtttttt����fdttttt|����fdttttt|����fdttttt|����fdtttttt����fdtttttt����fdtttttt����fdttttt|����fdttttt|����fdttttt|����fdttttt|����fdttttt��fdtttttt����fdtttt��fdttt��fdttttt��t��fdtttt��fdtttt��t��fd tttt��t��fd!tttt��fd"tttt��fg}|j
���}||d#z|d#<||g||d$�}t||f|��S)%a_Builds IPython lexers depending on the value of `python3`.

    The lexer inherits from an appropriate Python lexer and then adds
    information about IPython specific keywords (i.e. magic commands,
    shell commands, etc.)

    Parameters
    ----------
    python3 : bool
        If `True`, then build an IPython lexer from a Python 3 lexer.

    �IPython3�ipython3zIPython3 Lexer�IPython�ipython2�ipythonz
IPython Lexerz"(?s)(\s*)(%%capture)([^\n]*\n)(.*)z (?s)(\s*)(%%debug)([^\n]*\n)(.*)z (?is)(\s*)(%%html)([^\n]*\n)(.*)z%(?s)(\s*)(%%javascript)([^\n]*\n)(.*)z(?s)(\s*)(%%js)([^\n]*\n)(.*)z (?s)(\s*)(%%latex)([^\n]*\n)(.*)z(?s)(\s*)(%%perl)([^\n]*\n)(.*)z(?s)(\s*)(%%prun)([^\n]*\n)(.*)z(?s)(\s*)(%%pypy)([^\n]*\n)(.*)z!(?s)(\s*)(%%python)([^\n]*\n)(.*)z"(?s)(\s*)(%%python2)([^\n]*\n)(.*)z"(?s)(\s*)(%%python3)([^\n]*\n)(.*)z(?s)(\s*)(%%ruby)([^\n]*\n)(.*)z(?s)(\s*)(%%time)([^\n]*\n)(.*)z!(?s)(\s*)(%%timeit)([^\n]*\n)(.*)z$(?s)(\s*)(%%writefile)([^\n]*\n)(.*)z(?s)(\s*)(%%file)([^\n]*\n)(.*)z(?s)(\s*)(%%)(\w+)(.*)z(?s)(^\s*)(%%!)([^\n]*\n)(.*)z(%%?)(\w+)(\?\??)$z\b(\?\??)(\s*)$z(%)(sx|sc|system)(.*)(\n)z(%)(\w+)(.*\n)z
^(!!)(.+)(\n)z(!)(?!=)(.+)(\n)z!^(\s*)(\?\??)(\s*%{0,2}[\w\.\*]*)z!(\s*%{0,2}[\w\.\*]*)(\?\??)(\s*)$�root)�name�aliases�	filenames�__doc__�tokens)r	rrrrrrrr
rrrrr,�copy�type)�python3�PyLexerr(r)�doc�ipython_tokensr,�attrss        �4/usr/lib/python3/dist-packages/IPython/lib/lexers.pyrr9s��� �	"������,��"��������y�)��!��	.�x��h��e�T[�n�n�/]�/]�^�	,�h�t�X�t�U�SZ�^�^�.\�.\�]�	,�h�t�X�t�U�S\�M]�M]�.^�.^�_�	1�8�D�(�D�RW�Xg�Rh�Rh�3i�3i�j�	)�8�D�(�D�%�P_�J`�J`�+a�+a�b�	,�h�t�X�t�U�S[�_�_�.]�.]�^�	+�X�d�H�d�E�R[�L\�L\�-]�-]�^�	+�X�d�H�d�E�RY�N�N�-[�-[�\�	+�X�d�H�d�E�RY�N�N�-[�-[�\�	-�x��h��e�T[�n�n�/]�/]�^�	.���x��u�U`�Oa�Oa�0b�0b�c�	.���x��u�Ua�Ob�Ob�0c�0c�d�	+�X�d�H�d�E�R[�L\�L\�-]�-]�^�	+�X�d�H�d�E�RY�N�N�-[�-[�\�	-�x��h��e�T[�n�n�/]�/]�^�	0�(�4��4�QV�W^�Q_�Q_�2`�2`�a�	+�X�d�H�d�E�RY�N�N�-[�-[�\�	"�H�T�8�W�d�$K�$K�L�	)�8�D�(�D�%�PY�JZ�JZ�+[�+[�\�	��(�G�X�!F�!F�G�	�h�x��6�6�7�	%�x��'�05�i�0@�0@�$�(H�(H�	I�	�H�X�w��=�=�>�	�8�H�e�I�.>�.>��E�E�F�	�h�x��y�1A�1A�4�H�H�I�	-�x��h��/M�/M�N�	-�x��h��/M�/M�N�9�N�>�^�
 �
 �
"�
"�F�#�f�V�n�4�F�6�N��g�B��v�
/�
/�E���w�j�%�(�(�(�T)r/Fc��eZdZdZdZddeeej��fdeeje	j
ejejj
��fdee	jeje��fdee	j
ee	je	j��fdeejejj
e��fd	ee	jejj
e��fd
ee	je��fdefgiZdS)
rzX
    Partial lexer for IPython tracebacks.

    Handles all the non-python output.

    zIPython Partial Tracebackr'z
^(\^C)?(-+\n)z^(  File)(.*)(, line )(\d+\n)z&(?u)(^[^\d\W]\w*)(\s*)(Traceback.*?\n)z(.*)( in )(.*)(\(.*\)\n)z(\s*?)(\d+)(.*?\n)z(-*>?\s?)(\d+)(.*?\n)z(?u)(^[^\d\W]\w*)(:.*?\n)z.*\nN)�__name__�
__module__�__qualname__r+r(rrr�	Tracebackr�	Namespacer�Number�Integer�	Exception�
Whitespacer�Entity�Tagrr,�r5r4rr�s+��������'�D�	��x�x��w�/@�A�A�B�
-�
�X�g�'����'���)?�A�A�
B�
7�
�X�d�n�g�&8�$�
?�
?�
A�)�
�X�d�n�d�D�K���
B�
B�
D�#�
�X�g�(�'�.�*@�%�
H�
H�
J�&�
�X�d�n�g�n�&<�e�
D�
D�
F�*�
�X�d�n�d�
+�
+�
-��e��E#
�%�F�F�Fr5rc�"�eZdZdZdZdgZd�ZdS)raA
    IPython traceback lexer.

    For doctests, the tracebacks can be snipped as much as desired with the
    exception to the lines that designate a traceback. For non-syntax error
    tracebacks, this is the line of hyphens. For syntax error tracebacks,
    this is the line which lists the File and line number.

    zIPython Traceback�	ipythontbc���t|dd��|_|jr	dg|_n	ddg|_|jrt}nt}tj||tfi|��dS)Nr/F�
ipython3tb�
ipython2tbrD)rr/r)rrr�__init__r)�self�optionsr s   r4rHzIPythonTracebackLexer.__init__�s���#�G�Y��>�>����<�	7�(�>�D�L�L�(�+�6�D�L��<�	$�$�H�H�#�H�� ��x�!=�	J�	J�AH�	J�	J�	J�	J�	Jr5N)r7r8r9r+r(r)rHrBr5r4rr�s@���������D��m�G�
J�
J�
J�
J�
Jr5rc�l�eZdZdZdZdgZdgZdZdZdZ	e
jd��Zd	�Z
d
�Zd�Zd�Zd
�ZdS)ra
    An IPython console lexer for IPython code-blocks and doctests, such as:

    .. code-block:: rst

        .. code-block:: ipythonconsole

            In [1]: a = 'foo'

            In [2]: a
            Out[2]: 'foo'

            In [3]: print(a)
            foo


    Support is also provided for IPython exceptions:

    .. code-block:: rst

        .. code-block:: ipythonconsole

            In [1]: raise Exception
            Traceback (most recent call last):
            ...
            Exception

    zIPython console session�ipythonconsoleztext/x-ipython-consolezIn \[[0-9]+\]: z   \.\.+\.: zOut\[[0-9]+\]: z+^(\^C)?(-+\n)|^(  File)(.*)(, line )(\d+\n)c���t|dd��|_|jr	dg|_n	ddg|_|�d|j��}|�d|j��}|�d|j��}|���d	z}|���d	z}|���d	z}gd
�}|D]<}	|�|	tj
t��|	�����=tj
|fi|��|jrt}
t}nt }
t}|
di|��|_|di|��|_|���dS)
aInitialize the IPython console lexer.

        Parameters
        ----------
        python3 : bool
            If `True`, then the console inputs are parsed using a Python 3
            lexer. Otherwise, they are parsed using a Python 2 lexer.
        in1_regex : RegexObject
            The compiled regular expression used to detect the start
            of inputs. Although the IPython configuration setting may have a
            trailing whitespace, do not include it in the regex. If `None`,
            then the default input prompt is assumed.
        in2_regex : RegexObject
            The compiled regular expression used to detect the continuation
            of inputs. Although the IPython configuration setting may have a
            trailing whitespace, do not include it in the regex. If `None`,
            then the default input prompt is assumed.
        out_regex : RegexObject
            The compiled regular expression used to detect outputs. If `None`,
            then the default output prompt is assumed.

        r/F�ipython3console�ipython2consolerL�	in1_regex�	in2_regex�	out_regex�
)rPrQrR�in1_regex_rstrip�in2_regex_rstrip�out_regex_rstripNrB)rr/r)�getrPrQrR�rstrip�__setattr__�re�compile�localsrrHrrr�pylexer�tblexer�reset)rIrJrPrQrRrTrUrVr3�attrr]r^s            r4rHzIPythonConsoleLexer.__init__s���.$�G�Y��>�>����<�	A�-�.�D�L�L�-�/?�@�D�L��K�K��T�^�<�<�	��K�K��T�^�<�<�	��K�K��T�^�<�<�	�%�+�+�-�-��4��$�+�+�-�-��4��$�+�+�-�-��4��M�M�M���	?�	?�D����T�2�:�f�h�h�t�n�#=�#=�>�>�>�>�
��t�'�'�w�'�'�'��<�	,�#�G�+�G�G�"�G�+�G��w�)�)��)�)����w�)�)��)�)����
�
�����r5c�>�d|_d|_d|_g|_dS)N�outputr�)�mode�index�buffer�
insertions)rIs r4r_zIPythonConsoleLexer.resetFs"����	���
��������r5c#�K�|jdkrdtj|jfg}nJ|jdkr |j�|j��}n|j�|j��}t|j|��D]\}}}|j	|z||fV��|xj	t|j��z
c_	d|_g|_dS)zu
        Generator of unprocessed tokens after doing insertions and before
        changing to a new state.

        rbr�inputrcN)rdr�Outputrfr]�get_tokens_unprocessedr^rrgre�len)rIr,�i�t�vs     r4�buffered_tokensz#IPythonConsoleLexer.buffered_tokensLs������9�� � ��'�.�$�+�6�7�F�F�
�Y�'�
!�
!��\�8�8���E�E�F�F��\�8�8���E�E�F�$�T�_�f�=�=�	'�	'�G�A�q�!��*�q�.�!�Q�&�&�&�&�&�	
�
�
�c�$�+�&�&�&�
�
��������r5c��|j�|��}|j�|��}|r<|������|���ks|rd}nd}|r#|jdkrd}d}dtj|f}|||fS|j�|��}|j	�|��}	|s|	rSd}|r|�
��}
n|	�
��}
||
d�}dtj|d|
�f}|||fS|j�|��}|s
|r^|jdkrSd}|r|�
��}
n|�
��}
||
d�}dtj|d|
�f}|||fS|j
�|��}|s
|r^|jdkrSd}|r|�
��}
n|�
��}
||
d�}dtj|d|
�f}|||fS|j�|��rd}|}d}|||fS|jd	vrd}nd}|}d}|||fS)
a
        Parses the line and returns a 3-tuple: (mode, code, insertion).

        `mode` is the next mode (or state) of the lexer, and is always equal
        to 'input', 'output', or 'tb'.

        `code` is a portion of the line that should be added to the buffer
        corresponding to the next mode and eventually lexed by another lexer.
        For example, `code` could be Python code if `mode` were 'input'.

        `insertion` is a 3-tuple (index, token, text) representing an
        unprocessed "token" that will be inserted into the stream of tokens
        that are created from the buffer once we change modes. This is usually
        the input or output prompt.

        In general, the next mode depends on current mode and on the contents
        of `line`.

        TF�tbrbrcrNri)rirb)rQ�matchrU�grouprXrdr�PromptrRrV�end�HeadingrPrT�ipytb_start)
rI�line�	in2_match�in2_match_rstrip�	end_inputrd�code�	insertion�	out_match�out_match_rstrip�idx�	in1_match�in1_match_rstrips
             r4�get_mcizIPythonConsoleLexer.get_mcibs���0�N�(�(��.�.�	��0�6�6�t�<�<���	�)�/�/�+�+�2�2�4�4����
�
�E�E��F��I�I��I��	)���d�*�*��D��D��G�N�D�1�I���y�(�(��N�(�(��.�.�	��0�6�6�t�<�<���
	)�(�
	)��D��
-��m�m�o�o���&�*�*�,�,������:�D��G�O�T�$�3�$�Z�8�I���y�(�(��N�(�(��.�.�	��	)��	)�t�y�D�'8�'8��D��
&��m�m�o�o����m�m�o�o������:�D��G�N�D��#��J�7�I���y�(�(� �0�6�6�t�<�<���	)� 0�	)�T�Y�$�5F�5F��D��
-�&�*�*�,�,���&�*�*�,�,������:�D��G�N�D��#��J�7�I���y�(�(���!�!�$�'�'�	)��D��D��I���y�(�(��9�+�+�+��D�D��D����	��T�9�$�$r5c#��K�|���t�|��D]�}|���}|�|��\}}}||jkr"|���D]}|V��||_|r/|j�t|j
��|gf��|xj
|z
c_
��|���D]}|V��dS)N)r_�line_re�finditerrtr�rdrprg�appendrlrf)rI�textrsryrdr}r~�tokens        r4rkz*IPythonConsoleLexer.get_tokens_unprocessed�s�����
�
�����%�%�d�+�+�	 �	 �E��;�;�=�=�D�$(�L�L��$6�$6�!�D�$�	��t�y� � �!�1�1�3�3� � �E��K�K�K�K� ��	��
H���&�&��D�K�(8�(8�9�+�'F�G�G�G��K�K�4��K�K�K��)�)�+�+�	�	�E��K�K�K�K�	�	r5N)r7r8r9r+r(r)�	mimetypesrPrQrRrZr[rxrHr_rpr�rkrBr5r4rr�s���������8%�D�� �G�)�*�I�#�I��I�"�I��"�*�K�L�L�K�?�?�?�B������,s%�s%�s%�j����r5rc�(�eZdZdZdZdgZd�Zd�ZdS)r ao
    Primary lexer for all IPython-like code.

    This is a simple helper lexer.  If the first line of the text begins with
    "In \[[0-9]+\]:", then the entire text is parsed with an IPython console
    lexer. If not, then the entire text is parsed with an IPython lexer.

    The goal is to reduce the number of lexers that are registered
    with Pygments.

    zIPy session�ipyc���t|dd��|_|jr	dg|_n	ddg|_tj|fi|��tdi|��|_t
di|��|_dS)Nr/F�ipy3�ipy2r�rB)rr/r)rrHrr)rIrJs  r4rHzIPyLexer.__init__�s��#�G�Y��>�>����<�	+�"�8�D�L�L�"�E�?�D�L�
��t�'�'�w�'�'�'�(�3�3�7�3�3���#6�#A�#A��#A�#A�� � � r5c#��K�tjd|���tj��r|j}n|j}|�|��D]}|V��dS)Nz.*(In \[[0-9]+\]:))rZrs�strip�DOTALLrrrk)rIr��lexr�s    r4rkzIPyLexer.get_tokens_unprocessedsm�����8�)�4�:�:�<�<���C�C�	$��*�C�C��#�C��/�/��5�5�	�	�E��K�K�K�K�	�	r5N)r7r8r9r+r(r)rHrkrBr5r4r r �sM������
�
��D��g�G�
B�
B�
B�����r5r )'r+rZ�pygments.lexersrrrrrrr	r
�pygments.lexerrrr
rrr�pygments.tokenrrrrrrrr�
pygments.utilrr[r��__all__rrrrrrr rBr5r4�<module>r�si����@
�	�	�	���������������������������������������������������������'�&�&�&�&�&��"�*�W�
�
��.�.�.��
@)�@)�@)�F ���-�-�-�
���u�-�-�-��.�.�.�.�.�:�.�.�.�b J� J� J� J� J�O� J� J� J�DU�U�U�U�U�%�U�U�U�n#�#�#�#�#�u�#�#�#�#�#r5

Youez - 2016 - github.com/yon3zu
LinuXploit