8fUddlmZddlZddlZddlmZddlmZmZddl m Z eGddZ Gd d e Z id d d ddddddddddejdejdddddddd d!ejd"ejd#eje je jzejejzd$d%d&d'd(d)d*d+d,d-d.d/Zd0ed1<Gd2d3ZdS)4) annotationsN) dataclass)IteratorNoReturn) Specifierc.eZdZUded<ded<ded<dS)TokenstrnametextintpositionN)__name__ __module__ __qualname____annotations__/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib/python3.11/site-packages/pip/_vendor/packaging/_tokenizer.pyr r s+ III IIIMMMMMrr c,eZdZdZd fd Zd d ZxZS) ParserSyntaxErrorz7The provided source text could not be parsed correctly.messager sourcespantuple[int, int]returnNonecr||_||_||_tdS)N)rrrsuper__init__)selfrrr __class__s rr!zParserSyntaxError.__init__s6    rcd|jdzd|jd|jdz zzdz}d|j|j|gS)N r~r^z )rjoinrr)r"markers r__str__zParserSyntaxError.__str__"sOty|#cTYq\DIaL-H&IICO}}dlDK@AAAr)rr rr rrrr)rr )rrr__doc__r!r* __classcell__)r#s@rrrs_AA      BBBBBBBBrrLEFT_PARENTHESISz\(RIGHT_PARENTHESISz\) LEFT_BRACKETz\[ RIGHT_BRACKETz\] SEMICOLON;COMMA, QUOTED_STRINGzk ( ('[^']*') | ("[^"]*") ) OPz(===|==|~=|!=|<=|>=|<|>)BOOLOPz \b(or|and)\bINz\bin\bNOTz\bnot\bVARIABLEa \b( python_version |python_full_version |os[._]name |sys[._]platform |platform_(release|system) |platform[._](version|machine|python_implementation) |python_implementation |implementation_(name|version) |extra )\b SPECIFIERATz\@URLz[^ \t]+ IDENTIFIERz\b[a-zA-Z0-9][a-zA-Z0-9._-]*\bVERSION_PREFIX_TRAILz\.\*z\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*z[ \t]+$)VERSION_LOCAL_LABEL_TRAILWSEND dict[str, str | re.Pattern[str]] DEFAULT_RULEScreZdZdZd!dZd"d Zd d d#dZd$dZd%dZdddd&dZ e j d'd Z dS)( TokenizerzContext-sensitive token parsing. Provides methods to examine the input stream to check whether the next token matches. rr rulesrDrrcv||_d|D|_d|_d|_dS)Nc>i|]\}}|tj|Sr)recompile).0r patterns r z&Tokenizer.__init__..hs52 2 2 *7$D"*W%%2 2 2 rr)ritemsrH next_tokenr)r"rrHs rr!zTokenizer.__init__asG  2 2 ;@;;==2 2 2  )- rr c\||r|dSdS)z8Move beyond provided token name, if at current position.N)checkread)r"r s rconsumezTokenizer.consumens1 ::d    IIKKKKK  rF)peekrVboolc|jJd|d|j||jvs Jd||j|}||j|j}|dS|s!t ||d|j|_dS)zCheck whether the next token has the provided name. By default, if the check succeeds, the token *must* be read before another check. If `peek` is set to `True`, the token is not loaded and would need to be checked again. NzCannot check for z, already have zUnknown token name: FrT)rQrHmatchrrr )r"r rV expressionrYs rrSzTokenizer.checkss O # # It I Ido I I $ # #tz!!!#B$#B#B!!!Z%   dm<< =5 C#D%(DMBBDOtrexpectedr c||s|d||S)zsExpect a certain token name next, failing with a syntax error otherwise. The token is *not* read. z Expected )rSraise_syntax_errorrT)r"r r[s rexpectzTokenizer.expectsD zz$ B))*@h*@*@AA Ayy{{rcn|j}|J|xjt|jz c_d|_|S)z%Consume the next token and return it.N)rQrlenr )r"tokens rrTzTokenizer.reads9    UZ(  rN) span_startspan_endrrb int | Nonercrc\||jn|||jn|f}t||j|)z.Raise ParserSyntaxError at the given position.N)rr)rrr)r"rrbrcrs rr]zTokenizer.raise_syntax_errorsK(/DMMZ%-DMM8  ;    r open_token close_tokenaroundIterator[None]c#K||r|j}|nd}dV|dS||s |d|d|d|||dS)NzExpected matching z for z, after )rb)rSrrTr])r"rfrgrh open_positions renclosing_tokenszTokenizer.enclosing_tokenss ::j ! ! ! MM IIKKKK M   Fzz+&&   # #S[SSzSS6SS( $    r)rr rHrDrr)r r rr)r r rVrWrrW)r r r[r rr )rr )rr rbrdrcrdrr)rfr rgr rhr rri) rrrr+r!rUrSr^rTr] contextlibcontextmanagerrlrrrrGrGZs     05*"&#       $rrG) __future__rrmrK dataclassesrtypingrr specifiersrr ExceptionrrLVERBOSE_operator_regex_str_version_regex_str IGNORECASErErrGrrrrxsv""""""" !!!!!!%%%%%%%%!!!!!!   BBBBB BBB*030303E03U 03  03  T 03ZRZ    03" %#03$ o%03& )'03( :)03*    +03J% (DD R]"K03R %S03T :U03V3W03XGY03Z"D  _030303 0000fhhhhhhhhhhr