[<"@sdZddlZddlZddlZyddlZWnek rTdZYnXddddddd d d d d dddddddddddddddgZdZejZ Z ej Z Z ejZZejZZejZZejZZejZZejZZej Z!ej"Z"dddZ#dddZ$dd dZ%ddd!dZ&ddd"dZ'ddd#dZ(dd$d Z)ej*d%krej+d&dd'd&Z,ndd(d Z-d)d Z.dd*d Z/e0d+Z1e0d,Z2d-d Z3iZ4iZ5e6ej-d.dZ7d/Z8d0d1Z9d2d3Z:d4d5Z;d6d7Z<ddl=Z=d8d9Z>e=j?e7e>e9Gd:d;d;Z@dS)...) The substring matched by the group is accessible by name. (?P=name) Matches the text matched earlier by the group named name. (?#...) A comment; ignored. (?=...) Matches if ... matches next, but doesn't consume the string. (?!...) Matches if ... doesn't match next. (?<=...) Matches if preceded by ... (must be fixed length). (?.filter)rOrH)rr rSr r r!_subxDs ! rTcCst|j|jffS)N)rrr)rKr r r!_pickleRsrUc@s+eZdZdddZddZdS)Scannerrc Csddlm}m}||_g}tj}||_xR|D]J\}}|jtj||t |dtj ||ffgqAWt |d|_ tj||d|ffg}t j ||_dS)Nr)BRANCH SUBPATTERNrR) sre_constantsrWrXlexiconrMPatternrr5 SubPatternrHparsegroupsrEr scanner) selfrZrrWrXrKr9phraseactionr r r!__init__[s   3!zScanner.__init__c Csg}|j}|jj|j}d}x|}|s@Pn|j}||kr\Pn|j|jdd}t|r||_|||j}n|dk r||n|}q-W|||dfS)NrrR)r5r_rendrZ lastindexcallablegroup) r`rresultr5rr:mjrbr r r!scanis&         z Scanner.scanN)__name__ __module__ __qualname__rcrkr r r r!rVZs rV)A__doc__sysrErMr? ImportError__all__ __version__SRE_FLAG_ASCIIr rSRE_FLAG_IGNORECASErrSRE_FLAG_LOCALErrSRE_FLAG_UNICODErrSRE_FLAG_MULTILINErrSRE_FLAG_DOTALLrrSRE_FLAG_VERBOSErrSRE_FLAG_TEMPLATEr)TEMPLATESRE_FLAG_DEBUGr=rrrrrrrr hexversionr5r%r r r frozensetr/r3r r&r(r>rCrIrrOrQrTcopyregrUpicklerVr r r r!xsh