Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
3 Føªj ã@sTddlZGdd„deƒZGdd„deƒZGdd„deƒZdd „Zd d „Zd d „ZdS)éNc@s&eZdZdZd Zd dd„Zd d „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ú8/tmp/pip-build-_d5lkt3n/pycparser/pycparser/plyparser.pyÚ__init__szCoord.__init__cCs(d|j|jf}|jr$|d|j7}|S)Nz%s:%sz:%s)rrr)rÚstrrrr Ú__str__sz Coord.__str__)rrrr)N)Ú__name__Ú __module__Ú __qualname__Ú__doc__Ú __slots__r r rrrr r s rc@s eZdZdS)Ú ParseErrorN)r rrrrrr rsrc@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Úprrr Úoptrule*sz+PLYParser._create_opt_rule..optrulez%s : empty | %szp_%sN)rr ÚsetattrÚ __class__)rZrulenameÚoptnamerrrr Ú_create_opt_rule#s  zPLYParser._create_opt_ruleNcCst|jj||d�S)N)rrr)rZclexÚfilename)rÚlinenorrrr Ú_coord1szPLYParser._coordcCsF|jjjjdd|j|ƒƒ}|dkr&d}|j|ƒ|}|j|j|ƒ|ƒS)z× Returns the coordinates for the YaccProduction object 'p' indexed with 'token_idx'. The coordinate includes the 'lineno' and 'column'. Both follow the lex semantic, starting from 1. Ú rréÿÿÿÿ)ÚlexerZlexdataÚrfindZlexposrr)rrZ token_idxZlast_crrrrr Ú _token_coord7s zPLYParser._token_coordcCstd||fƒ‚dS)Nz%s: %s)r)rÚmsgZcoordrrr Ú _parse_errorBszPLYParser._parse_error)N)r rrrrr"r$rrrr 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 ˆ|_|S)N)Ú_params)Z rule_func)Úparamsrr ÚdecoratePszparameterized..decorater)r&r'r)r&r Ú parameterizedFs r(cCspd}xft|ƒD]Z}|jdƒrt||ƒ}t|dƒrt||ƒ|jdk rPt||ƒq|stjdt dd�d}qW|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_warningÚ attr_nameÚmethodrrr ÚtemplateVs      r7csZxTˆjD]J\}}‡fdd„}ˆjjd|ƒjd|ƒ|_ˆjjd|ƒ|_t||j|ƒqWdS)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ˆ||ƒdS)Nr)rr)Úfuncrr Ú param_rule}sz'_create_param_rules..param_ruleÚxxxÚyyyN)r%rÚreplacer r)r4r8r:r;r9r)r8r r0ts  r0) r1ÚobjectrÚ Exceptionrrr(r7r0rrrr Ú s $