Your IP : 3.145.37.211


Current Path : /opt/alt/python312/lib64/python3.12/__pycache__/
Upload File :
Current File : //opt/alt/python312/lib64/python3.12/__pycache__/_markupbase.cpython-312.opt-2.pyc

�

�Q�f=9���	ddlZejd�jZejd�jZejd�Zejd�Zejd�Z[Gd�d�Zy)	�Nz[a-zA-Z][-_.a-zA-Z0-9]*\s*z(\'[^\']*\'|"[^"]*")\s*z--\s*>z	]\s*]\s*>z]\s*>c�j�eZdZ	d�Zd�Zd�Zd�ZdZd�Zdd�Z	dd�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zy)�
ParserBasec�>�|jturtd��y)Nz)_markupbase.ParserBase must be subclassed)�	__class__r�RuntimeError��selfs �2/opt/alt/python312/lib64/python3.12/_markupbase.py�__init__zParserBase.__init__s#���>�>�Z�'��;�=�
=�(�c� �d|_d|_y)N�r��lineno�offsetrs r
�resetzParserBase.reset s�������rc�4�	|j|jfS�Nrrs r
�getposzParserBase.getpos$s��4��{�{�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��|j}|dz}|||dzdk(r|dzS|||dzdvryt|�}|||dzdk(r|j|�S||dk(r|j|�S|j	||�\}}|dkr|S|d	k(rd
|_||kr�||}|dk(r9||dz|}|d	k(r|j
|�|dzS|j|�|dzS|dvr t||�}|sy|j�}n||dvr|j	||�\}	}nb||j
vr|dz}nN|dk(r8|d	k(r|j|dz|�}n.|d
vrtd|z��td��td||z��|dkr|S||kr��y)N�r�>)�-r ���z--�[r�doctyper z"'�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���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�t�|j}|j|dz|�\}}|dkr|S|dvrtj||dz�}n2|dvrtj||dz�}ntd||dz|z��|sy|r(|j
d�}|j||dz|�|jd�S)N�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��������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%z<!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��)
Nrr r%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��yr�)r	r;s  r
r3zParserBase.unknown_decl�s��rN)r)�__name__�
__module__�__qualname__rrrrr1r>r/r.r6rdrjrlrnr0r3rvrr
rrs[��+�=�
�(����M�b�0
�C�L�6�r�. �H�&
rr)	�re�compilerOrqr4rSrIrKrrvrr
�<module>r|s����
��"�*�*�:�;�A�A��!�r�z�z�"<�=�C�C����
�
�9�%�
� �b�j�j��.��
#��
�
�8�,���u
�u
r

?>