/opt/alt/python39/lib64/python3.9/lib2to3/pgen2/__pycache__
NameSizeModeActions
conv.cpython-39.opt-1.pyc61470644editdlrm
conv.cpython-39.opt-2.pyc36650644editdlrm
conv.cpython-39.pyc70080644editdlrm
driver.cpython-39.opt-1.pyc51100644editdlrm
driver.cpython-39.opt-2.pyc41140644editdlrm
driver.cpython-39.pyc51420644editdlrm
grammar.cpython-39.opt-1.pyc57200644editdlrm
grammar.cpython-39.opt-2.pyc25690644editdlrm
grammar.cpython-39.pyc57200644editdlrm
literals.cpython-39.opt-1.pyc13770644editdlrm
literals.cpython-39.opt-2.pyc13000644editdlrm
literals.cpython-39.pyc15440644editdlrm
parse.cpython-39.opt-1.pyc64790644editdlrm
parse.cpython-39.opt-2.pyc32550644editdlrm
parse.cpython-39.pyc64930644editdlrm
pgen.cpython-39.opt-1.pyc93320644editdlrm
pgen.cpython-39.opt-2.pyc93320644editdlrm
pgen.cpython-39.pyc97350644editdlrm
token.cpython-39.opt-1.pyc19020644editdlrm
token.cpython-39.opt-2.pyc18520644editdlrm
token.cpython-39.pyc19020644editdlrm
tokenize.cpython-39.opt-1.pyc151370644editdlrm
tokenize.cpython-39.opt-2.pyc112430644editdlrm
tokenize.cpython-39.pyc151860644editdlrm
__init__.cpython-39.opt-1.pyc1800644editdlrm
__init__.cpython-39.opt-2.pyc1520644editdlrm
__init__.cpython-39.pyc1800644editdlrm
Edit: /opt/alt/python39/lib64/python3.9/lib2to3/pgen2/__pycache__/parse.cpython-39.opt-1.pyc (6479B)
a XC?hÛã@s4dZddlmZGdd„deƒZGdd„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 eZdZdZdd„Zdd„ZdS)Ú ParseErrorz(Exception to signal the parser is stuck.cCs4t |d||||f¡||_||_||_||_dS)Nz!%s: type=%r, value=%r, context=%r)Ú ExceptionÚ__init__ÚmsgÚtypeÚvalueÚcontext)Úselfrrrr ©r ú8/opt/alt/python39/lib64/python3.9/lib2to3/pgen2/parse.pyrs ÿzParseError.__init__cCst|ƒ|j|j|j|jffS©N)rrrr )r r r r Ú __reduce__szParseError.__reduce__N)Ú__name__Ú __module__Ú __qualname__Ú__doc__rrr r r r rsrc@sLeZdZdZddd„Zddd„Zdd„Zd d „Zd d „Zd d„Z dd„Z dS)ÚParsera5Parser engine. The proper usage sequence is: p = Parser(grammar, [converter]) # create instance p.setup([start]) # prepare for parsing : 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()). NcCs||_|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. cSs|Sr r )ÚgrammarÚnoder r r ÚZóz!Parser.__init__..N)rÚconvert)r rrr r r r<szParser.__init__cCsH|dur|jj}|ddgf}|jj|d|f}|g|_d|_tƒ|_dS)a›Prepare for parsing. This *must* be called before starting to parse. The optional argument is an alternative start symbol; it defaults to the grammar's start symbol. You can use a Parser instance to parse any number of programs; each time you call setup() the parser is reset to an initial state determined by the (implicit or explicit) start symbol. Né)rÚstartÚdfasÚstackÚrootnodeÚsetÚ used_names)r rÚnewnodeZ stackentryr r r Úsetup\s  z Parser.setupcCs0| |||¡}|jd\}}}|\}} ||} | D]º\} } |jj| \} }|| kr¬| ||| |¡| }||d|fgkr¦| ¡|jsŒdS|jd\}}}|\}} qfdS| dkr2|jj| }|\}}||vr2| | |jj| | |¡qq2d|f| vr| ¡|js*td|||ƒ‚qtd|||ƒ‚qdS) zs