%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python3.12/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/python3.12/__pycache__/_markupbase.cpython-312.pyc

�

���f=9���dZddlZejd�jZejd�jZejd�Zejd�Zejd�Z[Gd�d	�Z	y)
z�Shared support for scanning document type declarations in HTML and XHTML.

This module is used as a foundation for the html.parser module.  It has no
documented public API and should not be used directly.

�Nz[a-zA-Z][-_.a-zA-Z0-9]*\s*z(\'[^\']*\'|"[^"]*")\s*z--\s*>z	]\s*]\s*>z]\s*>c�l�eZdZdZd�Zd�Zd�Zd�ZdZd�Z	dd�Z
dd	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zy)�
ParserBaseziParser base class which provides some common support methods used
    by the SGML/HTML and XHTML parsers.c�>�|jturtd��y)Nz)_markupbase.ParserBase must be subclassed)�	__class__r�RuntimeError��selfs �"/usr/lib/python3.12/_markupbase.py�__init__zParserBase.__init__s#���>�>�Z�'��;�=�
=�(�c� �d|_d|_y)N�r��lineno�offsetrs r
�resetzParserBase.reset s�������rc�2�|j|jfS)z&Return current line number and offset.rrs r
�getposzParserBase.getpos$s���{�{�D�K�K�'�'rc���||k\r|S|j}|jd||�}|r6|j|z|_|jd||�}||dzz
|_|S|j|z|z
|_|S)N�
r)�rawdata�countr�rindexr)r	�i�jr�nlines�poss      r
�	updateposzParserBase.updatepos,s����6��H��,�,�����t�Q��*����+�+��.�D�K��.�.��q�!�,�C��S��U�)�D�K����+�+��/�!�+�D�K��r�c�4�|j}|dz}|||dk(sJd��|||dzdk(r|dzS|||dzdvryt|�}|||dzdk(r|j|�S||d	k(r|j|�S|j	||�\}}|d
kr|S|dk(rd|_||kr�||}|dk(r9||dz|}|dk(r|j
|�|dzS|j|�|dzS|d
vr t||�}|sy|j�}n||dvr|j	||�\}	}nb||j
vr|dz}nN|d	k(r8|dk(r|j|dz|�}n.|dvrtd|z��td��td||z��|d
kr|S||kr��y)N��<!z$unexpected call to parse_declarationr�>)�-r���z--�[r�doctyperz"'�4abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ>�link�attlist�element�linktypez&unsupported '[' char in %s declarationz"unexpected '[' char in declarationz!unexpected %r char in declaration)r�len�
parse_comment�parse_marked_section�
_scan_name�_decl_otherchars�handle_decl�unknown_decl�_declstringlit_match�end�_parse_doctype_subset�AssertionError)
r	rrr�n�decltype�c�data�m�names
          r
�parse_declarationzParserBase.parse_declaration<s���,�,��
��E���q��|�t�#�K�%K�K�#��1�Q�q�S�>�S� ��q�5�L��1�Q�q�S�>�Y�&����L���1�Q�q�S�>�T�!��%�%�a�(�(�
�Q�Z�3�
�
�,�,�Q�/�/��/�/�!�Q�/�K�H�a��q�5��H��y� �$&�D�!��!�e���
�A��C�x��q��s�1�~���y�(��$�$�T�*��1�u���%�%�d�+��1�u���E�z�(��!�4�����E�E�G���L�L��/�/�!�Q�/���a��d�+�+�+���E���c���y�(��2�2�1�q�5�!�<�A��!K�K�
)�)Q�T\�)\�]�]�(�)M�N�N�$�%H�7�ST�:�%U�V�V��1�u���M�!�e�Nrc��|j}|||dzdk(sJd��|j|dz|�\}}|dkr|S|dvrtj||dz�}n2|dvrtj||dz�}ntd||dz|z��|sy|r(|j
d�}|j||dz|�|jd�S)	N�z<![z)unexpected call to parse_marked_section()r>�temp�cdata�ignore�rcdata�include>�if�else�endifz+unknown status keyword %r in marked sectionr%)	rr0�_markedsectionclose�search�_msmarkedsectioncloser7�startr3r5)r	r�reportr�sectNamer�matchs       r
r/zParserBase.parse_marked_section�s��������q��1��~��&�S�(S�S�&��o�o�q��s�A�/���!��q�5��H��G�G�&�-�-�g�q��s�;�E�
�0�
0�(�/�/���1��=�E� �=���!��A��N��
�������A��A����g�a��c�1�o�.��y�y��|�rc���|j}|||dzdk7rtd��tj||dz�}|sy|r(|j	d�}|j||dz|�|j
d�S)N��<!--z"unexpected call to parse_comment()r%r)rr7�
_commentcloserJrL�handle_commentr5)r	rrMrrOrs      r
r.zParserBase.parse_comment�s{���,�,���1�Q�q�S�>�V�#� �!E�F�F��$�$�W�a��c�2��������A��A������!��Q��0��y�y��|�rc���|j}t|�}|}||k�r�||}|dk(r�|||dz}|dk(ry|dk7r#|j||dz�td|z��|dz|k(ry|dz|kDry|||dzdk(r|j	|d	�
�}|d	kr|S�~|j|dz|�\}}|dk(ry|dvr#|j||dz�td|z��t
|d
|z�}	|	||�}|d	kr�|S|dk(r6|dz|k(ry|j|dz|�\}}|d	kr|S||dk(r�|dz}n�|dk(rh|dz}||kr1||j�r|dz}||kr||j�r�||kr'||dk(r|S|j||�td��y|j�r|dz}n |j||�td|z��||kr���y)N�<r!r%r"rz*unexpected char in internal subset (in %r)rQrRr)rM>�entityr*r+�notationz)unknown declaration %r in internal subset�_parse_doctype_�%�;�]r#z%unexpected char after internal subsetz%unexpected char %r in internal subset)rr-rr7r.r0�getattr�isspace)
r	r�declstartposrr8rr:�sr=�meths
          r
r6z ParserBase._parse_doctype_subset�sT���,�,����L��
���!�e���
�A��C�x��A�a��c�N����8����9��N�N�<��Q��7�(�D�q�H�����E�a�<����E�Q�;���1�Q�q�S�>�V�+��*�*�1�Q�*�7�A��1�u� ����/�/�!�a�%��>���a���7���K�K��N�N�<��Q��7�(�C�d�J����t�%6��%=�>����L�)���q�5��H��c����E�a�<�����q�1�u�l�;���1��q�5��H��1�:��$��A��A��c����E���!�e���
� 2� 2� 4��A��A��!�e���
� 2� 2� 4��q�5��q�z�S�(� ���N�N�<��3�(�)P�Q�Q��������E�����|�Q�/�$�%L�q�%P�Q�Q�{�!�e�~rc��|j||�\}}|dk(ry|j}d||dvr|jd|�dzSy)Nr%r#r)r0r�find)r	rr_r=rrs      r
�_parse_doctype_elementz!ParserBase._parse_doctype_element�sP���/�/�!�\�2���a���7���,�,���'�!�"�+���<�<��Q�'�!�+�+�rc��|j}|j||�\}}|||dz}|dk(ry|dk(r|dzS	|j||�\}}|dkr|S|||dz}|dk(ry|dk(rVd||dvr|jd|�dz}ny|||dzj�r|dz}|||dzj�r�||dsy|j||�\}}|||dz}|sy|dvr+t	||�}|r|j�}ny|||dz}|sy|d	k(r3||dd	k(ry|j|dz|�\}}|dkr|S|||dz}|sy|dk(r|dzS��)
Nrrr%r#r�(�)�'"�#)rr0rcr^r4r5)r	rr_rr=rr:r<s        r
�_parse_doctype_attlistz!ParserBase._parse_doctype_attlists����,�,���/�/�!�\�2���a��A�a��c�N����7����8��q�5�L���o�o�a��6�G�D�!��1�u�����!�A�#��A��B�w���C�x��'�!�"�+�%����S�!�,�q�0�A���a��!��n�,�,�.��A��A��a��!��n�,�,�.��q�r�{���/�/�!�\�:���a���!�A�#��A����E�z�(��!�4�������A���A�a��c�N�����C�x��1�2�;�#�%���/�/�!�a�%��>���a��q�5��H��A�a��c�N�����C�x��1�u��]rc��|j||�\}}|dkr|S|j}	|||dz}|sy|dk(r|dzS|dvr t||�}|sy|j�}n|j||�\}}|dkr|S�V)Nrrr%r#rh)r0rr4r5)r	rr_r=rrr:r<s        r
�_parse_doctype_notationz"ParserBase._parse_doctype_notation=s����/�/�!�\�2���a��q�5��H��,�,�����!�A�#��A����C�x��1�u���E�z�(��!�4�����E�E�G���/�/�!�\�:���a��q�5��H�rc��|j}|||dzdk(r)|dz}	|||dz}|sy|j�r|dz}nn�#|}|j||�\}}|dkr|S	|j||dz}|sy|dvr t||�}|r|j	�}n'y|dk(r|dzS|j||�\}}|dkr|S�`)NrrZr%rrhr#)rr^r0r4r5)r	rr_rrr:r=r<s        r
�_parse_doctype_entityz ParserBase._parse_doctype_entityTs����,�,���1�Q�q�S�>�S� ��A��A���A�a��c�N�����9�9�;��A��A����A��/�/�!�\�2���a��q�5��H�����Q�q��s�#�A����E�z�(��!�4�������A���c���1�u���/�/�!�\�:���a��q�5��H�rc�H�|j}t|�}||k(ryt||�}|rR|j�}|j	�}|t|�z|k(ry|j�|j
�fS|j||�td|||dzz��)N)Nr%zexpected name token at %r�)	rr-�_declname_match�group�strip�lowerr5rr7)r	rr_rr8r<r`r=s        r
r0zParserBase._scan_namexs����,�,����L����6���G�Q�'������	�A��7�7�9�D��C��F�
�q� ���:�:�<�����(�(��N�N�<��+� �+�g�l�<�PR�?�.S�S��
rc��y)N�)r	r;s  r
r3zParserBase.unknown_decl�s��rN)r)�__name__�
__module__�__qualname__�__doc__rrrrr1r>r/r.r6rdrjrlrnr0r3rvrr
rrs[��+�=�
�(����M�b�0
�C�L�6�r�. �H�&
rr)
rz�re�compilerOrqr4rSrIrKrrvrr
�<module>r}s����
��"�*�*�:�;�A�A��!�r�z�z�"<�=�C�C����
�
�9�%�
� �b�j�j��.��
#��
�
�8�,���u
�u
r

Zerion Mini Shell 1.0