Current Path: > > opt > alt > python39 > lib64 > python3.9 > lib2to3 > > pgen2 > __pycache__
Operation : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 Software : Apache Server IP : 162.0.232.56 | Your IP: 216.73.216.111 Domains : 1034 Domain(s) Permission : [ 0755 ]
Name | Type | Size | Last Modified | Actions |
---|---|---|---|---|
__init__.cpython-39.opt-1.pyc | File | 180 bytes | June 19 2025 12:11:11. | |
__init__.cpython-39.opt-2.pyc | File | 152 bytes | June 19 2025 12:11:17. | |
__init__.cpython-39.pyc | File | 180 bytes | June 19 2025 12:11:11. | |
conv.cpython-39.opt-1.pyc | File | 6147 bytes | June 19 2025 12:11:16. | |
conv.cpython-39.opt-2.pyc | File | 3665 bytes | June 19 2025 12:11:17. | |
conv.cpython-39.pyc | File | 7008 bytes | June 19 2025 12:11:11. | |
driver.cpython-39.opt-1.pyc | File | 5110 bytes | June 19 2025 12:11:16. | |
driver.cpython-39.opt-2.pyc | File | 4114 bytes | June 19 2025 12:11:17. | |
driver.cpython-39.pyc | File | 5142 bytes | June 19 2025 12:11:11. | |
grammar.cpython-39.opt-1.pyc | File | 5720 bytes | June 19 2025 12:11:11. | |
grammar.cpython-39.opt-2.pyc | File | 2569 bytes | June 19 2025 12:11:17. | |
grammar.cpython-39.pyc | File | 5720 bytes | June 19 2025 12:11:11. | |
literals.cpython-39.opt-1.pyc | File | 1377 bytes | June 19 2025 12:11:16. | |
literals.cpython-39.opt-2.pyc | File | 1300 bytes | June 19 2025 12:11:17. | |
literals.cpython-39.pyc | File | 1544 bytes | June 19 2025 12:11:11. | |
parse.cpython-39.opt-1.pyc | File | 6479 bytes | June 19 2025 12:11:16. | |
parse.cpython-39.opt-2.pyc | File | 3255 bytes | June 19 2025 12:11:17. | |
parse.cpython-39.pyc | File | 6493 bytes | June 19 2025 12:11:11. | |
pgen.cpython-39.opt-1.pyc | File | 9332 bytes | June 19 2025 12:11:16. | |
pgen.cpython-39.opt-2.pyc | File | 9332 bytes | June 19 2025 12:11:16. | |
pgen.cpython-39.pyc | File | 9735 bytes | June 19 2025 12:11:11. | |
token.cpython-39.opt-1.pyc | File | 1902 bytes | June 19 2025 12:11:11. | |
token.cpython-39.opt-2.pyc | File | 1852 bytes | June 19 2025 12:11:17. | |
token.cpython-39.pyc | File | 1902 bytes | June 19 2025 12:11:11. | |
tokenize.cpython-39.opt-1.pyc | File | 15137 bytes | June 19 2025 12:11:16. | |
tokenize.cpython-39.opt-2.pyc | File | 11243 bytes | June 19 2025 12:11:17. | |
tokenize.cpython-39.pyc | File | 15186 bytes | June 19 2025 12:11:11. |
a XC?h� � @ s4 d Z ddlmZ G dd� de�ZG dd� de�ZdS )z�Parser engine for the grammar tables generated by pgen. The grammar table must be loaded first. See Parser/parser.c in the Python distribution for additional info on how this parsing engine works. � )�tokenc @ s e Zd ZdZdd� Zdd� ZdS )� ParseErrorz(Exception to signal the parser is stuck.c C s4 t �| d||||f � || _|| _|| _|| _d S )Nz!%s: type=%r, value=%r, context=%r)� Exception�__init__�msg�type�value�context)�selfr r r r � r �8/opt/alt/python39/lib64/python3.9/lib2to3/pgen2/parse.pyr s �zParseError.__init__c C s t | �| j| j | j| jffS �N)r r r r )r r r r � __reduce__ s zParseError.__reduce__N)�__name__� __module__�__qualname__�__doc__r r r r r r r s r c @ sL e Zd ZdZddd�Zddd�Zdd� Zd d � Zdd� Zd d� Z dd� Z dS )�Parsera5 Parser engine. The proper usage sequence is: p = Parser(grammar, [converter]) # create instance p.setup([start]) # prepare for parsing <for each input token>: if p.addtoken(...): # parse a token; may raise ParseError break root = p.rootnode # root of abstract syntax tree A Parser instance may be reused by calling setup() repeatedly. 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 driver.py for how to get input tokens by tokenizing a file or string. Parsing is complete when addtoken() returns True; the root of the abstract syntax tree can then be retrieved from the rootnode instance variable. When a syntax error occurs, addtoken() raises the ParseError exception. There is no error recovery; the parser cannot be used after a syntax error was reported (but it can be reinitialized by calling setup()). Nc C s || _ |pdd� | _dS )a� Constructor. The grammar argument is a grammar.Grammar instance; see the grammar module for more information. The parser is not ready yet for parsing; you must call the setup() method to get it started. The optional convert argument is a function mapping concrete syntax tree nodes to abstract syntax tree nodes. If not given, no conversion is done and the syntax tree produced is the concrete syntax tree. If given, it must be a function of two arguments, the first being the grammar (a grammar.Grammar instance), and the second being the concrete syntax tree node to be converted. The syntax tree is converted from the bottom up. A concrete syntax tree node is a (type, value, context, nodes) tuple, where type is the node type (a token or symbol number), value is None for symbols and a string for tokens, context is None or an opaque value used for error reporting (typically a (lineno, offset) pair), and nodes is a list of children for symbols, and None for tokens. An abstract syntax tree node may be anything; this is entirely up to the converter function. c S s |S r r )�grammar�noder r r �<lambda>Z � z!Parser.__init__.<locals>.<lambda>N)r �convert)r r r r r r r <