Edit file File name : _markupbase.cpython-36.opt-1.pyc Content :3 \9 � @ sV d Z ddlZejd�jZejd�jZejd�Zejd�Zejd�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 d� ZdZ d d� Z d#dd�Zd$dd�Zdd� Z dd� Zdd� Zdd� Zdd� Zdd� Zd d!� Zd"S )%� ParserBaseziParser base class which provides some common support methods used by the SGML/HTML and XHTML parsers.c C s | j tkrtd��d S )Nz)_markupbase.ParserBase must be subclassed)� __class__r �RuntimeError)�self� r �#/usr/lib64/python3.6/_markupbase.py�__init__ s zParserBase.__init__c C s t d��d S )Nz.subclasses of ParserBase must override error())�NotImplementedError)r �messager r r �error s zParserBase.errorc C s d| _ d| _d S )N� r )�lineno�offset)r r r r �reset$ s zParserBase.resetc C s | j | jfS )z&Return current line number and offset.)r r )r r r r �getpos( s zParserBase.getposc C sb ||kr|S | j }|jd||�}|rN| j| | _|jd||�}||d | _n| j| | | _|S )N� r )�rawdata�countr �rindexr )r �i�jr Znlines�posr r r � updatepos0 s zParserBase.updatepos� c C s� | j }|d }|||d � dkr*|d S |||d � dkrBdS t|�}|||d � dkrh| j|�S || dkr~| j|�S | j||�\}}|dk r�|S |d kr�d| _�x||k �r�|| }|dk� r�||d |� }|d kr�| j|� n | j|� |d S |d k�r&t||�}|�sdS |j � }n�|dk�rB| j||�\} }nt|| jk�rX|d }n^|dk�r�|d k�r~| j |d |�}n$|dk�r�| jd| � n | jd� n| jd|| � |dk r�|S q�W dS )N� r �>�-r z--�[r Zdoctypez"'Z4abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ�attlist�linktype�link�elementz&unsupported '[' char in %s declarationz"unexpected '[' char in declarationz!unexpected %r char in declaration)r r ���r"