AlkantarClanX12

Your IP : 3.138.126.51


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

�

c��f�%��F�	ddlZddlmZmZGd�dej��ZdS)�N)�grammar�tokenc�(�eZdZ	d�Zd�Zd�Zd�ZdS)�	Converterc��	|�|��|�|��|���dS�N)�parse_graminit_h�parse_graminit_c�
finish_off)�self�
graminit_h�
graminit_cs   �9/opt/alt/python311/lib64/python3.11/lib2to3/pgen2/conv.py�runz
Converter.run/sC��J����j�)�)�)����j�)�)�)���������c	���		t|��}n-#t$r }td|�d|����Yd}~dSd}~wwxYwi|_i|_d}|D]�}|dz
}tjd|��}|s>|���r*t|�d|�d|��������\|���\}}t|��}||j|<||j|<��d	S)
N�Can't open �: Fr�z^#define\s+(\w+)\s+(\d+)$�(z): can't parse T)
�open�OSError�print�
symbol2number�
number2symbol�re�match�strip�groups�int)	r�filename�f�err�lineno�line�mo�symbol�numbers	         rr	zConverter.parse_graminit_h5s4��	�	��X���A�A���	�	�	��E����3�3�7�8�8�8��5�5�5�5�5�����	���� ���������	4�	4�D��a�K�F���6��=�=�B��	
4�$�*�*�,�,�	
4��(�(�(�F�F�F�26�*�*�,�,�,�@�A�A�A�A�"$���������V����.4��"�6�*�-3��"�6�*�*��ts��
=�8�=c�
�		t|��}n-#t$r }td|�d|����Yd}~dSd}~wwxYwd}|dzt|��}}|dzt|��}}|dzt|��}}i}g}|�d���rf|�d���rtjd|��}ttt|�
������\}	}
}g}t|��D]y}
|dzt|��}}tjd|��}ttt|�
������\}}|�||f���z|dzt|��}}|||	|
f<|dzt|��}}|�d����tjd	|��}ttt|�
������\}}g}t|��D]�}
|dzt|��}}tjd
|��}ttt|�
������\}}	}
||	|
f}|�|����|�|��|dzt|��}}|dzt|��}}|�d����f||_
i}tjd|��}t|�d����}t|��D�]#}|dzt|��}}tjd|��}|�d
��}ttt|�dddd������\}}}}||}|dzt|��}}tjd|��}i}t|�d����}t!|��D]9\}}t#|��}td��D]}|d|zzrd||dz|z<��:||f||<��%|dzt|��}}||_g}|dzt|��}}tjd|��}t|�d����}t|��D]�}|dzt|��}}tjd|��}|�
��\}}t|��}|dkrd}nt|��}|�||f����|dzt|��}}||_|dzt|��}}|dzt|��}}tjd|��}t|�d����}|dzt|��}}|dzt|��}}tjd|��}t|�d����}|dzt|��}}tjd|��}t|�d����} | |_|dzt|��}}	|dzt|��}}dS#t*$rYdSwxYw)NrrFrrzstatic arc z)static arc arcs_(\d+)_(\d+)\[(\d+)\] = {$z\s+{(\d+), (\d+)},$z'static state states_(\d+)\[(\d+)\] = {$z\s+{(\d+), arcs_(\d+)_(\d+)},$zstatic dfa dfas\[(\d+)\] = {$z0\s+{(\d+), "(\w+)", (\d+), (\d+), states_(\d+),$����z\s+("(?:\\\d\d\d)*")},$�z!static label labels\[(\d+)\] = {$z\s+{(\d+), (0|"\w+")},$�0z
\s+(\d+),$z\s+{(\d+), labels},$z	\s+(\d+)$)rrr�next�
startswithrr�list�mapr r�range�append�states�group�eval�	enumerate�ord�dfas�labels�start�
StopIteration)!rr!r"r#r$r%�allarcsr6r&�n�m�k�arcs�_�i�j�s�t�stater;�ndfasr'r(�x�y�z�first�	rawbitset�c�byter<�nlabelsr=s!                                 rr
zConverter.parse_graminit_cTs���	�6	��X���A�A���	�	�	��E����3�3�7�8�8�8��5�5�5�5�5�����	�������a�x��a������a�x��a������a�x��a����������o�o�m�,�,�!	-��/�/�-�0�0�
1��X�J�"�$�$���s�3��	�	���4�4�5�5���1�a����q���(�(�A�#)�!�8�T�!�W�W�D�F���"8�$�?�?�B���C������ 5� 5�6�6�D�A�q��K�K��A��'�'�'�'�%�a�x��a�����"&���A���%�a�x��a������/�/�-�0�0�
1� ��D�d�K�K�B���C������-�-�.�.�D�A�q��E��1�X�X�
#�
#��%�a�x��a������X�?��F�F���s�3��	�	���4�4�5�5���1�a��q�!�t�}�����T�"�"�"�"��M�M�%� � � �!�!�8�T�!�W�W�D�F�!�!�8�T�!�W�W�D�F�C�o�o�m�,�,�!	-�D�����
�X�6��
=�
=���B�H�H�Q�K�K� � ���u���	*�	*�A�!�!�8�T�!�W�W�D�F���M�� � �B��X�X�a�[�[�F�"�3�s�B�H�H�Q��1�a�,@�,@�#A�#A�B�B�O�F�A�q�!��1�I�E�!�!�8�T�!�W�W�D�F���4�d�;�;�B��E��R�X�X�a�[�[�)�)�I�!�)�,�,�
+�
+���1��1�v�v���q���+�+�A��q�!�t�}�+�)*��a��c�A�g���+�"�5�>�D��L�L��a�x��a�������	����a�x��a�����
�X�:�D�
A�
A���b�h�h�q�k�k�"�"���w���
	"�
	"�A�!�!�8�T�!�W�W�D�F���4�d�;�;�B��9�9�;�;�D�A�q��A���A��C�x�x������G�G���M�M�1�a�&�!�!�!�!��a�x��a���������a�x��a������a�x��a�����
�X�m�T�
*�
*���B�H�H�Q�K�K� � ���a�x��a������a�x��a�����
�X�-�t�
4�
4���b�h�h�q�k�k�"�"���a�x��a�����
�X�l�D�
)�
)���B�H�H�Q�K�K� � ����
��a�x��a�����	%�!�!�8�T�!�W�W�D�F�F�F���	�	�	��D�D�	���s"��
=�8�=�*[�
[�
[c��	i|_i|_t|j��D]1\}\}}|tjkr
|�||j|<�%|�
||j|<�2dSr)�keywords�tokensr9r<r�NAME)r�ilabel�type�values    rrzConverter.finish_off�sr��?���
����%.�t�{�%;�%;�	+�	+�!�F�M�T�5��u�z�!�!�e�&7�'-��
�e�$�$���$*���D�!��		+�	+rN)�__name__�
__module__�__qualname__rr	r
r�rrrr$sY�������������>c%�c%�c%�J+�+�+�+�+rr)r�pgen2rr�Grammarrr]rr�<module>r`so���4
�	�	�	�!� � � � � � � �]+�]+�]+�]+�]+���]+�]+�]+�]+�]+r