403Webshell
Server IP : 178.105.222.151  /  Your IP : 216.73.216.38
Web Server : nginx/1.28.3
System : Linux MNK 7.0.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Wed Apr 22 16:06:43 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.5.4
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/lib/python3/dist-packages/jmespath/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/jmespath/__pycache__/parser.cpython-314.pyc
+
���b�J���Rt^RIt^RIHt^RIHt^RIHt^RIHt^RIHt!RR]	4t
]!R	R
]	44tR#)a�Top down operator precedence parser.

This is an implementation of Vaughan R. Pratt's
"Top Down Operator Precedence" parser.
(http://dl.acm.org/citation.cfm?doid=512927.512931).

These are some additional resources that help explain the
general idea behind a Pratt parser:

* http://effbot.org/zone/simple-top-down-parsing.htm
* http://javascript.crockford.com/tdop/tdop.html

A few notes on the implementation.

* All the nud/led tokens are on the Parser class itself, and are dispatched
  using getattr().  This keeps all the parsing logic contained to a single
  class.
* We use two passes through the data.  One to create a list of token,
  then one pass through the tokens to create the AST.  While the lexer actually
  yields tokens, we convert it to a list so we can easily implement two tokens
  of lookahead.  A previous implementation used a fixed circular buffer, but it
  was significantly slower.  Also, the average jmespath expression typically
  does not have a large amount of token so this is not an issue.  And
  interestingly enough, creating a token list first is actually faster than
  consuming from the token iterator one token at a time.

N)�lexer)�with_repr_method)�ast)�
exceptions)�visitorc�a�]tRt^%to/R^bR^bR^bR^bR^bR^bR^bR^bR	^bR
^bR^bR^bR
^bR^bR^bR^bR^bR^R^R^R^R^	R^R^R^(R^-R^2R^7R^</Ct^
t/t^�tRSRltRt	R t
R!tRTR"ltR#t
R$tR%tR&tR'tR(tR)tR*tR+tR,tR-tR.tR/tR0tR1tR2tR3tR4tR5tR6t R7t!R8t"R9t#R:t$R;t%R<t&R=t'R>t(R?t)R@t*RAt+RBt,RCt-RDt.REt/RFt0RURHlt1RIt2RJt3RKt4RLt5RMt6RNt7ROt8RPt9]:RQ4t;RRt<Vt=RG#)V�Parser�eof�unquoted_identifier�quoted_identifier�literal�rbracket�rparen�comma�rbrace�number�current�expref�colon�pipe�or�and�eq�gt�lt�gte�lte�ne�flatten�star�filter�dot�not�lbrace�lbracket�lparenc�L�RVnR.V,VnWn^VnR#�N)�	tokenizer�_tokens�_buffer_size�_index)�self�	lookaheads&&�1/usr/lib/python3/dist-packages/jmespath/parser.py�__init__�Parser.__init__Ns$������v�	�)���%�����c���VPPV4pVeV#VPV4pW0PV&\VP4VP8�dVP4V#r')�_CACHE�get�	_do_parse�len�	_MAX_SIZE�_free_cache_entries)r,�
expression�cached�
parsed_results&&  r.�parse�Parser.parseTs`��������,�����M����z�2�
�"/���J���t�{�{��d�n�n�,��$�$�&��r1c��VPV4# \Pd
pYnhRp?i\PdpTPT4hRp?i\Pd
pYnhRp?ii;ir')�_parser�
LexerErrorr9�IncompleteExpressionError�set_expression�
ParseError)r,r9�es&& r.r5�Parser._do_parse^sk��
	��;�;�z�*�*���$�$�	�%�L����3�3�	�
���Z�(����$�$�	�%�L���	�s6��A=�/�A=�A=�A�A=�0A=�1A8�8A=c��\P!4PV4Vn\	VP4Vn^VnVP^R7pVP4R8XgNVP^4p\P!VR,VR,VR,RVR,,4h\W4#)�)�
binding_powerr	�start�value�typezUnexpected token: %s)
r�Lexer�tokenizer(�listr)r+�_expression�_current_token�_lookahead_tokenrrC�ParsedResult)r,r9�parsed�ts&&  r.r?�
Parser._parseks�������/�/�
�;����D�N�N�+�������!�!��!�2���"�"�$��-��%�%�a�(�A��'�'��'�
�A�g�J��&�	�(>��7��(K�M�
M��J�/�/r1c��VP^4pVP4\VRVR,,VP4pV!V4pVP	4pWP
V,8dg\VRV,R4pVf%VP^4pVP
V4KSVP4V!V4pVP	4pK}V#)rGz
_token_nud_%srKz
_token_led_%sN)rQ�_advance�getattr�_error_nud_tokenrP�
BINDING_POWER�_error_led_token)r,rH�
left_token�nud_function�left�
current_token�led�error_tokens&&      r.rO�Parser._expressionvs����*�*�1�-�
��
�
����/�J�v�$6�6��!�!�#���J�'���+�+�-�
��0�0��?�?��$��-� ?��F�C��{�"�3�3�A�6���%�%�k�2��
�
���4�y�� $� 3� 3� 5�
��r1c�<�\P!VR,4#�rJ)rr�r,�tokens&&r.�_token_nud_literal�Parser._token_nud_literal�s���{�{�5��>�*�*r1c�<�\P!VR,4#rd)r�fieldres&&r.�_token_nud_unquoted_identifier�%Parser._token_nud_unquoted_identifier�s���y�y��w��(�(r1c���\P!VR,4pVP4R8Xd9VP^4p\P
!^VR,VR,R4hV#)rJr%rKz1Quoted identifier not allowed for function names.)rrjrPrQrrC)r,rfrjrTs&&  r.�_token_nud_quoted_identifier�#Parser._token_nud_quoted_identifier�se���	�	�%��.�)����� �H�,��%�%�a�(�A��'�'��1�W�:�q��y�C�E�
E��r1c���\P!4pVP4R8Xd\P!4pM"VPVPR,4p\P
!W#4#)r
r)r�identityrP�_parse_projection_rhsrZ�value_projection�r,rfr^�rights&&  r.�_token_nud_star�Parser._token_nud_star�sU���|�|�~����� �J�.��L�L�N�E��.�.�t�/A�/A�&�/I�J�E��#�#�D�0�0r1c�J�VP\P!44#r')�_token_led_filterrrqres&&r.�_token_nud_filter�Parser._token_nud_filter�s���%�%�c�l�l�n�5�5r1c�"�VP4#r')�_parse_multi_select_hashres&&r.�_token_nud_lbrace�Parser._token_nud_lbrace�s���,�,�.�.r1c�H�VP4pVPR4V#)r)rO�_match�r,rfr9s&& r.�_token_nud_lparen�Parser._token_nud_lparen�s"���%�%�'�
����H���r1c���\P!\P!44pVPVPR,4p\P
!W#4#�r)rrrqrrrZ�
projectionrts&&  r.�_token_nud_flatten�Parser._token_nud_flatten�sC���{�{�3�<�<�>�*���*�*����y�)�+���~�~�d�*�*r1c�r�VPVPR,4p\P!V4#)r")rOrZr�not_expression)r,rf�exprs&& r.�_token_nud_not�Parser._token_nud_not�s.������ 2� 2�5� 9�:���!�!�$�'�'r1c���VP4R9d6VP4pVP\P!4V4#VP4R8Xd�VP^4R8XdmVP
4VP
4VPVPR,4p\P!\P!4V4#VP4#)rrr
�rr)rP�_parse_index_expression�_project_if_slicerrq�
_lookaheadrWrrrZr��_parse_multi_select_list)r,rfrus&& r.�_token_nud_lbracket�Parser._token_nud_lbracket�s������ �$7�7��0�0�2�E�
�)�)�#�,�,�.�%�@�@�
�
 �
 �
"�f�
,�����"�j�0��M�M�O��M�M�O��.�.�t�/A�/A�&�/I�J�E��>�>�#�,�,�.�%�8�8��0�0�2�2r1c��VP^4R8XgVP^4R8XdVP4#\P!VP	^4R,4pVP4VP
R4V#)rGrrJr
)r��_parse_slice_expressionr�indexrQrWr�)r,�nodes& r.r��Parser._parse_index_expression�so��

�O�O�A��'�)�����"�g�-��/�/�1�1��9�9�T�2�2�1�5�g�>�?�D��M�M�O��K�K�
�#��Kr1c���.ROp^pVP4pVR8Xg�V^8d�VR8XdCV^,
pV^8Xd"VPVP^4R4VP4MSVR8Xd,VP^4R,W&VP4M!VPVP^4R4VP4pK�VP	R4\
P!V!#)Nr
r�syntax errorrrJ)NNN)rP�_raise_parse_error_for_tokenrQrWr�r�slice)r,�partsr�r_s&   r.r��Parser._parse_slice_expression�s���#�����+�+�-�
��:�-�%�!�)���'���
���A�:��5�5��-�-�a�0�.�B��
�
���(�*�#�4�4�Q�7��@����
�
���1�1��)�)�!�,�n�>� �/�/�1�M����J���y�y�%� � r1c�,�\P!4#r')r�current_noderes&&r.�_token_nud_current�Parser._token_nud_current�s�����!�!r1c�r�VPVPR,4p\P!V4#)r)rOrZrrr�s&& r.�_token_nud_expref�Parser._token_nud_expref�s,���%�%�d�&8�&8��&B�C�
��z�z�*�%�%r1c�~�VP4R8XgbVPVPR,4pVR,R8XdVR,PV4V#\P
!W.4#VP
4VPVPR,4p\P!W4#)rr!rK�
subexpression�children)	rP�_parse_dot_rhsrZ�appendrr�rWrrrs�r,r^rus&& r.�_token_led_dot�Parser._token_led_dot�s����"�"�$��.��'�'��(:�(:�5�(A�B�E��F�|��.��Z� �'�'��.����(�(�$��7�7�
�M�M�O��.�.��"�"�5�)�+�E��'�'��4�4r1c�r�VPVPR,4p\P!W4#)r)rOrZrrr�s&& r.�_token_led_pipe�Parser._token_led_pipes,��� � ��!3�!3�F�!;�<���x�x��$�$r1c�r�VPVPR,4p\P!W4#)r)rOrZr�
or_expressionr�s&& r.�
_token_led_or�Parser._token_led_or	s.��� � ��!3�!3�D�!9�:��� � ��-�-r1c�r�VPVPR,4p\P!W4#)r)rOrZr�and_expressionr�s&& r.�_token_led_and�Parser._token_led_and
s.��� � ��!3�!3�E�!:�;���!�!�$�.�.r1c���VR,R8wdNVPR4p\P!VR,VR,VR,RVR,,4hVR,p.pVP4R8XgJVP	4pVP4R8XdVPR4VP
V4K^VPR4\P!W44pV#)rKrjrIrJzInvalid function name '%s'rr���)	rQrrCrPrOr�r�r�function_expression)r,r^�prev_t�name�argsr9�
function_nodes&&     r.�_token_led_lparen�Parser._token_led_lparens�����<�7�"��*�*�2�.�F��'�'��w�����&��.�,�v�g��>�@�
@��G�}�����%�%�'�8�3��)�)�+�J��"�"�$��/����G�$��K�K�
�#����H���/�/��;�
��r1c��VP^4pVPR4VP4R8Xd\P!4pM"VPVPR,4p\P!WV4#)rGr
rr )rOr�rPrrqrrrZ�filter_projection)r,r^�	conditionrus&&  r.ry�Parser._token_led_filter%sh���$�$�Q�'�	����J����� �I�-��L�L�N�E��.�.�t�/A�/A�(�/K�L�E��$�$�T�)�<�<r1c�&�VPVR4#)r��_parse_comparator�r,r^s&&r.�
_token_led_eq�Parser._token_led_eq/����%�%�d�D�1�1r1c�&�VPVR4#)rr�r�s&&r.�
_token_led_ne�Parser._token_led_ne2r�r1c�&�VPVR4#)rr�r�s&&r.�
_token_led_gt�Parser._token_led_gt5r�r1c�&�VPVR4#)rr�r�s&&r.�_token_led_gte�Parser._token_led_gte8����%�%�d�E�2�2r1c�&�VPVR4#)rr�r�s&&r.�
_token_led_lt�Parser._token_led_lt;r�r1c�&�VPVR4#)rr�r�s&&r.�_token_led_lte�Parser._token_led_lte>r�r1c��\P!V4pVPVPR,4p\P!W4#r�)rrrrrZr�r�s&& r.�_token_led_flatten�Parser._token_led_flattenAs=���{�{�4� ���*�*����y�)�+���~�~�d�*�*r1c��VP^4pVR,R9dJVP4pVR,R8XdVR,PV4V#VPW4#VP	R4VP	R4VPVPR,4p\P!W4#)rGrK�index_expressionr�rr
r�)	rQr�r�r�r�rrrZrr�)r,r^rfrus&&  r.�_token_led_lbracket�Parser._token_led_lbracketGs����%�%�a�(����=�/�/��0�0�2�E��F�|�1�1��Z� �'�'��.����-�-�d�:�:�
�K�K����K�K�
�#��.�.�t�/A�/A�&�/I�J�E��>�>�$�.�.r1c��\P!W.4pVR,R8Xd8\P!VVPVPR,44#V#)rKr�r)rr�r�rrrZ)r,r^ru�
index_exprs&&& r.r��Parser._project_if_sliceZsW���)�)�4�-�8�
���=�G�#��>�>���*�*�4�+=�+=�f�+E�F�H�
H��r1c�t�VPVPV,4p\P!W!V4#r')rOrZr�
comparator)r,r^r�rus&&& r.r��Parser._parse_comparatorcs.��� � ��!3�!3�J�!?�@���~�~�j��6�6r1c���.pVP4pVPV4VP4R8XdMVPR4KKVPR4\P
!V4#)Tr
r)rOr�rPr�r�multi_select_list)r,�expressionsr9s&  r.r��Parser._parse_multi_select_listgsc������)�)�+�J����z�*��"�"�$�
�2�����G�$����J���$�$�[�1�1r1c���.pVP^4pVPRR.R7VR,pVPR4VP^4p\P
!W4R7pVP
V4VP4R8XdVPR4K�VP4R8XgK�VPR4\P!TR	7#)
Trr
)�token_typesrJr)�key_namer�rr)�nodes)	rQ�_match_multiple_tokensr�rOr�key_val_pairr�rP�multi_select_dict)r,�pairs�	key_tokenr�rJr�s&     r.r}�Parser._parse_multi_select_hashss�������-�-�a�0�I�
�'�'�0�2G�H�
(�
J� ��)�H��K�K�� ��$�$�Q�'�E��#�#�X�B�D��L�L����"�"�$��/����G�$��$�$�&�(�2����H�%���$�$�5�1�1r1c���VPVP4,VP8d\P!4pV#VP4R8XdVPV4pV#VP4R8XdVPV4pV#VP4R8Xd%VP
R4VPV4pV#VPVP^4R4X#)r$r r!r�)
rZrP�_PROJECTION_STOPrrqrOr�r�r�rQ)r,rHrus&& r.rr�Parser._parse_projection_rhs�s������d�1�1�3�4�t�7L�7L�L��L�L�N�E����
 �
 �
"�j�
0��$�$�]�3�E����
 �
 �
"�h�
.��$�$�]�3�E���
�
 �
 �
"�e�
+��K�K����'�'�
�6�E���
�-�-�d�.C�.C�A�.F�.<�
>��r1c�d�VP4pVR9dVPV4#VR8Xd"VPR4VP4#VR8Xd"VPR4VP	4#VP^4p.ROpRV:RVR,:2pVP
W54R#)	rr$r#�Expecting: �, got: rKN)rr
r)rr
r$r#)rPrOr�r�r}rQr�)r,rHr-rT�allowed�msgs&&    r.r��Parser._parse_dot_rhs�s����'�'�)�	��L�L��#�#�M�2�2�
�*�
$��K�K�
�#��0�0�2�2�
�(�
"��K�K��!��0�0�2�2��%�%�a�(�A�-�G�-4�Q�v�Y�?�
�
�-�-�a�5r1c��VR,R8Xd.\P!VR,VR,VR,4hVPVR4R#)rKr	rIrJ�
invalid tokenN)rrAr�res&&r.rY�Parser._error_nud_token�sD����=�E�!��6�6��g���g���f�
�?�
?��)�)�%��Ar1c�*�VPVR4R#)rN)r�res&&r.r[�Parser._error_led_token�s���)�)�%��Ar1Nc��VP4V8XdVP4R#VPWP^44R#�rGN)rPrW�_raise_parse_error_maybe_eofrQ)r,�
token_types&&r.r��
Parser._match�s8����� �J�.��M�M�O��-�-��1�1�!�4�
6r1c��VP4V9d!VPWP^44VP4R#r
)rPrrQrW)r,r�s&&r.r��Parser._match_multiple_tokens�s8����� ��3��-�-��2�2�1�5�
7��
�
�r1c�8�V;P^,
unR#)�N)r+�r,s&r.rW�Parser._advance�s�����q��r1c�J�VPVP,R,#�rK�r)r+rs&r.rP�Parser._current_token�s���|�|�D�K�K�(��0�0r1c�X�VPVPV,,R,#rr�r,rs&&r.r��Parser._lookahead�s���|�|�D�K�K�&�0�1�&�9�9r1c�J�VPVPV,,#r'rrs&&r.rQ�Parser._lookahead_token�s���|�|�D�K�K�&�0�1�1r1c�f�VR,pVR,pVR,p\P!W4WR4h)rIrJrK)rrC)r,rf�reason�lex_position�actual_value�actual_types&&&   r.r��#Parser._raise_parse_error_for_token�s5���W�~���W�~���F�m���#�#�L�$/�9�	9r1c��VR,pVR,pVR,pVR8Xd\P!W4V4hRV:RV:2p\P!W4WV4h)rIrJrKr	r�r)rrArC)r,�
expected_typerfrr r!�messages&&&    r.r�#Parser._raise_parse_error_maybe_eof�si���W�~���W�~���F�m���%���6�6��K�9�
9� �/<�.9�;���#�#���>�	>r1c���\P!\VPP	44\VP^,44FpVPPVR4K!	R#)�N)�random�samplerNr3�keys�intr7�pop)r,�keys& r.r8�Parser._free_cache_entries�sK���=�=��d�k�k�&6�&6�&8�!9�3�t�~�~�PQ�?Q�;R�S�C��K�K�O�O�C��&�Tr1c�:�VPP4R#)z'Clear the expression compilation cache.N)r3�clear)�clss&r.�purge�Parser.purge�s��	�
�
���r1)r*r+r)r()r()rGr')>�__name__�
__module__�__qualname__�__firstlineno__rZr�r3r7r/r<r5r?rOrgrkrnrvrzr~r�r�r�r�r�r�r�r�r�r�r�r�r�ryr�r�r�r�r�r�r�r�r�r�r�r}rrr�rYr[r�r�rWrPr�rQr�rr8�classmethodr3�__static_attributes__�__classdictcell__��
__classdict__s@r.rr%s<�����
�q���q��	�Q��	�1�	�
	�A��	�!�
�	���	�!��	�!��	�1��	�!��	���	���	
�a��	�q�� 	
�a�!�"	
�a�#�$	
�a�
�q�
�q��a��1����"�
�r�
�r��"��B��"�=�M�D���F��I����	0��&+�)�	�1�6�/��
+�(�3�"
�!�0"�&�
5�%�.�/��(=�2�2�2�3�2�3�+�/�&�7�
2�2�(�"6�8B�B�6���1�:�2�9�
>�'����r1rc�<a�]tRtRtoRtRRltRtRtRtVt	R#)	rRi�c��WnW nR#r'�r9rS)r,r9rSs&&&r.r/�ParsedResult.__init__�s��$���r1Nc�j�\P!V4pVPVPV4pV#r')r�TreeInterpreter�visitrS)r,rJ�options�interpreter�results&&&  r.�search�ParsedResult.search�s-���-�-�g�6���"�"�4�;�;��6���
r1c�f�\P!4pVPVP4pV#)a6Render the parsed AST as a dot file.

Note that this is marked as an internal method because
the AST is an implementation detail and is subject
to change.  This method can be used to help troubleshoot
or for development purposes, but is not considered part
of the public supported API.  Use at your own risk.

)r�GraphvizVisitorrDrS)r,�renderer�contentss&  r.�_render_dot_file�ParsedResult._render_dot_files)���*�*�,���>�>�$�+�+�.���r1c�,�\VP4#r')�reprrSrs&r.�__repr__�ParsedResult.__repr__s���D�K�K� � r1r@r')
r5r6r7r8r/rHrNrRr:r;r<s@r.rRrR�s������
�!�!r1rR)�__doc__r)�jmespathr�jmespath.compatrrrr�objectrrR�r1r.�<module>rYsH���6��,����M�V�M�`�!�6�!��!r1

Youez - 2016 - github.com/yon3zu
LinuXploit