⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.133
Server IP:
185.119.109.197
Server:
Linux managedhosting.chostar.me 5.15.0-160-generic #170-Ubuntu SMP Wed Oct 1 10:06:56 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.1.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
lib
/
python3
/
dist-packages
/
jmespath
/
__pycache__
/
View File Name :
parser.cpython-310.pyc
o ¦»^ŠJ ã @ sp d Z ddlZddlmZ ddlmZ ddlmZ ddlmZ ddlmZ G dd „ d e ƒZ eG d d„ de ƒƒZdS )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 @ sB e Zd Zi dd“dd“dd“dd“dd“dd“dd“d d“d d“dd“dd“d d“dd“dd“dd“dd“dd“dddddddddddddœ¥Zd Zi Zd!Zd‰d"d#„Zd$d%„ Zd&d'„ Z d(d)„ Z dŠd*d+„Zd,d-„ Zd.d/„ Z d0d1„ Zd2d3„ Zd4d5„ Zd6d7„ Zd8d9„ Zd:d;„ Zd