0x1949 Team - FAZEMRX - MANAGER
Edit File: _markupbase.cpython-310.pyc
o ��+g=9 � @ sV d Z ddlZe�d�jZe�d�jZe�d�Ze�d�Ze�d�Z[G dd � d �Z dS ) 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 @ s� e Zd ZdZdd� Zdd� Zdd� Zdd � Zd Zdd� Z d!dd�Z d!dd�Zdd� Zdd� Z dd� Zdd� Zdd� Zdd� Zdd� Zd S )"� ParserBaseziParser base class which provides some common support methods used by the SGML/HTML and XHTML parsers.c C s | j tu r td��d S )Nz)_markupbase.ParserBase must be subclassed)� __class__r �RuntimeError��self� r �"/usr/lib/python3.10/_markupbase.py�__init__ s ��zParserBase.__init__c C s d| _ d| _d S )N� r ��lineno�offsetr r r r �reset s zParserBase.resetc C s | j | jfS )z&Return current line number and offset.r r r r r �getpos$ s zParserBase.getposc C sd ||kr|S | j }|�d||�}|r(| j| | _|�d||�}||d | _|S | j| | | _|S )N� r )�rawdata�countr �rindexr )r �i�jr �nlines�posr r r � updatepos, s �zParserBase.updatepos� c C s� | j }|d }|||� dksJ d��|||d � dkr!|d S |||d � dv r-dS t|�}|||d � dkr@| �|�S || d krK| �|�S | �||�\}}|d k rY|S |dkr`d| _||k r�|| }|dkr�||d |� }|dkr�| �|� |d S | �|� |d S |d v r�t||�}|s�dS |� � }n>|dv r�| �||�\} }n1|| jv r�|d }n'|d kr�|dkr�| � |d |�}n|dv r�td| ��td��td|| ��|d k r�|S ||k sddS )N� �<!z$unexpected call to parse_declarationr �>)�-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 r r r �n�decltype�c�data�m�namer r r �parse_declaration<