Hacked By AnonymousFox

Current Path : /opt/alt/python310/lib64/python3.10/lib2to3/pgen2/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/lib2to3/pgen2/__pycache__/parse.cpython-310.opt-2.pyc

o

6��f��@s2	ddlmZGdd�de�ZGdd�de�ZdS)�)�tokenc@seZdZ	dd�Zdd�ZdS)�
ParseErrorcCs4t�|d||||f�||_||_||_||_dS)Nz!%s: type=%r, value=%r, context=%r)�	Exception�__init__�msg�type�value�context)�selfrrrr	�r�:/opt/alt/python310/lib64/python3.10/lib2to3/pgen2/parse.pyrs
�
zParseError.__init__cCst|�|j|j|j|jffS�N)rrrr	)r
rrr�
__reduce__szParseError.__reduce__N)�__name__�
__module__�__qualname__rrrrrrrsrc@sJeZdZ	ddd�Zddd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dS)�ParserNcCs	||_|p	dd�|_dS)NcSs|Sr
r)�grammar�noderrr�<lambda>Zsz!Parser.__init__.<locals>.<lambda>)r�convert)r
rrrrrr<szParser.__init__cCsJ	|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.setupcCs<	|�|||�}	|jd\}}}|\}}	||}
|
D]e\}}|jj|\}
}||kr`|�||||�|}||d|fgkr]|��|jsHdS|jd\}}}|\}}	||d|fgks>dS|
dkr�|jj|
}|\}}||vr�|�|
|jj|
||�nqd|f|
vr�|��|js�td|||��ntd|||��q	)NT���rF�ztoo much inputz	bad input)	�classifyrr�labels�shift�popr�pushr)r
rrr	�ilabel�dfa�staterZstates�firstZarcs�i�newstate�t�vZitsdfaZ	itsstatesZitsfirstrrr�addtokentsF�����zParser.addtokencCsZ	|tjkr|j�|�|jj�|�}|dur|S|jj�|�}|dur+td|||��|S)Nz	bad token)	r�NAMEr�addr�keywords�get�tokensr)r
rrr	r'rrrr"�s
zParser.classifyc	CsV	|jd\}}}|||df}|�|j|�}|dur!|d�|�|||f|jd<dS�Nr )rrr�append)	r
rrr,r	r(r)rrrrrr$�szParser.shiftc	CsD	|jd\}}}|d|gf}|||f|jd<|j�|d|f�dS)Nr r)rr6)	r
rZnewdfar,r	r(r)rrrrrr&�s
zParser.pushcCsh	|j��\}}}|�|j|�}|dur2|jr(|jd\}}}|d�|�dS||_|j|j_dSdSr5)rr%rrr6rr)r
ZpopdfaZpopstateZpopnoderr(r)rrrrr%�s�z
Parser.popr
)
rrrrrr/r"r$r&r%rrrrrs

 0	rN)�rrr�objectrrrrr�<module>s


Hacked By AnonymousFox1.0, Coded By AnonymousFox