AlkantarClanX12

Your IP : 3.147.47.177


Current Path : /opt/alt/python39/lib64/python3.9/lib2to3/pgen2/__pycache__/
Upload File :
Current File : //opt/alt/python39/lib64/python3.9/lib2to3/pgen2/__pycache__/parse.cpython-39.opt-2.pyc

a

R�f��@s0ddlmZGdd�de�ZGdd�de�ZdS)�)�tokenc@seZdZdd�Zdd�ZdS)�
ParseErrorcCs4t�|d||||f�||_||_||_||_dS)Nz!%s: type=%r, value=%r, context=%r)�	Exception�__init__�msg�type�value�context)�selfrrrr	�r�8/opt/alt/python39/lib64/python3.9/lib2to3/pgen2/parse.pyrs
�zParseError.__init__cCst|�|j|j|j|jffS�N)rrrr	)r
rrr�
__reduce__szParseError.__reduce__N)�__name__�
__module__�__qualname__rrrrrrrsrc@sHeZdZddd�Zddd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dS)�ParserNcCs||_|pdd�|_dS)NcSs|Sr
r)�grammar�noderrr�<lambda>Z�z!Parser.__init__.<locals>.<lambda>)r�convert)r
rrrrrr<szParser.__init__cCsH|dur|jj}|ddgf}|jj|d|f}|g|_d|_t�|_dS)N�)r�start�dfas�stack�rootnode�set�
used_names)r
r�newnodeZ
stackentryrrr�setup\s
zParser.setupcCs0|�|||�}|jd\}}}|\}}	||}
|
D]�\}}|jj|\}
}||kr�|�||||�|}||d|fgkr�|��|js�dS|jd\}}}|\}}	qfdS|
dkr2|jj|
}|\}}||vr2|�|
|jj|
||�qq2d|f|
v�r|��|j�s*td|||��qtd|||��qdS)N���rTF�ztoo much inputz	bad input)	�classifyrr�labels�shift�popr�pushr)r
rrr	�ilabel�dfa�staterZstates�firstZarcs�i�newstate�t�vZitsdfaZ	itsstatesZitsfirstrrr�addtokents:
�zParser.addtokencCsX|tjkr0|j�|�|jj�|�}|dur0|S|jj�|�}|durTtd|||��|S)Nz	bad token)	r�NAMEr�addr�keywords�get�tokensr)r
rrr	r(rrrr#�s
zParser.classifyc	CsT|jd\}}}|||df}|�|j|�}|dur@|d�|�|||f|jd<dS�Nr!)rrr�append)	r
rrr-r	r)r*rrrrrr%�szParser.shiftc	CsB|jd\}}}|d|gf}|||f|jd<|j�|d|f�dS)Nr!r)rr7)	r
rZnewdfar-r	r)r*rrrrrr'�szParser.pushcCs`|j��\}}}|�|j|�}|dur\|jrL|jd\}}}|d�|�n||_|j|j_dSr6)rr&rrr7rr)r
ZpopdfaZpopstateZpopnoderr)r*rrrrr&�sz
Parser.pop)N)N)
rrrrr r0r#r%r'r&rrrrrs
 
0	rN)�rrr�objectrrrrr�<module>s