Your IP : 52.15.49.90


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

�

�Q�f���>�	ddlmZGd�de�ZGd�de�Zy)�)�tokenc��eZdZ	d�Zd�Zy)�
ParseErrorc
�~�tj||�d|�d|�d|���||_||_||_||_y)Nz: type=z, value=z
, context=)�	Exception�__init__�msg�type�value�context)�selfr	r
rrs     �:/opt/alt/python312/lib64/python3.12/lib2to3/pgen2/parse.pyrzParseError.__init__s<�����4���u�g�"7�	8������	���
����c�t�t|�|j|j|j|jffS�N)r
r	rr)r
s r�
__reduce__zParseError.__reduce__s*���D�z�D�H�H�d�i�i����T�\�\�J�J�JrN)�__name__�
__module__�__qualname__rr�rrrrs��2��Krrc�<�eZdZ	d	d�Zd	d�Zd�Zd�Zd�Zd�Zd�Z	y)
�ParserNc�,�	||_|xsd�|_y)Nc��|Srr)�grammar�nodes  r�<lambda>z!Parser.__init__.<locals>.<lambda>Zs��r)r�convert)r
rrs   rrzParser.__init__<s��	�8����>�#=��rc��	|�|jj}|ddgf}|jj|d|f}|g|_d|_t�|_y)N�)r�start�dfas�stack�rootnode�set�
used_names)r
r!�newnode�
stackentrys    r�setupzParser.setup\sa��	��=��L�L�&�&�E��$��b�)���l�l�'�'��.��7�;�
� �\��
���
��%��rc��	|j|||�}	|jd\}}}|\}}	||}
|
D]�\}}|jj|\}
}||k(re|j	||||�|}||d|fgk(rB|j�|jsy|jd\}}}|\}}	||d|fgk(r�By|
dk\s��|jj|
}|\}}||vs��|j|
|jj|
||�n?d|f|
vr*|j�|jstd|||��td|||����B)NT���r F�ztoo much inputz	bad input)	�classifyr#r�labels�shift�popr"�pushr)r
r
rr�ilabel�dfa�stater�states�first�arcs�i�newstate�t�v�itsdfa�	itsstates�itsfirsts                  r�addtokenzParser.addtokents���J����t�U�G�4���#�z�z�"�~��C����M�F�E��%�=�D�#���8��|�|�*�*�1�-���1��Q�;��J�J�t�U�H�g�>�$�E� ��-�Q��J�<�7����
�#�z�z�#'�+/�:�:�b�>�(��U�D�(+�
���
!��-�Q��J�<�7�!��#�X�!�\�\�.�.�q�1�F�*0�'�I�x���)��	�	�!�T�\�\�%6�%6�q�%9�8�W�M��3 $�6�u�:��%��H�H�J��:�:�(�)9�)-�u�g�?�?�%�[�$��w�G�G�Src� �	|tjk(rD|jj|�|jj
j
|�}|�|S|jjj
|�}|�td|||��|S)Nz	bad token)	r�NAMEr&�addr�keywords�get�tokensr)r
r
rrr2s     rr-zParser.classify�s}��4��5�:�:���O�O����&��\�\�*�*�.�.�u�5�F��!��
����$�$�(�(��.���>��[�$��w�?�?��
rc��	|jd\}}}|||df}|j|j|�}|�|dj|�|||f|jd<y�Nr+)r#rr�append)	r
r
rr9rr3r4rr's	         rr/zParser.shift�se��(��:�:�b�>���U�D�����.���,�,�t�|�|�W�5������H�O�O�G�$��x��.��
�
�2�rc��	|jd\}}}|d|gf}|||f|jd<|jj|d|f�y)Nr+r )r#rH)	r
r
�newdfar9rr3r4rr's	         rr1zParser.push�sT��-��:�:�b�>���U�D���w��+���x��.��
�
�2���
�
���6�1�g�.�/rc�,�	|jj�\}}}|j|j|�}|�W|jr(|jd\}}}|dj	|�y||_|j|j
_yyrG)r#r0rrrHr$r&)r
�popdfa�popstate�popnoder'r3r4rs        rr0z
Parser.pop�s}��,�$(�J�J�N�N�$4�!���'��,�,�t�|�|�W�5�����z�z�#'�:�:�b�>� ��U�D��R�����(� '��
�+/�?�?��
�
�(�
rr)
rrrrr)r?r-r/r1r0rrrrrs-���:?�@ �0.H�`�/�0�
;rrN)�rrr�objectrrrr�<module>rQs+����K��K�n;�V�n;r

?>