AlkantarClanX12

Your IP : 3.14.143.149


Current Path : /opt/alt/python311/lib64/python3.11/lib2to3/pgen2/__pycache__/
Upload File :
Current File : //opt/alt/python311/lib64/python3.11/lib2to3/pgen2/__pycache__/driver.cpython-311.opt-2.pyc

�

c��fQ����	dZddgZddlZddlZddlZddlZddlZddlmZm	Z	m
Z
mZmZGd�de
��Zd�Z		dd�Zd
�Zd�Zd�Zedkr$ejee������dSdS)z#Guido van Rossum <guido@python.org>�Driver�load_grammar�N�)�grammar�parse�token�tokenize�pgenc�>�eZdZd	d�Zd
d�Zd
d�Zd
d�Zdd�Zd
d�ZdS)rNc�Z�||_|�tj��}||_||_dS�N)r�logging�	getLogger�logger�convert)�selfrrrs    �;/opt/alt/python311/lib64/python3.11/lib2to3/pgen2/driver.py�__init__zDriver.__init__s.������>��&�(�(�F���������Fc�.�	tj|j|j��}|���d}d}dx}x}x}x}	}
d}|D�].}|\}}}}	}
|||fkr/|\}
}||
kr|d|
|z
zz
}|
}d}||kr||
||�z
}|}|t
jt
jfvr'||z
}|	\}}|�d��r|dz
}d}��|tj
krtj|}|r-|j�
dtj|||��|�||||f��r|r|j�
d��n>d}|	\}}|�d��r|dz
}d}��0tjd||||f���|jS)Nrr��
z%s %r (prefix=%r)zStop.zincomplete input)r�Parserrr�setupr	�COMMENT�NL�endswithr�OP�opmapr�debug�tok_name�addtoken�
ParseError�rootnode)r�tokensr �p�lineno�column�type�value�start�end�	line_text�prefix�	quintuple�s_lineno�s_columns               r�parse_tokenszDriver.parse_tokens&s��B��L���t�|�4�4��	���	�	�	�����15�5��5�u�5�u�5�s�Y����$	A�$	A�I�1:�.�D�%���Y����(�(�(�%*�"��(��H�$�$��d�h��&7�8�8�F�%�F��F��H�$�$��i��x��8�8�F�%�F���(�(�+�6�6�6��%���!$�����>�>�$�'�'���a�K�F��F���u�x����}�U�+���
G���!�!�"5�"'�.��"6��v�G�G�G��z�z�$�����7�7�
��/��K�%�%�g�.�.�.����F� �N�F�F��~�~�d�#�#�
��!�������"�#5�#'�����A�A�
A��z�rc�b�	tj|j��}|�||��Sr
)r	�generate_tokens�readliner2)r�streamr r%s    r�parse_stream_rawzDriver.parse_stream_rawVs-��8��)�&�/�:�:��� � ���/�/�/rc�0�	|�||��Sr
)r7)rr6r s   r�parse_streamzDriver.parse_stream[s��8��$�$�V�U�3�3�3rc��	tj|d|���5}|�||��cddd��S#1swxYwYdS)N�r)�encoding)�io�openr9)r�filenamer<r r6s     r�
parse_filezDriver.parse_file_s���6�
�W�X�s�X�
6�
6�
6�	4�&��$�$�V�U�3�3�	4�	4�	4�	4�	4�	4�	4�	4�	4�	4�	4�	4����	4�	4�	4�	4�	4�	4s�<�A�Ac��	tjtj|��j��}|�||��Sr
)r	r4r=�StringIOr5r2)r�textr r%s    r�parse_stringzDriver.parse_stringds8��8��)�"�+�d�*;�*;�*D�E�E��� � ���/�/�/r)NN)F)NF)	�__name__�
__module__�__qualname__rr2r7r9r@rD�rrrrs�����������.�.�.�.�`0�0�0�0�
4�4�4�4�4�4�4�4�
0�0�0�0�0�0rc���tj�|��\}}|dkrd}||zd�t	t
tj����zdzS)Nz.txtr�.z.pickle)�os�path�splitext�join�map�str�sys�version_info)�gt�head�tails   r�_generate_pickle_namerVjsV����!�!�"�%�%�J�D�$��v�~�~����$�;����#�c�3�+;�"<�"<�=�=�=�	�I�Ir�Grammar.txtTFc���	|�tj��}|�t|��n|}|st||��s�|�d|��tj|��}|rZ|�d|��	|�|��nV#t$r }|�d|��Yd}~n1d}~wwxYwn(tj
��}|�|��|S)Nz!Generating grammar tables from %szWriting grammar tables to %szWriting failed: %s)rrrV�_newer�infor
�generate_grammar�dump�OSErrorr�Grammar�load)rS�gp�save�forcer�g�es       rrrqs	��1�
�~��"�$�$��&(�j�	�r�	"�	"�	"�b�B���F�2�r�N�N�����7��<�<�<��!�"�%�%���	5��K�K�6��;�;�;�
5����r�
�
�
�
���
5�
5�
5����0�!�4�4�4�4�4�4�4�4�����
5����		5�
�O����	���r�
�
�
��Hs�?B�
B?�B:�:B?c��	tj�|��sdStj�|��sdStj�|��tj�|��kS)NFT)rKrL�exists�getmtime)�a�bs  rrYrY�sf��:�
�7�>�>�!�����u�
�7�>�>�!�����t�
�7���A���"�'�"2�"2�1�"5�"5�5�5rc�6�	tj�|��rt|��St	tj�|����}t
j||��}tj	��}|�
|��|Sr
)rKrL�isfilerrV�basename�pkgutil�get_datarr^�loads)�package�grammar_source�pickled_name�datarcs     r�load_packaged_grammarrt�s}��	�
�w�~�~�n�%�%�,��N�+�+�+�(���)9�)9�.�)I�)I�J�J�L���G�\�2�2�D�����A��G�G�D�M�M�M��Hrc��	|stjdd�}tjtjtjd���|D]}t
|dd����dS)Nrz%(message)s)�levelr6�formatT)rarb)rQ�argvr�basicConfig�INFO�stdoutr)�argsrSs  r�mainr}�sq������x����|����g�l�3�:�,�.�.�.�.��0�0���R�d�$�/�/�/�/�/��4r�__main__)rWNTFN)�
__author__�__all__r=rKrrmrQrrrrr	r
�objectrrVrrYrtr}rE�exit�intrHrr�<module>r�sA���3�
��^�
$��
�	�	�	�	�	�	�	���������
�
�
�
�4�3�3�3�3�3�3�3�3�3�3�3�3�3�J0�J0�J0�J0�J0�V�J0�J0�J0�ZJ�J�J�'+�04�
�
�
�
�*6�6�6�
�
�
�(����z����C�H�S�S�T�T�V�V��_�_�������r