AlkantarClanX12

Your IP : 3.128.201.207


Current Path : /opt/alt/python312/lib64/python3.12/lib2to3/pgen2/__pycache__/
Upload File :
Current File : //opt/alt/python312/lib64/python3.12/lib2to3/pgen2/__pycache__/tokenize.cpython-312.opt-1.pyc

�

�Q�fR���dZdZdZddlZddlZddlmZmZddl�ddl	m
Z
ee
�D�cgc]
}|dd	k7s�|��c}gd
�zZ[
	e
d�Zd�Zd
�Zd�ZdZdZeedez�zee�zZdZdZdZdZedd�Zeeeee�ZdZedd�ee�zZdezZeee�Z ede dz�Z!ee!e e�Z"dZ#dZ$d Z%d!Z&d"Z'ee'd#ze'd$z�Z(ee'd%ze'd&z�Z)ed'd(d)d*d+d,d-d.d/�	Z*d0Z+ed1d2d3�Z,ee*e+e,�Z-ee"e-e)e�Z.ee.zZ/ee'd4zed5d�ze'd6zed7d�z�Z0edee(�Z1eee1e"e-e0e�zZ2e3ejhe/e2e%e&f�\Z5Z6Z7Z8ed8d9d:d;�ed8d9d<d=�zhd>�zZ9ejhe#�ejhe$�e7e8d?�e9D�cic]}|�d#�e7��
c}�e9D�cic]}|�d$�e8��
c}�e9D�cic]}|d��c}�Z:d#d$he9D�chc]}|�d#���	c}ze9D�chc]}|�d$���	c}zZ;d5d7he9D�chc]}|�d5���	c}ze9D�chc]}|�d7���	c}zZ<d@Z=GdA�dBe>�Z?GdC�dDe>�Z@dE�ZAeAfdF�ZBdG�ZCGdH�dI�ZDejhdJej��ZFejhdKej��ZGdL�ZHdM�ZIdN�ZJdO�ZKeLdPk(r\ddlMZMeNeMj��dkDr&eBePeMj�d�j��yeBeMj�j��yycc}w#e$reZ
Y���wxYwcc}wcc}wcc}wcc}wcc}wcc}wcc}w)Qa�Tokenization help for Python programs.

generate_tokens(readline) is a generator that breaks a stream of
text into Python tokens.  It accepts a readline-like method which is called
repeatedly to get the next line of input (or "" for EOF).  It generates
5-tuples with these members:

    the token type (see token.py)
    the token (a string)
    the starting (row, column) indices of the token (a 2-tuple of ints)
    the ending (row, column) indices of the token (a 2-tuple of ints)
    the original line (string)

It is designed to match the working of the Python tokenizer exactly, except
that it produces COMMENT tokens for comments and gives type OP for all
operators

Older entry points
    tokenize_loop(readline, tokeneater)
    tokenize(readline, tokeneater=printtoken)
are the same, except instead of generating tokens, tokeneater is a callback
function to which the 5 fields described above are passed as 5 arguments,
each time a new token is found.zKa-Ping Yee <ping@lfw.org>z@GvR, ESR, Tim Peters, Thomas Wouters, Fred Drake, Skip Montanaro�N)�BOM_UTF8�lookup)�*�)�token�_)�tokenize�generate_tokens�
untokenizec�0�ddj|�zdzS)N�(�|�))�join��choicess �=/opt/alt/python312/lib64/python3.12/lib2to3/pgen2/tokenize.py�groupr0s��C�#�(�(�7�"3�3�c�9�9�c��t|�dzS)Nr�rrs r�anyr1s��%��/�C�/�/rc��t|�dzS)N�?rrs r�mayber2s��E�7�O�c�1�1rc�,��t�fd��D��S)Nc3��K�|]5}�dzD]+}|j�|j�k7s�%||z���-�7y�w))�N)�casefold)�.0�x�y�ls   �r�	<genexpr>z _combinations.<locals>.<genexpr>4s8�������!�!�e�)�Q�q�z�z�|�q�z�z�|�/K��A��)��q�s�.>�>)�set)r#s`r�
_combinationsr&3s��������rz[ \f\t]*z	#[^\r\n]*z\\\r?\nz\w+z0[bB]_?[01]+(?:_[01]+)*z(0[xX]_?[\da-fA-F]+(?:_[\da-fA-F]+)*[lL]?z0[oO]?_?[0-7]+(?:_[0-7]+)*[lL]?z[1-9]\d*(?:_\d+)*[lL]?z0[lL]?z[eE][-+]?\d+(?:_\d+)*z\d+(?:_\d+)*\.(?:\d+(?:_\d+)*)?z\.\d+(?:_\d+)*z\d+(?:_\d+)*z\d+(?:_\d+)*[jJ]z[jJ]z[^'\\]*(?:\\.[^'\\]*)*'z[^"\\]*(?:\\.[^"\\]*)*"z%[^'\\]*(?:(?:\\.|'(?!''))[^'\\]*)*'''z%[^"\\]*(?:(?:\\.|"(?!""))[^"\\]*)*"""z'(?:[uUrRbBfF]|[rR][fFbB]|[fFbBuU][rR])?�'''�"""z'[^\n'\\]*(?:\\.[^\n'\\]*)*'z"[^\n"\\]*(?:\\.[^\n"\\]*)*"z\*\*=?z>>=?z<<=?z<>z!=z//=?z->z[+\-*/%&@|^=<>]=?�~z[][(){}]z\r?\nz:=z[:;.,`@]z'[^\n'\\]*(?:\\.[^\n'\\]*)*�'z"[^\n"\\]*(?:\\.[^\n"\\]*)*�"�r�R�f�F�b�B>�U�u�UR�Ur�uR�ur)r*r+r'r(�c��eZdZy)�
TokenErrorN��__name__�
__module__�__qualname__�rrr:r:���rr:c��eZdZy)�StopTokenizingNr;r?rrrBrB�r@rrBc�`�|\}}|\}}td||||t|t|�fz�y)Nz%d,%d-%d,%d:	%s	%s)�print�tok_name�repr)	�typer�xxx_todo_changeme�xxx_todo_changeme1�line�srow�scol�erow�ecols	         r�
printtokenrO�s<��$�L�T�4�%�L�T�4�	�
 �	
�t�T�4��$���e��=�>�?rc�<�	t||�y#t$rYywxYw)a:
    The tokenize() function accepts two parameters: one representing the
    input stream, and one providing an output mechanism for tokenize().

    The first parameter, readline, must be a callable object which provides
    the same interface as the readline() method of built-in file objects.
    Each call to the function should return one line of input as a string.

    The second parameter, tokeneater, must also be a callable object. It is
    called once for each token, with five arguments, corresponding to the
    tuples generated by generate_tokens().
    N)�
tokenize_looprB)�readline�
tokeneaters  rr	r	�s#��
��h�
�+���
��
�s��	�c�.�t|�D]}||��	y�N)r
)rRrS�
token_infos   rrQrQ�s��%�h�/�
��J��0rc�$�eZdZd�Zd�Zd�Zd�Zy)�Untokenizerc�.�g|_d|_d|_y)Nrr)�tokens�prev_row�prev_col)�selfs r�__init__zUntokenizer.__init__�s�������
���
rc�n�|\}}||jz
}|r|jjd|z�yy)N� )r\rZ�append)r]�start�row�col�
col_offsets     r�add_whitespacezUntokenizer.add_whitespace�s8�����S��4�=�=�(�
���K�K���s�Z�/�0�rc�f�|D]�}t|�dk(r|j||�np|\}}}}}|j|�|jj	|�|\|_|_|ttfvs�w|xj
dz
c_d|_��dj|j�S)N�rrr)
�len�compatrfrZrar[r\�NEWLINE�NLr)r]�iterable�t�tok_typerrb�endrJs        rrzUntokenizer.untokenize�s����A��1�v��{����A�x�(��01�-�H�e�U�C������&��K�K���u�%�+.�(�D�M�4�=��G�R�=�(��
�
��"�
� !��
���w�w�t�{�{�#�#rc��d}g}|jj}|\}}|ttfvr|dz
}|tt
fvrd}|D]�}|dd\}}|ttttfvr|dz
}|tk(r|j|��C|tk(r|j��]|tt
fvrd}n|r|r
||d�d}||���y)NFr`Trh���)rZra�NAME�NUMBERrkrl�ASYNC�AWAIT�INDENT�DEDENT�pop)	r]rrm�	startline�indents�toks_append�toknum�tokval�toks	         rrjzUntokenizer.compat�s����	����k�k�(�(�������d�F�^�#��c�M�F��g�r�]�"��I��C� ��!�W�N�F�F��$���u�5�5��#�
��������v�&���6�!����
���G�R�=�(� �	��w��G�B�K�(�!�	����#rN)r<r=r>r^rfrrjr?rrrXrX�s���
1�$� rrXz&^[ \t\f]*#.*?coding[:=][ \t]*([-\w.]+)s^[ \t\f]*(?:[#\r\n]|$)c��|ddj�jdd�}|dk(s|jd�ry|dvs|jd�ry	|S)
z(Imitates get_normal_name in tokenizer.c.N�r�-�utf-8zutf-8-)zlatin-1�
iso-8859-1ziso-latin-1)zlatin-1-ziso-8859-1-ziso-latin-1-r�)�lower�replace�
startswith)�orig_enc�encs  r�_get_normal_namer��sX���3�B�-�
�
�
�
'�
'��S�
1�C�
�g�~�����1��
�6�6�
�~�~�A�B���Orc����d�d}d}�fd�}�fd�}|�}|jt�r	d�|dd}d}|s|gfS||�}|r||gfStj|�s||gfS|�}|s||gfS||�}|r|||gfS|||gfS)	a
    The detect_encoding() function is used to detect the encoding that should
    be used to decode a Python source file. It requires one argument, readline,
    in the same way as the tokenize() generator.

    It will call readline a maximum of twice, and return the encoding used
    (as a string) and a list of any lines (left as bytes) it has read
    in.

    It detects the encoding from the presence of a utf-8 bom or an encoding
    cookie as specified in pep-0263. If both a bom and a cookie are present, but
    disagree, a SyntaxError will be raised. If the encoding cookie is an invalid
    charset, raise a SyntaxError.  Note that if a utf-8 bom is found,
    'utf-8-sig' is returned.

    If no encoding is specified, then the default of 'utf-8' will be returned.
    FNr�c�F��	��S#t$r
t�cYSwxYwrU)�
StopIteration�bytes)rRs�r�read_or_stopz%detect_encoding.<locals>.read_or_stops&���	��:����	��7�N�	�s�
� � c�>��	|jd�}tj|�}|syt	|jd��}	t
|�}�r|jdk7rtd��|dz
}|S#t$rYywxYw#t$rtd|z��wxYw)N�asciirzunknown encoding: r�zencoding problem: utf-8z-sig)
�decode�UnicodeDecodeError�	cookie_re�matchr�rr�LookupError�SyntaxError�name)rJ�line_stringr��encoding�codec�	bom_founds     �r�find_cookiez$detect_encoding.<locals>.find_cookies����	��+�+�g�.�K�����,����#�E�K�K��N�3��	?��8�$�E�
��z�z�W�$�!�";�<�<����H����#"�	��	���	?��2�X�=�>�>�	?�s�A5�B�5	B�B�BT�z	utf-8-sig)r�r�blank_rer�)rRr��defaultr�r��first�secondr�s`      @r�detect_encodingr��s����$�I��H��G���,
�N�E�����!��	��a�b�	�������{���5�!�H���%�� � ��>�>�%� ������
�^�F��������6�"�H���%���(�(��U�F�O�#�#rc�8�t�}|j|�S)a�Transform tokens back into Python source code.

    Each element returned by the iterable must be a token sequence
    with at least two elements, a token number and token value.  If
    only two tokens are passed, the resulting output is poor.

    Round-trip invariant for full input:
        Untokenized source will match input source exactly

    Round-trip invariant for limited input:
        # Output text will tokenize the back to the input
        t1 = [tok[:2] for tok in generate_tokens(f.readline)]
        newcode = untokenize(t1)
        readline = iter(newcode.splitlines(1)).next
        t2 = [tok[:2] for tokin generate_tokens(readline)]
        assert t1 == t2
    )rXr)rm�uts  rrr:s��$
��B�
�=�=��"�"rc#�v
K�dx}x}}d\}}d}dg}d}d}	d}
d}		|�}|dz}dt|�}}
|r�|std��j|�}|r4|j	d�x}
}t
||d|z||f||zf��d\}}d}�n�|r0|ddd	k7r(|d
ddk7r t||z|t|�f|f��d}d}��||z}||z}��|dk(�r�|�s�|s�nd}|
|krA||
dk(r|dz}n(||
d
k(r|tzdztz}n||
dk(rd}nn|
dz}
|
|kr�A|
|k(r�n�|r|��d}||
dvr�||
dk(r]||
djd�}|
t|�z}t|||
f||
t|�zf|f��t||d||f|t|�f|f��n,ttf||
dk(||
d||
f|t|�f|f�����||dkDr%|j|�t|d|
|df||
f|f��||dkrC||vrtdd||
|f��|dd}|	r|
|dk\rd}	d}d}
td||
f||
f|f��||dkr�C|	r#|r!|
|dk\rd}	d}d}
n|std|df��d}|
|k�r�tj||
�}|�rI|j!d�\}}||f||f|}
}}|||||}}|t"j$vs
|dk(r|dk7rt&||||f���n|dvr)t(}|dkDrt}n|	rd}|r|��d}|||||f���n�|dk(r|r|��d}t||||f���n�|t*vrYt,|}|j||
�}|r/|j	d�}
|||
}|r|��d}t
||||
f|f���nu||f}||d}|}�no|t.vs|ddt.vs|ddt.vrR|ddk(r4||f}t,|xst,|dxst,|d}||dd}}|}�n|r|��d}t
||||f��n�|j1�r�|dvr|	r|dk(rt2nt4||||f�����t6||||f}|dk(r|s|}���|dvr=|r;|dt6k(r/|ddk(r'|dk(rd}	|d}
t2|d|d|d|df��d}|r|��d}|��nd|d k(r|r|��d}t||||
f|f��d}nE|d!vr|dz}n	|d"vr|dz
}|r|��d}t8||||f��nt||
||
f||
dzf|f��|
dz}
|
|kr������|r|��d}|ddD]}td|df|dfdf���t:d|df|dfdf��y#t$rd}Y��wxYw�w)#a4
    The generate_tokens() generator requires one argument, readline, which
    must be a callable object which provides the same interface as the
    readline() method of built-in file objects. Each call to the function
    should return one line of input as a string.  Alternately, readline
    can be a callable function terminating with StopIteration:
        readline = open(myfile).next    # Example of alternate readline

    The generator produces 5-tuples with these members: the token type; the
    token string; a 2-tuple (srow, scol) of ints specifying the row and
    column where the token begins in the source; a 2-tuple (erow, ecol) of
    ints specifying the row and column where the token ends in the source;
    and the line on which the token was found. The line passed is the
    physical line.
    r)rrNFrrzEOF in multi-line string���z\
���z\
r`�	�z#
�#z
rrz3unindent does not match any outer indentation levelz
<tokenize>zEOF in multi-line statement�.Trhr��
)�async�awaitr�)�def�forr���\z([{z)]})r�rir:r�rp�STRING�
ERRORTOKEN�tabsize�rstrip�COMMENTrlrarw�IndentationErrorrx�
pseudoprog�span�string�digitsrtrk�
triple_quoted�endprogs�
single_quoted�isidentifierrurvrs�OP�	ENDMARKER)rR�lnum�parenlev�	continued�contstr�needcont�contliner{�stashed�	async_def�async_def_indent�async_def_nlrJ�pos�max�strstart�endprog�endmatchrp�column�
comment_token�nl_pos�pseudomatchrb�spos�eposr�initial�newliner�indents                               rr
r
Osy���� #$�#�D�#�8�i���G�X��H��c�G��G��I����L�
�	��:�D��a�x���c�$�i�S���� �!;�X�F�F��}�}�T�*�H��$�L�L��O�+��c��w��d�s��3��$���h��o�?�?�$)�!������d�2�3�i�6�1�d�2�3�i�8�6K�!�7�T�>�#�d�C��I�%6��B�B������!�D�.��#�d�?���
��]�9����F���)���9��#�f�q�j�V��#�Y�$�&�&�'�/�A�2E�w�1N���#�Y�$�&�����A�g����)��c�z�5���
����C�y�G�#���9��#�$(���J�$5�$5�f�$=�M� �3�}�#5�5�F�"�M� �#�;��s�S��5G�/G�(H�$�P�P��t�F�G�}� �&�>�D�#�d�)�+<�d�D�D���=��c��c�)9�:�D���J� �#�;��s�4�y�(9�4�A�A������#����v�&��t�D�S�z�D�!�9�t�S�k�4�H�H��7�2�;�&���(�*�M�%�t�S�$�7�9�9�"�#�2�,���!1�W�R�[�!@� %�I�#(�L�'(�$��r�D�#�;��s��T�B�B��7�2�;�&��\�.>�'�"�+�.M�!�	�$��#$� �� �!>��q�	�J�J��I��C�i�$�*�*�4��5�K��(�-�-�a�0�
��s�#'��-�$���c�C�d��!%�e�C��$�u�+�w���f�m�m�+��s�N�u��|�!�5�$��d�;�;���&�%�G��!�|�"$��"�'+���%�
�"&��"�E�4��t�<�<���^��%�
�"&��"�E�4��t�<�<��m�+�&�u�o�G�&�}�}�T�3�7�H��&�l�l�1�o�� $�U�3���"�")�M�&*�G�%�u�d�T�3�K��F�F�$(�%�=��"&�u�v�,��#'����
�-��"�1�I��.��"�1�I��.��R�y�D�(�$(�%�=��#+�G�#4�$6���q��8J�$6�#+�E�!�H�#5� �,0���L�!���#'���"�")�M�&*�G�%�u�d�D�$�?�?��)�)�+�� 2�2�$�,1�W�,<�5�%�#(�$��d�#<�<�$����d�D�9�C���'��"%�� ���.�#�$+�A�J�$�$6�$+�A�J�'�$9�$��~�,0�	�3:�2�;� 0�#(�'�!�*�#*�1�:�w�q�z�#*�1�:�#/�/�'+�G��%�
�"&���I���_��%�
�"&���u�d�T�3�K��>�>� !�I��%�'�H�q�L�� �E�)�h��l�8��%�
�"&���u�d�D�$�7�7�!�4��9� �#�;��s�1�u�
�t�=�=��A�g��S�C�i�i�~��
����!�"�+���r�D�!�9�t�Q�i��4�4���b�4��)�d�A�Y��
3�3��E�	��D�	�s<�T9�T'�C:T9�D T9�J.T9�07T9�'T6�2T9�5T6�6T9�__main__)S�__doc__�
__author__�__credits__r��re�codecsrr�lib2to3.pgen2.tokenrr�dir�__all__r��	NameError�strrrrr&�
Whitespace�Comment�Ignore�Name�	Binnumber�	Hexnumber�	Octnumber�	Decnumber�	Intnumber�Exponent�
Pointfloat�Expfloat�Floatnumber�
Imagnumber�Number�Single�Double�Single3�Double3�
_litprefix�Triple�String�Operator�Bracket�Special�Funny�
PlainToken�Token�ContStr�PseudoExtras�PseudoToken�map�compile�	tokenprogr��single3prog�double3prog�_strprefixesr�r�r�r��	Exceptionr:rBrOr	rQrX�ASCIIr�r�r�r�rr
r<�sysri�argv�openrR�stdin)r!�prefixs00r�<module>rs���#�0*�
�F���#�!���%�j�
0�j��A�a�D�C�K�1�j�
0�4,�,��	��	�:�/�1��
�
�
��	�c�*�z�1�2�	2�U�7�^�	C��
��&�	�7�	�.�	��+�X�6�	��)�Y�	�9�=�	�#��
�5�7H�
I�E�RZ�O�
[�
��X�%���J��)��
�&��g�(=�
>�
�	�z�;�	�	2��
$��	#��
2��
2��
7�
�	�z�E�!�:��#5�	6��	�z�;�;��;�;�
=����G�W�e�U��%�%����
��
��%��
-��
�h���)��
�6�5�&�$�
/�
������
�;�;��c�:�&�'��;�;��c�:�&�'�(���Z��&�1���5��v�u�g�t�L�L��25��J�J���W�g�6�38�/�	�:�{�K��#�s�C��%��#�s�C��%�&�&�'�
�����F�#�*�"�*�*�V�*<��{�9�9E�F��v�&���~�{�*��F�9�:F�F��v�&���~�{�*��F�9�+7�7�,��v�t�|�,�7�	9���E�N�".�/�,���x�s�^�,�/�0�".�/�,���x�s�^�,�/�0��	�#�J� ,�-��f��x�q�\��-�.� ,�-��f��x�q�\��-�.����!��!�%�Y�%�?�#-�
�& �6 �6 �p
�B�J�J�@�"�(�(�K�	��2�:�:�0�"�(�(�;��	�G$�R#�*`4�D�z���
�3�8�8�}�q��(�4������#4�#=�#=�>�
�3�9�9�%�%�
&���Y1����
�E���\G��F��7��0��/��.��-sF�
L$�L$�L)�
L7�
L<�)
M�>M�M�*M�>M�)L4�3L4