| 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 : |
+
���b�J � � � R t ^ RIt^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ! R R] 4 t
] ! R R
] 4 4 tR# )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 � ] tR t^%t o / 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^�tRSR ltR t R t
R! tRTR" ltR# t
R$ tR% tR& tR' tR( tR) tR* tR+ tR, tR- tR. tR/ tR0 tR1 tR2 tR3 tR4 tR5 tR6 t R7 t!R8 t"R9 t#R: t$R; t%R< t&R= t'R> t(R? t)R@ t*RA t+RB t,RC t-RD t.RE t/RF t0RURH lt1RI t2RJ t3RK t4RL t5RM t6RN t7RO t8RP t9]:RQ 4 t;RRt<V t=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 � R V n R .V, V n Wn ^ V n R # �N)� tokenizer�_tokens�_buffer_size�_index)�self� lookaheads &&�1/usr/lib/python3/dist-packages/jmespath/parser.py�__init__�Parser.__init__N s$ � �����v� �)���%����� c �� � V P P V4 pVe V# V P V4 pW0P V&