/usr/lib/python3.9/site-packages/pycparser/__pycache__
NameSizeModeActions
ast_transforms.cpython-39.opt-1.pyc24750644editdlrm
ast_transforms.cpython-39.pyc25010644editdlrm
c_ast.cpython-39.opt-1.pyc351530644editdlrm
c_ast.cpython-39.pyc351530644editdlrm
c_generator.cpython-39.opt-1.pyc166740644editdlrm
c_generator.cpython-39.pyc166930644editdlrm
c_lexer.cpython-39.opt-1.pyc118620644editdlrm
c_lexer.cpython-39.pyc118620644editdlrm
c_parser.cpython-39.opt-1.pyc603670644editdlrm
c_parser.cpython-39.pyc604710644editdlrm
lextab.cpython-39.opt-1.pyc55940644editdlrm
lextab.cpython-39.pyc55940644editdlrm
plyparser.cpython-39.opt-1.pyc46480644editdlrm
plyparser.cpython-39.pyc46480644editdlrm
yacctab.cpython-39.opt-1.pyc1481250644editdlrm
yacctab.cpython-39.pyc1481250644editdlrm
_ast_gen.cpython-39.opt-1.pyc101870644editdlrm
_ast_gen.cpython-39.pyc101870644editdlrm
_build_tables.cpython-39.opt-1.pyc5010644editdlrm
_build_tables.cpython-39.pyc5010644editdlrm
__init__.cpython-39.opt-1.pyc24880644editdlrm
__init__.cpython-39.pyc24880644editdlrm
Edit: /usr/lib/python3.9/site-packages/pycparser/__pycache__/plyparser.cpython-39.pyc (4648B)
a ÿ¸_^ ã@sTddlZGdd„deƒZGdd„deƒZGdd„deƒZdd „Zd d „Zd d „ZdS)éNc@s&eZdZdZdZddd„Zdd„ZdS) ÚCoordzž Coordinates of a syntactic element. Consists of: - File name - Line number - (optional) column number, for the Lexer )ÚfileÚlineÚcolumnÚ __weakref__NcCs||_||_||_dS©N©rrr)Úselfrrr©r ú7/usr/lib/python3.9/site-packages/pycparser/plyparser.pyÚ__init__szCoord.__init__cCs(d|j|jf}|jr$|d|j7}|S)Nz%s:%sz:%sr)r Ústrr r r Ú__str__sz Coord.__str__)N)Ú__name__Ú __module__Ú __qualname__Ú__doc__Ú __slots__r rr r r r r s rc@s eZdZdS)Ú ParseErrorN)rrrr r r r rórc@s.eZdZdd„Zd dd„Zdd„Zdd „ZdS) Ú PLYParsercCs<|d}dd„}d||f|_d||_t|j|j|ƒdS)zŽ Given a rule name, creates an optional ply.yacc rule for it. The name of the optional rule is _opt Z_optcSs|d|d<dS)Nérr ©r Úpr r r Úoptrule*sz+PLYParser._create_opt_rule..optrulez%s : empty | %szp_%sN)rrÚsetattrÚ __class__)r ZrulenameZoptnamerr r r Ú_create_opt_rule#s  zPLYParser._create_opt_ruleNcCst|jj||d�S)Nr)rZclexÚfilename)r Úlinenorr r r Ú_coord1s ýzPLYParser._coordcCsF|jjj dd| |¡¡}|dkr&d}| |¡|}| | |¡|¡S)zÖ Returns the coordinates for the YaccProduction objet 'p' indexed with 'token_idx'. The coordinate includes the 'lineno' and 'column'. Both follow the lex semantic, starting from 1. Ú réÿÿÿÿ)ZlexerZlexdataÚrfindZlexposr r)r rZ token_idxZlast_crrr r r Ú _token_coord7s zPLYParser._token_coordcCstd||fƒ‚dS)Nz%s: %s)r)r ÚmsgZcoordr r r Ú _parse_errorBszPLYParser._parse_error)N)rrrrr r$r&r r r r r"s  rcs‡fdd„}|S)aÞ Decorator to create parameterized rules. Parameterized rule methods must be named starting with 'p_' and contain 'xxx', and their docstrings may contain 'xxx' and 'yyy'. These will be replaced by the given parameter tuples. For example, ``p_xxx_rule()`` with docstring 'xxx_rule : yyy' when decorated with ``@parameterized(('id', 'ID'))`` produces ``p_id_rule()`` with the docstring 'id_rule : ID'. Using multiple tuples produces multiple rules. cs ˆ|_|Sr)Ú_params)Z rule_func©Úparamsr r ÚdecoratePszparameterized..decorater )r)r*r r(r Ú parameterizedFs r+cCsld}t|ƒD]Z}| d¡r t||ƒ}t|dƒr t||ƒ|jdurNt||ƒq |s tjdt dd�d}q |S) z� Class decorator to generate rules from parameterized rule templates. See `parameterized` for more information on parameterized rules. FZp_r'Nz@parsing methods must have __doc__ for pycparser to work properlyé)Ú stacklevelT) ÚdirÚ startswithÚgetattrÚhasattrÚdelattrrÚ_create_param_rulesÚwarningsÚwarnÚRuntimeWarning)ÚclsZissued_nodoc_warningZ attr_nameÚmethodr r r ÚtemplateVs        ýr9csVˆjD]J\}}‡fdd„}ˆj d|¡ d|¡|_ˆj d|¡|_t||j|ƒqdS)a Create ply.yacc rules based on a parameterized rule function Generates new methods (one per each pair of parameters) based on the template rule function `func`, and attaches them to `cls`. The rule function's parameters must be accessible via its `_params` attribute. csˆ||ƒdSrr r©Úfuncr r Ú param_rule}sz'_create_param_rules..param_ruleÚxxxÚyyyN)r'rÚreplacerr)r7r;r=r>r<r r:r r3ts  r3) r4ÚobjectrÚ Exceptionrrr+r9r3r r r r Ú s $