� L�g�����UddlZddlZddlmZddlmZmZmZmZm Z m Z ddl m Z eGd�d����Z Gd�d e��Zid d �d d �dd�dd�dd�dd�dejdej���dd�dd�dd�dd�d ejd!ej���d"eje je jzejejz���d#d$�d%d&�d'd(�d)d*�d+d,d-d.��Zd/ed0<Gd1�d2��ZdS)3�N)� dataclass)�Dict�Iterator�NoReturn�Optional�Tuple�Union�)� Specifierc�.�eZdZUeed<eed<eed<dS)�Token�name�text�positionN)�__name__� __module__� __qualname__�str�__annotations__�int���d/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/packaging/_tokenizer.pyr r s+������� �I�I�I� �I�I�I��M�M�M�M�Mrr c�P��eZdZdZdededeeefddf�fd� Zdefd�Z�xZ S) �ParserSyntaxErrorz7The provided source text could not be parsed correctly.�message�source�span�returnNc�r��||_||_||_t�����dS)N)rrr�super�__init__)�selfrrr� __class__s �rr"zParserSyntaxError.__init__s6����� ��� ��� � ���������rc��d|jdzd|jd|jdz zzdz}d�|j|j|g��S)N� r�~r �^z )r�joinrr)r#�markers r�__str__zParserSyntaxError.__str__ sO���t�y��|�#�c�T�Y�q�\�D�I�a�L�-H�&I�I�C�O���}�}�d�l�D�K��@�A�A�Ar) rrr�__doc__rrrr"r+� __classcell__)r$s@rrrs��������A�A� �� �� � �C��H�o� � � � � � � � �B��B�B�B�B�B�B�B�Brr�LEFT_PARENTHESISz\(�RIGHT_PARENTHESISz\)� LEFT_BRACKETz\[� RIGHT_BRACKETz\]� SEMICOLON�;�COMMA�,� QUOTED_STRINGzk ( ('[^']*') | ("[^"]*") ) �OPz(===|==|~=|!=|<=|>=|<|>)�BOOLOPz \b(or|and)\b�INz\bin\b�NOTz\bnot\b�VARIABLEa� \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 � SPECIFIER�ATz\@�URLz[^ \t]+� IDENTIFIERz\b[a-zA-Z0-9][a-zA-Z0-9._-]*\b�VERSION_PREFIX_TRAILz\.\*z\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*z[ \t]+�$)�VERSION_LOCAL_LABEL_TRAIL�WS�END�&Dict[str, Union[str, re.Pattern[str]]]� DEFAULT_RULESc ���eZdZdZdeddddfd�Zdeddfd �Zd d �ded edefd �Zdedede fd�Z de fd�Z ddd�dede e de e defd�Zejdededededfd���ZdS)� Tokenizerz�Context-sensitive token parsing. Provides methods to examine the input stream to check whether the next token matches. r�rulesrErNc�v�||_d�|���D��|_d|_d|_dS)Nc�>�i|]\}}|tj|����Sr)�re�compile)�.0r�patterns r� <dictcomp>z&Tokenizer.__init__.<locals>.<dictcomp>fs5��2 �2 �2 �*7�$��D�"�*�W�%�%�2 �2 �2 rr)r�itemsrI� next_tokenr)r#rrIs rr"zTokenizer.__init___sG�� �� �2 �2 �;@�;�;�=�=�2 �2 �2 �� �,0����� � � rrc�\�|�|��r|���dSdS)z8Move beyond provided token name, if at current position.N)�check�read)r#rs r�consumezTokenizer.consumels1�� �:�:�d� � � � �I�I�K�K�K�K�K� � rF)�peekrWc��|j�Jd|�d|j�����||jvs Jd|�����|j|}|�|j|j��}|�dS|s!t ||d|j��|_dS)z�Check 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)rRrI�matchrrr )r#rrW� expressionrYs rrTzTokenizer.checkqs��� �O� #� #� I�t� I� I�d�o� I� I� $� #� #��t�z�!�!�!�#B�$�#B�#B�!�!�!��Z��%� �� � ���d�m�<�<�� �=��5�� C�#�D�%��(�D�M�B�B�D�O��tr�expectedc��|�|��s|�d|�����|���S)zsExpect a certain token name next, failing with a syntax error otherwise. The token is *not* read. z Expected )rT�raise_syntax_errorrU)r#rr[s r�expectzTokenizer.expect�sD�� �z�z�$��� B��)�)�*@�h�*@�*@�A�A� A��y�y�{�{�rc�n�|j}|�J�|xjt|j��z c_d|_|S)z%Consume the next token and return it.N)rRr�lenr)r#�tokens rrUzTokenizer.read�s9������ � � � � � ��U�Z���(� � ����� r)� span_start�span_endrrbrcc�\�|�|jn||�|jn|f}t||j|����)z.Raise ParserSyntaxError at the given position.N)rr)rrr)r#rrbrcrs rr]zTokenizer.raise_syntax_error�sK��(�/�D�M�M�Z�%�-�D�M�M�8� �� � ��;�� � � � r� open_token� close_token�aroundc#�K�|�|��r|j}|���nd}dV�|�dS|�|��s |�d|�d|�d|��|���|���dS)NzExpected matching z for z, after )rb)rTrrUr])r#rerfrg� open_positions r�enclosing_tokenszTokenizer.enclosing_tokens�s����� �:�:�j� !� !� !� �M�M� �I�I�K�K�K�K� �M� ���� � � �F��z�z�+�&�&� � � #� #�S�[�S�S�z�S�S�6�S�S�(� $� � � � � � � � � � � r)rrrr,rr"rV�boolrTr r^rUrrrr]� contextlib�contextmanagerrrjrrrrHrHXs��������� �� �8� � � � � � ��C��D����� 05����#���������*�3��S��U������e�����%)�"&�  � � �� ��S�M�  � �3�-�  � �  � � � �$�����,/��<?�� �$���������rrH)rlrL� dataclassesr�typingrrrrrr � specifiersr r � ExceptionrrM�VERBOSE�_operator_regex_str�_version_regex_str� IGNORECASErFrrHrrr�<module>rvsz������� � � � �!�!�!�!�!�!�C�C�C�C�C�C�C�C�C�C�C�C�C�C�C�C�!�!�!�!�!�!� �������� ��� B�B�B�B�B� �B�B�B�*0;���0;���0;��E�0;��U� 0;� �� 0;�  �T� 0;��Z�R�Z� � � � � �0;�" � %�#0;�$ �o�%0;�& �)�'0;�( �:�)0;�*� �� � � � ���+0;�J�����%� �(D�D� � �R�]�"���K0;�R �%�S0;�T �:�U0;�V�3�W0;�X�G�Y0;�Z"D� � �_0;�0;�0;� �7�0�0�0�fh�h�h�h�h�h�h�h�h�hr
Memory